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.m | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'Source/SPGeneralPreferencePane.m') 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