From 2f3b3c880c0ecde2b6c7500826c644ed1403e8f1 Mon Sep 17 00:00:00 2001 From: vspader Date: Thu, 5 Jul 2007 01:16:25 +0000 Subject: [PATCH] Added preferences patch from alex rauchfuss --- Preferences/SS_PrefsController.m | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Preferences/SS_PrefsController.m b/Preferences/SS_PrefsController.m index 370c880af..831233a1f 100644 --- a/Preferences/SS_PrefsController.m +++ b/Preferences/SS_PrefsController.m @@ -61,7 +61,8 @@ // Designated initializer - (id)initWithPanesSearchPath:(NSString*)path bundleExtension:(NSString *)ext { - if (self = [super init]) { + if (self = [super init]) + { [self setDebug:NO]; preferencePanes = [[NSMutableDictionary alloc] init]; panesOrder = [[NSMutableArray alloc] init]; @@ -166,7 +167,7 @@ [prefsWindow setReleasedWhenClosed:NO]; [prefsWindow setTitle:@"Preferences"]; // initial default title - + [prefsWindow setShowsToolbarButton: NO]; [prefsWindow center]; [self createPrefsToolbar]; @@ -427,6 +428,7 @@ float ToolbarHeightForWindow(NSWindow *window) } else if (!alwaysShowsToolbar && prefsToolbarItems && ([prefsToolbarItems count] == 1)) { [self debugLog:@"Not showing toolbar in Preferences window because there is only one preference pane loaded. You can override this behaviour using -[setAlwaysShowsToolbar:YES]."]; } + [prefsToolbar setSelectedItemIdentifier: [panesOrder objectAtIndex: 0]]; } @@ -470,6 +472,12 @@ float ToolbarHeightForWindow(NSWindow *window) } +- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar +{ + return panesOrder; +} + + - (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar { return panesOrder;