diff options
author | stuconnolly <stuart02@gmail.com> | 2009-11-05 00:49:35 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2009-11-05 00:49:35 +0000 |
commit | c33a709a935e65e0c54b0c629a19ef0e29a04ed5 (patch) | |
tree | 448e2b134debd0a230ad4ea6eff7497f75d508dc /Source/SPPreferenceController.m | |
parent | 4cc035fd625bc2ee76927cf9e7649af829ce8482 (diff) | |
download | sequelpro-c33a709a935e65e0c54b0c629a19ef0e29a04ed5.tar.gz sequelpro-c33a709a935e65e0c54b0c629a19ef0e29a04ed5.tar.bz2 sequelpro-c33a709a935e65e0c54b0c629a19ef0e29a04ed5.zip |
All users to resize the 'Favorites' preference pane.
Diffstat (limited to 'Source/SPPreferenceController.m')
-rw-r--r-- | Source/SPPreferenceController.m | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index 51211043..3e938ff0 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -435,6 +435,9 @@ // ------------------------------------------------------------------------------- - (IBAction)displayGeneralPreferences:(id)sender { + [[self window] setMinSize:NSMakeSize(0, 0)]; + [[self window] setShowsResizeIndicator:NO]; + [toolbar setSelectedItemIdentifier:PREFERENCE_TOOLBAR_GENERAL]; [self _resizeWindowForContentView:generalView]; } @@ -444,6 +447,9 @@ // ------------------------------------------------------------------------------- - (IBAction)displayTablePreferences:(id)sender { + [[self window] setMinSize:NSMakeSize(0, 0)]; + [[self window] setShowsResizeIndicator:NO]; + [toolbar setSelectedItemIdentifier:PREFERENCE_TOOLBAR_TABLES]; [self _resizeWindowForContentView:tablesView]; } @@ -453,6 +459,9 @@ // ------------------------------------------------------------------------------- - (IBAction)displayEditorPreferences:(id)sender { + [[self window] setMinSize:NSMakeSize(0, 0)]; + [[self window] setShowsResizeIndicator:NO]; + [toolbar setSelectedItemIdentifier:PREFERENCE_TOOLBAR_EDITOR]; NSFont *nf = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]]; [editorFontName setStringValue:[NSString stringWithFormat:@"%@, %.1f pt", [nf displayName], [nf pointSize]]]; @@ -464,16 +473,18 @@ // ------------------------------------------------------------------------------- - (IBAction)displayFavoritePreferences:(id)sender { + // To make the Favorites pane resizable give the window a minimum size and display the resize indicator. + // Notice that we still make all other panes non-resizable by removing the dsiplay of the indicator and + // resetting the minimum size to zero. + [[self window] setMinSize:NSMakeSize(500, 381)]; + [[self window] setShowsResizeIndicator:YES]; + [toolbar setSelectedItemIdentifier:PREFERENCE_TOOLBAR_FAVORITES]; [self _resizeWindowForContentView:favoritesView]; // Set the default favorite popup back to preference if (sender == [defaultFavoritePopup lastItem]) { - if (![prefs boolForKey:SPSelectLastFavoriteUsed]) { - [defaultFavoritePopup selectItemAtIndex:[prefs integerForKey:SPDefaultFavorite]+2]; - } else { - [defaultFavoritePopup selectItemAtIndex:0]; - } + [defaultFavoritePopup selectItemAtIndex:(![prefs boolForKey:SPSelectLastFavoriteUsed]) ? ([prefs integerForKey:SPDefaultFavorite] + 2) : 0]; } } @@ -482,6 +493,9 @@ // ------------------------------------------------------------------------------- - (IBAction)displayNotificationPreferences:(id)sender { + [[self window] setMinSize:NSMakeSize(0, 0)]; + [[self window] setShowsResizeIndicator:NO]; + [toolbar setSelectedItemIdentifier:PREFERENCE_TOOLBAR_NOTIFICATIONS]; [self _resizeWindowForContentView:notificationsView]; } @@ -491,6 +505,9 @@ // ------------------------------------------------------------------------------- - (IBAction)displayAutoUpdatePreferences:(id)sender { + [[self window] setMinSize:NSMakeSize(0, 0)]; + [[self window] setShowsResizeIndicator:NO]; + [toolbar setSelectedItemIdentifier:PREFERENCE_TOOLBAR_AUTOUPDATE]; [self _resizeWindowForContentView:autoUpdateView]; } @@ -500,6 +517,9 @@ // ------------------------------------------------------------------------------- - (IBAction)displayNetworkPreferences:(id)sender { + [[self window] setMinSize:NSMakeSize(0, 0)]; + [[self window] setShowsResizeIndicator:NO]; + [toolbar setSelectedItemIdentifier:PREFERENCE_TOOLBAR_NETWORK]; [self _resizeWindowForContentView:networkView]; } |