From bdc31b36fb72f2f6b9eaf13ea3e6df10b3a1a530 Mon Sep 17 00:00:00 2001 From: avenjamin Date: Mon, 18 May 2009 09:03:36 +0000 Subject: Show alert when enabling Growl Notifications to let the user know about changing notifications in System Preferences. --- Source/SPPreferenceController.m | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'Source/SPPreferenceController.m') 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: // -- cgit v1.2.3