aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-06-15 19:28:06 +0000
committerstuconnolly <stuart02@gmail.com>2009-06-15 19:28:06 +0000
commit6f267c8d8f6c12663e16d30f4cd4a1a6677fccd5 (patch)
treebd211a8d908368d098b98eb9635f8da6f0dd75fd
parent37cae99ed1ace10a7d106255efdc104d1af760e9 (diff)
downloadsequelpro-6f267c8d8f6c12663e16d30f4cd4a1a6677fccd5.tar.gz
sequelpro-6f267c8d8f6c12663e16d30f4cd4a1a6677fccd5.tar.bz2
sequelpro-6f267c8d8f6c12663e16d30f4cd4a1a6677fccd5.zip
Replace the change table type button with an edit button that switches the current view to the table info pane.
-rw-r--r--Interfaces/English.lproj/DBView.xib357
-rw-r--r--Source/TableSource.h24
-rw-r--r--Source/TableSource.m67
3 files changed, 95 insertions, 353 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib
index 0b503445..9c5155e9 100644
--- a/Interfaces/English.lproj/DBView.xib
+++ b/Interfaces/English.lproj/DBView.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="4811"/>
+ <integer value="673"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -387,10 +387,7 @@
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
- <object class="NSCustomResource" key="NSImage" id="174245091">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">button_action</string>
- </object>
+ <reference key="NSImage" ref="197220008"/>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="753352469"/>
</object>
@@ -460,7 +457,6 @@
</object>
</object>
</object>
- <int key="NSSelectedIndex">4</int>
<bool key="NSPullDown">YES</bool>
<int key="NSPreferredEdge">1</int>
<bool key="NSUsesItemFromMenu">YES</bool>
@@ -575,7 +571,7 @@
<object class="NSTabViewItem" id="831053945">
<string key="NSIdentifier">source</string>
<object class="NSView" key="NSView" id="461236772">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder" ref="714795046"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -589,124 +585,6 @@
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTextField" id="324870933">
- <reference key="NSNextResponder" ref="220777809"/>
- <int key="NSvFlags">257</int>
- <string key="NSFrame">{{538, 4}, {61, 13}}</string>
- <reference key="NSSuperview" ref="220777809"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="42997882">
- <int key="NSCellFlags">68288064</int>
- <int key="NSCellFlags2">4457472</int>
- <string key="NSContents">Table Type:</string>
- <object class="NSFont" key="NSSupport">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">1.000000e+01</double>
- <int key="NSfFlags">16</int>
- </object>
- <reference key="NSControlView" ref="324870933"/>
- <reference key="NSBackgroundColor" ref="62854682"/>
- <reference key="NSTextColor" ref="454249633"/>
- </object>
- </object>
- <object class="NSPopUpButton" id="398555609">
- <reference key="NSNextResponder" ref="220777809"/>
- <int key="NSvFlags">257</int>
- <string key="NSFrame">{{604, 2}, {79, 17}}</string>
- <reference key="NSSuperview" ref="220777809"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSPopUpButtonCell" key="NSCell" id="126755904">
- <int key="NSCellFlags">-1539178944</int>
- <int key="NSCellFlags2">132096</int>
- <object class="NSFont" key="NSSupport" id="790379580">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">1.100000e+01</double>
- <int key="NSfFlags">16</int>
- </object>
- <reference key="NSControlView" ref="398555609"/>
- <int key="NSButtonFlags">-1232977665</int>
- <int key="NSButtonFlags2">45</int>
- <reference key="NSAlternateImage" ref="790379580"/>
- <object class="NSMutableString" key="NSAlternateContents">
- <characters key="NS.bytes"/>
- </object>
- <object class="NSMutableString" key="NSKeyEquivalent">
- <characters key="NS.bytes"/>
- </object>
- <int key="NSPeriodicDelay">400</int>
- <int key="NSPeriodicInterval">75</int>
- <object class="NSMenuItem" key="NSMenuItem" id="656221110">
- <reference key="NSMenu" ref="895670234"/>
- <string key="NSTitle">--</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <int key="NSState">1</int>
- <reference key="NSOnImage" ref="285877316"/>
- <reference key="NSMixedImage" ref="800099743"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="126755904"/>
- </object>
- <bool key="NSMenuItemRespectAlignment">YES</bool>
- <object class="NSMenu" key="NSMenu" id="895670234">
- <object class="NSMutableString" key="NSTitle">
- <characters key="NS.bytes">OtherViews</characters>
- </object>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="656221110"/>
- <object class="NSMenuItem" id="896785499">
- <reference key="NSMenu" ref="895670234"/>
- <string key="NSTitle">MyISAM</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="285877316"/>
- <reference key="NSMixedImage" ref="800099743"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="126755904"/>
- </object>
- <object class="NSMenuItem" id="344342265">
- <reference key="NSMenu" ref="895670234"/>
- <string key="NSTitle">ISAM</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="285877316"/>
- <reference key="NSMixedImage" ref="800099743"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="126755904"/>
- </object>
- <object class="NSMenuItem" id="458594219">
- <reference key="NSMenu" ref="895670234"/>
- <string key="NSTitle">InnoDB</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="285877316"/>
- <reference key="NSMixedImage" ref="800099743"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="126755904"/>
- </object>
- <object class="NSMenuItem" id="854036207">
- <reference key="NSMenu" ref="895670234"/>
- <string key="NSTitle">BDB</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="285877316"/>
- <reference key="NSMixedImage" ref="800099743"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="126755904"/>
- </object>
- </object>
- </object>
- <int key="NSPreferredEdge">3</int>
- <bool key="NSUsesItemFromMenu">YES</bool>
- <bool key="NSAltersState">YES</bool>
- <int key="NSArrowPosition">2</int>
- </object>
- </object>
<object class="NSScrollView" id="22340145">
<reference key="NSNextResponder" ref="220777809"/>
<int key="NSvFlags">4370</int>
@@ -1423,7 +1301,7 @@
<string>NeXT TIFF v4.0 pasteboard type</string>
</object>
</object>
- <string key="NSFrame">{{125, 0}, {564, 23}}</string>
+ <string key="NSFrame">{{125, 0}, {532, 23}}</string>
<reference key="NSSuperview" ref="220777809"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="4715">
@@ -1437,6 +1315,30 @@
</object>
<bool key="NSEditable">YES</bool>
</object>
+ <object class="NSButton" id="507448309">
+ <reference key="NSNextResponder" ref="220777809"/>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{657, -1}, {32, 25}}</string>
+ <reference key="NSSuperview" ref="220777809"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="1072754876">
+ <int key="NSCellFlags">-1543373312</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="244931163"/>
+ <reference key="NSControlView" ref="507448309"/>
+ <int key="NSButtonFlags">-2041822977</int>
+ <int key="NSButtonFlags2">268435491</int>
+ <object class="NSCustomResource" key="NSNormalImage" id="460945835">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">button_edit</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent">r</string>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
</object>
<string key="NSFrameSize">{689, 329}</string>
<reference key="NSSuperview" ref="628830973"/>
@@ -1930,6 +1832,7 @@
</object>
</object>
<string key="NSFrame">{{10, 7}, {700, 544}}</string>
+ <reference key="NSSuperview" ref="714795046"/>
</object>
<string key="NSLabel">Structure</string>
<reference key="NSColor" ref="62854682"/>
@@ -1938,7 +1841,7 @@
<object class="NSTabViewItem" id="624106058">
<string key="NSIdentifier">content</string>
<object class="NSView" key="NSView" id="1013108064">
- <reference key="NSNextResponder" ref="714795046"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2075,7 +1978,11 @@
<object class="NSPopUpButtonCell" key="NSCell" id="376863254">
<int key="NSCellFlags">-1539178944</int>
<int key="NSCellFlags2">133120</int>
- <reference key="NSSupport" ref="790379580"/>
+ <object class="NSFont" key="NSSupport" id="790379580">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">1.100000e+01</double>
+ <int key="NSfFlags">16</int>
+ </object>
<reference key="NSControlView" ref="830088955"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">36</int>
@@ -2541,7 +2448,6 @@
</object>
</object>
<string key="NSFrame">{{10, 7}, {700, 544}}</string>
- <reference key="NSSuperview" ref="714795046"/>
</object>
<string key="NSLabel">Content</string>
<reference key="NSColor" ref="62854682"/>
@@ -2964,7 +2870,7 @@
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSImage" ref="174245091"/>
+ <reference key="NSImage" ref="197220008"/>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="984501775"/>
</object>
@@ -4379,14 +4285,14 @@
<reference key="NSTabView" ref="714795046"/>
</object>
</object>
- <reference key="NSSelectedTabViewItem" ref="624106058"/>
+ <reference key="NSSelectedTabViewItem" ref="831053945"/>
<reference key="NSFont" ref="26"/>
<int key="NSTvFlags">134217731</int>
<bool key="NSAllowTruncatedLabels">YES</bool>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1013108064"/>
+ <reference ref="461236772"/>
</object>
</object>
</object>
@@ -4984,10 +4890,7 @@
<reference key="NSControlView" ref="79322639"/>
<int key="NSButtonFlags">-2042347265</int>
<int key="NSButtonFlags2">35</int>
- <object class="NSCustomResource" key="NSNormalImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">button_edit</string>
- </object>
+ <reference key="NSNormalImage" ref="460945835"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
@@ -13574,22 +13477,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<int key="connectionID">1244</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">typeChanged:</string>
- <reference key="source" ref="103234030"/>
- <reference key="destination" ref="398555609"/>
- </object>
- <int key="connectionID">1301</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">tableTypeButton</string>
- <reference key="source" ref="103234030"/>
- <reference key="destination" ref="398555609"/>
- </object>
- <int key="connectionID">1302</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">favoritesController</string>
<reference key="source" ref="427689665"/>
@@ -16137,6 +16024,22 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<int key="connectionID">6006</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">viewStatus:</string>
+ <reference key="source" ref="427689665"/>
+ <reference key="destination" ref="507448309"/>
+ </object>
+ <int key="connectionID">6011</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">editTableButton</string>
+ <reference key="source" ref="103234030"/>
+ <reference key="destination" ref="507448309"/>
+ </object>
+ <int key="connectionID">6012</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -20125,36 +20028,17 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="object" ref="220777809"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="324870933"/>
- <reference ref="398555609"/>
<reference ref="996552255"/>
<reference ref="22340145"/>
<reference ref="338296668"/>
<reference ref="338754831"/>
<reference ref="362371286"/>
<reference ref="686204115"/>
+ <reference ref="507448309"/>
</object>
<reference key="parent" ref="628830973"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">1297</int>
- <reference key="object" ref="324870933"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="42997882"/>
- </object>
- <reference key="parent" ref="220777809"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">1294</int>
- <reference key="object" ref="398555609"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="126755904"/>
- </object>
- <reference key="parent" ref="220777809"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">5136</int>
<reference key="object" ref="996552255"/>
<object class="NSMutableArray" key="children">
@@ -20410,58 +20294,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="parent" ref="996552255"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">3775</int>
- <reference key="object" ref="126755904"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="895670234"/>
- </object>
- <reference key="parent" ref="398555609"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">1300</int>
- <reference key="object" ref="895670234"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="896785499"/>
- <reference ref="854036207"/>
- <reference ref="458594219"/>
- <reference ref="656221110"/>
- <reference ref="344342265"/>
- </object>
- <reference key="parent" ref="126755904"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">1299</int>
- <reference key="object" ref="896785499"/>
- <reference key="parent" ref="895670234"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">1298</int>
- <reference key="object" ref="854036207"/>
- <reference key="parent" ref="895670234"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">1296</int>
- <reference key="object" ref="458594219"/>
- <reference key="parent" ref="895670234"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">1295</int>
- <reference key="object" ref="656221110"/>
- <reference key="parent" ref="895670234"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">1293</int>
- <reference key="object" ref="344342265"/>
- <reference key="parent" ref="895670234"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">3776</int>
- <reference key="object" ref="42997882"/>
- <reference key="parent" ref="324870933"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">5150</int>
<reference key="object" ref="988187819"/>
<object class="NSMutableArray" key="children">
@@ -22828,6 +22660,20 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="object" ref="390856790"/>
<reference key="parent" ref="23713489"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6009</int>
+ <reference key="object" ref="507448309"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1072754876"/>
+ </object>
+ <reference key="parent" ref="220777809"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6010</int>
+ <reference key="object" ref="1072754876"/>
+ <reference key="parent" ref="507448309"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -22982,23 +22828,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>125.ImportedFromIB2</string>
<string>1277.IBPluginDependency</string>
<string>1277.ImportedFromIB2</string>
- <string>1293.IBPluginDependency</string>
- <string>1293.ImportedFromIB2</string>
- <string>1294.IBPluginDependency</string>
- <string>1294.ImportedFromIB2</string>
- <string>1295.IBPluginDependency</string>
- <string>1295.ImportedFromIB2</string>
- <string>1296.IBPluginDependency</string>
- <string>1296.ImportedFromIB2</string>
- <string>1297.IBPluginDependency</string>
- <string>1297.ImportedFromIB2</string>
- <string>1298.IBPluginDependency</string>
- <string>1298.ImportedFromIB2</string>
- <string>1299.IBPluginDependency</string>
- <string>1299.ImportedFromIB2</string>
- <string>1300.IBEditorWindowLastContentRect</string>
- <string>1300.IBPluginDependency</string>
- <string>1300.ImportedFromIB2</string>
<string>1304.IBPluginDependency</string>
<string>1304.ImportedFromIB2</string>
<string>1305.IBPluginDependency</string>
@@ -23213,8 +23042,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>3755.IBPluginDependency</string>
<string>3759.IBPluginDependency</string>
<string>3770.IBPluginDependency</string>
- <string>3775.IBPluginDependency</string>
- <string>3776.IBPluginDependency</string>
<string>3779.IBPluginDependency</string>
<string>3780.IBPluginDependency</string>
<string>3781.IBPluginDependency</string>
@@ -24193,6 +24020,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>6000.IBPluginDependency</string>
<string>6001.IBPluginDependency</string>
<string>6004.IBPluginDependency</string>
+ <string>6009.IBAttributePlaceholdersKey</string>
+ <string>6009.IBPluginDependency</string>
+ <string>6010.IBPluginDependency</string>
<string>604.IBEditorWindowLastContentRect</string>
<string>604.IBWindowTemplateEditedContentRect</string>
<string>604.ImportedFromIB2</string>
@@ -24657,23 +24487,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
- <string>{{1058, 508}, {135, 88}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="9"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="9"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="9"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="9"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="9"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="9"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="9"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -24927,8 +24740,6 @@ 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>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -25443,7 +25254,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{476, -4}, {175, 113}}</string>
+ <string>{{188, -4}, {175, 113}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary">
@@ -25465,8 +25276,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{467, 84}, {944, 550}}</string>
- <string>{{467, 84}, {944, 550}}</string>
+ <string>{{176, 63}, {944, 550}}</string>
+ <string>{{176, 63}, {944, 550}}</string>
<reference ref="9"/>
<reference ref="9"/>
<string>{{62, 352}, {845, 504}}</string>
@@ -26107,6 +25918,16 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSMutableDictionary">
+ <string key="NS.key.0">ToolTip</string>
+ <object class="IBToolTipAttribute" key="NS.object.0">
+ <string key="name">ToolTip</string>
+ <reference key="object" ref="507448309"/>
+ <string type="base64-UTF8" key="toolTip">UmVmcmVzaCB0YWJsZSBzdHJ1Y3R1cmUgKOKMmFIpA</string>
+ </object>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{67, 340}, {667, 416}}</string>
<string>{{67, 340}, {667, 416}}</string>
<reference ref="9"/>
@@ -26359,7 +26180,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">6006</int>
+ <int key="maxID">6012</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -27478,7 +27299,6 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<string>reloadTable:</string>
<string>removeField:</string>
<string>removeIndex:</string>
- <string>typeChanged:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -27492,7 +27312,6 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<string>id</string>
<string>id</string>
<string>id</string>
- <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -27503,6 +27322,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<string>addIndexButton</string>
<string>chooseKeyButton</string>
<string>copyFieldButton</string>
+ <string>editTableButton</string>
<string>indexNameField</string>
<string>indexSheet</string>
<string>indexTypeField</string>
@@ -27514,7 +27334,6 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<string>structureGrabber</string>
<string>tableDataInstance</string>
<string>tableSourceView</string>
- <string>tableTypeButton</string>
<string>tableWindow</string>
<string>tablesListInstance</string>
</object>
diff --git a/Source/TableSource.h b/Source/TableSource.h
index 66149586..9776620e 100644
--- a/Source/TableSource.h
+++ b/Source/TableSource.h
@@ -28,9 +28,8 @@
#import "CMMCPConnection.h"
#import "CMMCPResult.h"
-
-@interface TableSource : NSObject {
-
+@interface TableSource : NSObject
+{
IBOutlet id tablesListInstance;
IBOutlet id tableDataInstance;
@@ -48,15 +47,14 @@
IBOutlet id indexNameField;
IBOutlet id indexedColumnsField;
IBOutlet id chooseKeyButton;
- IBOutlet id tableTypeButton;
IBOutlet id structureGrabber;
+ IBOutlet id editTableButton;
CMMCPConnection *mySQLConnection;
CMMCPResult *tableSourceResult;
CMMCPResult *indexResult;
NSString *selectedTable;
- NSString *tableType;
NSMutableArray *tableFields, *indexes;
NSMutableDictionary *oldRow, *enumFields;
NSDictionary *defaultValues;
@@ -75,7 +73,6 @@
- (IBAction)addIndex:(id)sender;
- (IBAction)removeField:(id)sender;
- (IBAction)removeIndex:(id)sender;
-- (IBAction)typeChanged:(id)sender;
//index sheet methods
- (IBAction)openIndexSheet:(id)sender;
@@ -91,7 +88,6 @@
- (NSArray *)fetchResultAsArray:(CMMCPResult *)theResult;
- (BOOL)saveRowOnDeselect;
- (BOOL)addRowToDB;
-- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo;
//getter methods
- (NSString *)defaultValueForField:(NSString *)field;
@@ -99,16 +95,6 @@
- (NSDictionary *)enumFields;
- (NSArray *)tableStructureForPrint;
-//tableView datasource methods
-- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
-- (id)tableView:(NSTableView *)aTableView
- objectValueForTableColumn:(NSTableColumn *)aTableColumn
- row:(int)rowIndex;
-- (void)tableView:(NSTableView *)aTableView
- setObjectValue:(id)anObject
- forTableColumn:(NSTableColumn *)aTableColumn
- row:(int)rowIndex;
-
//tableView drag&drop datasource methods
- (BOOL)tableView:(NSTableView *)tv writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard;
- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)info proposedRow:(int)row
@@ -126,8 +112,4 @@
- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset;
- (NSRect)splitView:(NSSplitView *)splitView additionalEffectiveRectOfDividerAtIndex:(int)dividerIndex;
-//last but not least
-- (id)init;
-- (void)dealloc;
-
@end
diff --git a/Source/TableSource.m b/Source/TableSource.m
index cf7a7232..8ed241b8 100644
--- a/Source/TableSource.m
+++ b/Source/TableSource.m
@@ -70,15 +70,14 @@ loads aTable, put it in an array, update the tableViewColumns and reload the tab
[removeFieldButton setEnabled:NO];
[addIndexButton setEnabled:NO];
[removeIndexButton setEnabled:NO];
-
- // set the table type menu back to the default, and disable it
- [tableTypeButton selectItemAtIndex:0];
- [tableTypeButton setEnabled:NO];
- tableType = nil;
+ [editTableButton setEnabled:NO];
return;
}
+ // Enable edit table button
+ [editTableButton setEnabled:YES];
+
//query started
[[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
@@ -95,10 +94,6 @@ loads aTable, put it in an array, update the tableViewColumns and reload the tab
// [indexes setArray:[[self fetchResultAsArray:indexResult] retain]];
[indexes setArray:[self fetchResultAsArray:indexResult]];
[indexResult release];
-
- // Retrieve the table type via the table data's status cache (which automatically maps Type to Engine)
- [tableType release];
- tableType = [[NSString stringWithString:[tableDataInstance statusValueForKey:@"Engine"]] retain];
//get table default values
if ( defaultValues ) {
@@ -176,15 +171,6 @@ loads aTable, put it in an array, update the tableViewColumns and reload the tab
[field setObject:length forKey:@"Length"];
}
- // Determine the table type
- if ( ![tableType isKindOfClass:[NSNull class]] && [tablesListInstance tableType] != SP_TABLETYPE_VIEW) {
- [tableTypeButton selectItemWithTitle:tableType];
- [tableTypeButton setEnabled:YES];
- } else {
- [tableTypeButton selectItemWithTitle:@"--"];
- [tableTypeButton setEnabled:NO];
- }
-
// If a view is selected, disable the buttons; otherwise enable.
BOOL editingEnabled = ([tablesListInstance tableType] == SP_TABLETYPE_TABLE);
[addFieldButton setEnabled:editingEnabled];
@@ -398,51 +384,6 @@ reloads the table (performing a new mysql-query)
[alert beginSheetModalForWindow:tableWindow modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"removeindex"];
}
-- (IBAction)typeChanged:(id)sender
-{
- // Check whether a save of the current row is required.
- if ( ![self saveRowOnDeselect] ) {
- [sender selectItemWithTitle:tableType];
- return;
- }
-
- NSString* selectedItem = [sender titleOfSelectedItem];
- if([selectedItem isEqualToString:@"--"] || [tableType isEqualToString:selectedItem]) {
- [sender selectItemWithTitle:tableType];
- } else {
- // alert any listeners that we are about to perform a query.
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
-
- NSString *query = [NSString stringWithFormat:@"ALTER TABLE %@ TYPE = %@",[selectedTable backtickQuotedString],selectedItem];
- [mySQLConnection queryString:query];
-
- // The query is now complete.
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
-
- // Did the alter work? If so, we need to record the new data. If not, we must revert back to
- // the previous state.
- if([mySQLConnection getLastErrorID] == 0)
- {
- // Make sure "tableType" is changed and the status tab is flagged for reload...
- [tableType release];
- tableType = selectedItem;
- [tableType retain];
-
-// [[NSNotificationCenter defaultCenter] postNotificationName:@"SelectedTableStatusHasChanged" object:self];
-
- // Mark the content table for refresh and update column caches
- [tablesListInstance setContentRequiresReload:YES];
- [tableDataInstance resetColumnData];
- } else {
- [sender selectItemWithTitle:tableType];
- NSBeginAlertSheet(NSLocalizedString(@"Error changing table type", @"error changing table type message"),
- NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
- [NSString stringWithFormat:NSLocalizedString(@"An error occurred when trying to change the table to '%@' from '%@'.\n\nMySQL said: %@", @"error changing table type informative message"), selectedItem, tableType, [mySQLConnection getLastErrorMessage]]);
- }
- }
-}
-
-
#pragma mark Index sheet methods
/*
01' href='#n1801'>1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637