diff options
-rw-r--r-- | Interfaces/English.lproj/Preferences.xib | 183 | ||||
-rw-r--r-- | Source/SPGeneralPreferencePane.h | 2 | ||||
-rw-r--r-- | Source/SPGeneralPreferencePane.m | 80 |
3 files changed, 142 insertions, 123 deletions
diff --git a/Interfaces/English.lproj/Preferences.xib b/Interfaces/English.lproj/Preferences.xib index 871bf8a9..5180d95e 100644 --- a/Interfaces/English.lproj/Preferences.xib +++ b/Interfaces/English.lproj/Preferences.xib @@ -21,6 +21,7 @@ </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> + <integer value="571"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -498,7 +499,7 @@ <string key="NSMaxSize">{264, 296}</string> </object> <object class="NSCustomView" id="594324362"> - <nil key="NSNextResponder"/> + <reference key="NSNextResponder"/> <int key="NSvFlags">268</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -909,7 +910,7 @@ <reference key="NSSuperview" ref="594324362"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="406329678"> - <int key="NSCellFlags">-2076049856</int> + <int key="NSCellFlags">71433792</int> <int key="NSCellFlags2">2048</int> <reference key="NSSupport" ref="320262838"/> <reference key="NSControlView" ref="331339372"/> @@ -919,13 +920,24 @@ <string key="NSKeyEquivalent"/> <int key="NSPeriodicDelay">400</int> <int key="NSPeriodicInterval">75</int> - <nil key="NSMenuItem"/> + <object class="NSMenuItem" key="NSMenuItem"> + <bool key="NSIsHidden">YES</bool> + <string key="NSTitle"/> + <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> + <reference key="NSTarget" ref="406329678"/> + </object> <bool key="NSMenuItemRespectAlignment">YES</bool> <object class="NSMenu" key="NSMenu" id="921144430"> <string key="NSTitle">OtherViews</string> <object class="NSMutableArray" key="NSMenuItems"> <bool key="EncodedWithXMLCoder">YES</bool> </object> + <bool key="NSNoAutoenable">YES</bool> </object> <int key="NSSelectedIndex">-1</int> <int key="NSPreferredEdge">1</int> @@ -1345,6 +1357,7 @@ </object> </object> <string key="NSFrameSize">{580, 280}</string> + <reference key="NSSuperview"/> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="395894064"> @@ -2349,7 +2362,7 @@ AQAAAAA</bytes> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="769132533"> - <reference key="NSNextResponder"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">268</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -2358,7 +2371,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{17, 56}, {204, 17}}</string> <reference key="NSSuperview" ref="769132533"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="1057393276"> <int key="NSCellFlags">67239488</int> @@ -2375,7 +2387,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{224, 19}, {338, 18}}</string> <reference key="NSSuperview" ref="769132533"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="151662644"> <int key="NSCellFlags">-2080244224</int> @@ -2398,7 +2409,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{226, 54}, {50, 22}}</string> <reference key="NSSuperview" ref="769132533"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="170658213"> <int key="NSCellFlags">-1804468671</int> @@ -2461,7 +2471,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{281, 57}, {282, 17}}</string> <reference key="NSSuperview" ref="769132533"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="619604330"> <int key="NSCellFlags">67239488</int> @@ -2478,7 +2487,6 @@ AQAAAAA</bytes> <int key="NSvFlags">12</int> <string key="NSFrame">{{226, 43}, {334, 5}}</string> <reference key="NSSuperview" ref="769132533"/> - <reference key="NSWindow"/> <string key="NSOffsets">{0, 0}</string> <object class="NSTextFieldCell" key="NSTitleCell"> <int key="NSCellFlags">67239424</int> @@ -2498,12 +2506,10 @@ AQAAAAA</bytes> </object> </object> <string key="NSFrameSize">{580, 93}</string> - <reference key="NSSuperview"/> - <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="1033452264"> - <reference key="NSNextResponder"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">268</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -2512,7 +2518,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{437, 251}, {15, 22}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSStepperCell" key="NSCell" id="241334663"> <int key="NSCellFlags">68025888</int> @@ -2531,7 +2536,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{407, 253}, {23, 19}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="546511116"> <int key="NSCellFlags">-1804468671</int> @@ -2601,7 +2605,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{270, 254}, {131, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="1729"> <int key="NSCellFlags">-2080244224</int> @@ -2624,7 +2627,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{144, 21}, {101, 14}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="983858855"> <int key="NSCellFlags">68288064</int> @@ -2641,7 +2643,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{49, 21}, {93, 14}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="133660147"> <int key="NSCellFlags">68288064</int> @@ -2668,7 +2669,6 @@ AQAAAAA</bytes> <int key="NSvFlags">256</int> <string key="NSFrameSize">{220, 249}</string> <reference key="NSSuperview" ref="25515031"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="_NSCornerView" key="NSCornerView"> <nil key="NSNextResponder"/> @@ -2751,7 +2751,6 @@ AQAAAAA</bytes> </object> <string key="NSFrame">{{1, 1}, {220, 249}}</string> <reference key="NSSuperview" ref="288292400"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="953919633"/> <reference key="NSDocView" ref="953919633"/> <reference key="NSBGColor" ref="887465699"/> @@ -2762,7 +2761,6 @@ AQAAAAA</bytes> <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-100, -100}, {15, 102}}</string> <reference key="NSSuperview" ref="288292400"/> - <reference key="NSWindow"/> <reference key="NSTarget" ref="288292400"/> <string key="NSAction">_doScroller:</string> <double key="NSPercent">0.99658703804016113</double> @@ -2772,7 +2770,6 @@ AQAAAAA</bytes> <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-100, -100}, {223, 15}}</string> <reference key="NSSuperview" ref="288292400"/> - <reference key="NSWindow"/> <int key="NSsFlags">1</int> <reference key="NSTarget" ref="288292400"/> <string key="NSAction">_doScroller:</string> @@ -2781,7 +2778,6 @@ AQAAAAA</bytes> </object> <string key="NSFrame">{{20, 47}, {222, 251}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="25515031"/> <int key="NSsFlags">2</int> <reference key="NSVScroller" ref="662661535"/> @@ -2794,7 +2790,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{20, 16}, {24, 24}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="373813305"> <int key="NSCellFlags">71433792</int> @@ -2919,7 +2914,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{407, 19}, {23, 19}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="248584789"> <int key="NSCellFlags">-1804468671</int> @@ -2992,7 +2986,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{269, 21}, {133, 17}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="273262177"> <int key="NSCellFlags">68288064</int> @@ -3009,7 +3002,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{437, 17}, {15, 22}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSStepperCell" key="NSCell" id="93125704"> <int key="NSCellFlags">68025888</int> @@ -3028,7 +3020,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{17, 322}, {182, 17}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="10706281"> <int key="NSCellFlags">68288064</int> @@ -3045,7 +3036,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{433, 313}, {133, 32}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="345790946"> <int key="NSCellFlags">67239424</int> @@ -3066,7 +3056,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{204, 320}, {207, 22}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="66452133"> <int key="NSCellFlags">-2076049856</int> @@ -3084,7 +3073,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{270, 282}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="823431848"> <int key="NSCellFlags">-2080244224</int> @@ -3107,7 +3095,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{270, 227}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="743257684"> <int key="NSCellFlags">-2080244224</int> @@ -3130,7 +3117,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{270, 169}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="231642073"> <int key="NSCellFlags">67239424</int> @@ -3153,7 +3139,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{270, 198}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="491730308"> <int key="NSCellFlags">-2080244224</int> @@ -3176,7 +3161,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{270, 122}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="496801621"> <int key="NSCellFlags">-2080244224</int> @@ -3199,7 +3183,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{270, 45}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="131748905"> <int key="NSCellFlags">67239424</int> @@ -3222,7 +3205,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{270, 94}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="92164221"> <int key="NSCellFlags">67239424</int> @@ -3245,7 +3227,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{370, 69}, {29, 19}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="409964321"> <int key="NSCellFlags">-1538130368</int> @@ -3319,7 +3300,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{269, 71}, {96, 14}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="1060023867"> <int key="NSCellFlags">605158976</int> @@ -3336,7 +3316,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{405, 67}, {15, 22}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSStepperCell" key="NSCell" id="171005061"> <int key="NSCellFlags">604896800</int> @@ -3355,7 +3334,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{423, 71}, {140, 14}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="201150384"> <int key="NSCellFlags">605158976</int> @@ -3372,7 +3350,6 @@ AQAAAAA</bytes> <int key="NSvFlags">-2147483380</int> <string key="NSFrame">{{270, 0}, {292, 18}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="420702000"> <int key="NSCellFlags">-1543373312</int> @@ -3395,7 +3372,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{370, 144}, {29, 19}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="992523117"> <int key="NSCellFlags">-1538130368</int> @@ -3469,7 +3445,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{269, 146}, {96, 14}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="499174965"> <int key="NSCellFlags">605158976</int> @@ -3486,7 +3461,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{405, 142}, {15, 22}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSStepperCell" key="NSCell" id="266600395"> <int key="NSCellFlags">604896800</int> @@ -3505,7 +3479,6 @@ AQAAAAA</bytes> <int key="NSvFlags">268</int> <string key="NSFrame">{{423, 146}, {140, 14}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="516695546"> <int key="NSCellFlags">605158976</int> @@ -3522,7 +3495,6 @@ AQAAAAA</bytes> <int key="NSvFlags">12</int> <string key="NSFrame">{{204, 309}, {356, 5}}</string> <reference key="NSSuperview" ref="1033452264"/> - <reference key="NSWindow"/> <string key="NSOffsets">{0, 0}</string> <object class="NSTextFieldCell" key="NSTitleCell"> <int key="NSCellFlags">67239424</int> @@ -3542,8 +3514,6 @@ AQAAAAA</bytes> </object> </object> <string key="NSFrameSize">{580, 360}</string> - <reference key="NSSuperview"/> - <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="301032184"> @@ -4801,14 +4771,6 @@ AQAAAAA</bytes> <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">defaultFavoritePopup</string> <reference key="source" ref="343720994"/> @@ -5212,6 +5174,14 @@ AQAAAAA</bytes> </object> <int key="connectionID">2214</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">2217</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -7981,7 +7951,7 @@ AQAAAAA</bytes> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{549, 529}, {580, 280}}</string> + <string>{{93, 644}, {580, 280}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <object class="NSMutableArray"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -8210,7 +8180,7 @@ AQAAAAA</bytes> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{646, 556}, {254, 6}}</string> + <string>{{283, 900}, {254, 6}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>{{381, 612}, {175, 53}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -8361,7 +8331,7 @@ AQAAAAA</bytes> </object> </object> <nil key="sourceID"/> - <int key="maxID">2215</int> + <int key="maxID">2217</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -8765,35 +8735,14 @@ AQAAAAA</bytes> </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> + <string key="NS.key.0">defaultFavoritePopup</string> + <string key="NS.object.0">NSPopUpButton</string> </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">defaultFavoritePopup</string> - <string key="candidateClassName">NSPopUpButton</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">favoritesController</string> - <string key="candidateClassName">NSArrayController</string> - </object> + <string key="NS.key.0">defaultFavoritePopup</string> + <object class="IBToOneOutletInfo" key="NS.object.0"> + <string key="name">defaultFavoritePopup</string> + <string key="candidateClassName">NSPopUpButton</string> </object> </object> <object class="IBClassDescriptionSource" key="sourceIdentifier"> @@ -8820,6 +8769,52 @@ AQAAAAA</bytes> <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>changeFont:</string> + <string>displayEditorPreferences:</string> + <string>displayPreferencePane:</string> + <string>displayTablePreferences:</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> + </object> + </object> + <object class="NSMutableDictionary" key="actionInfosByName"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>changeFont:</string> + <string>displayEditorPreferences:</string> + <string>displayPreferencePane:</string> + <string>displayTablePreferences:</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBActionInfo"> + <string key="name">changeFont:</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">displayPreferencePane:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">displayTablePreferences:</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"> @@ -9053,14 +9048,6 @@ AQAAAAA</bytes> </object> </object> <object class="IBPartialClassDescription"> - <string key="className">NSArrayController</string> - <string key="superclassName">NSObjectController</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSArrayController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> <string key="className">NSBox</string> <string key="superclassName">NSView</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> @@ -9527,14 +9514,6 @@ AQAAAAA</bytes> </object> </object> <object class="IBPartialClassDescription"> - <string key="className">NSObjectController</string> - <string key="superclassName">NSController</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSObjectController.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> <string key="className">NSPopUpButton</string> <string key="superclassName">NSButton</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> diff --git a/Source/SPGeneralPreferencePane.h b/Source/SPGeneralPreferencePane.h index 7d14492e..c573b84a 100644 --- a/Source/SPGeneralPreferencePane.h +++ b/Source/SPGeneralPreferencePane.h @@ -34,6 +34,8 @@ */ @interface SPGeneralPreferencePane : SPPreferencePane <SPPreferencePaneProtocol> { + NSImage *folderImage; + IBOutlet NSPopUpButton *defaultFavoritePopup; } diff --git a/Source/SPGeneralPreferencePane.m b/Source/SPGeneralPreferencePane.m index ecc3172a..d8daa229 100644 --- a/Source/SPGeneralPreferencePane.m +++ b/Source/SPGeneralPreferencePane.m @@ -29,22 +29,43 @@ #import "SPFavoriteNode.h" #import "SPGroupNode.h" +static NSString *SPDatabaseImage = @"database-small"; + @interface SPGeneralPreferencePane () -- (NSMenuItem *)_constructMenuItemForNode:(SPTreeNode *)node; +- (NSArray *)_constructMenuItemsForNode:(SPTreeNode *)node atLevel:(NSUInteger)level; @end @implementation SPGeneralPreferencePane #pragma mark - +#pragma mark Initialisation + +- (void)awakeFromNib +{ + // Generic folder image for use in the outline view's groups + folderImage = [[[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGenericFolderIcon)] retain]; + + [folderImage setSize:NSMakeSize(16, 16)]; +} + +#pragma mark - #pragma mark IB action methods /** * Updates the default favorite. */ - (IBAction)updateDefaultFavorite:(id)sender -{ +{ + for (NSMenuItem *item in [defaultFavoritePopup itemArray]) + { + [item setState:NSOffState]; + } + + [sender setState:NSOnState]; + [defaultFavoritePopup setTitle:[sender title]]; + [prefs setBool:([defaultFavoritePopup indexOfSelectedItem] == 0) forKey:SPSelectLastFavoriteUsed]; [prefs setInteger:[sender tag] forKey:SPDefaultFavorite]; @@ -60,18 +81,18 @@ { [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 (SPTreeNode *node in [[[[[SPFavoritesController sharedFavoritesController] favoritesTree] childNodes] objectAtIndex:0] childNodes]) { - NSMenuItem *menuItem = [self _constructMenuItemForNode:node]; - - [[defaultFavoritePopup menu] addItem:menuItem]; + NSArray *items = [self _constructMenuItemsForNode:node atLevel:0]; - [menuItem release]; + for (NSMenuItem *item in items) + { + [[defaultFavoritePopup menu] addItem:item]; + } } // Select the default favorite from prefs @@ -93,40 +114,48 @@ * * @return The menu item */ -- (NSMenuItem *)_constructMenuItemForNode:(SPTreeNode *)node +- (NSArray *)_constructMenuItemsForNode:(SPTreeNode *)node atLevel:(NSUInteger)level { - NSMenuItem *menuItem = nil; + NSMutableArray *items = [NSMutableArray array]; if ([node isGroup]) { + level++; + SPGroupNode *groupNode = (SPGroupNode *)[node representedObject]; - menuItem = [[NSMenuItem alloc] initWithTitle:[groupNode nodeName] action:NULL keyEquivalent:@""]; + NSMenuItem *groupItem = [[NSMenuItem alloc] initWithTitle:[groupNode nodeName] action:NULL keyEquivalent:@""]; - NSMenu *subMenu = [[NSMenu alloc] initWithTitle:[groupNode nodeName]]; + [groupItem setEnabled:NO]; + [groupItem setImage:folderImage]; + + [items addObject:groupItem]; + + [groupItem release]; for (SPTreeNode *childNode in [node childNodes]) { - NSMenuItem *innerItem = [self _constructMenuItemForNode:childNode]; - - [subMenu addItem:innerItem]; - - [innerItem release]; + NSArray *innerItems = [self _constructMenuItemsForNode:childNode atLevel:level]; + + [items addObjectsFromArray:innerItems]; } - - [menuItem setSubmenu:subMenu]; } else { NSDictionary *favorite = [(SPFavoriteNode *)[node representedObject] nodeFavorite]; - menuItem = [[NSMenuItem alloc] initWithTitle:[favorite objectForKey:SPFavoriteNameKey] action:@selector(updateDefaultFavorite:) keyEquivalent:@""]; + NSMenuItem *menuItem = [[NSMenuItem alloc] initWithTitle:[favorite objectForKey:SPFavoriteNameKey] action:@selector(updateDefaultFavorite:) keyEquivalent:@""]; [menuItem setTag:[[favorite objectForKey:SPFavoriteIDKey] integerValue]]; - + [menuItem setImage:[NSImage imageNamed:SPDatabaseImage]]; + [menuItem setIndentationLevel:level]; [menuItem setTarget:self]; + + [items addObject:menuItem]; + + [menuItem release]; } - return menuItem; + return items; } #pragma mark - @@ -162,4 +191,13 @@ return NO; } +#pragma mark - + +- (void)dealloc +{ + [folderImage release], folderImage = nil; + + [super dealloc]; +} + @end |