aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-01-23 22:42:32 +0000
committerstuconnolly <stuart02@gmail.com>2012-01-23 22:42:32 +0000
commit532276bfa656b18bb5df76404bca3545334985b7 (patch)
treef4746ca75a1c9b26deb6eaef68d2002738cb7ca7 /Source
parentb31bb2c4981d0a44119c43eac7525233a7c3b0e3 (diff)
downloadsequelpro-532276bfa656b18bb5df76404bca3545334985b7.tar.gz
sequelpro-532276bfa656b18bb5df76404bca3545334985b7.tar.bz2
sequelpro-532276bfa656b18bb5df76404bca3545334985b7.zip
Fix the default favorite not being selected properly.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPGeneralPreferencePane.h1
-rw-r--r--Source/SPGeneralPreferencePane.m11
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