aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/Preferences.xib3689
-rw-r--r--Resources/English.lproj/Localizable.stringsbin183004 -> 184256 bytes
-rw-r--r--Resources/English.lproj/Preferences.stringsbin62766 -> 62832 bytes
-rw-r--r--Source/SPAutoUpdatePreferencePane.h37
-rw-r--r--Source/SPAutoUpdatePreferencePane.m63
-rw-r--r--Source/SPConnectionController.m2
-rw-r--r--Source/SPConnectionControllerDelegate.h2
-rw-r--r--Source/SPEditorPreferencePane.h81
-rw-r--r--Source/SPEditorPreferencePane.m1027
-rw-r--r--Source/SPFavoritesPreferencePane.h98
-rw-r--r--Source/SPFavoritesPreferencePane.m902
-rw-r--r--Source/SPFontPreviewTextField.h33
-rw-r--r--Source/SPFontPreviewTextField.m63
-rw-r--r--Source/SPGeneralPreferencePane.h47
-rw-r--r--Source/SPGeneralPreferencePane.m124
-rw-r--r--Source/SPNetworkPreferencePane.h37
-rw-r--r--Source/SPNetworkPreferencePane.m63
-rw-r--r--Source/SPNotificationsPreferencePane.h37
-rw-r--r--Source/SPNotificationsPreferencePane.m88
-rw-r--r--Source/SPPreferenceController.h164
-rw-r--r--Source/SPPreferenceController.m2253
-rw-r--r--Source/SPPreferenceControllerDelegate.h37
-rw-r--r--Source/SPPreferenceControllerDelegate.m132
-rw-r--r--Source/SPPreferencePane.h41
-rw-r--r--Source/SPPreferencePane.m45
-rw-r--r--Source/SPPreferencePaneProtocol.h77
-rw-r--r--Source/SPPreferencesUpgrade.h37
-rw-r--r--Source/SPPreferencesUpgrade.m300
-rw-r--r--Source/SPTablesPreferencePane.h44
-rw-r--r--Source/SPTablesPreferencePane.m92
-rw-r--r--sequel-pro.xcodeproj/project.pbxproj109
31 files changed, 5772 insertions, 3952 deletions
diff --git a/Interfaces/English.lproj/Preferences.xib b/Interfaces/English.lproj/Preferences.xib
index 6712a625..8e2ecf10 100644
--- a/Interfaces/English.lproj/Preferences.xib
+++ b/Interfaces/English.lproj/Preferences.xib
@@ -3,7 +3,7 @@
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">10F569</string>
- <string key="IBDocument.InterfaceBuilderVersion">804</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
@@ -15,14 +15,12 @@
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>804</string>
+ <string>823</string>
<string>1.2.5</string>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="2041"/>
- <integer value="409"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -44,6 +42,70 @@
<object class="NSCustomObject" id="1004">
<string key="NSClassName">NSApplication</string>
</object>
+ <object class="NSCustomObject" id="343720994">
+ <string key="NSClassName">SPGeneralPreferencePane</string>
+ </object>
+ <object class="NSCustomObject" id="673566620">
+ <string key="NSClassName">SPTablesPreferencePane</string>
+ </object>
+ <object class="NSCustomObject" id="721156358">
+ <string key="NSClassName">SPFavoritesPreferencePane</string>
+ </object>
+ <object class="NSCustomObject" id="953509484">
+ <string key="NSClassName">SPNotificationsPreferencePane</string>
+ </object>
+ <object class="NSCustomObject" id="153863061">
+ <string key="NSClassName">SPEditorPreferencePane</string>
+ </object>
+ <object class="NSCustomObject" id="913031053">
+ <string key="NSClassName">SPAutoUpdatePreferencePane</string>
+ </object>
+ <object class="NSCustomObject" id="424937675">
+ <string key="NSClassName">SPNetworkPreferencePane</string>
+ </object>
+ <object class="NSCustomObject" id="721264488">
+ <string key="NSClassName">SUUpdater</string>
+ </object>
+ <object class="NSUserDefaultsController" id="151174232">
+ <bool key="NSSharedInstance">YES</bool>
+ </object>
+ <object class="NSArrayController" id="937123943">
+ <object class="NSMutableArray" key="NSDeclaredKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>name</string>
+ <string>fav</string>
+ <string>host</string>
+ <string>user</string>
+ <string>database</string>
+ <string>socket</string>
+ <string>port</string>
+ <string>useSSH</string>
+ <string>sshHost</string>
+ <string>sshUser</string>
+ <string>sshPort</string>
+ <object class="NSMutableString">
+ <characters key="NS.bytes">selectedFavoritePassword</characters>
+ </object>
+ <string>DisplayTableViewVerticalGridlines</string>
+ <string>type</string>
+ <string>TableRowCountQueryLevel</string>
+ <string>sshKeyLocationEnabled</string>
+ <string>sshKeyLocation</string>
+ <string>useSSL</string>
+ <string>sslKeyFileLocation</string>
+ <string>sslKeyFileLocationEnabled</string>
+ <string>sslCertificateFileLocation</string>
+ <string>sslCertificateFileLocationEnabled</string>
+ <string>sslCACertFileLocation</string>
+ <string>sslCACertFileLocationEnabled</string>
+ </object>
+ <bool key="NSEditable">YES</bool>
+ <bool key="NSAutomaticallyPreparesContent">YES</bool>
+ <object class="_NSManagedProxy" key="_NSManagedProxy"/>
+ <bool key="NSSelectsInsertedObjects">YES</bool>
+ <bool key="NSFilterRestrictsInsertion">YES</bool>
+ <bool key="NSClearsFilterPredicateOnInsertion">YES</bool>
+ </object>
<object class="NSWindowTemplate" id="1005">
<int key="NSWindowStyleMask">4107</int>
<int key="NSWindowBacking">2</int>
@@ -63,6 +125,418 @@
<string key="NSMinSize">{580, 72}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
+ <object class="NSWindowTemplate" id="1034673896">
+ <int key="NSWindowStyleMask">1</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{343, 481}, {227, 114}}</string>
+ <int key="NSWTFlags">1886912512</int>
+ <string key="NSWindowTitle"/>
+ <string key="NSWindowClass">NSWindow</string>
+ <object class="NSMutableString" key="NSViewClass">
+ <characters key="NS.bytes">View</characters>
+ </object>
+ <string key="NSWindowContentMaxSize">{247, 124}</string>
+ <string key="NSWindowContentMinSize">{227, 114}</string>
+ <object class="NSView" key="NSWindowView" id="985350347">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSTextField" id="294234359">
+ <reference key="NSNextResponder" ref="985350347"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{17, 86}, {213, 14}}</string>
+ <reference key="NSSuperview" ref="985350347"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="276434863">
+ <int key="NSCellFlags">68288064</int>
+ <int key="NSCellFlags2">4195328</int>
+ <string key="NSContents">Name:</string>
+ <object class="NSFont" key="NSSupport" id="26">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">11</double>
+ <int key="NSfFlags">3100</int>
+ </object>
+ <reference key="NSControlView" ref="294234359"/>
+ <object class="NSColor" key="NSBackgroundColor" id="700609571">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlColor</string>
+ <object class="NSColor" key="NSColor" id="432854223">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes>
+ </object>
+ </object>
+ <object class="NSColor" key="NSTextColor" id="1035618107">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlTextColor</string>
+ <object class="NSColor" key="NSColor" id="910325493">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSTextField" id="202566886">
+ <reference key="NSNextResponder" ref="985350347"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{18, 45}, {212, 11}}</string>
+ <reference key="NSSuperview" ref="985350347"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="803513953">
+ <int key="NSCellFlags">68288064</int>
+ <int key="NSCellFlags2">4457472</int>
+ <string key="NSContents">Already exists and will be overwritten!</string>
+ <object class="NSFont" key="NSSupport">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">9</double>
+ <int key="NSfFlags">3614</int>
+ </object>
+ <reference key="NSControlView" ref="202566886"/>
+ <reference key="NSBackgroundColor" ref="700609571"/>
+ <reference key="NSTextColor" ref="1035618107"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="336557380">
+ <reference key="NSNextResponder" ref="985350347"/>
+ <int key="NSvFlags">258</int>
+ <string key="NSFrame">{{20, 60}, {187, 18}}</string>
+ <reference key="NSSuperview" ref="985350347"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="17465994">
+ <int key="NSCellFlags">-1804468671</int>
+ <int key="NSCellFlags2">4326400</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="336557380"/>
+ <bool key="NSDrawsBackground">YES</bool>
+ <object class="NSColor" key="NSBackgroundColor" id="1001357688">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">textBackgroundColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ </object>
+ <object class="NSColor" key="NSTextColor" id="6928728">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">textColor</string>
+ <reference key="NSColor" ref="910325493"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSButton" id="107835671">
+ <reference key="NSNextResponder" ref="985350347"/>
+ <int key="NSvFlags">259</int>
+ <string key="NSFrame">{{112, 13}, {100, 28}}</string>
+ <reference key="NSSuperview" ref="985350347"/>
+ <int key="NSTag">1</int>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="460571945">
+ <int key="NSCellFlags">604110336</int>
+ <int key="NSCellFlags2">138018816</int>
+ <string key="NSContents">Save</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="107835671"/>
+ <int key="NSTag">1</int>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <object class="NSFont" key="NSAlternateImage" id="937783764">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">11</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="76427887">
+ <reference key="NSNextResponder" ref="985350347"/>
+ <int key="NSvFlags">259</int>
+ <string key="NSFrame">{{15, 13}, {99, 28}}</string>
+ <reference key="NSSuperview" ref="985350347"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="748282128">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">138018816</int>
+ <string key="NSContents">Cancel</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="76427887"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="937783764"/>
+ <string key="NSAlternateContents"/>
+ <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrameSize">{227, 114}</string>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
+ <string key="NSMinSize">{227, 136}</string>
+ <string key="NSMaxSize">{247, 146}</string>
+ </object>
+ <object class="NSWindowTemplate" id="97056925">
+ <int key="NSWindowStyleMask">1</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{343, 370}, {264, 225}}</string>
+ <int key="NSWTFlags">1886912512</int>
+ <string key="NSWindowTitle"/>
+ <string key="NSWindowClass">NSWindow</string>
+ <object class="NSMutableString" key="NSViewClass">
+ <characters key="NS.bytes">View</characters>
+ </object>
+ <string key="NSWindowContentMaxSize">{264, 274}</string>
+ <string key="NSWindowContentMinSize">{264, 225}</string>
+ <object class="NSView" key="NSWindowView" id="57365153">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSButton" id="514064864">
+ <reference key="NSNextResponder" ref="57365153"/>
+ <int key="NSvFlags">259</int>
+ <string key="NSFrame">{{161, 13}, {88, 28}}</string>
+ <reference key="NSSuperview" ref="57365153"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="654781355">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">138018816</int>
+ <string key="NSContents">Close</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="514064864"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="937783764"/>
+ <string key="NSAlternateContents"/>
+ <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSScrollView" id="959162340">
+ <reference key="NSNextResponder" ref="57365153"/>
+ <int key="NSvFlags">268</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSClipView" id="756280557">
+ <reference key="NSNextResponder" ref="959162340"/>
+ <int key="NSvFlags">2304</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSTableView" id="383184631">
+ <reference key="NSNextResponder" ref="756280557"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrameSize">{264, 133}</string>
+ <reference key="NSSuperview" ref="756280557"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="_NSCornerView" key="NSCornerView">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">-2147483392</int>
+ <string key="NSFrame">{{224, 0}, {16, 17}}</string>
+ </object>
+ <object class="NSMutableArray" key="NSTableColumns">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSTableColumn" id="10137583">
+ <double key="NSWidth">261</double>
+ <double key="NSMinWidth">40</double>
+ <double key="NSMaxWidth">1000</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="26"/>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
+ </object>
+ <object class="NSColor" key="NSTextColor" id="263643234">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">headerTextColor</string>
+ <reference key="NSColor" ref="910325493"/>
+ </object>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="411363849">
+ <int key="NSCellFlags">337772096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents">Text Cell</string>
+ <object class="NSFont" key="NSSupport" id="320262838">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <reference key="NSControlView" ref="383184631"/>
+ <object class="NSColor" key="NSBackgroundColor" id="887465699">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlBackgroundColor</string>
+ <reference key="NSColor" ref="432854223"/>
+ </object>
+ <reference key="NSTextColor" ref="1035618107"/>
+ </object>
+ <int key="NSResizingMask">3</int>
+ <bool key="NSIsResizeable">YES</bool>
+ <bool key="NSIsEditable">YES</bool>
+ <reference key="NSTableView" ref="383184631"/>
+ </object>
+ </object>
+ <double key="NSIntercellSpacingWidth">3</double>
+ <double key="NSIntercellSpacingHeight">2</double>
+ <reference key="NSBackgroundColor" ref="887465699"/>
+ <object class="NSColor" key="NSGridColor" id="651588562">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">gridColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ </object>
+ <double key="NSRowHeight">17</double>
+ <int key="NSTvFlags">46137344</int>
+ <reference key="NSDelegate"/>
+ <reference key="NSDataSource"/>
+ <int key="NSColumnAutoresizingStyle">4</int>
+ <int key="NSDraggingSourceMaskForLocal">15</int>
+ <int key="NSDraggingSourceMaskForNonLocal">0</int>
+ <bool key="NSAllowsTypeSelect">YES</bool>
+ <int key="NSTableViewDraggingDestinationStyle">0</int>
+ </object>
+ </object>
+ <string key="NSFrame">{{1, 1}, {264, 133}}</string>
+ <reference key="NSSuperview" ref="959162340"/>
+ <reference key="NSNextKeyView" ref="383184631"/>
+ <reference key="NSDocView" ref="383184631"/>
+ <reference key="NSBGColor" ref="887465699"/>
+ <int key="NScvFlags">4</int>
+ </object>
+ <object class="NSScroller" id="155347350">
+ <reference key="NSNextResponder" ref="959162340"/>
+ <int key="NSvFlags">-2147483392</int>
+ <string key="NSFrame">{{224, 17}, {15, 102}}</string>
+ <reference key="NSSuperview" ref="959162340"/>
+ <reference key="NSTarget" ref="959162340"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSPercent">0.99468082189559937</double>
+ </object>
+ <object class="NSScroller" id="275029977">
+ <reference key="NSNextResponder" ref="959162340"/>
+ <int key="NSvFlags">-2147483392</int>
+ <string key="NSFrame">{{-100, -100}, {223, 15}}</string>
+ <reference key="NSSuperview" ref="959162340"/>
+ <int key="NSsFlags">1</int>
+ <reference key="NSTarget" ref="959162340"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSPercent">0.57142859697341919</double>
+ </object>
+ </object>
+ <string key="NSFrame">{{-1, 79}, {266, 135}}</string>
+ <reference key="NSSuperview" ref="57365153"/>
+ <reference key="NSNextKeyView" ref="756280557"/>
+ <int key="NSsFlags">530</int>
+ <reference key="NSVScroller" ref="155347350"/>
+ <reference key="NSHScroller" ref="275029977"/>
+ <reference key="NSContentView" ref="756280557"/>
+ <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
+ </object>
+ <object class="BWAnchoredButtonBar" id="420699923">
+ <reference key="NSNextResponder" ref="57365153"/>
+ <int key="NSvFlags">268</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="BWAnchoredButton" id="920987860">
+ <reference key="NSNextResponder" ref="420699923"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{-1, -1}, {32, 24}}</string>
+ <reference key="NSSuperview" ref="420699923"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="BWAnchoredButtonCell" key="NSCell" id="971049756">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">134348800</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="920987860"/>
+ <int key="NSButtonFlags">-2033958657</int>
+ <int key="NSButtonFlags2">268435491</int>
+ <object class="NSCustomResource" key="NSNormalImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">button_duplicate</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent">d</string>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="BWAnchoredButton" id="443927336">
+ <reference key="NSNextResponder" ref="420699923"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{30, -1}, {32, 24}}</string>
+ <reference key="NSSuperview" ref="420699923"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="BWAnchoredButtonCell" key="NSCell" id="244371175">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">134348800</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="443927336"/>
+ <int key="NSButtonFlags">-2033958657</int>
+ <int key="NSButtonFlags2">35</int>
+ <object class="NSCustomResource" key="NSNormalImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">button_remove</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"></string>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrame">{{0, 57}, {280, 23}}</string>
+ <reference key="NSSuperview" ref="57365153"/>
+ <bool key="BWABBIsResizable">YES</bool>
+ <bool key="BWABBIsAtBottom">YES</bool>
+ <bool key="BWABBHandleIsRightAligned">NO</bool>
+ <int key="BWABBSelectedIndex">0</int>
+ </object>
+ <object class="NSBox" id="1025166199">
+ <reference key="NSNextResponder" ref="57365153"/>
+ <int key="NSvFlags">12</int>
+ <string key="NSFrame">{{-1, 54}, {265, 5}}</string>
+ <reference key="NSSuperview" ref="57365153"/>
+ <string key="NSOffsets">{0, 0}</string>
+ <object class="NSTextFieldCell" key="NSTitleCell">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Box</string>
+ <reference key="NSSupport" ref="320262838"/>
+ <reference key="NSBackgroundColor" ref="1001357688"/>
+ <object class="NSColor" key="NSTextColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
+ </object>
+ </object>
+ <int key="NSBorderType">3</int>
+ <int key="NSBoxType">2</int>
+ <int key="NSTitlePosition">0</int>
+ <bool key="NSTransparent">NO</bool>
+ </object>
+ </object>
+ <string key="NSFrameSize">{264, 225}</string>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
+ <string key="NSMinSize">{264, 247}</string>
+ <string key="NSMaxSize">{264, 296}</string>
+ </object>
<object class="NSCustomView" id="594324362">
<nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
@@ -71,17 +545,13 @@
<object class="NSPopUpButton" id="258765966">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{201, 141}, {254, 26}}</string>
+ <string key="NSFrame">{{201, 121}, {254, 26}}</string>
<reference key="NSSuperview" ref="594324362"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="562129977">
<int key="NSCellFlags">-2076049856</int>
<int key="NSCellFlags2">1024</int>
- <object class="NSFont" key="NSSupport" id="320262838">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">1044</int>
- </object>
+ <reference key="NSSupport" ref="320262838"/>
<reference key="NSControlView" ref="258765966"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">1</int>
@@ -432,7 +902,7 @@
<object class="NSButton" id="521332722">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{202, 234}, {362, 18}}</string>
+ <string key="NSFrame">{{202, 214}, {362, 18}}</string>
<reference key="NSSuperview" ref="594324362"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="964808674">
@@ -459,7 +929,7 @@
<object class="NSTextField" id="140067361">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{11, 262}, {187, 17}}</string>
+ <string key="NSFrame">{{11, 242}, {187, 17}}</string>
<reference key="NSSuperview" ref="594324362"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="996600667">
@@ -468,30 +938,14 @@
<string key="NSContents">Default Favorite:</string>
<reference key="NSSupport" ref="320262838"/>
<reference key="NSControlView" ref="140067361"/>
- <object class="NSColor" key="NSBackgroundColor" id="700609571">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlColor</string>
- <object class="NSColor" key="NSColor" id="432854223">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes>
- </object>
- </object>
- <object class="NSColor" key="NSTextColor" id="1035618107">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlTextColor</string>
- <object class="NSColor" key="NSColor" id="910325493">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MAA</bytes>
- </object>
- </object>
+ <reference key="NSBackgroundColor" ref="700609571"/>
+ <reference key="NSTextColor" ref="1035618107"/>
</object>
</object>
<object class="NSPopUpButton" id="331339372">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{201, 256}, {254, 26}}</string>
+ <string key="NSFrame">{{201, 236}, {254, 26}}</string>
<reference key="NSSuperview" ref="594324362"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="406329678">
@@ -523,7 +977,7 @@
<object class="NSTextField" id="227167312">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 105}, {182, 17}}</string>
+ <string key="NSFrame">{{17, 85}, {182, 17}}</string>
<reference key="NSSuperview" ref="594324362"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="513222356">
@@ -539,7 +993,7 @@
<object class="NSTextField" id="63384418">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 147}, {182, 17}}</string>
+ <string key="NSFrame">{{17, 127}, {182, 17}}</string>
<reference key="NSSuperview" ref="594324362"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="163779676">
@@ -555,7 +1009,7 @@
<object class="NSButton" id="929785803">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{202, 104}, {360, 18}}</string>
+ <string key="NSFrame">{{202, 84}, {360, 18}}</string>
<reference key="NSSuperview" ref="594324362"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="530413242">
@@ -577,7 +1031,7 @@
<object class="NSButton" id="302000957">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{202, 82}, {360, 18}}</string>
+ <string key="NSFrame">{{202, 62}, {360, 18}}</string>
<reference key="NSSuperview" ref="594324362"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="218042555">
@@ -599,8 +1053,8 @@
<object class="NSBox" id="101736468">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{202.5, 176}, {360, 5}}</string>
- <string key="NSBounds">{{8.5, 0}, {343, 5}}</string>
+ <string key="NSFrame">{{202, 156}, {360, 5}}</string>
+ <string key="NSBounds">{{12, 0}, {336, 5}}</string>
<reference key="NSSuperview" ref="594324362"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -608,15 +1062,7 @@
<int key="NSCellFlags2">0</int>
<string key="NSContents">Box</string>
<reference key="NSSupport" ref="320262838"/>
- <object class="NSColor" key="NSBackgroundColor" id="1001357688">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">textBackgroundColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- </object>
+ <reference key="NSBackgroundColor" ref="1001357688"/>
<object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
@@ -630,8 +1076,7 @@
<object class="NSBox" id="666474856">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{204, 128}, {357.5, 5}}</string>
- <string key="NSBounds">{{0, 0}, {357, 5}}</string>
+ <string key="NSFrame">{{204, 108}, {358, 5}}</string>
<reference key="NSSuperview" ref="594324362"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -653,7 +1098,7 @@
<object class="NSBox" id="997817518">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{204, 73}, {357, 5}}</string>
+ <string key="NSFrame">{{204, 53}, {357, 5}}</string>
<reference key="NSSuperview" ref="594324362"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -675,7 +1120,7 @@
<object class="NSTextField" id="326562367">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 43}, {181, 17}}</string>
+ <string key="NSFrame">{{17, 23}, {181, 17}}</string>
<reference key="NSSuperview" ref="594324362"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="899935643">
@@ -691,7 +1136,7 @@
<object class="NSTextField" id="155059">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{203, 40}, {38, 22}}</string>
+ <string key="NSFrame">{{203, 20}, {38, 22}}</string>
<reference key="NSSuperview" ref="594324362"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="875775803">
@@ -758,18 +1203,13 @@
<reference key="NSControlView" ref="155059"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="1001357688"/>
- <object class="NSColor" key="NSTextColor" id="6928728">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">textColor</string>
- <reference key="NSColor" ref="910325493"/>
- </object>
+ <reference key="NSTextColor" ref="6928728"/>
</object>
</object>
<object class="NSTextField" id="95243153">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{247, 43}, {316, 17}}</string>
+ <string key="NSFrame">{{247, 23}, {316, 17}}</string>
<reference key="NSSuperview" ref="594324362"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="710086132">
@@ -785,7 +1225,7 @@
<object class="NSPopUpButton" id="649933712">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{201, 189}, {254, 26}}</string>
+ <string key="NSFrame">{{201, 169}, {254, 26}}</string>
<reference key="NSSuperview" ref="594324362"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="404009397">
@@ -908,7 +1348,7 @@
<object class="NSTextField" id="343898725">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 195}, {182, 17}}</string>
+ <string key="NSFrame">{{17, 175}, {182, 17}}</string>
<reference key="NSSuperview" ref="594324362"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="840580273">
@@ -924,7 +1364,7 @@
<object class="NSBox" id="502540430">
<reference key="NSNextResponder" ref="594324362"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{202, 224}, {360, 5}}</string>
+ <string key="NSFrame">{{202, 204}, {360, 5}}</string>
<reference key="NSSuperview" ref="594324362"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -944,7 +1384,7 @@
<bool key="NSTransparent">NO</bool>
</object>
</object>
- <string key="NSFrameSize">{580, 300}</string>
+ <string key="NSFrameSize">{580, 280}</string>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="395894064">
@@ -955,7 +1395,7 @@
<object class="NSButton" id="401684657">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{422, 32}, {144, 32}}</string>
+ <string key="NSFrame">{{422, 14}, {144, 32}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="828765183">
@@ -975,18 +1415,14 @@
<object class="NSTextField" id="416182097">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{205, 40}, {194, 19}}</string>
+ <string key="NSFrame">{{205, 20}, {194, 22}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="82174450">
<int key="NSCellFlags">-2076049856</int>
- <int key="NSCellFlags2">4327424</int>
+ <int key="NSCellFlags2">4196352</int>
<string key="NSContents"/>
- <object class="NSFont" key="NSSupport" id="26">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">11</double>
- <int key="NSfFlags">3100</int>
- </object>
+ <reference key="NSSupport" ref="320262838"/>
<reference key="NSControlView" ref="416182097"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="1001357688"/>
@@ -996,7 +1432,7 @@
<object class="NSPopUpButton" id="67060802">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{202, 76}, {361, 26}}</string>
+ <string key="NSFrame">{{202, 59}, {361, 26}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="323591102">
@@ -1065,7 +1501,7 @@
<object class="NSTextField" id="418062206">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 42}, {181, 17}}</string>
+ <string key="NSFrame">{{17, 25}, {181, 17}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="578929076">
@@ -1081,7 +1517,7 @@
<object class="NSTextField" id="743152467">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 82}, {182, 17}}</string>
+ <string key="NSFrame">{{17, 65}, {182, 17}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="449580049">
@@ -1097,7 +1533,7 @@
<object class="NSBox" id="169616697">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{205, 106}, {355, 5}}</string>
+ <string key="NSFrame">{{205, 89}, {355, 5}}</string>
<reference key="NSSuperview" ref="395894064"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1119,7 +1555,7 @@
<object class="NSButton" id="282702408">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{203, 258}, {359, 18}}</string>
+ <string key="NSFrame">{{203, 241}, {359, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="7693853">
@@ -1141,7 +1577,7 @@
<object class="NSTextField" id="302141262">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 297}, {183, 17}}</string>
+ <string key="NSFrame">{{17, 280}, {183, 17}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="524603578">
@@ -1157,7 +1593,7 @@
<object class="NSTextField" id="265036898">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{425, 164}, {138, 17}}</string>
+ <string key="NSFrame">{{425, 147}, {138, 17}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="596167553">
@@ -1173,7 +1609,7 @@
<object class="NSButton" id="625748362">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{203, 298}, {359, 18}}</string>
+ <string key="NSFrame">{{203, 281}, {359, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="29938940">
@@ -1195,7 +1631,7 @@
<object class="NSButton" id="728219401">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{203, 163}, {129, 18}}</string>
+ <string key="NSFrame">{{203, 146}, {129, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="920748663">
@@ -1217,7 +1653,7 @@
<object class="NSButton" id="563352266">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{203, 278}, {359, 18}}</string>
+ <string key="NSFrame">{{203, 261}, {359, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="516443326">
@@ -1239,7 +1675,7 @@
<object class="NSStepper" id="813674245">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{404, 158}, {19, 27}}</string>
+ <string key="NSFrame">{{404, 141}, {19, 27}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSStepperCell" key="NSCell" id="1061407286">
@@ -1257,7 +1693,7 @@
<object class="NSTextField" id="479121914">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{324, 161}, {75, 22}}</string>
+ <string key="NSFrame">{{324, 144}, {75, 22}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="585678618">
@@ -1327,7 +1763,7 @@
<object class="NSTextField" id="618764971">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 119}, {182, 17}}</string>
+ <string key="NSFrame">{{17, 102}, {182, 17}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="609090823">
@@ -1343,7 +1779,7 @@
<object class="NSTextField" id="423928419">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{205, 117}, {75, 22}}</string>
+ <string key="NSFrame">{{205, 100}, {75, 22}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="82744709">
@@ -1361,7 +1797,7 @@
<object class="NSButton" id="41303511">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{203, 218}, {359, 18}}</string>
+ <string key="NSFrame">{{203, 201}, {359, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="441275">
@@ -1383,7 +1819,7 @@
<object class="NSBox" id="238389133">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{205, 65}, {355, 5}}</string>
+ <string key="NSFrame">{{205, 48}, {355, 5}}</string>
<reference key="NSSuperview" ref="395894064"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1405,7 +1841,7 @@
<object class="NSBox" id="692531763">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{205, 244}, {355, 5}}</string>
+ <string key="NSFrame">{{205, 227}, {355, 5}}</string>
<reference key="NSSuperview" ref="395894064"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1427,7 +1863,7 @@
<object class="NSBox" id="205950287">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{205, 189}, {355, 5}}</string>
+ <string key="NSFrame">{{205, 172}, {355, 5}}</string>
<reference key="NSSuperview" ref="395894064"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1449,7 +1885,7 @@
<object class="NSBox" id="17983744">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{205, 150}, {355, 5}}</string>
+ <string key="NSFrame">{{205, 133}, {355, 5}}</string>
<reference key="NSSuperview" ref="395894064"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1471,7 +1907,7 @@
<object class="NSButton" id="761347322">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{203, 198}, {359, 18}}</string>
+ <string key="NSFrame">{{203, 181}, {359, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="542131730">
@@ -1491,11 +1927,11 @@
</object>
</object>
</object>
- <string key="NSFrameSize">{580, 336}</string>
+ <string key="NSFrameSize">{580, 319}</string>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="593732956">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1730,12 +2166,7 @@
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
</object>
- <object class="NSColor" key="NSTextColor" id="263643234">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">headerTextColor</string>
- <reference key="NSColor" ref="910325493"/>
- </object>
+ <reference key="NSTextColor" ref="263643234"/>
</object>
<object class="NSTextFieldCell" key="NSDataCell" id="396146085">
<int key="NSCellFlags">70385217</int>
@@ -1743,12 +2174,7 @@
<string key="NSContents">Text Cell</string>
<reference key="NSSupport" ref="26"/>
<reference key="NSControlView" ref="279932544"/>
- <object class="NSColor" key="NSBackgroundColor" id="887465699">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlBackgroundColor</string>
- <reference key="NSColor" ref="432854223"/>
- </object>
+ <reference key="NSBackgroundColor" ref="887465699"/>
<reference key="NSTextColor" ref="1035618107"/>
</object>
<int key="NSResizingMask">1</int>
@@ -1767,15 +2193,7 @@
<bytes key="NSRGB">MC44MzkyMTU2OTU5IDAuODY2NjY2Njc0NiAwLjg5ODAzOTIyMTgAA</bytes>
</object>
</object>
- <object class="NSColor" key="NSGridColor" id="651588562">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">gridColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC41AA</bytes>
- </object>
- </object>
+ <reference key="NSGridColor" ref="651588562"/>
<double key="NSRowHeight">45</double>
<int key="NSTvFlags">306184192</int>
<reference key="NSDelegate"/>
@@ -1803,6 +2221,7 @@
<int key="NSsFlags">256</int>
<reference key="NSTarget" ref="533802223"/>
<string key="NSAction">_doScroller:</string>
+ <double key="NSCurValue">0.0027932960074394941</double>
<double key="NSPercent">0.99721449613571167</double>
</object>
<object class="NSScroller" id="2545381">
@@ -3095,7 +3514,6 @@
</object>
</object>
<string key="NSFrameSize">{580, 381}</string>
- <reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="1041614321">
@@ -3106,7 +3524,7 @@
<object class="NSButton" id="624078196">
<reference key="NSNextResponder" ref="1041614321"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{202, 193}, {360, 18}}</string>
+ <string key="NSFrame">{{202, 173}, {360, 18}}</string>
<reference key="NSSuperview" ref="1041614321"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1060471631">
@@ -3128,7 +3546,7 @@
<object class="NSBox" id="122803528">
<reference key="NSNextResponder" ref="1041614321"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{202, 156}, {360, 5}}</string>
+ <string key="NSFrame">{{202, 136}, {360, 5}}</string>
<reference key="NSSuperview" ref="1041614321"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -3150,7 +3568,7 @@
<object class="NSButton" id="385216684">
<reference key="NSNextResponder" ref="1041614321"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{202, 170}, {360, 18}}</string>
+ <string key="NSFrame">{{202, 150}, {360, 18}}</string>
<reference key="NSSuperview" ref="1041614321"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="695439962">
@@ -3172,7 +3590,7 @@
<object class="NSButton" id="894039889">
<reference key="NSNextResponder" ref="1041614321"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{202, 130}, {360, 18}}</string>
+ <string key="NSFrame">{{202, 110}, {360, 18}}</string>
<reference key="NSSuperview" ref="1041614321"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="641765383">
@@ -3194,7 +3612,7 @@
<object class="NSButton" id="638138321">
<reference key="NSNextResponder" ref="1041614321"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{230, 107}, {332, 18}}</string>
+ <string key="NSFrame">{{230, 87}, {332, 18}}</string>
<reference key="NSSuperview" ref="1041614321"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="135236421">
@@ -3216,7 +3634,7 @@
<object class="NSButton" id="967639780">
<reference key="NSNextResponder" ref="1041614321"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{230, 61}, {332, 18}}</string>
+ <string key="NSFrame">{{230, 41}, {332, 18}}</string>
<reference key="NSSuperview" ref="1041614321"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="510254021">
@@ -3238,7 +3656,7 @@
<object class="NSButton" id="705623520">
<reference key="NSNextResponder" ref="1041614321"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{230, 84}, {332, 18}}</string>
+ <string key="NSFrame">{{230, 64}, {332, 18}}</string>
<reference key="NSSuperview" ref="1041614321"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="29352039">
@@ -3260,7 +3678,7 @@
<object class="NSButton" id="184242117">
<reference key="NSNextResponder" ref="1041614321"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{230, 38}, {332, 18}}</string>
+ <string key="NSFrame">{{230, 18}, {332, 18}}</string>
<reference key="NSSuperview" ref="1041614321"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="545580787">
@@ -3280,7 +3698,7 @@
</object>
</object>
</object>
- <string key="NSFrameSize">{580, 229}</string>
+ <string key="NSFrameSize">{580, 209}</string>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="369742224">
@@ -3291,7 +3709,7 @@
<object class="NSBox" id="185366293">
<reference key="NSNextResponder" ref="369742224"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{204, 155}, {356, 5}}</string>
+ <string key="NSFrame">{{204, 135}, {356, 5}}</string>
<reference key="NSSuperview" ref="369742224"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -3313,7 +3731,7 @@
<object class="NSButton" id="467474047">
<reference key="NSNextResponder" ref="369742224"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{203, 101}, {359, 18}}</string>
+ <string key="NSFrame">{{203, 81}, {359, 18}}</string>
<reference key="NSSuperview" ref="369742224"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="699261423">
@@ -3334,7 +3752,7 @@
<object class="NSButton" id="390491056">
<reference key="NSNextResponder" ref="369742224"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{202, 164}, {360, 18}}</string>
+ <string key="NSFrame">{{202, 144}, {360, 18}}</string>
<reference key="NSSuperview" ref="369742224"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="638010774">
@@ -3355,7 +3773,7 @@
<object class="NSButton" id="951909881">
<reference key="NSNextResponder" ref="369742224"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{198, 32}, {178, 32}}</string>
+ <string key="NSFrame">{{198, 12}, {178, 32}}</string>
<reference key="NSSuperview" ref="369742224"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="905416501">
@@ -3375,7 +3793,7 @@
<object class="NSTextField" id="330050984">
<reference key="NSNextResponder" ref="369742224"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 69}, {181, 17}}</string>
+ <string key="NSFrame">{{17, 49}, {181, 17}}</string>
<reference key="NSSuperview" ref="369742224"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="32693158">
@@ -3391,7 +3809,7 @@
<object class="NSTextField" id="29700160">
<reference key="NSNextResponder" ref="369742224"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{201, 69}, {362, 17}}</string>
+ <string key="NSFrame">{{201, 49}, {362, 17}}</string>
<reference key="NSSuperview" ref="369742224"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1046240552">
@@ -3448,7 +3866,7 @@ AQAAAAA</bytes>
<object class="NSBox" id="389135821">
<reference key="NSNextResponder" ref="369742224"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{204, 92}, {356, 5}}</string>
+ <string key="NSFrame">{{204, 72}, {356, 5}}</string>
<reference key="NSSuperview" ref="369742224"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -3470,7 +3888,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="1030541779">
<reference key="NSNextResponder" ref="369742224"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 131}, {181, 17}}</string>
+ <string key="NSFrame">{{17, 111}, {181, 17}}</string>
<reference key="NSSuperview" ref="369742224"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="250240617">
@@ -3486,7 +3904,7 @@ AQAAAAA</bytes>
<object class="NSPopUpButton" id="1064689843">
<reference key="NSNextResponder" ref="369742224"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{201, 125}, {172, 26}}</string>
+ <string key="NSFrame">{{201, 105}, {172, 26}}</string>
<reference key="NSSuperview" ref="369742224"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="526160091">
@@ -3553,7 +3971,7 @@ AQAAAAA</bytes>
</object>
</object>
</object>
- <string key="NSFrameSize">{580, 200}</string>
+ <string key="NSFrameSize">{580, 180}</string>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="769132533">
@@ -3564,7 +3982,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="746894224">
<reference key="NSNextResponder" ref="769132533"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{11, 76}, {188, 17}}</string>
+ <string key="NSFrame">{{11, 56}, {188, 17}}</string>
<reference key="NSSuperview" ref="769132533"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1057393276">
@@ -3580,7 +3998,7 @@ AQAAAAA</bytes>
<object class="NSButton" id="64545568">
<reference key="NSNextResponder" ref="769132533"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{202, 38}, {360, 18}}</string>
+ <string key="NSFrame">{{202, 18}, {360, 18}}</string>
<reference key="NSSuperview" ref="769132533"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="151662644">
@@ -3602,7 +4020,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="591009529">
<reference key="NSNextResponder" ref="769132533"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{204, 73}, {50, 22}}</string>
+ <string key="NSFrame">{{204, 53}, {50, 22}}</string>
<reference key="NSSuperview" ref="769132533"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="170658213">
@@ -3664,7 +4082,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="794722267">
<reference key="NSNextResponder" ref="769132533"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{259, 76}, {304, 17}}</string>
+ <string key="NSFrame">{{259, 56}, {304, 17}}</string>
<reference key="NSSuperview" ref="769132533"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="619604330">
@@ -3680,7 +4098,7 @@ AQAAAAA</bytes>
<object class="NSBox" id="688014148">
<reference key="NSNextResponder" ref="769132533"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{204, 62}, {356, 5}}</string>
+ <string key="NSFrame">{{204, 42}, {356, 5}}</string>
<reference key="NSSuperview" ref="769132533"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -3700,7 +4118,7 @@ AQAAAAA</bytes>
<bool key="NSTransparent">NO</bool>
</object>
</object>
- <string key="NSFrameSize">{580, 113}</string>
+ <string key="NSFrameSize">{580, 93}</string>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="1033452264">
@@ -3711,7 +4129,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="187965597">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{124, 28}, {121, 14}}</string>
+ <string key="NSFrame">{{124, 27}, {121, 14}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="983858855">
@@ -3727,7 +4145,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="919512780">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{49, 28}, {83, 14}}</string>
+ <string key="NSFrame">{{49, 27}, {83, 14}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="133660147">
@@ -3862,7 +4280,7 @@ AQAAAAA</bytes>
<double key="NSPercent">0.57142859697341919</double>
</object>
</object>
- <string key="NSFrame">{{20, 55}, {222, 244}}</string>
+ <string key="NSFrame">{{20, 54}, {222, 244}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<reference key="NSNextKeyView" ref="25515031"/>
<int key="NSsFlags">2</int>
@@ -3874,7 +4292,7 @@ AQAAAAA</bytes>
<object class="NSPopUpButton" id="748242000">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{20, 23}, {24, 24}}</string>
+ <string key="NSFrame">{{20, 22}, {24, 24}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="373813305">
@@ -3934,7 +4352,7 @@ AQAAAAA</bytes>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
- <bool key="NSMenuExcludeMarkColumn">YES</bool>
+ <bool key="NSNoAutoenable">YES</bool>
</object>
</object>
<object class="NSMenuItem" id="164147578">
@@ -3949,31 +4367,32 @@ AQAAAAA</bytes>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="373813305"/>
</object>
- <object class="NSMenuItem" id="726637834">
+ <object class="NSMenuItem" id="62630352">
<reference key="NSMenu" ref="28667448"/>
- <string key="NSTitle">Export Current Color Theme…</string>
+ <string key="NSTitle">Import Color Theme…</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="1039721224"/>
<reference key="NSMixedImage" ref="720177216"/>
<string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">2</int>
+ <int key="NSTag">1</int>
<reference key="NSTarget" ref="373813305"/>
</object>
- <object class="NSMenuItem" id="62630352">
+ <object class="NSMenuItem" id="726637834">
<reference key="NSMenu" ref="28667448"/>
- <string key="NSTitle">Import Color Theme…</string>
+ <string key="NSTitle">Export Current Color Theme…</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="1039721224"/>
<reference key="NSMixedImage" ref="720177216"/>
<string key="NSAction">_popUpItemAction:</string>
- <int key="NSTag">1</int>
+ <int key="NSTag">2</int>
<reference key="NSTarget" ref="373813305"/>
</object>
</object>
+ <bool key="NSNoAutoenable">YES</bool>
<reference key="NSMenuFont" ref="320262838"/>
</object>
<bool key="NSPullDown">YES</bool>
@@ -3985,7 +4404,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="1018119488">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{407, 21}, {23, 19}}</string>
+ <string key="NSFrame">{{407, 20}, {23, 19}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="248584789">
@@ -4057,7 +4476,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="304684720">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{269, 23}, {133, 17}}</string>
+ <string key="NSFrame">{{269, 22}, {133, 17}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="273262177">
@@ -4073,7 +4492,7 @@ AQAAAAA</bytes>
<object class="NSStepper" id="161634003">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{437, 19}, {15, 22}}</string>
+ <string key="NSFrame">{{437, 18}, {15, 22}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSStepperCell" key="NSCell" id="93125704">
@@ -4091,7 +4510,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="676806550">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 323}, {182, 17}}</string>
+ <string key="NSFrame">{{17, 322}, {182, 17}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="10706281">
@@ -4127,14 +4546,14 @@ AQAAAAA</bytes>
<object class="NSTextField" id="751188139">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{204, 321}, {207, 19}}</string>
+ <string key="NSFrame">{{204, 320}, {207, 22}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="66452133">
<int key="NSCellFlags">-2076049856</int>
- <int key="NSCellFlags2">4327424</int>
+ <int key="NSCellFlags2">4196352</int>
<string key="NSContents"/>
- <reference key="NSSupport" ref="26"/>
+ <reference key="NSSupport" ref="320262838"/>
<reference key="NSControlView" ref="751188139"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="1001357688"/>
@@ -4144,7 +4563,7 @@ AQAAAAA</bytes>
<object class="NSButton" id="7445657">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{270, 283}, {292, 18}}</string>
+ <string key="NSFrame">{{270, 282}, {292, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="823431848">
@@ -4166,7 +4585,7 @@ AQAAAAA</bytes>
<object class="NSButton" id="571822117">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{270, 254}, {292, 18}}</string>
+ <string key="NSFrame">{{270, 253}, {292, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="743257684">
@@ -4188,7 +4607,7 @@ AQAAAAA</bytes>
<object class="NSButton" id="1030846368">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{270, 196}, {292, 18}}</string>
+ <string key="NSFrame">{{270, 195}, {292, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="231642073">
@@ -4210,7 +4629,7 @@ AQAAAAA</bytes>
<object class="NSButton" id="397485802">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{270, 225}, {292, 18}}</string>
+ <string key="NSFrame">{{270, 224}, {292, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="491730308">
@@ -4232,7 +4651,7 @@ AQAAAAA</bytes>
<object class="NSButton" id="787536920">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{270, 139}, {292, 18}}</string>
+ <string key="NSFrame">{{270, 138}, {292, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="496801621">
@@ -4254,7 +4673,7 @@ AQAAAAA</bytes>
<object class="NSButton" id="782193237">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{270, 52}, {292, 18}}</string>
+ <string key="NSFrame">{{270, 51}, {292, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="131748905">
@@ -4276,7 +4695,7 @@ AQAAAAA</bytes>
<object class="NSButton" id="827082642">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{270, 110}, {292, 18}}</string>
+ <string key="NSFrame">{{270, 109}, {292, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="92164221">
@@ -4298,7 +4717,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="184945490">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{370, 85}, {29, 19}}</string>
+ <string key="NSFrame">{{370, 84}, {29, 19}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="409964321">
@@ -4371,7 +4790,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="892250776">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{269, 87}, {96, 14}}</string>
+ <string key="NSFrame">{{269, 86}, {96, 14}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1060023867">
@@ -4387,7 +4806,7 @@ AQAAAAA</bytes>
<object class="NSStepper" id="107658761">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{405, 83}, {15, 22}}</string>
+ <string key="NSFrame">{{405, 82}, {15, 22}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSStepperCell" key="NSCell" id="171005061">
@@ -4405,7 +4824,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="1009372112">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{423, 87}, {140, 14}}</string>
+ <string key="NSFrame">{{423, 86}, {140, 14}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="201150384">
@@ -4421,7 +4840,7 @@ AQAAAAA</bytes>
<object class="NSButton" id="774563613">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">-2147483380</int>
- <string key="NSFrame">{{270, -10}, {292, 18}}</string>
+ <string key="NSFrame">{{270, -11}, {292, 18}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="420702000">
@@ -4443,7 +4862,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="16021182">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{370, 171}, {29, 19}}</string>
+ <string key="NSFrame">{{370, 170}, {29, 19}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="992523117">
@@ -4516,7 +4935,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="140155660">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{269, 173}, {96, 14}}</string>
+ <string key="NSFrame">{{269, 172}, {96, 14}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="499174965">
@@ -4532,7 +4951,7 @@ AQAAAAA</bytes>
<object class="NSStepper" id="682694750">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{405, 169}, {15, 22}}</string>
+ <string key="NSFrame">{{405, 168}, {15, 22}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSStepperCell" key="NSCell" id="266600395">
@@ -4550,7 +4969,7 @@ AQAAAAA</bytes>
<object class="NSTextField" id="659498064">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{423, 173}, {140, 14}}</string>
+ <string key="NSFrame">{{423, 172}, {140, 14}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="516695546">
@@ -4566,7 +4985,7 @@ AQAAAAA</bytes>
<object class="NSBox" id="863604695">
<reference key="NSNextResponder" ref="1033452264"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{204, 310}, {356, 5}}</string>
+ <string key="NSFrame">{{204, 309}, {356, 5}}</string>
<reference key="NSSuperview" ref="1033452264"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -4586,449 +5005,9 @@ AQAAAAA</bytes>
<bool key="NSTransparent">NO</bool>
</object>
</object>
- <string key="NSFrameSize">{580, 361}</string>
+ <string key="NSFrameSize">{580, 360}</string>
<string key="NSClassName">NSView</string>
</object>
- <object class="NSUserDefaultsController" id="151174232">
- <bool key="NSSharedInstance">YES</bool>
- </object>
- <object class="NSArrayController" id="937123943">
- <object class="NSMutableArray" key="NSDeclaredKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>name</string>
- <string>fav</string>
- <string>host</string>
- <string>user</string>
- <string>database</string>
- <string>socket</string>
- <string>port</string>
- <string>useSSH</string>
- <string>sshHost</string>
- <string>sshUser</string>
- <string>sshPort</string>
- <object class="NSMutableString">
- <characters key="NS.bytes">selectedFavoritePassword</characters>
- </object>
- <string>DisplayTableViewVerticalGridlines</string>
- <string>type</string>
- <string>TableRowCountQueryLevel</string>
- <string>sshKeyLocationEnabled</string>
- <string>sshKeyLocation</string>
- <string>useSSL</string>
- <string>sslKeyFileLocation</string>
- <string>sslKeyFileLocationEnabled</string>
- <string>sslCertificateFileLocation</string>
- <string>sslCertificateFileLocationEnabled</string>
- <string>sslCACertFileLocation</string>
- <string>sslCACertFileLocationEnabled</string>
- </object>
- <bool key="NSEditable">YES</bool>
- <bool key="NSAutomaticallyPreparesContent">YES</bool>
- <object class="_NSManagedProxy" key="_NSManagedProxy"/>
- <bool key="NSSelectsInsertedObjects">YES</bool>
- <bool key="NSFilterRestrictsInsertion">YES</bool>
- <bool key="NSClearsFilterPredicateOnInsertion">YES</bool>
- </object>
- <object class="NSCustomObject" id="721264488">
- <string key="NSClassName">SUUpdater</string>
- </object>
- <object class="NSMenu" id="982657201">
- <string key="NSTitle"/>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="30395779">
- <reference key="NSMenu" ref="982657201"/>
- <string key="NSTitle">Remove</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="1039721224"/>
- <reference key="NSMixedImage" ref="720177216"/>
- </object>
- <object class="NSMenuItem" id="580038192">
- <reference key="NSMenu" ref="982657201"/>
- <string key="NSTitle">Duplicate</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="1039721224"/>
- <reference key="NSMixedImage" ref="720177216"/>
- </object>
- <object class="NSMenuItem" id="102426580">
- <reference key="NSMenu" ref="982657201"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="1039721224"/>
- <reference key="NSMixedImage" ref="720177216"/>
- </object>
- <object class="NSMenuItem" id="512106570">
- <reference key="NSMenu" ref="982657201"/>
- <string key="NSTitle">Make Default</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="1039721224"/>
- <reference key="NSMixedImage" ref="720177216"/>
- </object>
- </object>
- </object>
- <object class="NSWindowTemplate" id="1034673896">
- <int key="NSWindowStyleMask">1</int>
- <int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{343, 471}, {247, 124}}</string>
- <int key="NSWTFlags">1886912512</int>
- <string key="NSWindowTitle"/>
- <string key="NSWindowClass">NSWindow</string>
- <object class="NSMutableString" key="NSViewClass">
- <characters key="NS.bytes">View</characters>
- </object>
- <string key="NSWindowContentMaxSize">{247, 124}</string>
- <string key="NSWindowContentMinSize">{247, 124}</string>
- <object class="NSView" key="NSWindowView" id="985350347">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTextField" id="294234359">
- <reference key="NSNextResponder" ref="985350347"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{17, 96}, {213, 14}}</string>
- <reference key="NSSuperview" ref="985350347"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="276434863">
- <int key="NSCellFlags">68288064</int>
- <int key="NSCellFlags2">4195328</int>
- <string key="NSContents">Name:</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="294234359"/>
- <reference key="NSBackgroundColor" ref="700609571"/>
- <reference key="NSTextColor" ref="1035618107"/>
- </object>
- </object>
- <object class="NSTextField" id="202566886">
- <reference key="NSNextResponder" ref="985350347"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{18, 55}, {212, 11}}</string>
- <reference key="NSSuperview" ref="985350347"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="803513953">
- <int key="NSCellFlags">68288064</int>
- <int key="NSCellFlags2">4457472</int>
- <string key="NSContents">already exists and will be overwritten!</string>
- <object class="NSFont" key="NSSupport">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">9</double>
- <int key="NSfFlags">3614</int>
- </object>
- <reference key="NSControlView" ref="202566886"/>
- <reference key="NSBackgroundColor" ref="700609571"/>
- <reference key="NSTextColor" ref="1035618107"/>
- </object>
- </object>
- <object class="NSTextField" id="336557380">
- <reference key="NSNextResponder" ref="985350347"/>
- <int key="NSvFlags">258</int>
- <string key="NSFrame">{{20, 70}, {207, 18}}</string>
- <reference key="NSSuperview" ref="985350347"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="17465994">
- <int key="NSCellFlags">-1804468671</int>
- <int key="NSCellFlags2">4326400</int>
- <string key="NSContents"/>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="336557380"/>
- <bool key="NSDrawsBackground">YES</bool>
- <reference key="NSBackgroundColor" ref="1001357688"/>
- <reference key="NSTextColor" ref="6928728"/>
- </object>
- </object>
- <object class="NSButton" id="107835671">
- <reference key="NSNextResponder" ref="985350347"/>
- <int key="NSvFlags">259</int>
- <string key="NSFrame">{{132, 13}, {100, 28}}</string>
- <reference key="NSSuperview" ref="985350347"/>
- <int key="NSTag">1</int>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="460571945">
- <int key="NSCellFlags">604110336</int>
- <int key="NSCellFlags2">138018816</int>
- <string key="NSContents">Save</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="107835671"/>
- <int key="NSTag">1</int>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <object class="NSFont" key="NSAlternateImage" id="937783764">
- <string key="NSName">Helvetica</string>
- <double key="NSSize">11</double>
- <int key="NSfFlags">16</int>
- </object>
- <string key="NSAlternateContents"/>
- <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="76427887">
- <reference key="NSNextResponder" ref="985350347"/>
- <int key="NSvFlags">259</int>
- <string key="NSFrame">{{15, 13}, {99, 28}}</string>
- <reference key="NSSuperview" ref="985350347"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="748282128">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">138018816</int>
- <string key="NSContents">Cancel</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="76427887"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <reference key="NSAlternateImage" ref="937783764"/>
- <string key="NSAlternateContents"/>
- <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- </object>
- <string key="NSFrameSize">{247, 124}</string>
- </object>
- <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
- <string key="NSMinSize">{247, 146}</string>
- <string key="NSMaxSize">{247, 146}</string>
- </object>
- <object class="NSWindowTemplate" id="97056925">
- <int key="NSWindowStyleMask">1</int>
- <int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{343, 321}, {264, 274}}</string>
- <int key="NSWTFlags">1886912512</int>
- <string key="NSWindowTitle"/>
- <string key="NSWindowClass">NSWindow</string>
- <object class="NSMutableString" key="NSViewClass">
- <characters key="NS.bytes">View</characters>
- </object>
- <string key="NSWindowContentMaxSize">{264, 274}</string>
- <string key="NSWindowContentMinSize">{264, 274}</string>
- <object class="NSView" key="NSWindowView" id="57365153">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSButton" id="514064864">
- <reference key="NSNextResponder" ref="57365153"/>
- <int key="NSvFlags">259</int>
- <string key="NSFrame">{{161, 13}, {88, 28}}</string>
- <reference key="NSSuperview" ref="57365153"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="654781355">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">138018816</int>
- <string key="NSContents">Close</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="514064864"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <reference key="NSAlternateImage" ref="937783764"/>
- <string key="NSAlternateContents"/>
- <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSScrollView" id="959162340">
- <reference key="NSNextResponder" ref="57365153"/>
- <int key="NSvFlags">268</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSClipView" id="756280557">
- <reference key="NSNextResponder" ref="959162340"/>
- <int key="NSvFlags">2304</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTableView" id="383184631">
- <reference key="NSNextResponder" ref="756280557"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{264, 187}</string>
- <reference key="NSSuperview" ref="756280557"/>
- <bool key="NSEnabled">YES</bool>
- <object class="_NSCornerView" key="NSCornerView">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{224, 0}, {16, 17}}</string>
- </object>
- <object class="NSMutableArray" key="NSTableColumns">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTableColumn" id="10137583">
- <double key="NSWidth">261</double>
- <double key="NSMinWidth">40</double>
- <double key="NSMaxWidth">1000</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents"/>
- <reference key="NSSupport" ref="26"/>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
- </object>
- <reference key="NSTextColor" ref="263643234"/>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell" id="411363849">
- <int key="NSCellFlags">337772096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">Text Cell</string>
- <reference key="NSSupport" ref="320262838"/>
- <reference key="NSControlView" ref="383184631"/>
- <reference key="NSBackgroundColor" ref="887465699"/>
- <reference key="NSTextColor" ref="1035618107"/>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
- <reference key="NSTableView" ref="383184631"/>
- </object>
- </object>
- <double key="NSIntercellSpacingWidth">3</double>
- <double key="NSIntercellSpacingHeight">2</double>
- <reference key="NSBackgroundColor" ref="887465699"/>
- <reference key="NSGridColor" ref="651588562"/>
- <double key="NSRowHeight">17</double>
- <int key="NSTvFlags">37748736</int>
- <reference key="NSDelegate"/>
- <reference key="NSDataSource"/>
- <int key="NSColumnAutoresizingStyle">4</int>
- <int key="NSDraggingSourceMaskForLocal">15</int>
- <int key="NSDraggingSourceMaskForNonLocal">0</int>
- <bool key="NSAllowsTypeSelect">YES</bool>
- <int key="NSTableViewDraggingDestinationStyle">0</int>
- </object>
- </object>
- <string key="NSFrame">{{1, 1}, {264, 187}}</string>
- <reference key="NSSuperview" ref="959162340"/>
- <reference key="NSNextKeyView" ref="383184631"/>
- <reference key="NSDocView" ref="383184631"/>
- <reference key="NSBGColor" ref="887465699"/>
- <int key="NScvFlags">4</int>
- </object>
- <object class="NSScroller" id="155347350">
- <reference key="NSNextResponder" ref="959162340"/>
- <int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{224, 17}, {15, 102}}</string>
- <reference key="NSSuperview" ref="959162340"/>
- <reference key="NSTarget" ref="959162340"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.99468082189559937</double>
- </object>
- <object class="NSScroller" id="275029977">
- <reference key="NSNextResponder" ref="959162340"/>
- <int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{-100, -100}, {223, 15}}</string>
- <reference key="NSSuperview" ref="959162340"/>
- <int key="NSsFlags">1</int>
- <reference key="NSTarget" ref="959162340"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.57142859697341919</double>
- </object>
- </object>
- <string key="NSFrame">{{-1, 74}, {266, 189}}</string>
- <reference key="NSSuperview" ref="57365153"/>
- <reference key="NSNextKeyView" ref="756280557"/>
- <int key="NSsFlags">530</int>
- <reference key="NSVScroller" ref="155347350"/>
- <reference key="NSHScroller" ref="275029977"/>
- <reference key="NSContentView" ref="756280557"/>
- <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
- </object>
- <object class="BWAnchoredButtonBar" id="420699923">
- <reference key="NSNextResponder" ref="57365153"/>
- <int key="NSvFlags">268</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="BWAnchoredButton" id="920987860">
- <reference key="NSNextResponder" ref="420699923"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{-1, -1}, {32, 24}}</string>
- <reference key="NSSuperview" ref="420699923"/>
- <bool key="NSEnabled">YES</bool>
- <object class="BWAnchoredButtonCell" key="NSCell" id="971049756">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">134348800</int>
- <string key="NSContents"/>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="920987860"/>
- <int key="NSButtonFlags">-2033958657</int>
- <int key="NSButtonFlags2">268435491</int>
- <object class="NSCustomResource" key="NSNormalImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">button_duplicate</string>
- </object>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent">d</string>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="BWAnchoredButton" id="443927336">
- <reference key="NSNextResponder" ref="420699923"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{30, -1}, {32, 24}}</string>
- <reference key="NSSuperview" ref="420699923"/>
- <bool key="NSEnabled">YES</bool>
- <object class="BWAnchoredButtonCell" key="NSCell" id="244371175">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">134348800</int>
- <string key="NSContents"/>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="443927336"/>
- <int key="NSButtonFlags">-2033958657</int>
- <int key="NSButtonFlags2">35</int>
- <object class="NSCustomResource" key="NSNormalImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">button_remove</string>
- </object>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"></string>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- </object>
- <string key="NSFrame">{{0, 52}, {280, 23}}</string>
- <reference key="NSSuperview" ref="57365153"/>
- <bool key="BWABBIsResizable">YES</bool>
- <bool key="BWABBIsAtBottom">YES</bool>
- <bool key="BWABBHandleIsRightAligned">NO</bool>
- <int key="BWABBSelectedIndex">0</int>
- </object>
- <object class="NSBox" id="1025166199">
- <reference key="NSNextResponder" ref="57365153"/>
- <int key="NSvFlags">12</int>
- <string key="NSFrame">{{-1, 49}, {265, 5}}</string>
- <reference key="NSSuperview" ref="57365153"/>
- <string key="NSOffsets">{0, 0}</string>
- <object class="NSTextFieldCell" key="NSTitleCell">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">0</int>
- <string key="NSContents">Box</string>
- <reference key="NSSupport" ref="320262838"/>
- <reference key="NSBackgroundColor" ref="1001357688"/>
- <object class="NSColor" key="NSTextColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
- </object>
- </object>
- <int key="NSBorderType">3</int>
- <int key="NSBoxType">2</int>
- <int key="NSTitlePosition">0</int>
- <bool key="NSTransparent">NO</bool>
- </object>
- </object>
- <string key="NSFrameSize">{264, 274}</string>
- </object>
- <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
- <string key="NSMinSize">{264, 296}</string>
- <string key="NSMaxSize">{264, 296}</string>
- </object>
<object class="NSCustomView" id="301032184">
<nil key="NSNextResponder"/>
<int key="NSvFlags">274</int>
@@ -5055,7 +5034,7 @@ AQAAAAA</bytes>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="46104894">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -5077,7 +5056,6 @@ AQAAAAA</bytes>
</object>
</object>
<string key="NSFrameSize">{579, 34}</string>
- <reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="962978272">
@@ -5130,27 +5108,51 @@ AQAAAAA</bytes>
<string key="NSFrameSize">{579, 51}</string>
<string key="NSClassName">NSView</string>
</object>
+ <object class="NSMenu" id="982657201">
+ <string key="NSTitle"/>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="30395779">
+ <reference key="NSMenu" ref="982657201"/>
+ <string key="NSTitle">Remove</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="1039721224"/>
+ <reference key="NSMixedImage" ref="720177216"/>
+ </object>
+ <object class="NSMenuItem" id="580038192">
+ <reference key="NSMenu" ref="982657201"/>
+ <string key="NSTitle">Duplicate</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="1039721224"/>
+ <reference key="NSMixedImage" ref="720177216"/>
+ </object>
+ <object class="NSMenuItem" id="102426580">
+ <reference key="NSMenu" ref="982657201"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="1039721224"/>
+ <reference key="NSMixedImage" ref="720177216"/>
+ </object>
+ <object class="NSMenuItem" id="512106570">
+ <reference key="NSMenu" ref="982657201"/>
+ <string key="NSTitle">Make Default</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="1039721224"/>
+ <reference key="NSMixedImage" ref="720177216"/>
+ </object>
+ </object>
+ </object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">generalView</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="594324362"/>
- </object>
- <int key="connectionID">21</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">notificationsView</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1041614321"/>
- </object>
- <int key="connectionID">59</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.SUEnableAutomaticChecks</string>
<reference key="source" ref="390491056"/>
@@ -5191,22 +5193,6 @@ AQAAAAA</bytes>
<int key="connectionID">332</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="279932544"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">415</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dataSource</string>
- <reference key="source" ref="279932544"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">416</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">takeIntValueFrom:</string>
<reference key="source" ref="479121914"/>
@@ -5216,14 +5202,6 @@ AQAAAAA</bytes>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">tablesView</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="395894064"/>
- </object>
- <int key="connectionID">539</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1005"/>
<reference key="destination" ref="1001"/>
@@ -5232,14 +5210,6 @@ AQAAAAA</bytes>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">preferencesWindow</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1005"/>
- </object>
- <int key="connectionID">600</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="1005"/>
@@ -5471,14 +5441,6 @@ AQAAAAA</bytes>
<int key="connectionID">632</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">autoUpdateView</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="369742224"/>
- </object>
- <int key="connectionID">672</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.ConnectionTimeoutValue</string>
<reference key="source" ref="591009529"/>
@@ -5511,14 +5473,6 @@ AQAAAAA</bytes>
<int key="connectionID">680</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">networkView</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="769132533"/>
- </object>
- <int key="connectionID">682</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: arrangedObjects.name</string>
<reference key="source" ref="22246087"/>
@@ -5540,54 +5494,6 @@ AQAAAAA</bytes>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">defaultFavoritePopup</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="331339372"/>
- </object>
- <int key="connectionID">713</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">favoritesController</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="937123943"/>
- </object>
- <int key="connectionID">714</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">favoritesTableView</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="279932544"/>
- </object>
- <int key="connectionID">715</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">favoritesView</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="593732956"/>
- </object>
- <int key="connectionID">716</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">updateDefaultFavorite:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="331339372"/>
- </object>
- <int key="connectionID">720</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="415835787"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">773</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="77492794"/>
<reference key="destination" ref="1001"/>
@@ -5605,14 +5511,6 @@ AQAAAAA</bytes>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
- <reference key="source" ref="755342553"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">776</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
<reference key="source" ref="796172881"/>
<reference key="destination" ref="1001"/>
</object>
@@ -5664,22 +5562,6 @@ AQAAAAA</bytes>
<int key="connectionID">800</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="141072039"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">801</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">editorView</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1033452264"/>
- </object>
- <int key="connectionID">928</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.NewFieldsAllowNulls</string>
<reference key="source" ref="761347322"/>
@@ -5697,26 +5579,6 @@ AQAAAAA</bytes>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
- <string key="label">value: growlEnabled</string>
- <reference key="source" ref="624078196"/>
- <reference key="destination" ref="1001"/>
- <object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="624078196"/>
- <reference key="NSDestination" ref="1001"/>
- <string key="NSLabel">value: growlEnabled</string>
- <string key="NSBinding">value</string>
- <string key="NSKeyPath">growlEnabled</string>
- <object class="NSDictionary" key="NSOptions">
- <string key="NS.key.0">NSNullPlaceholder</string>
- <integer value="1" key="NS.object.0"/>
- </object>
- <int key="NSNibBindingConnectorVersion">2</int>
- </object>
- </object>
- <int key="connectionID">956</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBBindingConnection" key="connection">
<string key="label">value: values.DisplayTableViewVerticalGridlines</string>
<reference key="source" ref="302000957"/>
<reference key="destination" ref="151174232"/>
@@ -5732,22 +5594,6 @@ AQAAAAA</bytes>
<int key="connectionID">961</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">showCustomQueryFontPanel:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="742042283"/>
- </object>
- <int key="connectionID">1087</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">editorFontName</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="751188139"/>
- </object>
- <int key="connectionID">1088</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.CustomQueryAutoUppercaseKeywords</string>
<reference key="source" ref="397485802"/>
@@ -5925,14 +5771,6 @@ AQAAAAA</bytes>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">sshPasswordField</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="663701836"/>
- </object>
- <int key="connectionID">1115</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="905879958"/>
<reference key="destination" ref="1001"/>
@@ -5950,14 +5788,6 @@ AQAAAAA</bytes>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
- <reference key="source" ref="663701836"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">1120</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
<reference key="source" ref="781513571"/>
<reference key="destination" ref="1001"/>
</object>
@@ -6080,14 +5910,6 @@ AQAAAAA</bytes>
<int key="connectionID">1179</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">favoritesTabView</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="961025550"/>
- </object>
- <int key="connectionID">1191</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">selectedIndex: selection.type</string>
<reference key="source" ref="1065964214"/>
@@ -6134,22 +5956,6 @@ AQAAAAA</bytes>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">sshSQLPasswordField</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="602383030"/>
- </object>
- <int key="connectionID">1298</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="602383030"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">1299</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="917213113"/>
<reference key="destination" ref="1001"/>
@@ -6183,44 +5989,12 @@ AQAAAAA</bytes>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
- <reference key="source" ref="340136489"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">1306</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">socketPasswordField</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="340136489"/>
- </object>
- <int key="connectionID">1307</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
<reference key="source" ref="634238753"/>
<reference key="destination" ref="1001"/>
</object>
<int key="connectionID">1308</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">standardPasswordField</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="755342553"/>
- </object>
- <int key="connectionID">1312</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">favoriteTypeDidChange:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1065964214"/>
- </object>
- <int key="connectionID">1329</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: selection.host</string>
<reference key="source" ref="77492794"/>
@@ -6728,54 +6502,6 @@ AQAAAAA</bytes>
<int key="connectionID">1368</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">favoriteHostTextField</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="77492794"/>
- </object>
- <int key="connectionID">1373</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">favoriteUserTextField</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="133134378"/>
- </object>
- <int key="connectionID">1374</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">favoriteNameTextField</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="415835787"/>
- </object>
- <int key="connectionID">1375</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">favoriteUserTextFieldSocket</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="119091130"/>
- </object>
- <int key="connectionID">1376</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">favoriteHostTextFieldSSH</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="619305072"/>
- </object>
- <int key="connectionID">1377</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">favoriteUserTextFieldSSH</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="917213113"/>
- </object>
- <int key="connectionID">1378</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.ConsoleEnableInterfaceLogging</string>
<reference key="source" ref="638138321"/>
@@ -6840,14 +6566,6 @@ AQAAAAA</bytes>
<int key="connectionID">1382</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">tableCell</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="396146085"/>
- </object>
- <int key="connectionID">1383</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">selectedTag: values.DefaultViewMode</string>
<reference key="source" ref="649933712"/>
@@ -6880,22 +6598,6 @@ AQAAAAA</bytes>
<int key="connectionID">1484</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">globalResultTableFontName</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="416182097"/>
- </object>
- <int key="connectionID">1493</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">showGlobalResultTableFontPanel:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="401684657"/>
- </object>
- <int key="connectionID">1494</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">takeIntegerValueFrom:</string>
<reference key="source" ref="1018119488"/>
@@ -7096,22 +6798,6 @@ AQAAAAA</bytes>
<int key="connectionID">1552</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">removeFavorite:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="30395779"/>
- </object>
- <int key="connectionID">1553</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">duplicateFavorite:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="580038192"/>
- </object>
- <int key="connectionID">1554</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="982657201"/>
@@ -7120,70 +6806,6 @@ AQAAAAA</bytes>
<int key="connectionID">1555</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">addFavorite:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="364724557"/>
- </object>
- <int key="connectionID">1605</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">removeFavorite:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="393964112"/>
- </object>
- <int key="connectionID">1606</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">duplicateFavorite:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="3479828"/>
- </object>
- <int key="connectionID">1607</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">sortFavorites:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="143086279"/>
- </object>
- <int key="connectionID">1608</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">sortFavorites:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="760230945"/>
- </object>
- <int key="connectionID">1609</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">sortFavorites:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="334938006"/>
- </object>
- <int key="connectionID">1610</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">reverseFavoritesSortOrder:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="140840656"/>
- </object>
- <int key="connectionID">1611</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">splitViewButtonBar</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1068562664"/>
- </object>
- <int key="connectionID">1612</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.SUSendProfileInfo</string>
<reference key="source" ref="467474047"/>
@@ -7236,70 +6858,6 @@ AQAAAAA</bytes>
<int key="connectionID">1635</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">makeSelectedFavoriteDefault:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="512106570"/>
- </object>
- <int key="connectionID">1641</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">favoritesSortByMenuItem</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="14003497"/>
- </object>
- <int key="connectionID">1642</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">exportColorScheme:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="726637834"/>
- </object>
- <int key="connectionID">1675</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">importColorScheme:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="62630352"/>
- </object>
- <int key="connectionID">1676</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="953919633"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">1691</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dataSource</string>
- <reference key="source" ref="953919633"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">1692</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">colorSettingTableView</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="953919633"/>
- </object>
- <int key="connectionID">1693</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">themeSelectionMenu</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="476368233"/>
- </object>
- <int key="connectionID">1715</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">nextKeyView</string>
<reference key="source" ref="76427887"/>
@@ -7316,46 +6874,6 @@ AQAAAAA</bytes>
<int key="connectionID">1734</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enterNameWindow</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1034673896"/>
- </object>
- <int key="connectionID">1735</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enterNameLabel</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="294234359"/>
- </object>
- <int key="connectionID">1736</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enterNameInputField</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="336557380"/>
- </object>
- <int key="connectionID">1737</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">colorThemeName</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="187965597"/>
- </object>
- <int key="connectionID">1742</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">colorThemeNameLabel</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="919512780"/>
- </object>
- <int key="connectionID">1743</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.CustomQueryEditorThemeName</string>
<reference key="source" ref="187965597"/>
@@ -7389,118 +6907,6 @@ AQAAAAA</bytes>
<int key="connectionID">1751</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">closePanelSheet:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="76427887"/>
- </object>
- <int key="connectionID">1752</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">closePanelSheet:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="107835671"/>
- </object>
- <int key="connectionID">1753</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">themeNameSaveButton</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="107835671"/>
- </object>
- <int key="connectionID">1754</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="336557380"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">1755</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">closePanelSheet:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="514064864"/>
- </object>
- <int key="connectionID">1770</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dataSource</string>
- <reference key="source" ref="383184631"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">1780</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="383184631"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">1781</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">editThemeListTable</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="383184631"/>
- </object>
- <int key="connectionID">1782</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">editThemeListWindow</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="97056925"/>
- </object>
- <int key="connectionID">1790</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">saveAsColorScheme:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="304435366"/>
- </object>
- <int key="connectionID">1797</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">removeTheme:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="443927336"/>
- </object>
- <int key="connectionID">1815</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">removeThemeButton</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="443927336"/>
- </object>
- <int key="connectionID">1816</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">duplicateThemeButton</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="920987860"/>
- </object>
- <int key="connectionID">1817</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">duplicateTheme:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="920987860"/>
- </object>
- <int key="connectionID">1818</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">initialFirstResponder</string>
<reference key="source" ref="97056925"/>
@@ -7541,14 +6947,6 @@ AQAAAAA</bytes>
<int key="connectionID">1823</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">enterNameAlertField</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="202566886"/>
- </object>
- <int key="connectionID">1826</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">fontBold: values._dummy</string>
<reference key="source" ref="202566886"/>
@@ -7774,14 +7172,6 @@ AQAAAAA</bytes>
<int key="connectionID">1871</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sshKeyLocationHelp</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="301032184"/>
- </object>
- <int key="connectionID">1876</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: selection.useSSL</string>
<reference key="source" ref="326313579"/>
@@ -8710,142 +8100,6 @@ AQAAAAA</bytes>
<int key="connectionID">2039</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sslKeyFileLocationHelp</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="46104894"/>
- </object>
- <int key="connectionID">2049</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sslCertificateLocationHelp</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="962978272"/>
- </object>
- <int key="connectionID">2050</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sslCACertLocationHelp</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="453507512"/>
- </object>
- <int key="connectionID">2051</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">standardSSLKeyFileButton</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="268169583"/>
- </object>
- <int key="connectionID">2052</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">standardSSLCertificateButton</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="712641149"/>
- </object>
- <int key="connectionID">2053</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">standardSSLCACertButton</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="837890813"/>
- </object>
- <int key="connectionID">2054</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">socketSSLCACertButton</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="3226998"/>
- </object>
- <int key="connectionID">2055</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">socketSSLCertificateButton</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="517307940"/>
- </object>
- <int key="connectionID">2056</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">socketSSLKeyFileButton</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="442151472"/>
- </object>
- <int key="connectionID">2057</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">sshSSHKeyButton</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="440294697"/>
- </object>
- <int key="connectionID">2058</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">chooseKeyLocation:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="440294697"/>
- </object>
- <int key="connectionID">2059</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">chooseKeyLocation:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="442151472"/>
- </object>
- <int key="connectionID">2060</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">chooseKeyLocation:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="517307940"/>
- </object>
- <int key="connectionID">2061</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">chooseKeyLocation:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="3226998"/>
- </object>
- <int key="connectionID">2062</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">chooseKeyLocation:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="268169583"/>
- </object>
- <int key="connectionID">2063</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">chooseKeyLocation:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="712641149"/>
- </object>
- <int key="connectionID">2064</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">chooseKeyLocation:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="837890813"/>
- </object>
- <int key="connectionID">2065</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: selection.sslCACertFileLocationEnabled</string>
<reference key="source" ref="837890813"/>
@@ -9031,6 +8285,826 @@ AQAAAAA</bytes>
</object>
<int key="connectionID">2073</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="343720994"/>
+ <reference key="destination" ref="594324362"/>
+ </object>
+ <int key="connectionID">2075</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">generalPreferencePane</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="343720994"/>
+ </object>
+ <int key="connectionID">2076</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">updateDefaultFavorite:</string>
+ <reference key="source" ref="343720994"/>
+ <reference key="destination" ref="331339372"/>
+ </object>
+ <int key="connectionID">2077</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">favoritesController</string>
+ <reference key="source" ref="343720994"/>
+ <reference key="destination" ref="937123943"/>
+ </object>
+ <int key="connectionID">2078</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">defaultFavoritePopup</string>
+ <reference key="source" ref="343720994"/>
+ <reference key="destination" ref="331339372"/>
+ </object>
+ <int key="connectionID">2079</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="673566620"/>
+ <reference key="destination" ref="395894064"/>
+ </object>
+ <int key="connectionID">2081</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">tablesPreferencePane</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="673566620"/>
+ </object>
+ <int key="connectionID">2082</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">globalResultTableFontName</string>
+ <reference key="source" ref="673566620"/>
+ <reference key="destination" ref="416182097"/>
+ </object>
+ <int key="connectionID">2083</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">showGlobalResultTableFontPanel:</string>
+ <reference key="source" ref="673566620"/>
+ <reference key="destination" ref="401684657"/>
+ </object>
+ <int key="connectionID">2084</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="593732956"/>
+ </object>
+ <int key="connectionID">2086</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">favoritesPreferencePane</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="721156358"/>
+ </object>
+ <int key="connectionID">2087</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dataSource</string>
+ <reference key="source" ref="279932544"/>
+ <reference key="destination" ref="721156358"/>
+ </object>
+ <int key="connectionID">2088</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="279932544"/>
+ <reference key="destination" ref="721156358"/>
+ </object>
+ <int key="connectionID">2089</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">favoritesTableView</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="279932544"/>
+ </object>
+ <int key="connectionID">2090</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">favoritesSortByMenuItem</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="14003497"/>
+ </object>
+ <int key="connectionID">2091</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">favoriteNameTextField</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="415835787"/>
+ </object>
+ <int key="connectionID">2092</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">favoritesTabView</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="961025550"/>
+ </object>
+ <int key="connectionID">2093</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">splitViewButtonBar</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="1068562664"/>
+ </object>
+ <int key="connectionID">2094</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">favoritesController</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="937123943"/>
+ </object>
+ <int key="connectionID">2095</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">favoriteHostTextField</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="77492794"/>
+ </object>
+ <int key="connectionID">2097</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">favoriteUserTextField</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="133134378"/>
+ </object>
+ <int key="connectionID">2098</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">favoriteUserTextFieldSocket</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="119091130"/>
+ </object>
+ <int key="connectionID">2099</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">socketPasswordField</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="340136489"/>
+ </object>
+ <int key="connectionID">2100</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">standardSSLCACertButton</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="837890813"/>
+ </object>
+ <int key="connectionID">2101</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">standardSSLCertificateButton</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="712641149"/>
+ </object>
+ <int key="connectionID">2102</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">standardSSLKeyFileButton</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="268169583"/>
+ </object>
+ <int key="connectionID">2103</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">standardPasswordField</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="755342553"/>
+ </object>
+ <int key="connectionID">2104</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sshSSHKeyButton</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="440294697"/>
+ </object>
+ <int key="connectionID">2105</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sshSQLPasswordField</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="602383030"/>
+ </object>
+ <int key="connectionID">2106</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sshPasswordField</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="663701836"/>
+ </object>
+ <int key="connectionID">2107</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">socketSSLCACertButton</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="3226998"/>
+ </object>
+ <int key="connectionID">2108</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">socketSSLCertificateButton</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="517307940"/>
+ </object>
+ <int key="connectionID">2109</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">socketSSLKeyFileButton</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="442151472"/>
+ </object>
+ <int key="connectionID">2110</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">favoriteUserTextFieldSSH</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="917213113"/>
+ </object>
+ <int key="connectionID">2111</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">favoriteHostTextFieldSSH</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="619305072"/>
+ </object>
+ <int key="connectionID">2112</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sshKeyLocationHelp</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="301032184"/>
+ </object>
+ <int key="connectionID">2113</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sslCACertLocationHelp</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="453507512"/>
+ </object>
+ <int key="connectionID">2114</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sslCertificateLocationHelp</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="962978272"/>
+ </object>
+ <int key="connectionID">2115</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">sslKeyFileLocationHelp</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="46104894"/>
+ </object>
+ <int key="connectionID">2116</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">tableCell</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="396146085"/>
+ </object>
+ <int key="connectionID">2117</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">addFavorite:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="364724557"/>
+ </object>
+ <int key="connectionID">2118</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">removeFavorite:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="393964112"/>
+ </object>
+ <int key="connectionID">2120</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">duplicateFavorite:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="3479828"/>
+ </object>
+ <int key="connectionID">2121</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">sortFavorites:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="143086279"/>
+ </object>
+ <int key="connectionID">2122</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">sortFavorites:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="760230945"/>
+ </object>
+ <int key="connectionID">2123</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">sortFavorites:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="334938006"/>
+ </object>
+ <int key="connectionID">2124</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">reverseFavoritesSortOrder:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="140840656"/>
+ </object>
+ <int key="connectionID">2125</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">removeFavorite:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="30395779"/>
+ </object>
+ <int key="connectionID">2126</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">duplicateFavorite:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="580038192"/>
+ </object>
+ <int key="connectionID">2127</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">makeSelectedFavoriteDefault:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="512106570"/>
+ </object>
+ <int key="connectionID">2128</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">favoriteTypeDidChange:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="1065964214"/>
+ </object>
+ <int key="connectionID">2129</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="141072039"/>
+ <reference key="destination" ref="721156358"/>
+ </object>
+ <int key="connectionID">2130</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">chooseKeyLocation:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="440294697"/>
+ </object>
+ <int key="connectionID">2131</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">chooseKeyLocation:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="268169583"/>
+ </object>
+ <int key="connectionID">2132</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">chooseKeyLocation:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="712641149"/>
+ </object>
+ <int key="connectionID">2133</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">chooseKeyLocation:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="837890813"/>
+ </object>
+ <int key="connectionID">2134</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">chooseKeyLocation:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="442151472"/>
+ </object>
+ <int key="connectionID">2135</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">chooseKeyLocation:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="517307940"/>
+ </object>
+ <int key="connectionID">2136</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">chooseKeyLocation:</string>
+ <reference key="source" ref="721156358"/>
+ <reference key="destination" ref="3226998"/>
+ </object>
+ <int key="connectionID">2137</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="415835787"/>
+ <reference key="destination" ref="721156358"/>
+ </object>
+ <int key="connectionID">2138</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="602383030"/>
+ <reference key="destination" ref="721156358"/>
+ </object>
+ <int key="connectionID">2139</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="663701836"/>
+ <reference key="destination" ref="721156358"/>
+ </object>
+ <int key="connectionID">2140</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="340136489"/>
+ <reference key="destination" ref="721156358"/>
+ </object>
+ <int key="connectionID">2141</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="755342553"/>
+ <reference key="destination" ref="721156358"/>
+ </object>
+ <int key="connectionID">2142</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">notificationsPreferencePane</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="953509484"/>
+ </object>
+ <int key="connectionID">2147</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">editorPreferencePane</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="153863061"/>
+ </object>
+ <int key="connectionID">2148</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">autoUpdatePreferencePane</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="913031053"/>
+ </object>
+ <int key="connectionID">2149</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">networkPreferencePane</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="424937675"/>
+ </object>
+ <int key="connectionID">2150</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="953509484"/>
+ <reference key="destination" ref="1041614321"/>
+ </object>
+ <int key="connectionID">2151</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="1033452264"/>
+ </object>
+ <int key="connectionID">2152</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="913031053"/>
+ <reference key="destination" ref="369742224"/>
+ </object>
+ <int key="connectionID">2153</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="424937675"/>
+ <reference key="destination" ref="769132533"/>
+ </object>
+ <int key="connectionID">2154</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: growlEnabled</string>
+ <reference key="source" ref="624078196"/>
+ <reference key="destination" ref="953509484"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="624078196"/>
+ <reference key="NSDestination" ref="953509484"/>
+ <string key="NSLabel">value: growlEnabled</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">growlEnabled</string>
+ <object class="NSDictionary" key="NSOptions">
+ <string key="NS.key.0">NSNullPlaceholder</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">2155</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enterNameAlertField</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="202566886"/>
+ </object>
+ <int key="connectionID">2156</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enterNameWindow</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="1034673896"/>
+ </object>
+ <int key="connectionID">2157</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">editThemeListWindow</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="97056925"/>
+ </object>
+ <int key="connectionID">2158</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">editorFontName</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="751188139"/>
+ </object>
+ <int key="connectionID">2159</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">colorThemeNameLabel</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="919512780"/>
+ </object>
+ <int key="connectionID">2160</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">colorThemeName</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="187965597"/>
+ </object>
+ <int key="connectionID">2161</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">themeSelectionMenu</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="476368233"/>
+ </object>
+ <int key="connectionID">2162</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">themeNameSaveButton</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="107835671"/>
+ </object>
+ <int key="connectionID">2163</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enterNameInputField</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="336557380"/>
+ </object>
+ <int key="connectionID">2164</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">enterNameLabel</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="294234359"/>
+ </object>
+ <int key="connectionID">2165</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">duplicateThemeButton</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="920987860"/>
+ </object>
+ <int key="connectionID">2166</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">removeThemeButton</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="443927336"/>
+ </object>
+ <int key="connectionID">2167</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">editThemeListTable</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="383184631"/>
+ </object>
+ <int key="connectionID">2168</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dataSource</string>
+ <reference key="source" ref="383184631"/>
+ <reference key="destination" ref="153863061"/>
+ </object>
+ <int key="connectionID">2169</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="383184631"/>
+ <reference key="destination" ref="153863061"/>
+ </object>
+ <int key="connectionID">2170</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">colorSettingTableView</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="953919633"/>
+ </object>
+ <int key="connectionID">2171</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dataSource</string>
+ <reference key="source" ref="953919633"/>
+ <reference key="destination" ref="153863061"/>
+ </object>
+ <int key="connectionID">2172</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="953919633"/>
+ <reference key="destination" ref="153863061"/>
+ </object>
+ <int key="connectionID">2173</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">showCustomQueryFontPanel:</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="742042283"/>
+ </object>
+ <int key="connectionID">2174</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">saveAsColorScheme:</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="304435366"/>
+ </object>
+ <int key="connectionID">2175</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">exportColorScheme:</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="726637834"/>
+ </object>
+ <int key="connectionID">2176</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">importColorScheme:</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="62630352"/>
+ </object>
+ <int key="connectionID">2177</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">closePanelSheet:</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="76427887"/>
+ </object>
+ <int key="connectionID">2178</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">closePanelSheet:</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="107835671"/>
+ </object>
+ <int key="connectionID">2180</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="336557380"/>
+ <reference key="destination" ref="153863061"/>
+ </object>
+ <int key="connectionID">2181</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">duplicateTheme:</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="920987860"/>
+ </object>
+ <int key="connectionID">2182</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">removeTheme:</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="443927336"/>
+ </object>
+ <int key="connectionID">2183</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">closePanelSheet:</string>
+ <reference key="source" ref="153863061"/>
+ <reference key="destination" ref="514064864"/>
+ </object>
+ <int key="connectionID">2184</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -9304,7 +9378,7 @@ AQAAAAA</bytes>
<reference ref="185366293"/>
</object>
<reference key="parent" ref="0"/>
- <string key="objectName">AutoUpdate</string>
+ <string key="objectName">Auto Update</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">94</int>
@@ -11618,10 +11692,10 @@ AQAAAAA</bytes>
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="474302340"/>
<reference ref="726637834"/>
- <reference ref="62630352"/>
<reference ref="191185083"/>
<reference ref="164147578"/>
<reference ref="304435366"/>
+ <reference ref="62630352"/>
</object>
<reference key="parent" ref="373813305"/>
</object>
@@ -11736,11 +11810,11 @@ AQAAAAA</bytes>
<reference key="object" ref="985350347"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="107835671"/>
<reference ref="294234359"/>
<reference ref="336557380"/>
<reference ref="202566886"/>
<reference ref="76427887"/>
+ <reference ref="107835671"/>
</object>
<reference key="parent" ref="1034673896"/>
</object>
@@ -12388,6 +12462,48 @@ AQAAAAA</bytes>
<reference key="object" ref="921051913"/>
<reference key="parent" ref="534911197"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2074</int>
+ <reference key="object" ref="343720994"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">General</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2080</int>
+ <reference key="object" ref="673566620"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Tables</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2085</int>
+ <reference key="object" ref="721156358"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Favorites</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2143</int>
+ <reference key="object" ref="953509484"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Notifications</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2144</int>
+ <reference key="object" ref="153863061"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Editor</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2145</int>
+ <reference key="object" ref="913031053"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Auto Update</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2146</int>
+ <reference key="object" ref="424937675"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Network</string>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -12410,6 +12526,7 @@ AQAAAAA</bytes>
<string>102.ImportedFromIB2</string>
<string>1034.IBPluginDependency</string>
<string>1036.IBPluginDependency</string>
+ <string>1037.CustomClassName</string>
<string>1037.IBPluginDependency</string>
<string>1039.IBPluginDependency</string>
<string>1040.IBPluginDependency</string>
@@ -12567,6 +12684,7 @@ AQAAAAA</bytes>
<string>1475.IBPluginDependency</string>
<string>1485.IBPluginDependency</string>
<string>1486.IBPluginDependency</string>
+ <string>1487.CustomClassName</string>
<string>1487.IBPluginDependency</string>
<string>1488.IBPluginDependency</string>
<string>1489.IBPluginDependency</string>
@@ -12664,6 +12782,7 @@ AQAAAAA</bytes>
<string>1717.IBPluginDependency</string>
<string>1717.ImportedFromIB2</string>
<string>1718.IBPluginDependency</string>
+ <string>1718.IBViewBoundsToFrameTransform</string>
<string>1718.ImportedFromIB2</string>
<string>1721.IBPluginDependency</string>
<string>1721.ImportedFromIB2</string>
@@ -12782,6 +12901,13 @@ AQAAAAA</bytes>
<string>2046.IBPluginDependency</string>
<string>2047.IBPluginDependency</string>
<string>2048.IBPluginDependency</string>
+ <string>2074.IBPluginDependency</string>
+ <string>2080.IBPluginDependency</string>
+ <string>2085.IBPluginDependency</string>
+ <string>2143.IBPluginDependency</string>
+ <string>2144.IBPluginDependency</string>
+ <string>2145.IBPluginDependency</string>
+ <string>2146.IBPluginDependency</string>
<string>24.IBPluginDependency</string>
<string>24.ImportedFromIB2</string>
<string>25.IBPluginDependency</string>
@@ -13036,6 +13162,7 @@ AQAAAAA</bytes>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>SPFontPreviewTextField</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -13200,6 +13327,7 @@ AQAAAAA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>SPFontPreviewTextField</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -13255,14 +13383,14 @@ AQAAAAA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.brandonwalkin.BWToolkit</string>
- <string>{{339, 317}, {124, 81}}</string>
+ <string>{{598, 118}, {124, 81}}</string>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{780, 333}, {180, 93}}</string>
+ <string>{{722, 45}, {180, 93}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -13285,7 +13413,7 @@ AQAAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{127, 100}, {222, 115}}</string>
+ <string>{{459, 246}, {222, 115}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary">
@@ -13293,7 +13421,7 @@ AQAAAAA</bytes>
<object class="IBToolTipAttribute" key="NS.object.0">
<string key="name">ToolTip</string>
<reference key="object" ref="726637834"/>
- <string key="toolTip">Export the current set color theme as 'spTheme' to disk</string>
+ <string key="toolTip">Export the current set color theme as an 'spTheme' file to disk.</string>
</object>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -13302,7 +13430,7 @@ AQAAAAA</bytes>
<object class="IBToolTipAttribute" key="NS.object.0">
<string key="name">ToolTip</string>
<reference key="object" ref="62630352"/>
- <string key="toolTip">Import a theme saved as 'spTheme' or 'tmTheme' (TextMateâ„¢) file</string>
+ <string key="toolTip">Import a theme saved as 'spTheme' or 'tmTheme' (TextMateâ„¢) file.</string>
</object>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -13314,7 +13442,7 @@ AQAAAAA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{194, 257}, {580, 300}}</string>
+ <string>{{549, 529}, {580, 280}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableArray">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -13325,20 +13453,23 @@ AQAAAAA</bytes>
</object>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{347, 141}, {64, 6}}</string>
+ <string>{{681, 304}, {64, 6}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{202, 155}, {247, 124}}</string>
+ <string>{{421, 141}, {227, 114}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{202, 155}, {247, 124}}</string>
+ <string>{{421, 141}, {227, 114}}</string>
<integer value="1"/>
<boolean value="YES"/>
<boolean value="YES"/>
<string>{247, 124}</string>
- <string>{247, 124}</string>
+ <string>{227, 114}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABC4AAAwhgAAA</bytes>
+ </object>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
@@ -13362,14 +13493,14 @@ AQAAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{206, 261}, {264, 274}}</string>
+ <string>{{637, 192}, {264, 225}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{206, 261}, {264, 274}}</string>
+ <string>{{637, 192}, {264, 225}}</string>
<integer value="1"/>
<boolean value="YES"/>
<boolean value="YES"/>
<string>{264, 274}</string>
- <string>{264, 274}</string>
+ <string>{264, 225}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -13386,7 +13517,7 @@ AQAAAAA</bytes>
<object class="IBToolTipAttribute" key="NS.object.0">
<string key="name">ToolTip</string>
<reference key="object" ref="304435366"/>
- <string key="toolTip">Save the current set color theme by providing an unique name into Sequel Pro's Application Support folder</string>
+ <string key="toolTip">Save the current set color theme by providing an unique name into Sequel Pro's Application Support folder.</string>
</object>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -13432,7 +13563,7 @@ AQAAAAA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{245, 466}, {579, 51}}</string>
+ <string>{{249, 289}, {579, 51}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -13538,6 +13669,13 @@ AQAAAAA</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>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -13575,7 +13713,7 @@ AQAAAAA</bytes>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{244, 330}, {580, 381}}</string>
+ <string>{{579, 176}, {580, 381}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -13674,7 +13812,7 @@ AQAAAAA</bytes>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{202, 249}, {580, 336}}</string>
+ <string>{{526, 52}, {580, 319}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableArray">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -13711,7 +13849,7 @@ AQAAAAA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{195, 71}, {580, 229}}</string>
+ <string>{{555, 262}, {580, 209}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableArray">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -13745,7 +13883,7 @@ AQAAAAA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{243, 461}, {580, 200}}</string>
+ <string>{{243, 481}, {580, 180}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableArray">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -13755,7 +13893,7 @@ AQAAAAA</bytes>
<int key="affinity">0</int>
</object>
</object>
- <string>{{117, 507}, {580, 113}}</string>
+ <string>{{117, 527}, {580, 93}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableArray">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -13816,7 +13954,7 @@ AQAAAAA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{118, 168}, {580, 361}}</string>
+ <string>{{450, 315}, {580, 360}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableArray">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -13869,7 +14007,7 @@ AQAAAAA</bytes>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">2073</int>
+ <int key="maxID">2184</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -13893,28 +14031,28 @@ AQAAAAA</bytes>
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h</string>
+ <string key="minorKey">Frameworks/MCPKit/MCPFoundationKit/MCPNull.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>
+ <string key="minorKey">Frameworks/PSMTabBar/PSMTabBarCell.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/PSMTabBar/PSMTabBarCell.h</string>
+ <string key="minorKey">Frameworks/PSMTabBar/PSMTabBarControl.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/PSMTabBar/PSMTabBarControl.h</string>
+ <string key="minorKey">Source/JVFontPreviewField.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
@@ -13985,47 +14123,31 @@ AQAAAAA</bytes>
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">SPFavoriteTextFieldCell</string>
- <string key="superclassName">ImageAndTextCell</string>
+ <string key="className">SPAutoUpdatePreferencePane</string>
+ <string key="superclassName">SPPreferencePane</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/SPFavoriteTextFieldCell.h</string>
+ <string key="minorKey">Source/SPAutoUpdatePreferencePane.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">SPPreferenceController</string>
- <string key="superclassName">NSWindowController</string>
+ <string key="className">SPEditorPreferencePane</string>
+ <string key="superclassName">SPPreferencePane</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>addFavorite:</string>
- <string>changeFont:</string>
- <string>chooseKeyLocation:</string>
<string>closePanelSheet:</string>
- <string>displayAutoUpdatePreferences:</string>
- <string>displayEditorPreferences:</string>
- <string>displayFavoritePreferences:</string>
- <string>displayGeneralPreferences:</string>
- <string>displayNetworkPreferences:</string>
- <string>displayNotificationPreferences:</string>
- <string>displayTablePreferences:</string>
- <string>duplicateFavorite:</string>
<string>duplicateTheme:</string>
+ <string>editThemeList:</string>
<string>exportColorScheme:</string>
- <string>favoriteTypeDidChange:</string>
<string>importColorScheme:</string>
<string>loadColorScheme:</string>
- <string>makeSelectedFavoriteDefault:</string>
- <string>removeFavorite:</string>
<string>removeTheme:</string>
- <string>reverseFavoritesSortOrder:</string>
<string>saveAsColorScheme:</string>
<string>setDefaultColors:</string>
<string>showCustomQueryFontPanel:</string>
<string>showGlobalResultTableFontPanel:</string>
- <string>sortFavorites:</string>
- <string>updateDefaultFavorite:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -14040,164 +14162,281 @@ AQAAAAA</bytes>
<string>id</string>
<string>id</string>
<string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>addFavorite:</string>
- <string>changeFont:</string>
- <string>chooseKeyLocation:</string>
<string>closePanelSheet:</string>
- <string>displayAutoUpdatePreferences:</string>
- <string>displayEditorPreferences:</string>
- <string>displayFavoritePreferences:</string>
- <string>displayGeneralPreferences:</string>
- <string>displayNetworkPreferences:</string>
- <string>displayNotificationPreferences:</string>
- <string>displayTablePreferences:</string>
- <string>duplicateFavorite:</string>
<string>duplicateTheme:</string>
+ <string>editThemeList:</string>
<string>exportColorScheme:</string>
- <string>favoriteTypeDidChange:</string>
<string>importColorScheme:</string>
<string>loadColorScheme:</string>
- <string>makeSelectedFavoriteDefault:</string>
- <string>removeFavorite:</string>
<string>removeTheme:</string>
- <string>reverseFavoritesSortOrder:</string>
<string>saveAsColorScheme:</string>
<string>setDefaultColors:</string>
<string>showCustomQueryFontPanel:</string>
<string>showGlobalResultTableFontPanel:</string>
- <string>sortFavorites:</string>
- <string>updateDefaultFavorite:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
- <string key="name">addFavorite:</string>
+ <string key="name">closePanelSheet:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">changeFont:</string>
+ <string key="name">duplicateTheme:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">chooseKeyLocation:</string>
+ <string key="name">editThemeList:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">closePanelSheet:</string>
+ <string key="name">exportColorScheme:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">displayAutoUpdatePreferences:</string>
+ <string key="name">importColorScheme:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">displayEditorPreferences:</string>
+ <string key="name">loadColorScheme:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">displayFavoritePreferences:</string>
+ <string key="name">removeTheme:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">displayGeneralPreferences:</string>
+ <string key="name">saveAsColorScheme:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">displayNetworkPreferences:</string>
+ <string key="name">setDefaultColors:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">displayNotificationPreferences:</string>
+ <string key="name">showCustomQueryFontPanel:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">displayTablePreferences:</string>
+ <string key="name">showGlobalResultTableFontPanel:</string>
<string key="candidateClassName">id</string>
</object>
- <object class="IBActionInfo">
- <string key="name">duplicateFavorite:</string>
- <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>colorSettingTableView</string>
+ <string>colorThemeName</string>
+ <string>colorThemeNameLabel</string>
+ <string>duplicateThemeButton</string>
+ <string>editThemeListTable</string>
+ <string>editThemeListWindow</string>
+ <string>editorFontName</string>
+ <string>enterNameAlertField</string>
+ <string>enterNameInputField</string>
+ <string>enterNameLabel</string>
+ <string>enterNameWindow</string>
+ <string>removeThemeButton</string>
+ <string>saveThemeMenuItem</string>
+ <string>themeNameSaveButton</string>
+ <string>themeSelectionMenu</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSTableView</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSButton</string>
+ <string>NSTableView</string>
+ <string>NSWindow</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSWindow</string>
+ <string>NSButton</string>
+ <string>NSMenuItem</string>
+ <string>NSButton</string>
+ <string>NSMenu</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>colorSettingTableView</string>
+ <string>colorThemeName</string>
+ <string>colorThemeNameLabel</string>
+ <string>duplicateThemeButton</string>
+ <string>editThemeListTable</string>
+ <string>editThemeListWindow</string>
+ <string>editorFontName</string>
+ <string>enterNameAlertField</string>
+ <string>enterNameInputField</string>
+ <string>enterNameLabel</string>
+ <string>enterNameWindow</string>
+ <string>removeThemeButton</string>
+ <string>saveThemeMenuItem</string>
+ <string>themeNameSaveButton</string>
+ <string>themeSelectionMenu</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">colorSettingTableView</string>
+ <string key="candidateClassName">NSTableView</string>
</object>
- <object class="IBActionInfo">
- <string key="name">duplicateTheme:</string>
- <string key="candidateClassName">id</string>
+ <object class="IBToOneOutletInfo">
+ <string key="name">colorThemeName</string>
+ <string key="candidateClassName">NSTextField</string>
</object>
- <object class="IBActionInfo">
- <string key="name">exportColorScheme:</string>
- <string key="candidateClassName">id</string>
+ <object class="IBToOneOutletInfo">
+ <string key="name">colorThemeNameLabel</string>
+ <string key="candidateClassName">NSTextField</string>
</object>
- <object class="IBActionInfo">
- <string key="name">favoriteTypeDidChange:</string>
- <string key="candidateClassName">id</string>
+ <object class="IBToOneOutletInfo">
+ <string key="name">duplicateThemeButton</string>
+ <string key="candidateClassName">NSButton</string>
</object>
- <object class="IBActionInfo">
- <string key="name">importColorScheme:</string>
- <string key="candidateClassName">id</string>
+ <object class="IBToOneOutletInfo">
+ <string key="name">editThemeListTable</string>
+ <string key="candidateClassName">NSTableView</string>
</object>
- <object class="IBActionInfo">
- <string key="name">loadColorScheme:</string>
- <string key="candidateClassName">id</string>
+ <object class="IBToOneOutletInfo">
+ <string key="name">editThemeListWindow</string>
+ <string key="candidateClassName">NSWindow</string>
</object>
- <object class="IBActionInfo">
- <string key="name">makeSelectedFavoriteDefault:</string>
- <string key="candidateClassName">id</string>
+ <object class="IBToOneOutletInfo">
+ <string key="name">editorFontName</string>
+ <string key="candidateClassName">NSTextField</string>
</object>
- <object class="IBActionInfo">
- <string key="name">removeFavorite:</string>
- <string key="candidateClassName">id</string>
+ <object class="IBToOneOutletInfo">
+ <string key="name">enterNameAlertField</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">enterNameInputField</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">enterNameLabel</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">enterNameWindow</string>
+ <string key="candidateClassName">NSWindow</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">removeThemeButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">saveThemeMenuItem</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">themeNameSaveButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">themeSelectionMenu</string>
+ <string key="candidateClassName">NSMenu</string>
</object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPEditorPreferencePane.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPFavoriteTextFieldCell</string>
+ <string key="superclassName">ImageAndTextCell</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPFavoriteTextFieldCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPFavoritesPreferencePane</string>
+ <string key="superclassName">SPPreferencePane</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>addFavorite:</string>
+ <string>chooseKeyLocation:</string>
+ <string>duplicateFavorite:</string>
+ <string>favoriteTypeDidChange:</string>
+ <string>makeSelectedFavoriteDefault:</string>
+ <string>removeFavorite:</string>
+ <string>reverseFavoritesSortOrder:</string>
+ <string>sortFavorites:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>addFavorite:</string>
+ <string>chooseKeyLocation:</string>
+ <string>duplicateFavorite:</string>
+ <string>favoriteTypeDidChange:</string>
+ <string>makeSelectedFavoriteDefault:</string>
+ <string>removeFavorite:</string>
+ <string>reverseFavoritesSortOrder:</string>
+ <string>sortFavorites:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
- <string key="name">removeTheme:</string>
+ <string key="name">addFavorite:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">reverseFavoritesSortOrder:</string>
+ <string key="name">chooseKeyLocation:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">saveAsColorScheme:</string>
+ <string key="name">duplicateFavorite:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">setDefaultColors:</string>
+ <string key="name">favoriteTypeDidChange:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">showCustomQueryFontPanel:</string>
+ <string key="name">makeSelectedFavoriteDefault:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">showGlobalResultTableFontPanel:</string>
+ <string key="name">removeFavorite:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">sortFavorites:</string>
+ <string key="name">reverseFavoritesSortOrder:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">updateDefaultFavorite:</string>
+ <string key="name">sortFavorites:</string>
<string key="candidateClassName">id</string>
</object>
</object>
@@ -14206,20 +14445,6 @@ AQAAAAA</bytes>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>autoUpdateView</string>
- <string>colorSettingTableView</string>
- <string>colorThemeName</string>
- <string>colorThemeNameLabel</string>
- <string>defaultFavoritePopup</string>
- <string>duplicateThemeButton</string>
- <string>editThemeListTable</string>
- <string>editThemeListWindow</string>
- <string>editorFontName</string>
- <string>editorView</string>
- <string>enterNameAlertField</string>
- <string>enterNameInputField</string>
- <string>enterNameLabel</string>
- <string>enterNameWindow</string>
<string>favoriteHostTextField</string>
<string>favoriteHostTextFieldSSH</string>
<string>favoriteNameTextField</string>
@@ -14230,14 +14455,6 @@ AQAAAAA</bytes>
<string>favoritesSortByMenuItem</string>
<string>favoritesTabView</string>
<string>favoritesTableView</string>
- <string>favoritesView</string>
- <string>generalView</string>
- <string>globalResultTableFontName</string>
- <string>networkView</string>
- <string>notificationsView</string>
- <string>preferencesWindow</string>
- <string>removeThemeButton</string>
- <string>saveThemeMenuItem</string>
<string>socketPasswordField</string>
<string>socketSSLCACertButton</string>
<string>socketSSLCertificateButton</string>
@@ -14255,26 +14472,9 @@ AQAAAAA</bytes>
<string>standardSSLCertificateButton</string>
<string>standardSSLKeyFileButton</string>
<string>tableCell</string>
- <string>tablesView</string>
- <string>themeNameSaveButton</string>
- <string>themeSelectionMenu</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSView</string>
- <string>NSTableView</string>
- <string>NSTextField</string>
- <string>NSTextField</string>
- <string>NSPopUpButton</string>
- <string>id</string>
- <string>NSTableView</string>
- <string>NSWindow</string>
- <string>NSTextField</string>
- <string>NSView</string>
- <string>NSTextField</string>
- <string>NSTextField</string>
- <string>NSTextField</string>
- <string>NSWindow</string>
<string>NSTextField</string>
<string>NSTextField</string>
<string>NSTextField</string>
@@ -14285,14 +14485,6 @@ AQAAAAA</bytes>
<string>NSMenuItem</string>
<string>NSTabView</string>
<string>NSTableView</string>
- <string>NSView</string>
- <string>NSView</string>
- <string>NSTextField</string>
- <string>NSView</string>
- <string>NSView</string>
- <string>NSWindow</string>
- <string>id</string>
- <string>NSMenuItem</string>
<string>NSSecureTextField</string>
<string>NSButton</string>
<string>NSButton</string>
@@ -14309,30 +14501,13 @@ AQAAAAA</bytes>
<string>NSButton</string>
<string>NSButton</string>
<string>NSButton</string>
- <string>id</string>
- <string>NSView</string>
- <string>id</string>
- <string>NSMenu</string>
+ <string>NSTextFieldCell</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>autoUpdateView</string>
- <string>colorSettingTableView</string>
- <string>colorThemeName</string>
- <string>colorThemeNameLabel</string>
- <string>defaultFavoritePopup</string>
- <string>duplicateThemeButton</string>
- <string>editThemeListTable</string>
- <string>editThemeListWindow</string>
- <string>editorFontName</string>
- <string>editorView</string>
- <string>enterNameAlertField</string>
- <string>enterNameInputField</string>
- <string>enterNameLabel</string>
- <string>enterNameWindow</string>
<string>favoriteHostTextField</string>
<string>favoriteHostTextFieldSSH</string>
<string>favoriteNameTextField</string>
@@ -14343,14 +14518,6 @@ AQAAAAA</bytes>
<string>favoritesSortByMenuItem</string>
<string>favoritesTabView</string>
<string>favoritesTableView</string>
- <string>favoritesView</string>
- <string>generalView</string>
- <string>globalResultTableFontName</string>
- <string>networkView</string>
- <string>notificationsView</string>
- <string>preferencesWindow</string>
- <string>removeThemeButton</string>
- <string>saveThemeMenuItem</string>
<string>socketPasswordField</string>
<string>socketSSLCACertButton</string>
<string>socketSSLCertificateButton</string>
@@ -14368,69 +14535,10 @@ AQAAAAA</bytes>
<string>standardSSLCertificateButton</string>
<string>standardSSLKeyFileButton</string>
<string>tableCell</string>
- <string>tablesView</string>
- <string>themeNameSaveButton</string>
- <string>themeSelectionMenu</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
- <string key="name">autoUpdateView</string>
- <string key="candidateClassName">NSView</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">colorSettingTableView</string>
- <string key="candidateClassName">NSTableView</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">colorThemeName</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">colorThemeNameLabel</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">defaultFavoritePopup</string>
- <string key="candidateClassName">NSPopUpButton</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">duplicateThemeButton</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">editThemeListTable</string>
- <string key="candidateClassName">NSTableView</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">editThemeListWindow</string>
- <string key="candidateClassName">NSWindow</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">editorFontName</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">editorView</string>
- <string key="candidateClassName">NSView</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">enterNameAlertField</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">enterNameInputField</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">enterNameLabel</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">enterNameWindow</string>
- <string key="candidateClassName">NSWindow</string>
- </object>
- <object class="IBToOneOutletInfo">
<string key="name">favoriteHostTextField</string>
<string key="candidateClassName">NSTextField</string>
</object>
@@ -14471,38 +14579,6 @@ AQAAAAA</bytes>
<string key="candidateClassName">NSTableView</string>
</object>
<object class="IBToOneOutletInfo">
- <string key="name">favoritesView</string>
- <string key="candidateClassName">NSView</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">generalView</string>
- <string key="candidateClassName">NSView</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">globalResultTableFontName</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">networkView</string>
- <string key="candidateClassName">NSView</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">notificationsView</string>
- <string key="candidateClassName">NSView</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">preferencesWindow</string>
- <string key="candidateClassName">NSWindow</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">removeThemeButton</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">saveThemeMenuItem</string>
- <string key="candidateClassName">NSMenuItem</string>
- </object>
- <object class="IBToOneOutletInfo">
<string key="name">socketPasswordField</string>
<string key="candidateClassName">NSSecureTextField</string>
</object>
@@ -14568,19 +14644,189 @@ AQAAAAA</bytes>
</object>
<object class="IBToOneOutletInfo">
<string key="name">tableCell</string>
+ <string key="candidateClassName">NSTextFieldCell</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPFavoritesPreferencePane.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPFontPreviewTextField</string>
+ <string key="superclassName">NSTextField</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>chooseFontWithFontPanel:</string>
+ <string>selectFont:</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">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>chooseFontWithFontPanel:</string>
+ <string>selectFont:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">chooseFontWithFontPanel:</string>
<string key="candidateClassName">id</string>
</object>
+ <object class="IBActionInfo">
+ <string key="name">selectFont:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPGeneralPreferencePane</string>
+ <string key="superclassName">SPPreferencePane</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">updateDefaultFavorite:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <string key="NS.key.0">updateDefaultFavorite:</string>
+ <object class="IBActionInfo" key="NS.object.0">
+ <string key="name">updateDefaultFavorite:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>defaultFavoritePopup</string>
+ <string>favoritesController</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSPopUpButton</string>
+ <string>NSArrayController</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>defaultFavoritePopup</string>
+ <string>favoritesController</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
- <string key="name">tablesView</string>
- <string key="candidateClassName">NSView</string>
+ <string key="name">defaultFavoritePopup</string>
+ <string key="candidateClassName">NSPopUpButton</string>
</object>
<object class="IBToOneOutletInfo">
- <string key="name">themeNameSaveButton</string>
- <string key="candidateClassName">id</string>
+ <string key="name">favoritesController</string>
+ <string key="candidateClassName">NSArrayController</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPGeneralPreferencePane.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPNetworkPreferencePane</string>
+ <string key="superclassName">SPPreferencePane</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPNetworkPreferencePane.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPNotificationsPreferencePane</string>
+ <string key="superclassName">SPPreferencePane</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPNotificationsPreferencePane.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPPreferenceController</string>
+ <string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>autoUpdatePreferencePane</string>
+ <string>editorPreferencePane</string>
+ <string>favoritesPreferencePane</string>
+ <string>generalPreferencePane</string>
+ <string>networkPreferencePane</string>
+ <string>notificationsPreferencePane</string>
+ <string>tablesPreferencePane</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>SPAutoUpdatePreferencePane</string>
+ <string>SPEditorPreferencePane</string>
+ <string>SPFavoritesPreferencePane</string>
+ <string>SPGeneralPreferencePane</string>
+ <string>SPNetworkPreferencePane</string>
+ <string>SPNotificationsPreferencePane</string>
+ <string>SPTablesPreferencePane</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>autoUpdatePreferencePane</string>
+ <string>editorPreferencePane</string>
+ <string>favoritesPreferencePane</string>
+ <string>generalPreferencePane</string>
+ <string>networkPreferencePane</string>
+ <string>notificationsPreferencePane</string>
+ <string>tablesPreferencePane</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">autoUpdatePreferencePane</string>
+ <string key="candidateClassName">SPAutoUpdatePreferencePane</string>
</object>
<object class="IBToOneOutletInfo">
- <string key="name">themeSelectionMenu</string>
- <string key="candidateClassName">NSMenu</string>
+ <string key="name">editorPreferencePane</string>
+ <string key="candidateClassName">SPEditorPreferencePane</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">favoritesPreferencePane</string>
+ <string key="candidateClassName">SPFavoritesPreferencePane</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">generalPreferencePane</string>
+ <string key="candidateClassName">SPGeneralPreferencePane</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">networkPreferencePane</string>
+ <string key="candidateClassName">SPNetworkPreferencePane</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">notificationsPreferencePane</string>
+ <string key="candidateClassName">SPNotificationsPreferencePane</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">tablesPreferencePane</string>
+ <string key="candidateClassName">SPTablesPreferencePane</string>
</object>
</object>
</object>
@@ -14589,6 +14835,51 @@ AQAAAAA</bytes>
<string key="minorKey">Source/SPPreferenceController.h</string>
</object>
</object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPPreferenceController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPPreferenceControllerDelegate.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPPreferencePane</string>
+ <string key="superclassName">NSViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPPreferencePane.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPTablesPreferencePane</string>
+ <string key="superclassName">SPPreferencePane</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">showGlobalResultTableFontPanel:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <string key="NS.key.0">showGlobalResultTableFontPanel:</string>
+ <object class="IBActionInfo" key="NS.object.0">
+ <string key="name">showGlobalResultTableFontPanel:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">globalResultTableFontName</string>
+ <string key="NS.object.0">NSTextField</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">globalResultTableFontName</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">globalResultTableFontName</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPTablesPreferencePane.h</string>
+ </object>
+ </object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -15100,27 +15391,6 @@ AQAAAAA</bytes>
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">QuartzCore.framework/Headers/CAAnimation.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">QuartzCore.framework/Headers/CALayer.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">QuartzCore.framework/Headers/CIImageProvider.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>
@@ -15377,6 +15647,25 @@ AQAAAAA</bytes>
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">NSViewController</string>
+ <string key="superclassName">NSResponder</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">view</string>
+ <string key="NS.object.0">NSView</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">view</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">view</string>
+ <string key="candidateClassName">NSView</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">NSWindow</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
@@ -15487,7 +15776,7 @@ AQAAAAA</bytes>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{16, 8}</string>
- <string>{10, 10}</string>
+ <string>{15, 15}</string>
<string>{32, 32}</string>
<string>{9, 8}</string>
<string>{7, 2}</string>
diff --git a/Resources/English.lproj/Localizable.strings b/Resources/English.lproj/Localizable.strings
index 5a482a5d..88e44abd 100644
--- a/Resources/English.lproj/Localizable.strings
+++ b/Resources/English.lproj/Localizable.strings
Binary files differ
diff --git a/Resources/English.lproj/Preferences.strings b/Resources/English.lproj/Preferences.strings
index 4f1861aa..f906e011 100644
--- a/Resources/English.lproj/Preferences.strings
+++ b/Resources/English.lproj/Preferences.strings
Binary files differ
diff --git a/Source/SPAutoUpdatePreferencePane.h b/Source/SPAutoUpdatePreferencePane.h
new file mode 100644
index 00000000..57efc919
--- /dev/null
+++ b/Source/SPAutoUpdatePreferencePane.h
@@ -0,0 +1,37 @@
+//
+// $Id$
+//
+// SPAutoUpdatePreferencePane.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPPreferencePane.h"
+
+/**
+ * @class SPAutoUpdatePreferencePane SPAutoUpdatePreferencePane.h
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * Auto update preference pane controller.
+ */
+@interface SPAutoUpdatePreferencePane : SPPreferencePane <SPPreferencePaneProtocol>
+
+@end
diff --git a/Source/SPAutoUpdatePreferencePane.m b/Source/SPAutoUpdatePreferencePane.m
new file mode 100644
index 00000000..6d6c2d58
--- /dev/null
+++ b/Source/SPAutoUpdatePreferencePane.m
@@ -0,0 +1,63 @@
+//
+// $Id$
+//
+// SPAutoUpdatePreferencePane.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPAutoUpdatePreferencePane.h"
+
+@implementation SPAutoUpdatePreferencePane
+
+#pragma mark -
+#pragma mark Preference pane protocol methods
+
+- (NSView *)preferencePaneView
+{
+ return [self view];
+}
+
+- (NSImage *)preferencePaneIcon
+{
+ return [NSImage imageNamed:@"toolbar-preferences-autoupdate"];
+}
+
+- (NSString *)preferencePaneName
+{
+ return NSLocalizedString(@"Auto Update", @"auto update preference pane name");
+}
+
+- (NSString *)preferencePaneIdentifier
+{
+ return SPPreferenceToolbarAutoUpdate;
+}
+
+- (NSString *)preferencePaneToolTip
+{
+ return NSLocalizedString(@"Auto Update Preferences", @"auto update preference pane tooltip");
+}
+
+- (BOOL)preferencePaneAllowsResizing
+{
+ return NO;
+}
+
+@end
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index 1128b822..11339ace 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -648,7 +648,7 @@
[prefsController showWindow:self];
[prefsController displayFavoritePreferences:self];
- if ([favoritesTable numberOfSelectedRows]) [prefsController selectFavorites:[NSArray arrayWithObject:[self valueForKeyPath:@"selectedFavorite"]]];
+ if ([favoritesTable numberOfSelectedRows]) [[prefsController favoritesPreferencePane] selectFavorites:[NSArray arrayWithObject:[self valueForKeyPath:@"selectedFavorite"]]];
}
/**
diff --git a/Source/SPConnectionControllerDelegate.h b/Source/SPConnectionControllerDelegate.h
index 892a52ae..dc5e8a45 100644
--- a/Source/SPConnectionControllerDelegate.h
+++ b/Source/SPConnectionControllerDelegate.h
@@ -4,7 +4,7 @@
// SPConnectionControllerDelegate.h
// sequel-pro
//
-// Created by Stuart Connolly (stuconnolly.com) on April 15, 2010
+// Created by Stuart Connolly (stuconnolly.com) on October 29, 2010
// Copyright (c) 2010 Stuart Connolly. All rights reserved.
//
// This program is free software; you can redistribute it and/or modify
diff --git a/Source/SPEditorPreferencePane.h b/Source/SPEditorPreferencePane.h
new file mode 100644
index 00000000..d7cb1eb4
--- /dev/null
+++ b/Source/SPEditorPreferencePane.h
@@ -0,0 +1,81 @@
+//
+// $Id$
+//
+// SPEditorPreferencePane.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPPreferencePane.h"
+
+/**
+ * @class SPEditorPreferencePane SPEditorPreferencePane.h
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * Editor preference pane controller.
+ */
+@interface SPEditorPreferencePane : SPPreferencePane <SPPreferencePaneProtocol>
+{
+ IBOutlet NSWindow *enterNameWindow;
+ IBOutlet NSWindow *editThemeListWindow;
+
+ IBOutlet NSTextField *enterNameLabel;
+ IBOutlet NSTextField *enterNameInputField;
+ IBOutlet NSTextField *enterNameAlertField;
+ IBOutlet NSTextField *colorThemeName;
+ IBOutlet NSTextField *colorThemeNameLabel;
+ IBOutlet NSTextField *editorFontName;
+
+ IBOutlet NSButton *themeNameSaveButton;
+ IBOutlet NSTableView *editThemeListTable;
+ IBOutlet NSButton *removeThemeButton;
+ IBOutlet NSButton *duplicateThemeButton;
+ IBOutlet NSMenuItem *saveThemeMenuItem;
+
+ IBOutlet NSTableView *colorSettingTableView;
+ IBOutlet NSMenu *themeSelectionMenu;
+
+ NSArray *editorColors;
+ NSArray *editorNameForColors;
+ NSUInteger colorRow;
+
+ NSString *themePath;
+ NSArray *editThemeListItems;
+ NSInteger checkForUnsavedThemeSheetStatus;
+}
+
+- (IBAction)showCustomQueryFontPanel:(id)sender;
+- (IBAction)showGlobalResultTableFontPanel:(id)sender;
+- (IBAction)setDefaultColors:(id)sender;
+- (IBAction)exportColorScheme:(id)sender;
+- (IBAction)importColorScheme:(id)sender;
+- (IBAction)saveAsColorScheme:(id)sender;
+- (IBAction)loadColorScheme:(id)sender;
+- (IBAction)closePanelSheet:(id)sender;
+- (IBAction)duplicateTheme:(id)sender;
+- (IBAction)removeTheme:(id)sender;
+- (IBAction)editThemeList:(id)sender;
+
+- (void)updateDisplayedEditorFontName;
+- (void)updateColorSchemeSelectionMenu;
+- (void)updateDisplayColorThemeName;
+
+@end
diff --git a/Source/SPEditorPreferencePane.m b/Source/SPEditorPreferencePane.m
new file mode 100644
index 00000000..a57980be
--- /dev/null
+++ b/Source/SPEditorPreferencePane.m
@@ -0,0 +1,1027 @@
+//
+// $Id$
+//
+// SPEditorPreferencePane.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPEditorPreferencePane.h"
+#import "SPPreferenceController.h"
+#import "SPColorWellCell.h"
+#import "SPAlertSheets.h"
+
+@interface SPEditorPreferencePane (PrivateAPI)
+
+- (BOOL)_checkForUnsavedTheme;
+- (NSArray *)_getAvailableThemes;
+- (void)_saveColorThemeAtPath:(NSString *)path;
+- (BOOL)_loadColorSchemeFromFile:(NSString *)filename;
+
+@end
+
+
+@implementation SPEditorPreferencePane
+
+#pragma mark -
+#pragma mark Initialisation
+
+/**
+ * Init.
+ */
+- (id)init
+{
+ if ((self = [super init])) {
+
+ themePath = [[[NSFileManager defaultManager] applicationSupportDirectoryForSubDirectory:SPThemesSupportFolder error:nil] retain];
+
+ editThemeListItems = [[NSArray arrayWithArray:[self _getAvailableThemes]] retain];
+
+ editorColors =
+ [[NSArray arrayWithObjects:
+ SPCustomQueryEditorTextColor,
+ SPCustomQueryEditorBackgroundColor,
+ SPCustomQueryEditorCaretColor,
+ SPCustomQueryEditorCommentColor,
+ SPCustomQueryEditorSQLKeywordColor,
+ SPCustomQueryEditorNumericColor,
+ SPCustomQueryEditorQuoteColor,
+ SPCustomQueryEditorBacktickColor,
+ SPCustomQueryEditorVariableColor,
+ SPCustomQueryEditorHighlightQueryColor,
+ SPCustomQueryEditorSelectionColor,
+ nil] retain];
+
+ editorNameForColors =
+ [[NSArray arrayWithObjects:
+ NSLocalizedString(@"Text", @"text label for color table (Prefs > Editor)"),
+ NSLocalizedString(@"Background", @"background label for color table (Prefs > Editor)"),
+ NSLocalizedString(@"Caret", @"caret label for color table (Prefs > Editor)"),
+ NSLocalizedString(@"Comment", @"comment label"),
+ NSLocalizedString(@"Keyword", @"keyword label for color table (Prefs > Editor)"),
+ NSLocalizedString(@"Numeric", @"numeric label for color table (Prefs > Editor)"),
+ NSLocalizedString(@"Quote", @"quote label for color table (Prefs > Editor)"),
+ NSLocalizedString(@"Backtick Quote", @"backtick quote label for color table (Prefs > Editor)"),
+ NSLocalizedString(@"Variable", @"variable label for color table (Prefs > Editor)"),
+ NSLocalizedString(@"Query Background", @"query background label for color table (Prefs > Editor)"),
+ NSLocalizedString(@"Selection", @"selection label for color table (Prefs > Editor)"),
+ nil] retain];
+ }
+
+ return self;
+}
+
+/**
+ * Initialise the UI, specifically the colours table view.
+ */
+- (void)awakeFromNib
+{
+ [NSColor setIgnoresAlpha:NO];
+
+ NSTableColumn *column = [[colorSettingTableView tableColumns] objectAtIndex:0];
+ NSTextFieldCell *textCell = [[[NSTextFieldCell alloc] init] autorelease];
+
+ [textCell setFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]]];
+
+ column = [[colorSettingTableView tableColumns] objectAtIndex: 1];
+
+ SPColorWellCell *colorCell = [[[SPColorWellCell alloc] init] autorelease];
+
+ [colorCell setEditable:YES];
+ [colorCell setTarget:self];
+ [colorCell setAction:@selector(colorClick:)];
+
+ [column setDataCell:colorCell];
+}
+
+#pragma mark -
+#pragma mark IB action methods
+
+- (IBAction)exportColorScheme:(id)sender
+{
+ NSSavePanel *panel = [NSSavePanel savePanel];
+
+ [panel setRequiredFileType:SPColorThemeFileExtension];
+
+ [panel setExtensionHidden:NO];
+ [panel setAllowsOtherFileTypes:NO];
+ [panel setCanSelectHiddenExtension:YES];
+ [panel setCanCreateDirectories:YES];
+
+ [panel beginSheetForDirectory:nil
+ file:[@"MyTheme" stringByAppendingPathExtension:SPColorThemeFileExtension]
+ modalForWindow:[[self view] window]
+ modalDelegate:self
+ didEndSelector:@selector(panelDidEnd:returnCode:contextInfo:)
+ contextInfo:@"exportColorScheme"];
+}
+
+- (IBAction)importColorScheme:(id)sender
+{
+ if (![self _checkForUnsavedTheme]) return;
+
+ NSOpenPanel *panel = [NSOpenPanel openPanel];
+
+ [panel setCanSelectHiddenExtension:YES];
+ [panel setDelegate:self];
+ [panel setCanChooseDirectories:NO];
+ [panel setAllowsMultipleSelection:NO];
+
+ [panel beginSheetForDirectory:nil
+ file:@""
+ types:[NSArray arrayWithObjects:SPColorThemeFileExtension, @"tmTheme", nil]
+ modalForWindow:[[self view] window]
+ modalDelegate:self
+ didEndSelector:@selector(panelDidEnd:returnCode:contextInfo:)
+ contextInfo:@"importColorScheme"];
+
+}
+
+- (IBAction)loadColorScheme:(id)sender
+{
+ if (![self _checkForUnsavedTheme]) return;
+
+ if ([self _loadColorSchemeFromFile:[NSString stringWithFormat:@"%@/%@.%@", themePath, [sender title], SPColorThemeFileExtension]]) {
+ [prefs setObject:[sender title] forKey:SPCustomQueryEditorThemeName];
+
+ [self updateDisplayColorThemeName];
+ }
+}
+
+- (IBAction)saveAsColorScheme:(id)sender
+{
+ [[NSColorPanel sharedColorPanel] close];
+
+ [enterNameAlertField setHidden:YES];
+ [enterNameInputField setStringValue:@""];
+ [enterNameLabel setStringValue:NSLocalizedString(@"Theme Name:", @"theme name label")];
+
+ [NSApp beginSheet:enterNameWindow
+ modalForWindow:[[self view] window]
+ modalDelegate:self
+ didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
+ contextInfo:@"saveTheme"];
+
+}
+
+- (IBAction)duplicateTheme:(id)sender
+{
+ if ([editThemeListTable numberOfSelectedRows] != 1) return;
+
+ NSString *selectedPath = [NSString stringWithFormat:@"%@/%@_copy.%@", themePath, [editThemeListItems objectAtIndex:[editThemeListTable selectedRow]], SPColorThemeFileExtension];
+
+ NSFileManager *fm = [NSFileManager defaultManager];
+
+ if (![fm fileExistsAtPath:selectedPath isDirectory:nil]) {
+ if ([fm copyItemAtPath:[NSString stringWithFormat:@"%@/%@.%@", themePath, [editThemeListItems objectAtIndex:[editThemeListTable selectedRow]], SPColorThemeFileExtension] toPath:selectedPath error:nil]) {
+
+ if (editThemeListItems) [editThemeListItems release], editThemeListItems = nil;
+
+ editThemeListItems = [[NSArray arrayWithArray:[self _getAvailableThemes]] retain];
+
+ [editThemeListTable reloadData];
+
+ [self updateDisplayColorThemeName];
+ [self updateColorSchemeSelectionMenu];
+
+ return;
+ }
+ }
+
+ NSBeep();
+
+ [editThemeListTable reloadData];
+}
+
+- (IBAction)removeTheme:(id)sender
+{
+ if ([editThemeListTable numberOfSelectedRows] != 1) return;
+
+ NSString *selectedPath = [NSString stringWithFormat:@"%@/%@.%@", themePath, [editThemeListItems objectAtIndex:[editThemeListTable selectedRow]], SPColorThemeFileExtension];
+
+ NSFileManager *fm = [NSFileManager defaultManager];
+
+ if ([fm fileExistsAtPath:selectedPath isDirectory:nil]) {
+ if ([fm removeItemAtPath:selectedPath error:nil]) {
+
+ // Refresh current color theme setting name
+ if ([[[prefs objectForKey:SPCustomQueryEditorThemeName] lowercaseString] isEqualToString:[[editThemeListItems objectAtIndex:[editThemeListTable selectedRow]] lowercaseString]]) {
+ [prefs setObject:@"User-defined" forKey:SPCustomQueryEditorThemeName];
+ }
+
+ if (editThemeListItems) [editThemeListItems release], editThemeListItems = nil;
+
+ editThemeListItems = [[NSArray arrayWithArray:[self _getAvailableThemes]] retain];
+
+ [editThemeListTable reloadData];
+
+ [self updateDisplayColorThemeName];
+ [self updateColorSchemeSelectionMenu];
+
+ return;
+ }
+ }
+
+ NSBeep();
+
+ [editThemeListTable reloadData];
+}
+
+- (IBAction)closePanelSheet:(id)sender
+{
+ [NSApp endSheet:[sender window] returnCode:[sender tag]];
+ [[sender window] orderOut:self];
+}
+
+/**
+ * Opens the font panel.
+ */
+- (IBAction)showCustomQueryFontPanel:(id)sender
+{
+ [(SPPreferenceController *)[[[self view] window] delegate] setFontChangeTarget:2];
+
+ [[NSFontPanel sharedFontPanel] setPanelFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]] isMultiple:NO];
+ [[NSFontPanel sharedFontPanel] makeKeyAndOrderFront:self];
+}
+
+/**
+ * Sets the syntax colours back to there defaults.
+ */
+- (IBAction)setDefaultColors:(id)sender
+{
+ if (![self _checkForUnsavedTheme]) return;
+
+ [[NSColorPanel sharedColorPanel] close];
+
+ [prefs setObject:@"Default" forKey:SPCustomQueryEditorThemeName];
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.000 green:0.455 blue:0.000 alpha:1.000]] forKey:SPCustomQueryEditorCommentColor];
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.769 green:0.102 blue:0.086 alpha:1.000]] forKey:SPCustomQueryEditorQuoteColor];
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.200 green:0.250 blue:1.000 alpha:1.000]] forKey:SPCustomQueryEditorSQLKeywordColor];
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.000 green:0.000 blue:0.658 alpha:1.000]] forKey:SPCustomQueryEditorBacktickColor];
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.506 green:0.263 blue:0.000 alpha:1.000]] forKey:SPCustomQueryEditorNumericColor];
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.500 green:0.500 blue:0.500 alpha:1.000]] forKey:SPCustomQueryEditorVariableColor];
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.950 green:0.950 blue:0.950 alpha:1.000]] forKey:SPCustomQueryEditorHighlightQueryColor];
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.7098 green:0.8352 blue:1.000 alpha:1.000]] forKey:SPCustomQueryEditorSelectionColor];
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor blackColor]] forKey:SPCustomQueryEditorTextColor];
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor blackColor]] forKey:SPCustomQueryEditorCaretColor];
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor whiteColor]] forKey:SPCustomQueryEditorBackgroundColor];
+
+ [colorSettingTableView reloadData];
+
+ [self updateDisplayColorThemeName];
+}
+
+/**
+ * Opens the theme liste sheet.
+ */
+- (IBAction)editThemeList:(id)sender
+{
+ [[NSColorPanel sharedColorPanel] close];
+
+ if (editThemeListItems) [editThemeListItems release], editThemeListItems = nil;
+
+ editThemeListItems = [[NSArray arrayWithArray:[self _getAvailableThemes]] retain];
+
+ [editThemeListTable reloadData];
+
+ [NSApp beginSheet:editThemeListWindow
+ modalForWindow:[[self view] window]
+ modalDelegate:self
+ didEndSelector:nil
+ contextInfo:nil];
+}
+
+#pragma mark -
+#pragma mark Public API
+
+/**
+ * Updates the displayed font according to the user's preferences.
+ */
+- (void)updateDisplayedEditorFontName
+{
+ NSFont *font = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]];
+
+ [editorFontName setFont:font];
+ [editorFontName setStringValue:[NSString stringWithFormat:@"%@, %.1f pt", [font displayName], [font pointSize]]];
+
+ [colorSettingTableView reloadData];
+}
+
+/**
+ * Updates the colour scheme selection menu according to the available schemes.
+ */
+- (void)updateColorSchemeSelectionMenu
+{
+ NSMenuItem *defaultItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Default", @"default label") action:@selector(setDefaultColors:) keyEquivalent:@""];
+
+ [defaultItem setTarget:self];
+
+ // Build theme selection submenu
+ [themeSelectionMenu removeAllItems];
+ [themeSelectionMenu addItem:defaultItem];
+ [themeSelectionMenu addItem:[NSMenuItem separatorItem]];
+
+ [defaultItem release];
+
+ NSArray *foundThemes = [self _getAvailableThemes];
+
+ if ([foundThemes count]) {
+ for (NSString* item in foundThemes)
+ {
+ NSMenuItem *loadItem = [[NSMenuItem alloc] initWithTitle:item action:@selector(loadColorScheme:) keyEquivalent:@""];
+
+ [loadItem setTarget:self];
+
+ [themeSelectionMenu addItem:loadItem];
+
+ [loadItem release];
+ }
+
+ [themeSelectionMenu addItem:[NSMenuItem separatorItem]];
+ }
+
+ NSMenuItem *editItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Edit Theme List…", @"edit theme list label") action:@selector(editThemeList:) keyEquivalent:@""];
+
+ [editItem setTarget:self];
+
+ [themeSelectionMenu addItem:editItem];
+
+ [editItem release];
+}
+
+/**
+ * Updates the currently selected colour scheme theme name.
+ */
+- (void)updateDisplayColorThemeName
+{
+ if (![prefs objectForKey:SPCustomQueryEditorThemeName]) {
+ [colorThemeName setHidden:YES];
+ [colorThemeNameLabel setHidden:YES];
+
+ return;
+ }
+
+ if ([[[prefs objectForKey:SPCustomQueryEditorThemeName] lowercaseString] isEqualToString:@"user-defined"]) {
+ [colorThemeName setHidden:YES];
+ [colorThemeNameLabel setHidden:YES];
+
+ return;
+ }
+
+ NSString *currentThemeName = [[prefs objectForKey:SPCustomQueryEditorThemeName] lowercaseString];
+
+ if ([currentThemeName isEqualToString:@"default"]) {
+ [colorThemeName setHidden:NO];
+ [colorThemeNameLabel setHidden:NO];
+
+ return;
+ }
+
+ BOOL nameValid = NO;
+
+ for (NSString* item in [self _getAvailableThemes])
+ {
+ if ([[item lowercaseString] isEqualToString:currentThemeName]) {
+ nameValid = YES;
+ break;
+ }
+ }
+
+ if (nameValid) {
+ [colorThemeName setHidden:NO];
+ [colorThemeNameLabel setHidden:NO];
+
+ return;
+ }
+ else {
+ [prefs setObject:@"User-defined" forKey:SPCustomQueryEditorThemeName];
+ [colorThemeName setHidden:YES];
+ [colorThemeNameLabel setHidden:YES];
+
+ [self updateColorSchemeSelectionMenu];
+
+ return;
+ }
+
+ [colorThemeName setHidden:NO];
+ [colorThemeNameLabel setHidden:NO];
+}
+
+#pragma mark -
+#pragma mark Font panel methods
+
+/**
+ * Invoked when the user clicks a colour cell.
+ */
+- (void)colorClick:(id)sender
+{
+ colorRow = [sender clickedRow];
+
+ NSColorPanel *panel = [NSColorPanel sharedColorPanel];
+
+ [panel setTarget:self];
+ [panel setAction:@selector(colorChanged:)];
+ [panel setColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:[editorColors objectAtIndex:colorRow]]]];
+
+ [colorSettingTableView deselectAll:nil];
+
+ [panel makeKeyAndOrderFront:self];
+}
+
+/**
+ * Invoked when the user changes and editor colour.
+ */
+- (void)colorChanged:(id)sender
+{
+ if (![[NSColorPanel sharedColorPanel] isVisible]) return;
+
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[sender color]] forKey:[editorColors objectAtIndex:colorRow]];
+ [colorSettingTableView reloadData];
+
+ [prefs setObject:@"User-defined" forKey:SPCustomQueryEditorThemeName];
+
+ [self updateDisplayColorThemeName];
+}
+
+/**
+ * Sets the font panel's valid modes.
+ */
+- (NSUInteger)validModesForFontPanel:(NSFontPanel *)fontPanel
+{
+ return (NSFontPanelSizeModeMask | NSFontPanelCollectionModeMask);
+}
+
+#pragma mark -
+#pragma mark Sheet callbacks
+
+- (void)checkForUnsavedThemeDidEndSheet:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
+{
+ checkForUnsavedThemeSheetStatus = returnCode;
+}
+
+- (void)sheetDidEnd:(id)sheet returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo
+{
+ // Order out current sheet to suppress overlapping of sheets
+ if ([sheet respondsToSelector:@selector(orderOut:)]) {
+ [sheet orderOut:nil];
+ }
+ else if ([sheet respondsToSelector:@selector(window)]) {
+ [[sheet window] orderOut:nil];
+ }
+
+ if ([contextInfo isEqualToString:@"saveTheme"]) {
+ if (returnCode == NSOKButton) {
+ NSFileManager *fm = [NSFileManager defaultManager];
+
+ if (![fm fileExistsAtPath:themePath isDirectory:nil]) {
+ if (![fm createDirectoryAtPath:themePath withIntermediateDirectories:YES attributes:nil error:nil]) {
+ NSBeep();
+ return;
+ }
+ }
+
+ [self _saveColorThemeAtPath:[NSString stringWithFormat:@"%@/%@.%@", themePath, [enterNameInputField stringValue], SPColorThemeFileExtension]];
+ [self updateColorSchemeSelectionMenu];
+
+ [prefs setObject:[enterNameInputField stringValue] forKey:SPCustomQueryEditorThemeName];
+
+ [self updateDisplayColorThemeName];
+ }
+ }
+}
+
+- (void)panelDidEnd:(NSSavePanel *)panel returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo
+{
+ if ([contextInfo isEqualToString:@"exportColorScheme"]) {
+ if (returnCode == NSOKButton) {
+ [self _saveColorThemeAtPath:[panel filename]];
+ }
+ }
+ else if ([contextInfo isEqualToString:@"importColorScheme"]) {
+ if (returnCode == NSOKButton) {
+ if ([self _loadColorSchemeFromFile:[[panel filenames] objectAtIndex:0]]) {
+ [prefs setObject:@"User-defined" forKey:SPCustomQueryEditorThemeName];
+ [self updateDisplayColorThemeName];
+ }
+ }
+ }
+}
+
+#pragma mark -
+#pragma mark TableView datasource methods
+
+- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
+{
+ if (tableView == colorSettingTableView) {
+ return [editorColors count];
+ }
+ else if (tableView == editThemeListTable) {
+ return [editThemeListItems count];
+ }
+
+ return nil;
+}
+
+- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex
+{
+ if (tableView == colorSettingTableView) {
+ return ([[tableColumn identifier] isEqualToString:@"name"]) ? [editorNameForColors objectAtIndex:rowIndex] : [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:[editorColors objectAtIndex:rowIndex]]];
+ }
+ else if (tableView == editThemeListTable) {
+ return [editThemeListItems objectAtIndex:rowIndex];
+ }
+
+ return nil;
+}
+
+- (void)tableView:(NSTableView *)tableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
+{
+ if (tableView == editThemeListTable) {
+
+ // Theme name editing
+ NSString *newName = (NSString*)anObject;
+
+ // Check for non-valid names
+ if (![newName length] || [[newName lowercaseString] isEqualToString:@"default"] || [[newName lowercaseString] isEqualToString:@"user-defined"]) {
+ NSBeep();
+ [editThemeListTable reloadData];
+ return;
+ }
+
+ // Check if new name already exists
+ for (NSString* item in editThemeListItems)
+ {
+ if ([[item lowercaseString] isEqualToString:newName]) {
+ NSBeep();
+ [editThemeListTable reloadData];
+ return;
+ }
+ }
+
+ // Rename theme file
+ NSFileManager *fm = [NSFileManager defaultManager];
+
+ if (![fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@.%@", themePath, [editThemeListItems objectAtIndex:rowIndex], SPColorThemeFileExtension] toPath:[NSString stringWithFormat:@"%@/%@.%@", themePath, newName, SPColorThemeFileExtension] error:nil]) {
+ NSBeep();
+ [editThemeListTable reloadData];
+ return;
+ }
+
+ // Refresh current color theme setting name
+ if ([[[prefs objectForKey:SPCustomQueryEditorThemeName] lowercaseString] isEqualToString:[[editThemeListItems objectAtIndex:rowIndex] lowercaseString]]) {
+ [prefs setObject:newName forKey:SPCustomQueryEditorThemeName];
+ }
+
+ // Reload everything needed
+ if (editThemeListItems) [editThemeListItems release], editThemeListItems = nil;
+ editThemeListItems = [[NSArray arrayWithArray:[self _getAvailableThemes]] retain];
+
+ [editThemeListTable reloadData];
+
+ [self updateDisplayColorThemeName];
+ [self updateColorSchemeSelectionMenu];
+ }
+}
+
+#pragma mark -
+#pragma mark TableView delegate methods
+
+- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
+{
+ if(aTableView == colorSettingTableView) {
+
+ NSColorPanel* panel;
+
+ colorRow = rowIndex;
+ panel = [NSColorPanel sharedColorPanel];
+
+ [panel setTarget:self];
+ [panel setAction:@selector(colorChanged:)];
+ [panel setColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:[editorColors objectAtIndex:colorRow]]]];
+ [colorSettingTableView deselectAll:nil];
+ [panel makeKeyAndOrderFront:self];
+
+ return NO;
+ }
+
+ return YES;
+}
+
+- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)index
+{
+ if (tableView == colorSettingTableView && [[tableColumn identifier] isEqualToString:@"name"]) {
+ if ([cell isKindOfClass:[NSTextFieldCell class]]) {
+ [cell setDrawsBackground:YES];
+
+ NSFont *nf = [NSFont fontWithName:[[[NSFontPanel sharedFontPanel] panelConvertFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]]] fontName] size:13.0f];
+
+ [cell setFont:nf];
+
+ switch (index)
+ {
+ case 1:
+ [cell setTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]]];
+ [cell setBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]]];
+ break;
+ case 9:
+ [cell setTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]]];
+ [cell setBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorHighlightQueryColor]]];
+ break;
+ case 10:
+ [cell setTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]]];
+ [cell setBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSelectionColor]]];
+ break;
+ default:
+ [cell setTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:[editorColors objectAtIndex:index]]]];
+ [cell setBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]]];
+ }
+ }
+ }
+}
+
+#pragma mark -
+#pragma mark TextField delegate methods
+
+/**
+ * Trap and control the 'name' field of the selected favorite. If the user pressed
+ * 'Add Favorite' the 'name' field is set to "New Favorite". If the user do not
+ * change the 'name' field or delete that field it will be set to user@host automatically.
+ */
+- (void)controlTextDidChange:(NSNotification *)aNotification
+{
+ id field = [aNotification object];
+
+ // Validate 'Save' button for entering a valid theme name
+ if (field == enterNameInputField) {
+ NSString *name = [[enterNameInputField stringValue] lowercaseString];
+
+ if (![name length] || [name isEqualToString:@"default"] || [name isEqualToString:@"user-defined"]) {
+ [themeNameSaveButton setEnabled:NO];
+ }
+ else {
+ BOOL hide = YES;
+
+ for (NSString* item in [self _getAvailableThemes])
+ {
+ if ([[item lowercaseString] isEqualToString:name]) {
+ hide = NO;
+ break;
+ }
+ }
+
+ [enterNameAlertField setHidden:hide];
+ [themeNameSaveButton setEnabled:YES];
+ }
+
+ return;
+ }
+}
+
+#pragma mark -
+#pragma mark Preference pane protocol methods
+
+- (NSView *)preferencePaneView
+{
+ return [self view];
+}
+
+- (NSImage *)preferencePaneIcon
+{
+ return [NSImage imageNamed:@"toolbar-preferences-queryeditor"];
+}
+
+- (NSString *)preferencePaneName
+{
+ return NSLocalizedString(@"Query Editor", @"query editor preference pane name");
+}
+
+- (NSString *)preferencePaneIdentifier
+{
+ return SPPreferenceToolbarEditor;
+}
+
+- (NSString *)preferencePaneToolTip
+{
+ return NSLocalizedString(@"Query Editor Preferences", @"query editor preference pane tooltip");
+}
+
+- (BOOL)preferencePaneAllowsResizing
+{
+ return NO;
+}
+
+#pragma mark -
+#pragma mark Private API
+
+- (BOOL)_checkForUnsavedTheme
+{
+ if (![prefs objectForKey:SPCustomQueryEditorThemeName] || [[[prefs objectForKey:SPCustomQueryEditorThemeName] lowercaseString] isEqualToString:@"user-defined"]) {
+
+ [[NSColorPanel sharedColorPanel] close];
+
+ SPBeginWaitingAlertSheet(@"title",
+ NSLocalizedString(@"Proceed", @"proceed button"), NSLocalizedString(@"Cancel", @"cancel button"), nil,
+ NSWarningAlertStyle, [[self view] window], self,
+ @selector(checkForUnsavedThemeDidEndSheet:returnCode:contextInfo:),
+ nil,
+ NSLocalizedString(@"Warning", @"warning"),
+ NSLocalizedString(@"Current color theme is unsaved. Do you want to proceed without saving it?", @"Current color theme is unsaved. Do you want to proceed without saving it message"),
+ checkForUnsavedThemeSheetStatus
+ );
+
+ return (checkForUnsavedThemeSheetStatus == NSAlertDefaultReturn);
+ }
+
+ [[NSColorPanel sharedColorPanel] close];
+
+ return YES;
+}
+
+- (NSArray *)_getAvailableThemes
+{
+ // Read ~/Library/Application Support/Sequel Pro/Themes
+ NSFileManager *fm = [NSFileManager defaultManager];
+
+ if ([fm fileExistsAtPath:themePath isDirectory:nil]) {
+ NSArray *allItemsRaw = [fm contentsOfDirectoryAtPath:themePath error:NULL];
+
+ if(!allItemsRaw) return [NSArray array];
+
+ // Filter out all themes
+ NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF ENDSWITH %@", [NSString stringWithFormat:@".%@", SPColorThemeFileExtension]];
+ NSMutableArray *allItems = [NSMutableArray arrayWithArray:allItemsRaw];
+
+ [allItems filterUsingPredicate:predicate];
+
+ allItemsRaw = [NSArray arrayWithArray:allItems];
+
+ [allItems removeAllObjects];
+
+ // Remove file extension
+ for (NSString* item in allItemsRaw)
+ {
+ [allItems addObject:[item substringToIndex:[item length]-[SPColorThemeFileExtension length]-1]];
+ }
+
+ return (NSArray *)allItems;
+ }
+
+ return [NSArray array];
+}
+
+- (void)_saveColorThemeAtPath:(NSString *)path
+{
+ // Build plist dictionary
+ NSMutableDictionary *scheme = [NSMutableDictionary dictionary];
+ NSMutableDictionary *mainsettings = [NSMutableDictionary dictionary];
+ NSMutableArray *settings = [NSMutableArray array];
+
+ CGFloat red, green, blue, alpha;
+ NSInteger redInt, greenInt, blueInt, alphaInt;
+ NSString *redHexValue, *greenHexValue, *blueHexValue, *alphaHexValue;
+
+ [prefs synchronize];
+
+ NSColor *aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]];
+ [mainsettings setObject:[aColor rgbHexString] forKey:@"background"];
+
+ aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorCaretColor]];
+ [mainsettings setObject:[aColor rgbHexString] forKey:@"caret"];
+
+ aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]];
+ [mainsettings setObject:[aColor rgbHexString] forKey:@"foreground"];
+
+ aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorHighlightQueryColor]];
+ [mainsettings setObject:[aColor rgbHexString] forKey:@"lineHighlight"];
+
+ aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSelectionColor]];
+ [mainsettings setObject:[aColor rgbHexString] forKey:@"selection"];
+
+ [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:mainsettings, @"settings", nil]];
+
+ aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorCommentColor]];
+ [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:
+ @"Comment", @"name",
+ [NSDictionary dictionaryWithObjectsAndKeys:
+ [aColor rgbHexString], @"foreground",
+ nil
+ ], @"settings",
+ nil
+ ]];
+
+ aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorQuoteColor]];
+ [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:
+ @"String", @"name",
+ [NSDictionary dictionaryWithObjectsAndKeys:
+ [aColor rgbHexString], @"foreground",
+ nil
+ ], @"settings",
+ nil
+ ]];
+
+ aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSQLKeywordColor]];
+ [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:
+ @"Keyword", @"name",
+ [NSDictionary dictionaryWithObjectsAndKeys:
+ [aColor rgbHexString], @"foreground",
+ nil
+ ], @"settings",
+ nil
+ ]];
+
+ aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBacktickColor]];
+ [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:
+ @"User-defined constant", @"name",
+ [NSDictionary dictionaryWithObjectsAndKeys:
+ [aColor rgbHexString], @"foreground",
+ nil
+ ], @"settings",
+ nil
+ ]];
+
+ aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorNumericColor]];
+ [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:
+ @"Number", @"name",
+ [NSDictionary dictionaryWithObjectsAndKeys:
+ [aColor rgbHexString], @"foreground",
+ nil
+ ], @"settings",
+ nil
+ ]];
+
+ aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorVariableColor]];
+ [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:
+ @"Variable", @"name",
+ [NSDictionary dictionaryWithObjectsAndKeys:
+ [aColor rgbHexString], @"foreground",
+ nil
+ ], @"settings",
+ nil
+ ]];
+
+ [scheme setObject:settings forKey:@"settings"];
+
+ NSString *err = nil;
+ NSData *plist = [NSPropertyListSerialization dataFromPropertyList:scheme
+ format:NSPropertyListXMLFormat_v1_0
+ errorDescription:&err];
+
+ if(err != nil) {
+ NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while converting color scheme data", @"error while converting color scheme data")]
+ defaultButton:NSLocalizedString(@"OK", @"OK button")
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:err];
+
+ [alert setAlertStyle:NSCriticalAlertStyle];
+ [alert runModal];
+
+ return;
+ }
+
+ NSError *error = nil;
+ [plist writeToFile:path options:NSAtomicWrite error:&error];
+
+ if (error) [[NSAlert alertWithError:error] runModal];
+}
+
+- (BOOL)_loadColorSchemeFromFile:(NSString *)filename
+{
+ NSError *readError = nil;
+ NSString *convError = nil;
+ NSPropertyListFormat format;
+
+ NSDictionary *theme = nil;
+
+ NSData *pData = [NSData dataWithContentsOfFile:filename options:NSUncachedRead error:&readError];
+
+ theme = [[NSPropertyListSerialization propertyListFromData:pData
+ mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&convError] retain];
+
+ if (!theme || readError != nil || [convError length] || !(format == NSPropertyListXMLFormat_v1_0 || format == NSPropertyListBinaryFormat_v1_0)) {
+ NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading data file", @"error while reading data file")]
+ defaultButton:NSLocalizedString(@"OK", @"OK button")
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:NSLocalizedString(@"File couldn't be read.", @"error while reading data file")];
+
+ [alert setAlertStyle:NSCriticalAlertStyle];
+ [alert runModal];
+ if (theme) [theme release];
+ [self updateDisplayColorThemeName];
+ return NO;
+ }
+
+ if ([theme objectForKey:@"settings"]
+ && [[theme objectForKey:@"settings"] isKindOfClass:[NSArray class]]
+ && [[theme objectForKey:@"settings"] count]
+ && [[[theme objectForKey:@"settings"] objectAtIndex:0] isKindOfClass:[NSDictionary class]]
+ && [[[theme objectForKey:@"settings"] objectAtIndex:0] objectForKey:@"settings"]) {
+
+ NSInteger counter = 0;
+
+ for (NSDictionary *dict in [theme objectForKey:@"settings"])
+ {
+ if (counter == 0) {
+ if ([dict objectForKey:@"settings"]) {
+ NSDictionary *dic = [dict objectForKey:@"settings"];
+ if([dic objectForKey:@"background"])
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"background"]]] forKey:SPCustomQueryEditorBackgroundColor];
+ if([dic objectForKey:@"caret"])
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"caret"]]] forKey:SPCustomQueryEditorCaretColor];
+ if([dic objectForKey:@"foreground"])
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"foreground"]]] forKey:SPCustomQueryEditorTextColor];
+ if([dic objectForKey:@"lineHighlight"])
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"lineHighlight"]]] forKey:SPCustomQueryEditorHighlightQueryColor];
+ if([dic objectForKey:@"selection"])
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"selection"]]] forKey:SPCustomQueryEditorSelectionColor];
+ }
+ else {
+ continue;
+ }
+ }
+ else {
+ if ([dict objectForKey:@"name"] && [dict objectForKey:@"settings"] && [[dict objectForKey:@"settings"] isKindOfClass:[NSDictionary class]] && [[dict objectForKey:@"settings"] objectForKey:@"foreground"]) {
+ if ([[dict objectForKey:@"name"] isEqualToString:@"Comment"])
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:
+ [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]]
+ forKey:SPCustomQueryEditorCommentColor];
+ else if ([[dict objectForKey:@"name"] isEqualToString:@"String"])
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:
+ [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]]
+ forKey:SPCustomQueryEditorQuoteColor];
+ else if ([[dict objectForKey:@"name"] isEqualToString:@"Keyword"])
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:
+ [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]]
+ forKey:SPCustomQueryEditorSQLKeywordColor];
+ else if ([[dict objectForKey:@"name"] isEqualToString:@"User-defined constant"])
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:
+ [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]]
+ forKey:SPCustomQueryEditorBacktickColor];
+ else if ([[dict objectForKey:@"name"] isEqualToString:@"Number"])
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:
+ [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]]
+ forKey:SPCustomQueryEditorNumericColor];
+ else if ([[dict objectForKey:@"name"] isEqualToString:@"Variable"])
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:
+ [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]]
+ forKey:SPCustomQueryEditorVariableColor];
+ }
+ }
+
+ counter++;
+ }
+
+ [theme release];
+ [colorSettingTableView reloadData];
+ }
+ else {
+ NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading data file", @"error while reading data file")]
+ defaultButton:NSLocalizedString(@"OK", @"OK button")
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:NSLocalizedString(@"No color theme data found.", @"error that no color theme found")];
+
+ [alert setAlertStyle:NSInformationalAlertStyle];
+ [alert runModal];
+ [theme release];
+
+ return NO;
+ }
+
+ return YES;
+}
+
+#pragma mark -
+
+/**
+ * Dealloc.
+ */
+- (void)dealloc
+{
+ if (themePath) [themePath release], themePath = nil;
+ if (editThemeListItems) [editThemeListItems release], editThemeListItems = nil;
+ if (editorColors) [editorColors release], editorColors = nil;
+ if (editorNameForColors) [editorNameForColors release], editorNameForColors = nil;
+
+ [super dealloc];
+}
+
+@end
diff --git a/Source/SPFavoritesPreferencePane.h b/Source/SPFavoritesPreferencePane.h
new file mode 100644
index 00000000..9d77d4c4
--- /dev/null
+++ b/Source/SPFavoritesPreferencePane.h
@@ -0,0 +1,98 @@
+//
+// $Id$
+//
+// SPFavoritesPreferencePane.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPPreferencePane.h"
+
+@class SPKeychain, BWAnchoredButtonBar;
+
+/**
+ * @class SPFavoritesPreferencePane SPFavoritesPreferencePane.h
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * Favorites preference pane controller.
+ */
+@interface SPFavoritesPreferencePane : SPPreferencePane <SPPreferencePaneProtocol>
+{
+ IBOutlet NSTableView *favoritesTableView;
+ IBOutlet NSArrayController *favoritesController;
+
+ IBOutlet NSTabView *favoritesTabView;
+
+ IBOutlet NSSecureTextField *standardPasswordField;
+ IBOutlet NSSecureTextField *socketPasswordField;
+ IBOutlet NSSecureTextField *sshSQLPasswordField;
+ IBOutlet NSSecureTextField *sshPasswordField;
+
+ IBOutlet NSTextField *favoriteNameTextField;
+ IBOutlet NSTextField *favoriteUserTextField;
+ IBOutlet NSTextField *favoriteHostTextField;
+ IBOutlet NSTextField *favoriteUserTextFieldSocket;
+ IBOutlet NSTextField *favoriteUserTextFieldSSH;
+ IBOutlet NSTextField *favoriteHostTextFieldSSH;
+
+ IBOutlet NSButton *sshSSHKeyButton;
+ IBOutlet NSButton *standardSSLKeyFileButton;
+ IBOutlet NSButton *standardSSLCertificateButton;
+ IBOutlet NSButton *standardSSLCACertButton;
+ IBOutlet NSButton *socketSSLKeyFileButton;
+ IBOutlet NSButton *socketSSLCertificateButton;
+ IBOutlet NSButton *socketSSLCACertButton;
+
+ IBOutlet NSView *sshKeyLocationHelp;
+ IBOutlet NSView *sslKeyFileLocationHelp;
+ IBOutlet NSView *sslCertificateLocationHelp;
+ IBOutlet NSView *sslCACertLocationHelp;
+
+ IBOutlet NSTextFieldCell *tableCell;
+
+ IBOutlet NSMenuItem *favoritesSortByMenuItem;
+
+ IBOutlet BWAnchoredButtonBar *splitViewButtonBar;
+
+ SPKeychain *keychain;
+
+ NSInteger favoriteType;
+ NSDictionary *currentFavorite;
+ BOOL favoriteNameFieldWasTouched;
+
+ // Sorting
+ BOOL reverseFavoritesSort;
+ SPFavoritesSortItem previousSortItem, currentSortItem;
+}
+
+- (IBAction)addFavorite:(id)sender;
+- (IBAction)removeFavorite:(id)sender;
+- (IBAction)duplicateFavorite:(id)sender;
+- (IBAction)makeSelectedFavoriteDefault:(id)sender;
+- (IBAction)sortFavorites:(id)sender;
+- (IBAction)reverseFavoritesSortOrder:(id)sender;
+- (IBAction)chooseKeyLocation:(id)sender;
+- (IBAction)favoriteTypeDidChange:(id)sender;
+- (IBAction)chooseKeyLocation:(id)sender;
+
+- (void)selectFavorites:(NSArray *)favorites;
+
+@end
diff --git a/Source/SPFavoritesPreferencePane.m b/Source/SPFavoritesPreferencePane.m
new file mode 100644
index 00000000..07405dd3
--- /dev/null
+++ b/Source/SPFavoritesPreferencePane.m
@@ -0,0 +1,902 @@
+//
+// $Id$
+//
+// SPFavoritesPreferencePane.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPFavoritesPreferencePane.h"
+#import "SPFavoriteTextFieldCell.h"
+#import "SPPreferenceController.h"
+#import "SPKeychain.h"
+
+@interface SPFavoritesPreferencePane (PrivateAPI)
+
+- (void)_sortFavorites;
+- (void)_updateFavoritePasswordsFromField:(NSControl *)passwordControl;
+
+@end
+
+@implementation SPFavoritesPreferencePane
+
+#pragma mark -
+#pragma mark Intialisation
+
+/**
+ * Init.
+ */
+- (id)init
+{
+ if ((self = [super init])) {
+
+ keychain = [[SPKeychain alloc] init];
+
+ favoriteType = 0;
+ reverseFavoritesSort = NO;
+ favoriteNameFieldWasTouched = YES;
+
+ previousSortItem = SPFavoritesSortNameItem;
+ }
+
+ return self;
+}
+
+/**
+ * Initialise the UI, specifically the favourites table view and sort the favourites if required.
+ */
+- (void)awakeFromNib
+{
+ // Set sort items
+ currentSortItem = [prefs integerForKey:SPFavoritesSortedBy];
+ reverseFavoritesSort = [prefs boolForKey:SPFavoritesSortedInReverse];
+
+ // Replace column's NSTextFieldCell with custom SWProfileTextFieldCell
+ [[[favoritesTableView tableColumns] objectAtIndex:0] setDataCell:tableCell];
+
+ [favoritesTableView registerForDraggedTypes:[NSArray arrayWithObject:SPFavoritesPasteboardDragType]];
+
+ [favoritesTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
+ [favoritesTableView reloadData];
+
+ [tableCell setImage:[NSImage imageNamed:@"database"]];
+
+ // Set the button bar delegate
+ [splitViewButtonBar setSplitViewDelegate:self];
+
+ // Hide the tabs on the favorites tab view - left visible in IB for easy use
+ [favoritesTabView setTabViewType:NSNoTabsNoBorder];
+
+ // Sort favorites if a sort type has been selected
+ if (currentSortItem > -1) [self _sortFavorites];
+}
+
+#pragma mark -
+#pragma mark IBAction methods
+
+/**
+ * Adds a new connection favorite.
+ */
+- (IBAction)addFavorite:(id)sender
+{
+ NSNumber *favoriteid = [NSNumber numberWithInteger:[[NSString stringWithFormat:@"%f", [[NSDate date] timeIntervalSince1970]] hash]];
+
+ // Create default favorite
+ NSMutableDictionary *favorite = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:NSLocalizedString(@"New Favorite", @"new favorite name"), [NSNumber numberWithInteger:0], @"", @"", @"", @"", [NSNumber numberWithInt:NSOffState], [NSNumber numberWithInt:NSOffState], [NSNumber numberWithInt:NSOffState], [NSNumber numberWithInt:NSOffState], @"", @"", @"", [NSNumber numberWithInt:NSOffState], @"", @"", favoriteid, nil]
+ forKeys:[NSArray arrayWithObjects:@"name", @"type", @"host", @"socket", @"user", @"port", @"useSSL", @"sslKeyFileLocationEnabled", @"sslCertificateFileLocationEnabled", @"sslCACertFileLocationEnabled", @"database", @"sshHost", @"sshUser", @"sshKeyLocationEnabled", @"sshKeyLocation", @"sshPort", @"id", nil]];
+
+ [favoritesController addObject:favorite];
+ [favoritesController setSelectedObjects:[NSArray arrayWithObject:favorite]];
+
+ [favoritesTableView reloadData];
+ [favoritesTableView scrollRowToVisible:[favoritesTableView selectedRow]];
+
+ [[(SPPreferenceController *)[[[self view] window] delegate] generalPreferencePane] updateDefaultFavoritePopup];
+
+ favoriteNameFieldWasTouched = NO;
+
+ [[[self view] window] makeFirstResponder:favoriteHostTextField];
+}
+
+/**
+ * Removes the selected connection favorite.
+ */
+- (IBAction)removeFavorite:(id)sender
+{
+ if ([favoritesTableView numberOfSelectedRows] == 1) {
+ NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Delete favorite '%@'?", @"delete database message"), [favoritesController valueForKeyPath:@"selection.name"]]
+ defaultButton:NSLocalizedString(@"Delete", @"delete button")
+ alternateButton:NSLocalizedString(@"Cancel", @"cancel button")
+ otherButton:nil
+ informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"Are you sure you want to delete the favorite '%@'? This operation cannot be undone.", @"delete database informative message"), [favoritesController valueForKeyPath:@"selection.name"]]];
+
+ NSArray *buttons = [alert buttons];
+
+ // Change the alert's cancel button to have the key equivalent of return
+ [[buttons objectAtIndex:0] setKeyEquivalent:@"d"];
+ [[buttons objectAtIndex:0] setKeyEquivalentModifierMask:NSCommandKeyMask];
+ [[buttons objectAtIndex:1] setKeyEquivalent:@"\r"];
+
+ [alert setAlertStyle:NSCriticalAlertStyle];
+
+ [alert beginSheetModalForWindow:[[self view] window] modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"removeFavorite"];
+ }
+}
+
+/**
+ * Duplicates the selected connection favorite.
+ */
+- (IBAction)duplicateFavorite:(id)sender
+{
+ if ([favoritesTableView numberOfSelectedRows] == 1) {
+
+ NSMutableDictionary *favorite = [NSMutableDictionary dictionaryWithDictionary:[[favoritesController arrangedObjects] objectAtIndex:[favoritesTableView selectedRow]]];
+ NSNumber *favoriteid = [NSNumber numberWithInteger:[[NSString stringWithFormat:@"%f", [[NSDate date] timeIntervalSince1970]] hash]];
+ NSInteger duplicatedFavoriteType = [[favorite objectForKey:@"type"] integerValue];
+
+ // Select the keychain passwords for duplication
+ NSString *keychainName = [keychain nameForFavoriteName:[favorite objectForKey:@"name"] id:[favorite objectForKey:@"id"]];
+ NSString *keychainAccount = [keychain accountForUser:[favorite objectForKey:@"user"] host:((duplicatedFavoriteType == SPSocketConnection)?@"localhost":[favorite objectForKey:@"host"]) database:[favorite objectForKey:@"database"]];
+ NSString *password = [keychain getPasswordForName:keychainName account:keychainAccount];
+ NSString *keychainSSHName = [keychain nameForSSHForFavoriteName:[favorite objectForKey:@"name"] id:[favorite objectForKey:@"id"]];
+ NSString *keychainSSHAccount = [keychain accountForSSHUser:[favorite objectForKey:@"sshUser"] sshHost:[favorite objectForKey:@"sshHost"]];
+ NSString *sshPassword = [keychain getPasswordForName:keychainSSHName account:keychainSSHAccount];
+
+ // Update the unique ID
+ [favorite setObject:favoriteid forKey:@"id"];
+
+ // Alter the name for clarity
+ [favorite setObject:[NSString stringWithFormat:NSLocalizedString(@"%@ Copy", @"Initial favourite name after duplicating a previous favourite"), [favorite objectForKey:@"name"]] forKey:@"name"];
+
+ // Create new keychain items if appropriate
+ if (password && [password length]) {
+ keychainName = [keychain nameForFavoriteName:[favorite objectForKey:@"name"] id:[favorite objectForKey:@"id"]];
+ [keychain addPassword:password forName:keychainName account:keychainAccount];
+ }
+
+ if (sshPassword && [sshPassword length]) {
+ keychainSSHName = [keychain nameForSSHForFavoriteName:[favorite objectForKey:@"name"] id:[favorite objectForKey:@"id"]];
+ [keychain addPassword:sshPassword forName:keychainSSHName account:keychainSSHAccount];
+ }
+
+ password = nil, sshPassword = nil;
+
+ [favoritesController addObject:favorite];
+ [favoritesController setSelectedObjects:[NSArray arrayWithObject:favorite]];
+
+ [favoritesTableView reloadData];
+ [favoritesTableView scrollRowToVisible:[favoritesTableView selectedRow]];
+
+ [[(SPPreferenceController *)[[[self view] window] delegate] generalPreferencePane] updateDefaultFavoritePopup];
+
+ [[[self view] window] makeFirstResponder:favoriteNameTextField];
+ }
+}
+
+/**
+ * Sorts the favorites table view based on the selected sort by item
+ */
+- (IBAction)sortFavorites:(id)sender
+{
+ previousSortItem = currentSortItem;
+ currentSortItem = [[sender menu] indexOfItem:sender];
+
+ [prefs setInteger:currentSortItem forKey:SPFavoritesSortedBy];
+
+ // Perform sorting
+ [self _sortFavorites];
+
+ if (previousSortItem > -1) [[[sender menu] itemAtIndex:previousSortItem] setState:NSOffState];
+
+ [[[sender menu] itemAtIndex:currentSortItem] setState:NSOnState];
+}
+
+/**
+ * Reverses the favorites table view sorting based on the selected criteria
+ */
+- (IBAction)reverseFavoritesSortOrder:(id)sender
+{
+ reverseFavoritesSort = (![sender state]);
+
+ [prefs setBool:reverseFavoritesSort forKey:SPFavoritesSortedInReverse];
+
+ // Perform re-sorting
+ [self _sortFavorites];
+
+ [sender setState:reverseFavoritesSort];
+}
+
+/**
+ * Makes the selected favorite the default.
+ */
+- (IBAction)makeSelectedFavoriteDefault:(id)sender
+{
+ // Minus 2 from index to account for the 'Last Used' and separator items
+ [prefs setInteger:[favoritesTableView selectedRow] forKey:SPDefaultFavorite];
+
+ [favoritesTableView reloadData];
+
+ [[(SPPreferenceController *)[[[self view] window] delegate] generalPreferencePane] updateDefaultFavoritePopup];
+}
+
+/**
+ * Update the favorite host when the type changes.
+ */
+- (IBAction)favoriteTypeDidChange:(id)sender
+{
+ // If not socket and host is localhost, clear.
+ if (([sender indexOfSelectedItem] != 1) && [[favoritesController valueForKeyPath:@"selection.host"] isEqualToString:@"localhost"])
+ {
+ [favoritesController setValue:@"" forKeyPath:@"selection.host"];
+ }
+
+ favoriteType = [sender indexOfSelectedItem];
+
+ // Update the name for a new added favorite if not touched by the user
+ if(!favoriteNameFieldWasTouched) {
+ [favoriteNameTextField setStringValue:[NSString stringWithFormat:@"%@@%@",
+ ([favoritesController valueForKeyPath:@"selection.user"]) ? [favoritesController valueForKeyPath:@"selection.user"] : @"",
+ (([sender indexOfSelectedItem] == 1) ? @"localhost" :
+ (([favoritesController valueForKeyPath:@"selection.host"]) ? [favoritesController valueForKeyPath:@"selection.host"] : @""))
+ ]];
+
+ [favoritesController setValue:[favoriteNameTextField stringValue] forKeyPath:@"selection.name"];
+ }
+
+ // Request a password refresh to keep keychain references in synch with the favorites
+ [self _updateFavoritePasswordsFromField:nil];
+}
+
+/**
+ * Opens the SSH/SSL key selection window, ready to select a key file.
+ */
+- (IBAction)chooseKeyLocation:(id)sender
+{
+ NSString *directoryPath = nil;
+ NSString *filePath = nil;
+ NSArray *permittedFileTypes = nil;
+ NSOpenPanel *openPanel = [NSOpenPanel openPanel];
+
+ // Switch details by sender.
+ // First, SSH keys:
+ if (sender == sshSSHKeyButton) {
+
+ // If the custom key location is currently disabled - after the button
+ // action - leave it disabled and return without showing the sheet.
+ if (![favoritesController valueForKeyPath:@"selection.sshKeyLocationEnabled"]) {
+ return;
+ }
+
+ // Otherwise open a panel at the last or default location
+ NSString *sshKeyLocation = [favoritesController valueForKeyPath:@"selection.sshKeyLocation"];
+ if (sshKeyLocation && [sshKeyLocation length]) {
+ filePath = [sshKeyLocation lastPathComponent];
+ directoryPath = [sshKeyLocation stringByDeletingLastPathComponent];
+ }
+
+ permittedFileTypes = [NSArray arrayWithObjects:@"pem", @"", nil];
+
+ [openPanel setAccessoryView:sshKeyLocationHelp];
+
+ // SSL key file location:
+ }
+ else if (sender == standardSSLKeyFileButton || sender == socketSSLKeyFileButton) {
+ if ([sender state] == NSOffState) {
+ [favoritesController setValue:nil forKeyPath:@"selection.sslKeyFileLocation"];
+ return;
+ }
+
+ permittedFileTypes = [NSArray arrayWithObjects:@"pem", @"key", @"", nil];
+ [openPanel setAccessoryView:sslKeyFileLocationHelp];
+
+ // SSL certificate file location:
+ }
+ else if (sender == standardSSLCertificateButton || sender == socketSSLCertificateButton) {
+ if ([sender state] == NSOffState) {
+ [favoritesController setValue:nil forKeyPath:@"selection.sslCertificateFileLocation"];
+ return;
+ }
+
+ permittedFileTypes = [NSArray arrayWithObjects:@"pem", @"cert", @"", nil];
+ [openPanel setAccessoryView:sslCertificateLocationHelp];
+
+ // SSL CA certificate file location:
+ }
+ else if (sender == standardSSLCACertButton || sender == socketSSLCACertButton) {
+ if ([sender state] == NSOffState) {
+ [favoritesController setValue:nil forKeyPath:@"selection.sslCACertFileLocation"];
+ return;
+ }
+
+ permittedFileTypes = [NSArray arrayWithObjects:@"pem", @"cert", @"", nil];
+ [openPanel setAccessoryView:sslCACertLocationHelp];
+ }
+
+ [openPanel beginSheetForDirectory:directoryPath
+ file:filePath
+ types:permittedFileTypes
+ modalForWindow:[[self view] window]
+ modalDelegate:self
+ didEndSelector:@selector(chooseKeyLocationSheetDidEnd:returnCode:contextInfo:)
+ contextInfo:sender];
+}
+
+#pragma mark -
+#pragma mark Public API
+
+/**
+ * Selects the specified favorite(s) in the favorites list.
+ */
+- (void)selectFavorites:(NSArray *)favorites
+{
+ [favoritesController setSelectedObjects:favorites];
+ [favoritesTableView scrollRowToVisible:[favoritesController selectionIndex]];
+}
+
+#pragma mark -
+#pragma mark TableView datasource methods
+
+- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
+{
+ return [[favoritesController arrangedObjects] count];
+}
+
+- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex
+{
+ return [[[favoritesController arrangedObjects] objectAtIndex:rowIndex] objectForKey:[tableColumn identifier]];
+}
+
+#pragma mark -
+#pragma mark TableView drag & drop delegate methods
+
+- (BOOL)tableView:(NSTableView *)tableView writeRowsWithIndexes:(NSIndexSet *)rows toPasteboard:(NSPasteboard*)pboard
+{
+ if ([rows count] == 1) {
+ [pboard declareTypes:[NSArray arrayWithObject:SPFavoritesPasteboardDragType] owner:nil];
+ [pboard setString:[[NSNumber numberWithInteger:[rows firstIndex]] stringValue] forType:SPFavoritesPasteboardDragType];
+
+ return YES;
+ }
+ else {
+ return NO;
+ }
+}
+
+- (NSDragOperation)tableView:(NSTableView *)tableView validateDrop:(id <NSDraggingInfo>)info proposedRow:(NSInteger)row proposedDropOperation:(NSTableViewDropOperation)operation
+{
+ NSInteger originalRow;
+ NSArray *pboardTypes = [[info draggingPasteboard] types];
+
+ if (([pboardTypes count] > 1) && (row != -1)) {
+ if (([pboardTypes containsObject:SPFavoritesPasteboardDragType]) && (operation == NSTableViewDropAbove)) {
+ originalRow = [[[info draggingPasteboard] stringForType:SPFavoritesPasteboardDragType] integerValue];
+
+ if ((row != originalRow) && (row != (originalRow + 1))) {
+ return NSDragOperationMove;
+ }
+ }
+ }
+
+ return NSDragOperationNone;
+}
+
+- (BOOL)tableView:(NSTableView *)tableView acceptDrop:(id <NSDraggingInfo>)info row:(NSInteger)row dropOperation:(NSTableViewDropOperation)operation
+{
+ NSInteger originalRow;
+ NSInteger destinationRow;
+ NSInteger lastFavoriteIndexCached;
+ NSMutableDictionary *draggedRow;
+
+ // Disable all automatic sorting
+ currentSortItem = -1;
+ reverseFavoritesSort = NO;
+
+ [prefs setInteger:currentSortItem forKey:SPFavoritesSortedBy];
+ [prefs setBool:NO forKey:SPFavoritesSortedInReverse];
+
+ // Remove sort descriptors
+ [favoritesController setSortDescriptors:[NSArray array]];
+
+ // Uncheck sort by menu items
+ for (NSMenuItem *menuItem in [[favoritesSortByMenuItem submenu] itemArray])
+ {
+ [menuItem setState:NSOffState];
+ }
+
+ originalRow = [[[info draggingPasteboard] stringForType:SPFavoritesPasteboardDragType] integerValue];
+ destinationRow = row;
+
+ if (destinationRow > originalRow) {
+ destinationRow--;
+ }
+
+ draggedRow = [NSMutableDictionary dictionaryWithDictionary:[[favoritesController arrangedObjects] objectAtIndex:originalRow]];
+
+ // Before deleting this favorite, we need to save the current index.
+ // because removeObjectAtArrangedObjectIndex will set prefs LastFavoriteIndex to 0
+ lastFavoriteIndexCached = [prefs integerForKey:SPLastFavoriteIndex];
+
+ [favoritesController removeObjectAtArrangedObjectIndex:originalRow];
+ [favoritesController insertObject:draggedRow atArrangedObjectIndex:destinationRow];
+
+ [favoritesTableView reloadData];
+ [favoritesTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:destinationRow] byExtendingSelection:NO];
+
+ // Update default favorite to take on new value
+ if (lastFavoriteIndexCached == originalRow) {
+ [prefs setInteger:destinationRow forKey:SPLastFavoriteIndex];
+ }
+
+ // Update default favorite to take on new value
+ if ([prefs integerForKey:SPDefaultFavorite] == originalRow) {
+ [prefs setInteger:destinationRow forKey:SPDefaultFavorite];
+ }
+
+ [[(SPPreferenceController *)[[[self view] window] delegate] generalPreferencePane] updateDefaultFavoritePopup];
+
+ return YES;
+}
+
+#pragma mark -
+#pragma mark TableView delegate methods
+
+- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)index
+{
+ if ([cell isKindOfClass:[SPFavoriteTextFieldCell class]]) {
+ [cell setFavoriteName:[[[favoritesController arrangedObjects] objectAtIndex:index] objectForKey:@"name"]];
+
+ if ([[[[favoritesController arrangedObjects] objectAtIndex:index] objectForKey:@"type"] integerValue] == SPSocketConnection) {
+ [cell setFavoriteHost:@"localhost"];
+ }
+ else {
+ [cell setFavoriteHost:[[[favoritesController arrangedObjects] objectAtIndex:index] objectForKey:@"host"]];
+ }
+ }
+}
+
+- (void)tableViewSelectionDidChange:(NSNotification *)notification
+{
+ if ([[favoritesTableView selectedRowIndexes] count] > 0) {
+ [favoritesController setSelectionIndexes:[favoritesTableView selectedRowIndexes]];
+ }
+
+ // If no selection is present, blank the password fields (which can't use bindings)
+ if ([[favoritesTableView selectedRowIndexes] count] == 0) {
+ [standardPasswordField setStringValue:@""];
+ [socketPasswordField setStringValue:@""];
+ [sshSQLPasswordField setStringValue:@""];
+ [sshPasswordField setStringValue:@""];
+
+ return;
+ }
+
+ // Keep a copy of the favorite as it currently stands
+ if (currentFavorite) [currentFavorite release];
+
+ currentFavorite = [[[favoritesController selectedObjects] objectAtIndex:0] copy];
+
+ // Retrieve and set the password.
+ NSString *keychainName = [keychain nameForFavoriteName:[currentFavorite objectForKey:@"name"] id:[currentFavorite objectForKey:@"id"]];
+ NSString *keychainAccount = [keychain accountForUser:[currentFavorite objectForKey:@"user"] host:(([[currentFavorite objectForKey:@"type"] integerValue] == SPSocketConnection)?@"localhost":[currentFavorite objectForKey:@"host"]) database:[currentFavorite objectForKey:@"database"]];
+ NSString *passwordValue = [keychain getPasswordForName:keychainName account:keychainAccount];
+
+ [standardPasswordField setStringValue:passwordValue];
+ [socketPasswordField setStringValue:passwordValue];
+ [sshSQLPasswordField setStringValue:passwordValue];
+
+ // Retrieve the SSH keychain password if appropriate.
+ NSString *keychainSSHName = [keychain nameForSSHForFavoriteName:[currentFavorite objectForKey:@"name"] id:[currentFavorite objectForKey:@"id"]];
+ NSString *keychainSSHAccount = [keychain accountForSSHUser:[currentFavorite objectForKey:@"sshUser"] sshHost:[currentFavorite objectForKey:@"sshHost"]];
+
+ [sshPasswordField setStringValue:[keychain getPasswordForName:keychainSSHName account:keychainSSHAccount]];
+
+ favoriteNameFieldWasTouched = YES;
+}
+
+#pragma mark -
+#pragma mark TextField delegate methods and type change action
+
+/**
+ * Trap editing end notifications and use them to update the keychain password
+ * appropriately when name, host, user, password or database changes.
+ */
+- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
+{
+ // Request a password refresh to keep keychain references in synch with favorites
+ [self _updateFavoritePasswordsFromField:control];
+
+ // Proceed with editing
+ return YES;
+}
+
+/**
+ * Trap and control the 'name' field of the selected favorite. If the user pressed
+ * 'Add Favorite' the 'name' field is set to "New Favorite". If the user do not
+ * change the 'name' field or delete that field it will be set to user@host automatically.
+ */
+- (void)controlTextDidChange:(NSNotification *)notification
+{
+ id field = [notification object];
+
+ BOOL nameFieldIsEmpty = ([[favoritesController valueForKeyPath:@"selection.name"] isEqualToString:@""] ||
+ [[favoriteNameTextField stringValue] isEqualToString:@""]);
+
+ switch (favoriteType)
+ {
+ case 0:
+ if (nameFieldIsEmpty || (!favoriteNameFieldWasTouched && (field == favoriteUserTextField || field == favoriteHostTextField))) {
+ [favoriteNameTextField setStringValue:[NSString stringWithFormat:@"%@@%@", [favoriteUserTextField stringValue], [favoriteHostTextField stringValue]]];
+ [favoritesController setValue:[favoriteNameTextField stringValue] forKeyPath:@"selection.name"];
+ [prefs synchronize];
+
+ // if name field is empty enable user@host update
+ if (nameFieldIsEmpty) favoriteNameFieldWasTouched = NO;
+ }
+ break;
+ case 1:
+ if (nameFieldIsEmpty || (!favoriteNameFieldWasTouched && field == favoriteUserTextFieldSocket)) {
+ [favoriteNameTextField setStringValue:[NSString stringWithFormat:@"%@@localhost", [favoriteUserTextFieldSocket stringValue]]];
+ [favoritesController setValue:[favoriteNameTextField stringValue] forKeyPath:@"selection.name"];
+ [prefs synchronize];
+
+ // if name field is empty enable user@host update
+ if (nameFieldIsEmpty) favoriteNameFieldWasTouched = NO;
+ }
+ break;
+ case 2:
+ if (nameFieldIsEmpty || (!favoriteNameFieldWasTouched && (field == favoriteUserTextFieldSSH || field == favoriteHostTextFieldSSH))) {
+ [favoriteNameTextField setStringValue:[NSString stringWithFormat:@"%@@%@", [favoriteUserTextFieldSSH stringValue], [favoriteHostTextFieldSSH stringValue]]];
+ [favoritesController setValue:[favoriteNameTextField stringValue] forKeyPath:@"selection.name"];
+ [prefs synchronize];
+
+ // if name field is empty enable user@host update
+ if (nameFieldIsEmpty) favoriteNameFieldWasTouched = NO;
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (field == favoriteNameTextField) favoriteNameFieldWasTouched = YES;
+}
+
+#pragma mark -
+#pragma mark SplitView delegate methods
+
+- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset
+{
+ return (proposedMax - 220);
+}
+
+- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset
+{
+ return (proposedMin + 94);
+}
+
+#pragma mark -
+#pragma mark Other
+
+/**
+ * Menu item validation;
+ */
+- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
+{
+ SEL action = [menuItem action];
+
+ if ((action == @selector(removeFavorite:)) || (action == @selector(duplicateFavorite:))) {
+ return ([favoritesTableView numberOfSelectedRows] > 0);
+ }
+
+ if (action == @selector(makeSelectedFavoriteDefault:)) {
+ return ([favoritesTableView numberOfSelectedRows] == 1);
+ }
+
+ if ((action == @selector(sortFavorites:)) || (action == @selector(reverseFavoritesSortOrder:))) {
+
+ // Loop all the items in the sort by menu only checking the currently selected one
+ for (NSMenuItem *item in [[menuItem menu] itemArray])
+ {
+ [item setState:([[menuItem menu] indexOfItem:item] == currentSortItem)];
+ }
+
+ // Check or uncheck the reverse sort item
+ if (action == @selector(reverseFavoritesSortOrder:)) {
+ [menuItem setState:reverseFavoritesSort];
+ }
+
+ return [[[[[self view] window] toolbar] selectedItemIdentifier] isEqualToString:SPPreferenceToolbarFavorites];
+ }
+
+ return YES;
+}
+
+/**
+ * Called after closing the SSH/SSL key selection sheet.
+ */
+- (void)chooseKeyLocationSheetDidEnd:(NSOpenPanel *)openPanel returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
+{
+ NSString *abbreviatedFileName = [[openPanel filename] stringByAbbreviatingWithTildeInPath];
+
+ // SSH key file selection
+ if (contextInfo == sshSSHKeyButton) {
+ if (returnCode == NSCancelButton) {
+ [favoritesController setValue:[NSNumber numberWithInt:NSOffState] forKeyPath:@"selection.sshKeyLocationEnabled"];
+ return;
+ }
+
+ [favoritesController setValue:abbreviatedFileName forKeyPath:@"selection.sshKeyLocation"];
+ [self setSshKeyLocation:abbreviatedFileName];
+
+ // SSL key file selection
+ }
+ else if (contextInfo == standardSSLKeyFileButton || contextInfo == socketSSLKeyFileButton) {
+ if (returnCode == NSCancelButton) {
+ [favoritesController setValue:[NSNumber numberWithInt:NSOffState] forKeyPath:@"selection.sslKeyFileLocationEnabled"];
+ [favoritesController setValue:nil forKeyPath:@"selection.sslKeyFileLocation"];
+ return;
+ }
+
+ [favoritesController setValue:abbreviatedFileName forKeyPath:@"selection.sslKeyFileLocation"];
+
+ // SSL certificate file selection
+ }
+ else if (contextInfo == standardSSLCertificateButton || contextInfo == socketSSLCertificateButton) {
+ if (returnCode == NSCancelButton) {
+ [favoritesController setValue:[NSNumber numberWithInt:NSOffState] forKeyPath:@"selection.sslCertificateFileLocationEnabled"];
+ [favoritesController setValue:nil forKeyPath:@"selection.sslCertificateFileLocation"];
+ return;
+ }
+
+ [favoritesController setValue:abbreviatedFileName forKeyPath:@"selection.sslCertificateFileLocation"];
+
+ // SSL CA certificate file selection
+ }
+ else if (contextInfo == standardSSLCACertButton || contextInfo == socketSSLCACertButton) {
+ if (returnCode == NSCancelButton) {
+ [favoritesController setValue:[NSNumber numberWithInt:NSOffState] forKeyPath:@"selection.sslCACertFileLocationEnabled"];
+ [favoritesController setValue:nil forKeyPath:@"selection.sslCACertFileLocation"];
+ return;
+ }
+
+ [favoritesController setValue:abbreviatedFileName forKeyPath:@"selection.sslCACertFileLocation"];
+ }
+}
+
+- (void)sheetDidEnd:(id)sheet returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo
+{
+ // Order out current sheet to suppress overlapping of sheets
+ if ([sheet respondsToSelector:@selector(orderOut:)]) {
+ [sheet orderOut:nil];
+ }
+ else if ([sheet respondsToSelector:@selector(window)]) {
+ [[sheet window] orderOut:nil];
+ }
+
+ // Remove the current database
+ if ([contextInfo isEqualToString:@"removeFavorite"]) {
+ if (returnCode == NSAlertDefaultReturn) {
+
+ // Get selected favorite's details
+ NSString *name = [favoritesController valueForKeyPath:@"selection.name"];
+ NSString *user = [favoritesController valueForKeyPath:@"selection.user"];
+ NSString *host = [favoritesController valueForKeyPath:@"selection.host"];
+ NSString *database = [favoritesController valueForKeyPath:@"selection.database"];
+ NSString *sshUser = [favoritesController valueForKeyPath:@"selection.sshUser"];
+ NSString *sshHost = [favoritesController valueForKeyPath:@"selection.sshHost"];
+ NSString *favoriteid = [favoritesController valueForKeyPath:@"selection.id"];
+ NSInteger type = [[favoritesController valueForKeyPath:@"selection.type"] integerValue];
+
+ // Remove passwords from the Keychain
+ [keychain deletePasswordForName:[keychain nameForFavoriteName:name id:favoriteid]
+ account:[keychain accountForUser:user host:((type == SPSocketConnection)?@"localhost":host) database:database]];
+ [keychain deletePasswordForName:[keychain nameForSSHForFavoriteName:name id:favoriteid]
+ account:[keychain accountForSSHUser:sshUser sshHost:sshHost]];
+
+ // Reset last used favorite
+ if ([favoritesTableView selectedRow] == [prefs integerForKey:SPLastFavoriteIndex]) {
+ [prefs setInteger:0 forKey:SPLastFavoriteIndex];
+ }
+
+ // Reset default favorite
+ if ([favoritesTableView selectedRow] == [prefs integerForKey:SPDefaultFavorite]) {
+ [prefs setInteger:[prefs integerForKey:SPLastFavoriteIndex] forKey:SPDefaultFavorite];
+ }
+
+ [favoritesController removeObjectAtArrangedObjectIndex:[favoritesTableView selectedRow]];
+
+ [favoritesTableView reloadData];
+
+ [[(SPPreferenceController *)[[[self view] window] delegate] generalPreferencePane] updateDefaultFavoritePopup];
+ }
+ }
+}
+
+#pragma mark -
+#pragma mark Preference pane protocol methods
+
+- (NSView *)preferencePaneView
+{
+ return [self view];
+}
+
+- (NSImage *)preferencePaneIcon
+{
+ return [NSImage imageNamed:@"toolbar-preferences-favorites"];
+}
+
+- (NSString *)preferencePaneName
+{
+ return NSLocalizedString(@"Favorites", @"favorites preference pane name");
+}
+
+- (NSString *)preferencePaneIdentifier
+{
+ return SPPreferenceToolbarFavorites;
+}
+
+- (NSString *)preferencePaneToolTip
+{
+ return NSLocalizedString(@"Favorite Preferences", @"favorites preference pane tooltip");
+}
+
+- (BOOL)preferencePaneAllowsResizing
+{
+ return YES;
+}
+
+#pragma mark -
+#pragma mark Private API
+
+/**
+ * Sorts the connection favorites based on the selected criteria.
+ */
+- (void)_sortFavorites
+{
+ NSString *sortKey = @"";
+
+ switch (currentSortItem)
+ {
+ case SPFavoritesSortNameItem:
+ sortKey = @"name";
+ break;
+ case SPFavoritesSortHostItem:
+ sortKey = @"host";
+ break;
+ case SPFavoritesSortTypeItem:
+ sortKey = @"type";
+ break;
+ }
+
+ NSSortDescriptor *sortDescriptor = nil;
+
+ if (currentSortItem == SPFavoritesSortTypeItem) {
+ sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:sortKey ascending:(!reverseFavoritesSort)] autorelease];
+ }
+ else {
+ sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:sortKey ascending:(!reverseFavoritesSort) selector:@selector(caseInsensitiveCompare:)] autorelease];
+ }
+
+ [favoritesController setSortDescriptors:[NSArray arrayWithObject:sortDescriptor]];
+
+ [favoritesTableView reloadData];
+
+ [[(SPPreferenceController *)[[[self view] window] delegate] generalPreferencePane] updateDefaultFavoritePopup];
+}
+
+/**
+ * Check all fields used in the keychain names against the old values for that
+ * favorite, and update the keychain names to match if necessary.
+ * If an (optional) recognised password field is supplied, that field is assumed
+ * to have changed and is used to supply the new value.
+ */
+- (void)_updateFavoritePasswordsFromField:(NSControl *)passwordControl
+{
+ if (!currentFavorite) return;
+
+ NSString *passwordValue;
+ NSString *oldKeychainName, *newKeychainName;
+ NSString *oldKeychainAccount, *newKeychainAccount;
+ NSString *oldHostnameForPassword = ([[currentFavorite objectForKey:@"type"] integerValue] == SPSocketConnection) ? @"localhost" : [currentFavorite objectForKey:@"host"];
+ NSString *newHostnameForPassword = ([[favoritesController valueForKeyPath:@"selection.type"] integerValue] == SPSocketConnection) ? @"localhost" : [favoritesController valueForKeyPath:@"selection.host"];
+
+ // SQL passwords are indexed by name, host, user and database. If any of these
+ // have changed, or a standard password field has, alter the keychain item to match.
+ if (![[currentFavorite objectForKey:@"name"] isEqualToString:[favoritesController valueForKeyPath:@"selection.name"]]
+ || ![oldHostnameForPassword isEqualToString:newHostnameForPassword]
+ || ![[currentFavorite objectForKey:@"user"] isEqualToString:[favoritesController valueForKeyPath:@"selection.user"]]
+ || ![[currentFavorite objectForKey:@"database"] isEqualToString:[favoritesController valueForKeyPath:@"selection.database"]]
+ || passwordControl == standardPasswordField || passwordControl == socketPasswordField || passwordControl == sshSQLPasswordField)
+ {
+
+ // Determine the correct password field to read the password from, defaulting to standard
+ if (passwordControl == socketPasswordField) {
+ passwordValue = [socketPasswordField stringValue];
+ }
+ else if (passwordControl == sshSQLPasswordField) {
+ passwordValue = [sshSQLPasswordField stringValue];
+ }
+ else {
+ passwordValue = [standardPasswordField stringValue];
+ }
+
+ // Get the old keychain name and account strings
+ oldKeychainName = [keychain nameForFavoriteName:[currentFavorite objectForKey:@"name"] id:[favoritesController valueForKeyPath:@"selection.id"]];
+ oldKeychainAccount = [keychain accountForUser:[currentFavorite objectForKey:@"user"] host:oldHostnameForPassword database:[currentFavorite objectForKey:@"database"]];
+
+ // Delete the old keychain item
+ [keychain deletePasswordForName:oldKeychainName account:oldKeychainAccount];
+
+ // Set up the new keychain name and account strings
+ newKeychainName = [keychain nameForFavoriteName:[favoritesController valueForKeyPath:@"selection.name"] id:[favoritesController valueForKeyPath:@"selection.id"]];
+ newKeychainAccount = [keychain accountForUser:[favoritesController valueForKeyPath:@"selection.user"] host:newHostnameForPassword database:[favoritesController valueForKeyPath:@"selection.database"]];
+
+ // Add the new keychain item if the password field has a value
+ if ([passwordValue length])
+ [keychain addPassword:passwordValue forName:newKeychainName account:newKeychainAccount];
+
+ // Synch password changes
+ [standardPasswordField setStringValue:passwordValue];
+ [socketPasswordField setStringValue:passwordValue];
+ [sshSQLPasswordField setStringValue:passwordValue];
+
+ passwordValue = @"";
+ }
+
+ // If SSH account/password details have changed, update the keychain to match
+ if (![[currentFavorite objectForKey:@"name"] isEqualToString:[favoritesController valueForKeyPath:@"selection.name"]]
+ || ![[currentFavorite objectForKey:@"sshHost"] isEqualToString:[favoritesController valueForKeyPath:@"selection.sshHost"]]
+ || ![[currentFavorite objectForKey:@"sshUser"] isEqualToString:[favoritesController valueForKeyPath:@"selection.sshUser"]]
+ || passwordControl == sshPasswordField) {
+
+ // Get the old keychain name and account strings
+ oldKeychainName = [keychain nameForSSHForFavoriteName:[currentFavorite objectForKey:@"name"] id:[favoritesController valueForKeyPath:@"selection.id"]];
+ oldKeychainAccount = [keychain accountForSSHUser:[currentFavorite objectForKey:@"sshUser"] sshHost:[currentFavorite objectForKey:@"sshHost"]];
+
+ // Delete the old keychain item
+ [keychain deletePasswordForName:oldKeychainName account:oldKeychainAccount];
+
+ // Set up the new keychain name and account strings
+ newKeychainName = [keychain nameForSSHForFavoriteName:[favoritesController valueForKeyPath:@"selection.name"] id:[favoritesController valueForKeyPath:@"selection.id"]];
+ newKeychainAccount = [keychain accountForSSHUser:[favoritesController valueForKeyPath:@"selection.sshUser"] sshHost:[favoritesController valueForKeyPath:@"selection.sshHost"]];
+
+ // Add the new keychain item if the password field has a value
+ if ([[sshPasswordField stringValue] length])
+ [keychain addPassword:[sshPasswordField stringValue] forName:newKeychainName account:newKeychainAccount];
+ }
+
+ // Update the current favorite
+ if (currentFavorite) [currentFavorite release], currentFavorite = nil;
+
+ if ([[favoritesTableView selectedRowIndexes] count] > 0)
+ currentFavorite = [[[favoritesController selectedObjects] objectAtIndex:0] copy];
+}
+
+#pragma mark -
+
+- (void)dealloc
+{
+ [keychain release], keychain = nil;
+
+ if (currentFavorite) [currentFavorite release], currentFavorite = nil;
+
+ [super dealloc];
+}
+
+@end
diff --git a/Source/SPFontPreviewTextField.h b/Source/SPFontPreviewTextField.h
new file mode 100644
index 00000000..f6383f77
--- /dev/null
+++ b/Source/SPFontPreviewTextField.h
@@ -0,0 +1,33 @@
+//
+// $Id$
+//
+// SPFontPreviewTextField.h
+// sequel-pro
+//
+// This is a heavily modified version of JVFontPreviewField from
+// the Colloquy Project <http://colloquy.info/>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+@interface SPFontPreviewTextField : NSTextField
+{
+ NSFont *_actualFont;
+}
+
+- (void)setFont:(NSFont *)font;
+
+@end
diff --git a/Source/SPFontPreviewTextField.m b/Source/SPFontPreviewTextField.m
new file mode 100644
index 00000000..1c4e4b02
--- /dev/null
+++ b/Source/SPFontPreviewTextField.m
@@ -0,0 +1,63 @@
+//
+// $Id$
+//
+// SPFontPreviewTextField.m
+// sequel-pro
+//
+// This is a heavily modified version of JVFontPreviewField from
+// the Colloquy Project <http://colloquy.info/>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPFontPreviewTextField.h"
+
+@implementation SPFontPreviewTextField
+
+- (void)setFont:(NSFont *)font
+{
+ if (!font) return;
+
+ if (_actualFont) [_actualFont release];
+
+ _actualFont = [font retain];
+
+ [super setFont:[[NSFontManager sharedFontManager] convertFont:font toSize:11.]];
+
+ NSMutableAttributedString *text = [[NSMutableAttributedString alloc] initWithString:[_actualFont displayName]];
+ NSMutableParagraphStyle *paraStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
+
+ [paraStyle setMinimumLineHeight:NSHeight([self bounds])];
+ [paraStyle setMaximumLineHeight:NSHeight([self bounds])];
+
+ [text addAttribute:NSParagraphStyleAttributeName value:paraStyle range:NSMakeRange(0, [text length])];
+
+ [self setObjectValue:text];
+
+ [text release];
+ [paraStyle release];
+}
+
+#pragma mark -
+
+- (void)dealloc
+{
+ if (_actualFont) [_actualFont release], _actualFont = nil;
+
+ [super dealloc];
+}
+
+@end
diff --git a/Source/SPGeneralPreferencePane.h b/Source/SPGeneralPreferencePane.h
new file mode 100644
index 00000000..76343a83
--- /dev/null
+++ b/Source/SPGeneralPreferencePane.h
@@ -0,0 +1,47 @@
+//
+// $Id$
+//
+// SPGeneralPreferencePane.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 29, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPPreferencePane.h"
+
+/**
+ * @class SPGeneralPreferencePane SPGeneralPreferencePane.h
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * General preference pane controller.
+ */
+@interface SPGeneralPreferencePane : SPPreferencePane <SPPreferencePaneProtocol>
+{
+ IBOutlet NSPopUpButton *defaultFavoritePopup;
+
+ IBOutlet NSArrayController *favoritesController;
+}
+
+- (IBAction)updateDefaultFavorite:(id)sender;
+
+- (void)updateDefaultFavoritePopup;
+- (void)resetDefaultFavoritePopupSelection;
+
+@end
diff --git a/Source/SPGeneralPreferencePane.m b/Source/SPGeneralPreferencePane.m
new file mode 100644
index 00000000..b87d6ab8
--- /dev/null
+++ b/Source/SPGeneralPreferencePane.m
@@ -0,0 +1,124 @@
+//
+// $Id$
+//
+// SPGeneralPreferencePane.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 29, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPGeneralPreferencePane.h"
+
+@implementation SPGeneralPreferencePane
+
+#pragma mark -
+#pragma mark IB action methods
+
+/**
+ * Updates the default favorite.
+ */
+- (IBAction)updateDefaultFavorite:(id)sender
+{
+ [prefs setBool:([defaultFavoritePopup indexOfSelectedItem] == 0) forKey:SPSelectLastFavoriteUsed];
+
+ // Minus 2 from index to account for the "Last Used" and separator items
+ [prefs setInteger:([defaultFavoritePopup indexOfSelectedItem] - 2) forKey:SPDefaultFavorite];
+}
+
+#pragma mark -
+#pragma mark Public API
+
+/**
+ * (Re)builds the default favorite popup button.
+ */
+- (void)updateDefaultFavoritePopup
+{
+ [defaultFavoritePopup removeAllItems];
+
+ // Use the last used favorite
+ [defaultFavoritePopup addItemWithTitle:NSLocalizedString(@"Last Used", @"Last Used entry in favorites menu")];
+ [[defaultFavoritePopup menu] addItem:[NSMenuItem separatorItem]];
+
+ // Add all favorites to the menu
+ for (NSString *favorite in [[favoritesController arrangedObjects] valueForKeyPath:@"name"])
+ {
+ NSMenuItem *favoriteMenuItem = [[NSMenuItem alloc] initWithTitle:favorite action:NULL keyEquivalent:@""];
+
+ [[defaultFavoritePopup menu] addItem:favoriteMenuItem];
+
+ [favoriteMenuItem release];
+ }
+
+ // Add item to switch to edit favorites pane
+ [[defaultFavoritePopup menu] addItem:[NSMenuItem separatorItem]];
+
+ NSMenuItem *editMenuItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Edit Favorites…", @"edit favorites menu item") action:@selector(displayFavoritePreferences:) keyEquivalent:@""];
+
+ [editMenuItem setTarget:[[[self view] window] delegate]];
+
+ [[defaultFavoritePopup menu] addItem:editMenuItem];
+
+ [editMenuItem release];
+
+ // Select the default favorite from prefs
+ [defaultFavoritePopup selectItemAtIndex:(![prefs boolForKey:SPSelectLastFavoriteUsed]) ? ([prefs integerForKey:SPDefaultFavorite] + 2) : 0];
+}
+
+/**
+ * Resets the default favorite popup button selection based on the user's preferences.
+ */
+- (void)resetDefaultFavoritePopupSelection
+{
+ [defaultFavoritePopup selectItemAtIndex:(![prefs boolForKey:SPSelectLastFavoriteUsed]) ? ([prefs integerForKey:SPDefaultFavorite] + 2) : 0];
+}
+
+#pragma mark -
+#pragma mark Preference pane protocol methods
+
+- (NSView *)preferencePaneView
+{
+ return [self view];
+}
+
+- (NSImage *)preferencePaneIcon
+{
+ return [NSImage imageNamed:@"toolbar-preferences-general"];
+}
+
+- (NSString *)preferencePaneName
+{
+ return NSLocalizedString(@"General", @"general preference pane name");
+}
+
+- (NSString *)preferencePaneIdentifier
+{
+ return SPPreferenceToolbarGeneral;
+}
+
+- (NSString *)preferencePaneToolTip
+{
+ return NSLocalizedString(@"General Preferences", @"general preference pane tooltip");
+}
+
+- (BOOL)preferencePaneAllowsResizing
+{
+ return NO;
+}
+
+@end
diff --git a/Source/SPNetworkPreferencePane.h b/Source/SPNetworkPreferencePane.h
new file mode 100644
index 00000000..110db4be
--- /dev/null
+++ b/Source/SPNetworkPreferencePane.h
@@ -0,0 +1,37 @@
+//
+// $Id$
+//
+// SPNetworkPreferencePane.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPPreferencePane.h"
+
+/**
+ * @class SPNetworkPreferencePane SPNetworkPreferencePane.h
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * Network preference pane controller.
+ */
+@interface SPNetworkPreferencePane : SPPreferencePane <SPPreferencePaneProtocol>
+
+@end
diff --git a/Source/SPNetworkPreferencePane.m b/Source/SPNetworkPreferencePane.m
new file mode 100644
index 00000000..43f5c0e8
--- /dev/null
+++ b/Source/SPNetworkPreferencePane.m
@@ -0,0 +1,63 @@
+//
+// $Id$
+//
+// SPNetworkPreferencePane.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPNetworkPreferencePane.h"
+
+@implementation SPNetworkPreferencePane
+
+#pragma mark -
+#pragma mark Preference pane protocol methods
+
+- (NSView *)preferencePaneView
+{
+ return [self view];
+}
+
+- (NSImage *)preferencePaneIcon
+{
+ return [NSImage imageNamed:@"toolbar-preferences-network"];
+}
+
+- (NSString *)preferencePaneName
+{
+ return NSLocalizedString(@"Network", @"network preference pane name");
+}
+
+- (NSString *)preferencePaneIdentifier
+{
+ return SPPreferenceToolbarNetwork;
+}
+
+- (NSString *)preferencePaneToolTip
+{
+ return NSLocalizedString(@"Network Preferences", @"network preference pane tooltip");
+}
+
+- (BOOL)preferencePaneAllowsResizing
+{
+ return NO;
+}
+
+@end
diff --git a/Source/SPNotificationsPreferencePane.h b/Source/SPNotificationsPreferencePane.h
new file mode 100644
index 00000000..bbd24db3
--- /dev/null
+++ b/Source/SPNotificationsPreferencePane.h
@@ -0,0 +1,37 @@
+//
+// $Id$
+//
+// SPNotificationsPreferencePane.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPPreferencePane.h"
+
+/**
+ * @class SPNotificationsPreferencePane SPNotificationsPreferencePane.h
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * Notifications preference pane controller.
+ */
+@interface SPNotificationsPreferencePane : SPPreferencePane <SPPreferencePaneProtocol>
+
+@end
diff --git a/Source/SPNotificationsPreferencePane.m b/Source/SPNotificationsPreferencePane.m
new file mode 100644
index 00000000..1be4fcdf
--- /dev/null
+++ b/Source/SPNotificationsPreferencePane.m
@@ -0,0 +1,88 @@
+//
+// $Id$
+//
+// SPNotificationsPreferencePane.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPNotificationsPreferencePane.h"
+
+@implementation SPNotificationsPreferencePane
+
+#pragma mark -
+#pragma mark Bindings
+
+/**
+ * Displays an informational message regarding Growl notifications if enabled.
+ */
+- (void)setGrowlEnabled:(BOOL)value
+{
+ if (value) {
+ NSBeginInformationalAlertSheet(NSLocalizedString(@"Growl notification preferences", "Growl notification preferences alert title"),
+ nil, nil, nil, [[self view] window], self, nil, nil, nil,
+ NSLocalizedString(@"All Growl notifications are enabled by default. To change which notifications are displayed, go to the Growl Preference Pane in the System Preferences and choose what notifications Growl should display from Sequel Pro.", @"Growl notification preferences alert message"));
+ }
+
+ [prefs setBool:value forKey:SPGrowlEnabled];
+}
+
+/**
+ * Returns the user's Growl notifications preference.
+ */
+- (BOOL)growlEnabled
+{
+ return [prefs boolForKey:SPGrowlEnabled];
+}
+
+#pragma mark -
+#pragma mark Preference pane protocol methods
+
+- (NSView *)preferencePaneView
+{
+ return [self view];
+}
+
+- (NSImage *)preferencePaneIcon
+{
+ return [NSImage imageNamed:@"toolbar-preferences-notifications"];
+}
+
+- (NSString *)preferencePaneName
+{
+ return NSLocalizedString(@"Alerts & Logs", @"notifications preference pane name");
+}
+
+- (NSString *)preferencePaneIdentifier
+{
+ return SPPreferenceToolbarNotifications;
+}
+
+- (NSString *)preferencePaneToolTip
+{
+ return NSLocalizedString(@"Alerts & Logs Preferences", @"notifications preference pane tooltip");
+}
+
+- (BOOL)preferencePaneAllowsResizing
+{
+ return NO;
+}
+
+@end
diff --git a/Source/SPPreferenceController.h b/Source/SPPreferenceController.h
index d7b6e8a6..575881af 100644
--- a/Source/SPPreferenceController.h
+++ b/Source/SPPreferenceController.h
@@ -23,80 +23,38 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-@class BWAnchoredButtonBar, SPKeychain;
+#import "SPPreferencePane.h"
-@interface SPPreferenceController : NSWindowController
-{
- IBOutlet NSWindow *preferencesWindow;
-
- IBOutlet NSView *generalView;
- IBOutlet NSView *notificationsView;
- IBOutlet NSView *tablesView;
- IBOutlet NSView *favoritesView;
- IBOutlet NSView *autoUpdateView;
- IBOutlet NSView *networkView;
- IBOutlet NSView *editorView;
-
- IBOutlet NSPopUpButton *defaultFavoritePopup;
-
- IBOutlet NSTableView *favoritesTableView;
- IBOutlet NSArrayController *favoritesController;
-
- IBOutlet NSTabView *favoritesTabView;
- IBOutlet NSSecureTextField *standardPasswordField;
- IBOutlet NSSecureTextField *socketPasswordField;
- IBOutlet NSSecureTextField *sshSQLPasswordField;
- IBOutlet NSSecureTextField *sshPasswordField;
- IBOutlet NSTextField *favoriteNameTextField;
- IBOutlet NSTextField *favoriteUserTextField;
- IBOutlet NSTextField *favoriteHostTextField;
- IBOutlet NSTextField *favoriteUserTextFieldSocket;
- IBOutlet NSTextField *favoriteUserTextFieldSSH;
- IBOutlet NSTextField *favoriteHostTextFieldSSH;
- IBOutlet NSButton *sshSSHKeyButton;
- IBOutlet NSButton *standardSSLKeyFileButton;
- IBOutlet NSButton *standardSSLCertificateButton;
- IBOutlet NSButton *standardSSLCACertButton;
- IBOutlet NSButton *socketSSLKeyFileButton;
- IBOutlet NSButton *socketSSLCertificateButton;
- IBOutlet NSButton *socketSSLCACertButton;
- IBOutlet NSMenuItem *favoritesSortByMenuItem;
- IBOutlet NSView *sshKeyLocationHelp;
- IBOutlet NSView *sslKeyFileLocationHelp;
- IBOutlet NSView *sslCertificateLocationHelp;
- IBOutlet NSView *sslCACertLocationHelp;
+@class SPGeneralPreferencePane,
+ SPTablesPreferencePane,
+ SPFavoritesPreferencePane,
+ SPNotificationsPreferencePane,
+ SPEditorPreferencePane,
+ SPAutoUpdatePreferencePane,
+ SPNetworkPreferencePane;
- IBOutlet NSWindow *enterNameWindow;
- IBOutlet NSTextField *enterNameLabel;
- IBOutlet NSTextField *enterNameInputField;
- IBOutlet NSTextField *enterNameAlertField;
- IBOutlet NSTextField *colorThemeName;
- IBOutlet NSTextField *colorThemeNameLabel;
- IBOutlet id themeNameSaveButton;
- IBOutlet NSTableView *editThemeListTable;
- IBOutlet NSWindow *editThemeListWindow;
- IBOutlet id removeThemeButton;
- IBOutlet id duplicateThemeButton;
- IBOutlet NSMenuItem *saveThemeMenuItem;
-
- IBOutlet id tableCell;
-
- IBOutlet NSTableView *colorSettingTableView;
- IBOutlet NSMenu *themeSelectionMenu;
- NSArray *editorColors;
- NSArray *editorNameForColors;
- NSUInteger colorRow;
-
- IBOutlet NSTextField *editorFontName;
- IBOutlet NSTextField *globalResultTableFontName;
-
- IBOutlet BWAnchoredButtonBar *splitViewButtonBar;
-
- SPKeychain *keychain;
- NSDictionary *currentFavorite;
+/**
+ * @class SPPreferenceController SPPreferenceController.h
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * Main preferences window controller.
+ */
+@interface SPPreferenceController : NSWindowController
+{
+ // Preference pane controllers
+ IBOutlet SPGeneralPreferencePane *generalPreferencePane;
+ IBOutlet SPTablesPreferencePane *tablesPreferencePane;
+ IBOutlet SPFavoritesPreferencePane *favoritesPreferencePane;
+ IBOutlet SPNotificationsPreferencePane *notificationsPreferencePane;
+ IBOutlet SPEditorPreferencePane *editorPreferencePane;
+ IBOutlet SPAutoUpdatePreferencePane *autoUpdatePreferencePane;
+ IBOutlet SPNetworkPreferencePane *networkPreferencePane;
NSToolbar *toolbar;
+ NSArray *preferencePanes;
+ // Toolbar items
NSToolbarItem *generalItem;
NSToolbarItem *notificationsItem;
NSToolbarItem *tablesItem;
@@ -105,64 +63,22 @@
NSToolbarItem *networkItem;
NSToolbarItem *editorItem;
NSToolbarItem *shortcutItem;
-
- NSUserDefaults *prefs;
-
- BOOL favoriteNameFieldWasTouched;
- NSInteger favoriteType, fontChangeTarget;
- BOOL reverseFavoritesSort;
- SPFavoritesSortItem previousSortItem, currentSortItem;
-
- NSString *themePath;
- NSInteger checkForUnsavedThemeSheetStatus;
- NSArray *editThemeListItems;
+ NSUInteger fontChangeTarget;
}
-- (void)applyRevisionChanges;
-
-// IBAction methods
-- (IBAction)addFavorite:(id)sender;
-- (IBAction)removeFavorite:(id)sender;
-- (IBAction)duplicateFavorite:(id)sender;
-- (IBAction)updateDefaultFavorite:(id)sender;
-- (IBAction)showCustomQueryFontPanel:(id)sender;
-- (IBAction)showGlobalResultTableFontPanel:(id)sender;
-- (IBAction)setDefaultColors:(id)sender;
-- (IBAction)sortFavorites:(id)sender;
-- (IBAction)reverseFavoritesSortOrder:(id)sender;
-- (IBAction)makeSelectedFavoriteDefault:(id)sender;
-- (IBAction)exportColorScheme:(id)sender;
-- (IBAction)importColorScheme:(id)sender;
-- (IBAction)saveAsColorScheme:(id)sender;
-- (IBAction)loadColorScheme:(id)sender;
-- (IBAction)closePanelSheet:(id)sender;
-- (IBAction)duplicateTheme:(id)sender;
-- (IBAction)removeTheme:(id)sender;
-- (IBAction)chooseKeyLocation:(id)sender;
-
-// Toolbar item IBAction methods
-- (IBAction)displayGeneralPreferences:(id)sender;
-- (IBAction)displayTablePreferences:(id)sender;
-- (IBAction)displayFavoritePreferences:(id)sender;
-- (IBAction)displayNotificationPreferences:(id)sender;
-- (IBAction)displayAutoUpdatePreferences:(id)sender;
-- (IBAction)displayNetworkPreferences:(id)sender;
-- (IBAction)displayEditorPreferences:(id)sender;
-
-// Other
-- (void)updateDefaultFavoritePopup;
-- (void)selectFavorites:(NSArray *)favorite;
-- (void)changeFont:(id)sender;
-- (IBAction)favoriteTypeDidChange:(id)sender;
-- (void)updateFavoritePasswordsFromField:(NSControl *)passwordControl;
-- (void)updateColorSchemeSelectionMenu;
-- (void)saveColorThemeAtPath:(NSString*)path;
-- (BOOL)loadColorSchemeFromFile:(NSString*)filename;
-- (BOOL)checkForUnsavedTheme;
-- (void)updateDisplayColorThemeName;
-- (NSArray *)getAvailableThemes;
-- (void)checkForUnsavedThemeDidEndSheet:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
+@property (readonly) SPGeneralPreferencePane *generalPreferencePane;
+@property (readonly) SPTablesPreferencePane *tablesPreferencePane;
+@property (readonly) SPFavoritesPreferencePane *favoritesPreferencePane;
+@property (readonly) SPNotificationsPreferencePane *notificationsPreferencePane;
+@property (readonly) SPEditorPreferencePane *editorPreferencePane;
+@property (readonly) SPAutoUpdatePreferencePane *autoUpdatePreferencePane;
+@property (readonly) SPNetworkPreferencePane *networkPreferencePane;
+/**
+ * @property fontChangeTarget Indicates which font was changed (1 for global table font, 2 for custom
+ * query font).
+ */
+@property (readwrite, assign) NSUInteger fontChangeTarget;
@end
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m
index ad6a7061..8a9eb530 100644
--- a/Source/SPPreferenceController.m
+++ b/Source/SPPreferenceController.m
@@ -24,17 +24,11 @@
// More info at <http://code.google.com/p/sequel-pro/>
#import "SPPreferenceController.h"
-#import "SPFavoriteTextFieldCell.h"
-#import "SPKeychain.h"
-#import "SPDatabaseDocument.h"
-#import "SPConnectionController.h"
-#import "SPColorWellCell.h"
-#import "SPAlertSheets.h"
+#import "SPPreferencesUpgrade.h"
@interface SPPreferenceController (PrivateAPI)
- (void)_setupToolbar;
-- (void)_sortFavorites;
- (void)_resizeWindowForContentView:(NSView *)view;
@end
@@ -43,31 +37,26 @@
@implementation SPPreferenceController
+@synthesize generalPreferencePane;
+@synthesize tablesPreferencePane;
+@synthesize favoritesPreferencePane;
+@synthesize notificationsPreferencePane;
+@synthesize editorPreferencePane;
+@synthesize autoUpdatePreferencePane;
+@synthesize networkPreferencePane;
+@synthesize fontChangeTarget;
+
/**
* init.
*/
- (id)init
{
- if (self = [super initWithWindowNibName:@"Preferences"]) {
- prefs = [NSUserDefaults standardUserDefaults];
+ if ((self = [super initWithWindowNibName:@"Preferences"])) {
+
+ // Upgrade prefs
+ SPApplyRevisionChanges();
- [self applyRevisionChanges];
-
- currentFavorite = nil;
- keychain = nil;
- favoriteNameFieldWasTouched = YES;
- favoriteType = 0;
fontChangeTarget = 0;
- reverseFavoritesSort = NO;
-
- previousSortItem = SPFavoritesSortNameItem;
-
- [NSColor setIgnoresAlpha:NO];
-
- themePath = [[[NSFileManager defaultManager] applicationSupportDirectoryForSubDirectory:SPThemesSupportFolder error:nil] retain];
-
- editThemeListItems = [[NSArray arrayWithArray:[self getAvailableThemes]] retain];
-
}
return self;
@@ -77,2212 +66,240 @@
* Sets up various interface controls once the window is loaded.
*/
- (void)windowDidLoad
-{
+{
[self _setupToolbar];
-
- keychain = [[SPKeychain alloc] init];
-
- // Set sort items
- currentSortItem = [prefs integerForKey:SPFavoritesSortedBy];
- reverseFavoritesSort = [prefs boolForKey:SPFavoritesSortedInReverse];
-
- [tableCell setImage:[NSImage imageNamed:@"database"]];
-
- // Replace column's NSTextFieldCell with custom SWProfileTextFieldCell
- [[[favoritesTableView tableColumns] objectAtIndex:0] setDataCell:tableCell];
-
- [favoritesTableView registerForDraggedTypes:[NSArray arrayWithObject:SPFavoritesPasteboardDragType]];
-
- [favoritesTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
- [favoritesTableView reloadData];
-
- // Hide the tabs on the favorites tab view - left visible in IB for easy use
- [favoritesTabView setTabViewType:NSNoTabsNoBorder];
-
- // Set the button bar delegate
- [splitViewButtonBar setSplitViewDelegate:self];
- [self updateDefaultFavoritePopup];
+ [generalPreferencePane updateDefaultFavoritePopup];
- [prefs synchronize];
-
- // Sort favorites if a sort type has been selected
- if (currentSortItem > -1) [self _sortFavorites];
-
- NSTableColumn *column;
- SPColorWellCell *colorCell;
- NSTextFieldCell *textCell;
- column = [[colorSettingTableView tableColumns] objectAtIndex: 0];
- textCell = [[[NSTextFieldCell alloc] init] autorelease];
- [textCell setFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]]];
- column = [[colorSettingTableView tableColumns] objectAtIndex: 1];
- colorCell = [[[SPColorWellCell alloc] init] autorelease];
- [colorCell setEditable: YES];
- [colorCell setTarget: self];
- [colorCell setAction:@selector(colorClick:)];
- [column setDataCell:colorCell];
-
- editorColors = [[NSArray arrayWithObjects:
- SPCustomQueryEditorTextColor,
- SPCustomQueryEditorBackgroundColor,
- SPCustomQueryEditorCaretColor,
- SPCustomQueryEditorCommentColor,
- SPCustomQueryEditorSQLKeywordColor,
- SPCustomQueryEditorNumericColor,
- SPCustomQueryEditorQuoteColor,
- SPCustomQueryEditorBacktickColor,
- SPCustomQueryEditorVariableColor,
- SPCustomQueryEditorHighlightQueryColor,
- SPCustomQueryEditorSelectionColor,
- nil
- ] retain];
- editorNameForColors = [[NSArray arrayWithObjects:
- NSLocalizedString(@"Text",@"text label for color table (Prefs > Editor)"),
- NSLocalizedString(@"Background",@"background label for color table (Prefs > Editor)"),
- NSLocalizedString(@"Caret",@"caret label for color table (Prefs > Editor)"),
- NSLocalizedString(@"Comment",@"comment label"),
- NSLocalizedString(@"Keyword",@"keyword label for color table (Prefs > Editor)"),
- NSLocalizedString(@"Numeric",@"numeric label for color table (Prefs > Editor)"),
- NSLocalizedString(@"Quote",@"quote label for color table (Prefs > Editor)"),
- NSLocalizedString(@"Backtick Quote",@"backtick quote label for color table (Prefs > Editor)"),
- NSLocalizedString(@"Variable",@"variable label for color table (Prefs > Editor)"),
- NSLocalizedString(@"Query Background",@"query background label for color table (Prefs > Editor)"),
- NSLocalizedString(@"Selection",@"selection label for color table (Prefs > Editor)"),
- nil
- ] retain];
-
+ preferencePanes = [[NSArray alloc] initWithObjects:
+ generalPreferencePane,
+ tablesPreferencePane,
+ notificationsPreferencePane,
+ favoritesPreferencePane,
+ editorPreferencePane,
+ autoUpdatePreferencePane,
+ networkPreferencePane,
+ nil];
}
#pragma mark -
-#pragma mark Preferences upgrade routine
-
-/**
- * Checks the revision number, applies any preference upgrades, and updates to latest revision.
- * Currently uses both lastUsedVersion and LastUsedVersion for <0.9.5 compatibility.
- */
-- (void)applyRevisionChanges
-{
- NSInteger i;
- NSInteger currentVersionNumber, recordedVersionNumber = 0;
-
- // Get the current bundle version number (the SVN build number) for per-version upgrades
- currentVersionNumber = [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] integerValue];
-
- // Get the current revision
- if ([prefs objectForKey:@"lastUsedVersion"]) recordedVersionNumber = [[prefs objectForKey:@"lastUsedVersion"] integerValue];
- if ([prefs objectForKey:SPLastUsedVersion]) recordedVersionNumber = [[prefs objectForKey:SPLastUsedVersion] integerValue];
-
- // Skip processing if the current version matches or is less than recorded version
- if (currentVersionNumber <= recordedVersionNumber) return;
-
- // If no recorded version, update to current revision and skip processing
- if (!recordedVersionNumber) {
- [prefs setObject:[NSNumber numberWithInteger:currentVersionNumber] forKey:SPLastUsedVersion];
- return;
- }
-
- // For versions prior to r336 (0.9.4), where column widths have been saved, walk through them and remove
- // any table widths set to 15 or less (fix for mangled columns caused by Issue #140)
- if (recordedVersionNumber < 336 && [prefs objectForKey:SPTableColumnWidths] != nil) {
- NSEnumerator *databaseEnumerator, *tableEnumerator, *columnEnumerator;
- NSString *databaseKey, *tableKey, *columnKey;
- NSMutableDictionary *newDatabase, *newTable;
- CGFloat columnWidth;
- NSMutableDictionary *newTableColumnWidths = [[NSMutableDictionary alloc] init];
-
- databaseEnumerator = [[prefs objectForKey:SPTableColumnWidths] keyEnumerator];
- while (databaseKey = [databaseEnumerator nextObject]) {
- newDatabase = [[NSMutableDictionary alloc] init];
- tableEnumerator = [[[prefs objectForKey:SPTableColumnWidths] objectForKey:databaseKey] keyEnumerator];
- while (tableKey = [tableEnumerator nextObject]) {
- newTable = [[NSMutableDictionary alloc] init];
- columnEnumerator = [[[[prefs objectForKey:SPTableColumnWidths] objectForKey:databaseKey] objectForKey:tableKey] keyEnumerator];
- while (columnKey = [columnEnumerator nextObject]) {
- columnWidth = [[[[[prefs objectForKey:SPTableColumnWidths] objectForKey:databaseKey] objectForKey:tableKey] objectForKey:columnKey] doubleValue];
- if (columnWidth >= 15) {
- [newTable setObject:[NSNumber numberWithDouble:columnWidth] forKey:[NSString stringWithString:columnKey]];
- }
- }
- if ([newTable count]) {
- [newDatabase setObject:[NSDictionary dictionaryWithDictionary:newTable] forKey:[NSString stringWithString:tableKey]];
- }
- [newTable release];
- }
- if ([newDatabase count]) {
- [newTableColumnWidths setObject:[NSDictionary dictionaryWithDictionary:newDatabase] forKey:[NSString stringWithString:databaseKey]];
- }
- [newDatabase release];
- }
- [prefs setObject:[NSDictionary dictionaryWithDictionary:newTableColumnWidths] forKey:SPTableColumnWidths];
- [newTableColumnWidths release];
- }
-
- // For versions prior to r561 (0.9.5), migrate old pref keys where they exist to the new pref keys
- if (recordedVersionNumber < 561) {
- NSEnumerator *keyEnumerator;
- NSString *oldKey, *newKey;
- NSDictionary *keysToUpgrade = [NSDictionary dictionaryWithObjectsAndKeys:
- @"encoding", SPDefaultEncoding,
- @"useMonospacedFonts", SPUseMonospacedFonts,
- @"reloadAfterAdding", SPReloadAfterAddingRow,
- @"reloadAfterEditing", SPReloadAfterEditingRow,
- @"reloadAfterRemoving", SPReloadAfterRemovingRow,
- @"dontShowBlob", SPLoadBlobsAsNeeded,
- @"fetchRowCount", @"FetchCorrectRowCount",
- @"limitRows", SPLimitResults,
- @"limitRowsValue", SPLimitResultsValue,
- @"nullValue", SPNullValue,
- @"showError", SPShowNoAffectedRowsError,
- @"connectionTimeout", SPConnectionTimeoutValue,
- @"keepAliveInterval", SPKeepAliveInterval,
- @"lastFavoriteIndex", SPLastFavoriteIndex,
- nil];
-
- keyEnumerator = [keysToUpgrade keyEnumerator];
- while (newKey = [keyEnumerator nextObject]) {
- oldKey = [keysToUpgrade objectForKey:newKey];
- if ([prefs objectForKey:oldKey]) {
- [prefs setObject:[prefs objectForKey:oldKey] forKey:newKey];
- [prefs removeObjectForKey:oldKey];
- }
- }
-
- // Remove outdated keys
- [prefs removeObjectForKey:@"lastUsedVersion"];
- [prefs removeObjectForKey:@"version"];
- }
-
- // For versions prior to r567 (0.9.5), add a timestamp-based identifier to favorites and keychain entries
- if (recordedVersionNumber < 567 && [prefs objectForKey:SPFavorites]) {
- NSMutableArray *favoritesArray = [NSMutableArray arrayWithArray:[prefs objectForKey:SPFavorites]];
- NSMutableDictionary *favorite;
- NSString *password, *keychainName, *keychainAccount;
- SPKeychain *upgradeKeychain = [[SPKeychain alloc] init];
-
- // Cycle through the favorites, generating a timestamp-derived ID for each and renaming associated keychain items.
- for (i = 0; i < [favoritesArray count]; i++) {
- favorite = [NSMutableDictionary dictionaryWithDictionary:[favoritesArray objectAtIndex:i]];
- if ([favorite objectForKey:@"id"]) continue;
- [favorite setObject:[NSNumber numberWithInteger:[[NSString stringWithFormat:@"%f", [[NSDate date] timeIntervalSince1970]] hash]] forKey:@"id"];
- keychainName = [NSString stringWithFormat:@"Sequel Pro : %@", [favorite objectForKey:@"name"]];
- keychainAccount = [NSString stringWithFormat:@"%@@%@/%@",
- [favorite objectForKey:@"user"], [favorite objectForKey:@"host"], [favorite objectForKey:@"database"]];
- password = [upgradeKeychain getPasswordForName:keychainName account:keychainAccount];
- [upgradeKeychain deletePasswordForName:keychainName account:keychainAccount];
- if (password && [password length]) {
- keychainName = [NSString stringWithFormat:@"Sequel Pro : %@ (%ld)", [favorite objectForKey:@"name"], (long)[[favorite objectForKey:@"id"] integerValue]];
- [upgradeKeychain addPassword:password forName:keychainName account:keychainAccount];
- }
- [favoritesArray replaceObjectAtIndex:i withObject:[NSDictionary dictionaryWithDictionary:favorite]];
- }
- [prefs setObject:[NSArray arrayWithArray:favoritesArray] forKey:SPFavorites];
- [upgradeKeychain release];
- password = nil;
- }
-
- // For versions prior to r981 (~0.9.6), upgrade the favourites to include a connection type for each
- if (recordedVersionNumber < 981 && [prefs objectForKey:SPFavorites]) {
- NSMutableArray *favoritesArray = [NSMutableArray arrayWithArray:[prefs objectForKey:SPFavorites]];
- NSMutableDictionary *favorite;
-
- // Cycle through the favorites
- for (i = 0; i < [favoritesArray count]; i++) {
- favorite = [NSMutableDictionary dictionaryWithDictionary:[favoritesArray objectAtIndex:i]];
- if ([favorite objectForKey:@"type"]) continue;
-
- // If the favorite has a socket, or has the host set to "localhost", set to socket-type connection
- if ([[favorite objectForKey:@"host"] isEqualToString:@"localhost"]
- || ([favorite objectForKey:@"socket"] && [(NSString *)[favorite objectForKey:@"socket"] length]))
- {
- [favorite setObject:[NSNumber numberWithInteger:1] forKey:@"type"];
-
- // If SSH details are set, set to tunnel connection
- } else if ([favorite objectForKey:@"useSSH"] && [[favorite objectForKey:@"useSSH"] integerValue]) {
- [favorite setObject:[NSNumber numberWithInteger:2] forKey:@"type"];
-
- // Default to TCP/IP
- } else {
- [favorite setObject:[NSNumber numberWithInteger:0] forKey:@"type"];
- }
-
- // Remove SSH tunnel flag - no longer required
- [favorite removeObjectForKey:@"useSSH"];
-
- [favoritesArray replaceObjectAtIndex:i withObject:[NSDictionary dictionaryWithDictionary:favorite]];
- }
- [prefs setObject:[NSArray arrayWithArray:favoritesArray] forKey:SPFavorites];
- }
+#pragma mark Toolbar item IBAction methods
- // For versions prior to r1128 (~0.9.6), reset the main window toolbar items to add new items
- if (recordedVersionNumber < 1128 && [prefs objectForKey:@"NSToolbar Configuration TableWindowToolbar"]) {
- NSMutableDictionary *toolbarDict = [NSMutableDictionary dictionaryWithDictionary:[prefs objectForKey:@"NSToolbar Configuration TableWindowToolbar"]];
- [toolbarDict removeObjectForKey:@"TB Item Identifiers"];
- [prefs setObject:[NSDictionary dictionaryWithDictionary:toolbarDict] forKey:@"NSToolbar Configuration TableWindowToolbar"];
- }
+- (IBAction)displayPreferencePane:(id)sender
+{
+ SPPreferencePane *preferencePane = nil;
- // For versions prior to r1609 (~0.9.7), convert the query favorites array to an array of dictionaries
- if (recordedVersionNumber < 1609 && [prefs objectForKey:SPQueryFavorites]) {
- NSMutableArray *queryFavoritesArray = [NSMutableArray arrayWithArray:[prefs objectForKey:SPQueryFavorites]];
-
- for (i = 0; i < [queryFavoritesArray count]; i++)
+ if (!sender) {
+ preferencePane = generalPreferencePane;
+ }
+ else {
+ for (SPPreferencePane *prefPane in preferencePanes)
{
- id favorite = [queryFavoritesArray objectAtIndex:i];
-
- // If the favorite is already a dictionary, just make sure there's no newlines in the title
- if (([favorite isKindOfClass:[NSDictionary class]]) && ([favorite objectForKey:@"name"]) && ([favorite objectForKey:@"query"])) {
- NSMutableString *favoriteName = [NSMutableString stringWithString:[favorite objectForKey:@"name"]];
- [favoriteName replaceOccurrencesOfString:@"\n" withString:@" " options:NSLiteralSearch range:NSMakeRange(0, [favoriteName length])];
- [queryFavoritesArray replaceObjectAtIndex:i withObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSString stringWithString:favoriteName], [favorite objectForKey:@"query"], nil] forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]]];
- continue;
- }
-
- // By default make the query's name the first 32 characters of the query with '...' appended, stripping newlines
- NSMutableString *favoriteName = [NSMutableString stringWithString:[favorite stringByTrimmingCharactersInSet:[NSCharacterSet newlineCharacterSet]]];
- [favoriteName replaceOccurrencesOfString:@"\n" withString:@" " options:NSLiteralSearch range:NSMakeRange(0, [favoriteName length])];
- if ([favoriteName length] > 32) {
- [favoriteName deleteCharactersInRange:NSMakeRange(32, [favoriteName length] - 32)];
- [favoriteName appendString:@"..."];
+ if ([[prefPane preferencePaneIdentifier] isEqualToString:[sender itemIdentifier]]) {
+ preferencePane = prefPane;
+ break;
}
-
- [queryFavoritesArray replaceObjectAtIndex:i withObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSString stringWithString:favoriteName], favorite, nil] forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]]];
- }
-
- [prefs setObject:queryFavoritesArray forKey:SPQueryFavorites];
- }
-
- // For versions prior to r1636 (<0.9.8), remove the old "Fetch correct row count" pref
- if (recordedVersionNumber < 1636 && [prefs objectForKey:@"FetchCorrectRowCount"]) {
- [prefs removeObjectForKey:@"FetchCorrectRowCount"];
- }
-
- // For versions prior to r2057 (~0.9.8), reset the Sparkle prefs so the user is prompted about submitting information
- if (recordedVersionNumber < 2057 && [prefs objectForKey:@"SUEnableAutomaticChecks"]) {
- [prefs removeObjectForKey:@"SUEnableAutomaticChecks"];
- [prefs removeObjectForKey:@"SUSendProfileInfo"];
- }
-
- // For versions prior to 2325 (<0.9.9), convert the old encoding pref string into the new localizable constant
- if (recordedVersionNumber < 2325 && [prefs objectForKey:@"DefaultEncoding"] && [[prefs objectForKey:@"DefaultEncoding"] isKindOfClass:[NSString class]]) {
- NSDictionary *encodingMap = [NSDictionary dictionaryWithObjectsAndKeys:
- [NSNumber numberWithInt:SPEncodingAutodetect], @"Autodetect",
- [NSNumber numberWithInt:SPEncodingUCS2], @"UCS-2 Unicode (ucs2)",
- [NSNumber numberWithInt:SPEncodingUTF8], @"UTF-8 Unicode (utf8)",
- [NSNumber numberWithInt:SPEncodingUTF8viaLatin1], @"UTF-8 Unicode via Latin 1",
- [NSNumber numberWithInt:SPEncodingASCII], @"US ASCII (ascii)",
- [NSNumber numberWithInt:SPEncodingLatin1], @"ISO Latin 1 (latin1)",
- [NSNumber numberWithInt:SPEncodingMacRoman], @"Mac Roman (macroman)",
- [NSNumber numberWithInt:SPEncodingCP1250Latin2], @"Windows Latin 2 (cp1250)",
- [NSNumber numberWithInt:SPEncodingISOLatin2], @"ISO Latin 2 (latin2)",
- [NSNumber numberWithInt:SPEncodingCP1256Arabic], @"Windows Arabic (cp1256)",
- [NSNumber numberWithInt:SPEncodingGreek], @"ISO Greek (greek)",
- [NSNumber numberWithInt:SPEncodingHebrew], @"ISO Hebrew (hebrew)",
- [NSNumber numberWithInt:SPEncodingLatin5Turkish], @"ISO Turkish (latin5)",
- [NSNumber numberWithInt:SPEncodingCP1257WinBaltic], @"Windows Baltic (cp1257)",
- [NSNumber numberWithInt:SPEncodingCP1251WinCyrillic], @"Windows Cyrillic (cp1251)",
- [NSNumber numberWithInt:SPEncodingBig5Chinese], @"Big5 Traditional Chinese (big5)",
- [NSNumber numberWithInt:SPEncodingShiftJISJapanese], @"Shift-JIS Japanese (sjis)",
- [NSNumber numberWithInt:SPEncodingEUCJPJapanese], @"EUC-JP Japanese (ujis)",
- [NSNumber numberWithInt:SPEncodingEUCKRKorean], @"EUC-KR Korean (euckr)",
- nil];
- NSNumber *newMappedValue = [encodingMap valueForKey:[prefs objectForKey:@"DefaultEncoding"]];
- if (newMappedValue == nil) newMappedValue = [NSNumber numberWithInt:0];
- [prefs setObject:newMappedValue forKey:@"DefaultEncodingTag"];
- }
-
- // Update the prefs revision
- [prefs setObject:[NSNumber numberWithInteger:currentVersionNumber] forKey:SPLastUsedVersion];
-}
-
-#pragma mark -
-#pragma mark IBAction methods
-
-/**
- * Adds a new connection favorite.
- */
-- (IBAction)addFavorite:(id)sender
-{
- NSNumber *favoriteid = [NSNumber numberWithInteger:[[NSString stringWithFormat:@"%f", [[NSDate date] timeIntervalSince1970]] hash]];
-
- // Create default favorite
- NSMutableDictionary *favorite = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"New Favorite", [NSNumber numberWithInteger:0], @"", @"", @"", @"", [NSNumber numberWithInt:NSOffState], [NSNumber numberWithInt:NSOffState], [NSNumber numberWithInt:NSOffState], [NSNumber numberWithInt:NSOffState], @"", @"", @"", [NSNumber numberWithInt:NSOffState], @"", @"", favoriteid, nil]
- forKeys:[NSArray arrayWithObjects:@"name", @"type", @"host", @"socket", @"user", @"port", @"useSSL", @"sslKeyFileLocationEnabled", @"sslCertificateFileLocationEnabled", @"sslCACertFileLocationEnabled", @"database", @"sshHost", @"sshUser", @"sshKeyLocationEnabled", @"sshKeyLocation", @"sshPort", @"id", nil]];
-
- [favoritesController addObject:favorite];
- [favoritesController setSelectedObjects:[NSArray arrayWithObject:favorite]];
-
- [favoritesTableView reloadData];
- [favoritesTableView scrollRowToVisible:[favoritesTableView selectedRow]];
-
- [self updateDefaultFavoritePopup];
-
- favoriteNameFieldWasTouched = NO;
-
- [[self window] makeFirstResponder:favoriteHostTextField];
-}
-
-/**
- * Removes the selected connection favorite.
- */
-- (IBAction)removeFavorite:(id)sender
-{
- if ([favoritesTableView numberOfSelectedRows] == 1) {
- NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Delete favorite '%@'?", @"delete database message"), [favoritesController valueForKeyPath:@"selection.name"]]
- defaultButton:NSLocalizedString(@"Delete", @"delete button")
- alternateButton:NSLocalizedString(@"Cancel", @"cancel button")
- otherButton:nil
- informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"Are you sure you want to delete the favorite '%@'? This operation cannot be undone.", @"delete database informative message"), [favoritesController valueForKeyPath:@"selection.name"]]];
-
- NSArray *buttons = [alert buttons];
-
- // Change the alert's cancel button to have the key equivalent of return
- [[buttons objectAtIndex:0] setKeyEquivalent:@"d"];
- [[buttons objectAtIndex:0] setKeyEquivalentModifierMask:NSCommandKeyMask];
- [[buttons objectAtIndex:1] setKeyEquivalent:@"\r"];
-
- [alert setAlertStyle:NSCriticalAlertStyle];
-
- [alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"removeFavorite"];
- }
-}
-
-/**
- * Duplicates the selected connection favorite.
- */
-- (IBAction)duplicateFavorite:(id)sender
-{
- if ([favoritesTableView numberOfSelectedRows] == 1) {
- NSString *keychainName, *keychainAccount, *password, *keychainSSHName, *keychainSSHAccount, *sshPassword;
- NSMutableDictionary *favorite = [NSMutableDictionary dictionaryWithDictionary:[[favoritesController arrangedObjects] objectAtIndex:[favoritesTableView selectedRow]]];
- NSNumber *favoriteid = [NSNumber numberWithInteger:[[NSString stringWithFormat:@"%f", [[NSDate date] timeIntervalSince1970]] hash]];
- NSInteger duplicatedFavoriteType = [[favorite objectForKey:@"type"] integerValue];
-
- // Select the keychain passwords for duplication
- keychainName = [keychain nameForFavoriteName:[favorite objectForKey:@"name"] id:[favorite objectForKey:@"id"]];
- keychainAccount = [keychain accountForUser:[favorite objectForKey:@"user"] host:((duplicatedFavoriteType == SPSocketConnection)?@"localhost":[favorite objectForKey:@"host"]) database:[favorite objectForKey:@"database"]];
- password = [keychain getPasswordForName:keychainName account:keychainAccount];
- keychainSSHName = [keychain nameForSSHForFavoriteName:[favorite objectForKey:@"name"] id:[favorite objectForKey:@"id"]];
- keychainSSHAccount = [keychain accountForSSHUser:[favorite objectForKey:@"sshUser"] sshHost:[favorite objectForKey:@"sshHost"]];
- sshPassword = [keychain getPasswordForName:keychainSSHName account:keychainSSHAccount];
-
- // Update the unique ID
- [favorite setObject:favoriteid forKey:@"id"];
-
- // Alter the name for clarity
- [favorite setObject:[NSString stringWithFormat:NSLocalizedString(@"%@ Copy", @"Initial favourite name after duplicating a previous favourite"), [favorite objectForKey:@"name"]] forKey:@"name"];
-
- // Create new keychain items if appropriate
- if (password && [password length]) {
- keychainName = [keychain nameForFavoriteName:[favorite objectForKey:@"name"] id:[favorite objectForKey:@"id"]];
- [keychain addPassword:password forName:keychainName account:keychainAccount];
- }
- if (sshPassword && [sshPassword length]) {
- keychainSSHName = [keychain nameForSSHForFavoriteName:[favorite objectForKey:@"name"] id:[favorite objectForKey:@"id"]];
- [keychain addPassword:sshPassword forName:keychainSSHName account:keychainSSHAccount];
}
- password = nil, sshPassword = nil;
-
- [favoritesController addObject:favorite];
- [favoritesController setSelectedObjects:[NSArray arrayWithObject:favorite]];
-
- [favoritesTableView reloadData];
- [favoritesTableView scrollRowToVisible:[favoritesTableView selectedRow]];
-
- [self updateDefaultFavoritePopup];
-
- [[self window] makeFirstResponder:favoriteNameTextField];
}
-}
-
-/**
- * Updates the default favorite.
- */
-- (IBAction)updateDefaultFavorite:(id)sender
-{
- [prefs setBool:([defaultFavoritePopup indexOfSelectedItem] == 0) forKey:SPSelectLastFavoriteUsed];
-
- // Minus 2 from index to account for the "Last Used" and separator items
- [prefs setInteger:([defaultFavoritePopup indexOfSelectedItem] - 2) forKey:SPDefaultFavorite];
-}
-
-/**
- * Sorts the favorites table view based on the selected sort by item
- */
-- (IBAction)sortFavorites:(id)sender
-{
- previousSortItem = currentSortItem;
- currentSortItem = [[sender menu] indexOfItem:sender];
-
- [prefs setInteger:currentSortItem forKey:SPFavoritesSortedBy];
-
- // Perform sorting
- [self _sortFavorites];
-
- if (previousSortItem > -1) [[[sender menu] itemAtIndex:previousSortItem] setState:NSOffState];
- [[[sender menu] itemAtIndex:currentSortItem] setState:NSOnState];
-}
-
-/**
- * Reverses the favorites table view sorting based on the selected criteria
- */
-- (IBAction)reverseFavoritesSortOrder:(id)sender
-{
- reverseFavoritesSort = (![sender state]);
-
- [prefs setBool:reverseFavoritesSort forKey:SPFavoritesSortedInReverse];
-
- // Perform re-sorting
- [self _sortFavorites];
-
- [sender setState:reverseFavoritesSort];
-}
-
-/**
- * Makes the selected favorite the default.
- */
-- (IBAction)makeSelectedFavoriteDefault:(id)sender
-{
- // Minus 2 from index to account for the "Last Used" and separator items
- [prefs setInteger:[favoritesTableView selectedRow] forKey:SPDefaultFavorite];
-
- [favoritesTableView reloadData];
-
- [self updateDefaultFavoritePopup];
-}
-
-- (IBAction)exportColorScheme:(id)sender
-{
- NSSavePanel *panel = [NSSavePanel savePanel];
-
- [panel setRequiredFileType:SPColorThemeFileExtension];
-
- [panel setExtensionHidden:NO];
- [panel setAllowsOtherFileTypes:NO];
- [panel setCanSelectHiddenExtension:YES];
- [panel setCanCreateDirectories:YES];
-
- [panel beginSheetForDirectory:nil
- file:[NSString stringWithFormat:@"myTheme.%@", SPColorThemeFileExtension]
- modalForWindow:[self window]
- modalDelegate:self
- didEndSelector:@selector(panelDidEnd:returnCode:contextInfo:)
- contextInfo:@"exportColorScheme"];
-}
-
-- (IBAction)importColorScheme:(id)sender
-{
-
- if(![self checkForUnsavedTheme]) return;
-
-
- NSOpenPanel *panel = [NSOpenPanel openPanel];
- [panel setCanSelectHiddenExtension:YES];
- [panel setDelegate:self];
- [panel setCanChooseDirectories:NO];
- [panel setAllowsMultipleSelection:NO];
-
- [panel beginSheetForDirectory:nil
- file:@""
- types:[NSArray arrayWithObjects:SPColorThemeFileExtension, @"tmTheme", nil]
- modalForWindow:[self window]
- modalDelegate:self
- didEndSelector:@selector(panelDidEnd:returnCode:contextInfo:)
- contextInfo:@"importColorScheme"];
-
-}
-
-- (IBAction)loadColorScheme:(id)sender
-{
-
- if(![self checkForUnsavedTheme]) return;
-
- if([self loadColorSchemeFromFile:[NSString stringWithFormat:@"%@/%@.%@", themePath, [sender title], SPColorThemeFileExtension]]) {
- [prefs setObject:[sender title] forKey:SPCustomQueryEditorThemeName];
- [self updateDisplayColorThemeName];
- }
-
-}
-
-- (IBAction)saveAsColorScheme:(id)sender
-{
-
- [[NSColorPanel sharedColorPanel] close];
-
- [enterNameAlertField setHidden:YES];
- [enterNameInputField setStringValue:@""];
- [enterNameLabel setStringValue:NSLocalizedString(@"Theme Name:", @"theme name label")];
-
- [NSApp beginSheet:enterNameWindow
- modalForWindow:[self window]
- modalDelegate:self
- didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
- contextInfo:@"saveTheme"];
-
-}
-
-- (IBAction)duplicateTheme:(id)sender
-{
- if([editThemeListTable numberOfSelectedRows] != 1) return;
+ [[self window] setMinSize:NSMakeSize(0, 0)];
+ [[self window] setShowsResizeIndicator:[preferencePane preferencePaneAllowsResizing]];
- NSString *selectedPath = [NSString stringWithFormat:@"%@/%@_copy.%@", themePath, [editThemeListItems objectAtIndex:[editThemeListTable selectedRow]], SPColorThemeFileExtension];
-
- NSFileManager *fm = [NSFileManager defaultManager];
- if(![fm fileExistsAtPath:selectedPath isDirectory:nil]) {
- if([fm copyItemAtPath:[NSString stringWithFormat:@"%@/%@.%@", themePath, [editThemeListItems objectAtIndex:[editThemeListTable selectedRow]], SPColorThemeFileExtension] toPath:selectedPath error:nil]) {
-
- if(editThemeListItems) [editThemeListItems release], editThemeListItems = nil;
- editThemeListItems = [[NSArray arrayWithArray:[self getAvailableThemes]] retain];
- [editThemeListTable reloadData];
- [self updateDisplayColorThemeName];
- [self updateColorSchemeSelectionMenu];
- return;
-
- }
- }
-
- NSBeep();
- [editThemeListTable reloadData];
-
-}
-
-- (IBAction)removeTheme:(id)sender
-{
- if([editThemeListTable numberOfSelectedRows] != 1) return;
+ [toolbar setSelectedItemIdentifier:[preferencePane preferencePaneIdentifier]];
- NSString *selectedPath = [NSString stringWithFormat:@"%@/%@.%@", themePath, [editThemeListItems objectAtIndex:[editThemeListTable selectedRow]], SPColorThemeFileExtension];
- NSFileManager *fm = [NSFileManager defaultManager];
- if([fm fileExistsAtPath:selectedPath isDirectory:nil]) {
- if([fm removeItemAtPath:selectedPath error:nil]) {
-
- // Refresh current color theme setting name
- if([[[prefs objectForKey:SPCustomQueryEditorThemeName] lowercaseString] isEqualToString:[[editThemeListItems objectAtIndex:[editThemeListTable selectedRow]] lowercaseString]]) {
- [prefs setObject:@"User-defined" forKey:SPCustomQueryEditorThemeName];
- }
-
- if(editThemeListItems) [editThemeListItems release], editThemeListItems = nil;
- editThemeListItems = [[NSArray arrayWithArray:[self getAvailableThemes]] retain];
- [editThemeListTable reloadData];
- [self updateDisplayColorThemeName];
- [self updateColorSchemeSelectionMenu];
- return;
-
- }
- }
-
- NSBeep();
- [editThemeListTable reloadData];
-
-}
-
-- (IBAction)closePanelSheet:(id)sender
-{
- [NSApp endSheet:[sender window] returnCode:[sender tag]];
- [[sender window] orderOut:self];
+ [self _resizeWindowForContentView:[preferencePane preferencePaneView]];
}
/**
- * Opens the SSH/SSL key selection window, ready to select a key file.
+ * Displays the table preferences pane.
*/
- - (IBAction)chooseKeyLocation:(id)sender
-{
- NSString *directoryPath = nil;
- NSString *filePath = nil;
- NSArray *permittedFileTypes = nil;
- NSOpenPanel *openPanel = [NSOpenPanel openPanel];
-
- // Switch details by sender.
- // First, SSH keys:
- if (sender == sshSSHKeyButton) {
-
- // If the custom key location is currently disabled - after the button
- // action - leave it disabled and return without showing the sheet.
- if (![favoritesController valueForKeyPath:@"selection.sshKeyLocationEnabled"]) {
- return;
- }
-
- // Otherwise open a panel at the last or default location
- NSString *sshKeyLocation = [favoritesController valueForKeyPath:@"selection.sshKeyLocation"];
- if (sshKeyLocation && [sshKeyLocation length]) {
- filePath = [sshKeyLocation lastPathComponent];
- directoryPath = [sshKeyLocation stringByDeletingLastPathComponent];
- }
-
- permittedFileTypes = [NSArray arrayWithObjects:@"pem", @"", nil];
- [openPanel setAccessoryView:sshKeyLocationHelp];
-
- // SSL key file location:
- } else if (sender == standardSSLKeyFileButton || sender == socketSSLKeyFileButton) {
- if ([sender state] == NSOffState) {
- [favoritesController setValue:nil forKeyPath:@"selection.sslKeyFileLocation"];
- return;
- }
- permittedFileTypes = [NSArray arrayWithObjects:@"pem", @"key", @"", nil];
- [openPanel setAccessoryView:sslKeyFileLocationHelp];
-
- // SSL certificate file location:
- } else if (sender == standardSSLCertificateButton || sender == socketSSLCertificateButton) {
- if ([sender state] == NSOffState) {
- [favoritesController setValue:nil forKeyPath:@"selection.sslCertificateFileLocation"];
- return;
- }
- permittedFileTypes = [NSArray arrayWithObjects:@"pem", @"cert", @"", nil];
- [openPanel setAccessoryView:sslCertificateLocationHelp];
-
- // SSL CA certificate file location:
- } else if (sender == standardSSLCACertButton || sender == socketSSLCACertButton) {
- if ([sender state] == NSOffState) {
- [favoritesController setValue:nil forKeyPath:@"selection.sslCACertFileLocation"];
- return;
- }
- permittedFileTypes = [NSArray arrayWithObjects:@"pem", @"cert", @"", nil];
- [openPanel setAccessoryView:sslCACertLocationHelp];
- }
-
- [openPanel beginSheetForDirectory:directoryPath
- file:filePath
- types:permittedFileTypes
- modalForWindow:preferencesWindow
- modalDelegate:self
- didEndSelector:@selector(chooseKeyLocationSheetDidEnd:returnCode:contextInfo:)
- contextInfo:sender];
-}
-
-/**
- * Called after closing the SSH/SSL key selection sheet.
- */
-- (void)chooseKeyLocationSheetDidEnd:(NSOpenPanel *)openPanel returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
-{
- NSString *abbreviatedFileName = [[openPanel filename] stringByAbbreviatingWithTildeInPath];
-
- // SSH key file selection
- if (contextInfo == sshSSHKeyButton) {
- if (returnCode == NSCancelButton) {
- [favoritesController setValue:[NSNumber numberWithInt:NSOffState] forKeyPath:@"selection.sshKeyLocationEnabled"];
- return;
- }
- [favoritesController setValue:abbreviatedFileName forKeyPath:@"selection.sshKeyLocation"];
- [self setSshKeyLocation:abbreviatedFileName];
-
- // SSL key file selection
- } else if (contextInfo == standardSSLKeyFileButton || contextInfo == socketSSLKeyFileButton) {
- if (returnCode == NSCancelButton) {
- [favoritesController setValue:[NSNumber numberWithInt:NSOffState] forKeyPath:@"selection.sslKeyFileLocationEnabled"];
- [favoritesController setValue:nil forKeyPath:@"selection.sslKeyFileLocation"];
- return;
- }
- [favoritesController setValue:abbreviatedFileName forKeyPath:@"selection.sslKeyFileLocation"];
-
- // SSL certificate file selection
- } else if (contextInfo == standardSSLCertificateButton || contextInfo == socketSSLCertificateButton) {
- if (returnCode == NSCancelButton) {
- [favoritesController setValue:[NSNumber numberWithInt:NSOffState] forKeyPath:@"selection.sslCertificateFileLocationEnabled"];
- [favoritesController setValue:nil forKeyPath:@"selection.sslCertificateFileLocation"];
- return;
- }
- [favoritesController setValue:abbreviatedFileName forKeyPath:@"selection.sslCertificateFileLocation"];
-
- // SSL CA certificate file selection
- } else if (contextInfo == standardSSLCACertButton || contextInfo == socketSSLCACertButton) {
- if (returnCode == NSCancelButton) {
- [favoritesController setValue:[NSNumber numberWithInt:NSOffState] forKeyPath:@"selection.sslCACertFileLocationEnabled"];
- [favoritesController setValue:nil forKeyPath:@"selection.sslCACertFileLocation"];
- return;
- }
- [favoritesController setValue:abbreviatedFileName forKeyPath:@"selection.sslCACertFileLocation"];
- }
-}
-
-#pragma mark -
-#pragma mark Toolbar item IBAction methods
-
-// -------------------------------------------------------------------------------
-// displayGeneralPreferences:
-// -------------------------------------------------------------------------------
-- (IBAction)displayGeneralPreferences:(id)sender
-{
- [[self window] setMinSize:NSMakeSize(0, 0)];
- [[self window] setShowsResizeIndicator:NO];
-
- [toolbar setSelectedItemIdentifier:SPPreferenceToolbarGeneral];
- [self _resizeWindowForContentView:generalView];
-}
-
-// -------------------------------------------------------------------------------
-// displayTablePreferences:
-// -------------------------------------------------------------------------------
- (IBAction)displayTablePreferences:(id)sender
{
[[self window] setMinSize:NSMakeSize(0, 0)];
- [[self window] setShowsResizeIndicator:NO];
+ [[self window] setShowsResizeIndicator:[tablesPreferencePane preferencePaneAllowsResizing]];
- [toolbar setSelectedItemIdentifier:SPPreferenceToolbarTables];
- NSFont *nf = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPGlobalResultTableFont]];
- [globalResultTableFontName setStringValue:[NSString stringWithFormat:@"%@, %.1f pt", [nf displayName], [nf pointSize]]];
- [self _resizeWindowForContentView:tablesView];
-}
-
-// -------------------------------------------------------------------------------
-// displayEditorPreferences:
-// -------------------------------------------------------------------------------
-- (IBAction)displayEditorPreferences:(id)sender
-{
-
- [self updateColorSchemeSelectionMenu];
- [self updateDisplayColorThemeName];
-
- [[self window] setMinSize:NSMakeSize(0, 0)];
- [[self window] setShowsResizeIndicator:NO];
+ [toolbar setSelectedItemIdentifier:[tablesPreferencePane preferencePaneIdentifier]];
- [toolbar setSelectedItemIdentifier:SPPreferenceToolbarEditor];
- NSFont *nf = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]];
- [editorFontName setStringValue:[NSString stringWithFormat:@"%@, %.1f pt", [nf displayName], [nf pointSize]]];
- [self _resizeWindowForContentView:editorView];
+ [tablesPreferencePane updateDisplayedTableFontName];
+
+ [self _resizeWindowForContentView:[tablesPreferencePane preferencePaneView]];
}
-// -------------------------------------------------------------------------------
-// displayFavoritePreferences:
-// -------------------------------------------------------------------------------
+/**
+ * Displays the favorite preferences pane.
+ */
- (IBAction)displayFavoritePreferences:(id)sender
{
// To make the Favorites pane resizable give the window a minimum size and display the resize indicator.
// Notice that we still make all other panes non-resizable by removing the dsiplay of the indicator and
// resetting the minimum size to zero.
[[self window] setMinSize:NSMakeSize(500, 381)];
- [[self window] setShowsResizeIndicator:YES];
+ [[self window] setShowsResizeIndicator:[favoritesPreferencePane preferencePaneAllowsResizing]];
- [toolbar setSelectedItemIdentifier:SPPreferenceToolbarFavorites];
- [self _resizeWindowForContentView:favoritesView];
+ [toolbar setSelectedItemIdentifier:[favoritesPreferencePane preferencePaneIdentifier]];
+
+ [self _resizeWindowForContentView:[favoritesPreferencePane preferencePaneView]];
// Set the default favorite popup back to preference
- if (sender == [defaultFavoritePopup lastItem]) {
- [defaultFavoritePopup selectItemAtIndex:(![prefs boolForKey:SPSelectLastFavoriteUsed]) ? ([prefs integerForKey:SPDefaultFavorite] + 2) : 0];
+ if ([sender isKindOfClass:[NSMenuItem class]]) {
+ [generalPreferencePane resetDefaultFavoritePopupSelection];
}
}
-// -------------------------------------------------------------------------------
-// displayNotificationPreferences:
-// -------------------------------------------------------------------------------
-- (IBAction)displayNotificationPreferences:(id)sender
-{
- [[self window] setMinSize:NSMakeSize(0, 0)];
- [[self window] setShowsResizeIndicator:NO];
-
- [toolbar setSelectedItemIdentifier:SPPreferenceToolbarNotifications];
- [self _resizeWindowForContentView:notificationsView];
-}
-
-// -------------------------------------------------------------------------------
-// displayAutoUpdatePreferences:
-// -------------------------------------------------------------------------------
-- (IBAction)displayAutoUpdatePreferences:(id)sender
+/**
+ * Displays the editor preferences pane.
+ */
+- (IBAction)displayEditorPreferences:(id)sender
{
- [[self window] setMinSize:NSMakeSize(0, 0)];
- [[self window] setShowsResizeIndicator:NO];
+ [editorPreferencePane updateColorSchemeSelectionMenu];
+ [editorPreferencePane updateDisplayColorThemeName];
- [toolbar setSelectedItemIdentifier:SPPreferenceToolbarAutoUpdate];
- [self _resizeWindowForContentView:autoUpdateView];
-}
-
-// -------------------------------------------------------------------------------
-// displayNetworkPreferences:
-// -------------------------------------------------------------------------------
-- (IBAction)displayNetworkPreferences:(id)sender
-{
[[self window] setMinSize:NSMakeSize(0, 0)];
- [[self window] setShowsResizeIndicator:NO];
-
- [toolbar setSelectedItemIdentifier:SPPreferenceToolbarNetwork];
- [self _resizeWindowForContentView:networkView];
-}
-
-#pragma mark -
-#pragma mark TableView datasource methods
-
-- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
-{
- if(aTableView == colorSettingTableView)
- return [editorColors count];
- else if(aTableView == editThemeListTable)
- return [editThemeListItems count];
-
- return [[favoritesController arrangedObjects] count];
-}
-
-- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex
-{
- if (tableView == colorSettingTableView) {
- return ([[tableColumn identifier] isEqualToString:@"name"]) ? [editorNameForColors objectAtIndex:rowIndex] : [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:[editorColors objectAtIndex:rowIndex]]];
- }
- else if (tableView == editThemeListTable) {
- return [editThemeListItems objectAtIndex:rowIndex];
- }
- else {
- return [[[favoritesController arrangedObjects] objectAtIndex:rowIndex] objectForKey:[tableColumn identifier]];
- }
-
- return nil;
-}
-
-- (void)tableView:(NSTableView *)tableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
-{
- if(tableView == editThemeListTable) {
-
- // Theme name editing
- NSString *newName = (NSString*)anObject;
-
- // Check for non-valid names
- if(![newName length] || [[newName lowercaseString] isEqualToString:@"default"] || [[newName lowercaseString] isEqualToString:@"user-defined"]) {
- NSBeep();
- [editThemeListTable reloadData];
- return;
- }
-
- // Check if new name already exists
- for(NSString* item in editThemeListItems) {
- if([[item lowercaseString] isEqualToString:newName]) {
- NSBeep();
- [editThemeListTable reloadData];
- return;
- }
- }
-
- // Rename theme file
- NSFileManager *fm = [NSFileManager defaultManager];
- if(![fm moveItemAtPath:[NSString stringWithFormat:@"%@/%@.%@", themePath, [editThemeListItems objectAtIndex:rowIndex], SPColorThemeFileExtension] toPath:[NSString stringWithFormat:@"%@/%@.%@", themePath, newName, SPColorThemeFileExtension] error:nil]) {
- NSBeep();
- [editThemeListTable reloadData];
- return;
- }
-
- // Refresh current color theme setting name
- if([[[prefs objectForKey:SPCustomQueryEditorThemeName] lowercaseString] isEqualToString:[[editThemeListItems objectAtIndex:rowIndex] lowercaseString]]) {
- [prefs setObject:newName forKey:SPCustomQueryEditorThemeName];
- }
-
- // Reload everything needed
- if(editThemeListItems) [editThemeListItems release], editThemeListItems = nil;
- editThemeListItems = [[NSArray arrayWithArray:[self getAvailableThemes]] retain];
- [editThemeListTable reloadData];
- [self updateDisplayColorThemeName];
- [self updateColorSchemeSelectionMenu];
-
- }
-}
-
-#pragma mark -
-#pragma mark TableView drag & drop delegate methods
-
-- (BOOL)tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rows toPasteboard:(NSPasteboard*)pboard
-{
-
- if(aTableView == colorSettingTableView) return;
-
- if ([rows count] == 1) {
- [pboard declareTypes:[NSArray arrayWithObject:SPFavoritesPasteboardDragType] owner:nil];
- [pboard setString:[[NSNumber numberWithInteger:[rows firstIndex]] stringValue] forType:SPFavoritesPasteboardDragType];
-
- return YES;
- }
- else {
- return NO;
- }
-}
-
-- (NSDragOperation)tableView:(NSTableView *)tv validateDrop:(id <NSDraggingInfo>)info proposedRow:(NSInteger)row proposedDropOperation:(NSTableViewDropOperation)operation
-{
-
- if(tv == colorSettingTableView) return NSDragOperationNone;
-
- NSInteger originalRow;
- NSArray *pboardTypes = [[info draggingPasteboard] types];
-
- if (([pboardTypes count] > 1) && (row != -1)) {
- if (([pboardTypes containsObject:SPFavoritesPasteboardDragType]) && (operation == NSTableViewDropAbove)) {
- originalRow = [[[info draggingPasteboard] stringForType:SPFavoritesPasteboardDragType] integerValue];
-
- if ((row != originalRow) && (row != (originalRow + 1))) {
- return NSDragOperationMove;
- }
- }
- }
-
- return NSDragOperationNone;
-}
-
-- (BOOL)tableView:(NSTableView *)tv acceptDrop:(id <NSDraggingInfo>)info row:(NSInteger)row dropOperation:(NSTableViewDropOperation)operation
-{
-
- if(tv == colorSettingTableView) return NO;
-
- NSInteger originalRow;
- NSInteger destinationRow;
- NSInteger lastFavoriteIndexCached;
- NSMutableDictionary *draggedRow;
-
- // Disable all automatic sorting
- currentSortItem = -1;
- reverseFavoritesSort = NO;
-
- [prefs setInteger:currentSortItem forKey:SPFavoritesSortedBy];
- [prefs setBool:NO forKey:SPFavoritesSortedInReverse];
-
- // Remove sort descriptors
- [favoritesController setSortDescriptors:[NSArray array]];
-
- // Uncheck sort by menu items
- for (NSMenuItem *menuItem in [[favoritesSortByMenuItem submenu] itemArray])
- {
- [menuItem setState:NSOffState];
- }
-
- originalRow = [[[info draggingPasteboard] stringForType:SPFavoritesPasteboardDragType] integerValue];
- destinationRow = row;
-
- if (destinationRow > originalRow) {
- destinationRow--;
- }
-
- draggedRow = [NSMutableDictionary dictionaryWithDictionary:[[favoritesController arrangedObjects] objectAtIndex:originalRow]];
-
- // Before deleting this favorite, we need to save the current index.
- // because removeObjectAtArrangedObjectIndex will set prefs LastFavoriteIndex to 0
- lastFavoriteIndexCached = [prefs integerForKey:SPLastFavoriteIndex];
-
- [favoritesController removeObjectAtArrangedObjectIndex:originalRow];
- [favoritesController insertObject:draggedRow atArrangedObjectIndex:destinationRow];
-
- [favoritesTableView reloadData];
- [favoritesTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:destinationRow] byExtendingSelection:NO];
-
- // Update default favorite to take on new value
- if (lastFavoriteIndexCached == originalRow) {
- [prefs setInteger:destinationRow forKey:SPLastFavoriteIndex];
- }
-
- // Update default favorite to take on new value
- if ([prefs integerForKey:SPDefaultFavorite] == originalRow) {
- [prefs setInteger:destinationRow forKey:SPDefaultFavorite];
- }
-
- [self updateDefaultFavoritePopup];
-
- return YES;
-}
-
-#pragma mark -
-#pragma mark TableView delegate methods
-
-- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
-{
- if(aTableView == colorSettingTableView) {
-
- NSColorPanel* panel;
-
- colorRow = rowIndex;
- panel = [NSColorPanel sharedColorPanel];
- [panel setTarget:self];
- [panel setAction:@selector(colorChanged:)];
- [panel setColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:[editorColors objectAtIndex:colorRow]]]];
- [colorSettingTableView deselectAll:nil];
- [panel makeKeyAndOrderFront:self];
-
- return NO;
-
- }
-
- return YES;
-}
-
-- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)index
-{
-
- if(tableView == colorSettingTableView && [[tableColumn identifier] isEqualToString:@"name"]) {
- if ([cell isKindOfClass:[NSTextFieldCell class]]) {
- [cell setDrawsBackground:YES];
- NSFont *nf = [NSFont fontWithName:[[[NSFontPanel sharedFontPanel] panelConvertFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]]] fontName] size:13.0f];
- [cell setFont:nf];
- switch(index) {
- case 1:
- [cell setTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]]];
- [cell setBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]]];
- break;
- case 9:
- [cell setTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]]];
- [cell setBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorHighlightQueryColor]]];
- break;
- case 10:
- [cell setTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]]];
- [cell setBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSelectionColor]]];
- break;
- default:
- [cell setTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:[editorColors objectAtIndex:index]]]];
- [cell setBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]]];
- }
- }
- } else {
-
- if ([cell isKindOfClass:[SPFavoriteTextFieldCell class]]) {
- [cell setFavoriteName:[[[favoritesController arrangedObjects] objectAtIndex:index] objectForKey:@"name"]];
-
- if ([[[[favoritesController arrangedObjects] objectAtIndex:index] objectForKey:@"type"] integerValue] == SPSocketConnection) {
- [cell setFavoriteHost:@"localhost"];
- }
- else {
- [cell setFavoriteHost:[[[favoritesController arrangedObjects] objectAtIndex:index] objectForKey:@"host"]];
- }
- }
- }
-}
-
-- (void)tableViewSelectionDidChange:(NSNotification *)notification
-{
- if([notification object] == colorSettingTableView) return;
-
- if ([[favoritesTableView selectedRowIndexes] count] > 0) {
- [favoritesController setSelectionIndexes:[favoritesTableView selectedRowIndexes]];
- }
-
- // If no selection is present, blank the password fields (which can't use bindings)
- if ([[favoritesTableView selectedRowIndexes] count] == 0) {
- [standardPasswordField setStringValue:@""];
- [socketPasswordField setStringValue:@""];
- [sshSQLPasswordField setStringValue:@""];
- [sshPasswordField setStringValue:@""];
- return;
- }
+ [[self window] setShowsResizeIndicator:[editorPreferencePane preferencePaneAllowsResizing]];
- // Keep a copy of the favorite as it currently stands
- if (currentFavorite) [currentFavorite release];
- currentFavorite = [[[favoritesController selectedObjects] objectAtIndex:0] copy];
-
- // Retrieve and set the password.
- NSString *keychainName = [keychain nameForFavoriteName:[currentFavorite objectForKey:@"name"] id:[currentFavorite objectForKey:@"id"]];
- NSString *keychainAccount = [keychain accountForUser:[currentFavorite objectForKey:@"user"] host:(([[currentFavorite objectForKey:@"type"] integerValue] == SPSocketConnection)?@"localhost":[currentFavorite objectForKey:@"host"]) database:[currentFavorite objectForKey:@"database"]];
- NSString *passwordValue = [keychain getPasswordForName:keychainName account:keychainAccount];
- [standardPasswordField setStringValue:passwordValue];
- [socketPasswordField setStringValue:passwordValue];
- [sshSQLPasswordField setStringValue:passwordValue];
-
- // Retrieve the SSH keychain password if appropriate.
- NSString *keychainSSHName = [keychain nameForSSHForFavoriteName:[currentFavorite objectForKey:@"name"] id:[currentFavorite objectForKey:@"id"]];
- NSString *keychainSSHAccount = [keychain accountForSSHUser:[currentFavorite objectForKey:@"sshUser"] sshHost:[currentFavorite objectForKey:@"sshHost"]];
- [sshPasswordField setStringValue:[keychain getPasswordForName:keychainSSHName account:keychainSSHAccount]];
+ [toolbar setSelectedItemIdentifier:[editorPreferencePane preferencePaneIdentifier]];
- favoriteNameFieldWasTouched = YES;
-}
-
-#pragma mark -
-#pragma mark Toolbar delegate methods
-
-- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
-{
- if ([itemIdentifier isEqualToString:SPPreferenceToolbarGeneral]) {
- return generalItem;
- }
- else if ([itemIdentifier isEqualToString:SPPreferenceToolbarTables]) {
- return tablesItem;
- }
- else if ([itemIdentifier isEqualToString:SPPreferenceToolbarFavorites]) {
- return favoritesItem;
- }
- else if ([itemIdentifier isEqualToString:SPPreferenceToolbarNotifications]) {
- return notificationsItem;
- }
- else if ([itemIdentifier isEqualToString:SPPreferenceToolbarAutoUpdate]) {
- return autoUpdateItem;
- }
- else if ([itemIdentifier isEqualToString:SPPreferenceToolbarNetwork]) {
- return networkItem;
- }
- else if ([itemIdentifier isEqualToString:SPPreferenceToolbarEditor]) {
- return editorItem;
- }
- else if ([itemIdentifier isEqualToString:SPPreferenceToolbarShortcuts]) {
- return shortcutItem;
- }
+ [editorPreferencePane updateDisplayedEditorFontName];
- return [[[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier] autorelease];
-}
-
-// -------------------------------------------------------------------------------
-// toolbarAllowedItemIdentifiers:
-// -------------------------------------------------------------------------------
-- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar
-{
- return [NSArray arrayWithObjects:SPPreferenceToolbarGeneral, SPPreferenceToolbarTables, SPPreferenceToolbarFavorites, SPPreferenceToolbarNotifications, SPPreferenceToolbarEditor, SPPreferenceToolbarShortcuts, SPPreferenceToolbarAutoUpdate, SPPreferenceToolbarNetwork, nil];
-}
-
-// -------------------------------------------------------------------------------
-// toolbarDefaultItemIdentifiers:
-// -------------------------------------------------------------------------------
-- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar
-{
- return [NSArray arrayWithObjects:SPPreferenceToolbarGeneral, SPPreferenceToolbarTables, SPPreferenceToolbarFavorites, SPPreferenceToolbarNotifications, SPPreferenceToolbarEditor, SPPreferenceToolbarShortcuts, SPPreferenceToolbarAutoUpdate, SPPreferenceToolbarNetwork, nil];
-}
-
-// -------------------------------------------------------------------------------
-// toolbarSelectableItemIdentifiers:
-// -------------------------------------------------------------------------------
-- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar
-{
- return [NSArray arrayWithObjects:SPPreferenceToolbarGeneral, SPPreferenceToolbarTables, SPPreferenceToolbarFavorites, SPPreferenceToolbarNotifications, SPPreferenceToolbarEditor, SPPreferenceToolbarShortcuts, SPPreferenceToolbarAutoUpdate, SPPreferenceToolbarNetwork, nil];
-}
-
-#pragma mark -
-#pragma mark SplitView delegate methods
-
-// -------------------------------------------------------------------------------
-// splitView:constrainMaxCoordinate:ofSubviewAt:
-// -------------------------------------------------------------------------------
-- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset
-{
- return (proposedMax - 220);
-}
-
-// -------------------------------------------------------------------------------
-// splitView:constrainMinCoordinate:ofSubviewAt:
-// -------------------------------------------------------------------------------
-- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset
-{
- return (proposedMin + 94);
-}
-
-#pragma mark -
-#pragma mark TextField delegate methods and type change action
-
-// -------------------------------------------------------------------------------
-// control:textShouldEndEditing:
-// Trap editing end notifications and use them to update the keychain password
-// appropriately when name, host, user, password or database changes.
-// -------------------------------------------------------------------------------
-- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
-{
- // Request a password refresh to keep keychain references in synch with favorites
- [self updateFavoritePasswordsFromField:control];
-
- // Proceed with editing
- return YES;
-}
-
-// -------------------------------------------------------------------------------
-// controlTextDidChange:
-// Trap and control the 'name' field of the selected favorite. If the user pressed
-// 'Add Favorite' the 'name' field is set to "New Favorite". If the user do not
-// change the 'name' field or delete that field it will be set to user@host automatically.
-// -------------------------------------------------------------------------------
-- (void)controlTextDidChange:(NSNotification *)aNotification
-{
- id field = [aNotification object];
-
- // Validate 'Save' button for entering a valid theme name
- if(field == enterNameInputField) {
- NSString *name = [[enterNameInputField stringValue] lowercaseString];
-
- if(![name length] || [name isEqualToString:@"default"] || [name isEqualToString:@"user-defined"]) {
- [themeNameSaveButton setEnabled:NO];
- } else {
- BOOL hide = YES;
- for(NSString* item in [self getAvailableThemes]) {
- if([[item lowercaseString] isEqualToString:name]) {
- hide = NO;
- break;
- }
- }
- [enterNameAlertField setHidden:hide];
- [themeNameSaveButton setEnabled:YES];
- }
-
- return;
-
- }
-
- BOOL nameFieldIsEmpty = (
- [[favoritesController valueForKeyPath:@"selection.name"] isEqualToString:@""]
- || [[favoriteNameTextField stringValue] isEqualToString:@""]);
-
- switch(favoriteType) {
- case 0:
- if(nameFieldIsEmpty || (!favoriteNameFieldWasTouched && (field == favoriteUserTextField || field == favoriteHostTextField))) {
- [favoriteNameTextField setStringValue:[NSString stringWithFormat:@"%@@%@", [favoriteUserTextField stringValue], [favoriteHostTextField stringValue]]];
- [favoritesController setValue:[favoriteNameTextField stringValue] forKeyPath:@"selection.name"];
- [prefs synchronize];
- // if name field is empty enable user@host update
- if(nameFieldIsEmpty) favoriteNameFieldWasTouched = NO;
- }
- break;
- case 1:
- if(nameFieldIsEmpty || (!favoriteNameFieldWasTouched && field == favoriteUserTextFieldSocket)) {
- [favoriteNameTextField setStringValue:[NSString stringWithFormat:@"%@@localhost", [favoriteUserTextFieldSocket stringValue]]];
- [favoritesController setValue:[favoriteNameTextField stringValue] forKeyPath:@"selection.name"];
- [prefs synchronize];
- // if name field is empty enable user@host update
- if(nameFieldIsEmpty) favoriteNameFieldWasTouched = NO;
- }
- break;
- case 2:
- if(nameFieldIsEmpty || (!favoriteNameFieldWasTouched && (field == favoriteUserTextFieldSSH || field == favoriteHostTextFieldSSH))) {
- [favoriteNameTextField setStringValue:[NSString stringWithFormat:@"%@@%@", [favoriteUserTextFieldSSH stringValue], [favoriteHostTextFieldSSH stringValue]]];
- [favoritesController setValue:[favoriteNameTextField stringValue] forKeyPath:@"selection.name"];
- [prefs synchronize];
- // if name field is empty enable user@host update
- if(nameFieldIsEmpty) favoriteNameFieldWasTouched = NO;
- }
- break;
- default:
- break;
- }
-
- if(field == favoriteNameTextField) {
- favoriteNameFieldWasTouched = YES;
- }
-}
-// -------------------------------------------------------------------------------
-// favoriteTypeDidChange:
-// Update the favorite host when the type changes.
-// -------------------------------------------------------------------------------
-- (IBAction)favoriteTypeDidChange:(id)sender
-{
- // If not socket and host is localhost, clear.
- if ([sender indexOfSelectedItem] != 1
- && [[favoritesController valueForKeyPath:@"selection.host"] isEqualToString:@"localhost"])
- {
- [favoritesController setValue:@"" forKeyPath:@"selection.host"];
- }
-
- favoriteType = [sender indexOfSelectedItem];
-
- // Update the name for a new added favorite if not touched by the user
- if(!favoriteNameFieldWasTouched) {
- [favoriteNameTextField setStringValue:[NSString stringWithFormat:@"%@@%@",
- ([favoritesController valueForKeyPath:@"selection.user"]) ? [favoritesController valueForKeyPath:@"selection.user"] : @"",
- ( ([sender indexOfSelectedItem] == 1) ? @"localhost" :
- (([favoritesController valueForKeyPath:@"selection.host"]) ? [favoritesController valueForKeyPath:@"selection.host"] : @""))
- ]];
- [favoritesController setValue:[favoriteNameTextField stringValue] forKeyPath:@"selection.name"];
- }
-
-
- // Request a password refresh to keep keychain references in synch with the favorites
- [self updateFavoritePasswordsFromField:nil];
-}
-
-// -------------------------------------------------------------------------------
-// updateFavoritePasswordsFromField:
-// Check all fields used in the keychain names against the old values for that
-// favorite, and update the keychain names to match if necessary.
-// If an (optional) recognised password field is supplied, that field is assumed
-// to have changed and is used to supply the new value.
-// -------------------------------------------------------------------------------
-- (void)updateFavoritePasswordsFromField:(NSControl *)passwordControl
-{
- if (!currentFavorite) return;
-
- NSString *passwordValue;
- NSString *oldKeychainName, *newKeychainName;
- NSString *oldKeychainAccount, *newKeychainAccount;
- NSString *oldHostnameForPassword = ([[currentFavorite objectForKey:@"type"] integerValue] == SPSocketConnection) ? @"localhost" : [currentFavorite objectForKey:@"host"];
- NSString *newHostnameForPassword = ([[favoritesController valueForKeyPath:@"selection.type"] integerValue] == SPSocketConnection) ? @"localhost" : [favoritesController valueForKeyPath:@"selection.host"];
-
- // SQL passwords are indexed by name, host, user and database. If any of these
- // have changed, or a standard password field has, alter the keychain item to match.
- if (![[currentFavorite objectForKey:@"name"] isEqualToString:[favoritesController valueForKeyPath:@"selection.name"]]
- || ![oldHostnameForPassword isEqualToString:newHostnameForPassword]
- || ![[currentFavorite objectForKey:@"user"] isEqualToString:[favoritesController valueForKeyPath:@"selection.user"]]
- || ![[currentFavorite objectForKey:@"database"] isEqualToString:[favoritesController valueForKeyPath:@"selection.database"]]
- || passwordControl == standardPasswordField || passwordControl == socketPasswordField || passwordControl == sshSQLPasswordField)
- {
-
- // Determine the correct password field to read the password from, defaulting to standard
- if (passwordControl == socketPasswordField) {
- passwordValue = [socketPasswordField stringValue];
- } else if (passwordControl == sshSQLPasswordField) {
- passwordValue = [sshSQLPasswordField stringValue];
- } else {
- passwordValue = [standardPasswordField stringValue];
- }
-
- // Get the old keychain name and account strings
- oldKeychainName = [keychain nameForFavoriteName:[currentFavorite objectForKey:@"name"] id:[favoritesController valueForKeyPath:@"selection.id"]];
- oldKeychainAccount = [keychain accountForUser:[currentFavorite objectForKey:@"user"] host:oldHostnameForPassword database:[currentFavorite objectForKey:@"database"]];
-
- // Delete the old keychain item
- [keychain deletePasswordForName:oldKeychainName account:oldKeychainAccount];
-
- // Set up the new keychain name and account strings
- newKeychainName = [keychain nameForFavoriteName:[favoritesController valueForKeyPath:@"selection.name"] id:[favoritesController valueForKeyPath:@"selection.id"]];
- newKeychainAccount = [keychain accountForUser:[favoritesController valueForKeyPath:@"selection.user"] host:newHostnameForPassword database:[favoritesController valueForKeyPath:@"selection.database"]];
-
- // Add the new keychain item if the password field has a value
- if ([passwordValue length])
- [keychain addPassword:passwordValue forName:newKeychainName account:newKeychainAccount];
-
- // Synch password changes
- [standardPasswordField setStringValue:passwordValue];
- [socketPasswordField setStringValue:passwordValue];
- [sshSQLPasswordField setStringValue:passwordValue];
-
- passwordValue = @"";
- }
-
- // If SSH account/password details have changed, update the keychain to match
- if (![[currentFavorite objectForKey:@"name"] isEqualToString:[favoritesController valueForKeyPath:@"selection.name"]]
- || ![[currentFavorite objectForKey:@"sshHost"] isEqualToString:[favoritesController valueForKeyPath:@"selection.sshHost"]]
- || ![[currentFavorite objectForKey:@"sshUser"] isEqualToString:[favoritesController valueForKeyPath:@"selection.sshUser"]]
- || passwordControl == sshPasswordField) {
-
- // Get the old keychain name and account strings
- oldKeychainName = [keychain nameForSSHForFavoriteName:[currentFavorite objectForKey:@"name"] id:[favoritesController valueForKeyPath:@"selection.id"]];
- oldKeychainAccount = [keychain accountForSSHUser:[currentFavorite objectForKey:@"sshUser"] sshHost:[currentFavorite objectForKey:@"sshHost"]];
-
- // Delete the old keychain item
- [keychain deletePasswordForName:oldKeychainName account:oldKeychainAccount];
-
- // Set up the new keychain name and account strings
- newKeychainName = [keychain nameForSSHForFavoriteName:[favoritesController valueForKeyPath:@"selection.name"] id:[favoritesController valueForKeyPath:@"selection.id"]];
- newKeychainAccount = [keychain accountForSSHUser:[favoritesController valueForKeyPath:@"selection.sshUser"] sshHost:[favoritesController valueForKeyPath:@"selection.sshHost"]];
-
- // Add the new keychain item if the password field has a value
- if ([[sshPasswordField stringValue] length])
- [keychain addPassword:[sshPasswordField stringValue] forName:newKeychainName account:newKeychainAccount];
- }
-
- // Update the current favorite
- if (currentFavorite) [currentFavorite release], currentFavorite = nil;
- if ([[favoritesTableView selectedRowIndexes] count] > 0)
- currentFavorite = [[[favoritesController selectedObjects] objectAtIndex:0] copy];
-}
-
-#pragma mark -
-#pragma mark Window delegate methods
-
-// -------------------------------------------------------------------------------
-// windowWillClose:
-// Trap window close notifications and use them to ensure changes are saved.
-// -------------------------------------------------------------------------------
-- (void)windowWillClose:(NSNotification *)notification
-{
-
- [[NSColorPanel sharedColorPanel] close];
-
- // Mark the currently selected field in the window as having finished editing, to trigger saves.
- if ([preferencesWindow firstResponder])
- [preferencesWindow endEditingFor:[preferencesWindow firstResponder]];
-}
-
-// -------------------------------------------------------------------------------
-// windowWillResize:toSize:
-// Trap window resize notifications and use them to disable resizing on most tabs
-// - except for the favourites tab.
-// -------------------------------------------------------------------------------
-- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize
-{
-
- [[NSColorPanel sharedColorPanel] close];
-
- if ([sender showsResizeIndicator])
- return frameSize;
- else
- return [sender frame].size;
+ [self _resizeWindowForContentView:[editorPreferencePane preferencePaneView]];
}
#pragma mark -
#pragma mark Other
-- (void)sheetDidEnd:(id)sheet returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo
-{
-
- // Order out current sheet to suppress overlapping of sheets
- if ([sheet respondsToSelector:@selector(orderOut:)])
- [sheet orderOut:nil];
- else if ([sheet respondsToSelector:@selector(window)])
- [[sheet window] orderOut:nil];
-
- // Remove the current database
- if ([contextInfo isEqualToString:@"removeFavorite"]) {
- if (returnCode == NSAlertDefaultReturn) {
-
- // Get selected favorite's details
- NSString *name = [favoritesController valueForKeyPath:@"selection.name"];
- NSString *user = [favoritesController valueForKeyPath:@"selection.user"];
- NSString *host = [favoritesController valueForKeyPath:@"selection.host"];
- NSString *database = [favoritesController valueForKeyPath:@"selection.database"];
- NSString *sshUser = [favoritesController valueForKeyPath:@"selection.sshUser"];
- NSString *sshHost = [favoritesController valueForKeyPath:@"selection.sshHost"];
- NSString *favoriteid = [favoritesController valueForKeyPath:@"selection.id"];
- NSInteger type = [[favoritesController valueForKeyPath:@"selection.type"] integerValue];
-
- // Remove passwords from the Keychain
- [keychain deletePasswordForName:[keychain nameForFavoriteName:name id:favoriteid]
- account:[keychain accountForUser:user host:((type == SPSocketConnection)?@"localhost":host) database:database]];
- [keychain deletePasswordForName:[keychain nameForSSHForFavoriteName:name id:favoriteid]
- account:[keychain accountForSSHUser:sshUser sshHost:sshHost]];
-
- // Reset last used favorite
- if ([favoritesTableView selectedRow] == [prefs integerForKey:SPLastFavoriteIndex]) {
- [prefs setInteger:0 forKey:SPLastFavoriteIndex];
- }
-
- // Reset default favorite
- if ([favoritesTableView selectedRow] == [prefs integerForKey:SPDefaultFavorite]) {
- [prefs setInteger:[prefs integerForKey:SPLastFavoriteIndex] forKey:SPDefaultFavorite];
- }
-
- [favoritesController removeObjectAtArrangedObjectIndex:[favoritesTableView selectedRow]];
-
- [favoritesTableView reloadData];
-
- [self updateDefaultFavoritePopup];
- }
- } else if([contextInfo isEqualToString:@"saveTheme"]) {
- if (returnCode == NSOKButton) {
- NSFileManager *fm = [NSFileManager defaultManager];
- if(![fm fileExistsAtPath:themePath isDirectory:nil]) {
- if(![fm createDirectoryAtPath:themePath withIntermediateDirectories:YES attributes:nil error:nil]) {
- NSBeep();
- return;
- }
- }
- [self saveColorThemeAtPath:[NSString stringWithFormat:@"%@/%@.%@", themePath, [enterNameInputField stringValue], SPColorThemeFileExtension]];
- [self updateColorSchemeSelectionMenu];
- [prefs setObject:[enterNameInputField stringValue] forKey:SPCustomQueryEditorThemeName];
- [self updateDisplayColorThemeName];
- }
- }
-
-}
-
-- (void)setGrowlEnabled:(BOOL)value
-{
- if (value) {
- NSBeginInformationalAlertSheet(
- NSLocalizedString(@"Growl notification preferences", "Growl notification preferences alert title"),
- nil, nil, nil, [self window], self, nil, nil, nil,
- NSLocalizedString(@"All Growl notifications are enabled by default. To change which notifications are displayed, go to the Growl Preference Pane in the System Preferences and choose what notifications Growl should display from Sequel Pro.", @"Growl notification preferences alert message")
- );
- }
-
- [prefs setBool:value forKey:SPGrowlEnabled];
-}
-
-- (BOOL)growlEnabled
-{
- return [prefs boolForKey:SPGrowlEnabled];
-}
-
-- (void)editThemeList
-{
- [[NSColorPanel sharedColorPanel] close];
-
- if(editThemeListItems) [editThemeListItems release], editThemeListItems = nil;
- editThemeListItems = [[NSArray arrayWithArray:[self getAvailableThemes]] retain];
- [editThemeListTable reloadData];
-
- [NSApp beginSheet:editThemeListWindow
- modalForWindow:[self window]
- modalDelegate:self
- didEndSelector:nil
- contextInfo:nil];
-
-}
-
-- (NSArray *)getAvailableThemes
-{
- // Read ~/Library/Application Support/Sequel Pro/Themes
- NSFileManager *fm = [NSFileManager defaultManager];
- if([fm fileExistsAtPath:themePath isDirectory:nil]) {
- NSArray *allItemsRaw = [fm contentsOfDirectoryAtPath:themePath error:NULL];
- if(!allItemsRaw) return [NSArray array];
-
- // Filter out all themes
- NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF ENDSWITH %@", [NSString stringWithFormat:@".%@", SPColorThemeFileExtension]];
- NSMutableArray *allItems = [NSMutableArray arrayWithArray:allItemsRaw];
- [allItems filterUsingPredicate:predicate];
-
- allItemsRaw = [NSArray arrayWithArray:allItems];
- [allItems removeAllObjects];
-
- // Remove file extension
- for(NSString* item in allItemsRaw)
- [allItems addObject:[item substringToIndex:[item length]-[SPColorThemeFileExtension length]-1]];
-
- return (NSArray *)allItems;
- }
- return [NSArray array];
-}
-
-- (void)updateColorSchemeSelectionMenu
-{
-
- // Build theme selection submenu
- [themeSelectionMenu removeAllItems];
- [themeSelectionMenu setAutoenablesItems:YES];
- [themeSelectionMenu setShowsStateColumn:YES];
- [themeSelectionMenu addItemWithTitle:NSLocalizedString(@"Default", @"default label") action:@selector(setDefaultColors:) keyEquivalent:@""];
- [themeSelectionMenu addItem:[NSMenuItem separatorItem]];
-
- NSArray *foundThemes = [self getAvailableThemes];
- if([foundThemes count]) {
- for(NSString* item in foundThemes)
- [themeSelectionMenu addItemWithTitle:item action:@selector(loadColorScheme:) keyEquivalent:@""];
- [themeSelectionMenu addItem:[NSMenuItem separatorItem]];
- }
- [themeSelectionMenu addItemWithTitle:NSLocalizedString(@"Edit Theme List…", @"edit theme list label") action:@selector(editThemeList) keyEquivalent:@""];
-
-}
-
-- (void)updateDisplayColorThemeName
-{
-
- if(![prefs objectForKey:SPCustomQueryEditorThemeName]) {
- [colorThemeName setHidden:YES];
- [colorThemeNameLabel setHidden:YES];
- return;
- }
-
- if([[[prefs objectForKey:SPCustomQueryEditorThemeName] lowercaseString] isEqualToString:@"user-defined"]) {
- [colorThemeName setHidden:YES];
- [colorThemeNameLabel setHidden:YES];
- return;
- }
-
- NSString *currentThemeName = [[prefs objectForKey:SPCustomQueryEditorThemeName] lowercaseString];
- if([currentThemeName isEqualToString:@"default"]) {
- [colorThemeName setHidden:NO];
- [colorThemeNameLabel setHidden:NO];
- return;
- }
-
- BOOL nameValid = NO;
- for(NSString* item in [self getAvailableThemes]) {
- if([[item lowercaseString] isEqualToString:currentThemeName]) {
- nameValid = YES;
- break;
- }
- }
-
- if(nameValid) {
- [colorThemeName setHidden:NO];
- [colorThemeNameLabel setHidden:NO];
- return;
- } else {
- [prefs setObject:@"User-defined" forKey:SPCustomQueryEditorThemeName];
- [colorThemeName setHidden:YES];
- [colorThemeNameLabel setHidden:YES];
- [self updateColorSchemeSelectionMenu];
- return;
- }
-
- [colorThemeName setHidden:NO];
- [colorThemeNameLabel setHidden:NO];
-
-}
-// -------------------------------------------------------------------------------
-// updateDefaultFavoritePopup:
-//
-// Build the default favorite popup button
-// -------------------------------------------------------------------------------
-- (void)updateDefaultFavoritePopup
-{
- [defaultFavoritePopup removeAllItems];
-
- // Use the last used favorite
- [defaultFavoritePopup addItemWithTitle:NSLocalizedString(@"Last Used", @"Last Used entry in favorites menu")];
- [[defaultFavoritePopup menu] addItem:[NSMenuItem separatorItem]];
-
- // Add all favorites to the menu
- for (NSString *favorite in [[favoritesController arrangedObjects] valueForKeyPath:@"name"])
- {
- NSMenuItem *favoriteMenuItem = [[NSMenuItem alloc] initWithTitle:favorite action:NULL keyEquivalent:@""];
-
- [[defaultFavoritePopup menu] addItem:favoriteMenuItem];
-
- [favoriteMenuItem release];
- }
-
- // Add item to switch to edit favorites pane
- [[defaultFavoritePopup menu] addItem:[NSMenuItem separatorItem]];
-
- NSMenuItem *editMenuItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Edit Favorites…", @"edit favorites menu item") action:@selector(displayFavoritePreferences:) keyEquivalent:@""];
-
- [editMenuItem setTarget:self];
-
- [[defaultFavoritePopup menu] addItem:editMenuItem];
-
- [editMenuItem release];
-
- // Select the default favorite from prefs
- [defaultFavoritePopup selectItemAtIndex:(![prefs boolForKey:SPSelectLastFavoriteUsed]) ? ([prefs integerForKey:SPDefaultFavorite] + 2) : 0];
-}
-
-// -------------------------------------------------------------------------------
-// selectFavorite:
-//
-// Selects the specified favorite(s) in the favorites list
-// -------------------------------------------------------------------------------
-- (void)selectFavorites:(NSArray *)favorites
-{
- [favoritesController setSelectedObjects:favorites];
- [favoritesTableView scrollRowToVisible:[favoritesController selectionIndex]];
-}
-
-// -------------------------------------------------------------------------------
-// global table font selection
-// -------------------------------------------------------------------------------
-// show the font panel
-- (IBAction)showGlobalResultTableFontPanel:(id)sender
-{
- fontChangeTarget = 1;
- [[NSFontPanel sharedFontPanel] setPanelFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPGlobalResultTableFont]] isMultiple:NO];
- [[NSFontPanel sharedFontPanel] makeKeyAndOrderFront:self];
-}
-
-// -------------------------------------------------------------------------------
-// query editor font selection
-// -------------------------------------------------------------------------------
-// show the font panel
-- (IBAction)showCustomQueryFontPanel:(id)sender
-{
- fontChangeTarget = 2;
- [[NSFontPanel sharedFontPanel] setPanelFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]] isMultiple:NO];
- [[NSFontPanel sharedFontPanel] makeKeyAndOrderFront:self];
-}
-
-// reset syntax highlighting colors
-- (IBAction)setDefaultColors:(id)sender
-{
-
- if(![self checkForUnsavedTheme]) return;
-
- [[NSColorPanel sharedColorPanel] close];
- [prefs setObject:@"Default" forKey:SPCustomQueryEditorThemeName];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.000 green:0.455 blue:0.000 alpha:1.000]] forKey:SPCustomQueryEditorCommentColor];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.769 green:0.102 blue:0.086 alpha:1.000]] forKey:SPCustomQueryEditorQuoteColor];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.200 green:0.250 blue:1.000 alpha:1.000]] forKey:SPCustomQueryEditorSQLKeywordColor];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.000 green:0.000 blue:0.658 alpha:1.000]] forKey:SPCustomQueryEditorBacktickColor];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.506 green:0.263 blue:0.000 alpha:1.000]] forKey:SPCustomQueryEditorNumericColor];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.500 green:0.500 blue:0.500 alpha:1.000]] forKey:SPCustomQueryEditorVariableColor];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.950 green:0.950 blue:0.950 alpha:1.000]] forKey:SPCustomQueryEditorHighlightQueryColor];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.7098 green:0.8352 blue:1.000 alpha:1.000]] forKey:SPCustomQueryEditorSelectionColor];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor blackColor]] forKey:SPCustomQueryEditorTextColor];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor blackColor]] forKey:SPCustomQueryEditorCaretColor];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor whiteColor]] forKey:SPCustomQueryEditorBackgroundColor];
- [colorSettingTableView reloadData];
- [self updateDisplayColorThemeName];
-}
-
-- (void)colorClick:(id)sender
-{
- NSColorPanel* panel;
-
- colorRow = [sender clickedRow];
- panel = [NSColorPanel sharedColorPanel];
- [panel setTarget:self];
- [panel setAction:@selector(colorChanged:)];
- [panel setColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:[editorColors objectAtIndex:colorRow]]]];
- [colorSettingTableView deselectAll:nil];
- [panel makeKeyAndOrderFront:self];
-}
-
-- (void)colorChanged:(id)sender
-{
-
- if(![[NSColorPanel sharedColorPanel] isVisible]) return;
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[sender color]] forKey:[editorColors objectAtIndex:colorRow]];
- [colorSettingTableView reloadData];
- [prefs setObject:@"User-defined" forKey:SPCustomQueryEditorThemeName];
- [self updateDisplayColorThemeName];
-
-}
-
-// Set font panel's valid modes
-- (NSUInteger)validModesForFontPanel:(NSFontPanel *)fontPanel
-{
- return (NSFontPanelSizeModeMask|NSFontPanelCollectionModeMask);
-}
-
-// Action receiver for a font change in the font panel
+/**
+ * Called when the user changes the selected font. This method is defined here as the specific preference
+ * pane controllers (NSViewController subclasses) don't seem to be in the responder chain so we need to catch
+ * it here.
+ */
- (void)changeFont:(id)sender
-{
- NSFont *nf;
+{
+ NSFont *font;
+ NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
- switch(fontChangeTarget)
+ switch (fontChangeTarget)
{
case 1:
- nf = [[NSFontPanel sharedFontPanel] panelConvertFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPGlobalResultTableFont]]];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:nf] forKey:SPGlobalResultTableFont];
- [globalResultTableFontName setStringValue:[NSString stringWithFormat:@"%@, %.1f pt", [nf displayName], [nf pointSize]]];
+ font = [[NSFontPanel sharedFontPanel] panelConvertFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPGlobalResultTableFont]]];
+
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:font] forKey:SPGlobalResultTableFont];
+
+ [tablesPreferencePane updateDisplayedTableFontName];
break;
case 2:
- nf = [[NSFontPanel sharedFontPanel] panelConvertFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]]];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:nf] forKey:SPCustomQueryEditorFont];
- [editorFontName setStringValue:[NSString stringWithFormat:@"%@, %.1f pt", [nf displayName], [nf pointSize]]];
+ font = [[NSFontPanel sharedFontPanel] panelConvertFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]]];
+
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:font] forKey:SPCustomQueryEditorFont];
+
+ [editorPreferencePane updateDisplayedEditorFontName];
break;
}
- [colorSettingTableView reloadData];
-}
-
-/**
- * Menu item validation;
- */
-- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
-{
- SEL action = [menuItem action];
-
- if ((action == @selector(removeFavorite:)) || (action == @selector(duplicateFavorite:))) {
- return ([favoritesTableView numberOfSelectedRows] > 0);
- }
-
- if (action == @selector(makeSelectedFavoriteDefault:)) {
- return ([favoritesTableView numberOfSelectedRows] == 1);
- }
-
- if ((action == @selector(sortFavorites:)) || (action == @selector(reverseFavoritesSortOrder:))) {
-
- // Loop all the items in the sort by menu only checking the currently selected one
- for (NSMenuItem *item in [[menuItem menu] itemArray])
- {
- [item setState:([[menuItem menu] indexOfItem:item] == currentSortItem) ? NSOnState : NSOffState];
- }
-
- // Check or uncheck the reverse sort item
- if (action == @selector(reverseFavoritesSortOrder:)) {
- [menuItem setState:reverseFavoritesSort];
- }
-
- return [[toolbar selectedItemIdentifier] isEqualToString:SPPreferenceToolbarFavorites];
- }
-
- return YES;
-}
-
-- (void)saveColorThemeAtPath:(NSString*)path
-{
- // Build plist dictionary
- NSMutableDictionary *scheme = [NSMutableDictionary dictionary];
- NSMutableDictionary *mainsettings = [NSMutableDictionary dictionary];
- NSMutableArray *settings = [NSMutableArray array];
-
- CGFloat red, green, blue, alpha;
- NSInteger redInt, greenInt, blueInt, alphaInt;
- NSString *redHexValue, *greenHexValue, *blueHexValue, *alphaHexValue;
-
- [prefs synchronize];
-
- NSColor *aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]];
- [mainsettings setObject:[aColor rgbHexString] forKey:@"background"];
-
- aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorCaretColor]];
- [mainsettings setObject:[aColor rgbHexString] forKey:@"caret"];
-
- aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]];
- [mainsettings setObject:[aColor rgbHexString] forKey:@"foreground"];
-
- aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorHighlightQueryColor]];
- [mainsettings setObject:[aColor rgbHexString] forKey:@"lineHighlight"];
-
- aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSelectionColor]];
- [mainsettings setObject:[aColor rgbHexString] forKey:@"selection"];
-
- [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:mainsettings, @"settings", nil]];
-
- aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorCommentColor]];
- [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:
- @"Comment", @"name",
- [NSDictionary dictionaryWithObjectsAndKeys:
- [aColor rgbHexString], @"foreground",
- nil
- ], @"settings",
- nil
- ]];
-
- aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorQuoteColor]];
- [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:
- @"String", @"name",
- [NSDictionary dictionaryWithObjectsAndKeys:
- [aColor rgbHexString], @"foreground",
- nil
- ], @"settings",
- nil
- ]];
-
- aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSQLKeywordColor]];
- [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:
- @"Keyword", @"name",
- [NSDictionary dictionaryWithObjectsAndKeys:
- [aColor rgbHexString], @"foreground",
- nil
- ], @"settings",
- nil
- ]];
-
- aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBacktickColor]];
- [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:
- @"User-defined constant", @"name",
- [NSDictionary dictionaryWithObjectsAndKeys:
- [aColor rgbHexString], @"foreground",
- nil
- ], @"settings",
- nil
- ]];
-
- aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorNumericColor]];
- [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:
- @"Number", @"name",
- [NSDictionary dictionaryWithObjectsAndKeys:
- [aColor rgbHexString], @"foreground",
- nil
- ], @"settings",
- nil
- ]];
-
- aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorVariableColor]];
- [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:
- @"Variable", @"name",
- [NSDictionary dictionaryWithObjectsAndKeys:
- [aColor rgbHexString], @"foreground",
- nil
- ], @"settings",
- nil
- ]];
-
- [scheme setObject:settings forKey:@"settings"];
-
- NSString *err = nil;
- NSData *plist = [NSPropertyListSerialization dataFromPropertyList:scheme
- format:NSPropertyListXMLFormat_v1_0
- errorDescription:&err];
-
- if(err != nil) {
- NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while converting color scheme data", @"error while converting color scheme data")]
- defaultButton:NSLocalizedString(@"OK", @"OK button")
- alternateButton:nil
- otherButton:nil
- informativeTextWithFormat:err];
-
- [alert setAlertStyle:NSCriticalAlertStyle];
- [alert runModal];
- return;
- }
-
- NSError *error = nil;
- [plist writeToFile:path options:NSAtomicWrite error:&error];
- if (error) [[NSAlert alertWithError:error] runModal];
-}
-
-- (void)checkForUnsavedThemeDidEndSheet:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
-{
- checkForUnsavedThemeSheetStatus = returnCode;
-}
-
-
-- (BOOL)checkForUnsavedTheme
-{
-
- if(![prefs objectForKey:SPCustomQueryEditorThemeName] || [[[prefs objectForKey:SPCustomQueryEditorThemeName] lowercaseString] isEqualToString:@"user-defined"]) {
-
- [[NSColorPanel sharedColorPanel] close];
-
- SPBeginWaitingAlertSheet(@"title",
- NSLocalizedString(@"Proceed", @"proceed button"), NSLocalizedString(@"Cancel", @"cancel button"), nil,
- NSWarningAlertStyle, [self window], self,
- @selector(checkForUnsavedThemeDidEndSheet:returnCode:contextInfo:),
- nil,
- NSLocalizedString(@"Warning", @"warning"),
- NSLocalizedString(@"Current color theme is unsaved. Do you want to proceed without saving it?", @"Current color theme is unsaved. Do you want to proceed without saving it message"),
- checkForUnsavedThemeSheetStatus
- );
-
- if(checkForUnsavedThemeSheetStatus == NSAlertDefaultReturn) {
- return YES;
- }
-
- return NO;
- }
- [[NSColorPanel sharedColorPanel] close];
- return YES;
}
-- (BOOL)loadColorSchemeFromFile:(NSString*)filename
-{
- NSError *readError = nil;
- NSString *convError = nil;
- NSPropertyListFormat format;
-
- NSDictionary *theme = nil;
-
- NSData *pData = [NSData dataWithContentsOfFile:filename options:NSUncachedRead error:&readError];
-
- theme = [[NSPropertyListSerialization propertyListFromData:pData
- mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&convError] retain];
-
- if(!theme || readError != nil || [convError length] || !(format == NSPropertyListXMLFormat_v1_0 || format == NSPropertyListBinaryFormat_v1_0)) {
- NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading data file", @"error while reading data file")]
- defaultButton:NSLocalizedString(@"OK", @"OK button")
- alternateButton:nil
- otherButton:nil
- informativeTextWithFormat:NSLocalizedString(@"File couldn't be read.", @"error while reading data file")];
-
- [alert setAlertStyle:NSCriticalAlertStyle];
- [alert runModal];
- if (theme) [theme release];
- [self updateDisplayColorThemeName];
- return NO;
- }
-
- if([theme objectForKey:@"settings"]
- && [[theme objectForKey:@"settings"] isKindOfClass:[NSArray class]]
- && [[theme objectForKey:@"settings"] count]
- && [[[theme objectForKey:@"settings"] objectAtIndex:0] isKindOfClass:[NSDictionary class]]
- && [[[theme objectForKey:@"settings"] objectAtIndex:0] objectForKey:@"settings"]) {
-
- NSInteger counter = 0;
- for(NSDictionary *dict in [theme objectForKey:@"settings"]) {
- if(counter == 0) {
- if([dict objectForKey:@"settings"]) {
- NSDictionary *dic = [dict objectForKey:@"settings"];
- if([dic objectForKey:@"background"])
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"background"]]] forKey:SPCustomQueryEditorBackgroundColor];
- if([dic objectForKey:@"caret"])
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"caret"]]] forKey:SPCustomQueryEditorCaretColor];
- if([dic objectForKey:@"foreground"])
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"foreground"]]] forKey:SPCustomQueryEditorTextColor];
- if([dic objectForKey:@"lineHighlight"])
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"lineHighlight"]]] forKey:SPCustomQueryEditorHighlightQueryColor];
- if([dic objectForKey:@"selection"])
- [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"selection"]]] forKey:SPCustomQueryEditorSelectionColor];
- } else {
- continue;
- }
- } else {
- if([dict objectForKey:@"name"] && [dict objectForKey:@"settings"] && [[dict objectForKey:@"settings"] isKindOfClass:[NSDictionary class]] && [[dict objectForKey:@"settings"] objectForKey:@"foreground"]) {
- if([[dict objectForKey:@"name"] isEqualToString:@"Comment"])
- [prefs setObject:[NSArchiver archivedDataWithRootObject:
- [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]]
- forKey:SPCustomQueryEditorCommentColor];
- else if([[dict objectForKey:@"name"] isEqualToString:@"String"])
- [prefs setObject:[NSArchiver archivedDataWithRootObject:
- [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]]
- forKey:SPCustomQueryEditorQuoteColor];
- else if([[dict objectForKey:@"name"] isEqualToString:@"Keyword"])
- [prefs setObject:[NSArchiver archivedDataWithRootObject:
- [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]]
- forKey:SPCustomQueryEditorSQLKeywordColor];
- else if([[dict objectForKey:@"name"] isEqualToString:@"User-defined constant"])
- [prefs setObject:[NSArchiver archivedDataWithRootObject:
- [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]]
- forKey:SPCustomQueryEditorBacktickColor];
- else if([[dict objectForKey:@"name"] isEqualToString:@"Number"])
- [prefs setObject:[NSArchiver archivedDataWithRootObject:
- [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]]
- forKey:SPCustomQueryEditorNumericColor];
- else if([[dict objectForKey:@"name"] isEqualToString:@"Variable"])
- [prefs setObject:[NSArchiver archivedDataWithRootObject:
- [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]]
- forKey:SPCustomQueryEditorVariableColor];
- }
- }
- counter++;
- }
-
- [theme release];
- [colorSettingTableView reloadData];
-
- } else {
-
- NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading data file", @"error while reading data file")]
- defaultButton:NSLocalizedString(@"OK", @"OK button")
- alternateButton:nil
- otherButton:nil
- informativeTextWithFormat:NSLocalizedString(@"No color theme data found.", @"error that no color theme found")];
-
- [alert setAlertStyle:NSInformationalAlertStyle];
- [alert runModal];
- [theme release];
- return NO;
-
- }
- return YES;
-}
-
-/**
- * Save panel did end method.
- */
-- (void)panelDidEnd:(NSSavePanel *)panel returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo
-{
-
- if([contextInfo isEqualToString:@"exportColorScheme"]) {
- if (returnCode == NSOKButton) {
- [self saveColorThemeAtPath:[panel filename]];
- }
- }
- else if([contextInfo isEqualToString:@"importColorScheme"]) {
- if (returnCode == NSOKButton) {
- if([self loadColorSchemeFromFile:[[panel filenames] objectAtIndex:0]]) {
- [prefs setObject:@"User-defined" forKey:SPCustomQueryEditorThemeName];
- [self updateDisplayColorThemeName];
- }
- }
- }
-}
#pragma mark -
+#pragma mark Private API
/**
- * Dealloc.
+ * Constructs the preferences' window toolbar.
*/
-- (void)dealloc
-{
- if(themePath) [themePath release], themePath = nil;
- if(editThemeListItems) [editThemeListItems release], editThemeListItems = nil;
- if(editorColors) [editorColors release], editorColors = nil;
- if(editorNameForColors) [editorNameForColors release], editorNameForColors = nil;
- if (keychain) [keychain release], keychain = nil;
- if (currentFavorite) [currentFavorite release];
-
- [super dealloc];
-}
-
-#pragma mark -
-#pragma mark Private API
-
-// -------------------------------------------------------------------------------
-// _setupToolbar
-//
-// Constructs the preferences' window toolbar.
-// -------------------------------------------------------------------------------
- (void)_setupToolbar
{
toolbar = [[[NSToolbar alloc] initWithIdentifier:@"Preference Toolbar"] autorelease];
// General preferences
- generalItem = [[NSToolbarItem alloc] initWithItemIdentifier:SPPreferenceToolbarGeneral];
+ generalItem = [[NSToolbarItem alloc] initWithItemIdentifier:[generalPreferencePane preferencePaneIdentifier]];
- [generalItem setLabel:NSLocalizedString(@"General", @"")];
- [generalItem setImage:[NSImage imageNamed:@"toolbar-preferences-general"]];
+ [generalItem setLabel:[generalPreferencePane preferencePaneName]];
+ [generalItem setImage:[generalPreferencePane preferencePaneIcon]];
+ [generalItem setToolTip:[generalPreferencePane preferencePaneToolTip]];
[generalItem setTarget:self];
- [generalItem setAction:@selector(displayGeneralPreferences:)];
+ [generalItem setAction:@selector(displayPreferencePane:)];
// Table preferences
- tablesItem = [[NSToolbarItem alloc] initWithItemIdentifier:SPPreferenceToolbarTables];
+ tablesItem = [[NSToolbarItem alloc] initWithItemIdentifier:[tablesPreferencePane preferencePaneIdentifier]];
- [tablesItem setLabel:NSLocalizedString(@"Tables", @"")];
- [tablesItem setImage:[NSImage imageNamed:@"toolbar-preferences-tables"]];
+ [tablesItem setLabel:[tablesPreferencePane preferencePaneName]];
+ [tablesItem setImage:[tablesPreferencePane preferencePaneIcon]];
[tablesItem setTarget:self];
[tablesItem setAction:@selector(displayTablePreferences:)];
// Favorite preferences
- favoritesItem = [[NSToolbarItem alloc] initWithItemIdentifier:SPPreferenceToolbarFavorites];
+ favoritesItem = [[NSToolbarItem alloc] initWithItemIdentifier:[favoritesPreferencePane preferencePaneIdentifier]];
- [favoritesItem setLabel:NSLocalizedString(@"Favorites", @"")];
- [favoritesItem setImage:[NSImage imageNamed:@"toolbar-preferences-favorites"]];
+ [favoritesItem setLabel:[favoritesPreferencePane preferencePaneName]];
+ [favoritesItem setImage:[favoritesPreferencePane preferencePaneIcon]];
[favoritesItem setTarget:self];
[favoritesItem setAction:@selector(displayFavoritePreferences:)];
// Notification preferences
- notificationsItem = [[NSToolbarItem alloc] initWithItemIdentifier:SPPreferenceToolbarNotifications];
+ notificationsItem = [[NSToolbarItem alloc] initWithItemIdentifier:[notificationsPreferencePane preferencePaneIdentifier]];
- [notificationsItem setLabel:NSLocalizedString(@"Alerts & Logs", @"")];
- [notificationsItem setImage:[NSImage imageNamed:@"toolbar-preferences-notifications"]];
+ [notificationsItem setLabel:[notificationsPreferencePane preferencePaneName]];
+ [notificationsItem setImage:[notificationsPreferencePane preferencePaneIcon]];
[notificationsItem setTarget:self];
- [notificationsItem setAction:@selector(displayNotificationPreferences:)];
+ [notificationsItem setAction:@selector(displayPreferencePane:)];
// Editor preferences
- editorItem = [[NSToolbarItem alloc] initWithItemIdentifier:SPPreferenceToolbarEditor];
+ editorItem = [[NSToolbarItem alloc] initWithItemIdentifier:[editorPreferencePane preferencePaneIdentifier]];
- [editorItem setLabel:NSLocalizedString(@"Query Editor", @"")];
- [editorItem setImage:[NSImage imageNamed:@"toolbar-preferences-queryeditor"]];
+ [editorItem setLabel:[editorPreferencePane preferencePaneName]];
+ [editorItem setImage:[editorPreferencePane preferencePaneIcon]];
[editorItem setTarget:self];
[editorItem setAction:@selector(displayEditorPreferences:)];
- // Shortcut preferences
- /*shortcutItem = [[NSToolbarItem alloc] initWithItemIdentifier:SPPreferenceToolbarShortcuts];
-
- [shortcutItem setLabel:NSLocalizedString(@"Shortcuts", @"")];
- [shortcutItem setImage:[NSImage imageNamed:@"toolbar-preferences-shortcuts"]];
- [shortcutItem setTarget:self];
- [shortcutItem setAction:@selector(NSBeep)];*/
-
// AutoUpdate preferences
- autoUpdateItem = [[NSToolbarItem alloc] initWithItemIdentifier:SPPreferenceToolbarAutoUpdate];
+ autoUpdateItem = [[NSToolbarItem alloc] initWithItemIdentifier:[autoUpdatePreferencePane preferencePaneIdentifier]];
- [autoUpdateItem setLabel:NSLocalizedString(@"Auto Update", @"")];
- [autoUpdateItem setImage:[NSImage imageNamed:@"toolbar-preferences-autoupdate"]];
+ [autoUpdateItem setLabel:[autoUpdatePreferencePane preferencePaneName]];
+ [autoUpdateItem setImage:[autoUpdatePreferencePane preferencePaneIcon]];
[autoUpdateItem setTarget:self];
- [autoUpdateItem setAction:@selector(displayAutoUpdatePreferences:)];
+ [autoUpdateItem setAction:@selector(displayPreferencePane:)];
// Network preferences
- networkItem = [[NSToolbarItem alloc] initWithItemIdentifier:SPPreferenceToolbarNetwork];
+ networkItem = [[NSToolbarItem alloc] initWithItemIdentifier:[networkPreferencePane preferencePaneIdentifier]];
- [networkItem setLabel:NSLocalizedString(@"Network", @"")];
- [networkItem setImage:[NSImage imageNamed:@"toolbar-preferences-network"]];
+ [networkItem setLabel:[networkPreferencePane preferencePaneName]];
+ [networkItem setImage:[networkPreferencePane preferencePaneIcon]];
[networkItem setTarget:self];
- [networkItem setAction:@selector(displayNetworkPreferences:)];
+ [networkItem setAction:@selector(displayPreferencePane:)];
[toolbar setDelegate:self];
- [toolbar setSelectedItemIdentifier:SPPreferenceToolbarGeneral];
+ [toolbar setSelectedItemIdentifier:[generalPreferencePane preferencePaneIdentifier]];
[toolbar setAllowsUserCustomization:NO];
- [preferencesWindow setToolbar:toolbar];
- [preferencesWindow setShowsToolbarButton:NO];
-
- [self displayGeneralPreferences:nil];
-}
+ [[self window] setToolbar:toolbar];
+ [[self window] setShowsToolbarButton:NO];
-/**
- * Sorts the connection favorites based on the selected criteria.
- */
-- (void)_sortFavorites
-{
- NSString *sortKey = @"";
-
- switch (currentSortItem)
- {
- case SPFavoritesSortNameItem:
- sortKey = @"name";
- break;
- case SPFavoritesSortHostItem:
- sortKey = @"host";
- break;
- case SPFavoritesSortTypeItem:
- sortKey = @"type";
- break;
- }
-
- NSSortDescriptor *sortDescriptor = nil;
-
- if (currentSortItem == SPFavoritesSortTypeItem) {
- sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:sortKey ascending:(!reverseFavoritesSort)] autorelease];
- }
- else {
- sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:sortKey ascending:(!reverseFavoritesSort) selector:@selector(caseInsensitiveCompare:)] autorelease];
- }
-
- [favoritesController setSortDescriptors:[NSArray arrayWithObject:sortDescriptor]];
-
- [favoritesTableView reloadData];
-
- [self updateDefaultFavoritePopup];
+ [self displayPreferencePane:nil];
}
/**
* Resizes the window to the size of the supplied view.
*/
- (void)_resizeWindowForContentView:(NSView *)view
-{
- // Remove all current views
- NSEnumerator *en = [[[preferencesWindow contentView] subviews] objectEnumerator];
- NSView *subview;
-
- while (subview = [en nextObject])
- {
- [subview removeFromSuperview];
- }
+{
+ // Remove all subviews
+ for (NSView *subview in [[[self window] contentView] subviews]) [subview removeFromSuperview];
// Resize window
- [preferencesWindow resizeForContentView:view titleBarVisible:YES];
+ [[self window] resizeForContentView:view titleBarVisible:YES];
// Add view
- [[preferencesWindow contentView] addSubview:view];
+ [[[self window] contentView] addSubview:view];
+
[view setFrameOrigin:NSMakePoint(0, 0)];
}
+#pragma mark -
+
+/**
+ * Dealloc.
+ */
+- (void)dealloc
+{
+ [preferencePanes release], preferencePanes = nil;
+
+ [super dealloc];
+}
+
@end
diff --git a/Source/SPPreferenceControllerDelegate.h b/Source/SPPreferenceControllerDelegate.h
new file mode 100644
index 00000000..c2f7f79b
--- /dev/null
+++ b/Source/SPPreferenceControllerDelegate.h
@@ -0,0 +1,37 @@
+//
+// $Id$
+//
+// SPPreferenceControllerDelegate.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPPreferenceController.h"
+
+/**
+ * @category SPPreferenceControllerDelegate SPPreferenceControllerDelegate.h
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * Preference controller delegate category.
+ */
+@interface SPPreferenceController (SPPreferenceControllerDelegate)
+
+@end
diff --git a/Source/SPPreferenceControllerDelegate.m b/Source/SPPreferenceControllerDelegate.m
new file mode 100644
index 00000000..56bb807a
--- /dev/null
+++ b/Source/SPPreferenceControllerDelegate.m
@@ -0,0 +1,132 @@
+//
+// $Id$
+//
+// SPPreferenceControllerDelegate.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPPreferenceControllerDelegate.h"
+
+@implementation SPPreferenceController (SPPreferenceControllerDelegate)
+
+#pragma mark -
+#pragma mark Window delegate methods
+
+/**
+ * Trap window close notifications and use them to ensure changes are saved.
+ */
+- (void)windowWillClose:(NSNotification *)notification
+{
+ [[NSColorPanel sharedColorPanel] close];
+
+ // Mark the currently selected field in the window as having finished editing, to trigger saves.
+ if ([[self window] firstResponder]) {
+ [[self window] endEditingFor:[[self window] firstResponder]];
+ }
+}
+
+/**
+ * Trap window resize notifications and use them to disable resizing on most tabs
+ * - except for the favourites tab.
+ */
+- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize
+{
+ [[NSColorPanel sharedColorPanel] close];
+
+ return ([sender showsResizeIndicator]) ? frameSize : [sender frame].size;
+}
+
+#pragma mark -
+#pragma mark Toolbar delegate methods
+
+- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
+{
+ if ([itemIdentifier isEqualToString:SPPreferenceToolbarGeneral]) {
+ return generalItem;
+ }
+ else if ([itemIdentifier isEqualToString:SPPreferenceToolbarTables]) {
+ return tablesItem;
+ }
+ else if ([itemIdentifier isEqualToString:SPPreferenceToolbarFavorites]) {
+ return favoritesItem;
+ }
+ else if ([itemIdentifier isEqualToString:SPPreferenceToolbarNotifications]) {
+ return notificationsItem;
+ }
+ else if ([itemIdentifier isEqualToString:SPPreferenceToolbarAutoUpdate]) {
+ return autoUpdateItem;
+ }
+ else if ([itemIdentifier isEqualToString:SPPreferenceToolbarNetwork]) {
+ return networkItem;
+ }
+ else if ([itemIdentifier isEqualToString:SPPreferenceToolbarEditor]) {
+ return editorItem;
+ }
+ else if ([itemIdentifier isEqualToString:SPPreferenceToolbarShortcuts]) {
+ return shortcutItem;
+ }
+
+ return [[[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier] autorelease];
+}
+
+- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar
+{
+ return [NSArray arrayWithObjects:
+ SPPreferenceToolbarGeneral,
+ SPPreferenceToolbarTables,
+ SPPreferenceToolbarFavorites,
+ SPPreferenceToolbarNotifications,
+ SPPreferenceToolbarEditor,
+ SPPreferenceToolbarShortcuts,
+ SPPreferenceToolbarAutoUpdate,
+ SPPreferenceToolbarNetwork,
+ nil];
+}
+
+- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar
+{
+ return [NSArray arrayWithObjects:
+ SPPreferenceToolbarGeneral,
+ SPPreferenceToolbarTables,
+ SPPreferenceToolbarFavorites,
+ SPPreferenceToolbarNotifications,
+ SPPreferenceToolbarEditor,
+ SPPreferenceToolbarShortcuts,
+ SPPreferenceToolbarAutoUpdate,
+ SPPreferenceToolbarNetwork,
+ nil];
+}
+
+- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar
+{
+ return [NSArray arrayWithObjects:
+ SPPreferenceToolbarGeneral,
+ SPPreferenceToolbarTables,
+ SPPreferenceToolbarFavorites,
+ SPPreferenceToolbarNotifications,
+ SPPreferenceToolbarEditor,
+ SPPreferenceToolbarShortcuts,
+ SPPreferenceToolbarAutoUpdate,
+ SPPreferenceToolbarNetwork,
+ nil];
+}
+
+@end
diff --git a/Source/SPPreferencePane.h b/Source/SPPreferencePane.h
new file mode 100644
index 00000000..7c715672
--- /dev/null
+++ b/Source/SPPreferencePane.h
@@ -0,0 +1,41 @@
+//
+// $Id$
+//
+// SPPreferencePane.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPPreferencePaneProtocol.h"
+
+/**
+ * @class SPPreferencePane SPPreferencePane.h
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * This class is designed to be the parent of all preference pane controllers. It simply provides access
+ * to the user's default as well as being a subclass of NSViewController itself.
+ */
+@interface SPPreferencePane : NSViewController
+{
+ NSUserDefaults *prefs;
+}
+
+@end
diff --git a/Source/SPPreferencePane.m b/Source/SPPreferencePane.m
new file mode 100644
index 00000000..8f4b15d6
--- /dev/null
+++ b/Source/SPPreferencePane.m
@@ -0,0 +1,45 @@
+//
+// $Id$
+//
+// SPPreferencePane.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPPreferencePane.h"
+
+@implementation SPPreferencePane
+
+#pragma mark -
+#pragma mark Intialisation
+
+/**
+ * Initialisation. Establishes a reference to the user's defaults to be used by subclasses.
+ */
+- (id)init
+{
+ if ((self = [super initWithNibName:nil bundle:nil])) {
+ prefs = [NSUserDefaults standardUserDefaults];
+ }
+
+ return self;
+}
+
+@end
diff --git a/Source/SPPreferencePaneProtocol.h b/Source/SPPreferencePaneProtocol.h
new file mode 100644
index 00000000..e28a6189
--- /dev/null
+++ b/Source/SPPreferencePaneProtocol.h
@@ -0,0 +1,77 @@
+//
+// $Id$
+//
+// SPPreferencePaneProtocol.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 29, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+/**
+ * @protocol SPPreferencePane SPPreferencePane.h
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * Protocol that all preference pane controllers should conform to.
+ */
+@protocol SPPreferencePaneProtocol
+
+/**
+ * Returns the preference pane's view.
+ *
+ * @return The pane's NSView instance
+ */
+- (NSView *)preferencePaneView;
+
+/**
+ * Returns the preference pane's toolbar item icon/image.
+ *
+ * @return The pane's NSImage instance
+ */
+- (NSImage *)preferencePaneIcon;
+
+/**
+ * Returns the preference pane's name.
+ *
+ * @return The pane's name
+ */
+- (NSString *)preferencePaneName;
+
+/**
+ * Returns the preference pane's toolbar item identifier.
+ *
+ * @return The pane's identifier
+ */
+- (NSString *)preferencePaneIdentifier;
+
+/**
+ * Returns the preference pane's toolbar item tooltip.
+ *
+ * @return The pane's tooltip
+ */
+- (NSString *)preferencePaneToolTip;
+
+/**
+ * Indicates whether or not the preference pane can be resized.
+ *
+ * @return A BOOL indicating resizability
+ */
+- (BOOL)preferencePaneAllowsResizing;
+
+@end
diff --git a/Source/SPPreferencesUpgrade.h b/Source/SPPreferencesUpgrade.h
new file mode 100644
index 00000000..03241880
--- /dev/null
+++ b/Source/SPPreferencesUpgrade.h
@@ -0,0 +1,37 @@
+//
+// $Id$
+//
+// SPPreferencesUpgrade.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 29, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+/**
+ * @class SPPreferencesUpgrade SPPreferencesUpgrade.h
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * This class provides a single function for upgrading the user's preferences between revisions.
+ */
+@interface SPPreferencesUpgrade : NSObject
+
+void SPApplyRevisionChanges(void);
+
+@end
diff --git a/Source/SPPreferencesUpgrade.m b/Source/SPPreferencesUpgrade.m
new file mode 100644
index 00000000..887289e7
--- /dev/null
+++ b/Source/SPPreferencesUpgrade.m
@@ -0,0 +1,300 @@
+//
+// $Id$
+//
+// SPPreferencesUpgrade.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 29, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPPreferencesUpgrade.h"
+#import "SPKeychain.h"
+
+@implementation SPPreferencesUpgrade
+
+/**
+ * Checks the revision number, applies any preference upgrades, and updates to latest revision.
+ * Currently uses both lastUsedVersion and LastUsedVersion for <0.9.5 compatibility.
+ */
+void SPApplyRevisionChanges(void)
+{
+ NSInteger i;
+ NSInteger currentVersionNumber, recordedVersionNumber = 0;
+
+ NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
+
+ // Get the current bundle version number (the SVN build number) for per-version upgrades
+ currentVersionNumber = [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] integerValue];
+
+ // Get the current revision
+ if ([prefs objectForKey:@"lastUsedVersion"]) recordedVersionNumber = [[prefs objectForKey:@"lastUsedVersion"] integerValue];
+ if ([prefs objectForKey:SPLastUsedVersion]) recordedVersionNumber = [[prefs objectForKey:SPLastUsedVersion] integerValue];
+
+ // Skip processing if the current version matches or is less than recorded version
+ if (currentVersionNumber <= recordedVersionNumber) return;
+
+ // If no recorded version, update to current revision and skip processing
+ if (!recordedVersionNumber) {
+ [prefs setObject:[NSNumber numberWithInteger:currentVersionNumber] forKey:SPLastUsedVersion];
+ return;
+ }
+
+ // For versions prior to r336 (0.9.4), where column widths have been saved, walk through them and remove
+ // any table widths set to 15 or less (fix for mangled columns caused by Issue #140)
+ if (recordedVersionNumber < 336 && [prefs objectForKey:SPTableColumnWidths] != nil) {
+ NSEnumerator *databaseEnumerator, *tableEnumerator, *columnEnumerator;
+ NSString *databaseKey, *tableKey, *columnKey;
+ NSMutableDictionary *newDatabase, *newTable;
+ CGFloat columnWidth;
+ NSMutableDictionary *newTableColumnWidths = [[NSMutableDictionary alloc] init];
+
+ databaseEnumerator = [[prefs objectForKey:SPTableColumnWidths] keyEnumerator];
+
+ while (databaseKey = [databaseEnumerator nextObject])
+ {
+ newDatabase = [[NSMutableDictionary alloc] init];
+ tableEnumerator = [[[prefs objectForKey:SPTableColumnWidths] objectForKey:databaseKey] keyEnumerator];
+
+ while (tableKey = [tableEnumerator nextObject])
+ {
+ newTable = [[NSMutableDictionary alloc] init];
+ columnEnumerator = [[[[prefs objectForKey:SPTableColumnWidths] objectForKey:databaseKey] objectForKey:tableKey] keyEnumerator];
+
+ while (columnKey = [columnEnumerator nextObject])
+ {
+ columnWidth = [[[[[prefs objectForKey:SPTableColumnWidths] objectForKey:databaseKey] objectForKey:tableKey] objectForKey:columnKey] doubleValue];
+
+ if (columnWidth >= 15) {
+ [newTable setObject:[NSNumber numberWithDouble:columnWidth] forKey:[NSString stringWithString:columnKey]];
+ }
+ }
+
+ if ([newTable count]) {
+ [newDatabase setObject:[NSDictionary dictionaryWithDictionary:newTable] forKey:[NSString stringWithString:tableKey]];
+ }
+
+ [newTable release];
+ }
+
+ if ([newDatabase count]) {
+ [newTableColumnWidths setObject:[NSDictionary dictionaryWithDictionary:newDatabase] forKey:[NSString stringWithString:databaseKey]];
+ }
+
+ [newDatabase release];
+ }
+
+ [prefs setObject:[NSDictionary dictionaryWithDictionary:newTableColumnWidths] forKey:SPTableColumnWidths];
+ [newTableColumnWidths release];
+ }
+
+ // For versions prior to r561 (0.9.5), migrate old pref keys where they exist to the new pref keys
+ if (recordedVersionNumber < 561) {
+ NSEnumerator *keyEnumerator;
+ NSString *oldKey, *newKey;
+ NSDictionary *keysToUpgrade = [NSDictionary dictionaryWithObjectsAndKeys:
+ @"encoding", SPDefaultEncoding,
+ @"useMonospacedFonts", SPUseMonospacedFonts,
+ @"reloadAfterAdding", SPReloadAfterAddingRow,
+ @"reloadAfterEditing", SPReloadAfterEditingRow,
+ @"reloadAfterRemoving", SPReloadAfterRemovingRow,
+ @"dontShowBlob", SPLoadBlobsAsNeeded,
+ @"fetchRowCount", @"FetchCorrectRowCount",
+ @"limitRows", SPLimitResults,
+ @"limitRowsValue", SPLimitResultsValue,
+ @"nullValue", SPNullValue,
+ @"showError", SPShowNoAffectedRowsError,
+ @"connectionTimeout", SPConnectionTimeoutValue,
+ @"keepAliveInterval", SPKeepAliveInterval,
+ @"lastFavoriteIndex", SPLastFavoriteIndex,
+ nil];
+
+ keyEnumerator = [keysToUpgrade keyEnumerator];
+
+ while (newKey = [keyEnumerator nextObject])
+ {
+ oldKey = [keysToUpgrade objectForKey:newKey];
+
+ if ([prefs objectForKey:oldKey]) {
+ [prefs setObject:[prefs objectForKey:oldKey] forKey:newKey];
+ [prefs removeObjectForKey:oldKey];
+ }
+ }
+
+ // Remove outdated keys
+ [prefs removeObjectForKey:@"lastUsedVersion"];
+ [prefs removeObjectForKey:@"version"];
+ }
+
+ // For versions prior to r567 (0.9.5), add a timestamp-based identifier to favorites and keychain entries
+ if (recordedVersionNumber < 567 && [prefs objectForKey:SPFavorites]) {
+ NSMutableArray *favoritesArray = [NSMutableArray arrayWithArray:[prefs objectForKey:SPFavorites]];
+ NSMutableDictionary *favorite;
+ NSString *password, *keychainName, *keychainAccount;
+ SPKeychain *upgradeKeychain = [[SPKeychain alloc] init];
+
+ // Cycle through the favorites, generating a timestamp-derived ID for each and renaming associated keychain items.
+ for (i = 0; i < [favoritesArray count]; i++)
+ {
+ favorite = [NSMutableDictionary dictionaryWithDictionary:[favoritesArray objectAtIndex:i]];
+
+ if ([favorite objectForKey:@"id"]) continue;
+
+ [favorite setObject:[NSNumber numberWithInteger:[[NSString stringWithFormat:@"%f", [[NSDate date] timeIntervalSince1970]] hash]] forKey:@"id"];
+ keychainName = [NSString stringWithFormat:@"Sequel Pro : %@", [favorite objectForKey:@"name"]];
+ keychainAccount = [NSString stringWithFormat:@"%@@%@/%@",
+ [favorite objectForKey:@"user"], [favorite objectForKey:@"host"], [favorite objectForKey:@"database"]];
+ password = [upgradeKeychain getPasswordForName:keychainName account:keychainAccount];
+ [upgradeKeychain deletePasswordForName:keychainName account:keychainAccount];
+
+ if (password && [password length]) {
+ keychainName = [NSString stringWithFormat:@"Sequel Pro : %@ (%ld)", [favorite objectForKey:@"name"], (long)[[favorite objectForKey:@"id"] integerValue]];
+ [upgradeKeychain addPassword:password forName:keychainName account:keychainAccount];
+ }
+
+ [favoritesArray replaceObjectAtIndex:i withObject:[NSDictionary dictionaryWithDictionary:favorite]];
+ }
+
+ [prefs setObject:[NSArray arrayWithArray:favoritesArray] forKey:SPFavorites];
+ [upgradeKeychain release];
+ password = nil;
+ }
+
+ // For versions prior to r981 (~0.9.6), upgrade the favourites to include a connection type for each
+ if (recordedVersionNumber < 981 && [prefs objectForKey:SPFavorites]) {
+ NSMutableArray *favoritesArray = [NSMutableArray arrayWithArray:[prefs objectForKey:SPFavorites]];
+ NSMutableDictionary *favorite;
+
+ // Cycle through the favorites
+ for (i = 0; i < [favoritesArray count]; i++)
+ {
+ favorite = [NSMutableDictionary dictionaryWithDictionary:[favoritesArray objectAtIndex:i]];
+
+ if ([favorite objectForKey:@"type"]) continue;
+
+ // If the favorite has a socket, or has the host set to "localhost", set to socket-type connection
+ if ([[favorite objectForKey:@"host"] isEqualToString:@"localhost"]
+ || ([favorite objectForKey:@"socket"] && [(NSString *)[favorite objectForKey:@"socket"] length]))
+ {
+ [favorite setObject:[NSNumber numberWithInteger:1] forKey:@"type"];
+
+ // If SSH details are set, set to tunnel connection
+ }
+ else if ([favorite objectForKey:@"useSSH"] && [[favorite objectForKey:@"useSSH"] integerValue]) {
+ [favorite setObject:[NSNumber numberWithInteger:2] forKey:@"type"];
+
+ // Default to TCP/IP
+ }
+ else {
+ [favorite setObject:[NSNumber numberWithInteger:0] forKey:@"type"];
+ }
+
+ // Remove SSH tunnel flag - no longer required
+ [favorite removeObjectForKey:@"useSSH"];
+
+ [favoritesArray replaceObjectAtIndex:i withObject:[NSDictionary dictionaryWithDictionary:favorite]];
+ }
+
+ [prefs setObject:[NSArray arrayWithArray:favoritesArray] forKey:SPFavorites];
+ }
+
+ // For versions prior to r1128 (~0.9.6), reset the main window toolbar items to add new items
+ if (recordedVersionNumber < 1128 && [prefs objectForKey:@"NSToolbar Configuration TableWindowToolbar"]) {
+ NSMutableDictionary *toolbarDict = [NSMutableDictionary dictionaryWithDictionary:[prefs objectForKey:@"NSToolbar Configuration TableWindowToolbar"]];
+ [toolbarDict removeObjectForKey:@"TB Item Identifiers"];
+ [prefs setObject:[NSDictionary dictionaryWithDictionary:toolbarDict] forKey:@"NSToolbar Configuration TableWindowToolbar"];
+ }
+
+ // For versions prior to r1609 (~0.9.7), convert the query favorites array to an array of dictionaries
+ if (recordedVersionNumber < 1609 && [prefs objectForKey:SPQueryFavorites]) {
+ NSMutableArray *queryFavoritesArray = [NSMutableArray arrayWithArray:[prefs objectForKey:SPQueryFavorites]];
+
+ for (i = 0; i < [queryFavoritesArray count]; i++)
+ {
+ id favorite = [queryFavoritesArray objectAtIndex:i];
+
+ // If the favorite is already a dictionary, just make sure there's no newlines in the title
+ if (([favorite isKindOfClass:[NSDictionary class]]) && ([favorite objectForKey:@"name"]) && ([favorite objectForKey:@"query"])) {
+ NSMutableString *favoriteName = [NSMutableString stringWithString:[favorite objectForKey:@"name"]];
+ [favoriteName replaceOccurrencesOfString:@"\n" withString:@" " options:NSLiteralSearch range:NSMakeRange(0, [favoriteName length])];
+ [queryFavoritesArray replaceObjectAtIndex:i withObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSString stringWithString:favoriteName], [favorite objectForKey:@"query"], nil] forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]]];
+ continue;
+ }
+
+ // By default make the query's name the first 32 characters of the query with '...' appended, stripping newlines
+ NSMutableString *favoriteName = [NSMutableString stringWithString:[favorite stringByTrimmingCharactersInSet:[NSCharacterSet newlineCharacterSet]]];
+ [favoriteName replaceOccurrencesOfString:@"\n" withString:@" " options:NSLiteralSearch range:NSMakeRange(0, [favoriteName length])];
+
+ if ([favoriteName length] > 32) {
+ [favoriteName deleteCharactersInRange:NSMakeRange(32, [favoriteName length] - 32)];
+ [favoriteName appendString:@"..."];
+ }
+
+ [queryFavoritesArray replaceObjectAtIndex:i withObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSString stringWithString:favoriteName], favorite, nil] forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]]];
+ }
+
+ [prefs setObject:queryFavoritesArray forKey:SPQueryFavorites];
+ }
+
+ // For versions prior to r1636 (<0.9.8), remove the old "Fetch correct row count" pref
+ if (recordedVersionNumber < 1636 && [prefs objectForKey:@"FetchCorrectRowCount"]) {
+ [prefs removeObjectForKey:@"FetchCorrectRowCount"];
+ }
+
+ // For versions prior to r2057 (~0.9.8), reset the Sparkle prefs so the user is prompted about submitting information
+ if (recordedVersionNumber < 2057 && [prefs objectForKey:@"SUEnableAutomaticChecks"]) {
+ [prefs removeObjectForKey:@"SUEnableAutomaticChecks"];
+ [prefs removeObjectForKey:@"SUSendProfileInfo"];
+ }
+
+ // For versions prior to 2325 (<0.9.9), convert the old encoding pref string into the new localizable constant
+ if (recordedVersionNumber < 2325 && [prefs objectForKey:@"DefaultEncoding"] && [[prefs objectForKey:@"DefaultEncoding"] isKindOfClass:[NSString class]]) {
+ NSDictionary *encodingMap = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:SPEncodingAutodetect], @"Autodetect",
+ [NSNumber numberWithInt:SPEncodingUCS2], @"UCS-2 Unicode (ucs2)",
+ [NSNumber numberWithInt:SPEncodingUTF8], @"UTF-8 Unicode (utf8)",
+ [NSNumber numberWithInt:SPEncodingUTF8viaLatin1], @"UTF-8 Unicode via Latin 1",
+ [NSNumber numberWithInt:SPEncodingASCII], @"US ASCII (ascii)",
+ [NSNumber numberWithInt:SPEncodingLatin1], @"ISO Latin 1 (latin1)",
+ [NSNumber numberWithInt:SPEncodingMacRoman], @"Mac Roman (macroman)",
+ [NSNumber numberWithInt:SPEncodingCP1250Latin2], @"Windows Latin 2 (cp1250)",
+ [NSNumber numberWithInt:SPEncodingISOLatin2], @"ISO Latin 2 (latin2)",
+ [NSNumber numberWithInt:SPEncodingCP1256Arabic], @"Windows Arabic (cp1256)",
+ [NSNumber numberWithInt:SPEncodingGreek], @"ISO Greek (greek)",
+ [NSNumber numberWithInt:SPEncodingHebrew], @"ISO Hebrew (hebrew)",
+ [NSNumber numberWithInt:SPEncodingLatin5Turkish], @"ISO Turkish (latin5)",
+ [NSNumber numberWithInt:SPEncodingCP1257WinBaltic], @"Windows Baltic (cp1257)",
+ [NSNumber numberWithInt:SPEncodingCP1251WinCyrillic], @"Windows Cyrillic (cp1251)",
+ [NSNumber numberWithInt:SPEncodingBig5Chinese], @"Big5 Traditional Chinese (big5)",
+ [NSNumber numberWithInt:SPEncodingShiftJISJapanese], @"Shift-JIS Japanese (sjis)",
+ [NSNumber numberWithInt:SPEncodingEUCJPJapanese], @"EUC-JP Japanese (ujis)",
+ [NSNumber numberWithInt:SPEncodingEUCKRKorean], @"EUC-KR Korean (euckr)",
+ nil];
+
+ NSNumber *newMappedValue = [encodingMap valueForKey:[prefs objectForKey:@"DefaultEncoding"]];
+
+ if (newMappedValue == nil) newMappedValue = [NSNumber numberWithInt:0];
+
+ [prefs setObject:newMappedValue forKey:@"DefaultEncodingTag"];
+ }
+
+ // Update the prefs revision
+ [prefs setObject:[NSNumber numberWithInteger:currentVersionNumber] forKey:SPLastUsedVersion];
+}
+
+@end
diff --git a/Source/SPTablesPreferencePane.h b/Source/SPTablesPreferencePane.h
new file mode 100644
index 00000000..b3ad17df
--- /dev/null
+++ b/Source/SPTablesPreferencePane.h
@@ -0,0 +1,44 @@
+//
+// $Id$
+//
+// SPTablesPreferencePane.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPPreferencePane.h"
+
+/**
+ * @class SPTablesPreferencePane SPTablesPreferencePane.h
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * Tables preference pane controller.
+ */
+@interface SPTablesPreferencePane : SPPreferencePane <SPPreferencePaneProtocol>
+{
+ IBOutlet NSTextField *globalResultTableFontName;
+}
+
+- (IBAction)showGlobalResultTableFontPanel:(id)sender;
+
+- (void)updateDisplayedTableFontName;
+
+@end
diff --git a/Source/SPTablesPreferencePane.m b/Source/SPTablesPreferencePane.m
new file mode 100644
index 00000000..90a1893b
--- /dev/null
+++ b/Source/SPTablesPreferencePane.m
@@ -0,0 +1,92 @@
+//
+// $Id$
+//
+// SPTablesPreferencePane.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPTablesPreferencePane.h"
+#import "SPPreferenceController.h"
+
+@implementation SPTablesPreferencePane
+
+#pragma mark -
+#pragma mark IB action methods
+
+/**
+ * Opens the font panel for selecting the global result table font.
+ */
+- (IBAction)showGlobalResultTableFontPanel:(id)sender
+{
+ [(SPPreferenceController *)[[[self view] window] delegate] setFontChangeTarget:1];
+
+ [[NSFontPanel sharedFontPanel] setPanelFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPGlobalResultTableFont]] isMultiple:NO];
+ [[NSFontPanel sharedFontPanel] makeKeyAndOrderFront:self];
+}
+
+#pragma mark -
+#pragma mark Public API
+
+/**
+ * Updates the displayed font according to the user's preferences.
+ */
+- (void)updateDisplayedTableFontName
+{
+ NSFont *font = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPGlobalResultTableFont]];
+
+ [globalResultTableFontName setFont:font];
+ [globalResultTableFontName setStringValue:[NSString stringWithFormat:@"%@, %.1f pt", [font displayName], [font pointSize]]];
+}
+
+#pragma mark -
+#pragma mark Preference pane protocol methods
+
+- (NSView *)preferencePaneView
+{
+ return [self view];
+}
+
+- (NSImage *)preferencePaneIcon
+{
+ return [NSImage imageNamed:@"toolbar-preferences-tables"];
+}
+
+- (NSString *)preferencePaneName
+{
+ return NSLocalizedString(@"Tables", @"tables preference pane name");
+}
+
+- (NSString *)preferencePaneIdentifier
+{
+ return SPPreferenceToolbarTables;
+}
+
+- (NSString *)preferencePaneToolTip
+{
+ return NSLocalizedString(@"Table Preferences", @"general preference pane tooltip");
+}
+
+- (BOOL)preferencePaneAllowsResizing
+{
+ return NO;
+}
+
+@end
diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj
index def9b39d..5940462e 100644
--- a/sequel-pro.xcodeproj/project.pbxproj
+++ b/sequel-pro.xcodeproj/project.pbxproj
@@ -66,6 +66,14 @@
177E792F0FCB54EC00E9E122 /* dummy-small.png in Resources */ = {isa = PBXBuildFile; fileRef = 177E792C0FCB54EC00E9E122 /* dummy-small.png */; };
177E79300FCB54EC00E9E122 /* table-small-square.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 177E792D0FCB54EC00E9E122 /* table-small-square.tiff */; };
177E7A230FCB6A2E00E9E122 /* SPExtendedTableInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 177E7A220FCB6A2E00E9E122 /* SPExtendedTableInfo.m */; };
+ 1785E9F7127D8C7500F468C8 /* SPPreferencePane.m in Sources */ = {isa = PBXBuildFile; fileRef = 1785E9F6127D8C7500F468C8 /* SPPreferencePane.m */; };
+ 1785EA16127DAE3A00F468C8 /* SPPreferenceControllerDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1785EA15127DAE3A00F468C8 /* SPPreferenceControllerDelegate.m */; };
+ 1785EA23127DAF3300F468C8 /* SPTablesPreferencePane.m in Sources */ = {isa = PBXBuildFile; fileRef = 1785EA22127DAF3300F468C8 /* SPTablesPreferencePane.m */; };
+ 1785EA26127DB4DC00F468C8 /* SPFavoritesPreferencePane.m in Sources */ = {isa = PBXBuildFile; fileRef = 1785EA25127DB4DC00F468C8 /* SPFavoritesPreferencePane.m */; };
+ 1785EB60127DD5A800F468C8 /* SPNotificationsPreferencePane.m in Sources */ = {isa = PBXBuildFile; fileRef = 1785EB5F127DD5A800F468C8 /* SPNotificationsPreferencePane.m */; };
+ 1785EB63127DD5DE00F468C8 /* SPAutoUpdatePreferencePane.m in Sources */ = {isa = PBXBuildFile; fileRef = 1785EB62127DD5DE00F468C8 /* SPAutoUpdatePreferencePane.m */; };
+ 1785EB66127DD5EA00F468C8 /* SPNetworkPreferencePane.m in Sources */ = {isa = PBXBuildFile; fileRef = 1785EB65127DD5EA00F468C8 /* SPNetworkPreferencePane.m */; };
+ 1785EB6A127DD79300F468C8 /* SPEditorPreferencePane.m in Sources */ = {isa = PBXBuildFile; fileRef = 1785EB69127DD79300F468C8 /* SPEditorPreferencePane.m */; };
1789343C0F30C1DD0097539A /* SPStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 1789343B0F30C1DD0097539A /* SPStringAdditions.m */; };
1792C13210AD752100ABE758 /* DatabaseServerVariables.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1792C13010AD752100ABE758 /* DatabaseServerVariables.xib */; };
1792C13710AD75C800ABE758 /* SPServerVariablesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1792C13610AD75C800ABE758 /* SPServerVariablesController.m */; };
@@ -111,6 +119,9 @@
17CC993B10B4C9C80034CD7A /* License.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 17CC993A10B4C9C80034CD7A /* License.rtf */; };
17D38EBC12771A1C00672B13 /* SPTableStructureDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D38EBB12771A1C00672B13 /* SPTableStructureDelegate.m */; };
17D38F701279E23A00672B13 /* SPTableFieldValidation.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D38F6F1279E23A00672B13 /* SPTableFieldValidation.m */; };
+ 17D390C8127B65AF00672B13 /* SPGeneralPreferencePane.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D390C7127B65AF00672B13 /* SPGeneralPreferencePane.m */; };
+ 17D390CB127B6BF800672B13 /* SPPreferencesUpgrade.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D390CA127B6BF800672B13 /* SPPreferencesUpgrade.m */; };
+ 17D3DC201281816E002A163A /* SPDatabaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D3DC1F1281816E002A163A /* SPDatabaseViewController.m */; };
17DC8E75126F4AB600E9AAEC /* MCPConnectionDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 17DC8E74126F4AB600E9AAEC /* MCPConnectionDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
17DCC5C7115C202700F89A00 /* MCPStringAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 17DCC5C5115C202700F89A00 /* MCPStringAdditions.h */; };
17DD52B7115071D0007D8950 /* SPPrintTemplate.html in Resources */ = {isa = PBXBuildFile; fileRef = 17DD52B6115071D0007D8950 /* SPPrintTemplate.html */; };
@@ -158,6 +169,7 @@
17F90E2C1210B34900274C98 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 17F90E2B1210B34900274C98 /* Credits.rtf */; };
17F90E481210B42700274C98 /* SPExportFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 17F90E471210B42700274C98 /* SPExportFile.m */; };
17F90E4B1210B43A00274C98 /* SPExportFileUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 17F90E4A1210B43A00274C98 /* SPExportFileUtilities.m */; };
+ 17FDB04C1280778B00DBBBC2 /* SPFontPreviewTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 17FDB04B1280778B00DBBBC2 /* SPFontPreviewTextField.m */; };
296DC89F0F8FD336002A3258 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 296DC89E0F8FD336002A3258 /* WebKit.framework */; };
296DC8B60F909194002A3258 /* MGTemplateEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 296DC8A70F909194002A3258 /* MGTemplateEngine.m */; };
296DC8B70F909194002A3258 /* RegexKitLite.m in Sources */ = {isa = PBXBuildFile; fileRef = 296DC8AB0F909194002A3258 /* RegexKitLite.m */; };
@@ -231,7 +243,6 @@
588B2CCA0FE5641E00EC5FC0 /* ssh-disconnected.png in Resources */ = {isa = PBXBuildFile; fileRef = 588B2CC70FE5641E00EC5FC0 /* ssh-disconnected.png */; };
589235321020C1230011DE00 /* SPHistoryController.m in Sources */ = {isa = PBXBuildFile; fileRef = 589235301020C1230011DE00 /* SPHistoryController.m */; };
589582151154F8F400EDCC28 /* SPMainThreadTrampoline.m in Sources */ = {isa = PBXBuildFile; fileRef = 589582141154F8F400EDCC28 /* SPMainThreadTrampoline.m */; };
- 5897FE4F127DE86D0047897C /* SPDatabaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5897FE4E127DE86D0047897C /* SPDatabaseViewController.m */; };
589ED05B11E0ACD100C1DCEA /* DMLocalizedNib.m in Sources */ = {isa = PBXBuildFile; fileRef = 589ED05A11E0ACD100C1DCEA /* DMLocalizedNib.m */; };
58A137CD123ED5E6000B1B75 /* titlebarlock.png in Resources */ = {isa = PBXBuildFile; fileRef = 58A137CC123ED5E6000B1B75 /* titlebarlock.png */; };
58A8A72711A0149100B95749 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 58A8A72611A0149100B95749 /* MainWindow.xib */; };
@@ -587,6 +598,22 @@
177E792D0FCB54EC00E9E122 /* table-small-square.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "table-small-square.tiff"; sourceTree = "<group>"; };
177E7A210FCB6A2E00E9E122 /* SPExtendedTableInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPExtendedTableInfo.h; sourceTree = "<group>"; };
177E7A220FCB6A2E00E9E122 /* SPExtendedTableInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPExtendedTableInfo.m; sourceTree = "<group>"; };
+ 1785E9F5127D8C7500F468C8 /* SPPreferencePane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPPreferencePane.h; sourceTree = "<group>"; };
+ 1785E9F6127D8C7500F468C8 /* SPPreferencePane.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPPreferencePane.m; sourceTree = "<group>"; };
+ 1785EA14127DAE3A00F468C8 /* SPPreferenceControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPPreferenceControllerDelegate.h; sourceTree = "<group>"; };
+ 1785EA15127DAE3A00F468C8 /* SPPreferenceControllerDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPPreferenceControllerDelegate.m; sourceTree = "<group>"; };
+ 1785EA21127DAF3300F468C8 /* SPTablesPreferencePane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPTablesPreferencePane.h; sourceTree = "<group>"; };
+ 1785EA22127DAF3300F468C8 /* SPTablesPreferencePane.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPTablesPreferencePane.m; sourceTree = "<group>"; };
+ 1785EA24127DB4DC00F468C8 /* SPFavoritesPreferencePane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPFavoritesPreferencePane.h; sourceTree = "<group>"; };
+ 1785EA25127DB4DC00F468C8 /* SPFavoritesPreferencePane.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPFavoritesPreferencePane.m; sourceTree = "<group>"; };
+ 1785EB5E127DD5A800F468C8 /* SPNotificationsPreferencePane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPNotificationsPreferencePane.h; sourceTree = "<group>"; };
+ 1785EB5F127DD5A800F468C8 /* SPNotificationsPreferencePane.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPNotificationsPreferencePane.m; sourceTree = "<group>"; };
+ 1785EB61127DD5DE00F468C8 /* SPAutoUpdatePreferencePane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPAutoUpdatePreferencePane.h; sourceTree = "<group>"; };
+ 1785EB62127DD5DE00F468C8 /* SPAutoUpdatePreferencePane.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPAutoUpdatePreferencePane.m; sourceTree = "<group>"; };
+ 1785EB64127DD5EA00F468C8 /* SPNetworkPreferencePane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPNetworkPreferencePane.h; sourceTree = "<group>"; };
+ 1785EB65127DD5EA00F468C8 /* SPNetworkPreferencePane.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPNetworkPreferencePane.m; sourceTree = "<group>"; };
+ 1785EB68127DD79300F468C8 /* SPEditorPreferencePane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPEditorPreferencePane.h; sourceTree = "<group>"; };
+ 1785EB69127DD79300F468C8 /* SPEditorPreferencePane.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPEditorPreferencePane.m; sourceTree = "<group>"; };
1789343A0F30C1DD0097539A /* SPStringAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPStringAdditions.h; sourceTree = "<group>"; };
1789343B0F30C1DD0097539A /* SPStringAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPStringAdditions.m; sourceTree = "<group>"; };
178934980F30CDA10097539A /* trim-application.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "trim-application.sh"; sourceTree = "<group>"; };
@@ -670,6 +697,13 @@
17D38F6E1279E23A00672B13 /* SPTableFieldValidation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPTableFieldValidation.h; sourceTree = "<group>"; };
17D38F6F1279E23A00672B13 /* SPTableFieldValidation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPTableFieldValidation.m; sourceTree = "<group>"; };
17D38FC3127B0CFC00672B13 /* SPConnectionControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPConnectionControllerDelegate.h; sourceTree = "<group>"; };
+ 17D390A8127B556F00672B13 /* SPPreferencePaneProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPPreferencePaneProtocol.h; sourceTree = "<group>"; };
+ 17D390C6127B65AF00672B13 /* SPGeneralPreferencePane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPGeneralPreferencePane.h; sourceTree = "<group>"; };
+ 17D390C7127B65AF00672B13 /* SPGeneralPreferencePane.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPGeneralPreferencePane.m; sourceTree = "<group>"; };
+ 17D390C9127B6BF800672B13 /* SPPreferencesUpgrade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPPreferencesUpgrade.h; sourceTree = "<group>"; };
+ 17D390CA127B6BF800672B13 /* SPPreferencesUpgrade.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPPreferencesUpgrade.m; sourceTree = "<group>"; };
+ 17D3DC1E1281816E002A163A /* SPDatabaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDatabaseViewController.h; sourceTree = "<group>"; };
+ 17D3DC1F1281816E002A163A /* SPDatabaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDatabaseViewController.m; sourceTree = "<group>"; };
17DA04EA0FC1A7DA00D66140 /* Unit Tests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Unit Tests-Info.plist"; path = "Plists/Unit Tests-Info.plist"; sourceTree = "<group>"; };
17DC8E74126F4AB600E9AAEC /* MCPConnectionDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCPConnectionDelegate.h; sourceTree = "<group>"; };
17DCC5C5115C202700F89A00 /* MCPStringAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCPStringAdditions.h; sourceTree = "<group>"; };
@@ -760,6 +794,8 @@
17F90E471210B42700274C98 /* SPExportFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPExportFile.m; sourceTree = "<group>"; };
17F90E491210B43A00274C98 /* SPExportFileUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPExportFileUtilities.h; sourceTree = "<group>"; };
17F90E4A1210B43A00274C98 /* SPExportFileUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPExportFileUtilities.m; sourceTree = "<group>"; };
+ 17FDB04A1280778B00DBBBC2 /* SPFontPreviewTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPFontPreviewTextField.h; sourceTree = "<group>"; };
+ 17FDB04B1280778B00DBBBC2 /* SPFontPreviewTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPFontPreviewTextField.m; sourceTree = "<group>"; };
296DC89E0F8FD336002A3258 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
296DC8A50F909194002A3258 /* MGTemplateMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTemplateMarker.h; sourceTree = "<group>"; };
296DC8A60F909194002A3258 /* MGTemplateFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTemplateFilter.h; sourceTree = "<group>"; };
@@ -867,8 +903,6 @@
589235311020C1230011DE00 /* SPHistoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPHistoryController.h; sourceTree = "<group>"; };
589582131154F8F400EDCC28 /* SPMainThreadTrampoline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPMainThreadTrampoline.h; sourceTree = "<group>"; };
589582141154F8F400EDCC28 /* SPMainThreadTrampoline.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPMainThreadTrampoline.m; sourceTree = "<group>"; };
- 5897FE4D127DE86D0047897C /* SPDatabaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDatabaseViewController.h; sourceTree = "<group>"; };
- 5897FE4E127DE86D0047897C /* SPDatabaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDatabaseViewController.m; sourceTree = "<group>"; };
589ED05A11E0ACD100C1DCEA /* DMLocalizedNib.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DMLocalizedNib.m; sourceTree = "<group>"; };
58A137CC123ED5E6000B1B75 /* titlebarlock.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = titlebarlock.png; sourceTree = "<group>"; };
58A8A72411A0148400B95749 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainWindow.xib; sourceTree = "<group>"; };
@@ -1359,10 +1393,10 @@
29FA88221114619E00D1AF3D /* SPTableTriggers.m */,
17E6414E0EF01EF6001BC333 /* SPTableContent.h */,
17E6414F0EF01EF6001BC333 /* SPTableContent.m */,
- 5897FE4D127DE86D0047897C /* SPDatabaseViewController.h */,
- 5897FE4E127DE86D0047897C /* SPDatabaseViewController.m */,
17E641500EF01EF6001BC333 /* SPDatabaseDocument.h */,
17E641510EF01EF6001BC333 /* SPDatabaseDocument.m */,
+ 17D3DC1E1281816E002A163A /* SPDatabaseViewController.h */,
+ 17D3DC1F1281816E002A163A /* SPDatabaseViewController.m */,
17D38FC2127B0C9500672B13 /* Connection View */,
17D38F691279E17D00672B13 /* Table Structure */,
1792C28910AE1C7200ABE758 /* Controller Categories */,
@@ -1423,8 +1457,6 @@
17E6414D0EF01EF6001BC333 /* SPGrowlController.m */,
589235311020C1230011DE00 /* SPHistoryController.h */,
589235301020C1230011DE00 /* SPHistoryController.m */,
- B57747D50F7A8978003B34F9 /* SPPreferenceController.h */,
- B57747D30F7A8974003B34F9 /* SPPreferenceController.m */,
5806B76211A991EC00813A88 /* SPDocumentController.h */,
5806B76311A991EC00813A88 /* SPDocumentController.m */,
);
@@ -1635,6 +1667,44 @@
name = "Connection View";
sourceTree = "<group>";
};
+ 17D390A6127B54F300672B13 /* Preferences */ = {
+ isa = PBXGroup;
+ children = (
+ 17D390C9127B6BF800672B13 /* SPPreferencesUpgrade.h */,
+ 17D390CA127B6BF800672B13 /* SPPreferencesUpgrade.m */,
+ B57747D50F7A8978003B34F9 /* SPPreferenceController.h */,
+ B57747D30F7A8974003B34F9 /* SPPreferenceController.m */,
+ 17D390A8127B556F00672B13 /* SPPreferencePaneProtocol.h */,
+ 1785EA14127DAE3A00F468C8 /* SPPreferenceControllerDelegate.h */,
+ 1785EA15127DAE3A00F468C8 /* SPPreferenceControllerDelegate.m */,
+ 17D390A7127B551400672B13 /* Panes */,
+ );
+ name = Preferences;
+ sourceTree = "<group>";
+ };
+ 17D390A7127B551400672B13 /* Panes */ = {
+ isa = PBXGroup;
+ children = (
+ 1785E9F5127D8C7500F468C8 /* SPPreferencePane.h */,
+ 1785E9F6127D8C7500F468C8 /* SPPreferencePane.m */,
+ 17D390C6127B65AF00672B13 /* SPGeneralPreferencePane.h */,
+ 17D390C7127B65AF00672B13 /* SPGeneralPreferencePane.m */,
+ 1785EA21127DAF3300F468C8 /* SPTablesPreferencePane.h */,
+ 1785EA22127DAF3300F468C8 /* SPTablesPreferencePane.m */,
+ 1785EA24127DB4DC00F468C8 /* SPFavoritesPreferencePane.h */,
+ 1785EA25127DB4DC00F468C8 /* SPFavoritesPreferencePane.m */,
+ 1785EB5E127DD5A800F468C8 /* SPNotificationsPreferencePane.h */,
+ 1785EB5F127DD5A800F468C8 /* SPNotificationsPreferencePane.m */,
+ 1785EB68127DD79300F468C8 /* SPEditorPreferencePane.h */,
+ 1785EB69127DD79300F468C8 /* SPEditorPreferencePane.m */,
+ 1785EB61127DD5DE00F468C8 /* SPAutoUpdatePreferencePane.h */,
+ 1785EB62127DD5DE00F468C8 /* SPAutoUpdatePreferencePane.m */,
+ 1785EB64127DD5EA00F468C8 /* SPNetworkPreferencePane.h */,
+ 1785EB65127DD5EA00F468C8 /* SPNetworkPreferencePane.m */,
+ );
+ name = Panes;
+ sourceTree = "<group>";
+ };
17DC8825126B222D00E9AAEC /* Third Party */ = {
isa = PBXGroup;
children = (
@@ -1815,6 +1885,7 @@
173E70D4107FF6E7008733C9 /* Data Controllers */,
17D38EFB12777B2300672B13 /* Data Import */,
17F5B1491048C4C000FC794F /* Data Export */,
+ 17D390A6127B54F300672B13 /* Preferences */,
173E70D5107FF7AF008733C9 /* Other */,
);
name = Controllers;
@@ -1845,6 +1916,7 @@
58C56EF40F438E120035701E /* SPDataCellFormatter.m */,
BC2898F1125F4488001B50E1 /* SPGeometryDataView.h */,
BC2898F2125F4488001B50E1 /* SPGeometryDataView.m */,
+ 17FDB0AC1280938000DBBBC2 /* Controls */,
171312CF109D23CA00FB465F /* Cells */,
17DC8829126B337900E9AAEC /* Text Views */,
17DC8827126B32F300E9AAEC /* Table Views */,
@@ -2042,6 +2114,15 @@
name = Model;
sourceTree = "<group>";
};
+ 17FDB0AC1280938000DBBBC2 /* Controls */ = {
+ isa = PBXGroup;
+ children = (
+ 17FDB04A1280778B00DBBBC2 /* SPFontPreviewTextField.h */,
+ 17FDB04B1280778B00DBBBC2 /* SPFontPreviewTextField.m */,
+ );
+ name = Controls;
+ sourceTree = "<group>";
+ };
19C28FB0FE9D524F11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
@@ -2518,6 +2599,7 @@
isa = PBXProject;
buildConfigurationList = C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "sequel-pro" */;
compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
@@ -2960,7 +3042,18 @@
175EC63512733B36009A7C0F /* SPExportControllerDelegate.m in Sources */,
17D38EBC12771A1C00672B13 /* SPTableStructureDelegate.m in Sources */,
17D38F701279E23A00672B13 /* SPTableFieldValidation.m in Sources */,
- 5897FE4F127DE86D0047897C /* SPDatabaseViewController.m in Sources */,
+ 17D390C8127B65AF00672B13 /* SPGeneralPreferencePane.m in Sources */,
+ 17D390CB127B6BF800672B13 /* SPPreferencesUpgrade.m in Sources */,
+ 1785E9F7127D8C7500F468C8 /* SPPreferencePane.m in Sources */,
+ 1785EA16127DAE3A00F468C8 /* SPPreferenceControllerDelegate.m in Sources */,
+ 1785EA23127DAF3300F468C8 /* SPTablesPreferencePane.m in Sources */,
+ 1785EA26127DB4DC00F468C8 /* SPFavoritesPreferencePane.m in Sources */,
+ 1785EB60127DD5A800F468C8 /* SPNotificationsPreferencePane.m in Sources */,
+ 1785EB63127DD5DE00F468C8 /* SPAutoUpdatePreferencePane.m in Sources */,
+ 1785EB66127DD5EA00F468C8 /* SPNetworkPreferencePane.m in Sources */,
+ 1785EB6A127DD79300F468C8 /* SPEditorPreferencePane.m in Sources */,
+ 17FDB04C1280778B00DBBBC2 /* SPFontPreviewTextField.m in Sources */,
+ 17D3DC201281816E002A163A /* SPDatabaseViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};