GrowlMenu: cruft removal, since the default display submenu is no longer needed we can get rid of a lot of stuff, GAB is also no longer needed in the menu extra
authorRudy Richter
Sun Dec 06 13:46:12 2009 -0500 (2009-12-06)
changeset 45692db8a7ee4378
parent 4566 1a956989afca
child 4570 4aa7c658ee1a
child 4650 9672f5d4d6fa
GrowlMenu: cruft removal, since the default display submenu is no longer needed we can get rid of a lot of stuff, GAB is also no longer needed in the menu extra
Growl.xcodeproj/project.pbxproj
StatusItem/Source/GrowlMenu.h
StatusItem/Source/GrowlMenu.m
     1.1 --- a/Growl.xcodeproj/project.pbxproj	Fri Dec 04 23:00:54 2009 -0800
     1.2 +++ b/Growl.xcodeproj/project.pbxproj	Sun Dec 06 13:46:12 2009 -0500
     1.3 @@ -188,7 +188,6 @@
     1.4  		8D202CED0486D31800D8A456 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
     1.5  		932D6BE6094BA0FD00B64D0F /* GrowlShrinkingWindowTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 932D6BE4094BA0FD00B64D0F /* GrowlShrinkingWindowTransition.m */; };
     1.6  		932D6CD7094BB83B00B64D0F /* GrowlScaleWindowTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 932D6CD5094BB83B00B64D0F /* GrowlScaleWindowTransition.m */; };
     1.7 -		934EBCB80931F529002C378F /* GrowlApplicationBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F60EB6078E1D3E00CECA86 /* GrowlApplicationBridge.m */; };
     1.8  		936FAB04074482BF00A7D430 /* RRTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 936FAB02074482BF00A7D430 /* RRTableView.m */; };
     1.9  		937E64320817193800AEC1C6 /* About.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 937E64300817193800AEC1C6 /* About.rtf */; };
    1.10  		938841EA1025EA7C001DF30F /* GHA-Stubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 938841E91025EA7C001DF30F /* GHA-Stubs.m */; };
    1.11 @@ -216,6 +215,7 @@
    1.12  		93BC37C9095A66CD0002B365 /* GrowlNanoPrefs.nib in Resources */ = {isa = PBXBuildFile; fileRef = 93BC37C7095A66CD0002B365 /* GrowlNanoPrefs.nib */; };
    1.13  		93BC3EF4095DE6680002B365 /* GrowlWipeWindowTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 93BC3EF2095DE6680002B365 /* GrowlWipeWindowTransition.m */; };
    1.14  		93BC4057095DEDFF0002B365 /* Nano.growlView in CopyFiles */ = {isa = PBXBuildFile; fileRef = 93BC379E095A662B0002B365 /* Nano.growlView */; };
    1.15 +		93C70A2E10CB66B4005B5B80 /* GrowlPathUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 959DBE4A08127BA4009BB468 /* GrowlPathUtilities.m */; };
    1.16  		93CD929D0B5AF8A8000C39CD /* GrowlRipplingWindowTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 93CD92980B5AF8A1000C39CD /* GrowlRipplingWindowTransition.m */; };
    1.17  		93CD92BB0B5AF8CA000C39CD /* AWRippler.m in Sources */ = {isa = PBXBuildFile; fileRef = 93CD92B90B5AF8CA000C39CD /* AWRippler.m */; };
    1.18  		93CD92E80B5AFAAE000C39CD /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93CD92E70B5AFAAE000C39CD /* QuartzCore.framework */; };
    1.19 @@ -223,11 +223,9 @@
    1.20  		95044BCB08DC7F7900DF5E22 /* CFDictionaryAdditions.c in Sources */ = {isa = PBXBuildFile; fileRef = 95F9767A084A297400915BFE /* CFDictionaryAdditions.c */; };
    1.21  		950568E60812C2960096EC5C /* GrowlLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 950568E40812C2960096EC5C /* GrowlLog.m */; };
    1.22  		950627A50840D34900C01CD2 /* growl-claw32.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 950627A40840D34900C01CD2 /* growl-claw32.tiff */; };
    1.23 -		95075B0F0817F93D00D862A5 /* GrowlPathUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 959DBE4A08127BA4009BB468 /* GrowlPathUtilities.m */; };
    1.24  		95075B740817FE1E00D862A5 /* GrowlMenu.app in Resources */ = {isa = PBXBuildFile; fileRef = 95075AB00817F5DB00D862A5 /* GrowlMenu.app */; };
    1.25  		95075BC80817FF0800D862A5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 089C1672FE841209C02AAC07 /* Foundation.framework */; };
    1.26  		9507CE9008C9D62B00209F9E /* growl-icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 95BF83760743675700306A77 /* growl-icon.icns */; };
    1.27 -		9507CEA208C9D6C900209F9E /* CFMutableDictionaryAdditions.c in Sources */ = {isa = PBXBuildFile; fileRef = 95F975AC084A23F500915BFE /* CFMutableDictionaryAdditions.c */; };
    1.28  		950AB7CE08D6CE1B008289CD /* CFGrowlAdditions.c in Sources */ = {isa = PBXBuildFile; fileRef = 070B90FB07E1AEFA00F10FA7 /* CFGrowlAdditions.c */; };
    1.29  		951A8F4508746D7C0046595C /* GrowlPreferencesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 95B2B27808745B9000EA34BF /* GrowlPreferencesController.m */; };
    1.30  		951A8F4D08746DEC0046595C /* GrowlPreferencesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 95B2B27808745B9000EA34BF /* GrowlPreferencesController.m */; };
    1.31 @@ -235,7 +233,6 @@
    1.32  		9526BD54081BCC9100B9D0D0 /* MD5Authenticator.m in Sources */ = {isa = PBXBuildFile; fileRef = 9526BD52081BCC9100B9D0D0 /* MD5Authenticator.m */; };
    1.33  		9528EF8007F5A2DF00061D90 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 954F013B074135D400EA8AB5 /* Localizable.strings */; };
    1.34  		952EFCCF07C2869700952C6B /* GrowlInstallationPrompt.nib in Resources */ = {isa = PBXBuildFile; fileRef = 952EFC9007C2869700952C6B /* GrowlInstallationPrompt.nib */; };
    1.35 -		95394F9D0841A70F005B7CE3 /* CFURLAdditions.c in Sources */ = {isa = PBXBuildFile; fileRef = 9574B7AC0838CB5500106CA3 /* CFURLAdditions.c */; };
    1.36  		953F5CF107403B67008E2AEB /* GrowlNotifyScriptCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 953F5CEB07403B67008E2AEB /* GrowlNotifyScriptCommand.m */; };
    1.37  		953F5D3807403BC7008E2AEB /* GrowlRegisterScriptCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 953F5D2C07403BC7008E2AEB /* GrowlRegisterScriptCommand.m */; };
    1.38  		953F73A1081FFB9E00823EFE /* GrowlNotificationCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 953F739F081FFB9E00823EFE /* GrowlNotificationCenter.m */; };
    1.39 @@ -250,8 +247,6 @@
    1.40  		955437E807E048CB005534FA /* BrushedPrefs.nib in Resources */ = {isa = PBXBuildFile; fileRef = 95FC329D07E03B3400BD8674 /* BrushedPrefs.nib */; };
    1.41  		95543EE107E04BA9005534FA /* Brushed.growlView in CopyFiles */ = {isa = PBXBuildFile; fileRef = 95FC347907E0458E00BD8674 /* Brushed.growlView */; };
    1.42  		955497B5081125BD0062E27B /* Plain.growlStyle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9554979A081125A60062E27B /* Plain.growlStyle */; };
    1.43 -		9555388808DACC1B00D49CB1 /* CFDictionaryAdditions.c in Sources */ = {isa = PBXBuildFile; fileRef = 95F9767A084A297400915BFE /* CFDictionaryAdditions.c */; };
    1.44 -		9555388908DACC2500D49CB1 /* CFGrowlAdditions.c in Sources */ = {isa = PBXBuildFile; fileRef = 070B90FB07E1AEFA00F10FA7 /* CFGrowlAdditions.c */; };
    1.45  		955538CF08DAD19F00D49CB1 /* CFDictionaryAdditions.c in Sources */ = {isa = PBXBuildFile; fileRef = 95F9767A084A297400915BFE /* CFDictionaryAdditions.c */; };
    1.46  		955539E308DAD82C00D49CB1 /* CFDictionaryAdditions.c in Sources */ = {isa = PBXBuildFile; fileRef = 95F9767A084A297400915BFE /* CFDictionaryAdditions.c */; };
    1.47  		955539E408DAD83D00D49CB1 /* CFDictionaryAdditions.c in Sources */ = {isa = PBXBuildFile; fileRef = 95F9767A084A297400915BFE /* CFDictionaryAdditions.c */; };
    1.48 @@ -3009,15 +3004,10 @@
    1.49  			isa = PBXSourcesBuildPhase;
    1.50  			buildActionMask = 2147483647;
    1.51  			files = (
    1.52 -				95075B0F0817F93D00D862A5 /* GrowlPathUtilities.m in Sources */,
    1.53 -				95394F9D0841A70F005B7CE3 /* CFURLAdditions.c in Sources */,
    1.54  				34B2755E08423BFF0092A5A0 /* GrowlMenu.m in Sources */,
    1.55  				951A8F4508746D7C0046595C /* GrowlPreferencesController.m in Sources */,
    1.56  				EED7077708C74DCE004651D0 /* GrowlAbstractSingletonObject.m in Sources */,
    1.57 -				9507CEA208C9D6C900209F9E /* CFMutableDictionaryAdditions.c in Sources */,
    1.58 -				9555388808DACC1B00D49CB1 /* CFDictionaryAdditions.c in Sources */,
    1.59 -				9555388908DACC2500D49CB1 /* CFGrowlAdditions.c in Sources */,
    1.60 -				934EBCB80931F529002C378F /* GrowlApplicationBridge.m in Sources */,
    1.61 +				93C70A2E10CB66B4005B5B80 /* GrowlPathUtilities.m in Sources */,
    1.62  			);
    1.63  			runOnlyForDeploymentPostprocessing = 0;
    1.64  		};
     2.1 --- a/StatusItem/Source/GrowlMenu.h	Fri Dec 04 23:00:54 2009 -0800
     2.2 +++ b/StatusItem/Source/GrowlMenu.h	Sun Dec 06 13:46:12 2009 -0500
     2.3 @@ -23,7 +23,6 @@
     2.4  - (void) shutdown:(id)sender;
     2.5  - (void) reloadPrefs:(NSNotification *)notification;
     2.6  - (void) openGrowlPreferences:(id)sender;
     2.7 -- (void) defaultDisplay:(id)sender;
     2.8  - (void) stopGrowl:(id)sender;
     2.9  - (void) startGrowl:(id)sender;
    2.10  - (void) squelchMode:(id)sender;
     3.1 --- a/StatusItem/Source/GrowlMenu.m	Fri Dec 04 23:00:54 2009 -0800
     3.2 +++ b/StatusItem/Source/GrowlMenu.m	Sun Dec 06 13:46:12 2009 -0500
     3.3 @@ -9,7 +9,6 @@
     3.4  #import "GrowlMenu.h"
     3.5  #import "GrowlPreferencesController.h"
     3.6  #import "GrowlPathUtilities.h"
     3.7 -//#import "GrowlPluginController.h"
     3.8  #include <unistd.h>
     3.9  
    3.10  #define kRestartGrowl                NSLocalizedString(@"Restart Growl", @"")
    3.11 @@ -18,8 +17,6 @@
    3.12  #define kStartGrowlTooltip           NSLocalizedString(@"Start Growl", @"")
    3.13  #define kStopGrowl                   NSLocalizedString(@"Stop Growl", @"")
    3.14  #define kStopGrowlTooltip            NSLocalizedString(@"Stop Growl", @"")
    3.15 -#define kDefaultDisplay              NSLocalizedString(@"Default display", @"")
    3.16 -#define kDefaultDisplayTooltip       NSLocalizedString(@"Set the default display style", @"")
    3.17  #define kOpenGrowlPreferences        NSLocalizedString(@"Open Growl Preferences...", @"")
    3.18  #define kOpenGrowlPreferencesTooltip NSLocalizedString(@"Open the Growl preference pane", @"")
    3.19  #define kSquelchMode                 NSLocalizedString(@"Log only, don't display", @"")
    3.20 @@ -28,7 +25,6 @@
    3.21  #define kStopGrowlMenuTooltip        NSLocalizedString(@"Hide this status item", @"")
    3.22  #define kStickyWhenAwayMenu			 NSLocalizedString(@"Sticky Notifications", @"")
    3.23  #define kStickyWhenAwayMenuTooltip   NSLocalizedString(@"Toggles the sticky notification state", @"")
    3.24 -#define kDefaultDisplayChanged       NSLocalizedString(@"Default display changed to %@", @"")
    3.25  
    3.26  int main(void) {
    3.27  	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    3.28 @@ -78,26 +74,6 @@
    3.29  		   selector:@selector(reloadPrefs:)
    3.30  			   name:GrowlPreferencesChanged
    3.31  			 object:nil];
    3.32 -
    3.33 -	[GrowlApplicationBridge setGrowlDelegate:self];
    3.34 -}
    3.35 -
    3.36 -#pragma mark Growl delegate methods
    3.37 -
    3.38 -- (NSString *) applicationNameForGrowl {
    3.39 -	return @"GrowlMenu";
    3.40 -}
    3.41 -
    3.42 -- (NSDictionary *) registrationDictionaryForGrowl {
    3.43 -	NSArray *notifications = [NSArray arrayWithObject:@"Display changed"];
    3.44 -	NSDictionary *registrationDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
    3.45 -											notifications, GROWL_NOTIFICATIONS_ALL,
    3.46 -											notifications, GROWL_NOTIFICATIONS_DEFAULT,
    3.47 -											[NSDictionary dictionaryWithObject:NSLocalizedString(@"Display changed", "Notification posted by GrowlMenu when the display style changes")
    3.48 -																		forKey:@"Display changed"], GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES,
    3.49 -											nil];
    3.50 -
    3.51 -	return registrationDictionary;
    3.52  }
    3.53  
    3.54  #pragma mark -
    3.55 @@ -142,19 +118,6 @@
    3.56  	[[NSWorkspace sharedWorkspace] openFile:prefPane];
    3.57  }
    3.58  
    3.59 -- (void) defaultDisplay:(id)sender {
    3.60 -	NSString *pluginName = [sender title];
    3.61 -	[preferences setDefaultDisplayPluginName:pluginName];
    3.62 -
    3.63 -	CFStringRef description = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, (CFStringRef)kDefaultDisplayChanged, pluginName);
    3.64 -	const NSString *keys[5] = { GROWL_APP_NAME, GROWL_NOTIFICATION_NAME, GROWL_NOTIFICATION_TITLE, GROWL_NOTIFICATION_DESCRIPTION, GROWL_DISPLAY_PLUGIN };
    3.65 -	const CFStringRef values[5] = { CFSTR("GrowlMenu"), CFSTR("Display changed"), CFSTR("Display changed"), description, (CFStringRef)pluginName };
    3.66 -	CFDictionaryRef feedbackDictionary = CFDictionaryCreate(kCFAllocatorDefault, (const void **)keys, (const void **)values, 5, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
    3.67 -	CFRelease(description);
    3.68 -	[GrowlApplicationBridge notifyWithDictionary:(NSDictionary *)feedbackDictionary];
    3.69 -	CFRelease(feedbackDictionary);
    3.70 -}
    3.71 -
    3.72  - (void) stopGrowl:(id)sender {
    3.73  #pragma unused(sender)
    3.74  	//If Growl is running, we should stop it.
    3.75 @@ -234,18 +197,6 @@
    3.76  	[tempMenuItem setTag:6];
    3.77  	[tempMenuItem setToolTip:kStickyWhenAwayMenuTooltip];
    3.78  
    3.79 -	/*NSMenu *displays = [[NSMenu allocWithZone:menuZone] init];
    3.80 -	NSString *name;
    3.81 -	NSEnumerator *displayEnumerator = [[[GrowlPluginController sharedController] displayPlugins] objectEnumerator];
    3.82 -	while ((name = [displayEnumerator nextObject])) {
    3.83 -		tempMenuItem = (NSMenuItem *)[displays addItemWithTitle:name action:@selector(defaultDisplay:) keyEquivalent:@""];
    3.84 -		[tempMenuItem setTarget:self];
    3.85 -		[tempMenuItem setTag:3];
    3.86 -	}
    3.87 -	tempMenuItem = (NSMenuItem *)[m addItemWithTitle:kDefaultDisplay action:NULL keyEquivalent:@""];
    3.88 -	[tempMenuItem setTarget:self];
    3.89 -	[tempMenuItem setSubmenu:displays];
    3.90 -	[displays release];*/
    3.91  	[m addItem:[NSMenuItem separatorItem]];
    3.92  
    3.93  	tempMenuItem = (NSMenuItem *)[m addItemWithTitle:kStopGrowlMenu action:@selector(shutdown:) keyEquivalent:@""];
    3.94 @@ -273,9 +224,6 @@
    3.95  			break;
    3.96  		case 2:
    3.97  			return [preferences isGrowlRunning];
    3.98 -		case 3:
    3.99 -			[item setState:[[item title] isEqualToString:[preferences defaultDisplayPluginName]]];
   3.100 -			break;
   3.101  		case 4:
   3.102  			[item setState:[preferences squelchMode]];
   3.103  			break;