Permalink
Browse files

Internal Refactoring: Move MySQL Help viewer into own xib with own co…

…ntroller
  • Loading branch information...
dmoagx committed May 27, 2018
1 parent 99cb087 commit 56817be6cc46742b75e23b021787eb006829b53f
@@ -100,6 +100,7 @@ - (NSString *)escapeString:(NSString *)theString includingQuotes:(BOOL)includeQu
NSData *escapedData;
if (includeQuotes) {
#warning This code assumes that the encoding cData is in is still ASCII-compatible which may not be the case (e.g. for UTF16, EBCDIC)
// Add quotes if requested
escBuffer[0] = '\'';
escBuffer[escapedLength+1] = '\'';

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -2,12 +2,12 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{{title}}</title>
<style type="text/css" media="all">
body {
margin: 2px;
padding: 10px;
font-family:'Helvetica';
font-family: 'Helvetica', 'Helvetica Neue', sans-serif;
font-size:9pt;
}
@@ -23,19 +23,28 @@
}
.description {
font-family: Monaco;
font-family: Monaco, monospace;
}
.example {
font-family: Courier;
font-family: Courier, monospace;
}
.header {
padding-bottom: 5px;
}
.nothing {
color: gray;
}
.error {
color: #ff415a;
font-family: monospace;
}
</style>
</head>
<body>
%@
{{body}}
</body>
</html>
View
@@ -31,17 +31,6 @@
#import "SPDatabaseContentViewDelegate.h"
#import <WebKit/WebKit.h>
#define SP_HELP_TOC_SEARCH_STRING @"contents"
#define SP_HELP_SEARCH_IN_MYSQL 0
#define SP_HELP_SEARCH_IN_PAGE 1
#define SP_HELP_SEARCH_IN_WEB 2
#define SP_HELP_GOBACK_BUTTON 0
#define SP_HELP_SHOW_TOC_BUTTON 1
#define SP_HELP_GOFORWARD_BUTTON 2
#define SP_HELP_NOT_AVAILABLE @"__no_help_available"
#define SP_SAVE_ALL_FAVORTITE_MENUITEM_TAG 100001
#define SP_SAVE_SELECTION_FAVORTITE_MENUITEM_TAG 100000
#define SP_FAVORITE_HEADER_MENUITEM_TAG 200000
@@ -122,12 +111,6 @@
#ifndef SP_CODA
IBOutlet NSMenuItem *previousHistoryMenuItem;
IBOutlet NSMenuItem *nextHistoryMenuItem;
IBOutlet NSWindow *helpWebViewWindow;
IBOutlet WebView *helpWebView;
IBOutlet NSSearchField *helpSearchField;
IBOutlet NSSearchFieldCell *helpSearchFieldCell;
IBOutlet NSSegmentedControl *helpNavigator;
IBOutlet NSSegmentedControl *helpTargetSelector;
#endif
IBOutlet NSButton *queryInfoButton;
@@ -145,17 +128,10 @@
NSArray *currentQueryRanges;
BOOL currentQueryBeforeCaret;
NSString *mySQLversion;
NSTableColumn *sortColumn;
NSUInteger queryStartPosition;
#ifndef SP_CODA
NSUInteger helpTarget;
WebHistory *helpHistory;
NSString *helpHTMLTemplate;
#endif
SPDataStorage *resultData;
pthread_mutex_t resultDataLock;
NSArray *cqColumnDefinition;
@@ -213,17 +189,6 @@
- (IBAction)chooseQueryHistory:(id)sender;
- (IBAction)closeSheet:(id)sender;
- (IBAction)gearMenuItemSelected:(id)sender;
#ifndef SP_CODA
- (IBAction)showHelpForCurrentWord:(id)sender;
- (IBAction)showHelpForSearchString:(id)sender;
- (IBAction)helpSegmentDispatcher:(id)sender;
- (IBAction)helpTargetDispatcher:(id)sender;
- (IBAction)helpSearchFindNextInPage:(id)sender;
- (IBAction)helpSearchFindPreviousInPage:(id)sender;
- (IBAction)helpSelectHelpTargetMySQL:(id)sender;
- (IBAction)helpSelectHelpTargetPage:(id)sender;
- (IBAction)helpSelectHelpTargetWeb:(id)sender;
#endif
- (IBAction)filterQueryFavorites:(id)sender;
- (IBAction)filterQueryHistory:(id)sender;
- (IBAction)saveQueryHistory:(id)sender;
@@ -268,11 +233,6 @@
#ifndef SP_CODA
// MySQL Help
- (void)showAutoHelpForCurrentWord:(id)sender;
- (NSString *)getHTMLformattedMySQLHelpFor:(NSString *)searchString calledByAutoHelp:(BOOL)autoHelp;
- (void)showHelpFor:(NSString *)aString addToHistory:(BOOL)addToHistory calledByAutoHelp:(BOOL)autoHelp;
- (void)helpTargetValidation;
- (void)openMySQLonlineDocumentationWithString:(NSString *)searchString;
- (NSWindow *)helpWebViewWindow;
#endif
- (void)setMySQLversion:(NSString *)theVersion;
Oops, something went wrong.

0 comments on commit 56817be

Please sign in to comment.