diff options
-rw-r--r-- | Interfaces/English.lproj/Preferences.xib | 743 | ||||
-rw-r--r-- | Resources/Plists/PreferenceDefaults.plist | 2 | ||||
-rw-r--r-- | Source/SPColorAdditions.h | 34 | ||||
-rw-r--r-- | Source/SPColorAdditions.m | 93 | ||||
-rw-r--r-- | Source/SPConstants.h | 2 | ||||
-rw-r--r-- | Source/SPConstants.m | 2 | ||||
-rw-r--r-- | Source/SPPreferenceController.h | 3 | ||||
-rw-r--r-- | Source/SPPreferenceController.m | 261 | ||||
-rw-r--r-- | Source/SPTextView.m | 15 | ||||
-rw-r--r-- | sequel-pro.xcodeproj/project.pbxproj | 6 |
10 files changed, 1102 insertions, 59 deletions
diff --git a/Interfaces/English.lproj/Preferences.xib b/Interfaces/English.lproj/Preferences.xib index 08a3fb4f..82a09c77 100644 --- a/Interfaces/English.lproj/Preferences.xib +++ b/Interfaces/English.lproj/Preferences.xib @@ -21,7 +21,7 @@ </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="1590"/> + <integer value="802"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -59,11 +59,9 @@ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSWindowContentMinSize">{580, 50}</string> <object class="NSView" key="NSWindowView" id="1006"> - <reference key="NSNextResponder"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">256</int> <string key="NSFrameSize">{580, 172}</string> - <reference key="NSSuperview"/> - <reference key="NSWindow"/> </object> <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> <string key="NSMinSize">{580, 72}</string> @@ -606,7 +604,7 @@ <reference key="NSNextResponder" ref="594324362"/> <int key="NSvFlags">12</int> <string key="NSFrame">{{202.5, 176}, {360, 5}}</string> - <string key="NSBounds">{{1, 0}, {358, 5}}</string> + <string key="NSBounds">{{2.5, 0}, {355, 5}}</string> <reference key="NSSuperview" ref="594324362"/> <string key="NSOffsets">{0, 0}</string> <object class="NSTextFieldCell" key="NSTitleCell"> @@ -1499,7 +1497,7 @@ <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> @@ -2669,7 +2667,6 @@ </object> </object> <string key="NSFrameSize">{580, 381}</string> - <reference key="NSSuperview"/> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="1041614321"> @@ -3278,14 +3275,87 @@ AQAAAAA</bytes> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="1033452264"> - <nil key="NSNextResponder"/> + <reference key="NSNextResponder"/> <int key="NSvFlags">268</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSPopUpButton" id="748242000"> + <reference key="NSNextResponder" ref="1033452264"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{32, 20}, {24, 24}}</string> + <reference key="NSSuperview" ref="1033452264"/> + <bool key="NSEnabled">YES</bool> + <object class="NSPopUpButtonCell" key="NSCell" id="373813305"> + <int key="NSCellFlags">71433792</int> + <int key="NSCellFlags2">134350848</int> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="748242000"/> + <int key="NSButtonFlags">-2034089729</int> + <int key="NSButtonFlags2">162</int> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + <object class="NSMenuItem" key="NSMenuItem" id="474302340"> + <reference key="NSMenu" ref="28667448"/> + <bool key="NSIsHidden">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <int key="NSState">1</int> + <object class="NSCustomResource" key="NSImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSAdvanced</string> + </object> + <reference key="NSOnImage" ref="1039721224"/> + <reference key="NSMixedImage" ref="720177216"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="373813305"/> + </object> + <bool key="NSMenuItemRespectAlignment">YES</bool> + <object class="NSMenu" key="NSMenu" id="28667448"> + <string key="NSTitle">OtherViews</string> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="474302340"/> + <object class="NSMenuItem" id="726637834"> + <reference key="NSMenu" ref="28667448"/> + <string key="NSTitle">Export Color Scheme…</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> + <reference key="NSTarget" ref="373813305"/> + </object> + <object class="NSMenuItem" id="62630352"> + <reference key="NSMenu" ref="28667448"/> + <string key="NSTitle">Import Color Scheme…</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> + <reference key="NSTarget" ref="373813305"/> + </object> + </object> + <reference key="NSMenuFont" ref="320262838"/> + </object> + <bool key="NSPullDown">YES</bool> + <int key="NSPreferredEdge">1</int> + <bool key="NSUsesItemFromMenu">YES</bool> + <bool key="NSAltersState">YES</bool> + </object> + </object> <object class="NSTextField" id="1018119488"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{407, 75}, {23, 19}}</string> + <string key="NSFrame">{{407, 88}, {23, 19}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="248584789"> @@ -3357,7 +3427,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="304684720"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{269, 77}, {133, 17}}</string> + <string key="NSFrame">{{269, 90}, {133, 17}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="273262177"> @@ -3373,7 +3443,7 @@ AQAAAAA</bytes> <object class="NSStepper" id="161634003"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{437, 73}, {15, 22}}</string> + <string key="NSFrame">{{437, 86}, {15, 22}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSStepperCell" key="NSCell" id="93125704"> @@ -3398,7 +3468,7 @@ AQAAAAA</bytes> <string>NSColor pasteboard type</string> </object> </object> - <string key="NSFrame">{{204, 219}, {44, 23}}</string> + <string key="NSFrame">{{204, 232}, {44, 23}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <bool key="NSIsBordered">YES</bool> @@ -3417,7 +3487,7 @@ AQAAAAA</bytes> <string>NSColor pasteboard type</string> </object> </object> - <string key="NSFrame">{{204, 248}, {44, 23}}</string> + <string key="NSFrame">{{204, 261}, {44, 23}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <bool key="NSIsBordered">YES</bool> @@ -3436,7 +3506,7 @@ AQAAAAA</bytes> <string>NSColor pasteboard type</string> </object> </object> - <string key="NSFrame">{{204, 161}, {44, 23}}</string> + <string key="NSFrame">{{204, 174}, {44, 23}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <bool key="NSIsBordered">YES</bool> @@ -3455,7 +3525,7 @@ AQAAAAA</bytes> <string>NSColor pasteboard type</string> </object> </object> - <string key="NSFrame">{{204, 132}, {44, 23}}</string> + <string key="NSFrame">{{204, 145}, {44, 23}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <bool key="NSIsBordered">YES</bool> @@ -3474,7 +3544,7 @@ AQAAAAA</bytes> <string>NSColor pasteboard type</string> </object> </object> - <string key="NSFrame">{{204, 306}, {44, 23}}</string> + <string key="NSFrame">{{204, 319}, {44, 23}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <bool key="NSIsBordered">YES</bool> @@ -3493,7 +3563,7 @@ AQAAAAA</bytes> <string>NSColor pasteboard type</string> </object> </object> - <string key="NSFrame">{{204, 190}, {44, 23}}</string> + <string key="NSFrame">{{204, 203}, {44, 23}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <bool key="NSIsBordered">YES</bool> @@ -3512,7 +3582,7 @@ AQAAAAA</bytes> <string>NSColor pasteboard type</string> </object> </object> - <string key="NSFrame">{{204, 103}, {44, 23}}</string> + <string key="NSFrame">{{204, 116}, {44, 23}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <bool key="NSIsBordered">YES</bool> @@ -3521,6 +3591,41 @@ AQAAAAA</bytes> <bytes key="NSRGB">MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA</bytes> </object> </object> + <object class="NSColorWell" id="454916588"> + <reference key="NSNextResponder" ref="1033452264"/> + <int key="NSvFlags">268</int> + <object class="NSMutableSet" key="NSDragTypes"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="set.sortedObjects"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>NSColor pasteboard type</string> + </object> + </object> + <string key="NSFrame">{{204, 58}, {44, 23}}</string> + <reference key="NSSuperview" ref="1033452264"/> + <bool key="NSEnabled">YES</bool> + <bool key="NSIsBordered">YES</bool> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">1</int> + <bytes key="NSRGB">MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA</bytes> + </object> + </object> + <object class="NSTextField" id="556464668"> + <reference key="NSNextResponder" ref="1033452264"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{17, 62}, {181, 17}}</string> + <reference key="NSSuperview" ref="1033452264"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="159666212"> + <int key="NSCellFlags">68288064</int> + <int key="NSCellFlags2">71304192</int> + <string key="NSContents">Selection:</string> + <reference key="NSSupport" ref="320262838"/> + <reference key="NSControlView" ref="556464668"/> + <reference key="NSBackgroundColor" ref="700609571"/> + <reference key="NSTextColor" ref="1035618107"/> + </object> + </object> <object class="NSColorWell" id="775043265"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> @@ -3531,7 +3636,7 @@ AQAAAAA</bytes> <string>NSColor pasteboard type</string> </object> </object> - <string key="NSFrame">{{204, 74}, {44, 23}}</string> + <string key="NSFrame">{{204, 87}, {44, 23}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <bool key="NSIsBordered">YES</bool> @@ -3550,7 +3655,7 @@ AQAAAAA</bytes> <string>NSColor pasteboard type</string> </object> </object> - <string key="NSFrame">{{204, 335}, {44, 23}}</string> + <string key="NSFrame">{{204, 348}, {44, 23}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <bool key="NSIsBordered">YES</bool> @@ -3569,7 +3674,7 @@ AQAAAAA</bytes> <string>NSColor pasteboard type</string> </object> </object> - <string key="NSFrame">{{204, 277}, {44, 23}}</string> + <string key="NSFrame">{{204, 290}, {44, 23}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSIsBordered">YES</bool> <object class="NSColor" key="NSColor"> @@ -3580,7 +3685,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="99482303"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 222}, {182, 17}}</string> + <string key="NSFrame">{{17, 235}, {182, 17}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="465390474"> @@ -3596,7 +3701,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="568872772"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 193}, {182, 17}}</string> + <string key="NSFrame">{{17, 206}, {182, 17}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="629129203"> @@ -3612,7 +3717,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="246467941"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 251}, {182, 17}}</string> + <string key="NSFrame">{{17, 264}, {182, 17}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="841770398"> @@ -3628,7 +3733,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="481169742"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 106}, {182, 17}}</string> + <string key="NSFrame">{{17, 119}, {182, 17}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="837982163"> @@ -3644,7 +3749,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="923591695"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 78}, {181, 17}}</string> + <string key="NSFrame">{{17, 91}, {181, 17}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="554509386"> @@ -3660,7 +3765,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="8892598"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 164}, {182, 17}}</string> + <string key="NSFrame">{{17, 177}, {182, 17}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="728610506"> @@ -3676,7 +3781,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="55746852"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 338}, {182, 17}}</string> + <string key="NSFrame">{{17, 351}, {182, 17}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="693342907"> @@ -3692,7 +3797,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="496117397"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 135}, {182, 17}}</string> + <string key="NSFrame">{{17, 148}, {182, 17}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="336899348"> @@ -3708,7 +3813,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="477643899"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 309}, {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="896659768"> @@ -3724,7 +3829,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="676806550"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 377}, {182, 17}}</string> + <string key="NSFrame">{{17, 390}, {182, 17}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="10706281"> @@ -3740,7 +3845,7 @@ AQAAAAA</bytes> <object class="NSButton" id="462361579"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{69, 32}, {185, 32}}</string> + <string key="NSFrame">{{69, 14}, {185, 32}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="603963569"> @@ -3760,7 +3865,7 @@ AQAAAAA</bytes> <object class="NSButton" id="742042283"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{433, 367}, {133, 32}}</string> + <string key="NSFrame">{{433, 380}, {133, 32}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="345790946"> @@ -3780,7 +3885,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="751188139"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{204, 375}, {207, 19}}</string> + <string key="NSFrame">{{204, 388}, {207, 19}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="66452133"> @@ -3797,7 +3902,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="34959322"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 280}, {182, 17}}</string> + <string key="NSFrame">{{17, 293}, {182, 17}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="632150824"> @@ -3813,7 +3918,7 @@ AQAAAAA</bytes> <object class="NSButton" id="7445657"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{270, 337}, {292, 18}}</string> + <string key="NSFrame">{{270, 350}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="823431848"> @@ -3835,7 +3940,7 @@ AQAAAAA</bytes> <object class="NSButton" id="571822117"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{270, 308}, {292, 18}}</string> + <string key="NSFrame">{{270, 321}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="743257684"> @@ -3857,7 +3962,7 @@ AQAAAAA</bytes> <object class="NSButton" id="1030846368"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{270, 250}, {292, 18}}</string> + <string key="NSFrame">{{270, 263}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="231642073"> @@ -3879,7 +3984,7 @@ AQAAAAA</bytes> <object class="NSButton" id="397485802"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{270, 279}, {292, 18}}</string> + <string key="NSFrame">{{270, 292}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="491730308"> @@ -3901,7 +4006,7 @@ AQAAAAA</bytes> <object class="NSButton" id="787536920"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{270, 193}, {292, 18}}</string> + <string key="NSFrame">{{270, 206}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="496801621"> @@ -3923,7 +4028,7 @@ AQAAAAA</bytes> <object class="NSButton" id="782193237"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{270, 106}, {292, 18}}</string> + <string key="NSFrame">{{270, 119}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="131748905"> @@ -3945,7 +4050,7 @@ AQAAAAA</bytes> <object class="NSButton" id="827082642"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{270, 164}, {292, 18}}</string> + <string key="NSFrame">{{270, 177}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="92164221"> @@ -3967,7 +4072,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="184945490"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{370, 139}, {29, 19}}</string> + <string key="NSFrame">{{370, 152}, {29, 19}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="409964321"> @@ -4040,7 +4145,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="892250776"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{269, 141}, {96, 14}}</string> + <string key="NSFrame">{{269, 154}, {96, 14}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="1060023867"> @@ -4056,7 +4161,7 @@ AQAAAAA</bytes> <object class="NSStepper" id="107658761"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{405, 137}, {15, 22}}</string> + <string key="NSFrame">{{405, 150}, {15, 22}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSStepperCell" key="NSCell" id="171005061"> @@ -4074,7 +4179,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="1009372112"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{423, 141}, {140, 14}}</string> + <string key="NSFrame">{{423, 154}, {140, 14}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="201150384"> @@ -4090,7 +4195,7 @@ AQAAAAA</bytes> <object class="NSButton" id="774563613"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">-2147483380</int> - <string key="NSFrame">{{270, 44}, {292, 18}}</string> + <string key="NSFrame">{{270, 57}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="420702000"> @@ -4112,7 +4217,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="16021182"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{370, 225}, {29, 19}}</string> + <string key="NSFrame">{{370, 238}, {29, 19}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="992523117"> @@ -4185,7 +4290,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="140155660"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{269, 227}, {96, 14}}</string> + <string key="NSFrame">{{269, 240}, {96, 14}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="499174965"> @@ -4201,7 +4306,7 @@ AQAAAAA</bytes> <object class="NSStepper" id="682694750"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{405, 223}, {15, 22}}</string> + <string key="NSFrame">{{405, 236}, {15, 22}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSStepperCell" key="NSCell" id="266600395"> @@ -4219,7 +4324,7 @@ AQAAAAA</bytes> <object class="NSTextField" id="659498064"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{423, 227}, {140, 14}}</string> + <string key="NSFrame">{{423, 240}, {140, 14}}</string> <reference key="NSSuperview" ref="1033452264"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="516695546"> @@ -4235,7 +4340,7 @@ AQAAAAA</bytes> <object class="NSBox" id="863604695"> <reference key="NSNextResponder" ref="1033452264"/> <int key="NSvFlags">12</int> - <string key="NSFrame">{{204, 364}, {356, 5}}</string> + <string key="NSFrame">{{204, 377}, {356, 5}}</string> <reference key="NSSuperview" ref="1033452264"/> <string key="NSOffsets">{0, 0}</string> <object class="NSTextFieldCell" key="NSTitleCell"> @@ -4255,10 +4360,15 @@ AQAAAAA</bytes> <bool key="NSTransparent">NO</bool> </object> </object> - <string key="NSFrameSize">{580, 415}</string> + <string key="NSFrameSize">{580, 428}</string> + <reference key="NSSuperview"/> <string key="NSClassName">NSView</string> </object> <object class="NSUserDefaultsController" id="151174232"> + <object class="NSMutableArray" key="NSDeclaredKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>CustomQueryEditorSelectionColor</string> + </object> <bool key="NSSharedInstance">YES</bool> </object> <object class="NSArrayController" id="937123943"> @@ -6661,6 +6771,42 @@ AQAAAAA</bytes> </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="IBBindingConnection" key="connection"> + <string key="label">value: values.CustomQueryEditorSelectionColor</string> + <reference key="source" ref="454916588"/> + <reference key="destination" ref="151174232"/> + <object class="NSNibBindingConnector" key="connector"> + <reference key="NSSource" ref="454916588"/> + <reference key="NSDestination" ref="151174232"/> + <string key="NSLabel">value: values.CustomQueryEditorSelectionColor</string> + <string key="NSBinding">value</string> + <string key="NSKeyPath">values.CustomQueryEditorSelectionColor</string> + <object class="NSDictionary" key="NSOptions"> + <string key="NS.key.0">NSValueTransformerName</string> + <string key="NS.object.0">NSUnarchiveFromData</string> + </object> + <int key="NSNibBindingConnectorVersion">2</int> + </object> + </object> + <int key="connectionID">1681</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -7624,6 +7770,9 @@ AQAAAAA</bytes> <reference ref="774563613"/> <reference ref="782193237"/> <reference ref="742042283"/> + <reference ref="748242000"/> + <reference ref="556464668"/> + <reference ref="454916588"/> </object> <reference key="parent" ref="0"/> <string key="objectName">Editor</string> @@ -9436,6 +9585,69 @@ AQAAAAA</bytes> <reference key="object" ref="512106570"/> <reference key="parent" ref="982657201"/> </object> + <object class="IBObjectRecord"> + <int key="objectID">1669</int> + <reference key="object" ref="748242000"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="373813305"/> + </object> + <reference key="parent" ref="1033452264"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1670</int> + <reference key="object" ref="373813305"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="28667448"/> + </object> + <reference key="parent" ref="748242000"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1671</int> + <reference key="object" ref="28667448"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="474302340"/> + <reference ref="726637834"/> + <reference ref="62630352"/> + </object> + <reference key="parent" ref="373813305"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1672</int> + <reference key="object" ref="474302340"/> + <reference key="parent" ref="28667448"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1673</int> + <reference key="object" ref="726637834"/> + <reference key="parent" ref="28667448"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1674</int> + <reference key="object" ref="62630352"/> + <reference key="parent" ref="28667448"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1677</int> + <reference key="object" ref="556464668"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="159666212"/> + </object> + <reference key="parent" ref="1033452264"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1678</int> + <reference key="object" ref="454916588"/> + <reference key="parent" ref="1033452264"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1679</int> + <reference key="object" ref="159666212"/> + <reference key="parent" ref="556464668"/> + </object> </object> </object> <object class="NSMutableDictionary" key="flattenedProperties"> @@ -9702,6 +9914,18 @@ AQAAAAA</bytes> <string>1636.IBPluginDependency</string> <string>1639.IBPluginDependency</string> <string>1640.IBPluginDependency</string> + <string>1669.IBAttributePlaceholdersKey</string> + <string>1669.IBPluginDependency</string> + <string>1670.IBPluginDependency</string> + <string>1671.IBEditorWindowLastContentRect</string> + <string>1671.IBPluginDependency</string> + <string>1672.IBPluginDependency</string> + <string>1673.IBAttributePlaceholdersKey</string> + <string>1673.IBPluginDependency</string> + <string>1674.IBPluginDependency</string> + <string>1677.IBPluginDependency</string> + <string>1678.IBPluginDependency</string> + <string>1679.IBPluginDependency</string> <string>17.IBEditorWindowLastContentRect</string> <string>17.IBPluginDependency</string> <string>17.IBUserGuides</string> @@ -10233,6 +10457,31 @@ AQAAAAA</bytes> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <object class="NSMutableDictionary"> + <string key="NS.key.0">ToolTip</string> + <object class="IBToolTipAttribute" key="NS.object.0"> + <string key="name">ToolTip</string> + <reference key="object" ref="748242000"/> + <string key="toolTip">Export/Import Color Scheme</string> + </object> + </object> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>{{214, 248}, {184, 71}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <object class="NSMutableDictionary"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference key="dict.sortedKeys" ref="0"/> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + </object> + <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>{{194, 257}, {580, 300}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <object class="NSMutableArray"> @@ -10523,7 +10772,7 @@ AQAAAAA</bytes> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="YES"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{194, 185}, {580, 415}}</string> + <string>{{1328, 433}, {580, 428}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <object class="NSMutableArray"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -10584,7 +10833,7 @@ AQAAAAA</bytes> </object> </object> <nil key="sourceID"/> - <int key="maxID">1642</int> + <int key="maxID">1681</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -11084,6 +11333,386 @@ AQAAAAA</bytes> </object> </object> <object class="IBPartialClassDescription"> + <string key="className">SPPreferenceController</string> + <string key="superclassName">NSWindowController</string> + <object class="NSMutableDictionary" key="actions"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>addFavorite:</string> + <string>changeFont:</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>exportColorScheme:</string> + <string>favoriteTypeDidChange:</string> + <string>importColorScheme:</string> + <string>makeSelectedFavoriteDefault:</string> + <string>removeFavorite:</string> + <string>reverseFavoritesSortOrder:</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> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + </object> + </object> + <object class="NSMutableDictionary" key="actionInfosByName"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>addFavorite:</string> + <string>changeFont:</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>exportColorScheme:</string> + <string>favoriteTypeDidChange:</string> + <string>importColorScheme:</string> + <string>makeSelectedFavoriteDefault:</string> + <string>removeFavorite:</string> + <string>reverseFavoritesSortOrder:</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="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">changeFont:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">displayAutoUpdatePreferences:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">displayEditorPreferences:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">displayFavoritePreferences:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">displayGeneralPreferences:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">displayNetworkPreferences:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">displayNotificationPreferences:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">displayTablePreferences:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">duplicateFavorite:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">exportColorScheme:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">favoriteTypeDidChange:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">importColorScheme:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">makeSelectedFavoriteDefault:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">removeFavorite:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">reverseFavoritesSortOrder:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">setDefaultColors:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">showCustomQueryFontPanel:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">showGlobalResultTableFontPanel:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">sortFavorites:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">updateDefaultFavorite:</string> + <string key="candidateClassName">id</string> + </object> + </object> + </object> + <object class="NSMutableDictionary" key="outlets"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>autoUpdateView</string> + <string>defaultFavoritePopup</string> + <string>editorFontName</string> + <string>editorView</string> + <string>favoriteHostTextField</string> + <string>favoriteHostTextFieldSSH</string> + <string>favoriteNameTextField</string> + <string>favoriteUserTextField</string> + <string>favoriteUserTextFieldSSH</string> + <string>favoriteUserTextFieldSocket</string> + <string>favoritesController</string> + <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>socketPasswordField</string> + <string>splitViewButtonBar</string> + <string>sshPasswordField</string> + <string>sshSQLPasswordField</string> + <string>standardPasswordField</string> + <string>tableCell</string> + <string>tablesView</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>NSView</string> + <string>NSPopUpButton</string> + <string>NSTextField</string> + <string>NSView</string> + <string>NSTextField</string> + <string>NSTextField</string> + <string>NSTextField</string> + <string>NSTextField</string> + <string>NSTextField</string> + <string>NSTextField</string> + <string>NSArrayController</string> + <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>NSSecureTextField</string> + <string>BWAnchoredButtonBar</string> + <string>NSSecureTextField</string> + <string>NSSecureTextField</string> + <string>NSSecureTextField</string> + <string>id</string> + <string>NSView</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>defaultFavoritePopup</string> + <string>editorFontName</string> + <string>editorView</string> + <string>favoriteHostTextField</string> + <string>favoriteHostTextFieldSSH</string> + <string>favoriteNameTextField</string> + <string>favoriteUserTextField</string> + <string>favoriteUserTextFieldSSH</string> + <string>favoriteUserTextFieldSocket</string> + <string>favoritesController</string> + <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>socketPasswordField</string> + <string>splitViewButtonBar</string> + <string>sshPasswordField</string> + <string>sshSQLPasswordField</string> + <string>standardPasswordField</string> + <string>tableCell</string> + <string>tablesView</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">defaultFavoritePopup</string> + <string key="candidateClassName">NSPopUpButton</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">favoriteHostTextField</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">favoriteHostTextFieldSSH</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">favoriteNameTextField</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">favoriteUserTextField</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">favoriteUserTextFieldSSH</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">favoriteUserTextFieldSocket</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">favoritesController</string> + <string key="candidateClassName">NSArrayController</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">favoritesSortByMenuItem</string> + <string key="candidateClassName">NSMenuItem</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">favoritesTabView</string> + <string key="candidateClassName">NSTabView</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">favoritesTableView</string> + <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">socketPasswordField</string> + <string key="candidateClassName">NSSecureTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">splitViewButtonBar</string> + <string key="candidateClassName">BWAnchoredButtonBar</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">sshPasswordField</string> + <string key="candidateClassName">NSSecureTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">sshSQLPasswordField</string> + <string key="candidateClassName">NSSecureTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">standardPasswordField</string> + <string key="candidateClassName">NSSecureTextField</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">tableCell</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">tablesView</string> + <string key="candidateClassName">NSView</string> + </object> + </object> + </object> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBDocumentRelativeSource</string> + <string key="minorKey">../../Source/SPPreferenceController.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">SUUpdater</string> <string key="superclassName">NSObject</string> <object class="NSMutableDictionary" key="actions"> @@ -11931,6 +12560,7 @@ AQAAAAA</bytes> <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>NSActionTemplate</string> + <string>NSAdvanced</string> <string>NSMenuCheckmark</string> <string>NSMenuMixedState</string> <string>NSSwitch</string> @@ -11938,7 +12568,8 @@ AQAAAAA</bytes> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> - <string>{10, 10}</string> + <string>{15, 15}</string> + <string>{32, 32}</string> <string>{9, 8}</string> <string>{7, 2}</string> <string>{15, 15}</string> diff --git a/Resources/Plists/PreferenceDefaults.plist b/Resources/Plists/PreferenceDefaults.plist index 0fc3adc8..3d090f1d 100644 --- a/Resources/Plists/PreferenceDefaults.plist +++ b/Resources/Plists/PreferenceDefaults.plist @@ -74,6 +74,8 @@ <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmg3zv/T6DfO/9PoN87/0+AYY=</data> <key>CustomQueryEditorHighlightQueryColor</key> <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMChARmZmZmgzMzcz+DMzNzP4MzM3M/AYY=</data> + <key>CustomQueryEditorSelectionColor</key> + <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMChARmZmZmg7a1NT+D1tVVPwEBhg==</data> <key>CustomQueryHighlightCurrentQuery</key> <true/> <key>CustomQueryAutoIndent</key> diff --git a/Source/SPColorAdditions.h b/Source/SPColorAdditions.h new file mode 100644 index 00000000..58508f62 --- /dev/null +++ b/Source/SPColorAdditions.h @@ -0,0 +1,34 @@ +// +// $Id$ +// +// SPColorAdditions.h +// sequel-pro +// +// Created by Hans-Jörg Bibiko on August 16, 2010 +// +// 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 <Cocoa/Cocoa.h> + + +@interface NSColor (SPColorAdditions) + ++ (NSColor *)colorWithRGBHexString:(NSString *)hexString ignoreAlpha:(BOOL)ignoreAlpha; ++ (NSColor *)colorWithRGBHexString:(NSString *)hexString; +- (NSString *)rgbHexString; + +@end diff --git a/Source/SPColorAdditions.m b/Source/SPColorAdditions.m new file mode 100644 index 00000000..e2e22c16 --- /dev/null +++ b/Source/SPColorAdditions.m @@ -0,0 +1,93 @@ +// +// $Id$ +// +// SPColorAdditions.m +// sequel-pro +// +// Created by Hans-Jörg Bibiko on August 16, 2010 +// +// 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 "SPColorAdditions.h" + + +@implementation NSColor (SPColorAdditions) + +/* + * Convert self by using the NSCalibratedRGBColorSpace color space in a NSString + * #RRGGBBAA or if the alpha value is zero to #RRGGBB + */ +- (NSString *)rgbHexString +{ + + CGFloat red, green, blue, alpha; + NSString *redHexValue, *greenHexValue, *blueHexValue, *alphaHexValue; + NSColor *aColor = [self colorUsingColorSpaceName:NSCalibratedRGBColorSpace]; + + if(aColor) { + [aColor getRed:&red green:&green blue:&blue alpha:&alpha]; + redHexValue = [NSString stringWithFormat:@"%02X", (NSInteger)(red * 255.0f)]; + greenHexValue = [NSString stringWithFormat:@"%02X", (NSInteger)(green * 255.0f)]; + blueHexValue = [NSString stringWithFormat:@"%02X", (NSInteger)(blue * 255.0f)]; + alphaHexValue = [NSString stringWithFormat:@"%02X", (NSInteger)(alpha * 255.0f)]; + if([alphaHexValue isEqualToString:@"FF"]) alphaHexValue = @""; + return [NSString stringWithFormat:@"#%@%@%@%@", redHexValue, greenHexValue, blueHexValue, alphaHexValue]; + } + + return @""; + +} + ++ (NSColor *)colorWithRGBHexString:(NSString *)hexString +{ + return [self colorWithRGBHexString:hexString ignoreAlpha:NO]; +} + ++ (NSColor *)colorWithRGBHexString:(NSString *)hexString ignoreAlpha:(BOOL)ignoreAlpha +{ + NSCharacterSet *hexCharSet = [NSCharacterSet characterSetWithCharactersInString:@"1234567890abcdefABCDEF"]; + NSString *initHexString = ( [hexString hasPrefix:@"#"] ) ? [hexString substringFromIndex:1] : hexString; + if(ignoreAlpha && [initHexString length] == 8) + initHexString = [initHexString substringToIndex:6]; + NSScanner *scanner = [NSScanner scannerWithString:initHexString]; + NSString *code = nil; + + [scanner scanCharactersFromSet:hexCharSet intoString:&code]; + + if( [code length] == 8 ) { // decode colors like #ffee33aa + NSUInteger color = 0; + scanner = [NSScanner scannerWithString:code]; + if( ! [scanner scanHexInt:&color] ) return nil; + return [self colorWithCalibratedRed:( ( ( color >> 24 ) & 0xff ) / 255. ) green:( ( ( color >> 16 ) & 0xff ) / 255. ) blue:( ( ( color >> 8) & 0xff ) / 255. ) alpha:( ( color & 0xff ) / 255. )]; + } + else if( [code length] == 6 ) { // decode colors like #ffee33 + NSUInteger color = 0; + scanner = [NSScanner scannerWithString:code]; + if( ! [scanner scanHexInt:&color] ) return nil; + return [self colorWithCalibratedRed:( ( ( color >> 16 ) & 0xff ) / 255. ) green:( ( ( color >> 8 ) & 0xff ) / 255. ) blue:( ( color & 0xff ) / 255. ) alpha:1.]; + } + else if( [code length] == 3 ) { // decode short-hand colors like #fe3 + NSUInteger color = 0; + scanner = [NSScanner scannerWithString:code]; + if( ! [scanner scanHexInt:&color] ) return nil; + return [self colorWithCalibratedRed:( ( ( ( ( color >> 8 ) & 0xf ) << 4 ) | ( ( color >> 8 ) & 0xf ) ) / 255. ) green:( ( ( ( ( color >> 4 ) & 0xf ) << 4 ) | ( ( color >> 4 ) & 0xf ) ) / 255. ) blue:( ( ( ( color & 0xf ) << 4 ) | ( color & 0xf ) ) / 255. ) alpha:1.]; + } + + return nil; +} + +@end diff --git a/Source/SPConstants.h b/Source/SPConstants.h index 89f35361..58630aa6 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -222,6 +222,7 @@ extern NSString *SPQueryFavortiesPasteboardDragType; extern NSString *SPFileExtensionDefault; extern NSString *SPFileExtensionSQL; extern NSString *SPBundleFileExtension; +extern NSString *SPColorThemeFileExtension; // Filenames extern NSString *SPHTMLPrintTemplate; @@ -284,6 +285,7 @@ extern NSString *SPCustomQueryEditorQuoteColor; extern NSString *SPCustomQueryEditorBacktickColor; extern NSString *SPCustomQueryEditorVariableColor; extern NSString *SPCustomQueryEditorHighlightQueryColor; +extern NSString *SPCustomQueryEditorSelectionColor; extern NSString *SPCustomQueryAutoIndent; extern NSString *SPCustomQueryAutoPairCharacters; extern NSString *SPCustomQueryAutoUppercaseKeywords; diff --git a/Source/SPConstants.m b/Source/SPConstants.m index cb5ea82f..f9865eb6 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -46,6 +46,7 @@ NSString *SPContentFilterPasteboardDragType = @"SPContentFilterPasteboard"; NSString *SPFileExtensionDefault = @"spf"; NSString *SPBundleFileExtension = @"spfs"; NSString *SPFileExtensionSQL = @"sql"; +NSString *SPColorThemeFileExtension = @"spTheme"; // Filenames NSString *SPHTMLPrintTemplate = @"sequel-pro-print-template"; @@ -107,6 +108,7 @@ NSString *SPCustomQueryEditorQuoteColor = @"CustomQueryEditorQuoteColor NSString *SPCustomQueryEditorBacktickColor = @"CustomQueryEditorBacktickColor"; NSString *SPCustomQueryEditorVariableColor = @"CustomQueryEditorVariableColor"; NSString *SPCustomQueryEditorHighlightQueryColor = @"CustomQueryEditorHighlightQueryColor"; +NSString *SPCustomQueryEditorSelectionColor = @"CustomQueryEditorSelectionColor"; NSString *SPCustomQueryAutoIndent = @"CustomQueryAutoIndent"; NSString *SPCustomQueryAutoPairCharacters = @"CustomQueryAutoPairCharacters"; NSString *SPCustomQueryAutoUppercaseKeywords = @"CustomQueryAutoUppercaseKeywords"; diff --git a/Source/SPPreferenceController.h b/Source/SPPreferenceController.h index cf9d2cc1..d5e22fd5 100644 --- a/Source/SPPreferenceController.h +++ b/Source/SPPreferenceController.h @@ -102,6 +102,9 @@ - (IBAction)sortFavorites:(id)sender; - (IBAction)reverseFavoritesSortOrder:(id)sender; - (IBAction)makeSelectedFavoriteDefault:(id)sender; +- (IBAction)exportColorScheme:(id)sender; +- (IBAction)importColorScheme:(id)sender; + // Toolbar item IBAction methods - (IBAction)displayGeneralPreferences:(id)sender; diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index 81fa4af8..e1c77c20 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -29,6 +29,7 @@ #import "SPKeychain.h" #import "SPDatabaseDocument.h" #import "SPConnectionController.h" +#import "SPColorAdditions.h" @interface SPPreferenceController (PrivateAPI) @@ -500,6 +501,43 @@ [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 +{ + 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"]; + +} + #pragma mark - #pragma mark Toolbar item IBAction methods @@ -1220,6 +1258,7 @@ [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]; @@ -1285,7 +1324,229 @@ return YES; } +/** + * Save panel did end method. + */ +- (void)panelDidEnd:(NSSavePanel *)panel returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo +{ + + if([contextInfo isEqualToString:@"exportColorScheme"]) { + if (returnCode == NSOKButton) { + + // 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:[panel filename] options:NSAtomicWrite error:&error]; + if (error) [[NSAlert alertWithError:error] runModal]; + + } + } + else if([contextInfo isEqualToString:@"importColorScheme"]) { + if (returnCode == NSOKButton) { + NSString *filename = [[panel filenames] objectAtIndex:0]; + 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]; + return; + } + + 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]; + + } 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; + + } + } + } +} #pragma mark - /** diff --git a/Source/SPTextView.m b/Source/SPTextView.m index a8ba29c8..9501992a 100644 --- a/Source/SPTextView.m +++ b/Source/SPTextView.m @@ -168,11 +168,14 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) [self setNumericColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorNumericColor]]]; [self setVariableColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorVariableColor]]]; [self setOtherTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]]]; - [self setTextColor:[self otherTextColor]]; - [self setInsertionPointColor:[self otherTextColor]]; + [self setTextColor:otherTextColor]; + [self setInsertionPointColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorCaretColor]]]; [self setShouldHiliteQuery:[prefs boolForKey:SPCustomQueryHighlightCurrentQuery]]; + [self setSelectedTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSelectionColor]], NSBackgroundColorAttributeName, nil]]; // Register observers for the when editor background colors preference changes + [prefs addObserver:self forKeyPath:SPCustomQueryEditorSelectionColor options:NSKeyValueObservingOptionNew context:NULL]; + [prefs addObserver:self forKeyPath:SPCustomQueryEditorCaretColor options:NSKeyValueObservingOptionNew context:NULL]; [prefs addObserver:self forKeyPath:SPCustomQueryEditorFont options:NSKeyValueObservingOptionNew context:NULL]; [prefs addObserver:self forKeyPath:SPCustomQueryEditorBackgroundColor options:NSKeyValueObservingOptionNew context:NULL]; [prefs addObserver:self forKeyPath:SPCustomQueryEditorHighlightQueryColor options:NSKeyValueObservingOptionNew context:NULL]; @@ -209,6 +212,12 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) } else if ([keyPath isEqualToString:SPCustomQueryEditorHighlightQueryColor]) { [self setQueryHiliteColor:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]]; [self setNeedsDisplay:YES]; + } else if ([keyPath isEqualToString:SPCustomQueryEditorCaretColor]) { + [self setInsertionPointColor:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]]; + [self setNeedsDisplay:YES]; + } else if ([keyPath isEqualToString:SPCustomQueryEditorSelectionColor]) { + [self setSelectedTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]], NSBackgroundColorAttributeName, nil]]; + [self setNeedsDisplay:YES]; } else if ([keyPath isEqualToString:SPCustomQueryHighlightCurrentQuery]) { [self setShouldHiliteQuery:[[change objectForKey:NSKeyValueChangeNewKey] boolValue]]; [self setNeedsDisplay:YES]; @@ -2743,7 +2752,7 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) inTextContainer: [self textContainer] rectCount: &rectCount ]; [[self queryHiliteColor] setFill]; - NSRectFillList(queryRects, rectCount); + NSRectFillListUsingOperation(queryRects, rectCount, NSCompositeSourceOver); } // Highlight snippets coming from the Query Favorite text macro diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj index 79980eb9..8b6c7445 100644 --- a/sequel-pro.xcodeproj/project.pbxproj +++ b/sequel-pro.xcodeproj/project.pbxproj @@ -353,6 +353,7 @@ BC675A17107203BA00C5ACD4 /* ContentFilterManager.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC675A15107203BA00C5ACD4 /* ContentFilterManager.xib */; }; BC6D709D120C4C97008027B5 /* SPEditorTokens.h in Headers */ = {isa = PBXBuildFile; fileRef = 179F15040F7C433C00579954 /* SPEditorTokens.h */; }; BC6D709E120C4C9F008027B5 /* SPEditorTokens.l in Sources */ = {isa = PBXBuildFile; fileRef = 179F15050F7C433C00579954 /* SPEditorTokens.l */; }; + BC85F5D012193B7D00E255B5 /* SPColorAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = BC85F5CF12193B7D00E255B5 /* SPColorAdditions.m */; }; BC8B0DAF104004F900FC02EC /* EncodingPopupView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC8B0DAD104004F900FC02EC /* EncodingPopupView.xib */; }; BC8C8532100E0A8000D7A129 /* SPTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8C8531100E0A8000D7A129 /* SPTableView.m */; }; BC93FBBD11514ADE005F1D9F /* Navigator.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC93FBBB11514ADE005F1D9F /* Navigator.xib */; }; @@ -985,6 +986,8 @@ BC675A121072039C00C5ACD4 /* SPContentFilterManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPContentFilterManager.h; sourceTree = "<group>"; }; BC675A131072039C00C5ACD4 /* SPContentFilterManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPContentFilterManager.m; sourceTree = "<group>"; }; BC675A16107203BA00C5ACD4 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/ContentFilterManager.xib; sourceTree = "<group>"; }; + BC85F5CE12193B7D00E255B5 /* SPColorAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPColorAdditions.h; sourceTree = "<group>"; }; + BC85F5CF12193B7D00E255B5 /* SPColorAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPColorAdditions.m; sourceTree = "<group>"; }; BC8B0DAE104004F900FC02EC /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/EncodingPopupView.xib; sourceTree = "<group>"; }; BC8C8530100E0A8000D7A129 /* SPTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPTableView.h; sourceTree = "<group>"; }; BC8C8531100E0A8000D7A129 /* SPTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPTableView.m; sourceTree = "<group>"; }; @@ -2130,6 +2133,8 @@ 5870868310FA3E9C00D58E1C /* SPDataStorage.m */, 589582131154F8F400EDCC28 /* SPMainThreadTrampoline.h */, 589582141154F8F400EDCC28 /* SPMainThreadTrampoline.m */, + BC85F5CE12193B7D00E255B5 /* SPColorAdditions.h */, + BC85F5CF12193B7D00E255B5 /* SPColorAdditions.m */, ); name = "Category Additions"; sourceTree = "<group>"; @@ -2743,6 +2748,7 @@ 17AF787B11FC41C00073D043 /* SPExportFilenameUtilities.m in Sources */, 17F90E481210B42700274C98 /* SPExportFile.m in Sources */, 17F90E4B1210B43A00274C98 /* SPExportFileUtilities.m in Sources */, + BC85F5D012193B7D00E255B5 /* SPColorAdditions.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; |