diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-06-24 15:03:22 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-06-24 15:03:22 +0000 |
commit | 37bd86b2879c107ebb026954693540979cf25e2a (patch) | |
tree | 704323fb8dcede332599a1275c6284bd12489570 | |
parent | 1b69f417f29a099762e493f047784c9311f5ede8 (diff) | |
download | sequelpro-37bd86b2879c107ebb026954693540979cf25e2a.tar.gz sequelpro-37bd86b2879c107ebb026954693540979cf25e2a.tar.bz2 sequelpro-37bd86b2879c107ebb026954693540979cf25e2a.zip |
• added separate Menu "Context Menu (Table List)" to DBView.xib
- it's used for the contextual menu for the Table List
• fixed: contextual menu in Table List
-rw-r--r-- | Interfaces/English.lproj/DBView.xib | 489 | ||||
-rw-r--r-- | Source/TablesList.h | 7 | ||||
-rw-r--r-- | Source/TablesList.m | 56 |
3 files changed, 528 insertions, 24 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index 35e3f50f..2f8ab81c 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -8,8 +8,8 @@ <string key="IBDocument.HIToolboxVersion">353.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="5"/> - <integer value="5999"/> + <integer value="5676"/> + <integer value="6180"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -92,6 +92,7 @@ <int key="NSvFlags">4352</int> <string key="NSFrameSize">{212, 381}</string> <reference key="NSSuperview" ref="73685676"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="_NSCornerView" key="NSCornerView"> <nil key="NSNextResponder"/> @@ -188,6 +189,7 @@ </object> <string key="NSFrameSize">{212, 381}</string> <reference key="NSSuperview" ref="233472824"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="251040077"/> <reference key="NSDocView" ref="251040077"/> <object class="NSColor" key="NSBGColor" id="1024678221"> @@ -203,6 +205,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{175, 1}, {15, 481}}</string> <reference key="NSSuperview" ref="233472824"/> + <reference key="NSWindow"/> <reference key="NSTarget" ref="233472824"/> <string key="NSAction">_doScroller:</string> <double key="NSPercent">9.979253e-01</double> @@ -212,6 +215,7 @@ <int key="NSvFlags">256</int> <string key="NSFrame">{{-100, -100}, {141, 11}}</string> <reference key="NSSuperview" ref="233472824"/> + <reference key="NSWindow"/> <int key="NSsFlags">257</int> <reference key="NSTarget" ref="233472824"/> <string key="NSAction">_doScroller:</string> @@ -220,6 +224,7 @@ </object> <string key="NSFrameSize">{212, 381}</string> <reference key="NSSuperview" ref="355288374"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="73685676"/> <int key="NSsFlags">528</int> <reference key="NSVScroller" ref="693168867"/> @@ -230,10 +235,12 @@ </object> <string key="NSFrameSize">{212, 381}</string> <reference key="NSSuperview" ref="131633443"/> + <reference key="NSWindow"/> </object> </object> <string key="NSFrameSize">{212, 381}</string> <reference key="NSSuperview" ref="298095498"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> <object class="BWCustomView" id="192579410"> @@ -256,6 +263,7 @@ <int key="NSvFlags">4352</int> <string key="NSFrameSize">{212, 145}</string> <reference key="NSSuperview" ref="685057119"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="_NSCornerView" key="NSCornerView"> <nil key="NSNextResponder"/> @@ -319,6 +327,7 @@ </object> <string key="NSFrameSize">{212, 145}</string> <reference key="NSSuperview" ref="298226231"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="347093764"/> <reference key="NSDocView" ref="347093764"/> <reference key="NSBGColor" ref="1024678221"/> @@ -329,6 +338,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-100, -100}, {15, 20}}</string> <reference key="NSSuperview" ref="298226231"/> + <reference key="NSWindow"/> <reference key="NSTarget" ref="298226231"/> <string key="NSAction">_doScroller:</string> <double key="NSPercent">9.473684e-01</double> @@ -338,6 +348,7 @@ <int key="NSvFlags">256</int> <string key="NSFrame">{{-100, -100}, {141, 11}}</string> <reference key="NSSuperview" ref="298226231"/> + <reference key="NSWindow"/> <int key="NSsFlags">257</int> <reference key="NSTarget" ref="298226231"/> <string key="NSAction">_doScroller:</string> @@ -346,6 +357,7 @@ </object> <string key="NSFrameSize">{212, 145}</string> <reference key="NSSuperview" ref="192579410"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="685057119"/> <int key="NSsFlags">512</int> <reference key="NSVScroller" ref="245346414"/> @@ -356,11 +368,13 @@ </object> <string key="NSFrame">{{0, 382}, {212, 145}}</string> <reference key="NSSuperview" ref="298095498"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> </object> <string key="NSFrame">{{0, 23}, {212, 527}}</string> <reference key="NSSuperview" ref="372294785"/> + <reference key="NSWindow"/> <int key="NSDividerStyle">2</int> <reference key="BWSVColor" ref="304829493"/> <bool key="BWSVColorIsEnabled">NO</bool> @@ -411,6 +425,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{-1, -1}, {32, 24}}</string> <reference key="NSSuperview" ref="28219887"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="BWAnchoredButtonCell" key="NSCell" id="283448047"> <int key="NSCellFlags">67239424</int> @@ -435,6 +450,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{30, -1}, {32, 24}}</string> <reference key="NSSuperview" ref="28219887"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="BWAnchoredPopUpButtonCell" key="NSCell" id="321871356"> <int key="NSCellFlags">71433792</int> @@ -454,7 +470,6 @@ <string key="NSKeyEquiv"/> <int key="NSKeyEquivModMask">1048576</int> <int key="NSMnemonicLoc">2147483647</int> - <int key="NSState">1</int> <object class="NSCustomResource" key="NSImage"> <string key="NSClassName">NSImage</string> <string key="NSResourceName">NSActionTemplate</string> @@ -530,6 +545,7 @@ </object> </object> </object> + <int key="NSSelectedIndex">4</int> <bool key="NSPullDown">YES</bool> <int key="NSPreferredEdge">1</int> <bool key="NSUsesItemFromMenu">YES</bool> @@ -541,6 +557,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{61, -1}, {32, 24}}</string> <reference key="NSSuperview" ref="28219887"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="BWAnchoredButtonCell" key="NSCell" id="227511715"> <int key="NSCellFlags">67239424</int> @@ -565,6 +582,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{92, -1}, {32, 24}}</string> <reference key="NSSuperview" ref="28219887"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="BWAnchoredButtonCell" key="NSCell" id="708016222"> <int key="NSCellFlags">-2080244224</int> @@ -591,6 +609,7 @@ </object> <string key="NSFrameSize">{212, 23}</string> <reference key="NSSuperview" ref="372294785"/> + <reference key="NSWindow"/> <bool key="BWABBIsResizable">YES</bool> <bool key="BWABBIsAtBottom">YES</bool> <bool key="BWABBHandleIsRightAligned">NO</bool> @@ -599,6 +618,7 @@ </object> <string key="NSFrameSize">{212, 550}</string> <reference key="NSSuperview" ref="937377983"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="604818293"> @@ -611,6 +631,7 @@ <int key="NSvFlags">274</int> <string key="NSFrame">{{-7, -10}, {735, 564}}</string> <reference key="NSSuperview" ref="604818293"/> + <reference key="NSWindow"/> <object class="NSMutableArray" key="NSTabViewItems"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSTabViewItem" id="831053945"> @@ -645,12 +666,14 @@ <int key="NSvFlags">4352</int> <string key="NSFrameSize">{688, 289}</string> <reference key="NSSuperview" ref="16936123"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTableHeaderView" key="NSHeaderView" id="926883367"> <reference key="NSNextResponder" ref="639957061"/> <int key="NSvFlags">256</int> <string key="NSFrameSize">{688, 17}</string> <reference key="NSSuperview" ref="639957061"/> + <reference key="NSWindow"/> <reference key="NSTableView" ref="715508012"/> </object> <object class="_NSCornerView" key="NSCornerView" id="868771861"> @@ -658,6 +681,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-26, 0}, {16, 17}}</string> <reference key="NSSuperview" ref="22340145"/> + <reference key="NSWindow"/> </object> <object class="NSMutableArray" key="NSTableColumns"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -1190,6 +1214,7 @@ </object> <string key="NSFrame">{{1, 17}, {688, 289}}</string> <reference key="NSSuperview" ref="22340145"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="715508012"/> <reference key="NSDocView" ref="715508012"/> <reference key="NSBGColor" ref="1024678221"/> @@ -1200,6 +1225,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{611, 17}, {15, 274}}</string> <reference key="NSSuperview" ref="22340145"/> + <reference key="NSWindow"/> <reference key="NSTarget" ref="22340145"/> <string key="NSAction">_doScroller:</string> <double key="NSPercent">9.858657e-01</double> @@ -1209,6 +1235,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{1, 291}, {610, 15}}</string> <reference key="NSSuperview" ref="22340145"/> + <reference key="NSWindow"/> <int key="NSsFlags">1</int> <reference key="NSTarget" ref="22340145"/> <string key="NSAction">_doScroller:</string> @@ -1223,6 +1250,7 @@ </object> <string key="NSFrame">{{1, 0}, {688, 17}}</string> <reference key="NSSuperview" ref="22340145"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="926883367"/> <reference key="NSDocView" ref="926883367"/> <reference key="NSBGColor" ref="1024678221"/> @@ -1232,6 +1260,7 @@ </object> <string key="NSFrame">{{-1, 22}, {690, 307}}</string> <reference key="NSSuperview" ref="220777809"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="16936123"/> <int key="NSsFlags">562</int> <reference key="NSVScroller" ref="943144555"/> @@ -1246,6 +1275,7 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{-1, -1}, {32, 25}}</string> <reference key="NSSuperview" ref="220777809"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="413143172"> <int key="NSCellFlags">-1543373312</int> @@ -1274,6 +1304,7 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{93, -1}, {32, 25}}</string> <reference key="NSSuperview" ref="220777809"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="917381158"> <int key="NSCellFlags">-2080244224</int> @@ -1298,6 +1329,7 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{30, -1}, {32, 25}}</string> <reference key="NSSuperview" ref="220777809"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="578226656"> <int key="NSCellFlags">-1543373312</int> @@ -1322,6 +1354,7 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{61, -1}, {32, 25}}</string> <reference key="NSSuperview" ref="220777809"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="626480887"> <int key="NSCellFlags">-1543373312</int> @@ -1358,6 +1391,7 @@ </object> <string key="NSFrame">{{125, 0}, {532, 23}}</string> <reference key="NSSuperview" ref="220777809"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSImageCell" key="NSCell" id="4715"> <int key="NSCellFlags">130560</int> @@ -1378,6 +1412,7 @@ <int key="NSvFlags">289</int> <string key="NSFrame">{{657, -1}, {32, 25}}</string> <reference key="NSSuperview" ref="220777809"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="1072754876"> <int key="NSCellFlags">-1543373312</int> @@ -1400,6 +1435,7 @@ </object> <string key="NSFrameSize">{689, 329}</string> <reference key="NSSuperview" ref="628830973"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="1063281455"> @@ -1417,6 +1453,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{3, 3}, {49, 14}}</string> <reference key="NSSuperview" ref="813716908"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="907218783"> <int key="NSCellFlags">68288064</int> @@ -1455,6 +1492,7 @@ </object> <string key="NSFrame">{{672, 4}, {10, 13}}</string> <reference key="NSSuperview" ref="813716908"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSImageCell" key="NSCell" id="545156725"> <int key="NSCellFlags">130560</int> @@ -1473,6 +1511,7 @@ </object> <string key="NSFrame">{{0, 181}, {689, 20}}</string> <reference key="NSSuperview" ref="1063281455"/> + <reference key="NSWindow"/> <object class="NSColor" key="BWGBFillStartingColor"> <int key="NSColorSpace">1</int> <bytes key="NSRGB">MC42NzU3Njg0OSAwLjcyMTk0ODE1IDAuNzY1MzA2MTIAA</bytes> @@ -1514,12 +1553,14 @@ <int key="NSvFlags">4352</int> <string key="NSFrameSize">{688, 142}</string> <reference key="NSSuperview" ref="794929378"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTableHeaderView" key="NSHeaderView" id="459548655"> <reference key="NSNextResponder" ref="1038672854"/> <int key="NSvFlags">256</int> <string key="NSFrameSize">{688, 17}</string> <reference key="NSSuperview" ref="1038672854"/> + <reference key="NSWindow"/> <reference key="NSTableView" ref="584834515"/> </object> <object class="_NSCornerView" key="NSCornerView" id="476444025"> @@ -1527,6 +1568,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-26, 0}, {16, 17}}</string> <reference key="NSSuperview" ref="376224367"/> + <reference key="NSWindow"/> </object> <object class="NSMutableArray" key="NSTableColumns"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -1779,6 +1821,7 @@ </object> <string key="NSFrame">{{1, 17}, {688, 142}}</string> <reference key="NSSuperview" ref="376224367"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="584834515"/> <reference key="NSDocView" ref="584834515"/> <reference key="NSBGColor" ref="1024678221"/> @@ -1789,6 +1832,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{611, 17}, {15, 126}}</string> <reference key="NSSuperview" ref="376224367"/> + <reference key="NSWindow"/> <reference key="NSTarget" ref="376224367"/> <string key="NSAction">_doScroller:</string> <double key="NSPercent">8.936170e-01</double> @@ -1798,6 +1842,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{1, 143}, {610, 15}}</string> <reference key="NSSuperview" ref="376224367"/> + <reference key="NSWindow"/> <int key="NSsFlags">1</int> <reference key="NSTarget" ref="376224367"/> <string key="NSAction">_doScroller:</string> @@ -1812,6 +1857,7 @@ </object> <string key="NSFrame">{{1, 0}, {688, 17}}</string> <reference key="NSSuperview" ref="376224367"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="459548655"/> <reference key="NSDocView" ref="459548655"/> <reference key="NSBGColor" ref="1024678221"/> @@ -1821,6 +1867,7 @@ </object> <string key="NSFrame">{{-1, 22}, {690, 160}}</string> <reference key="NSSuperview" ref="1063281455"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="794929378"/> <int key="NSsFlags">562</int> <reference key="NSVScroller" ref="1019209947"/> @@ -1835,6 +1882,7 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{-1, -1}, {32, 25}}</string> <reference key="NSSuperview" ref="1063281455"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="326048025"> <int key="NSCellFlags">-1543373312</int> @@ -1856,6 +1904,7 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{61, -1}, {32, 25}}</string> <reference key="NSSuperview" ref="1063281455"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="153146827"> <int key="NSCellFlags">-2080244224</int> @@ -1877,6 +1926,7 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{30, -1}, {32, 25}}</string> <reference key="NSSuperview" ref="1063281455"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="345927225"> <int key="NSCellFlags">-1543373312</int> @@ -1910,6 +1960,7 @@ </object> <string key="NSFrame">{{93, 0}, {596, 23}}</string> <reference key="NSSuperview" ref="1063281455"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSImageCell" key="NSCell" id="372723860"> <int key="NSCellFlags">130560</int> @@ -1925,16 +1976,19 @@ </object> <string key="NSFrame">{{0, 330}, {689, 201}}</string> <reference key="NSSuperview" ref="628830973"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> </object> <string key="NSFrame">{{7, 10}, {689, 531}}</string> <reference key="NSSuperview" ref="461236772"/> + <reference key="NSWindow"/> <int key="NSDividerStyle">2</int> </object> </object> <string key="NSFrame">{{10, 7}, {700, 544}}</string> <reference key="NSSuperview" ref="714795046"/> + <reference key="NSWindow"/> </object> <string key="NSLabel">Structure</string> <reference key="NSColor" ref="62854682"/> @@ -2296,8 +2350,8 @@ <bool key="NS.raise.underflow">YES</bool> <bool key="NS.raise.dividebyzero">YES</bool> </object> - <string key="NS.decimal">.</string> - <string key="NS.thousand">,</string> + <string key="NS.decimal">,</string> + <string key="NS.thousand">.</string> <bool key="NS.hasthousands">NO</bool> <bool key="NS.localized">YES</bool> <bool key="NS.allowsfloats">NO</bool> @@ -4399,17 +4453,20 @@ </object> <string key="NSFrame">{{221, 0}, {723, 550}}</string> <reference key="NSSuperview" ref="937377983"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> </object> <string key="NSFrameSize">{944, 550}</string> <reference key="NSSuperview" ref="579726586"/> + <reference key="NSWindow"/> <bool key="NSIsVertical">YES</bool> <string key="NSAutosaveName">DBViewSplitter</string> </object> </object> <string key="NSFrameSize">{944, 550}</string> <reference key="NSSuperview"/> + <reference key="NSWindow"/> </object> <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string> <string key="NSMinSize">{780, 502}</string> @@ -6215,7 +6272,7 @@ <string key="NSWindowContentMaxSize">{600, 127}</string> <string key="NSWindowContentMinSize">{260, 127}</string> <object class="NSView" key="NSWindowView" id="653204527"> - <nil key="NSNextResponder"/> + <reference key="NSNextResponder"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -6224,6 +6281,7 @@ <int key="NSvFlags">266</int> <string key="NSFrame">{{17, 93}, {226, 14}}</string> <reference key="NSSuperview" ref="653204527"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="604072019"> <int key="NSCellFlags">67239488</int> @@ -6240,6 +6298,7 @@ <int key="NSvFlags">258</int> <string key="NSFrame">{{20, 67}, {220, 18}}</string> <reference key="NSSuperview" ref="653204527"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="870160310"> <int key="NSCellFlags">-1804468671</int> @@ -6257,6 +6316,7 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{19, 43}, {189, 18}}</string> <reference key="NSSuperview" ref="653204527"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="575635343"> <int key="NSCellFlags">67239424</int> @@ -6278,6 +6338,7 @@ <int key="NSvFlags">289</int> <string key="NSFrame">{{158, 13}, {87, 28}}</string> <reference key="NSSuperview" ref="653204527"/> + <reference key="NSWindow"/> <int key="NSTag">1</int> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="834960254"> @@ -6301,6 +6362,7 @@ <int key="NSvFlags">289</int> <string key="NSFrame">{{80, 13}, {80, 28}}</string> <reference key="NSSuperview" ref="653204527"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="1048025876"> <int key="NSCellFlags">67239424</int> @@ -6319,6 +6381,8 @@ </object> </object> <string key="NSFrameSize">{260, 127}</string> + <reference key="NSSuperview"/> + <reference key="NSWindow"/> </object> <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> <string key="NSMinSize">{260, 149}</string> @@ -6337,7 +6401,7 @@ <string key="NSWindowContentMaxSize">{600, 112}</string> <string key="NSWindowContentMinSize">{260, 112}</string> <object class="NSView" key="NSWindowView" id="44272488"> - <nil key="NSNextResponder"/> + <reference key="NSNextResponder"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -6420,6 +6484,7 @@ </object> </object> <string key="NSFrameSize">{260, 112}</string> + <reference key="NSSuperview"/> </object> <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> <string key="NSMinSize">{260, 134}</string> @@ -12510,7 +12575,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="730777562"> - <reference key="NSNextResponder"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">265</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -12568,7 +12633,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> </object> <string key="NSFrameSize">{110, 20}</string> - <reference key="NSSuperview"/> <string key="NSClassName">NSView</string> </object> <object class="NSUserDefaultsController" id="461189245"> @@ -12624,6 +12688,54 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <object class="NSCustomObject" id="631714493"> <string key="NSClassName">SPDatabaseData</string> </object> + <object class="NSMenu" id="556141845"> + <string key="NSTitle"/> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMenuItem" id="584064012"> + <reference key="NSMenu" ref="556141845"/> + <string key="NSTitle">Rename Table...</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="450876295"/> + <reference key="NSMixedImage" ref="414351669"/> + </object> + <object class="NSMenuItem" id="419134079"> + <reference key="NSMenu" ref="556141845"/> + <string key="NSTitle">Duplicate Table...</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="450876295"/> + <reference key="NSMixedImage" ref="414351669"/> + </object> + <object class="NSMenuItem" id="41627987"> + <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="434807053"> + <reference key="NSMenu" ref="556141845"/> + <string key="NSTitle">Truncate Table...</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="450876295"/> + <reference key="NSMixedImage" ref="414351669"/> + </object> + <object class="NSMenuItem" id="43135929"> + <reference key="NSMenu" ref="556141845"/> + <string key="NSTitle">Remove Table...</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="450876295"/> + <reference key="NSMixedImage" ref="414351669"/> + </object> + </object> + </object> </object> <object class="IBObjectContainer" key="IBDocument.Objects"> <object class="NSMutableArray" key="connectionRecords"> @@ -15290,14 +15402,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> - <string key="label">renameTableButton</string> - <reference key="source" ref="438574515"/> - <reference key="destination" ref="994798282"/> - </object> - <int key="connectionID">5695</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> <string key="label">tableRenameField</string> <reference key="source" ref="438574515"/> <reference key="destination" ref="272856728"/> @@ -16300,6 +16404,134 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> <int key="connectionID">6172</int> </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">menu</string> + <reference key="source" ref="37718544"/> + <reference key="destination" ref="556141845"/> + </object> + <int key="connectionID">6187</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">duplicateTableMenuItem</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="897887117"/> + </object> + <int key="connectionID">6189</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">separatorTableMenuItem</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="226083732"/> + </object> + <int key="connectionID">6191</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">truncateTableButton</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="962084508"/> + </object> + <int key="connectionID">6192</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">removeTableMenuItem</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="351524538"/> + </object> + <int key="connectionID">6193</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">renameTable:</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="584064012"/> + </object> + <int key="connectionID">6194</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">renameTableMenuItem</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="112091395"/> + </object> + <int key="connectionID">6196</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">copyTable:</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="419134079"/> + </object> + <int key="connectionID">6197</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">truncateTable:</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="434807053"/> + </object> + <int key="connectionID">6198</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">removeTable:</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="43135929"/> + </object> + <int key="connectionID">6199</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">renameTableContextMenuItem</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="584064012"/> + </object> + <int key="connectionID">6200</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">duplicateTableContextMenuItem</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="419134079"/> + </object> + <int key="connectionID">6201</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">separatorTableContextMenuItem</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="41627987"/> + </object> + <int key="connectionID">6202</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">removeTableContextMenuItem</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="43135929"/> + </object> + <int key="connectionID">6203</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">truncateTableContextButton</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="434807053"/> + </object> + <int key="connectionID">6204</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">renameTableButton</string> + <reference key="source" ref="438574515"/> + <reference key="destination" ref="994798282"/> + </object> + <int key="connectionID">6206</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -23062,6 +23294,45 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <reference key="object" ref="186804841"/> <reference key="parent" ref="480992511"/> </object> + <object class="IBObjectRecord"> + <int key="objectID">6180</int> + <reference key="object" ref="556141845"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="43135929"/> + <reference ref="41627987"/> + <reference ref="434807053"/> + <reference ref="419134079"/> + <reference ref="584064012"/> + </object> + <reference key="parent" ref="1043842561"/> + <string key="objectName">Context Menu (Table List)</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">6182</int> + <reference key="object" ref="43135929"/> + <reference key="parent" ref="556141845"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">6183</int> + <reference key="object" ref="41627987"/> + <reference key="parent" ref="556141845"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">6184</int> + <reference key="object" ref="434807053"/> + <reference key="parent" ref="556141845"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">6185</int> + <reference key="object" ref="419134079"/> + <reference key="parent" ref="556141845"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">6186</int> + <reference key="object" ref="584064012"/> + <reference key="parent" ref="556141845"/> + </object> </object> </object> <object class="NSMutableDictionary" key="flattenedProperties"> @@ -24449,6 +24720,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string>6157.IBAttributePlaceholdersKey</string> <string>6157.IBPluginDependency</string> <string>6158.IBPluginDependency</string> + <string>6159.IBAttributePlaceholdersKey</string> <string>6159.IBPluginDependency</string> <string>6160.IBAttributePlaceholdersKey</string> <string>6160.IBPluginDependency</string> @@ -24456,6 +24728,17 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string>617.ImportedFromIB2</string> <string>6170.IBPluginDependency</string> <string>6171.IBPluginDependency</string> + <string>6180.IBEditorWindowLastContentRect</string> + <string>6180.IBPluginDependency</string> + <string>6182.IBAttributePlaceholdersKey</string> + <string>6182.IBPluginDependency</string> + <string>6183.IBPluginDependency</string> + <string>6184.IBAttributePlaceholdersKey</string> + <string>6184.IBPluginDependency</string> + <string>6185.IBAttributePlaceholdersKey</string> + <string>6185.IBPluginDependency</string> + <string>6186.IBAttributePlaceholdersKey</string> + <string>6186.IBPluginDependency</string> <string>654.IBPluginDependency</string> <string>654.ImportedFromIB2</string> <string>655.IBPluginDependency</string> @@ -25612,8 +25895,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{342, 190}, {944, 550}}</string> - <string>{{342, 190}, {944, 550}}</string> + <string>{{306, 323}, {944, 550}}</string> + <string>{{306, 323}, {944, 550}}</string> <reference ref="9"/> <reference ref="9"/> <string>{{62, 352}, {845, 504}}</string> @@ -26082,8 +26365,8 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{736, 625}, {260, 112}}</string> - <string>{{736, 625}, {260, 112}}</string> + <string>{{695, 423}, {260, 112}}</string> + <string>{{695, 423}, {260, 112}}</string> <reference ref="9"/> <reference ref="5"/> <reference ref="9"/> @@ -26320,7 +26603,7 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik</string> <string>com.brandonwalkin.BWToolkit</string> <string>com.brandonwalkin.BWToolkit</string> <string>com.brandonwalkin.BWToolkit</string> - <string>{{400, 219}, {157, 98}}</string> + <string>{{325, 248}, {157, 98}}</string> <string>com.brandonwalkin.BWToolkit</string> <string>com.brandonwalkin.BWToolkit</string> <string>com.brandonwalkin.BWToolkit</string> @@ -26346,6 +26629,14 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik</string> </object> <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="962084508"/> + <string key="toolTip">Delete all records of selected table(s)</string> + </object> + </object> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <object class="NSMutableDictionary"> <string key="NS.key.0">ToolTip</string> @@ -26360,6 +26651,45 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik</string> <reference ref="9"/> <string>com.brandonwalkin.BWToolkit</string> <string>com.brandonwalkin.BWToolkit</string> + <string>{{623, 397}, {174, 93}}</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="43135929"/> + <string key="toolTip">Remove the selected item(s)</string> + </object> + </object> + <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="434807053"/> + <string key="toolTip">Delete all records of selected table(s)</string> + </object> + </object> + <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="419134079"/> + <string key="toolTip">Duplicate the selected item</string> + </object> + </object> + <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="584064012"/> + <string key="toolTip">Rename the selected item</string> + </object> + </object> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -26580,7 +26910,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string> </object> </object> <nil key="sourceID"/> - <int key="maxID">6172</int> + <int key="maxID">6206</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -27889,6 +28219,119 @@ Y2hhbmdlIHRoZSBvcmRlcg</string> </object> </object> </object> + <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBPartialClassDescription"> + <string key="className">TablesList</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>addTable:</string> + <string>closeCopyTableSheet:</string> + <string>closeSheet:</string> + <string>copyTable:</string> + <string>removeTable:</string> + <string>renameTable:</string> + <string>truncateTable:</string> + <string>updateTables:</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> + </object> + </object> + <object class="NSMutableDictionary" key="outlets"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMutableArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>addTableButton</string> + <string>copyTableButton</string> + <string>copyTableContentSwitch</string> + <string>copyTableMessageField</string> + <string>copyTableNameField</string> + <string>copyTableSheet</string> + <string>customQueryInstance</string> + <string>duplicateTableContextMenuItem</string> + <string>duplicateTableMenuItem</string> + <string>extendedTableInfoInstance</string> + <string>removeTableContextMenuItem</string> + <string>removeTableMenuItem</string> + <string>renameTableButton</string> + <string>renameTableContextMenuItem</string> + <string>renameTableMenuItem</string> + <string>separatorTableContextMenuItem</string> + <string>separatorTableMenuItem</string> + <string>tabView</string> + <string>tableContentInstance</string> + <string>tableDataInstance</string> + <string>tableDocumentInstance</string> + <string>tableDumpInstance</string> + <string>tableEncodingButton</string> + <string>tableNameField</string> + <string>tableRenameField</string> + <string>tableRenameSheet</string> + <string>tableRenameText</string> + <string>tableSheet</string> + <string>tableSourceInstance</string> + <string>tableTypeButton</string> + <string>tableWindow</string> + <string>tablesListView</string> + <string>truncateTableButton</string> + <string>truncateTableContextButton</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>NSMenuItem</string> + <string>NSMenuItem</string> + <string>id</string> + <string>NSMenuItem</string> + <string>NSMenuItem</string> + <string>id</string> + <string>NSMenuItem</string> + <string>NSMenuItem</string> + <string>NSMenuItem</string> + <string>NSMenuItem</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="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBDocumentRelativeSource</string> + <string key="minorKey">../../Source/TablesList.h</string> + </object> + </object> + </object> </object> <int key="IBDocument.localizationMode">0</int> <string key="IBDocument.LastKnownRelativeProjectPath">../../sequel-pro.xcodeproj</string> diff --git a/Source/TablesList.h b/Source/TablesList.h index 574f9c18..0c2848ef 100644 --- a/Source/TablesList.h +++ b/Source/TablesList.h @@ -65,12 +65,19 @@ enum sp_table_types IBOutlet id tableRenameText; IBOutlet id renameTableButton; IBOutlet id truncateTableButton; + IBOutlet id truncateTableContextButton; IBOutlet NSMenuItem *removeTableMenuItem; IBOutlet NSMenuItem *duplicateTableMenuItem; IBOutlet NSMenuItem *renameTableMenuItem; IBOutlet NSMenuItem *separatorTableMenuItem; + IBOutlet NSMenuItem *removeTableContextMenuItem; + IBOutlet NSMenuItem *duplicateTableContextMenuItem; + IBOutlet NSMenuItem *renameTableContextMenuItem; + IBOutlet NSMenuItem *separatorTableContextMenuItem; + + CMMCPConnection *mySQLConnection; NSMutableArray *tables; diff --git a/Source/TablesList.m b/Source/TablesList.m index bf8976c2..b4f8b7c2 100644 --- a/Source/TablesList.m +++ b/Source/TablesList.m @@ -684,7 +684,7 @@ [alert setAlertStyle:NSCriticalAlertStyle]; - if ([tablesListView numberOfSelectedRows] == 1) { + if ([tablesListView numberOfSelectedRows] == 1) { [alert setMessageText:[NSString stringWithFormat:NSLocalizedString(@"Truncate table '%@'?", @"truncate table message"), [tables objectAtIndex:[tablesListView selectedRow]]]]; [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Are you sure you want to delete ALL records in the table '%@'. This operation cannot be undone.", @"truncate table informative message"), [tables objectAtIndex:[tablesListView selectedRow]]]]; } @@ -1153,6 +1153,7 @@ [tableDataInstance resetAllData]; [separatorTableMenuItem setHidden:NO]; + [separatorTableContextMenuItem setHidden:NO]; if( [[tableTypes objectAtIndex:[tablesListView selectedRow]] intValue] == SP_TABLETYPE_VIEW || [[tableTypes objectAtIndex:[tablesListView selectedRow]] intValue] == SP_TABLETYPE_TABLE) { @@ -1228,6 +1229,13 @@ [duplicateTableMenuItem setTitle:NSLocalizedString(@"Duplicate View...", @"duplicate view menu title")]; [truncateTableButton setHidden:YES]; [removeTableMenuItem setTitle:NSLocalizedString(@"Remove View", @"remove view menu title")]; + + [renameTableContextMenuItem setHidden:NO]; // we don't have to check the mysql version + [renameTableContextMenuItem setTitle:NSLocalizedString(@"Rename View...", @"rename view menu title")]; + [duplicateTableContextMenuItem setHidden:NO]; + [duplicateTableContextMenuItem setTitle:NSLocalizedString(@"Duplicate View...", @"duplicate view menu title")]; + [truncateTableContextButton setHidden:YES]; + [removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove View", @"remove view menu title")]; } else if([[tableTypes objectAtIndex:[tablesListView selectedRow]] intValue] == SP_TABLETYPE_TABLE) { [[tableSubMenu itemAtIndex:0] setTitle:NSLocalizedString(@"Copy Create Table Syntax", @"copy create table syntax menu item")]; @@ -1250,6 +1258,15 @@ [truncateTableButton setHidden:NO]; [truncateTableButton setTitle:NSLocalizedString(@"Truncate Table", @"truncate table menu title")]; [removeTableMenuItem setTitle:NSLocalizedString(@"Remove Table", @"remove table menu title")]; + + [renameTableContextMenuItem setHidden:NO]; + [renameTableContextMenuItem setTitle:NSLocalizedString(@"Rename Table...", @"rename table menu title")]; + [duplicateTableContextMenuItem setHidden:NO]; + [duplicateTableContextMenuItem setTitle:NSLocalizedString(@"Duplicate Table...", @"duplicate table menu title")]; + [truncateTableContextButton setHidden:NO]; + [truncateTableContextButton setTitle:NSLocalizedString(@"Truncate Table", @"truncate table menu title")]; + [removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove Table", @"remove table menu title")]; + } else if([[tableTypes objectAtIndex:[tablesListView selectedRow]] intValue] == SP_TABLETYPE_PROC) { [[tableSubMenu itemAtIndex:0] setTitle:NSLocalizedString(@"Copy Create Procedure Syntax", @"copy create proc syntax menu item")]; @@ -1269,6 +1286,14 @@ [duplicateTableMenuItem setTitle:NSLocalizedString(@"Duplicate Procedure...", @"duplicate proc menu title")]; [truncateTableButton setHidden:YES]; [removeTableMenuItem setTitle:NSLocalizedString(@"Remove Procedure", @"remove proc menu title")]; + + [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")]; + } else if([[tableTypes objectAtIndex:[tablesListView selectedRow]] intValue] == SP_TABLETYPE_FUNC) { [[tableSubMenu itemAtIndex:0] setTitle:NSLocalizedString(@"Copy Create Function Syntax", @"copy create func syntax menu item")]; @@ -1288,6 +1313,14 @@ [duplicateTableMenuItem setTitle:NSLocalizedString(@"Duplicate Function...", @"duplicate func menu title")]; [truncateTableButton setHidden:YES]; [removeTableMenuItem setTitle:NSLocalizedString(@"Remove Function", @"remove func menu title")]; + + [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")]; + } // set window title [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@/%@/%@", [tableDocumentInstance mySQLVersion], @@ -1328,25 +1361,46 @@ case SP_TABLETYPE_TABLE: [removeTableMenuItem setTitle:NSLocalizedString(@"Remove Tables", @"remove tables menu title")]; [truncateTableButton setTitle:NSLocalizedString(@"Truncate Tables", @"truncate tables menu item")]; + [removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove Tables", @"remove tables menu title")]; + [truncateTableContextButton setTitle:NSLocalizedString(@"Truncate Tables", @"truncate tables menu item")]; + [truncateTableButton setHidden:NO]; + [truncateTableContextButton setHidden:NO]; break; case SP_TABLETYPE_VIEW: [removeTableMenuItem setTitle:NSLocalizedString(@"Remove Views", @"remove views menu title")]; + [removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove Views", @"remove views menu title")]; + [truncateTableButton setHidden:YES]; + [truncateTableContextButton setHidden:YES]; break; case SP_TABLETYPE_PROC: [removeTableMenuItem setTitle:NSLocalizedString(@"Remove Procedures", @"remove procedures menu title")]; + [removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove Procedures", @"remove procedures menu title")]; + [truncateTableButton setHidden:YES]; + [truncateTableContextButton setHidden:YES]; break; case SP_TABLETYPE_FUNC: [removeTableMenuItem setTitle:NSLocalizedString(@"Remove Functions", @"remove functions menu title")]; + [removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove Functions", @"remove functions menu title")]; + [truncateTableButton setHidden:YES]; + [truncateTableContextButton setHidden:YES]; break; } } else { [removeTableMenuItem setTitle:NSLocalizedString(@"Remove Items", @"remove items menu title")]; + [removeTableContextMenuItem setTitle:NSLocalizedString(@"Remove Items", @"remove items menu title")]; + [truncateTableButton setHidden:YES]; + [truncateTableContextButton setHidden:YES]; } } + [renameTableContextMenuItem setHidden:YES]; + [duplicateTableContextMenuItem setHidden:YES]; + [separatorTableContextMenuItem setHidden:YES]; + [renameTableMenuItem setHidden:YES]; [duplicateTableMenuItem setHidden:YES]; [separatorTableMenuItem setHidden:YES]; + [separatorTableContextMenuItem setHidden:YES]; // set window title [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@/%@", [tableDocumentInstance mySQLVersion], [tableDocumentInstance name], [tableDocumentInstance database]]]; |