diff options
author | Abhi Beckert <abhi@Twist-of-Lemon-2.local> | 2015-05-16 08:06:06 +1000 |
---|---|---|
committer | Abhi Beckert <abhi@Twist-of-Lemon-2.local> | 2015-05-16 08:06:06 +1000 |
commit | 57a6f6c73bdaa202164645370d37fcbe5d14a092 (patch) | |
tree | dd30aa6156064f1d4c0e10ea87059625470fc2f9 /Source/SPPreferenceController.m | |
parent | b5e972f4504043dfb9c358e272e93fb59ae2127f (diff) | |
parent | 0f0c43eb74408b6a65a42e2c6fd46f4142ef8e3f (diff) | |
download | sequelpro-57a6f6c73bdaa202164645370d37fcbe5d14a092.tar.gz sequelpro-57a6f6c73bdaa202164645370d37fcbe5d14a092.tar.bz2 sequelpro-57a6f6c73bdaa202164645370d37fcbe5d14a092.zip |
Merge remote-tracking branch 'sequelpro/master'
Diffstat (limited to 'Source/SPPreferenceController.m')
-rw-r--r-- | Source/SPPreferenceController.m | 53 |
1 files changed, 13 insertions, 40 deletions
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index 3a67ae80..fad1d95b 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -68,8 +68,6 @@ { [self _setupToolbar]; - [(SPGeneralPreferencePane *)generalPreferencePane updateDefaultFavoritePopup]; - preferencePanes = [[NSArray alloc] initWithObjects: generalPreferencePane, tablesPreferencePane, @@ -105,40 +103,9 @@ [toolbar setSelectedItemIdentifier:[preferencePane preferencePaneIdentifier]]; - [self _resizeWindowForContentView:[preferencePane preferencePaneView]]; -} - -/** - * Displays the table preferences pane. - */ -- (IBAction)displayTablePreferences:(id)sender -{ - [[self window] setMinSize:NSMakeSize(0, 0)]; - [[self window] setShowsResizeIndicator:[tablesPreferencePane preferencePaneAllowsResizing]]; - - [toolbar setSelectedItemIdentifier:[tablesPreferencePane preferencePaneIdentifier]]; + [preferencePane preferencePaneWillBeShown]; - [(SPTablesPreferencePane *)tablesPreferencePane updateDisplayedTableFontName]; - - [self _resizeWindowForContentView:[tablesPreferencePane preferencePaneView]]; -} - -/** - * Displays the editor preferences pane. - */ -- (IBAction)displayEditorPreferences:(id)sender -{ - [(SPEditorPreferencePane *)editorPreferencePane updateColorSchemeSelectionMenu]; - [(SPEditorPreferencePane *)editorPreferencePane updateDisplayColorThemeName]; - - [[self window] setMinSize:NSMakeSize(0, 0)]; - [[self window] setShowsResizeIndicator:[editorPreferencePane preferencePaneAllowsResizing]]; - - [toolbar setSelectedItemIdentifier:[editorPreferencePane preferencePaneIdentifier]]; - - [(SPEditorPreferencePane *)editorPreferencePane updateDisplayedEditorFontName]; - - [self _resizeWindowForContentView:[editorPreferencePane preferencePaneView]]; + [self _resizeWindowForContentView:[preferencePane preferencePaneView]]; } #pragma mark - @@ -161,14 +128,14 @@ [prefs setObject:[NSArchiver archivedDataWithRootObject:font] forKey:SPGlobalResultTableFont]; - [(SPTablesPreferencePane *)tablesPreferencePane updateDisplayedTableFontName]; + [tablesPreferencePane updateDisplayedTableFontName]; break; case SPPrefFontChangeTargetEditor: font = [[NSFontPanel sharedFontPanel] panelConvertFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]]]; [prefs setObject:[NSArchiver archivedDataWithRootObject:font] forKey:SPCustomQueryEditorFont]; - [(SPEditorPreferencePane *)editorPreferencePane updateDisplayedEditorFontName]; + [editorPreferencePane updateDisplayedEditorFontName]; break; } } @@ -198,7 +165,7 @@ [tablesItem setLabel:[tablesPreferencePane preferencePaneName]]; [tablesItem setImage:[tablesPreferencePane preferencePaneIcon]]; [tablesItem setTarget:self]; - [tablesItem setAction:@selector(displayTablePreferences:)]; + [tablesItem setAction:@selector(displayPreferencePane:)]; // Notification preferences notificationsItem = [[NSToolbarItem alloc] initWithItemIdentifier:[notificationsPreferencePane preferencePaneIdentifier]]; @@ -214,7 +181,7 @@ [editorItem setLabel:[editorPreferencePane preferencePaneName]]; [editorItem setImage:[editorPreferencePane preferencePaneIcon]]; [editorItem setTarget:self]; - [editorItem setAction:@selector(displayEditorPreferences:)]; + [editorItem setAction:@selector(displayPreferencePane:)]; // AutoUpdate preferences autoUpdateItem = [[NSToolbarItem alloc] initWithItemIdentifier:[autoUpdatePreferencePane preferencePaneIdentifier]]; @@ -263,7 +230,13 @@ - (void)dealloc { - [preferencePanes release], preferencePanes = nil; + SPClear(preferencePanes); + SPClear(generalItem); + SPClear(tablesItem); + SPClear(notificationsItem); + SPClear(editorItem); + SPClear(autoUpdateItem); + SPClear(networkItem); [super dealloc]; } |