aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/DBView.xib231
-rw-r--r--Interfaces/English.lproj/MainMenu.xib266
-rw-r--r--Source/TablesList.h8
-rw-r--r--Source/TablesList.m71
4 files changed, 298 insertions, 278 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib
index 16099b30..72c845e8 100644
--- a/Interfaces/English.lproj/DBView.xib
+++ b/Interfaces/English.lproj/DBView.xib
@@ -3,7 +3,7 @@
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">10D573</string>
- <string key="IBDocument.InterfaceBuilderVersion">740</string>
+ <string key="IBDocument.InterfaceBuilderVersion">762</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">460.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
@@ -16,15 +16,14 @@
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>740</string>
- <string>740</string>
- <string>1.2.2</string>
+ <string>762</string>
+ <string>762</string>
+ <string>1.2.5</string>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="6225"/>
- <integer value="5824"/>
+ <integer value="6147"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -786,8 +785,31 @@
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="321871356"/>
</object>
+ <object class="NSMenuItem" id="215466732">
+ <reference key="NSMenu" ref="890046805"/>
+ <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="450876295"/>
+ <reference key="NSMixedImage" ref="414351669"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="321871356"/>
+ </object>
+ <object class="NSMenuItem" id="570147191">
+ <reference key="NSMenu" ref="890046805"/>
+ <string key="NSTitle">Show Create Table Syntax...</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="450876295"/>
+ <reference key="NSMixedImage" ref="414351669"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="321871356"/>
+ </object>
</object>
</object>
+ <int key="NSSelectedIndex">6</int>
<bool key="NSPullDown">YES</bool>
<int key="NSPreferredEdge">1</int>
<bool key="NSUsesItemFromMenu">YES</bool>
@@ -1694,6 +1716,7 @@
<bool key="BWGBHasTopBorder">NO</bool>
<bool key="BWGBHasBottomBorder">NO</bool>
<bool key="BWGBHasGradient">NO</bool>
+ <bool key="BWGBHasFillColor">NO</bool>
<float key="BWGBTopInsetAlpha">0.0</float>
<float key="BWGBBottomInsetAlpha">0.0</float>
</object>
@@ -11884,6 +11907,24 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="NSOnImage" ref="450876295"/>
<reference key="NSMixedImage" ref="414351669"/>
</object>
+ <object class="NSMenuItem" id="915784483">
+ <reference key="NSMenu" ref="556141845"/>
+ <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="450876295"/>
+ <reference key="NSMixedImage" ref="414351669"/>
+ </object>
+ <object class="NSMenuItem" id="947454058">
+ <reference key="NSMenu" ref="556141845"/>
+ <string key="NSTitle">Show Create Table Syntax...</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="450876295"/>
+ <reference key="NSMixedImage" ref="414351669"/>
+ </object>
</object>
</object>
<object class="NSMenu" id="351243688">
@@ -16298,6 +16339,54 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<int key="connectionID">6921</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">showCreateTableSyntax:</string>
+ <reference key="source" ref="427689665"/>
+ <reference key="destination" ref="947454058"/>
+ </object>
+ <int key="connectionID">6925</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">showCreateTableSyntax:</string>
+ <reference key="source" ref="427689665"/>
+ <reference key="destination" ref="570147191"/>
+ </object>
+ <int key="connectionID">6928</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">showCreateSyntaxContextMenuItem</string>
+ <reference key="source" ref="438574515"/>
+ <reference key="destination" ref="947454058"/>
+ </object>
+ <int key="connectionID">6929</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">showCreateSyntaxMenuItem</string>
+ <reference key="source" ref="438574515"/>
+ <reference key="destination" ref="570147191"/>
+ </object>
+ <int key="connectionID">6930</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">separatorTableMenuItem2</string>
+ <reference key="source" ref="438574515"/>
+ <reference key="destination" ref="215466732"/>
+ </object>
+ <int key="connectionID">6931</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">separatorTableContextMenuItem2</string>
+ <reference key="source" ref="438574515"/>
+ <reference key="destination" ref="915784483"/>
+ </object>
+ <int key="connectionID">6932</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -20979,6 +21068,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference ref="962084508"/>
<reference ref="351524538"/>
<reference ref="545621807"/>
+ <reference ref="215466732"/>
+ <reference ref="570147191"/>
</object>
<reference key="parent" ref="321871356"/>
</object>
@@ -21064,6 +21155,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference ref="434807053"/>
<reference ref="419134079"/>
<reference ref="584064012"/>
+ <reference ref="915784483"/>
+ <reference ref="947454058"/>
</object>
<reference key="parent" ref="0"/>
<string key="objectName">Table List Menu</string>
@@ -22927,6 +23020,26 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="object" ref="928430119"/>
<reference key="parent" ref="444632858"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6922</int>
+ <reference key="object" ref="915784483"/>
+ <reference key="parent" ref="556141845"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6923</int>
+ <reference key="object" ref="947454058"/>
+ <reference key="parent" ref="556141845"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6926</int>
+ <reference key="object" ref="215466732"/>
+ <reference key="parent" ref="890046805"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6927</int>
+ <reference key="object" ref="570147191"/>
+ <reference key="parent" ref="890046805"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -24313,6 +24426,10 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>6915.IBPluginDependency</string>
<string>6916.IBPluginDependency</string>
<string>6917.IBPluginDependency</string>
+ <string>6922.IBPluginDependency</string>
+ <string>6923.IBPluginDependency</string>
+ <string>6926.IBPluginDependency</string>
+ <string>6927.IBPluginDependency</string>
<string>711.IBPluginDependency</string>
<string>711.ImportedFromIB2</string>
<string>713.IBPluginDependency</string>
@@ -25122,11 +25239,11 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{77, 206}, {944, 550}}</string>
+ <string>{{489, 357}, {944, 550}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<boolean value="NO"/>
- <string>{{77, 206}, {944, 550}}</string>
+ <string>{{489, 357}, {944, 550}}</string>
<integer value="1"/>
<integer value="1"/>
<string>{{62, 352}, {845, 504}}</string>
@@ -25719,7 +25836,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.brandonwalkin.BWToolkit</string>
- <string>{{300, 100}, {157, 98}}</string>
+ <string>{{508, 255}, {208, 125}}</string>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.brandonwalkin.BWToolkit</string>
<object class="NSMutableDictionary">
@@ -25781,7 +25898,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.brandonwalkin.BWToolkit</string>
- <string>{{623, 397}, {171, 93}}</string>
+ <string>{{774, 479}, {241, 123}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary">
<string key="NS.key.0">ToolTip</string>
@@ -25827,7 +25944,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>{{735, 570}, {233, 53}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{898, 501}, {228, 113}}</string>
+ <string>{{926, 501}, {228, 113}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -26316,6 +26433,10 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</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>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
@@ -26458,7 +26579,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">6921</int>
+ <int key="maxID">6932</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -27514,6 +27635,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>focusOnTableContentFilter:</string>
<string>focusOnTableListFilter:</string>
<string>import:</string>
+ <string>importFromClipboard:</string>
<string>openCurrentConnectionInNewWindow:</string>
<string>optimizeTable:</string>
<string>removeDatabase:</string>
@@ -27584,6 +27706,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -27797,6 +27920,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>importFieldsEscapedField</string>
<string>importFieldsTerminatedField</string>
<string>importFormatPopup</string>
+ <string>importFromClipboardAccessoryView</string>
+ <string>importFromClipboardSheet</string>
+ <string>importFromClipboardTextView</string>
<string>importLinesTerminatedField</string>
<string>multiCSVFullStreamingSwitch</string>
<string>multiXMLFullStreamingSwitch</string>
@@ -27853,6 +27979,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>NSPopUpButton</string>
<string>id</string>
<string>id</string>
+ <string>NSTextView</string>
+ <string>id</string>
+ <string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
@@ -28037,7 +28166,11 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>renameTableContextMenuItem</string>
<string>renameTableMenuItem</string>
<string>separatorTableContextMenuItem</string>
+ <string>separatorTableContextMenuItem2</string>
<string>separatorTableMenuItem</string>
+ <string>separatorTableMenuItem2</string>
+ <string>showCreateSyntaxContextMenuItem</string>
+ <string>showCreateSyntaxMenuItem</string>
<string>spHistoryControllerInstance</string>
<string>tabView</string>
<string>tableContentInstance</string>
@@ -28081,6 +28214,10 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
<string>SPHistoryController</string>
<string>id</string>
<string>id</string>
@@ -29103,6 +29240,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
<integer value="1050" key="NS.object.0"/>
@@ -29118,5 +29256,74 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">../../sequel-pro.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSActionTemplate</string>
+ <string>NSAddTemplate</string>
+ <string>NSAdvanced</string>
+ <string>NSApplicationIcon</string>
+ <string>NSGoLeftTemplate</string>
+ <string>NSGoRightTemplate</string>
+ <string>NSLeftFacingTriangleTemplate</string>
+ <string>NSListViewTemplate</string>
+ <string>NSMenuCheckmark</string>
+ <string>NSMenuMixedState</string>
+ <string>NSRefreshTemplate</string>
+ <string>NSRightFacingTriangleTemplate</string>
+ <string>NSSwitch</string>
+ <string>button_action</string>
+ <string>button_add</string>
+ <string>button_bar_spacer</string>
+ <string>button_duplicate</string>
+ <string>button_edit</string>
+ <string>button_edit_mode</string>
+ <string>button_edit_mode_selected</string>
+ <string>button_left</string>
+ <string>button_pagination</string>
+ <string>button_pane_hide_icon</string>
+ <string>button_pane_show_icon</string>
+ <string>button_refresh</string>
+ <string>button_remove</string>
+ <string>button_right</string>
+ <string>grabber-horizontal</string>
+ <string>selectall</string>
+ <string>selectnone</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>{10, 10}</string>
+ <string>{8, 8}</string>
+ <string>{32, 32}</string>
+ <string>{128, 128}</string>
+ <string>{9, 9}</string>
+ <string>{9, 9}</string>
+ <string>{9, 9}</string>
+ <string>{11, 10}</string>
+ <string>{9, 8}</string>
+ <string>{7, 2}</string>
+ <string>{10, 12}</string>
+ <string>{9, 9}</string>
+ <string>{15, 15}</string>
+ <string>{32, 23}</string>
+ <string>{32, 23}</string>
+ <string>{10, 23}</string>
+ <string>{33, 23}</string>
+ <string>{32, 23}</string>
+ <string>{32, 23}</string>
+ <string>{32, 23}</string>
+ <string>{32, 23}</string>
+ <string>{32, 23}</string>
+ <string>{11, 10}</string>
+ <string>{11, 10}</string>
+ <string>{32, 23}</string>
+ <string>{32, 23}</string>
+ <string>{32, 23}</string>
+ <string>{10, 8}</string>
+ <string>{14, 17}</string>
+ <string>{14, 17}</string>
+ </object>
+ </object>
</data>
</archive>
diff --git a/Interfaces/English.lproj/MainMenu.xib b/Interfaces/English.lproj/MainMenu.xib
index f4361457..b32ce64a 100644
--- a/Interfaces/English.lproj/MainMenu.xib
+++ b/Interfaces/English.lproj/MainMenu.xib
@@ -3,16 +3,16 @@
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">10D573</string>
- <string key="IBDocument.InterfaceBuilderVersion">740</string>
+ <string key="IBDocument.InterfaceBuilderVersion">762</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">460.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">740</string>
+ <string key="NS.object.0">762</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="81"/>
+ <integer value="758"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1678,7 +1678,7 @@
</object>
<object class="NSMenuItem" id="638185532">
<reference key="NSMenu" ref="1056168652"/>
- <string key="NSTitle">Show Create Table Syntax</string>
+ <string key="NSTitle">Show Create Table Syntax...</string>
<string key="NSKeyEquiv">s</string>
<int key="NSKeyEquivModMask">1572864</int>
<int key="NSMnemonicLoc">2147483647</int>
@@ -4944,7 +4944,7 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{564, 345}, {255, 203}}</string>
+ <string>{{472, 271}, {255, 203}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{312, 683}, {231, 153}}</string>
@@ -5013,7 +5013,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{517, 403}, {279, 233}}</string>
+ <string>{{553, 241}, {292, 233}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{829, 663}, {268, 173}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -5898,6 +5898,7 @@
<string>focusOnTableContentFilter:</string>
<string>focusOnTableListFilter:</string>
<string>import:</string>
+ <string>importFromClipboard:</string>
<string>openCurrentConnectionInNewWindow:</string>
<string>optimizeTable:</string>
<string>removeDatabase:</string>
@@ -5968,6 +5969,7 @@
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -6127,244 +6129,6 @@
</object>
<reference key="sourceIdentifier" ref="939419192"/>
</object>
- <object class="IBPartialClassDescription">
- <string key="className">TableDocument</string>
- <string key="superclassName">NSDocument</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>addConnectionToFavorites:</string>
- <string>addDatabase:</string>
- <string>analyzeTable:</string>
- <string>backForwardInHistory:</string>
- <string>cancelTask:</string>
- <string>checkTable:</string>
- <string>checksumTable:</string>
- <string>chooseDatabase:</string>
- <string>chooseEncoding:</string>
- <string>closePanelSheet:</string>
- <string>closePasswordSheet:</string>
- <string>closeSheet:</string>
- <string>copyChecksumFromSheet:</string>
- <string>copyCreateTableSyntax:</string>
- <string>copyCreateTableSyntaxFromSheet:</string>
- <string>export:</string>
- <string>exportMultipleTables:</string>
- <string>exportTable:</string>
- <string>flushPrivileges:</string>
- <string>flushTable:</string>
- <string>focusOnTableContentFilter:</string>
- <string>focusOnTableListFilter:</string>
- <string>import:</string>
- <string>importFromClipboard:</string>
- <string>openCurrentConnectionInNewWindow:</string>
- <string>optimizeTable:</string>
- <string>removeDatabase:</string>
- <string>repairTable:</string>
- <string>saveConnectionSheet:</string>
- <string>saveCreateSyntax:</string>
- <string>setDatabases:</string>
- <string>showConsole:</string>
- <string>showCreateTableSyntax:</string>
- <string>showMySQLHelp:</string>
- <string>showNavigator:</string>
- <string>showServerProcesses:</string>
- <string>showServerVariables:</string>
- <string>showUserManager:</string>
- <string>toggleNavigator:</string>
- <string>validateSaveConnectionAccessory:</string>
- <string>viewContent:</string>
- <string>viewQuery:</string>
- <string>viewRelations:</string>
- <string>viewStatus:</string>
- <string>viewStructure:</string>
- <string>viewTriggers:</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>
- <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="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>addDatabaseButton</string>
- <string>chooseDatabaseButton</string>
- <string>connectionErrorDialog</string>
- <string>contentViewSplitter</string>
- <string>createTableSyntaxTextField</string>
- <string>createTableSyntaxTextView</string>
- <string>createTableSyntaxWindow</string>
- <string>customQueryInstance</string>
- <string>customQueryTextView</string>
- <string>databaseDataInstance</string>
- <string>databaseEncodingButton</string>
- <string>databaseNameField</string>
- <string>databaseSheet</string>
- <string>dbTablesTableView</string>
- <string>encodingPopUp</string>
- <string>exportControllerInstance</string>
- <string>extendedTableInfoInstance</string>
- <string>favoritesButton</string>
- <string>historyControl</string>
- <string>inputTextWindow</string>
- <string>inputTextWindowHeader</string>
- <string>inputTextWindowMessage</string>
- <string>inputTextWindowSecureTextField</string>
- <string>listFilterField</string>
- <string>queryProgressBar</string>
- <string>saveConnectionAccessory</string>
- <string>saveConnectionAutoConnect</string>
- <string>saveConnectionEncrypt</string>
- <string>saveConnectionEncryptString</string>
- <string>saveConnectionIncludeData</string>
- <string>saveConnectionIncludeQuery</string>
- <string>saveConnectionSavePassword</string>
- <string>saveConnectionSavePasswordAlert</string>
- <string>sidebarGrabber</string>
- <string>spHistoryControllerInstance</string>
- <string>statusTableAccessoryView</string>
- <string>statusTableCopyChecksum</string>
- <string>statusTableView</string>
- <string>statusValues</string>
- <string>tableContentInstance</string>
- <string>tableDataInstance</string>
- <string>tableDumpInstance</string>
- <string>tableInfoCollapseButton</string>
- <string>tableInfoTable</string>
- <string>tableListSplitter</string>
- <string>tableRelationsInstance</string>
- <string>tableSourceInstance</string>
- <string>tableTabView</string>
- <string>tableTriggersInstance</string>
- <string>tableWindow</string>
- <string>tablesListInstance</string>
- <string>taskCancelButton</string>
- <string>taskCancellationCallbackObject</string>
- <string>taskDescriptionText</string>
- <string>taskProgressIndicator</string>
- <string>taskProgressLayer</string>
- <string>titleAccessoryView</string>
- <string>titleImageView</string>
- <string>titleStringView</string>
- <string>userManagerInstance</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>NSWindow</string>
- <string>NSSplitView</string>
- <string>NSTextField</string>
- <string>NSTextView</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>NSPopUpButton</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>NSSearchField</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>NSSecureTextField</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>NSButton</string>
- <string>NSTableView</string>
- <string>NSSplitView</string>
- <string>id</string>
- <string>id</string>
- <string>NSTabView</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>NSButton</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>NSBox</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>SPUserManager</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBDocumentRelativeSource</string>
- <string key="minorKey">../../Source/TableDocument.h</string>
- </object>
- </object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -7182,6 +6946,7 @@
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
<integer value="1050" key="NS.object.0"/>
@@ -7197,5 +6962,18 @@
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">../../sequel-pro.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSMenuCheckmark</string>
+ <string>NSMenuMixedState</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>{9, 8}</string>
+ <string>{7, 2}</string>
+ </object>
+ </object>
</data>
</archive>
diff --git a/Source/TablesList.h b/Source/TablesList.h
index 12ea61e3..5c6ccf96 100644
--- a/Source/TablesList.h
+++ b/Source/TablesList.h
@@ -74,17 +74,23 @@
IBOutlet NSSearchField *listFilterField;
+ // Table list 'gear' menu items
IBOutlet NSMenuItem *removeTableMenuItem;
IBOutlet NSMenuItem *duplicateTableMenuItem;
IBOutlet NSMenuItem *renameTableMenuItem;
IBOutlet NSMenuItem *separatorTableMenuItem;
-
+ IBOutlet NSMenuItem *showCreateSyntaxMenuItem;
+ IBOutlet NSMenuItem *separatorTableMenuItem2;
+
MCPConnection *mySQLConnection;
+ // Table list context menu items
IBOutlet NSMenuItem *removeTableContextMenuItem;
IBOutlet NSMenuItem *duplicateTableContextMenuItem;
IBOutlet NSMenuItem *renameTableContextMenuItem;
IBOutlet NSMenuItem *separatorTableContextMenuItem;
+ IBOutlet NSMenuItem *showCreateSyntaxContextMenuItem;
+ IBOutlet NSMenuItem *separatorTableContextMenuItem2;
NSMutableArray *tables;
NSMutableArray *filteredTables;
diff --git a/Source/TablesList.m b/Source/TablesList.m
index bced6366..7d7eb586 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -756,37 +756,43 @@
// Update the selected table name and type
if (selectedTableName) [selectedTableName release];
+
if ([indexes count]) {
selectedTableName = [[NSString alloc] initWithString:@""];
- } else {
+ }
+ else {
selectedTableName = nil;
}
+
selectedTableType = SPTableTypeNone;
[tableSourceInstance loadTable:nil];
[tableContentInstance loadTable:nil];
[extendedTableInfoInstance loadTable:nil];
+
structureLoaded = NO;
contentLoaded = NO;
statusLoaded = NO;
// Set gear menu items Remove/Duplicate table/view according to the table types
// if at least one item is selected
- if([indexes count]) {
+ if ([indexes count]) {
+
NSUInteger currentIndex = [indexes lastIndex];
BOOL areTableTypeEqual = YES;
NSInteger lastType = [[filteredTableTypes objectAtIndex:currentIndex] integerValue];
+
while (currentIndex != NSNotFound)
{
- if ([[filteredTableTypes objectAtIndex:currentIndex] integerValue] != lastType)
- {
+ if ([[filteredTableTypes objectAtIndex:currentIndex] integerValue] != lastType) {
areTableTypeEqual = NO;
break;
}
+
currentIndex = [indexes indexLessThanIndex:currentIndex];
}
- if (areTableTypeEqual)
- {
+
+ if (areTableTypeEqual) {
switch (lastType) {
case SPTableTypeTable:
[removeTableMenuItem setTitle:NSLocalizedString(@"Remove Tables", @"remove tables menu title")];
@@ -823,15 +829,21 @@
[truncateTableContextButton setHidden:YES];
}
}
+
+ // Context menu
[renameTableContextMenuItem setHidden:YES];
[duplicateTableContextMenuItem setHidden:YES];
[separatorTableContextMenuItem setHidden:YES];
+ [separatorTableContextMenuItem2 setHidden:YES];
+ [showCreateSyntaxContextMenuItem setHidden:YES];
+ // 'Gear' menu
[renameTableMenuItem setHidden:YES];
[duplicateTableMenuItem setHidden:YES];
[separatorTableMenuItem setHidden:YES];
- [separatorTableContextMenuItem setHidden:YES];
-
+ [separatorTableMenuItem2 setHidden:YES];
+ [showCreateSyntaxMenuItem setHidden:YES];
+
NSMenu *tableSubMenu = [[[NSApp mainMenu] itemWithTitle:@"Table"] submenu];
[[tableSubMenu itemAtIndex:6] setTitle:NSLocalizedString(@"Check Selected Items", @"check selected items menu item")];
@@ -880,18 +892,23 @@
// Reset the table information caches
[tableDataInstance resetAllData];
+ // Show menu separatoes
[separatorTableMenuItem setHidden:NO];
[separatorTableContextMenuItem setHidden:NO];
-
+ [separatorTableMenuItem2 setHidden:NO];
+ [separatorTableContextMenuItem2 setHidden:NO];
+
// Set gear menu items Remove/Duplicate table/view and mainMenu > Table items
// according to the table types
NSMenu *tableSubMenu = [[[NSApp mainMenu] itemWithTitle:@"Table"] submenu];
- if(selectedTableType == SPTableTypeView)
+ // Enable/disable the various menu items depending on the selected item. Also update their titles.
+ // Note, that this should ideally be moved to menu item validation as opposed to using fixed item positions.
+ if (selectedTableType == SPTableTypeView)
{
// Change mainMenu > Table > ... according to table type
[[tableSubMenu itemAtIndex:3] setTitle:NSLocalizedString(@"Copy Create View Syntax", @"copy create view syntax menu item")];
- [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create View Syntax", @"show create view syntax menu item")];
+ [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create View Syntax...", @"show create view syntax menu item")];
[[tableSubMenu itemAtIndex:5] setHidden:NO]; // Divider
[[tableSubMenu itemAtIndex:6] setHidden:NO];
[[tableSubMenu itemAtIndex:6] setTitle:NSLocalizedString(@"Check View", @"check view menu item")];
@@ -909,6 +926,7 @@
[duplicateTableMenuItem setTitle:NSLocalizedString(@"Duplicate View...", @"duplicate view menu title")];
[truncateTableButton setHidden:YES];
[removeTableMenuItem setTitle:NSLocalizedString(@"Remove View", @"remove view menu title")];
+ [showCreateSyntaxMenuItem setTitle:NSLocalizedString(@"Show Create View Syntax...", @"show create view syntax menu item")];
[renameTableContextMenuItem setHidden:NO]; // we don't have to check the mysql version
[renameTableContextMenuItem setTitle:NSLocalizedString(@"Rename View...", @"rename view menu title")];
@@ -916,10 +934,11 @@
[duplicateTableContextMenuItem setTitle:NSLocalizedString(@"Duplicate View...", @"duplicate view menu title")];
[truncateTableContextButton setHidden:YES];
[removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove View", @"remove view menu title")];
+ [showCreateSyntaxContextMenuItem setTitle:NSLocalizedString(@"Show Create View Syntax...", @"show create view syntax menu item")];
}
- else if(selectedTableType == SPTableTypeTable) {
+ else if (selectedTableType == SPTableTypeTable) {
[[tableSubMenu itemAtIndex:3] setTitle:NSLocalizedString(@"Copy Create Table Syntax", @"copy create table syntax menu item")];
- [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create Table Syntax", @"show create table syntax menu item")];
+ [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create Table Syntax...", @"show create table syntax menu item")];
[[tableSubMenu itemAtIndex:5] setHidden:NO]; // divider
[[tableSubMenu itemAtIndex:6] setHidden:NO];
[[tableSubMenu itemAtIndex:6] setTitle:NSLocalizedString(@"Check Table", @"check table menu item")];
@@ -942,6 +961,8 @@
[truncateTableButton setHidden:NO];
[truncateTableButton setTitle:NSLocalizedString(@"Truncate Table", @"truncate table menu title")];
[removeTableMenuItem setTitle:NSLocalizedString(@"Remove Table", @"remove table menu title")];
+ [showCreateSyntaxMenuItem setHidden:NO];
+ [showCreateSyntaxMenuItem setTitle:NSLocalizedString(@"Show Create Table Syntax...", @"show create table syntax menu item")];
[renameTableContextMenuItem setHidden:NO];
[renameTableContextMenuItem setTitle:NSLocalizedString(@"Rename Table...", @"rename table menu title")];
@@ -950,11 +971,12 @@
[truncateTableContextButton setHidden:NO];
[truncateTableContextButton setTitle:NSLocalizedString(@"Truncate Table", @"truncate table menu title")];
[removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove Table", @"remove table menu title")];
-
+ [showCreateSyntaxContextMenuItem setHidden:NO];
+ [showCreateSyntaxContextMenuItem setTitle:NSLocalizedString(@"Show Create Table Syntax...", @"show create table syntax menu item")];
}
- else if(selectedTableType == SPTableTypeProc) {
+ else if (selectedTableType == SPTableTypeProc) {
[[tableSubMenu itemAtIndex:3] setTitle:NSLocalizedString(@"Copy Create Procedure Syntax", @"copy create proc syntax menu item")];
- [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create Procedure Syntax", @"show create proc syntax menu item")];
+ [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create Procedure Syntax...", @"show create proc syntax menu item")];
[[tableSubMenu itemAtIndex:5] setHidden:YES]; // divider
[[tableSubMenu itemAtIndex:6] setHidden:YES]; // copy columns
[[tableSubMenu itemAtIndex:7] setHidden:YES]; // divider
@@ -970,18 +992,21 @@
[duplicateTableMenuItem setTitle:NSLocalizedString(@"Duplicate Procedure...", @"duplicate proc menu title")];
[truncateTableButton setHidden:YES];
[removeTableMenuItem setTitle:NSLocalizedString(@"Remove Procedure", @"remove proc menu title")];
-
+ [showCreateSyntaxMenuItem setHidden:NO];
+ [showCreateSyntaxMenuItem setTitle:NSLocalizedString(@"Show Create Procedure Syntax...", @"show create proc syntax menu item")];
+
[renameTableContextMenuItem setHidden:NO];
[renameTableContextMenuItem setTitle:NSLocalizedString(@"Rename Procedure...", @"rename proc menu title")];
[duplicateTableContextMenuItem setHidden:NO];
[duplicateTableContextMenuItem setTitle:NSLocalizedString(@"Duplicate Procedure...", @"duplicate proc menu title")];
[truncateTableContextButton setHidden:YES];
[removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove Procedure", @"remove proc menu title")];
-
+ [showCreateSyntaxContextMenuItem setHidden:NO];
+ [showCreateSyntaxContextMenuItem setTitle:NSLocalizedString(@"Show Create Procedure Syntax...", @"show create proc syntax menu item")];
}
- else if(selectedTableType == SPTableTypeFunc) {
+ else if (selectedTableType == SPTableTypeFunc) {
[[tableSubMenu itemAtIndex:3] setTitle:NSLocalizedString(@"Copy Create Function Syntax", @"copy create func syntax menu item")];
- [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create Function Syntax", @"show create func syntax menu item")];
+ [[tableSubMenu itemAtIndex:4] setTitle:NSLocalizedString(@"Show Create Function Syntax...", @"show create func syntax menu item")];
[[tableSubMenu itemAtIndex:5] setHidden:YES]; // divider
[[tableSubMenu itemAtIndex:6] setHidden:YES]; // copy columns
[[tableSubMenu itemAtIndex:7] setHidden:YES]; // divider
@@ -997,13 +1022,17 @@
[duplicateTableMenuItem setTitle:NSLocalizedString(@"Duplicate Function...", @"duplicate func menu title")];
[truncateTableButton setHidden:YES];
[removeTableMenuItem setTitle:NSLocalizedString(@"Remove Function", @"remove func menu title")];
-
+ [showCreateSyntaxMenuItem setHidden:NO];
+ [showCreateSyntaxMenuItem setTitle:NSLocalizedString(@"Show Create Function Syntax...", @"show create func syntax menu item")];
+
[renameTableContextMenuItem setHidden:NO];
[renameTableContextMenuItem setTitle:NSLocalizedString(@"Rename Function...", @"rename func menu title")];
[duplicateTableContextMenuItem setHidden:NO];
[duplicateTableContextMenuItem setTitle:NSLocalizedString(@"Duplicate Function...", @"duplicate func menu title")];
[truncateTableContextButton setHidden:YES];
[removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove Function", @"remove func menu title")];
+ [showCreateSyntaxContextMenuItem setHidden:NO];
+ [showCreateSyntaxContextMenuItem setTitle:NSLocalizedString(@"Show Create Function Syntax...", @"show create func syntax menu item")];
}
// set window title