Changeset 13449


Ignore:
Timestamp:
Aug 19, 2012, 7:06:52 PM (9 years ago)
Author:
livings124
Message:

When running on 10.8 with Growl not running, show a button in Prefs to open System Preferences.

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/PrefsController.h

    r13337 r13449  
    106106- (IBAction) setBuiltInGrowlEnabled: (id) sender;
    107107- (IBAction) openGrowlApp: (id) sender;
     108- (void) openNotificationSystemPrefs: (id) sender;
    108109
    109110- (void) resetWarnings: (id) sender;
  • trunk/macosx/PrefsController.m

    r13434 r13449  
    752752}
    753753
     754- (void) openNotificationSystemPrefs: (id) sender
     755{
     756    [[NSWorkspace sharedWorkspace] openURL: [NSURL fileURLWithPath:@"/System/Library/PreferencePanes/Notifications.prefPane"]];
     757}
     758
    754759- (void) resetWarnings: (id) sender
    755760{
     
    14571462        [fBuiltInGrowlButton setHidden: YES];
    14581463        [fGrowlAppButton setHidden: NO];
     1464       
    14591465#warning remove NO
    1460         [fGrowlAppButton setEnabled:NO && [GrowlApplicationBridge isGrowlURLSchemeAvailable]];
     1466        [fGrowlAppButton setEnabled: NO && [GrowlApplicationBridge isGrowlURLSchemeAvailable]];
     1467        [fGrowlAppButton setTitle: NSLocalizedString(@"Configure In Growl", "Prefs -> Notifications")];
     1468        [fGrowlAppButton sizeToFit];
     1469       
     1470        [fGrowlAppButton setTarget: self];
     1471        [fGrowlAppButton setAction: @selector(openGrowlApp:)];
     1472    }
     1473    else if ([NSApp isOnMountainLionOrBetter])
     1474    {
     1475        [fBuiltInGrowlButton setHidden: YES];
     1476        [fGrowlAppButton setHidden: NO];
     1477       
     1478        [fGrowlAppButton setEnabled: YES];
     1479        [fGrowlAppButton setTitle: NSLocalizedString(@"Configure In System Preferences", "Prefs -> Notifications")];
     1480        [fGrowlAppButton sizeToFit];
     1481       
     1482        [fGrowlAppButton setTarget: self];
     1483        [fGrowlAppButton setAction: @selector(openNotificationSystemPrefs:)];
    14611484    }
    14621485    else
     
    14681491        [fBuiltInGrowlButton setState: !onMtLion && [fDefaults boolForKey: @"DisplayNotifications"]];
    14691492        [fBuiltInGrowlButton setEnabled: !onMtLion];
     1493       
    14701494    }
    14711495}
Note: See TracChangeset for help on using the changeset viewer.