aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-11-23 01:47:52 +0000
committerrowanbeentje <rowan@beent.je>2010-11-23 01:47:52 +0000
commitfe9a592ca3be829570f5bd88efd5b427120556e5 (patch)
tree7ccaa095207ae6f2d85b54f6954589f6c3650801
parent6b023e9b57269c4cbdd53f8fc6ca58a6ac563c7f (diff)
downloadsequelpro-fe9a592ca3be829570f5bd88efd5b427120556e5.tar.gz
sequelpro-fe9a592ca3be829570f5bd88efd5b427120556e5.tar.bz2
sequelpro-fe9a592ca3be829570f5bd88efd5b427120556e5.zip
- Abstract SPDatabaseDocument's Connection/.spf saving/loading functionality into state setting and getting functions, and refactor old commands to use them
- Fix restoring of content sort column order and selected indexes - Add menu items for duplicating current tab (as an alternate), opening selected table in a new tab, or opening selected database in a new tab - Clean up file menu by making Connection/Session "Save as..." menu items alternates - Update localisable strings
-rw-r--r--Interfaces/English.lproj/DBView.xib315
-rw-r--r--Interfaces/English.lproj/MainMenu.xib1020
-rw-r--r--Resources/English.lproj/BundleEditor.stringsbin654 -> 15520 bytes
-rw-r--r--Resources/English.lproj/DBView.stringsbin99890 -> 100418 bytes
-rw-r--r--Resources/English.lproj/Localizable.stringsbin185970 -> 191756 bytes
-rw-r--r--Resources/English.lproj/MainMenu.stringsbin42990 -> 43902 bytes
-rw-r--r--Source/SPAppController.h1
-rw-r--r--Source/SPAppController.m39
-rw-r--r--Source/SPDatabaseDocument.h7
-rw-r--r--Source/SPDatabaseDocument.m1264
-rw-r--r--Source/SPTableContent.m4
-rw-r--r--Source/SPTablesList.h5
-rw-r--r--Source/SPTablesList.m69
13 files changed, 1646 insertions, 1078 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib
index 5bb84bc8..6549a1f3 100644
--- a/Interfaces/English.lproj/DBView.xib
+++ b/Interfaces/English.lproj/DBView.xib
@@ -23,6 +23,8 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="6180"/>
+ <integer value="6147"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -85,7 +87,6 @@
<int key="NSvFlags">290</int>
<string key="NSFrame">{{5, 2}, {204, 19}}</string>
<reference key="NSSuperview" ref="801427893"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSSearchFieldCell" key="NSCell" id="134854992">
<int key="NSCellFlags">343014976</int>
@@ -178,7 +179,6 @@
<int key="NSvFlags">4362</int>
<string key="NSFrameSize">{218, 38}</string>
<reference key="NSSuperview" ref="494991824"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="_NSCornerView" key="NSCornerView">
<nil key="NSNextResponder"/>
@@ -268,7 +268,6 @@
</object>
<string key="NSFrame">{{1, 1}, {218, 38}}</string>
<reference key="NSSuperview" ref="607475905"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="970881282"/>
<reference key="NSDocView" ref="970881282"/>
<object class="NSColor" key="NSBGColor" id="1024678221">
@@ -284,7 +283,6 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {15, 8}}</string>
<reference key="NSSuperview" ref="607475905"/>
- <reference key="NSWindow"/>
<reference key="NSTarget" ref="607475905"/>
<string key="NSAction">_doScroller:</string>
<double key="NSPercent">0.42105263471603394</double>
@@ -294,7 +292,6 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {223, 15}}</string>
<reference key="NSSuperview" ref="607475905"/>
- <reference key="NSWindow"/>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="607475905"/>
<string key="NSAction">_doScroller:</string>
@@ -303,7 +300,6 @@
</object>
<string key="NSFrame">{{-1, -13}, {220, 40}}</string>
<reference key="NSSuperview" ref="801427893"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="494991824"/>
<int key="NSsFlags">2</int>
<reference key="NSVScroller" ref="196112633"/>
@@ -314,7 +310,6 @@
</object>
<string key="NSFrameSize">{214, 26}</string>
<reference key="NSSuperview" ref="213762440"/>
- <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
<object class="BWCustomView" id="1017775084">
@@ -337,7 +332,6 @@
<int key="NSvFlags">4352</int>
<string key="NSFrameSize">{214, 354}</string>
<reference key="NSSuperview" ref="73685676"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="_NSCornerView" key="NSCornerView">
<nil key="NSNextResponder"/>
@@ -404,7 +398,6 @@
</object>
<string key="NSFrameSize">{214, 354}</string>
<reference key="NSSuperview" ref="233472824"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="251040077"/>
<reference key="NSDocView" ref="251040077"/>
<reference key="NSBGColor" ref="1024678221"/>
@@ -415,7 +408,6 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{197, 0}, {15, 292}}</string>
<reference key="NSSuperview" ref="233472824"/>
- <reference key="NSWindow"/>
<reference key="NSTarget" ref="233472824"/>
<string key="NSAction">_doScroller:</string>
<double key="NSCurValue">0.096045196056365967</double>
@@ -426,7 +418,6 @@
<int key="NSvFlags">-2147483392</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>
@@ -435,7 +426,6 @@
</object>
<string key="NSFrameSize">{214, 354}</string>
<reference key="NSSuperview" ref="1017775084"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="73685676"/>
<int key="NSsFlags">528</int>
<reference key="NSVScroller" ref="693168867"/>
@@ -446,13 +436,11 @@
</object>
<string key="NSFrame">{{0, 27}, {214, 354}}</string>
<reference key="NSSuperview" ref="213762440"/>
- <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
</object>
<string key="NSFrameSize">{214, 381}</string>
<reference key="NSSuperview" ref="131633443"/>
- <reference key="NSWindow"/>
<int key="NSDividerStyle">2</int>
<object class="NSColor" key="BWSVColor">
<int key="NSColorSpace">6</int>
@@ -486,7 +474,6 @@
</object>
<string key="NSFrameSize">{214, 381}</string>
<reference key="NSSuperview" ref="298095498"/>
- <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
<object class="BWCustomView" id="192579410">
@@ -509,7 +496,6 @@
<int key="NSvFlags">4352</int>
<string key="NSFrameSize">{214, 145}</string>
<reference key="NSSuperview" ref="685057119"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="_NSCornerView" key="NSCornerView">
<nil key="NSNextResponder"/>
@@ -576,7 +562,6 @@
</object>
<string key="NSFrameSize">{214, 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"/>
@@ -587,7 +572,6 @@
<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="NSCurValue">0.48965516686439514</double>
@@ -598,7 +582,6 @@
<int key="NSvFlags">-2147483392</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>
@@ -607,7 +590,6 @@
</object>
<string key="NSFrameSize">{214, 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"/>
@@ -618,13 +600,11 @@
</object>
<string key="NSFrame">{{0, 382}, {214, 145}}</string>
<reference key="NSSuperview" ref="298095498"/>
- <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
</object>
<string key="NSFrame">{{0, 23}, {214, 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>
@@ -675,7 +655,6 @@
<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>
@@ -700,7 +679,6 @@
<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>
@@ -805,6 +783,16 @@
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="321871356"/>
</object>
+ <object class="NSMenuItem" id="1049807214">
+ <reference key="NSMenu" ref="890046805"/>
+ <string key="NSTitle">Open Table in New Tab</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 class="NSMenuItem" id="584909701">
<reference key="NSMenu" ref="890046805"/>
<string key="NSTitle">Export</string>
@@ -877,6 +865,7 @@
</object>
</object>
</object>
+ <int key="NSSelectedIndex">7</int>
<bool key="NSPullDown">YES</bool>
<int key="NSPreferredEdge">1</int>
<bool key="NSUsesItemFromMenu">YES</bool>
@@ -888,7 +877,6 @@
<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>
@@ -913,7 +901,6 @@
<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>
@@ -940,7 +927,6 @@
</object>
<string key="NSFrame">{{0, 1}, {214, 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>
@@ -949,7 +935,6 @@
</object>
<string key="NSFrameSize">{214, 550}</string>
<reference key="NSSuperview" ref="937377983"/>
- <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="604818293">
@@ -962,7 +947,6 @@
<int key="NSvFlags">274</int>
<string key="NSFrame">{{-7, -10}, {741, 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">
@@ -987,7 +971,6 @@
<int key="NSvFlags">289</int>
<string key="NSFrame">{{662, -1}, {32, 24}}</string>
<reference key="NSSuperview" ref="220777809"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="BWAnchoredPopUpButtonCell" key="NSCell" id="688701059">
<int key="NSCellFlags">71433792</int>
@@ -1095,7 +1078,6 @@
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{124, -1}, {33, 25}}</string>
<reference key="NSSuperview" ref="220777809"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="598509241">
<int key="NSCellFlags">-2080244224</int>
@@ -1130,14 +1112,12 @@
<int key="NSvFlags">4352</int>
<string key="NSFrameSize">{694, 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">{694, 17}</string>
<reference key="NSSuperview" ref="639957061"/>
- <reference key="NSWindow"/>
<reference key="NSTableView" ref="715508012"/>
</object>
<object class="_NSCornerView" key="NSCornerView" id="868771861">
@@ -1145,7 +1125,6 @@
<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>
@@ -1699,7 +1678,6 @@
</object>
<string key="NSFrame">{{1, 17}, {694, 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"/>
@@ -1710,7 +1688,6 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{674, 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">0.9480968713760376</double>
@@ -1720,7 +1697,6 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{1, 291}, {694, 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>
@@ -1736,7 +1712,6 @@
</object>
<string key="NSFrame">{{1, 0}, {694, 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"/>
@@ -1746,7 +1721,6 @@
</object>
<string key="NSFrame">{{-1, 22}, {696, 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"/>
@@ -1761,7 +1735,6 @@
<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>
@@ -1786,7 +1759,6 @@
<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>
@@ -1811,7 +1783,6 @@
<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>
@@ -1836,7 +1807,6 @@
<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>
@@ -1873,7 +1843,6 @@
</object>
<string key="NSFrame">{{125, 0}, {507, 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>
@@ -1894,7 +1863,6 @@
<int key="NSvFlags">289</int>
<string key="NSFrame">{{632, -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>
@@ -1917,7 +1885,6 @@
</object>
<string key="NSFrameSize">{695, 329}</string>
<reference key="NSSuperview" ref="628830973"/>
- <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="1063281455">
@@ -1935,7 +1902,6 @@
<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>
@@ -1974,7 +1940,6 @@
</object>
<string key="NSFrame">{{678, 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>
@@ -1993,7 +1958,6 @@
</object>
<string key="NSFrame">{{0, 181}, {695, 20}}</string>
<reference key="NSSuperview" ref="1063281455"/>
- <reference key="NSWindow"/>
<object class="NSColor" key="BWGBFillStartingColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC42NzU3Njg0OTQ2IDAuNzIxOTQ4MTQ2OCAwLjc2NTMwNjExNTIAA</bytes>
@@ -2036,14 +2000,12 @@
<int key="NSvFlags">4352</int>
<string key="NSFrameSize">{694, 140}</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">{694, 17}</string>
<reference key="NSSuperview" ref="1038672854"/>
- <reference key="NSWindow"/>
<reference key="NSTableView" ref="584834515"/>
</object>
<object class="_NSCornerView" key="NSCornerView" id="476444025">
@@ -2051,7 +2013,6 @@
<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>
@@ -2307,7 +2268,6 @@
</object>
<string key="NSFrame">{{1, 17}, {694, 140}}</string>
<reference key="NSSuperview" ref="376224367"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="584834515"/>
<reference key="NSDocView" ref="584834515"/>
<reference key="NSBGColor" ref="1024678221"/>
@@ -2318,7 +2278,6 @@
<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">0.97794115543365479</double>
@@ -2328,7 +2287,6 @@
<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>
@@ -2343,7 +2301,6 @@
</object>
<string key="NSFrame">{{1, 0}, {694, 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"/>
@@ -2353,7 +2310,6 @@
</object>
<string key="NSFrame">{{-1, 23}, {696, 158}}</string>
<reference key="NSSuperview" ref="1063281455"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="794929378"/>
<int key="NSsFlags">562</int>
<reference key="NSVScroller" ref="1019209947"/>
@@ -2368,7 +2324,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{-1, 0}, {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>
@@ -2390,7 +2345,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{61, 0}, {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>
@@ -2412,7 +2366,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{30, 0}, {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>
@@ -2446,7 +2399,6 @@
</object>
<string key="NSFrame">{{93, 1}, {602, 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>
@@ -2462,19 +2414,16 @@
</object>
<string key="NSFrame">{{0, 330}, {695, 201}}</string>
<reference key="NSSuperview" ref="628830973"/>
- <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
</object>
<string key="NSFrame">{{7, 10}, {695, 531}}</string>
<reference key="NSSuperview" ref="461236772"/>
- <reference key="NSWindow"/>
<int key="NSDividerStyle">2</int>
</object>
</object>
<string key="NSFrame">{{10, 7}, {706, 544}}</string>
<reference key="NSSuperview" ref="714795046"/>
- <reference key="NSWindow"/>
</object>
<string key="NSLabel">Structure</string>
<reference key="NSColor" ref="62854682"/>
@@ -3790,7 +3739,6 @@
</object>
</object>
</object>
- <int key="NSSelectedIndex">2</int>
<bool key="NSPullDown">YES</bool>
<int key="NSPreferredEdge">3</int>
<bool key="NSUsesItemFromMenu">YES</bool>
@@ -6236,13 +6184,11 @@
</object>
<string key="NSFrame">{{215, 0}, {729, 550}}</string>
<reference key="NSSuperview" ref="937377983"/>
- <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
</object>
<string key="NSFrame">{{0, -1}, {944, 550}}</string>
<reference key="NSSuperview" ref="632807581"/>
- <reference key="NSWindow"/>
<bool key="NSIsVertical">YES</bool>
<int key="NSDividerStyle">2</int>
<string key="NSAutosaveName">DBViewSplitter</string>
@@ -6250,7 +6196,6 @@
</object>
<string key="NSFrameSize">{943, 549}</string>
<reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSWindowTemplate" id="554105051">
@@ -11353,6 +11298,14 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<reference key="NSOnImage" ref="450876295"/>
<reference key="NSMixedImage" ref="414351669"/>
</object>
+ <object class="NSMenuItem" id="530477407">
+ <reference key="NSMenu" ref="556141845"/>
+ <string key="NSTitle">Open Table in New Tab</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="450876295"/>
+ <reference key="NSMixedImage" ref="414351669"/>
+ </object>
<object class="NSMenuItem" id="985474865">
<reference key="NSMenu" ref="556141845"/>
<string key="NSTitle">Export</string>
@@ -13281,14 +13234,6 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
</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">databaseDataInstance</string>
<reference key="source" ref="438574515"/>
<reference key="destination" ref="631714493"/>
@@ -16224,6 +16169,46 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
</object>
<int key="connectionID">7673</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">truncateTableContextMenuItem</string>
+ <reference key="source" ref="438574515"/>
+ <reference key="destination" ref="434807053"/>
+ </object>
+ <int key="connectionID">7681</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">openTableInNewTab:</string>
+ <reference key="source" ref="438574515"/>
+ <reference key="destination" ref="530477407"/>
+ </object>
+ <int key="connectionID">7684</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">openTableInNewTabContextMenuItem</string>
+ <reference key="source" ref="438574515"/>
+ <reference key="destination" ref="530477407"/>
+ </object>
+ <int key="connectionID">7685</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">openTableInNewTab:</string>
+ <reference key="source" ref="438574515"/>
+ <reference key="destination" ref="1049807214"/>
+ </object>
+ <int key="connectionID">7687</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">openTableInNewTabMenuItem</string>
+ <reference key="source" ref="438574515"/>
+ <reference key="destination" ref="1049807214"/>
+ </object>
+ <int key="connectionID">7688</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -17741,6 +17726,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<reference ref="947454058"/>
<reference ref="985474865"/>
<reference ref="262885074"/>
+ <reference ref="530477407"/>
</object>
<reference key="parent" ref="0"/>
<string key="objectName">Table List Menu</string>
@@ -19025,6 +19011,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<reference ref="112091395"/>
<reference ref="584909701"/>
<reference ref="160189226"/>
+ <reference ref="1049807214"/>
</object>
<reference key="parent" ref="321871356"/>
</object>
@@ -21268,32 +21255,6 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<reference key="parent" ref="556141845"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">7052</int>
- <reference key="object" ref="563848996"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="407752940"/>
- <reference ref="675650257"/>
- <reference ref="980906208"/>
- </object>
- <reference key="parent" ref="985474865"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">7053</int>
- <reference key="object" ref="407752940"/>
- <reference key="parent" ref="563848996"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">7054</int>
- <reference key="object" ref="675650257"/>
- <reference key="parent" ref="563848996"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">7055</int>
- <reference key="object" ref="980906208"/>
- <reference key="parent" ref="563848996"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">7056</int>
<reference key="object" ref="262885074"/>
<reference key="parent" ref="556141845"/>
@@ -22743,6 +22704,42 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<reference key="object" ref="456870714"/>
<reference key="parent" ref="107658659"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7052</int>
+ <reference key="object" ref="563848996"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="980906208"/>
+ <reference ref="675650257"/>
+ <reference ref="407752940"/>
+ </object>
+ <reference key="parent" ref="985474865"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7055</int>
+ <reference key="object" ref="980906208"/>
+ <reference key="parent" ref="563848996"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7054</int>
+ <reference key="object" ref="675650257"/>
+ <reference key="parent" ref="563848996"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7053</int>
+ <reference key="object" ref="407752940"/>
+ <reference key="parent" ref="563848996"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7683</int>
+ <reference key="object" ref="530477407"/>
+ <reference key="parent" ref="556141845"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7686</int>
+ <reference key="object" ref="1049807214"/>
+ <reference key="parent" ref="890046805"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -24046,6 +24043,8 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>7660.IBPluginDependency</string>
<string>7661.IBPluginDependency</string>
<string>7668.IBPluginDependency</string>
+ <string>7683.IBPluginDependency</string>
+ <string>7686.IBPluginDependency</string>
<string>858.IBPluginDependency</string>
<string>858.ImportedFromIB2</string>
<string>959.IBEditorWindowLastContentRect</string>
@@ -24843,7 +24842,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.brandonwalkin.BWToolkit</string>
- <string>{{77, 77}, {208, 152}}</string>
+ <string>{{100, 37}, {208, 169}}</string>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.brandonwalkin.BWToolkit</string>
<object class="NSMutableDictionary">
@@ -24905,7 +24904,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.brandonwalkin.BWToolkit</string>
- <string>{{772, 374}, {241, 153}}</string>
+ <string>{{574, 389}, {241, 173}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary">
<string key="NS.key.0">ToolTip</string>
@@ -24948,10 +24947,10 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{909, 777}, {233, 53}}</string>
+ <string>{{769, 777}, {233, 53}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{926, 501}, {228, 113}}</string>
+ <string>{{774, 501}, {228, 113}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -25382,7 +25381,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{1013, 364}, {157, 63}}</string>
+ <string>{{815, 399}, {157, 63}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -25833,6 +25832,8 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<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>{{265, 489}, {405, 267}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -25870,7 +25871,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">7673</int>
+ <int key="maxID">7688</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -26013,6 +26014,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>doSelectionTitleCase:</string>
<string>doSelectionUpperCase:</string>
<string>doTranspose:</string>
+ <string>executeBundleItemForInputField:</string>
<string>insertNULLvalue:</string>
<string>moveSelectionLineDown:</string>
<string>moveSelectionLineUp:</string>
@@ -26037,6 +26039,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
@@ -26052,6 +26055,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>doSelectionTitleCase:</string>
<string>doSelectionUpperCase:</string>
<string>doTranspose:</string>
+ <string>executeBundleItemForInputField:</string>
<string>insertNULLvalue:</string>
<string>moveSelectionLineDown:</string>
<string>moveSelectionLineUp:</string>
@@ -26098,6 +26102,10 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">executeBundleItemForInputField:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">insertNULLvalue:</string>
<string key="candidateClassName">id</string>
</object>
@@ -26139,14 +26147,35 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string key="className">SPCopyTable</string>
<string key="superclassName">SPTableView</string>
<object class="NSMutableDictionary" key="actions">
- <string key="NS.key.0">copy:</string>
- <string key="NS.object.0">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>copy:</string>
+ <string>executeBundleItemForDataTable:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ </object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
- <string key="NS.key.0">copy:</string>
- <object class="IBActionInfo" key="NS.object.0">
- <string key="name">copy:</string>
- <string key="candidateClassName">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>copy:</string>
+ <string>executeBundleItemForDataTable:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">copy:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">executeBundleItemForDataTable:</string>
+ <string key="candidateClassName">id</string>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -30901,6 +30930,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>addTable:</string>
<string>closeSheet:</string>
<string>copyTable:</string>
+ <string>openTableInNewTab:</string>
<string>removeTable:</string>
<string>renameTable:</string>
<string>togglePaneCollapse:</string>
@@ -30919,6 +30949,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
@@ -30928,6 +30959,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>addTable:</string>
<string>closeSheet:</string>
<string>copyTable:</string>
+ <string>openTableInNewTab:</string>
<string>removeTable:</string>
<string>renameTable:</string>
<string>togglePaneCollapse:</string>
@@ -30950,6 +30982,10 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">openTableInNewTab:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">removeTable:</string>
<string key="candidateClassName">id</string>
</object>
@@ -30991,6 +31027,8 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>duplicateTableMenuItem</string>
<string>extendedTableInfoInstance</string>
<string>listFilterField</string>
+ <string>openTableInNewTabContextMenuItem</string>
+ <string>openTableInNewTabMenuItem</string>
<string>removeTableContextMenuItem</string>
<string>removeTableMenuItem</string>
<string>renameTableContextMenuItem</string>
@@ -31021,7 +31059,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>toolbarAddButton</string>
<string>toolbarReloadButton</string>
<string>truncateTableButton</string>
- <string>truncateTableContextButton</string>
+ <string>truncateTableContextMenuItem</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -31047,6 +31085,8 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
<string>SPHistoryController</string>
<string>id</string>
<string>id</string>
@@ -31067,7 +31107,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>id</string>
<string>id</string>
<string>id</string>
- <string>id</string>
+ <string>NSMenuItem</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
@@ -31086,6 +31126,8 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>duplicateTableMenuItem</string>
<string>extendedTableInfoInstance</string>
<string>listFilterField</string>
+ <string>openTableInNewTabContextMenuItem</string>
+ <string>openTableInNewTabMenuItem</string>
<string>removeTableContextMenuItem</string>
<string>removeTableMenuItem</string>
<string>renameTableContextMenuItem</string>
@@ -31116,7 +31158,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string>toolbarAddButton</string>
<string>toolbarReloadButton</string>
<string>truncateTableButton</string>
- <string>truncateTableContextButton</string>
+ <string>truncateTableContextMenuItem</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -31169,6 +31211,14 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string key="candidateClassName">NSSearchField</string>
</object>
<object class="IBToOneOutletInfo">
+ <string key="name">openTableInNewTabContextMenuItem</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">openTableInNewTabMenuItem</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo">
<string key="name">removeTableContextMenuItem</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
@@ -31289,8 +31339,8 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
- <string key="name">truncateTableContextButton</string>
- <string key="candidateClassName">id</string>
+ <string key="name">truncateTableContextMenuItem</string>
+ <string key="candidateClassName">NSMenuItem</string>
</object>
</object>
</object>
@@ -31311,7 +31361,7 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>executeBundleItem:</string>
+ <string>executeBundleItemForEditor:</string>
<string>showMySQLHelpForCurrentWord:</string>
</object>
<object class="NSMutableArray" key="dict.values">
@@ -31324,13 +31374,13 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>executeBundleItem:</string>
+ <string>executeBundleItemForEditor:</string>
<string>showMySQLHelpForCurrentWord:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
- <string key="name">executeBundleItem:</string>
+ <string key="name">executeBundleItemForEditor:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
@@ -32017,6 +32067,27 @@ bGQgTmFtZQkgID0gQAoJCQkJICBMRU5HVEgoYEBgKSA+IEA</bytes>
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">ShortcutRecorder.framework/Headers/SRRecorderCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">ShortcutRecorder.framework/Headers/SRRecorderControl.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">ShortcutRecorder.framework/Headers/SRValidator.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Sparkle.framework/Headers/SUAppcast.h</string>
</object>
</object>
diff --git a/Interfaces/English.lproj/MainMenu.xib b/Interfaces/English.lproj/MainMenu.xib
index 681cba8f..9699fc03 100644
--- a/Interfaces/English.lproj/MainMenu.xib
+++ b/Interfaces/English.lproj/MainMenu.xib
@@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="1178"/>
+ <integer value="628"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -233,7 +233,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="617509313">
<reference key="NSMenu" ref="709725194"/>
- <string key="NSTitle">New Connection Window…</string>
+ <string key="NSTitle">New Connection Window</string>
<string key="NSKeyEquiv">n</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
@@ -243,7 +243,7 @@
</object>
<object class="NSMenuItem" id="284533429">
<reference key="NSMenu" ref="709725194"/>
- <string key="NSTitle">New Connection Tab…</string>
+ <string key="NSTitle">New Connection Tab</string>
<string key="NSKeyEquiv">t</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
@@ -251,6 +251,17 @@
<reference key="NSMixedImage" ref="315854375"/>
<int key="NSTag">1102</int>
</object>
+ <object class="NSMenuItem" id="73480286">
+ <reference key="NSMenu" ref="709725194"/>
+ <bool key="NSIsAlternate">YES</bool>
+ <string key="NSTitle">Duplicate Connection Tab</string>
+ <string key="NSKeyEquiv">t</string>
+ <int key="NSKeyEquivModMask">1310720</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="625762401"/>
+ <reference key="NSMixedImage" ref="315854375"/>
+ <int key="NSTag">1104</int>
+ </object>
<object class="NSMenuItem" id="363260437">
<reference key="NSMenu" ref="709725194"/>
<bool key="NSIsDisabled">YES</bool>
@@ -350,6 +361,7 @@
</object>
<object class="NSMenuItem" id="643339783">
<reference key="NSMenu" ref="709725194"/>
+ <bool key="NSIsAlternate">YES</bool>
<string key="NSTitle">Save Connection As…</string>
<string key="NSKeyEquiv">S</string>
<int key="NSKeyEquivModMask">1048576</int>
@@ -370,6 +382,7 @@
</object>
<object class="NSMenuItem" id="473804195">
<reference key="NSMenu" ref="709725194"/>
+ <bool key="NSIsAlternate">YES</bool>
<string key="NSTitle">Save Session As…</string>
<string key="NSKeyEquiv">S</string>
<int key="NSKeyEquivModMask">1835008</int>
@@ -1565,6 +1578,14 @@
</object>
</object>
</object>
+ <object class="NSMenuItem" id="929597005">
+ <reference key="NSMenu" ref="172963563"/>
+ <string key="NSTitle">Open Database in New Tab</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="625762401"/>
+ <reference key="NSMixedImage" ref="315854375"/>
+ </object>
<object class="NSMenuItem" id="806896137">
<reference key="NSMenu" ref="172963563"/>
<bool key="NSIsDisabled">YES</bool>
@@ -3066,6 +3087,22 @@
</object>
<int key="connectionID">1175</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">duplicateTab:</string>
+ <reference key="source" ref="63651044"/>
+ <reference key="destination" ref="73480286"/>
+ </object>
+ <int key="connectionID">1188</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">openDatabaseInNewTab:</string>
+ <reference key="source" ref="63651044"/>
+ <reference key="destination" ref="929597005"/>
+ </object>
+ <int key="connectionID">1190</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -3298,6 +3335,7 @@
<reference ref="363260437"/>
<reference ref="943842666"/>
<reference ref="473804195"/>
+ <reference ref="73480286"/>
</object>
<reference key="parent" ref="86447006"/>
</object>
@@ -3430,6 +3468,7 @@
<reference ref="820553150"/>
<reference ref="935082963"/>
<reference ref="219440274"/>
+ <reference ref="929597005"/>
</object>
<reference key="parent" ref="693420496"/>
</object>
@@ -4487,6 +4526,16 @@
</object>
<reference key="parent" ref="558064231"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1186</int>
+ <reference key="object" ref="73480286"/>
+ <reference key="parent" ref="709725194"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1189</int>
+ <reference key="object" ref="929597005"/>
+ <reference key="parent" ref="172963563"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -4560,6 +4609,10 @@
<string>1178.IBPluginDependency</string>
<string>1179.IBEditorWindowLastContentRect</string>
<string>1179.IBPluginDependency</string>
+ <string>1186.IBAttributePlaceholdersKey</string>
+ <string>1186.IBPluginDependency</string>
+ <string>1186.ImportedFromIB2</string>
+ <string>1189.IBPluginDependency</string>
<string>129.IBPluginDependency</string>
<string>129.ImportedFromIB2</string>
<string>130.IBEditorWindowLastContentRect</string>
@@ -4949,6 +5002,17 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{435, 717}, {64, 6}}</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="73480286"/>
+ <string key="toolTip">Duplicate the current connection tab</string>
+ </object>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{562, 439}, {64, 6}}</string>
@@ -5069,7 +5133,7 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{576, 379}, {255, 283}}</string>
+ <string>{{298, 420}, {273, 303}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{312, 683}, {231, 153}}</string>
@@ -5081,7 +5145,7 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{603, 82}, {276, 423}}</string>
+ <string>{{553, 90}, {276, 423}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{556, 185}, {279, 383}}</string>
@@ -5162,7 +5226,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{437, 122}, {301, 423}}</string>
+ <string>{{162, 280}, {295, 443}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{180, 535}, {182, 253}}</string>
@@ -5335,7 +5399,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">1185</int>
+ <int key="maxID">1190</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -5588,13 +5652,6 @@
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
<string key="minorKey">Frameworks/MCPKit/MCPFoundationKit/MCPNull.h</string>
</object>
</object>
@@ -5687,7 +5744,10 @@
<string>doSelectionTitleCase:</string>
<string>doSelectionUpperCase:</string>
<string>doTranspose:</string>
+ <string>executeBundleItemForInputField:</string>
<string>insertNULLvalue:</string>
+ <string>moveSelectionLineDown:</string>
+ <string>moveSelectionLineUp:</string>
<string>selectCurrentLine:</string>
<string>selectCurrentWord:</string>
<string>selectEnclosingBrackets:</string>
@@ -5707,6 +5767,9 @@
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
@@ -5722,7 +5785,10 @@
<string>doSelectionTitleCase:</string>
<string>doSelectionUpperCase:</string>
<string>doTranspose:</string>
+ <string>executeBundleItemForInputField:</string>
<string>insertNULLvalue:</string>
+ <string>moveSelectionLineDown:</string>
+ <string>moveSelectionLineUp:</string>
<string>selectCurrentLine:</string>
<string>selectCurrentWord:</string>
<string>selectEnclosingBrackets:</string>
@@ -5766,10 +5832,22 @@
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">executeBundleItemForInputField:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">insertNULLvalue:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">moveSelectionLineDown:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">moveSelectionLineUp:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">selectCurrentLine:</string>
<string key="candidateClassName">id</string>
</object>
@@ -5876,13 +5954,16 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>donate:</string>
+ <string>duplicateTab:</string>
<string>newTab:</string>
<string>newWindow:</string>
<string>openAboutPanel:</string>
+ <string>openBundleEditor:</string>
<string>openConnectionSheet:</string>
<string>openPreferences:</string>
<string>provideFeedback:</string>
<string>provideTranslationFeedback:</string>
+ <string>reloadBundles:</string>
<string>viewKeyboardShortcuts:</string>
<string>visitFAQWebsite:</string>
<string>visitHelpWebsite:</string>
@@ -5902,6 +5983,9 @@
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
@@ -5909,13 +5993,16 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>donate:</string>
+ <string>duplicateTab:</string>
<string>newTab:</string>
<string>newWindow:</string>
<string>openAboutPanel:</string>
+ <string>openBundleEditor:</string>
<string>openConnectionSheet:</string>
<string>openPreferences:</string>
<string>provideFeedback:</string>
<string>provideTranslationFeedback:</string>
+ <string>reloadBundles:</string>
<string>viewKeyboardShortcuts:</string>
<string>visitFAQWebsite:</string>
<string>visitHelpWebsite:</string>
@@ -5928,6 +6015,10 @@
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">duplicateTab:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">newTab:</string>
<string key="candidateClassName">id</string>
</object>
@@ -5940,6 +6031,10 @@
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">openBundleEditor:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">openConnectionSheet:</string>
<string key="candidateClassName">id</string>
</object>
@@ -5956,6 +6051,10 @@
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">reloadBundles:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">viewKeyboardShortcuts:</string>
<string key="candidateClassName">id</string>
</object>
@@ -5974,14 +6073,35 @@
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">encodingPopUp</string>
- <string key="NS.object.0">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>bundleEditorWindow</string>
+ <string>encodingPopUp</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSWindow</string>
+ <string>id</string>
+ </object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <string key="NS.key.0">encodingPopUp</string>
- <object class="IBToOneOutletInfo" key="NS.object.0">
- <string key="name">encodingPopUp</string>
- <string key="candidateClassName">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>bundleEditorWindow</string>
+ <string>encodingPopUp</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">bundleEditorWindow</string>
+ <string key="candidateClassName">NSWindow</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">encodingPopUp</string>
+ <string key="candidateClassName">id</string>
+ </object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -5997,6 +6117,283 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">SPBundleEditorController</string>
+ <string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>addCommandBundle:</string>
+ <string>duplicateCommandBundle:</string>
+ <string>inputFallbackPopupButtonChanged:</string>
+ <string>inputPopupButtonChanged:</string>
+ <string>outputPopupButtonChanged:</string>
+ <string>removeCommandBundle:</string>
+ <string>revealCommandBundleInFinder:</string>
+ <string>saveAndCloseWindow:</string>
+ <string>saveBundle:</string>
+ <string>scopeButtonChanged:</string>
+ <string>showHelp:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>addCommandBundle:</string>
+ <string>duplicateCommandBundle:</string>
+ <string>inputFallbackPopupButtonChanged:</string>
+ <string>inputPopupButtonChanged:</string>
+ <string>outputPopupButtonChanged:</string>
+ <string>removeCommandBundle:</string>
+ <string>revealCommandBundleInFinder:</string>
+ <string>saveAndCloseWindow:</string>
+ <string>saveBundle:</string>
+ <string>scopeButtonChanged:</string>
+ <string>showHelp:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">addCommandBundle:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">duplicateCommandBundle:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">inputFallbackPopupButtonChanged:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">inputPopupButtonChanged:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">outputPopupButtonChanged:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">removeCommandBundle:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">revealCommandBundleInFinder:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">saveAndCloseWindow:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">saveBundle:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">scopeButtonChanged:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">showHelp:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>categoryTextField</string>
+ <string>commandBundleArrayController</string>
+ <string>commandTextView</string>
+ <string>commandsTableView</string>
+ <string>dataTableScopeButton</string>
+ <string>disableCheckBox</string>
+ <string>duplicateMenuItem</string>
+ <string>editorScopeButton</string>
+ <string>fallbackLabelField</string>
+ <string>inputFallbackPopupButton</string>
+ <string>inputFieldScopeButton</string>
+ <string>inputPopupButton</string>
+ <string>keyEquivalentField</string>
+ <string>nameTextField</string>
+ <string>outputPopupButton</string>
+ <string>removeButton</string>
+ <string>revealInFinderMenuItem</string>
+ <string>tootlipTextField</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSTextField</string>
+ <string>NSArrayController</string>
+ <string>id</string>
+ <string>NSTableView</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
+ <string>NSMenuItem</string>
+ <string>NSButton</string>
+ <string>NSTextField</string>
+ <string>NSPopUpButton</string>
+ <string>NSButton</string>
+ <string>NSPopUpButton</string>
+ <string>SRRecorderControl</string>
+ <string>NSTextField</string>
+ <string>NSPopUpButton</string>
+ <string>NSButton</string>
+ <string>NSMenuItem</string>
+ <string>NSTextField</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>categoryTextField</string>
+ <string>commandBundleArrayController</string>
+ <string>commandTextView</string>
+ <string>commandsTableView</string>
+ <string>dataTableScopeButton</string>
+ <string>disableCheckBox</string>
+ <string>duplicateMenuItem</string>
+ <string>editorScopeButton</string>
+ <string>fallbackLabelField</string>
+ <string>inputFallbackPopupButton</string>
+ <string>inputFieldScopeButton</string>
+ <string>inputPopupButton</string>
+ <string>keyEquivalentField</string>
+ <string>nameTextField</string>
+ <string>outputPopupButton</string>
+ <string>removeButton</string>
+ <string>revealInFinderMenuItem</string>
+ <string>tootlipTextField</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">categoryTextField</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">commandBundleArrayController</string>
+ <string key="candidateClassName">NSArrayController</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">commandTextView</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">commandsTableView</string>
+ <string key="candidateClassName">NSTableView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">dataTableScopeButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">disableCheckBox</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">duplicateMenuItem</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">editorScopeButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">fallbackLabelField</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">inputFallbackPopupButton</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">inputFieldScopeButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">inputPopupButton</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">keyEquivalentField</string>
+ <string key="candidateClassName">SRRecorderControl</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">nameTextField</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">outputPopupButton</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">removeButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">revealInFinderMenuItem</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">tootlipTextField</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPBundleEditorController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPBundleHTMLOutputController</string>
+ <string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">printDocument:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <string key="NS.key.0">printDocument:</string>
+ <object class="IBActionInfo" key="NS.object.0">
+ <string key="name">printDocument:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">webView</string>
+ <string key="NS.object.0">WebView</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">webView</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">webView</string>
+ <string key="candidateClassName">WebView</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPBundleHTMLOutputController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">SPConnectionController</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
@@ -6367,17 +6764,45 @@
<reference key="sourceIdentifier" ref="296977353"/>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">SPConnectionController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPConnectionControllerDelegate.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">SPCopyTable</string>
<string key="superclassName">SPTableView</string>
<object class="NSMutableDictionary" key="actions">
- <string key="NS.key.0">copy:</string>
- <string key="NS.object.0">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>copy:</string>
+ <string>executeBundleItemForDataTable:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ </object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
- <string key="NS.key.0">copy:</string>
- <object class="IBActionInfo" key="NS.object.0">
- <string key="name">copy:</string>
- <string key="candidateClassName">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>copy:</string>
+ <string>executeBundleItemForDataTable:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">copy:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">executeBundleItemForDataTable:</string>
+ <string key="candidateClassName">id</string>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -7041,6 +7466,7 @@
<string>import:</string>
<string>importFromClipboard:</string>
<string>openCurrentConnectionInNewWindow:</string>
+ <string>openDatabaseInNewTab:</string>
<string>optimizeTable:</string>
<string>refreshTables:</string>
<string>removeDatabase:</string>
@@ -7059,12 +7485,6 @@
<string>toggleNavigator:</string>
<string>updateWindowTitle:</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>
@@ -7112,11 +7532,6 @@
<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="actionInfosByName">
@@ -7148,6 +7563,7 @@
<string>import:</string>
<string>importFromClipboard:</string>
<string>openCurrentConnectionInNewWindow:</string>
+ <string>openDatabaseInNewTab:</string>
<string>optimizeTable:</string>
<string>refreshTables:</string>
<string>removeDatabase:</string>
@@ -7166,12 +7582,6 @@
<string>toggleNavigator:</string>
<string>updateWindowTitle:</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>
@@ -7276,6 +7686,10 @@
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">openDatabaseInNewTab:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">optimizeTable:</string>
<string key="candidateClassName">id</string>
</object>
@@ -7347,30 +7761,6 @@
<string key="name">validateSaveConnectionAccessory:</string>
<string key="candidateClassName">id</string>
</object>
- <object class="IBActionInfo">
- <string key="name">viewContent:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">viewQuery:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">viewRelations:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">viewStatus:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">viewStructure:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">viewTriggers:</string>
- <string key="candidateClassName">id</string>
- </object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -7874,6 +8264,73 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">SPDatabaseDocument</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <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>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <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>
+ <object class="IBActionInfo">
+ <string key="name">viewContent:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">viewQuery:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">viewRelations:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">viewStatus:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">viewStructure:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">viewTriggers:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPDatabaseViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPDatabaseDocument</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Source/SPPrintController.h</string>
@@ -7933,6 +8390,7 @@
<string>toggleSQLIncludeContent:</string>
<string>toggleSQLIncludeDropSyntax:</string>
<string>toggleSQLIncludeStructure:</string>
+ <string>toggleXMLOutputFormat:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -7950,6 +8408,7 @@
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
@@ -7970,6 +8429,7 @@
<string>toggleSQLIncludeContent:</string>
<string>toggleSQLIncludeDropSyntax:</string>
<string>toggleSQLIncludeStructure:</string>
+ <string>toggleXMLOutputFormat:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -8029,6 +8489,10 @@
<string key="name">toggleSQLIncludeStructure:</string>
<string key="candidateClassName">id</string>
</object>
+ <object class="IBActionInfo">
+ <string key="name">toggleXMLOutputFormat:</string>
+ <string key="candidateClassName">id</string>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -8057,11 +8521,9 @@
<string>exportExcelSheetOrFilePerTableMatrix</string>
<string>exportFilePerTableCheck</string>
<string>exportFilenameDividerBox</string>
- <string>exportHTMLIncludeStructureCheck</string>
<string>exportInputPopUpButton</string>
<string>exportOptionsTabBar</string>
<string>exportOutputCompressionFormatPopupButton</string>
- <string>exportPDFIncludeStructureCheck</string>
<string>exportPathField</string>
<string>exportProcessLowMemoryButton</string>
<string>exportProgressIndicator</string>
@@ -8082,6 +8544,9 @@
<string>exportTablelistScrollView</string>
<string>exportTypeTabBar</string>
<string>exportUseUTF8BOMButton</string>
+ <string>exportXMLFormatPopUpButton</string>
+ <string>exportXMLIncludeContent</string>
+ <string>exportXMLIncludeStructure</string>
<string>exportXMLNULLValuesAsTextField</string>
<string>exporterView</string>
<string>tableContentInstance</string>
@@ -8113,11 +8578,9 @@
<string>NSMatrix</string>
<string>NSButton</string>
<string>NSBox</string>
- <string>NSButton</string>
<string>NSPopUpButton</string>
<string>NSTabView</string>
<string>NSPopUpButton</string>
- <string>NSButton</string>
<string>NSTextField</string>
<string>NSButton</string>
<string>NSProgressIndicator</string>
@@ -8138,6 +8601,9 @@
<string>NSScrollView</string>
<string>NSTabView</string>
<string>NSButton</string>
+ <string>NSPopUpButton</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
<string>NSTextField</string>
<string>NSView</string>
<string>id</string>
@@ -8172,11 +8638,9 @@
<string>exportExcelSheetOrFilePerTableMatrix</string>
<string>exportFilePerTableCheck</string>
<string>exportFilenameDividerBox</string>
- <string>exportHTMLIncludeStructureCheck</string>
<string>exportInputPopUpButton</string>
<string>exportOptionsTabBar</string>
<string>exportOutputCompressionFormatPopupButton</string>
- <string>exportPDFIncludeStructureCheck</string>
<string>exportPathField</string>
<string>exportProcessLowMemoryButton</string>
<string>exportProgressIndicator</string>
@@ -8197,6 +8661,9 @@
<string>exportTablelistScrollView</string>
<string>exportTypeTabBar</string>
<string>exportUseUTF8BOMButton</string>
+ <string>exportXMLFormatPopUpButton</string>
+ <string>exportXMLIncludeContent</string>
+ <string>exportXMLIncludeStructure</string>
<string>exportXMLNULLValuesAsTextField</string>
<string>exporterView</string>
<string>tableContentInstance</string>
@@ -8295,10 +8762,6 @@
<string key="candidateClassName">NSBox</string>
</object>
<object class="IBToOneOutletInfo">
- <string key="name">exportHTMLIncludeStructureCheck</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo">
<string key="name">exportInputPopUpButton</string>
<string key="candidateClassName">NSPopUpButton</string>
</object>
@@ -8311,10 +8774,6 @@
<string key="candidateClassName">NSPopUpButton</string>
</object>
<object class="IBToOneOutletInfo">
- <string key="name">exportPDFIncludeStructureCheck</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo">
<string key="name">exportPathField</string>
<string key="candidateClassName">NSTextField</string>
</object>
@@ -8395,6 +8854,18 @@
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo">
+ <string key="name">exportXMLFormatPopUpButton</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">exportXMLIncludeContent</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">exportXMLIncludeStructure</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
<string key="name">exportXMLNULLValuesAsTextField</string>
<string key="candidateClassName">NSTextField</string>
</object>
@@ -8429,6 +8900,13 @@
<string key="className">SPExportController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPExportControllerDelegate.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPExportController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
<string key="minorKey">Source/SPExportFileUtilities.h</string>
</object>
</object>
@@ -9171,6 +9649,7 @@
<string>addTable:</string>
<string>closeSheet:</string>
<string>copyTable:</string>
+ <string>openTableInNewTab:</string>
<string>removeTable:</string>
<string>renameTable:</string>
<string>togglePaneCollapse:</string>
@@ -9189,6 +9668,7 @@
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
@@ -9198,6 +9678,7 @@
<string>addTable:</string>
<string>closeSheet:</string>
<string>copyTable:</string>
+ <string>openTableInNewTab:</string>
<string>removeTable:</string>
<string>renameTable:</string>
<string>togglePaneCollapse:</string>
@@ -9220,6 +9701,10 @@
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">openTableInNewTab:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">removeTable:</string>
<string key="candidateClassName">id</string>
</object>
@@ -9261,6 +9746,8 @@
<string>duplicateTableMenuItem</string>
<string>extendedTableInfoInstance</string>
<string>listFilterField</string>
+ <string>openTableInNewTabContextMenuItem</string>
+ <string>openTableInNewTabMenuItem</string>
<string>removeTableContextMenuItem</string>
<string>removeTableMenuItem</string>
<string>renameTableContextMenuItem</string>
@@ -9272,7 +9759,6 @@
<string>showCreateSyntaxContextMenuItem</string>
<string>showCreateSyntaxMenuItem</string>
<string>spHistoryControllerInstance</string>
- <string>tabView</string>
<string>tableContentInstance</string>
<string>tableDataInstance</string>
<string>tableDocumentInstance</string>
@@ -9292,7 +9778,7 @@
<string>toolbarAddButton</string>
<string>toolbarReloadButton</string>
<string>truncateTableButton</string>
- <string>truncateTableContextButton</string>
+ <string>truncateTableContextMenuItem</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -9318,13 +9804,14 @@
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
<string>SPHistoryController</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
- <string>id</string>
<string>NSButton</string>
<string>id</string>
<string>NSSplitView</string>
@@ -9339,7 +9826,7 @@
<string>id</string>
<string>id</string>
<string>id</string>
- <string>id</string>
+ <string>NSMenuItem</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
@@ -9358,6 +9845,8 @@
<string>duplicateTableMenuItem</string>
<string>extendedTableInfoInstance</string>
<string>listFilterField</string>
+ <string>openTableInNewTabContextMenuItem</string>
+ <string>openTableInNewTabMenuItem</string>
<string>removeTableContextMenuItem</string>
<string>removeTableMenuItem</string>
<string>renameTableContextMenuItem</string>
@@ -9369,7 +9858,6 @@
<string>showCreateSyntaxContextMenuItem</string>
<string>showCreateSyntaxMenuItem</string>
<string>spHistoryControllerInstance</string>
- <string>tabView</string>
<string>tableContentInstance</string>
<string>tableDataInstance</string>
<string>tableDocumentInstance</string>
@@ -9389,7 +9877,7 @@
<string>toolbarAddButton</string>
<string>toolbarReloadButton</string>
<string>truncateTableButton</string>
- <string>truncateTableContextButton</string>
+ <string>truncateTableContextMenuItem</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -9442,6 +9930,14 @@
<string key="candidateClassName">NSSearchField</string>
</object>
<object class="IBToOneOutletInfo">
+ <string key="name">openTableInNewTabContextMenuItem</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">openTableInNewTabMenuItem</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo">
<string key="name">removeTableContextMenuItem</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
@@ -9486,10 +9982,6 @@
<string key="candidateClassName">SPHistoryController</string>
</object>
<object class="IBToOneOutletInfo">
- <string key="name">tabView</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBToOneOutletInfo">
<string key="name">tableContentInstance</string>
<string key="candidateClassName">id</string>
</object>
@@ -9566,8 +10058,8 @@
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
- <string key="name">truncateTableContextButton</string>
- <string key="candidateClassName">id</string>
+ <string key="name">truncateTableContextMenuItem</string>
+ <string key="candidateClassName">NSMenuItem</string>
</object>
</object>
</object>
@@ -9585,14 +10077,35 @@
<string key="className">SPTextView</string>
<string key="superclassName">NSTextView</string>
<object class="NSMutableDictionary" key="actions">
- <string key="NS.key.0">showMySQLHelpForCurrentWord:</string>
- <string key="NS.object.0">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>executeBundleItemForEditor:</string>
+ <string>showMySQLHelpForCurrentWord:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ </object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
- <string key="NS.key.0">showMySQLHelpForCurrentWord:</string>
- <object class="IBActionInfo" key="NS.object.0">
- <string key="name">showMySQLHelpForCurrentWord:</string>
- <string key="candidateClassName">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>executeBundleItemForEditor:</string>
+ <string>showMySQLHelpForCurrentWord:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">executeBundleItemForEditor:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">showMySQLHelpForCurrentWord:</string>
+ <string key="candidateClassName">id</string>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -10012,278 +10525,6 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">NSTextView</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>doDecomposedStringWithCanonicalMapping:</string>
- <string>doDecomposedStringWithCompatibilityMapping:</string>
- <string>doPrecomposedStringWithCanonicalMapping:</string>
- <string>doPrecomposedStringWithCompatibilityMapping:</string>
- <string>doRemoveDiacritics:</string>
- <string>doSelectionLowerCase:</string>
- <string>doSelectionTitleCase:</string>
- <string>doSelectionUpperCase:</string>
- <string>doTranspose:</string>
- <string>insertNULLvalue:</string>
- <string>jumpToSelection:</string>
- <string>moveSelectionLineDown:</string>
- <string>moveSelectionLineUp:</string>
- <string>selectCurrentLine:</string>
- <string>selectCurrentWord:</string>
- <string>selectEnclosingBrackets:</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>
- </object>
- </object>
- <object class="NSMutableDictionary" key="actionInfosByName">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>doDecomposedStringWithCanonicalMapping:</string>
- <string>doDecomposedStringWithCompatibilityMapping:</string>
- <string>doPrecomposedStringWithCanonicalMapping:</string>
- <string>doPrecomposedStringWithCompatibilityMapping:</string>
- <string>doRemoveDiacritics:</string>
- <string>doSelectionLowerCase:</string>
- <string>doSelectionTitleCase:</string>
- <string>doSelectionUpperCase:</string>
- <string>doTranspose:</string>
- <string>insertNULLvalue:</string>
- <string>jumpToSelection:</string>
- <string>moveSelectionLineDown:</string>
- <string>moveSelectionLineUp:</string>
- <string>selectCurrentLine:</string>
- <string>selectCurrentWord:</string>
- <string>selectEnclosingBrackets:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBActionInfo">
- <string key="name">doDecomposedStringWithCanonicalMapping:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">doDecomposedStringWithCompatibilityMapping:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">doPrecomposedStringWithCanonicalMapping:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">doPrecomposedStringWithCompatibilityMapping:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">doRemoveDiacritics:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">doSelectionLowerCase:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">doSelectionTitleCase:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">doSelectionUpperCase:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">doTranspose:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">insertNULLvalue:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">jumpToSelection:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">moveSelectionLineDown:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">moveSelectionLineUp:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">selectCurrentLine:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">selectCurrentWord:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">selectEnclosingBrackets:</string>
- <string key="candidateClassName">id</string>
- </object>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBDocumentRelativeSource</string>
- <string key="minorKey">../../Source/SPTextViewAdditions.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">SPAppController</string>
- <string key="superclassName">NSObject</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>donate:</string>
- <string>newTab:</string>
- <string>newWindow:</string>
- <string>openAboutPanel:</string>
- <string>openBundleEditor:</string>
- <string>openConnectionSheet:</string>
- <string>openPreferences:</string>
- <string>provideFeedback:</string>
- <string>provideTranslationFeedback:</string>
- <string>reloadBundles:</string>
- <string>viewKeyboardShortcuts:</string>
- <string>visitFAQWebsite:</string>
- <string>visitHelpWebsite:</string>
- <string>visitWebsite:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <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="actionInfosByName">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>donate:</string>
- <string>newTab:</string>
- <string>newWindow:</string>
- <string>openAboutPanel:</string>
- <string>openBundleEditor:</string>
- <string>openConnectionSheet:</string>
- <string>openPreferences:</string>
- <string>provideFeedback:</string>
- <string>provideTranslationFeedback:</string>
- <string>reloadBundles:</string>
- <string>viewKeyboardShortcuts:</string>
- <string>visitFAQWebsite:</string>
- <string>visitHelpWebsite:</string>
- <string>visitWebsite:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBActionInfo">
- <string key="name">donate:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">newTab:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">newWindow:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">openAboutPanel:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">openBundleEditor:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">openConnectionSheet:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">openPreferences:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">provideFeedback:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">provideTranslationFeedback:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">reloadBundles:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">viewKeyboardShortcuts:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">visitFAQWebsite:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">visitHelpWebsite:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">visitWebsite:</string>
- <string key="candidateClassName">id</string>
- </object>
- </object>
- </object>
- <object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">encodingPopUp</string>
- <string key="NS.object.0">id</string>
- </object>
- <object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <string key="NS.key.0">encodingPopUp</string>
- <object class="IBToOneOutletInfo" key="NS.object.0">
- <string key="name">encodingPopUp</string>
- <string key="candidateClassName">id</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBDocumentRelativeSource</string>
- <string key="minorKey">../../Source/SPAppController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">SUUpdater</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
@@ -10939,6 +11180,27 @@
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">ShortcutRecorder.framework/Headers/SRRecorderCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="849532927">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">ShortcutRecorder.framework/Headers/SRRecorderControl.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">ShortcutRecorder.framework/Headers/SRValidator.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Sparkle.framework/Headers/SUAppcast.h</string>
</object>
</object>
@@ -11306,6 +11568,22 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">SRRecorderControl</string>
+ <string key="superclassName">NSControl</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">delegate</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">delegate</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">delegate</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <reference key="sourceIdentifier" ref="849532927"/>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">SUUpdater</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
diff --git a/Resources/English.lproj/BundleEditor.strings b/Resources/English.lproj/BundleEditor.strings
index ad392fc9..07aa2356 100644
--- a/Resources/English.lproj/BundleEditor.strings
+++ b/Resources/English.lproj/BundleEditor.strings
Binary files differ
diff --git a/Resources/English.lproj/DBView.strings b/Resources/English.lproj/DBView.strings
index 5debfc9d..d3b1b5ee 100644
--- a/Resources/English.lproj/DBView.strings
+++ b/Resources/English.lproj/DBView.strings
Binary files differ
diff --git a/Resources/English.lproj/Localizable.strings b/Resources/English.lproj/Localizable.strings
index d1ccbaaf..9b8ab5cd 100644
--- a/Resources/English.lproj/Localizable.strings
+++ b/Resources/English.lproj/Localizable.strings
Binary files differ
diff --git a/Resources/English.lproj/MainMenu.strings b/Resources/English.lproj/MainMenu.strings
index 2f6542fc..7b4f37c1 100644
--- a/Resources/English.lproj/MainMenu.strings
+++ b/Resources/English.lproj/MainMenu.strings
Binary files differ
diff --git a/Source/SPAppController.h b/Source/SPAppController.h
index 3c18911e..35c9ee63 100644
--- a/Source/SPAppController.h
+++ b/Source/SPAppController.h
@@ -54,6 +54,7 @@
// Window management
- (IBAction)newWindow:(id)sender;
- (IBAction)newTab:(id)sender;
+- (IBAction)duplicateTab:(id)sender;
- (NSWindow *) frontDocumentWindow;
// IBAction methods
diff --git a/Source/SPAppController.m b/Source/SPAppController.m
index 534b3741..c5704f80 100644
--- a/Source/SPAppController.m
+++ b/Source/SPAppController.m
@@ -124,10 +124,14 @@
return NO;
}
- if([menuItem action] == @selector(newTab:))
+ if ([menuItem action] == @selector(newTab:))
{
return ([[self frontDocumentWindow] attachedSheet] == nil);
}
+ if ([menuItem action] == @selector(duplicateTab:))
+ {
+ return ([[self frontDocument] getConnection] != nil);
+ }
return YES;
}
@@ -319,7 +323,7 @@
[frontController addNewConnection:self];
}
- [[self frontDocument] initWithConnectionFile:filename];
+ [[self frontDocument] setStateFromConnectionFile:filename];
}
else if([[[filename pathExtension] lowercaseString] isEqualToString:[SPBundleFileExtension lowercaseString]]) {
@@ -418,7 +422,7 @@
[newWindowController addNewConnection:self];
[[self frontDocument] setIsSavedInBundle:isBundleFile];
- [[self frontDocument] initWithConnectionFile:fileName];
+ [[self frontDocument] setStateFromConnectionFile:fileName];
}
} else {
@@ -657,6 +661,35 @@
}
/**
+ * Duplicate the current connection tab
+ */
+- (IBAction)duplicateTab:(id)sender
+{
+ SPDatabaseDocument *theFrontDocument = [self frontDocument];
+ if (!theFrontDocument) return [self newTab:sender];
+
+ // Add a new tab to the window
+ if ([[self frontDocumentWindow] isMiniaturized]) [[self frontDocumentWindow] deminiaturize:self];
+ [[[self frontDocumentWindow] windowController] addNewConnection:self];
+
+ // Get the state of the previously-frontmost document
+ NSDictionary *allStateDetails = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithBool:YES], @"connection",
+ [NSNumber numberWithBool:YES], @"history",
+ [NSNumber numberWithBool:YES], @"session",
+ [NSNumber numberWithBool:YES], @"query",
+ [NSNumber numberWithBool:YES], @"password",
+ nil];
+ NSMutableDictionary *theFrontState = [NSMutableDictionary dictionaryWithDictionary:[theFrontDocument stateIncludingDetails:allStateDetails]];
+
+ // Ensure it's set to autoconnect
+ [theFrontState setObject:[NSNumber numberWithBool:YES] forKey:@"auto_connect"];
+
+ // Set the connection on the new tab
+ [[self frontDocument] setState:theFrontState];
+}
+
+/**
* Retrieve the frontmost document window; returns nil if not found.
*/
- (NSWindow *) frontDocumentWindow
diff --git a/Source/SPDatabaseDocument.h b/Source/SPDatabaseDocument.h
index 9563fd58..e4d12346 100644
--- a/Source/SPDatabaseDocument.h
+++ b/Source/SPDatabaseDocument.h
@@ -215,7 +215,6 @@
- (BOOL)couldCommitCurrentViewActions;
- (void)initQueryEditorWithString:(NSString *)query;
-- (void)initWithConnectionFile:(NSString *)path;
// Connection callback and methods
- (void)setConnection:(MCPConnection *)theConnection;
@@ -322,6 +321,7 @@
// Menu methods
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem;
+- (IBAction)openDatabaseInNewTab:(id)sender;
- (IBAction)saveConnectionSheet:(id)sender;
- (IBAction)import:(id)sender;
- (IBAction)importFromClipboard:(id)sender;
@@ -357,4 +357,9 @@
- (void)handleSchemeCommand:(NSDictionary*)commandDict;
- (NSDictionary*)shellVariables;
+// State saving and setting
+- (NSDictionary *) stateIncludingDetails:(NSDictionary *)detailsToReturn;
+- (BOOL)setState:(NSDictionary *)stateDetails;
+- (void)setStateFromConnectionFile:(NSString *)path;
+
@end
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 4e26a8c4..4626f031 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -246,403 +246,6 @@
}
/**
- * Initialise the document with the connection file at the supplied path.
- */
-- (void)initWithConnectionFile:(NSString *)path
-{
- NSError *readError = nil;
- NSString *convError = nil;
- NSPropertyListFormat format;
-
- NSString *encryptpw = nil;
- NSDictionary *data = nil;
- NSDictionary *connection = nil;
- NSDictionary *spf = nil;
-
- NSInteger connectionType = -1;
-
- [self updateWindowTitle:self];
-
- // Clean fields
- [connectionController setName:@""];
- [connectionController setUser:@""];
- [connectionController setHost:@""];
- [connectionController setPort:@""];
- [connectionController setSocket:@""];
- [connectionController setUseSSL:NSOffState];
- [connectionController setSslKeyFileLocationEnabled:NSOffState];
- [connectionController setSslKeyFileLocation:nil];
- [connectionController setSslCertificateFileLocationEnabled:NSOffState];
- [connectionController setSslCertificateFileLocation:nil];
- [connectionController setSslCACertFileLocationEnabled:NSOffState];
- [connectionController setSslCACertFileLocation:nil];
- [connectionController setSshHost:@""];
- [connectionController setSshUser:@""];
- [connectionController setSshKeyLocationEnabled:NSOffState];
- [connectionController setSshKeyLocation:nil];
- [connectionController setSshPort:@""];
- [connectionController setDatabase:@""];
- [connectionController setPassword:nil];
- [connectionController setSshPassword:nil];
-
- // Deselect all favorites
- [[connectionController valueForKeyPath:@"favoritesTable"] deselectAll:connectionController];
- // Suppress the possibility to choose an other connection from the favorites
- // if a connection should initialized by SPF file. Otherwise it could happen
- // that the SPF file runs out of sync.
- [[connectionController valueForKeyPath:@"favoritesTable"] setEnabled:NO];
-
-
- NSData *pData = [NSData dataWithContentsOfFile:path options:NSUncachedRead error:&readError];
-
- spf = [[NSPropertyListSerialization propertyListFromData:pData
- mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&convError] retain];
-
- if(!spf || readError != nil || [convError length] || !(format == NSPropertyListXMLFormat_v1_0 || format == NSPropertyListBinaryFormat_v1_0)) {
- NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading connection data file", @"error while reading connection data file")]
- defaultButton:NSLocalizedString(@"OK", @"OK button")
- alternateButton:nil
- otherButton:nil
- informativeTextWithFormat:NSLocalizedString(@"Connection data file couldn't be read.", @"error while reading connection data file")];
-
- [alert setAlertStyle:NSCriticalAlertStyle];
- [alert runModal];
- if (spf) [spf release];
- [self closeAndDisconnect];
- return;
- }
-
- // For dispatching later
- if(![[spf objectForKey:@"format"] isEqualToString:@"connection"]) {
- NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Warning", @"warning")]
- defaultButton:NSLocalizedString(@"OK", @"OK button")
- alternateButton:nil
- otherButton:nil
- informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"The chosen file “%@” contains ‘%@’ data.", @"message while reading a spf file which matches non-supported formats."), path, [spf objectForKey:@"format"]]];
-
- [alert setAlertStyle:NSWarningAlertStyle];
- [spf release];
- [self closeAndDisconnect];
- [alert runModal];
- return;
- }
-
- if(![spf objectForKey:@"data"]) {
- NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading connection data file", @"error while reading connection data file")]
- defaultButton:NSLocalizedString(@"OK", @"OK button")
- alternateButton:nil
- otherButton:nil
- informativeTextWithFormat:NSLocalizedString(@"No data found.", @"no data found")];
-
- [alert setAlertStyle:NSCriticalAlertStyle];
- [alert runModal];
- [spf release];
- [self closeAndDisconnect];
- return;
- }
-
- // Ask for a password if SPF file passwords were encrypted as sheet
- if([spf objectForKey:@"encrypted"] && [[spf valueForKey:@"encrypted"] boolValue]) {
-
- if([self isSaveInBundle] && [[[NSApp delegate] spfSessionDocData] objectForKey:@"e_string"]) {
- encryptpw = [[[NSApp delegate] spfSessionDocData] objectForKey:@"e_string"];
- } else {
- [inputTextWindowHeader setStringValue:NSLocalizedString(@"Connection file is encrypted", @"Connection file is encrypted")];
- [inputTextWindowMessage setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Please enter the password for ‘%@’:", @"Please enter the password"), ([self isSaveInBundle]) ? [[[[NSApp delegate] sessionURL] absoluteString] lastPathComponent] : [path lastPathComponent]]];
- [inputTextWindowSecureTextField setStringValue:@""];
- [inputTextWindowSecureTextField selectText:nil];
-
- [NSApp beginSheet:inputTextWindow modalForWindow:parentWindow modalDelegate:self didEndSelector:nil contextInfo:nil];
-
- // wait for encryption password
- NSModalSession session = [NSApp beginModalSessionForWindow:inputTextWindow];
- for (;;) {
-
- // Execute code on DefaultRunLoop
- [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
- beforeDate:[NSDate distantFuture]];
-
- // Break the run loop if editSheet was closed
- if ([NSApp runModalSession:session] != NSRunContinuesResponse
- || ![inputTextWindow isVisible])
- break;
-
- // Execute code on DefaultRunLoop
- [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
- beforeDate:[NSDate distantFuture]];
-
- }
- [NSApp endModalSession:session];
- [inputTextWindow orderOut:nil];
- [NSApp endSheet:inputTextWindow];
-
- if(passwordSheetReturnCode) {
- encryptpw = [inputTextWindowSecureTextField stringValue];
- if([self isSaveInBundle]) {
- NSMutableDictionary *spfSessionData = [NSMutableDictionary dictionary];
- [spfSessionData addEntriesFromDictionary:[[NSApp delegate] spfSessionDocData]];
- [spfSessionData setObject:encryptpw forKey:@"e_string"];
- [[NSApp delegate] setSpfSessionDocData:spfSessionData];
- }
- } else {
- [self closeAndDisconnect];
- [spf release];
- return;
- }
- }
- }
-
- if([[spf objectForKey:@"data"] isKindOfClass:[NSDictionary class]])
- data = [NSDictionary dictionaryWithDictionary:[spf objectForKey:@"data"]];
- else if([[spf objectForKey:@"data"] isKindOfClass:[NSData class]]) {
- NSData *decryptdata = nil;
- decryptdata = [[[NSMutableData alloc] initWithData:[(NSData *)[spf objectForKey:@"data"] dataDecryptedWithPassword:encryptpw]] autorelease];
- if(decryptdata != nil && [decryptdata length]) {
- NSKeyedUnarchiver *unarchiver = [[[NSKeyedUnarchiver alloc] initForReadingWithData:decryptdata] autorelease];
- data = (NSDictionary *)[unarchiver decodeObjectForKey:@"data"];
- [unarchiver finishDecoding];
- }
- if(data == nil) {
- NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading connection data file", @"error while reading connection data file")]
- defaultButton:NSLocalizedString(@"OK", @"OK button")
- alternateButton:nil
- otherButton:nil
- informativeTextWithFormat:NSLocalizedString(@"Wrong data format or password.", @"wrong data format or password")];
-
- [alert setAlertStyle:NSCriticalAlertStyle];
- [alert runModal];
- [self closeAndDisconnect];
- [spf release];
- return;
- }
- }
-
- if(data == nil) {
- NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading connection data file", @"error while reading connection data file")]
- defaultButton:NSLocalizedString(@"OK", @"OK button")
- alternateButton:nil
- otherButton:nil
- informativeTextWithFormat:NSLocalizedString(@"Wrong data format.", @"wrong data format")];
-
- [alert setAlertStyle:NSCriticalAlertStyle];
- [alert runModal];
- [self closeAndDisconnect];
- [spf release];
- return;
- }
-
-
- if(![data objectForKey:@"connection"]) {
- NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading connection data file", @"error while reading connection data file")]
- defaultButton:NSLocalizedString(@"OK", @"OK button")
- alternateButton:nil
- otherButton:nil
- informativeTextWithFormat:NSLocalizedString(@"No connection data found.", @"no connection data found")];
-
- [alert setAlertStyle:NSCriticalAlertStyle];
- [alert runModal];
- [self closeAndDisconnect];
- [spf release];
- return;
- }
-
- [spfDocData setObject:[NSNumber numberWithBool:NO] forKey:@"encrypted"];
- if(encryptpw != nil) {
- [spfDocData setObject:[NSNumber numberWithBool:YES] forKey:@"encrypted"];
- [spfDocData setObject:encryptpw forKey:@"e_string"];
- }
- encryptpw = nil;
-
- connection = [NSDictionary dictionaryWithDictionary:[data objectForKey:@"connection"]];
-
- if([connection objectForKey:@"type"]) {
- if([[connection objectForKey:@"type"] isEqualToString:@"SPTCPIPConnection"])
- connectionType = SPTCPIPConnection;
- else if([[connection objectForKey:@"type"] isEqualToString:@"SPSocketConnection"])
- connectionType = SPSocketConnection;
- else if([[connection objectForKey:@"type"] isEqualToString:@"SPSSHTunnelConnection"])
- connectionType = SPSSHTunnelConnection;
- else
- connectionType = SPTCPIPConnection;
-
- [connectionController setType:connectionType];
- [connectionController resizeTabViewToConnectionType:connectionType animating:NO];
- }
-
- if([connection objectForKey:@"name"])
- [connectionController setName:[connection objectForKey:@"name"]];
- if([connection objectForKey:@"user"])
- [connectionController setUser:[connection objectForKey:@"user"]];
- if([connection objectForKey:@"host"])
- [connectionController setHost:[connection objectForKey:@"host"]];
- if([connection objectForKey:@"port"])
- [connectionController setPort:[NSString stringWithFormat:@"%ld", (long)[[connection objectForKey:@"port"] integerValue]]];
-
- if([connection objectForKey:@"useSSL"])
- [connectionController setUseSSL:[[connection objectForKey:@"useSSL"] intValue]];
- if([connection objectForKey:@"sslKeyFileLocationEnabled"])
- [connectionController setSslKeyFileLocationEnabled:[[connection objectForKey:@"sslKeyFileLocationEnabled"] intValue]];
- if([connection objectForKey:@"sslKeyFileLocation"])
- [connectionController setSslKeyFileLocation:[connection objectForKey:@"sslKeyFileLocation"]];
- if([connection objectForKey:@"sslCertificateFileLocationEnabled"])
- [connectionController setSslCertificateFileLocationEnabled:[[connection objectForKey:@"sslCertificateFileLocationEnabled"] intValue]];
- if([connection objectForKey:@"sslCertificateFileLocation"])
- [connectionController setSslCertificateFileLocation:[connection objectForKey:@"sslCertificateFileLocation"]];
- if([connection objectForKey:@"sslCACertFileLocationEnabled"])
- [connectionController setSslCACertFileLocationEnabled:[[connection objectForKey:@"sslCACertFileLocationEnabled"] intValue]];
- if([connection objectForKey:@"sslCACertFileLocation"])
- [connectionController setSslCACertFileLocation:[connection objectForKey:@"sslCACertFileLocation"]];
-
- if([connection objectForKey:@"kcid"] && [(NSString *)[connection objectForKey:@"kcid"] length])
- [self setKeychainID:[connection objectForKey:@"kcid"]];
-
- // Set password - if not in SPF file try to get it via the KeyChain
- if([connection objectForKey:@"password"])
- [connectionController setPassword:[connection objectForKey:@"password"]];
- else {
- NSString *pw = [self keychainPasswordForConnection:nil];
- if(pw)
- [connectionController setPassword:pw];
- }
-
- if(connectionType == SPSocketConnection && [connection objectForKey:@"socket"])
- [connectionController setSocket:[connection objectForKey:@"socket"]];
-
- if(connectionType == SPSSHTunnelConnection) {
- if([connection objectForKey:@"ssh_host"])
- [connectionController setSshHost:[connection objectForKey:@"ssh_host"]];
- if([connection objectForKey:@"ssh_user"])
- [connectionController setSshUser:[connection objectForKey:@"ssh_user"]];
- if([connection objectForKey:@"ssh_keyLocationEnabled"])
- [connectionController setSshKeyLocationEnabled:[[connection objectForKey:@"ssh_keyLocationEnabled"] intValue]];
- if([connection objectForKey:@"ssh_keyLocation"])
- [connectionController setSshKeyLocation:[connection objectForKey:@"ssh_keyLocation"]];
- if([connection objectForKey:@"ssh_port"])
- [connectionController setSshPort:[NSString stringWithFormat:@"%ld", (long)[[connection objectForKey:@"ssh_port"] integerValue]]];
-
- // Set ssh password - if not in SPF file try to get it via the KeyChain
- if([connection objectForKey:@"ssh_password"])
- [connectionController setSshPassword:[connection objectForKey:@"ssh_password"]];
- else {
- NSString *sshpw = [self keychainPasswordForSSHConnection:nil];
- if(sshpw)
- [connectionController setSshPassword:sshpw];
- }
-
- }
-
- if([connection objectForKey:@"database"])
- [connectionController setDatabase:[connection objectForKey:@"database"]];
-
- if([data objectForKey:@"session"]) {
- spfSession = [[NSDictionary dictionaryWithDictionary:[data objectForKey:@"session"]] retain];
- [spfDocData setObject:[NSNumber numberWithBool:YES] forKey:@"include_session"];
- }
-
- if(![self isSaveInBundle]) {
- [self setFileURL:[NSURL fileURLWithPath:path]];
- [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:path]];
- }
-
- if([spf objectForKey:SPQueryFavorites])
- [spfPreferences setObject:[spf objectForKey:SPQueryFavorites] forKey:SPQueryFavorites];
- if([spf objectForKey:SPQueryHistory])
- [spfPreferences setObject:[spf objectForKey:SPQueryHistory] forKey:SPQueryHistory];
- if([spf objectForKey:SPContentFilters])
- [spfPreferences setObject:[spf objectForKey:SPContentFilters] forKey:SPContentFilters];
-
- [spfDocData setObject:[NSNumber numberWithBool:([connection objectForKey:@"password"]) ? YES : NO] forKey:@"save_password"];
-
- [spfDocData setObject:[NSNumber numberWithBool:NO] forKey:@"auto_connect"];
-
- [connectionController updateSSLInterface:self];
-
- if([spf objectForKey:@"auto_connect"] && [[spf valueForKey:@"auto_connect"] boolValue]) {
- [spfDocData setObject:[NSNumber numberWithBool:YES] forKey:@"auto_connect"];
- [connectionController initiateConnection:self];
- }
- [spf release];
-}
-
-/**
- * Restore session from SPF file if given
- */
-- (void)restoreSession
-{
- NSAutoreleasePool *taskPool = [[NSAutoreleasePool alloc] init];
-
- // Check and set the table
- NSArray *tables = [tablesListInstance tables];
-
- BOOL isSelectedTableDefined = YES;
-
- if([tables indexOfObject:[spfSession objectForKey:@"table"]] == NSNotFound) {
- isSelectedTableDefined = NO;
- }
-
- // Restore toolbar setting
- if([spfSession objectForKey:@"isToolbarVisible"])
- [mainToolbar setVisible:[[spfSession objectForKey:@"isToolbarVisible"] boolValue]];
-
- // Reset database view encoding if differs from default
- if([spfSession objectForKey:@"connectionEncoding"] && ![[mySQLConnection encoding] isEqualToString:[spfSession objectForKey:@"connectionEncoding"]])
- [self setConnectionEncoding:[spfSession objectForKey:@"connectionEncoding"] reloadingViews:YES];
-
- if(isSelectedTableDefined) {
- // Set table content details for restore
- if([spfSession objectForKey:@"contentSortCol"])
- [tableContentInstance setSortColumnNameToRestore:[spfSession objectForKey:@"contentSortCol"] isAscending:[[spfSession objectForKey:@"contentSortCol"] boolValue]];
- if([spfSession objectForKey:@"contentPageNumber"])
- [tableContentInstance setPageToRestore:[[spfSession objectForKey:@"pageNumber"] integerValue]];
- if([spfSession objectForKey:@"contentViewport"])
- [tableContentInstance setViewportToRestore:NSRectFromString([spfSession objectForKey:@"contentViewport"])];
- if([spfSession objectForKey:@"contentFilter"])
- [tableContentInstance setFiltersToRestore:[spfSession objectForKey:@"contentFilter"]];
-
- // Select table
- [tablesListInstance selectTableAtIndex:[NSNumber numberWithInteger:[tables indexOfObject:[spfSession objectForKey:@"table"]]]];
-
- // TODO up to now it doesn't work
- if([spfSession objectForKey:@"contentSelectedIndexSet"]) {
- NSMutableIndexSet *anIndexSet = [NSMutableIndexSet indexSet];
- NSArray *items = [spfSession objectForKey:@"contentSelectedIndexSet"];
- NSUInteger i;
- for(i=0; i<[items count]; i++)
- [anIndexSet addIndex:(NSUInteger)NSArrayObjectAtIndex(items, i)];
-
- [tableContentInstance setSelectedRowIndexesToRestore:anIndexSet];
- }
-
- [[tablesListInstance valueForKeyPath:@"tablesListView"] scrollRowToVisible:[tables indexOfObject:[spfSession objectForKey:@"selectedTable"]]];
-
- }
-
- // Select view
- if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_STRUCTURE"])
- [self viewStructure:self];
- else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_CONTENT"])
- [self viewContent:self];
- else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_CUSTOMQUERY"])
- [self viewQuery:self];
- else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_STATUS"])
- [self viewStatus:self];
- else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_RELATIONS"])
- [self viewRelations:self];
- else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_TRIGGERS"])
- [self viewTriggers:self];
-
- [self updateWindowTitle:self];
-
- // dealloc spfSession data
- [spfSession release];
- spfSession = nil;
-
- // End the task
- [self endTask];
- [taskPool drain];
-}
-
-/**
* Set the return code for entering the encryption passowrd sheet
*/
- (IBAction)closePasswordSheet:(id)sender
@@ -2556,7 +2159,7 @@
{
[[NSApp delegate] newWindow:self];
SPDatabaseDocument *newTableDocument = [[NSApp delegate] frontDocument];
- [newTableDocument initWithConnectionFile:[[self fileURL] path]];
+ [newTableDocument setStateFromConnectionFile:[[self fileURL] path]];
}
/**
@@ -3297,182 +2900,72 @@
}
- NSString *aString;
-
- NSMutableDictionary *spfdata = [NSMutableDictionary dictionary];
- NSMutableDictionary *connection = [NSMutableDictionary dictionary];
- NSMutableDictionary *session = nil;
- NSMutableDictionary *data = [NSMutableDictionary dictionary];
+ // Set up the dictionary to save to file, together with a data store
+ NSMutableDictionary *spfStructure = [NSMutableDictionary dictionary];
+ NSMutableDictionary *spfData = [NSMutableDictionary dictionary];
- NSIndexSet *contentSelectedIndexSet = [tableContentInstance selectedRowIndexes];
-
- [spfdata setObject:[NSNumber numberWithInteger:1] forKey:@"version"];
- [spfdata setObject:@"connection" forKey:@"format"];
- [spfdata setObject:@"mysql" forKey:@"rdbms_type"];
+ // Add basic details
+ [spfStructure setObject:[NSNumber numberWithInteger:1] forKey:@"version"];
+ [spfStructure setObject:@"connection" forKey:@"format"];
+ [spfStructure setObject:@"mysql" forKey:@"rdbms_type"];
if([self mySQLVersion])
- [spfdata setObject:[self mySQLVersion] forKey:@"rdbms_version"];
-
- // Store the preferences - take them from the current document URL to catch renaming
- [spfdata setObject:[[SPQueryController sharedQueryController] favoritesForFileURL:[self fileURL]] forKey:SPQueryFavorites];
- [spfdata setObject:[[SPQueryController sharedQueryController] historyForFileURL:[self fileURL]] forKey:SPQueryHistory];
- [spfdata setObject:[[SPQueryController sharedQueryController] contentFilterForFileURL:[self fileURL]] forKey:SPContentFilters];
-
- [spfdata setObject:[spfDocData_temp objectForKey:@"encrypted"] forKey:@"encrypted"];
-
- [spfdata setObject:[spfDocData_temp objectForKey:@"auto_connect"] forKey:@"auto_connect"];
-
- if([[self keyChainID] length])
- [connection setObject:[self keyChainID] forKey:@"kcid"];
- [connection setObject:[self name] forKey:@"name"];
- [connection setObject:[self host] forKey:@"host"];
- [connection setObject:[self user] forKey:@"user"];
-
- [connection setObject:[NSNumber numberWithInt:[connectionController useSSL]] forKey:@"useSSL"];
- [connection setObject:[NSNumber numberWithInt:[connectionController sslKeyFileLocationEnabled]] forKey:@"sslKeyFileLocationEnabled"];
- [connection setObject:[connectionController sslKeyFileLocation] forKey:@"sslKeyFileLocation"];
- [connection setObject:[NSNumber numberWithInt:[connectionController sslCertificateFileLocationEnabled]] forKey:@"sslCertificateFileLocationEnabled"];
- [connection setObject:[connectionController sslCertificateFileLocation] forKey:@"sslCertificateFileLocation"];
- [connection setObject:[NSNumber numberWithInt:[connectionController sslCACertFileLocationEnabled]] forKey:@"sslCACertFileLocationEnabled"];
- [connection setObject:[connectionController sslCACertFileLocation] forKey:@"sslCACertFileLocation"];
+ [spfStructure setObject:[self mySQLVersion] forKey:@"rdbms_version"];
- switch([connectionController type]) {
- case SPTCPIPConnection:
- aString = @"SPTCPIPConnection";
- break;
- case SPSocketConnection:
- aString = @"SPSocketConnection";
- if ([connectionController socket] && [[connectionController socket] length]) [connection setObject:[connectionController socket] forKey:@"socket"];
- break;
- case SPSSHTunnelConnection:
- aString = @"SPSSHTunnelConnection";
- [connection setObject:[connectionController sshHost] forKey:@"ssh_host"];
- [connection setObject:[connectionController sshUser] forKey:@"ssh_user"];
- [connection setObject:[NSNumber numberWithInt:[connectionController sshKeyLocationEnabled]] forKey:@"ssh_keyLocationEnabled"];
- [connection setObject:[connectionController sshKeyLocation] forKey:@"ssh_keyLocation"];
- if([connectionController sshPort] && [[connectionController sshPort] length])
- [connection setObject:[NSNumber numberWithInteger:[[connectionController sshPort] integerValue]] forKey:@"ssh_port"];
- break;
- default:
- aString = @"SPTCPIPConnection";
- }
- [connection setObject:aString forKey:@"type"];
+ // Add auto-connect if appropriate
+ [spfStructure setObject:[spfDocData_temp objectForKey:@"auto_connect"] forKey:@"auto_connect"];
- if([[spfDocData_temp objectForKey:@"save_password"] boolValue]) {
-
- NSString *pw = [self keychainPasswordForConnection:nil];
- if(![pw length]) pw = [connectionController password];
- if (pw)
- [connection setObject:pw forKey:@"password"];
- else
- [connection setObject:@"" forKey:@"password"];
-
- if([connectionController type] == SPSSHTunnelConnection) {
- NSString *sshpw = [self keychainPasswordForSSHConnection:nil];
- if(![sshpw length]) sshpw = [connectionController sshPassword];
- if (sshpw)
- [connection setObject:sshpw forKey:@"ssh_password"];
- else
- [connection setObject:@"" forKey:@"ssh_password"];
- }
- }
-
- if([connectionController port] && [[connectionController port] length])
- [connection setObject:[NSNumber numberWithInteger:[[connectionController port] integerValue]] forKey:@"port"];
-
- if([[self database] length])
- [connection setObject:[self database] forKey:@"database"];
+ // Set up the document details to store
+ NSMutableDictionary *stateDetailsToSave = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithBool:YES], @"connection",
+ [NSNumber numberWithBool:YES], @"history",
+ nil];
// Include session data like selected table, view etc. ?
- if([[spfDocData_temp objectForKey:@"include_session"] boolValue]) {
-
- session = [NSMutableDictionary dictionary];
-
- if([[self table] length])
- [session setObject:[self table] forKey:@"table"];
- if([tableContentInstance sortColumnName])
- [session setObject:[tableContentInstance sortColumnName] forKey:@"contentSortCol"];
-
- switch([spHistoryControllerInstance currentlySelectedView]){
- case SPTableViewStructure:
- aString = @"SP_VIEW_STRUCTURE";
- break;
- case SPTableViewContent:
- aString = @"SP_VIEW_CONTENT";
- break;
- case SPTableViewCustomQuery:
- aString = @"SP_VIEW_CUSTOMQUERY";
- break;
- case SPTableViewStatus:
- aString = @"SP_VIEW_STATUS";
- break;
- case SPTableViewRelations:
- aString = @"SP_VIEW_RELATIONS";
- break;
- case SPTableViewTriggers:
- aString = @"SP_VIEW_TRIGGERS";
- break;
- default:
- aString = @"SP_VIEW_STRUCTURE";
- }
- [session setObject:aString forKey:@"view"];
-
- [session setObject:[NSNumber numberWithBool:[[parentWindow toolbar] isVisible]] forKey:@"isToolbarVisible"];
- [session setObject:[mySQLConnection encoding] forKey:@"connectionEncoding"];
-
- [session setObject:[NSNumber numberWithBool:[tableContentInstance sortColumnIsAscending]] forKey:@"contentSortColIsAsc"];
- [session setObject:[NSNumber numberWithInteger:[tableContentInstance pageNumber]] forKey:@"contentPageNumber"];
- [session setObject:[NSNumber numberWithFloat:[tableContentInstance tablesListWidth]] forKey:@"windowVerticalDividerPosition"];
- [session setObject:NSStringFromRect([tableContentInstance viewport]) forKey:@"contentViewport"];
- if([tableContentInstance filterSettings])
- [session setObject:[tableContentInstance filterSettings] forKey:@"contentFilter"];
-
- if (contentSelectedIndexSet && [contentSelectedIndexSet count]) {
- NSMutableArray *indices = [NSMutableArray array];
- NSUInteger indexBuffer[[contentSelectedIndexSet count]];
- NSUInteger limit = [contentSelectedIndexSet getIndexes:indexBuffer maxCount:[contentSelectedIndexSet count] inIndexRange:NULL];
- NSUInteger idx;
- for (idx = 0; idx < limit; idx++) {
- [indices addObject:[NSNumber numberWithInteger:indexBuffer[idx]]];
- }
- [session setObject:indices forKey:@"contentSelectedIndexSet"];
- }
- }
-
- if([[spfDocData_temp objectForKey:@"save_editor_content"] boolValue]) {
- if(session == nil)
- session = [NSMutableDictionary dictionary];
-
- if([[[[customQueryInstance valueForKeyPath:@"textView"] textStorage] string] length] > 50000)
- [session setObject:[[[[[customQueryInstance valueForKeyPath:@"textView"] textStorage] string] dataUsingEncoding:NSUTF8StringEncoding] compress] forKey:@"queries"];
- else
- [session setObject:[[[customQueryInstance valueForKeyPath:@"textView"] textStorage] string] forKey:@"queries"];
- }
-
- [data setObject:connection forKey:@"connection"];
- if(session != nil)
- [data setObject:session forKey:@"session"];
-
- if(![[spfDocData_temp objectForKey:@"encrypted"] boolValue]) {
- [spfdata setObject:data forKey:@"data"];
+ if ([[spfDocData_temp objectForKey:@"include_session"] boolValue])
+ [stateDetailsToSave setObject:[NSNumber numberWithBool:YES] forKey:@"session"];
+
+ // Include the query editor contents if asked to
+ if ([[spfDocData_temp objectForKey:@"save_editor_content"] boolValue]) {
+ [stateDetailsToSave setObject:[NSNumber numberWithBool:YES] forKey:@"query"];
+ [stateDetailsToSave setObject:[NSNumber numberWithBool:YES] forKey:@"enablecompression"];
+ }
+
+ // Add passwords if asked to
+ if ([[spfDocData_temp objectForKey:@"save_password"] boolValue])
+ [stateDetailsToSave setObject:[NSNumber numberWithBool:YES] forKey:@"password"];
+
+ // Retrieve details and add to the appropriate dictionaries
+ NSMutableDictionary *stateDetails = [NSMutableDictionary dictionaryWithDictionary:[self stateIncludingDetails:stateDetailsToSave]];
+ [spfStructure setObject:[stateDetails objectForKey:SPQueryFavorites] forKey:SPQueryFavorites];
+ [spfStructure setObject:[stateDetails objectForKey:SPQueryHistory] forKey:SPQueryHistory];
+ [spfStructure setObject:[stateDetails objectForKey:SPContentFilters] forKey:SPContentFilters];
+ [stateDetails removeObjectsForKeys:[NSArray arrayWithObjects:SPQueryFavorites, SPQueryHistory, SPContentFilters, nil]];
+ [spfData addEntriesFromDictionary:stateDetails];
+
+ // Determine whether to use encryption when adding the data
+ [spfStructure setObject:[spfDocData_temp objectForKey:@"encrypted"] forKey:@"encrypted"];
+ if (![[spfDocData_temp objectForKey:@"encrypted"] boolValue]) {
+ [spfStructure setObject:spfData forKey:@"data"];
} else {
- NSMutableData *encryptdata = [[[NSMutableData alloc] init] autorelease];
- NSKeyedArchiver *archiver = [[[NSKeyedArchiver alloc] initForWritingWithMutableData:encryptdata] autorelease];
- [archiver encodeObject:data forKey:@"data"];
+ NSMutableData *dataToEncrypt = [[[NSMutableData alloc] init] autorelease];
+ NSKeyedArchiver *archiver = [[[NSKeyedArchiver alloc] initForWritingWithMutableData:dataToEncrypt] autorelease];
+ [archiver encodeObject:spfData forKey:@"data"];
[archiver finishEncoding];
- [spfdata setObject:[encryptdata dataEncryptedWithPassword:[spfDocData_temp objectForKey:@"e_string"]] forKey:@"data"];
+ [spfStructure setObject:[dataToEncrypt dataEncryptedWithPassword:[spfDocData_temp objectForKey:@"e_string"]] forKey:@"data"];
}
+ // Convert to plist
NSString *err = nil;
- NSData *plist = [NSPropertyListSerialization dataFromPropertyList:spfdata
- format:NSPropertyListXMLFormat_v1_0
- errorDescription:&err];
+ NSData *plist = [NSPropertyListSerialization dataFromPropertyList:spfStructure
+ format:NSPropertyListXMLFormat_v1_0
+ errorDescription:&err];
- if(err != nil) {
+ if (err != nil) {
NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while converting connection data", @"error while converting connection data")]
defaultButton:NSLocalizedString(@"OK", @"OK button")
alternateButton:nil
- otherButton:nil
- informativeTextWithFormat:err];
+ otherButton:nil
+ informativeTextWithFormat:err];
[alert setAlertStyle:NSCriticalAlertStyle];
[alert runModal];
@@ -3481,18 +2974,18 @@
NSError *error = nil;
[plist writeToFile:fileName options:NSAtomicWrite error:&error];
- if(error != nil){
+ if (error != nil){
NSAlert *errorAlert = [NSAlert alertWithError:error];
[errorAlert runModal];
return NO;
}
- if(contextInfo == nil) {
+ if (contextInfo == nil) {
// Register and update query favorites, content filter, and history for the (new) file URL
NSMutableDictionary *preferences = [[NSMutableDictionary alloc] init];
- [preferences setObject:[spfdata objectForKey:SPQueryHistory] forKey:SPQueryHistory];
- [preferences setObject:[spfdata objectForKey:SPQueryFavorites] forKey:SPQueryFavorites];
- [preferences setObject:[spfdata objectForKey:SPContentFilters] forKey:SPContentFilters];
+ [preferences setObject:[spfStructure objectForKey:SPQueryHistory] forKey:SPQueryHistory];
+ [preferences setObject:[spfStructure objectForKey:SPQueryFavorites] forKey:SPQueryFavorites];
+ [preferences setObject:[spfStructure objectForKey:SPContentFilters] forKey:SPContentFilters];
[[SPQueryController sharedQueryController] registerDocumentWithFileURL:[NSURL fileURLWithPath:fileName] andContextInfo:preferences];
[self setFileURL:[NSURL fileURLWithPath:fileName]];
@@ -3512,6 +3005,35 @@
}
/**
+ * Open the currently selected database in a new tab, clearing any table selection.
+ */
+- (IBAction)openDatabaseInNewTab:(id)sender
+{
+
+ // Add a new tab to the window
+ [[parentWindow windowController] addNewConnection:self];
+
+ // Get the current state
+ NSDictionary *allStateDetails = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithBool:YES], @"connection",
+ [NSNumber numberWithBool:YES], @"history",
+ [NSNumber numberWithBool:YES], @"session",
+ [NSNumber numberWithBool:YES], @"query",
+ [NSNumber numberWithBool:YES], @"password",
+ nil];
+ NSMutableDictionary *currentState = [NSMutableDictionary dictionaryWithDictionary:[self stateIncludingDetails:allStateDetails]];
+
+ // Ensure it's set to autoconnect, and clear the table
+ [currentState setObject:[NSNumber numberWithBool:YES] forKey:@"auto_connect"];
+ NSMutableDictionary *sessionDict = [NSMutableDictionary dictionaryWithDictionary:[currentState objectForKey:@"session"]];
+ [sessionDict removeObjectForKey:@"table"];
+ [currentState setObject:sessionDict forKey:@"session"];
+
+ // Set the connection on the new tab
+ [[[NSApp delegate] frontDocument] setState:currentState];
+}
+
+/**
* Passes the request to the dataImport object
*/
- (IBAction)import:(id)sender
@@ -3594,10 +3116,11 @@
}
}
- if ([menuItem action] == @selector(import:) ||
- [menuItem action] == @selector(removeDatabase:) ||
- [menuItem action] == @selector(copyDatabase:) ||
- [menuItem action] == @selector(renameDatabase:) ||
+ if ([menuItem action] == @selector(import:) ||
+ [menuItem action] == @selector(removeDatabase:) ||
+ [menuItem action] == @selector(copyDatabase:) ||
+ [menuItem action] == @selector(renameDatabase:) ||
+ [menuItem action] == @selector(openDatabaseInNewTab:) ||
[menuItem action] == @selector(refreshTables:))
{
return ([self database] != nil);
@@ -4355,6 +3878,611 @@
}
#pragma mark -
+#pragma mark State saving and setting
+
+/**
+ * Retrieve the current database document state for saving. A supplied dictionary
+ * determines the level of detail that is required, with the following optional keys:
+ * - connection: Connection settings (with keychain references where available) and database
+ * - password: Whether to include passwords in the returned connection details
+ * - session: Selected table and view, together with content view filter, sort, scroll position
+ * - history: query history, per-doc query favourites, and per-doc content filters
+ * - query: custom query editor content
+ * - enablecompression: large (>50k) custom query editor contents will be stored as compressed data
+ * If none of these are supplied, nil will be returned.
+ */
+- (NSDictionary *) stateIncludingDetails:(NSDictionary *)detailsToReturn
+{
+ BOOL returnConnection = [[detailsToReturn objectForKey:@"connection"] boolValue];
+ BOOL includePasswords = [[detailsToReturn objectForKey:@"password"] boolValue];
+ BOOL returnSession = [[detailsToReturn objectForKey:@"session"] boolValue];
+ BOOL returnHistory = [[detailsToReturn objectForKey:@"history"] boolValue];
+ BOOL returnQuery = [[detailsToReturn objectForKey:@"query"] boolValue];
+
+ if (!returnConnection && !returnSession && !returnHistory && !returnQuery) return nil;
+ NSMutableDictionary *stateDetails = [NSMutableDictionary dictionary];
+
+ // Add connection details
+ if (returnConnection) {
+ NSMutableDictionary *connection = [NSMutableDictionary dictionary];
+
+ [connection setObject:@"mysql" forKey:@"rdbms_type"];
+
+ NSString *connectionType;
+ switch ([connectionController type]) {
+ case SPTCPIPConnection:
+ connectionType = @"SPTCPIPConnection";
+ break;
+ case SPSocketConnection:
+ connectionType = @"SPSocketConnection";
+ if ([connectionController socket] && [[connectionController socket] length]) [connection setObject:[connectionController socket] forKey:@"socket"];
+ break;
+ case SPSSHTunnelConnection:
+ connectionType = @"SPSSHTunnelConnection";
+ [connection setObject:[connectionController sshHost] forKey:@"ssh_host"];
+ [connection setObject:[connectionController sshUser] forKey:@"ssh_user"];
+ [connection setObject:[NSNumber numberWithInt:[connectionController sshKeyLocationEnabled]] forKey:@"ssh_keyLocationEnabled"];
+ [connection setObject:[connectionController sshKeyLocation] forKey:@"ssh_keyLocation"];
+ if ([connectionController sshPort] && [[connectionController sshPort] length])
+ [connection setObject:[NSNumber numberWithInteger:[[connectionController sshPort] integerValue]] forKey:@"ssh_port"];
+ break;
+ default:
+ connectionType = @"SPTCPIPConnection";
+ }
+ [connection setObject:connectionType forKey:@"type"];
+
+ if ([[self keyChainID] length]) [connection setObject:[self keyChainID] forKey:@"kcid"];
+ [connection setObject:[self name] forKey:@"name"];
+ [connection setObject:[self host] forKey:@"host"];
+ [connection setObject:[self user] forKey:@"user"];
+ if([connectionController port] && [[connectionController port] length])
+ [connection setObject:[NSNumber numberWithInteger:[[connectionController port] integerValue]] forKey:@"port"];
+ if([[self database] length])
+ [connection setObject:[self database] forKey:@"database"];
+
+ if (includePasswords) {
+ NSString *pw = [self keychainPasswordForConnection:nil];
+ if (![pw length]) pw = [connectionController password];
+ if (pw)
+ [connection setObject:pw forKey:@"password"];
+ else
+ [connection setObject:@"" forKey:@"password"];
+
+ if ([connectionController type] == SPSSHTunnelConnection) {
+ NSString *sshpw = [self keychainPasswordForSSHConnection:nil];
+ if(![sshpw length]) sshpw = [connectionController sshPassword];
+ if (sshpw)
+ [connection setObject:sshpw forKey:@"ssh_password"];
+ else
+ [connection setObject:@"" forKey:@"ssh_password"];
+ }
+ }
+
+ [connection setObject:[NSNumber numberWithInt:[connectionController useSSL]] forKey:@"useSSL"];
+ [connection setObject:[NSNumber numberWithInt:[connectionController sslKeyFileLocationEnabled]] forKey:@"sslKeyFileLocationEnabled"];
+ [connection setObject:[connectionController sslKeyFileLocation] forKey:@"sslKeyFileLocation"];
+ [connection setObject:[NSNumber numberWithInt:[connectionController sslCertificateFileLocationEnabled]] forKey:@"sslCertificateFileLocationEnabled"];
+ [connection setObject:[connectionController sslCertificateFileLocation] forKey:@"sslCertificateFileLocation"];
+ [connection setObject:[NSNumber numberWithInt:[connectionController sslCACertFileLocationEnabled]] forKey:@"sslCACertFileLocationEnabled"];
+ [connection setObject:[connectionController sslCACertFileLocation] forKey:@"sslCACertFileLocation"];
+
+ [stateDetails setObject:[NSDictionary dictionaryWithDictionary:connection] forKey:@"connection"];
+ }
+
+ // Add document-specific saved settings
+ if (returnHistory) {
+ [stateDetails setObject:[[SPQueryController sharedQueryController] favoritesForFileURL:[self fileURL]] forKey:SPQueryFavorites];
+ [stateDetails setObject:[[SPQueryController sharedQueryController] historyForFileURL:[self fileURL]] forKey:SPQueryHistory];
+ [stateDetails setObject:[[SPQueryController sharedQueryController] contentFilterForFileURL:[self fileURL]] forKey:SPContentFilters];
+ }
+
+ // Set up a session state dictionary for either state or custom query
+ NSMutableDictionary *sessionState = [NSMutableDictionary dictionary];
+
+ // Store session state if appropriate
+ if (returnSession) {
+
+ if ([[self table] length])
+ [sessionState setObject:[self table] forKey:@"table"];
+
+ NSString *currentlySelectedViewName;
+ switch ([spHistoryControllerInstance currentlySelectedView]) {
+ case SPTableViewStructure:
+ currentlySelectedViewName = @"SP_VIEW_STRUCTURE";
+ break;
+ case SPTableViewContent:
+ currentlySelectedViewName = @"SP_VIEW_CONTENT";
+ break;
+ case SPTableViewCustomQuery:
+ currentlySelectedViewName = @"SP_VIEW_CUSTOMQUERY";
+ break;
+ case SPTableViewStatus:
+ currentlySelectedViewName = @"SP_VIEW_STATUS";
+ break;
+ case SPTableViewRelations:
+ currentlySelectedViewName = @"SP_VIEW_RELATIONS";
+ break;
+ case SPTableViewTriggers:
+ currentlySelectedViewName = @"SP_VIEW_TRIGGERS";
+ break;
+ default:
+ currentlySelectedViewName = @"SP_VIEW_STRUCTURE";
+ }
+ [sessionState setObject:currentlySelectedViewName forKey:@"view"];
+
+ [sessionState setObject:[mySQLConnection encoding] forKey:@"connectionEncoding"];
+
+ [sessionState setObject:[NSNumber numberWithBool:[[parentWindow toolbar] isVisible]] forKey:@"isToolbarVisible"];
+ [sessionState setObject:[NSNumber numberWithFloat:[tableContentInstance tablesListWidth]] forKey:@"windowVerticalDividerPosition"];
+
+ if ([tableContentInstance sortColumnName])
+ [sessionState setObject:[tableContentInstance sortColumnName] forKey:@"contentSortCol"];
+ [sessionState setObject:[NSNumber numberWithBool:[tableContentInstance sortColumnIsAscending]] forKey:@"contentSortColIsAsc"];
+ [sessionState setObject:[NSNumber numberWithInteger:[tableContentInstance pageNumber]] forKey:@"contentPageNumber"];
+ [sessionState setObject:NSStringFromRect([tableContentInstance viewport]) forKey:@"contentViewport"];
+ if ([tableContentInstance filterSettings])
+ [sessionState setObject:[tableContentInstance filterSettings] forKey:@"contentFilter"];
+
+ NSIndexSet *contentSelectedIndexSet = [tableContentInstance selectedRowIndexes];
+ if (contentSelectedIndexSet && [contentSelectedIndexSet count]) {
+ NSMutableArray *indices = [NSMutableArray array];
+ NSUInteger indexBuffer[[contentSelectedIndexSet count]];
+ NSUInteger limit = [contentSelectedIndexSet getIndexes:indexBuffer maxCount:[contentSelectedIndexSet count] inIndexRange:NULL];
+ NSUInteger idx;
+ for (idx = 0; idx < limit; idx++) {
+ [indices addObject:[NSNumber numberWithInteger:indexBuffer[idx]]];
+ }
+ [sessionState setObject:indices forKey:@"contentSelectedIndexSet"];
+ }
+ }
+
+ // Add the custom query editor content if appropriate
+ if (returnQuery) {
+ NSString *queryString = [[[customQueryInstance valueForKeyPath:@"textView"] textStorage] string];
+ if ([[detailsToReturn objectForKey:@"enablecompression"] boolValue] && [queryString length] > 50000) {
+ [sessionState setObject:[[queryString dataUsingEncoding:NSUTF8StringEncoding] compress] forKey:@"queries"];
+ } else {
+ [sessionState setObject:queryString forKey:@"queries"];
+ }
+ }
+
+ // Store the session state dictionary if either state or custom queries were saved
+ if ([sessionState count])
+ [stateDetails setObject:[NSDictionary dictionaryWithDictionary:sessionState] forKey:@"session"];
+
+ return stateDetails;
+}
+
+/**
+ * Set the state of the document to the supplied dictionary, which should
+ * at least contain a "connection" dictionary of details.
+ * Returns whether the state was set successfully.
+ */
+- (BOOL)setState:(NSDictionary *)stateDetails
+{
+ NSDictionary *connection = nil;
+ NSInteger connectionType = -1;
+
+ // If this document already has a connection, don't proceed.
+ if (mySQLConnection) return NO;
+
+ // Load the connection data from the state dictionary
+ connection = [NSDictionary dictionaryWithDictionary:[stateDetails objectForKey:@"connection"]];
+ if (!connection) return NO;
+
+ [self updateWindowTitle:self];
+
+ // Deselect all favorites on the connection controller
+ [[connectionController valueForKeyPath:@"favoritesTable"] deselectAll:connectionController];
+
+ // Suppress the possibility to choose an other connection from the favorites
+ // if a connection should initialized by SPF file. Otherwise it could happen
+ // that the SPF file runs out of sync.
+ [[connectionController valueForKeyPath:@"favoritesTable"] setEnabled:NO];
+
+ // Ensure the connection controller is set to a blank slate
+ [connectionController setName:@""];
+ [connectionController setUser:@""];
+ [connectionController setHost:@""];
+ [connectionController setPort:@""];
+ [connectionController setSocket:@""];
+ [connectionController setUseSSL:NSOffState];
+ [connectionController setSslKeyFileLocationEnabled:NSOffState];
+ [connectionController setSslKeyFileLocation:nil];
+ [connectionController setSslCertificateFileLocationEnabled:NSOffState];
+ [connectionController setSslCertificateFileLocation:nil];
+ [connectionController setSslCACertFileLocationEnabled:NSOffState];
+ [connectionController setSslCACertFileLocation:nil];
+ [connectionController setSshHost:@""];
+ [connectionController setSshUser:@""];
+ [connectionController setSshKeyLocationEnabled:NSOffState];
+ [connectionController setSshKeyLocation:nil];
+ [connectionController setSshPort:@""];
+ [connectionController setDatabase:@""];
+ [connectionController setPassword:nil];
+ [connectionController setSshPassword:nil];
+
+ // Set the correct connection type
+ if ([connection objectForKey:@"type"]) {
+ if ([[connection objectForKey:@"type"] isEqualToString:@"SPTCPIPConnection"])
+ connectionType = SPTCPIPConnection;
+ else if ([[connection objectForKey:@"type"] isEqualToString:@"SPSocketConnection"])
+ connectionType = SPSocketConnection;
+ else if ([[connection objectForKey:@"type"] isEqualToString:@"SPSSHTunnelConnection"])
+ connectionType = SPSSHTunnelConnection;
+ else
+ connectionType = SPTCPIPConnection;
+
+ [connectionController setType:connectionType];
+ [connectionController resizeTabViewToConnectionType:connectionType animating:NO];
+ }
+
+ // Set basic details
+ if ([connection objectForKey:@"name"])
+ [connectionController setName:[connection objectForKey:@"name"]];
+ if ([connection objectForKey:@"user"])
+ [connectionController setUser:[connection objectForKey:@"user"]];
+ if ([connection objectForKey:@"host"])
+ [connectionController setHost:[connection objectForKey:@"host"]];
+ if ([connection objectForKey:@"port"])
+ [connectionController setPort:[NSString stringWithFormat:@"%ld", (long)[[connection objectForKey:@"port"] integerValue]]];
+
+ // Set SSL details
+ if ([connection objectForKey:@"useSSL"])
+ [connectionController setUseSSL:[[connection objectForKey:@"useSSL"] intValue]];
+ if ([connection objectForKey:@"sslKeyFileLocationEnabled"])
+ [connectionController setSslKeyFileLocationEnabled:[[connection objectForKey:@"sslKeyFileLocationEnabled"] intValue]];
+ if ([connection objectForKey:@"sslKeyFileLocation"])
+ [connectionController setSslKeyFileLocation:[connection objectForKey:@"sslKeyFileLocation"]];
+ if ([connection objectForKey:@"sslCertificateFileLocationEnabled"])
+ [connectionController setSslCertificateFileLocationEnabled:[[connection objectForKey:@"sslCertificateFileLocationEnabled"] intValue]];
+ if ([connection objectForKey:@"sslCertificateFileLocation"])
+ [connectionController setSslCertificateFileLocation:[connection objectForKey:@"sslCertificateFileLocation"]];
+ if ([connection objectForKey:@"sslCACertFileLocationEnabled"])
+ [connectionController setSslCACertFileLocationEnabled:[[connection objectForKey:@"sslCACertFileLocationEnabled"] intValue]];
+ if ([connection objectForKey:@"sslCACertFileLocation"])
+ [connectionController setSslCACertFileLocation:[connection objectForKey:@"sslCACertFileLocation"]];
+
+ // Set the keychain details if available
+ if ([connection objectForKey:@"kcid"] && [(NSString *)[connection objectForKey:@"kcid"] length])
+ [self setKeychainID:[connection objectForKey:@"kcid"]];
+
+ // Set password - if not in SPF file try to get it via the KeyChain
+ if ([connection objectForKey:@"password"])
+ [connectionController setPassword:[connection objectForKey:@"password"]];
+ else {
+ NSString *pw = [self keychainPasswordForConnection:nil];
+ if (pw)
+ [connectionController setPassword:pw];
+ }
+
+ // Set the socket details, whether or not the type is a socket
+ if ([connection objectForKey:@"socket"])
+ [connectionController setSocket:[connection objectForKey:@"socket"]];
+
+ // Set SSH details if available, whether or not the SSH type is currently active (to allow fallback on failure)
+ if ([connection objectForKey:@"ssh_host"])
+ [connectionController setSshHost:[connection objectForKey:@"ssh_host"]];
+ if ([connection objectForKey:@"ssh_user"])
+ [connectionController setSshUser:[connection objectForKey:@"ssh_user"]];
+ if ([connection objectForKey:@"ssh_keyLocationEnabled"])
+ [connectionController setSshKeyLocationEnabled:[[connection objectForKey:@"ssh_keyLocationEnabled"] intValue]];
+ if ([connection objectForKey:@"ssh_keyLocation"])
+ [connectionController setSshKeyLocation:[connection objectForKey:@"ssh_keyLocation"]];
+ if ([connection objectForKey:@"ssh_port"])
+ [connectionController setSshPort:[NSString stringWithFormat:@"%ld", (long)[[connection objectForKey:@"ssh_port"] integerValue]]];
+
+ // Set the SSH password - if not in SPF file try to get it via the KeyChain
+ if ([connection objectForKey:@"ssh_password"])
+ [connectionController setSshPassword:[connection objectForKey:@"ssh_password"]];
+ else {
+ NSString *sshpw = [self keychainPasswordForSSHConnection:nil];
+ if(sshpw)
+ [connectionController setSshPassword:sshpw];
+ }
+
+ // Restore the selected database if saved
+ if ([connection objectForKey:@"database"])
+ [connectionController setDatabase:[connection objectForKey:@"database"]];
+
+ // Store session details - if provided - for later setting once the connection is established
+ if ([stateDetails objectForKey:@"session"]) {
+ spfSession = [[NSDictionary dictionaryWithDictionary:[stateDetails objectForKey:@"session"]] retain];
+ }
+
+ // Restore favourites and history
+ if ([stateDetails objectForKey:SPQueryFavorites])
+ [spfPreferences setObject:[stateDetails objectForKey:SPQueryFavorites] forKey:SPQueryFavorites];
+ if ([stateDetails objectForKey:SPQueryHistory])
+ [spfPreferences setObject:[stateDetails objectForKey:SPQueryHistory] forKey:SPQueryHistory];
+ if ([stateDetails objectForKey:SPContentFilters])
+ [spfPreferences setObject:[stateDetails objectForKey:SPContentFilters] forKey:SPContentFilters];
+
+ [connectionController updateSSLInterface:self];
+
+ // Autoconnect if appropriate
+ if ([stateDetails objectForKey:@"auto_connect"] && [[stateDetails valueForKey:@"auto_connect"] boolValue]) {
+ [connectionController initiateConnection:self];
+ }
+}
+
+/**
+ * Initialise the document with the connection file at the supplied path.
+ */
+- (void)setStateFromConnectionFile:(NSString *)path
+{
+ NSError *readError = nil;
+ NSString *convError = nil;
+ NSPropertyListFormat format;
+
+ NSString *encryptpw = nil;
+ NSMutableDictionary *data = nil;
+ NSDictionary *spf = nil;
+
+
+ // Read the property list data, and unserialize it.
+ NSData *pData = [NSData dataWithContentsOfFile:path options:NSUncachedRead error:&readError];
+
+ spf = [[NSPropertyListSerialization propertyListFromData:pData
+ mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&convError] retain];
+
+ if (!spf || readError != nil || [convError length] || !(format == NSPropertyListXMLFormat_v1_0 || format == NSPropertyListBinaryFormat_v1_0)) {
+ NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading connection data file", @"error while reading connection data file")]
+ defaultButton:NSLocalizedString(@"OK", @"OK button")
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:NSLocalizedString(@"Connection data file couldn't be read.", @"error while reading connection data file")];
+
+ [alert setAlertStyle:NSCriticalAlertStyle];
+ [alert runModal];
+ if (spf) [spf release];
+ [self closeAndDisconnect];
+ return;
+ }
+
+ // If the .spf format is unhandled, error.
+ if (![[spf objectForKey:@"format"] isEqualToString:@"connection"]) {
+ NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Warning", @"warning")]
+ defaultButton:NSLocalizedString(@"OK", @"OK button")
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"The chosen file “%@” contains ‘%@’ data.", @"message while reading a spf file which matches non-supported formats."), path, [spf objectForKey:@"format"]]];
+
+ [alert setAlertStyle:NSWarningAlertStyle];
+ [spf release];
+ [self closeAndDisconnect];
+ [alert runModal];
+ return;
+ }
+
+ // Error if the expected data source wasn't present in the file
+ if (![spf objectForKey:@"data"]) {
+ NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading connection data file", @"error while reading connection data file")]
+ defaultButton:NSLocalizedString(@"OK", @"OK button")
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:NSLocalizedString(@"No data found.", @"no data found")];
+
+ [alert setAlertStyle:NSCriticalAlertStyle];
+ [alert runModal];
+ [spf release];
+ [self closeAndDisconnect];
+ return;
+ }
+
+ // Ask for a password if SPF file passwords were encrypted, via a sheet
+ if ([spf objectForKey:@"encrypted"] && [[spf valueForKey:@"encrypted"] boolValue]) {
+ if([self isSaveInBundle] && [[[NSApp delegate] spfSessionDocData] objectForKey:@"e_string"]) {
+ encryptpw = [[[NSApp delegate] spfSessionDocData] objectForKey:@"e_string"];
+ } else {
+ [inputTextWindowHeader setStringValue:NSLocalizedString(@"Connection file is encrypted", @"Connection file is encrypted")];
+ [inputTextWindowMessage setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Please enter the password for ‘%@’:", @"Please enter the password"), ([self isSaveInBundle]) ? [[[[NSApp delegate] sessionURL] absoluteString] lastPathComponent] : [path lastPathComponent]]];
+ [inputTextWindowSecureTextField setStringValue:@""];
+ [inputTextWindowSecureTextField selectText:nil];
+
+ [NSApp beginSheet:inputTextWindow modalForWindow:parentWindow modalDelegate:self didEndSelector:nil contextInfo:nil];
+
+ // wait for encryption password
+ NSModalSession session = [NSApp beginModalSessionForWindow:inputTextWindow];
+ for (;;) {
+
+ // Execute code on DefaultRunLoop
+ [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
+ beforeDate:[NSDate distantFuture]];
+
+ // Break the run loop if editSheet was closed
+ if ([NSApp runModalSession:session] != NSRunContinuesResponse
+ || ![inputTextWindow isVisible])
+ break;
+
+ // Execute code on DefaultRunLoop
+ [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
+ beforeDate:[NSDate distantFuture]];
+
+ }
+ [NSApp endModalSession:session];
+ [inputTextWindow orderOut:nil];
+ [NSApp endSheet:inputTextWindow];
+
+ if (passwordSheetReturnCode) {
+ encryptpw = [inputTextWindowSecureTextField stringValue];
+ if ([self isSaveInBundle]) {
+ NSMutableDictionary *spfSessionData = [NSMutableDictionary dictionary];
+ [spfSessionData addEntriesFromDictionary:[[NSApp delegate] spfSessionDocData]];
+ [spfSessionData setObject:encryptpw forKey:@"e_string"];
+ [[NSApp delegate] setSpfSessionDocData:spfSessionData];
+ }
+ } else {
+ [self closeAndDisconnect];
+ [spf release];
+ return;
+ }
+ }
+ }
+
+ if ([[spf objectForKey:@"data"] isKindOfClass:[NSDictionary class]])
+ data = [NSMutableDictionary dictionaryWithDictionary:[spf objectForKey:@"data"]];
+ else if ([[spf objectForKey:@"data"] isKindOfClass:[NSData class]]) {
+ NSData *decryptdata = nil;
+ decryptdata = [[[NSMutableData alloc] initWithData:[(NSData *)[spf objectForKey:@"data"] dataDecryptedWithPassword:encryptpw]] autorelease];
+ if (decryptdata != nil && [decryptdata length]) {
+ NSKeyedUnarchiver *unarchiver = [[[NSKeyedUnarchiver alloc] initForReadingWithData:decryptdata] autorelease];
+ data = [NSMutableDictionary dictionaryWithDictionary:(NSDictionary *)[unarchiver decodeObjectForKey:@"data"]];
+ [unarchiver finishDecoding];
+ }
+ if (data == nil) {
+ NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading connection data file", @"error while reading connection data file")]
+ defaultButton:NSLocalizedString(@"OK", @"OK button")
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:NSLocalizedString(@"Wrong data format or password.", @"wrong data format or password")];
+
+ [alert setAlertStyle:NSCriticalAlertStyle];
+ [alert runModal];
+ [self closeAndDisconnect];
+ [spf release];
+ return;
+ }
+ }
+
+ // Ensure the data was read correctly, and has connection details
+ if (!data || ![data objectForKey:@"connection"]) {
+ NSString *informativeText;
+ if (!data) {
+ informativeText = NSLocalizedString(@"Wrong data format.", @"wrong data format");
+ } else {
+ informativeText = NSLocalizedString(@"No connection data found.", @"no connection data found");
+ }
+ NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading connection data file", @"error while reading connection data file")]
+ defaultButton:NSLocalizedString(@"OK", @"OK button")
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:informativeText];
+
+ [alert setAlertStyle:NSCriticalAlertStyle];
+ [alert runModal];
+ [self closeAndDisconnect];
+ [spf release];
+ return;
+ }
+
+ // Move favourites and history into the data dictionary to pass to setState:
+ [data setObject:[spf objectForKey:SPQueryFavorites] forKey:SPQueryFavorites];
+ [data setObject:[spf objectForKey:SPQueryHistory] forKey:SPQueryHistory];
+ [data setObject:[spf objectForKey:SPContentFilters] forKey:SPContentFilters];
+
+ // Ensure the encryption status is stored in the spfDocData store for future saves
+ [spfDocData setObject:[NSNumber numberWithBool:NO] forKey:@"encrypted"];
+ if (encryptpw != nil) {
+ [spfDocData setObject:[NSNumber numberWithBool:YES] forKey:@"encrypted"];
+ [spfDocData setObject:encryptpw forKey:@"e_string"];
+ }
+ encryptpw = nil;
+
+ // If session data is available, ensure it is marked for save
+ if ([data objectForKey:@"session"]) {
+ [spfDocData setObject:[NSNumber numberWithBool:YES] forKey:@"include_session"];
+ }
+
+ if (![self isSaveInBundle]) {
+ [self setFileURL:[NSURL fileURLWithPath:path]];
+ [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:path]];
+ }
+
+ [spfDocData setObject:[NSNumber numberWithBool:([[data objectForKey:@"connection"] objectForKey:@"password"]) ? YES : NO] forKey:@"save_password"];
+
+ [spfDocData setObject:[NSNumber numberWithBool:NO] forKey:@"auto_connect"];
+
+ if([spf objectForKey:@"auto_connect"] && [[spf valueForKey:@"auto_connect"] boolValue]) {
+ [spfDocData setObject:[NSNumber numberWithBool:YES] forKey:@"auto_connect"];
+ [data setObject:[NSNumber numberWithBool:YES] forKey:@"auto_connect"];
+ }
+
+ // Set the state dictionary, triggering an autoconnect if appropriate
+ [self setState:data];
+
+ [spf release];
+}
+
+/**
+ * Restore session from SPF file if given
+ */
+- (void)restoreSession
+{
+ NSAutoreleasePool *taskPool = [[NSAutoreleasePool alloc] init];
+
+ // Check and set the table
+ NSArray *tables = [tablesListInstance tables];
+
+ BOOL isSelectedTableDefined = YES;
+
+ if([tables indexOfObject:[spfSession objectForKey:@"table"]] == NSNotFound) {
+ isSelectedTableDefined = NO;
+ }
+
+ // Restore toolbar setting
+ if([spfSession objectForKey:@"isToolbarVisible"])
+ [mainToolbar setVisible:[[spfSession objectForKey:@"isToolbarVisible"] boolValue]];
+
+ // Reset database view encoding if differs from default
+ if([spfSession objectForKey:@"connectionEncoding"] && ![[mySQLConnection encoding] isEqualToString:[spfSession objectForKey:@"connectionEncoding"]])
+ [self setConnectionEncoding:[spfSession objectForKey:@"connectionEncoding"] reloadingViews:YES];
+
+ if(isSelectedTableDefined) {
+ // Set table content details for restore
+ if([spfSession objectForKey:@"contentSortCol"])
+ [tableContentInstance setSortColumnNameToRestore:[spfSession objectForKey:@"contentSortCol"] isAscending:[[spfSession objectForKey:@"contentSortColIsAsc"] boolValue]];
+ if([spfSession objectForKey:@"contentPageNumber"])
+ [tableContentInstance setPageToRestore:[[spfSession objectForKey:@"pageNumber"] integerValue]];
+ if([spfSession objectForKey:@"contentViewport"])
+ [tableContentInstance setViewportToRestore:NSRectFromString([spfSession objectForKey:@"contentViewport"])];
+ if([spfSession objectForKey:@"contentFilter"])
+ [tableContentInstance setFiltersToRestore:[spfSession objectForKey:@"contentFilter"]];
+
+ // Select table
+ [tablesListInstance selectTableAtIndex:[NSNumber numberWithInteger:[tables indexOfObject:[spfSession objectForKey:@"table"]]]];
+
+ // Restore table selection indexes
+ if([spfSession objectForKey:@"contentSelectedIndexSet"]) {
+ NSMutableIndexSet *anIndexSet = [NSMutableIndexSet indexSet];
+ NSArray *items = [spfSession objectForKey:@"contentSelectedIndexSet"];
+ NSUInteger i;
+ for(i=0; i<[items count]; i++)
+ [anIndexSet addIndex:[NSArrayObjectAtIndex(items, i) integerValue]];
+
+ [tableContentInstance setSelectedRowIndexesToRestore:anIndexSet];
+ }
+
+ [[tablesListInstance valueForKeyPath:@"tablesListView"] scrollRowToVisible:[tables indexOfObject:[spfSession objectForKey:@"selectedTable"]]];
+
+ }
+
+ // Select view
+ if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_STRUCTURE"])
+ [self viewStructure:self];
+ else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_CONTENT"])
+ [self viewContent:self];
+ else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_CUSTOMQUERY"])
+ [self viewQuery:self];
+ else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_STATUS"])
+ [self viewStatus:self];
+ else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_RELATIONS"])
+ [self viewRelations:self];
+ else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_TRIGGERS"])
+ [self viewTriggers:self];
+
+ [self updateWindowTitle:self];
+
+ // dealloc spfSession data
+ [spfSession release];
+ spfSession = nil;
+
+ // End the task
+ [self endTask];
+ [taskPool drain];
+}
+
+#pragma mark -
#pragma mark Connection controller delegate methods
/**
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index 2f0cec21..5b7f4a4b 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -284,6 +284,10 @@
BOOL enableInteraction = ![[tableDocumentInstance selectedToolbarItemIdentifier] isEqualToString:SPMainToolbarTableContent] || ![tableDocumentInstance isWorking];
if (!tableDetails) {
+
+ // If no table is currently selected, no action required - return.
+ if (!selectedTable) return;
+
newTableName = nil;
} else {
newTableName = [tableDetails objectForKey:@"name"];
diff --git a/Source/SPTablesList.h b/Source/SPTablesList.h
index 56711217..8487358d 100644
--- a/Source/SPTablesList.h
+++ b/Source/SPTablesList.h
@@ -65,7 +65,6 @@
IBOutlet id toolbarReloadButton;
IBOutlet id addTableButton;
IBOutlet id truncateTableButton;
- IBOutlet id truncateTableContextButton;
IBOutlet NSSplitView *tableListSplitView;
IBOutlet NSSplitView *tableListFilterSplitView;
IBOutlet NSButton *tableInfoCollapseButton;
@@ -76,6 +75,7 @@
IBOutlet NSMenuItem *removeTableMenuItem;
IBOutlet NSMenuItem *duplicateTableMenuItem;
IBOutlet NSMenuItem *renameTableMenuItem;
+ IBOutlet NSMenuItem *openTableInNewTabMenuItem;
IBOutlet NSMenuItem *separatorTableMenuItem;
IBOutlet NSMenuItem *showCreateSyntaxMenuItem;
IBOutlet NSMenuItem *separatorTableMenuItem2;
@@ -85,7 +85,9 @@
// Table list context menu items
IBOutlet NSMenuItem *removeTableContextMenuItem;
IBOutlet NSMenuItem *duplicateTableContextMenuItem;
+ IBOutlet NSMenuItem *truncateTableContextMenuItem;
IBOutlet NSMenuItem *renameTableContextMenuItem;
+ IBOutlet NSMenuItem *openTableInNewTabContextMenuItem;
IBOutlet NSMenuItem *separatorTableContextMenuItem;
IBOutlet NSMenuItem *showCreateSyntaxContextMenuItem;
IBOutlet NSMenuItem *separatorTableContextMenuItem2;
@@ -111,6 +113,7 @@
- (IBAction)copyTable:(id)sender;
- (IBAction)renameTable:(id)sender;
- (IBAction)truncateTable:(id)sender;
+- (IBAction)openTableInNewTab:(id)sender;
- (IBAction)togglePaneCollapse:(id)sender;
// Additional methods
diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m
index 6fdca8c0..41a528d3 100644
--- a/Source/SPTablesList.m
+++ b/Source/SPTablesList.m
@@ -558,6 +558,32 @@
}
/**
+ * Open the table in a new tab.
+ */
+- (IBAction)openTableInNewTab:(id)sender
+{
+
+ // Add a new tab to the window
+ [[[tableDocumentInstance parentWindow] windowController] addNewConnection:self];
+
+ // Get the state of the document
+ NSDictionary *allStateDetails = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithBool:YES], @"connection",
+ [NSNumber numberWithBool:YES], @"history",
+ [NSNumber numberWithBool:YES], @"session",
+ [NSNumber numberWithBool:YES], @"query",
+ [NSNumber numberWithBool:YES], @"password",
+ nil];
+ NSMutableDictionary *documentState = [NSMutableDictionary dictionaryWithDictionary:[tableDocumentInstance stateIncludingDetails:allStateDetails]];
+
+ // Ensure it's set to autoconnect
+ [documentState setObject:[NSNumber numberWithBool:YES] forKey:@"auto_connect"];
+
+ // Set the connection on the new tab
+ [[[NSApp delegate] frontDocument] setState:documentState];
+}
+
+/**
* Toggle whether the splitview is collapsed.
*/
- (IBAction)togglePaneCollapse:(id)sender
@@ -701,27 +727,27 @@
[removeTableMenuItem setTitle:NSLocalizedString(@"Delete Tables", @"delete tables menu title")];
[truncateTableButton setTitle:NSLocalizedString(@"Truncate Tables", @"truncate tables menu item")];
[removeTableContextMenuItem setTitle:NSLocalizedString(@"Delete Tables", @"delete tables menu title")];
- [truncateTableContextButton setTitle:NSLocalizedString(@"Truncate Tables", @"truncate tables menu item")];
+ [truncateTableContextMenuItem setTitle:NSLocalizedString(@"Truncate Tables", @"truncate tables menu item")];
[truncateTableButton setHidden:NO];
- [truncateTableContextButton setHidden:NO];
+ [truncateTableContextMenuItem setHidden:NO];
break;
case SPTableTypeView:
[removeTableMenuItem setTitle:NSLocalizedString(@"Delete Views", @"delete views menu title")];
[removeTableContextMenuItem setTitle:NSLocalizedString(@"Delete Views", @"delete views menu title")];
[truncateTableButton setHidden:YES];
- [truncateTableContextButton setHidden:YES];
+ [truncateTableContextMenuItem setHidden:YES];
break;
case SPTableTypeProc:
[removeTableMenuItem setTitle:NSLocalizedString(@"Delete Procedures", @"delete procedures menu title")];
[removeTableContextMenuItem setTitle:NSLocalizedString(@"Delete Procedures", @"delete procedures menu title")];
[truncateTableButton setHidden:YES];
- [truncateTableContextButton setHidden:YES];
+ [truncateTableContextMenuItem setHidden:YES];
break;
case SPTableTypeFunc:
[removeTableMenuItem setTitle:NSLocalizedString(@"Delete Functions", @"delete functions menu title")];
[removeTableContextMenuItem setTitle:NSLocalizedString(@"Delete Functions", @"delete functions menu title")];
[truncateTableButton setHidden:YES];
- [truncateTableContextButton setHidden:YES];
+ [truncateTableContextMenuItem setHidden:YES];
break;
}
@@ -729,12 +755,14 @@
[removeTableMenuItem setTitle:NSLocalizedString(@"Delete Items", @"delete items menu title")];
[removeTableContextMenuItem setTitle:NSLocalizedString(@"Delete Items", @"delete items menu title")];
[truncateTableButton setHidden:YES];
- [truncateTableContextButton setHidden:YES];
+ [truncateTableContextMenuItem setHidden:YES];
}
+
}
// Context menu
[renameTableContextMenuItem setHidden:YES];
+ [openTableInNewTabContextMenuItem setHidden:YES];
[duplicateTableContextMenuItem setHidden:YES];
[separatorTableContextMenuItem setHidden:YES];
[separatorTableContextMenuItem2 setHidden:NO];
@@ -743,6 +771,7 @@
// 'Gear' menu
[renameTableMenuItem setHidden:YES];
+ [openTableInNewTabMenuItem setHidden:YES];
[duplicateTableMenuItem setHidden:YES];
[separatorTableMenuItem setHidden:YES];
[separatorTableMenuItem2 setHidden:NO];
@@ -828,6 +857,8 @@
[duplicateTableMenuItem setTitle:NSLocalizedString(@"Duplicate View...", @"duplicate view menu title")];
[truncateTableButton setHidden:YES];
[removeTableMenuItem setTitle:NSLocalizedString(@"Delete View", @"delete view menu title")];
+ [openTableInNewTabMenuItem setHidden:NO];
+ [openTableInNewTabMenuItem setTitle:NSLocalizedString(@"Open View in New Tab", @"open view in new table title")];
[showCreateSyntaxMenuItem setHidden:NO];
[showCreateSyntaxMenuItem setTitle:NSLocalizedString(@"Show Create View Syntax...", @"show create view syntax menu item")];
@@ -835,8 +866,10 @@
[renameTableContextMenuItem setTitle:NSLocalizedString(@"Rename View...", @"rename view menu title")];
[duplicateTableContextMenuItem setHidden:NO];
[duplicateTableContextMenuItem setTitle:NSLocalizedString(@"Duplicate View...", @"duplicate view menu title")];
- [truncateTableContextButton setHidden:YES];
+ [truncateTableContextMenuItem setHidden:YES];
[removeTableContextMenuItem setTitle:NSLocalizedString(@"Delete View", @"delete view menu title")];
+ [openTableInNewTabContextMenuItem setHidden:NO];
+ [openTableInNewTabContextMenuItem setTitle:NSLocalizedString(@"Open View in New Tab", @"open view in new table title")];
[showCreateSyntaxContextMenuItem setHidden:NO];
[showCreateSyntaxContextMenuItem setTitle:NSLocalizedString(@"Show Create View Syntax...", @"show create view syntax menu item")];
}
@@ -865,6 +898,8 @@
[truncateTableButton setHidden:NO];
[truncateTableButton setTitle:NSLocalizedString(@"Truncate Table", @"truncate table menu title")];
[removeTableMenuItem setTitle:NSLocalizedString(@"Delete Table", @"delete table menu title")];
+ [openTableInNewTabMenuItem setHidden:NO];
+ [openTableInNewTabMenuItem setTitle:NSLocalizedString(@"Open Table in New Tab", @"open table in new table title")];
[showCreateSyntaxMenuItem setHidden:NO];
[showCreateSyntaxMenuItem setTitle:NSLocalizedString(@"Show Create Table Syntax...", @"show create table syntax menu item")];
@@ -872,9 +907,11 @@
[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")];
+ [truncateTableContextMenuItem setHidden:NO];
+ [truncateTableContextMenuItem setTitle:NSLocalizedString(@"Truncate Table", @"truncate table menu title")];
[removeTableContextMenuItem setTitle:NSLocalizedString(@"Delete Table", @"delete table menu title")];
+ [openTableInNewTabContextMenuItem setHidden:NO];
+ [openTableInNewTabContextMenuItem setTitle:NSLocalizedString(@"Open Table in New Tab", @"open table in new table title")];
[showCreateSyntaxContextMenuItem setHidden:NO];
[showCreateSyntaxContextMenuItem setTitle:NSLocalizedString(@"Show Create Table Syntax...", @"show create table syntax menu item")];
}
@@ -896,6 +933,8 @@
[duplicateTableMenuItem setTitle:NSLocalizedString(@"Duplicate Procedure...", @"duplicate proc menu title")];
[truncateTableButton setHidden:YES];
[removeTableMenuItem setTitle:NSLocalizedString(@"Delete Procedure", @"delete proc menu title")];
+ [openTableInNewTabMenuItem setHidden:NO];
+ [openTableInNewTabMenuItem setTitle:NSLocalizedString(@"Open Procedure in New Tab", @"open procedure in new table title")];
[showCreateSyntaxMenuItem setHidden:NO];
[showCreateSyntaxMenuItem setTitle:NSLocalizedString(@"Show Create Procedure Syntax...", @"show create proc syntax menu item")];
@@ -903,8 +942,10 @@
[renameTableContextMenuItem setTitle:NSLocalizedString(@"Rename Procedure...", @"rename proc menu title")];
[duplicateTableContextMenuItem setHidden:NO];
[duplicateTableContextMenuItem setTitle:NSLocalizedString(@"Duplicate Procedure...", @"duplicate proc menu title")];
- [truncateTableContextButton setHidden:YES];
+ [truncateTableContextMenuItem setHidden:YES];
[removeTableContextMenuItem setTitle:NSLocalizedString(@"Delete Procedure", @"delete proc menu title")];
+ [openTableInNewTabContextMenuItem setHidden:NO];
+ [openTableInNewTabContextMenuItem setTitle:NSLocalizedString(@"Open Procedure in New Tab", @"open procedure in new table title")];
[showCreateSyntaxContextMenuItem setHidden:NO];
[showCreateSyntaxContextMenuItem setTitle:NSLocalizedString(@"Show Create Procedure Syntax...", @"show create proc syntax menu item")];
}
@@ -926,6 +967,8 @@
[duplicateTableMenuItem setTitle:NSLocalizedString(@"Duplicate Function...", @"duplicate func menu title")];
[truncateTableButton setHidden:YES];
[removeTableMenuItem setTitle:NSLocalizedString(@"Delete Function", @"delete func menu title")];
+ [openTableInNewTabMenuItem setHidden:NO];
+ [openTableInNewTabMenuItem setTitle:NSLocalizedString(@"Open Function in New Tab", @"open function in new table title")];
[showCreateSyntaxMenuItem setHidden:NO];
[showCreateSyntaxMenuItem setTitle:NSLocalizedString(@"Show Create Function Syntax...", @"show create func syntax menu item")];
@@ -933,8 +976,10 @@
[renameTableContextMenuItem setTitle:NSLocalizedString(@"Rename Function...", @"rename func menu title")];
[duplicateTableContextMenuItem setHidden:NO];
[duplicateTableContextMenuItem setTitle:NSLocalizedString(@"Duplicate Function...", @"duplicate func menu title")];
- [truncateTableContextButton setHidden:YES];
+ [truncateTableContextMenuItem setHidden:YES];
[removeTableContextMenuItem setTitle:NSLocalizedString(@"Delete Function", @"delete func menu title")];
+ [openTableInNewTabContextMenuItem setHidden:NO];
+ [openTableInNewTabContextMenuItem setTitle:NSLocalizedString(@"Open Function in New Tab", @"open function in new table title")];
[showCreateSyntaxContextMenuItem setHidden:NO];
[showCreateSyntaxContextMenuItem setTitle:NSLocalizedString(@"Show Create Function Syntax...", @"show create func syntax menu item")];
}
@@ -1506,7 +1551,7 @@
return ([tablesListView numberOfSelectedRows] > 0);
}
- if ([menuItem action] == @selector(renameTable:)) {
+ if ([menuItem action] == @selector(renameTable:) || [menuItem action] == @selector(openTableInNewTab:)) {
return (([tablesListView numberOfSelectedRows] == 1) && [[self tableName] length]);
}