From 532276bfa656b18bb5df76404bca3545334985b7 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Mon, 23 Jan 2012 22:42:32 +0000 Subject: Fix the default favorite not being selected properly. --- Source/SPGeneralPreferencePane.h | 1 - Source/SPGeneralPreferencePane.m | 11 ++--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Source/SPGeneralPreferencePane.h b/Source/SPGeneralPreferencePane.h index dda76ee9..c573b84a 100644 --- a/Source/SPGeneralPreferencePane.h +++ b/Source/SPGeneralPreferencePane.h @@ -42,6 +42,5 @@ - (IBAction)updateDefaultFavorite:(id)sender; - (void)updateDefaultFavoritePopup; -- (void)updateDefaultFavoritePopupSelection; @end diff --git a/Source/SPGeneralPreferencePane.m b/Source/SPGeneralPreferencePane.m index 4a263be4..f24dec54 100644 --- a/Source/SPGeneralPreferencePane.m +++ b/Source/SPGeneralPreferencePane.m @@ -95,8 +95,8 @@ static NSString *SPDatabaseImage = @"database-small"; } } - // Select the default favorite from prefs - [self updateDefaultFavoritePopupSelection]; + // Select the default favorite from prefs + [defaultFavoritePopup selectItemWithTag:[prefs boolForKey:SPSelectLastFavoriteUsed] ? 0 : [prefs integerForKey:SPDefaultFavorite]]; } #pragma mark - @@ -156,13 +156,6 @@ static NSString *SPDatabaseImage = @"database-small"; return items; } -- (void)updateDefaultFavoritePopupSelection -{ - NSUInteger index = [prefs integerForKey:SPDefaultFavorite]; - - [defaultFavoritePopup selectItemAtIndex:(![prefs boolForKey:SPSelectLastFavoriteUsed] && index > 0 && index < [[defaultFavoritePopup itemArray] count]) ? index + 2 : 0]; -} - #pragma mark - #pragma mark Preference pane protocol methods -- cgit v1.2.3