Replace duplicated string literals of the iTunes application name (without the .app suffix) with the ITUNES_APP_NAME macro (which has the suffix). Should fix GrowlTunes picking up a Mac OS iTunes if one is installed.
authorPeter Hosey <hg@boredzo.org>
Tue Mar 23 04:46:07 2010 -0700 (2010-03-23)
changeset 4606c9988887095c
parent 4605 1a71a675d862
child 4607 1965ad0e7d66
Replace duplicated string literals of the iTunes application name (without the .app suffix) with the ITUNES_APP_NAME macro (which has the suffix). Should fix GrowlTunes picking up a Mac OS iTunes if one is installed.
Extras/GrowlTunes/GrowlTunesController.m
     1.1 --- a/Extras/GrowlTunes/GrowlTunesController.m	Wed Mar 17 01:54:40 2010 -0700
     1.2 +++ b/Extras/GrowlTunes/GrowlTunesController.m	Tue Mar 23 04:46:07 2010 -0700
     1.3 @@ -117,7 +117,7 @@
     1.4  #pragma unused(notification)
     1.5  	getInfoScript = [self appleScriptNamed:@"jackItunesArtwork"];
     1.6  
     1.7 -	NSString *itunesPath = [[NSWorkspace sharedWorkspace] fullPathForApplication:@"iTunes"];
     1.8 +	NSString *itunesPath = [[NSWorkspace sharedWorkspace] fullPathForApplication:ITUNES_APP_NAME];
     1.9  	if ([[[NSBundle bundleWithPath:itunesPath] objectForInfoDictionaryKey:@"CFBundleShortVersionString"] floatValue] >= 4.7f)
    1.10  		[self setPolling:NO];
    1.11  	else
    1.12 @@ -471,7 +471,7 @@
    1.13  			}
    1.14  
    1.15  			// Use the iTunes icon instead
    1.16 -			artwork = [[NSWorkspace sharedWorkspace] iconForApplication:@"iTunes"];
    1.17 +			artwork = [[NSWorkspace sharedWorkspace] iconForApplication:ITUNES_APP_NAME];
    1.18  			[artwork setSize:NSMakeSize(128.0f, 128.0f)];
    1.19  		}
    1.20  		if ([newTrackURL hasPrefix:@"http://"]) {
    1.21 @@ -630,7 +630,7 @@
    1.22  			}
    1.23  
    1.24  			// Use the iTunes icon instead
    1.25 -			artwork = [[NSWorkspace sharedWorkspace] iconForApplication:@"iTunes"];
    1.26 +			artwork = [[NSWorkspace sharedWorkspace] iconForApplication:ITUNES_APP_NAME];
    1.27  			[artwork setSize:NSMakeSize(128.0f, 128.0f)];
    1.28  		}
    1.29