diff --git a/macosx/PrefsController.m b/macosx/PrefsController.m
index 58800e4dc..15f12e9fc 100644
--- a/macosx/PrefsController.m
+++ b/macosx/PrefsController.m
@@ -61,6 +61,8 @@
- (void) setPrefView: (id) sender;
+- (void) updateGrowlButton;
+
- (void) setKeychainPassword: (const char *) password forService: (const char *) service username: (const char *) username;
@end
@@ -175,19 +177,8 @@
[self setPrefView: nil];
- if ([GrowlApplicationBridge isGrowlRunning])
- {
- [fBuiltInGrowlButton setHidden: YES];
- [fGrowlAppButton setHidden: NO];
-#warning remove NO
- [fGrowlAppButton setEnabled:NO && [GrowlApplicationBridge isGrowlURLSchemeAvailable]];
- }
- else
- {
- [fBuiltInGrowlButton setHidden: NO];
- [fGrowlAppButton setHidden: YES];
- [fBuiltInGrowlButton setState: [fDefaults boolForKey: @"DisplayNotifications"]];
- }
+ //make sure proper notification settings are shown
+ [self updateGrowlButton];
//set download folder
[fFolderPopUp selectItemAtIndex: [fDefaults boolForKey: @"DownloadLocationConstant"] ? DOWNLOAD_FOLDER : DOWNLOAD_TORRENT];
@@ -338,6 +329,12 @@
return [self toolbarAllowedItemIdentifiers: toolbar];
}
+- (void) windowDidBecomeMain: (NSNotification *) notification
+{
+ //this is a good place to see if Growl was quit/launched
+ [self updateGrowlButton];
+}
+
+ (void) restoreWindowWithIdentifier: (NSString *) identifier state: (NSCoder *) state completionHandler: (void (^)(NSWindow *, NSError *)) completionHandler
{
NSWindow * window = [[(Controller *)[NSApp delegate] prefsController] window];
@@ -1453,6 +1450,23 @@
}
}
+- (void) updateGrowlButton
+{
+ if ([GrowlApplicationBridge isGrowlRunning])
+ {
+ [fBuiltInGrowlButton setHidden: YES];
+ [fGrowlAppButton setHidden: NO];
+#warning remove NO
+ [fGrowlAppButton setEnabled:NO && [GrowlApplicationBridge isGrowlURLSchemeAvailable]];
+ }
+ else
+ {
+ [fBuiltInGrowlButton setHidden: NO];
+ [fGrowlAppButton setHidden: YES];
+ [fBuiltInGrowlButton setState: [fDefaults boolForKey: @"DisplayNotifications"]];
+ }
+}
+
- (void) setKeychainPassword: (const char *) password forService: (const char *) service username: (const char *) username
{
SecKeychainItemRef item = NULL;
diff --git a/macosx/en.lproj/PrefsWindow.xib b/macosx/en.lproj/PrefsWindow.xib
index 7837ec596..7696de8b8 100644
--- a/macosx/en.lproj/PrefsWindow.xib
+++ b/macosx/en.lproj/PrefsWindow.xib
@@ -78,7 +78,7 @@
- {{0, 0}, {2560, 1418}}
+ {{0, 0}, {2560, 1440}}
{10000000000000, 10000000000000}
YES
@@ -1810,7 +1810,7 @@
{{363, 259}, {55, 17}}
-
+
YES
-