diff options
author | avenjamin <avenjamin@gmail.com> | 2009-05-18 09:03:36 +0000 |
---|---|---|
committer | avenjamin <avenjamin@gmail.com> | 2009-05-18 09:03:36 +0000 |
commit | bdc31b36fb72f2f6b9eaf13ea3e6df10b3a1a530 (patch) | |
tree | 77eb15238511ab45458083eb79aae05b292ae629 /Source | |
parent | 60499d15b77daafc2513fa6372774193ceb6eed4 (diff) | |
download | sequelpro-bdc31b36fb72f2f6b9eaf13ea3e6df10b3a1a530.tar.gz sequelpro-bdc31b36fb72f2f6b9eaf13ea3e6df10b3a1a530.tar.bz2 sequelpro-bdc31b36fb72f2f6b9eaf13ea3e6df10b3a1a530.zip |
Show alert when enabling Growl Notifications to let the user know about changing notifications in System Preferences.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPPreferenceController.m | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index de17860c..cf4e0d18 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -708,6 +708,28 @@ #pragma mark - #pragma mark Other + +- (void)setGrowlEnabled:(BOOL)value +{ + if (value) { + NSRunInformationalAlertPanel( + NSLocalizedString(@"growl_prefs_title", "Title for Growl Notifications Alert Dialog"), + NSLocalizedString(@"growl_prefs_msg", @"Message for Growl Notifications Alert Dialog"), + nil, + nil, + nil + ); + } + + [prefs setBool:[NSNumber numberWithBool:value] forKey:@"GrowlEnabled"]; +} + +- (BOOL)growlEnabled +{ + return [prefs boolForKey:@"GrowlEnabled"]; +} + + // ------------------------------------------------------------------------------- // updateDefaultFavoritePopup: // |