aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/DBView.xib72
-rw-r--r--Interfaces/English.lproj/MainMenu.xib363
-rw-r--r--Source/CustomQuery.h4
-rw-r--r--Source/CustomQuery.m31
-rw-r--r--Source/TableDocument.h1
-rw-r--r--Source/TableDocument.m18
6 files changed, 160 insertions, 329 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib
index a6075f19..e1287268 100644
--- a/Interfaces/English.lproj/DBView.xib
+++ b/Interfaces/English.lproj/DBView.xib
@@ -13300,6 +13300,46 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<int key="connectionID">5524</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">initialFirstResponder</string>
+ <reference key="source" ref="78186995"/>
+ <reference key="destination" ref="375350404"/>
+ </object>
+ <int key="connectionID">5525</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="375350404"/>
+ <reference key="destination" ref="781717900"/>
+ </object>
+ <int key="connectionID">5526</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="781717900"/>
+ <reference key="destination" ref="177792895"/>
+ </object>
+ <int key="connectionID">5527</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="177792895"/>
+ <reference key="destination" ref="405872755"/>
+ </object>
+ <int key="connectionID">5528</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="405872755"/>
+ <reference key="destination" ref="375350404"/>
+ </object>
+ <int key="connectionID">5529</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -18597,12 +18637,12 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference ref="702259470"/>
<reference ref="881970916"/>
<reference ref="771216088"/>
- <reference ref="375350404"/>
<reference ref="898579432"/>
<reference ref="296086739"/>
<reference ref="111700280"/>
<reference ref="379816804"/>
<reference ref="781717900"/>
+ <reference ref="375350404"/>
</object>
<reference key="parent" ref="78186995"/>
</object>
@@ -18612,20 +18652,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="parent" ref="539508428"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">5452</int>
- <reference key="object" ref="375350404"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="980282163"/>
- </object>
- <reference key="parent" ref="539508428"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">5453</int>
- <reference key="object" ref="980282163"/>
- <reference key="parent" ref="375350404"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">5464</int>
<reference key="object" ref="702259470"/>
<object class="NSMutableArray" key="children">
@@ -18770,6 +18796,20 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="object" ref="1021526414"/>
<reference key="parent" ref="111700280"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5452</int>
+ <reference key="object" ref="375350404"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="980282163"/>
+ </object>
+ <reference key="parent" ref="539508428"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5453</int>
+ <reference key="object" ref="980282163"/>
+ <reference key="parent" ref="375350404"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -21880,7 +21920,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">5524</int>
+ <int key="maxID">5529</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
diff --git a/Interfaces/English.lproj/MainMenu.xib b/Interfaces/English.lproj/MainMenu.xib
index 138a5162..5a02d51c 100644
--- a/Interfaces/English.lproj/MainMenu.xib
+++ b/Interfaces/English.lproj/MainMenu.xib
@@ -8,7 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="81"/>
+ <integer value="106"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1556,6 +1556,24 @@
<reference key="NSOnImage" ref="625762401"/>
<reference key="NSMixedImage" ref="315854375"/>
</object>
+ <object class="NSMenuItem" id="675223656">
+ <reference key="NSMenu" ref="1021151289"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="625762401"/>
+ <reference key="NSMixedImage" ref="315854375"/>
+ </object>
+ <object class="NSMenuItem" id="501853903">
+ <reference key="NSMenu" ref="1021151289"/>
+ <string key="NSTitle">MySQL Help</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="625762401"/>
+ <reference key="NSMixedImage" ref="315854375"/>
+ </object>
</object>
</object>
</object>
@@ -2292,6 +2310,14 @@
</object>
<int key="connectionID">912</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">showMySQLHelp:</string>
+ <reference key="source" ref="63651044"/>
+ <reference key="destination" ref="501853903"/>
+ </object>
+ <int key="connectionID">916</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -2676,6 +2702,8 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="896818469"/>
<reference ref="379292312"/>
+ <reference ref="675223656"/>
+ <reference ref="501853903"/>
</object>
<reference key="parent" ref="835585357"/>
</object>
@@ -3443,6 +3471,16 @@
<reference key="object" ref="320151386"/>
<reference key="parent" ref="709725194"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">913</int>
+ <reference key="object" ref="675223656"/>
+ <reference key="parent" ref="1021151289"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">914</int>
+ <reference key="object" ref="501853903"/>
+ <reference key="parent" ref="1021151289"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -3770,6 +3808,8 @@
<string>906.IBPluginDependency</string>
<string>908.IBPluginDependency</string>
<string>910.IBPluginDependency</string>
+ <string>913.IBPluginDependency</string>
+ <string>914.IBPluginDependency</string>
<string>92.IBPluginDependency</string>
<string>92.ImportedFromIB2</string>
</object>
@@ -3781,7 +3821,7 @@
<integer value="1" id="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
- <string>{{999, 514}, {181, 43}}</string>
+ <string>{{564, 657}, {181, 73}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{561, 605}, {181, 43}}</string>
@@ -3865,7 +3905,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{449, 1007}, {197, 53}}</string>
- <string>{{468, 450}, {511, 20}}</string>
+ <string>{{114, 730}, {511, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{506, 836}, {511, 20}}</string>
@@ -4013,7 +4053,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{525, 97}, {268, 183}}</string>
+ <string>{{437, 547}, {268, 183}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{829, 663}, {268, 173}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -4042,7 +4082,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{574, 257}, {209, 193}}</string>
+ <string>{{446, 257}, {209, 193}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{180, 535}, {182, 253}}</string>
@@ -4140,6 +4180,8 @@ w6gg4oaSIGZhY2FkZV0</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
</object>
</object>
@@ -4163,24 +4205,12 @@ w6gg4oaSIGZhY2FkZV0</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">912</int>
+ <int key="maxID">916</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
- <string key="className">CMCopyTable</string>
- <string key="superclassName">NSTableView</string>
- <object class="NSMutableDictionary" key="actions">
- <string key="NS.key.0">copy:</string>
- <string key="NS.object.0">id</string>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/CMCopyTable.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">FirstResponder</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
@@ -4207,6 +4237,7 @@ w6gg4oaSIGZhY2FkZV0</string>
<string>repairTable:</string>
<string>setDatabases:</string>
<string>showCreateTableSyntax:</string>
+ <string>showMySQLHelp:</string>
<string>showVariables:</string>
<string>toggleConsole:</string>
<string>viewContent:</string>
@@ -4242,6 +4273,7 @@ w6gg4oaSIGZhY2FkZV0</string>
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -4252,31 +4284,6 @@ w6gg4oaSIGZhY2FkZV0</string>
<object class="IBPartialClassDescription">
<string key="className">MainController</string>
<string key="superclassName">NSObject</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>donate:</string>
- <string>openPreferences:</string>
- <string>visitHelpWebsite:</string>
- <string>visitWebsite:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/MainController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">MainController</string>
- <string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
@@ -4290,282 +4297,34 @@ w6gg4oaSIGZhY2FkZV0</string>
<string key="minorKey"/>
</object>
</object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/CMImageView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/CMMCPConnection.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSTextView</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>doDecomposedStringWithCanonicalMapping:</string>
- <string>doDecomposedStringWithCompatibilityMapping:</string>
- <string>doPrecomposedStringWithCanonicalMapping:</string>
- <string>doPrecomposedStringWithCompatibilityMapping:</string>
- <string>doRemoveDiacritics:</string>
- <string>doSelectionLowerCase:</string>
- <string>doSelectionTitleCase:</string>
- <string>doSelectionUpperCase:</string>
- <string>doTranspose:</string>
- <string>selectCurrentLine:</string>
- <string>selectCurrentWord:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/SPTextViewAdditions.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSWindow</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/SPWindowAdditions.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">SPQueryConsole</string>
- <string key="superclassName">NSWindowController</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>clearConsole:</string>
- <string>copy:</string>
- <string>saveConsoleAs:</string>
- <string>toggleShowSelectShowStatements:</string>
- <string>toggleShowTimeStamps:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>clearConsoleButton</string>
- <string>consoleSearchField</string>
- <string>consoleTableView</string>
- <string>includeTimeStampsButton</string>
- <string>progressIndicator</string>
- <string>saveConsoleButton</string>
- <string>saveLogView</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSButton</string>
- <string>NSSearchField</string>
- <string>NSTableView</string>
- <string>NSButton</string>
- <string>NSProgressIndicator</string>
- <string>NSButton</string>
- <string>NSView</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/SPQueryConsole.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">TableDocument</string>
- <string key="superclassName">NSDocument</string>
+ <string key="className">MainController</string>
+ <string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>addConnectionToFavorites:</string>
- <string>addDatabase:</string>
- <string>analyzeTable:</string>
- <string>cancelConnectSheet:</string>
- <string>checkTable:</string>
- <string>checksumTable:</string>
- <string>chooseDatabase:</string>
- <string>chooseEncoding:</string>
- <string>chooseFavorite:</string>
- <string>closeDatabaseSheet:</string>
- <string>closeSheet:</string>
- <string>connect:</string>
- <string>connectSheetAddToFavorites:</string>
- <string>connectToDB:</string>
- <string>copyCreateTableSyntax:</string>
- <string>export:</string>
- <string>exportMultipleTables:</string>
- <string>exportTable:</string>
- <string>flushPrivileges:</string>
- <string>flushTable:</string>
- <string>import:</string>
- <string>optimizeTable:</string>
- <string>removeDatabase:</string>
- <string>removeFavorite:</string>
- <string>repairTable:</string>
- <string>setDatabases:</string>
- <string>showCreateTableSyntax:</string>
- <string>showVariables:</string>
- <string>viewContent:</string>
- <string>viewQuery:</string>
- <string>viewStatus:</string>
- <string>viewStructure:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>addDatabaseButton</string>
- <string>chooseDatabaseButton</string>
- <string>connectFavoritesTableView</string>
- <string>connectProgressBar</string>
- <string>connectProgressStatusText</string>
- <string>connectSheet</string>
- <string>createTableSyntaxWindow</string>
- <string>customQueryInstance</string>
- <string>customQueryTextView</string>
- <string>databaseEncodingButton</string>
- <string>databaseField</string>
- <string>databaseNameField</string>
- <string>databaseSheet</string>
- <string>dbTablesTableView</string>
- <string>favoritesButton</string>
- <string>favoritesController</string>
- <string>hostField</string>
- <string>keyChainInstance</string>
- <string>passwordField</string>
- <string>portField</string>
- <string>queryProgressBar</string>
- <string>sidebarGrabber</string>
- <string>socketField</string>
- <string>spExportControllerInstance</string>
- <string>syntaxView</string>
- <string>syntaxViewContent</string>
- <string>tableContentInstance</string>
- <string>tableDataInstance</string>
- <string>tableDumpInstance</string>
- <string>tableSourceInstance</string>
- <string>tableStatusInstance</string>
- <string>tableTabView</string>
- <string>tableWindow</string>
- <string>tablesListInstance</string>
- <string>userField</string>
- <string>variablesSheet</string>
- <string>variablesTableView</string>
+ <string>donate:</string>
+ <string>openPreferences:</string>
+ <string>visitHelpWebsite:</string>
+ <string>visitWebsite:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
- <string>NSTableView</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>NSWindow</string>
- <string>id</string>
- <string>NSTextView</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>NSTableView</string>
- <string>id</string>
- <string>NSArrayController</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>NSTabView</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/TableDocument.h</string>
+ <string key="majorKey">IBDocumentRelativeSource</string>
+ <string key="minorKey">../../Source/MainController.h</string>
</object>
</object>
- </object>
- <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
- <bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="939419192">
diff --git a/Source/CustomQuery.h b/Source/CustomQuery.h
index 1fae3b5d..72cc749c 100644
--- a/Source/CustomQuery.h
+++ b/Source/CustomQuery.h
@@ -31,6 +31,8 @@
#import "CMMCPResult.h"
#import "RegexKitLite.h"
+#define SP_HELP_TOC_SEARCH_STRING @"contents"
+
@interface CustomQuery : NSObject {
IBOutlet id tableWindow;
@@ -123,6 +125,8 @@
- (void)showHelpFor:(NSString *)aString addToHistory:(BOOL)addToHistory;
- (void)helpTargetValidation;
- (void)openMySQLonlineDocumentationWithString:(NSString *)searchString;
+- (NSWindow *)helpWebViewWindow;
+- (void)setMySQLversion:(NSString *)theVersion;
// Other
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 10cf95f7..755b980f 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -37,7 +37,6 @@
#define SP_HELP_SHOW_TOC_BUTTON 1
#define SP_HELP_GOFORWARD_BUTTON 2
#define SP_HELP_NOT_AVAILABLE @"__no_help_available"
-#define SP_HELP_TOC_SEARCH_STRING @"contents"
@implementation CustomQuery
@@ -1383,6 +1382,21 @@ traps enter key and
#pragma mark -
#pragma mark MySQL Help
+/*
+ * Set the MySQL version as X.Y for Help window title and online search
+ */
+- (void)setMySQLversion:(NSString *)theVersion
+{
+ mySQLversion = [[theVersion substringToIndex:3] retain];
+}
+
+/*
+ * Return the Help window.
+ */
+- (NSWindow *)helpWebViewWindow
+{
+ return helpWebViewWindow;
+}
/*
* Show the data for "HELP 'searchString'".
@@ -1390,18 +1404,13 @@ traps enter key and
- (void)showHelpFor:(NSString *)searchString addToHistory:(BOOL)addToHistory
{
NSString * helpString = [self getHTMLformattedMySQLHelpFor:searchString];
+
// Order out resp. init the Help window if not visible
if(![helpWebViewWindow isVisible])
{
- // get current MySQL version for title and online search
- mySQLversion = [[[(TableDocument *)[[textView window] delegate] mySQLVersion] substringToIndex:3] retain];
-
+ // set title of the Help window
[helpWebViewWindow setTitle:[NSString stringWithFormat:@"%@ (%@ %@)", NSLocalizedString(@"MySQL Help", @"mysql help"), NSLocalizedString(@"version", @"version"), mySQLversion]];
-
- // init search history
- [helpWebView setMaintainsBackForwardList:YES];
- [[helpWebView backForwardList] setCapacity:20];
-
+
// init goback/forward buttons
if([[helpWebView backForwardList] backListCount] < 1)
{
@@ -1872,6 +1881,10 @@ traps enter key and
NSBeep();
}
+ // init search history
+ [helpWebView setMaintainsBackForwardList:YES];
+ [[helpWebView backForwardList] setCapacity:20];
+
return self;
}
diff --git a/Source/TableDocument.h b/Source/TableDocument.h
index fb35d612..94e95047 100644
--- a/Source/TableDocument.h
+++ b/Source/TableDocument.h
@@ -134,6 +134,7 @@
- (IBAction)addDatabase:(id)sender;
- (IBAction)closeDatabaseSheet:(id)sender;
- (IBAction)removeDatabase:(id)sender;
+- (IBAction)showMySQLHelp:(id)sender;
//encoding methods
- (void)setConnectionEncoding:(NSString *)mysqlEncoding reloadingViews:(BOOL)reloadViews;
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 3acb53b4..ecbe6d86 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -339,6 +339,7 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum
[tableSourceInstance setConnection:mySQLConnection];
[tableContentInstance setConnection:mySQLConnection];
[customQueryInstance setConnection:mySQLConnection];
+ [customQueryInstance setMySQLversion:mySQLVersion];
[tableDumpInstance setConnection:mySQLConnection];
[spExportControllerInstance setConnection:mySQLConnection];
[tableStatusInstance setConnection:mySQLConnection];
@@ -1436,11 +1437,22 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum
return [self export:sender];
}
+/*
+ * Show the MySQL Help TOC of the current MySQL connection
+ * Invoked by the MainMenu > Help > MySQL Help
+ */
+- (IBAction)showMySQLHelp:(id)sender
+{
+ [customQueryInstance showHelpFor:SP_HELP_TOC_SEARCH_STRING addToHistory:YES];
+ [[customQueryInstance helpWebViewWindow] makeKeyWindow];
+}
+
+
/**
* Menu validation
*/
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
-{
+{
if ([menuItem action] == @selector(import:) ||
[menuItem action] == @selector(export:) ||
[menuItem action] == @selector(exportMultipleTables:) ||
@@ -1816,7 +1828,7 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum
//set up toolbar
[self setupToolbar];
- // [self connectToDB:nil];
+ // [self connectToDB:nil];
[self performSelector:@selector(connectToDB:) withObject:tableWindow afterDelay:0.0f];
if([prefs boolForKey:@"SelectLastFavoriteUsed"] == YES){
@@ -1835,6 +1847,8 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum
{
if ([mySQLConnection isConnected]) [self closeConnection];
if ([[[SPQueryConsole sharedQueryConsole] window] isVisible]) [self toggleConsole:self];
+ [[customQueryInstance helpWebViewWindow] release];
+ [createTableSyntaxWindow release];
[[NSNotificationCenter defaultCenter] removeObserver:self];
}