Permalink
Browse files

Green/Red icon for scrobbling feedback

  • Loading branch information...
1 parent a851403 commit dd1df70ab9c4ff1e35da02644097d692a230c835 @mxcl committed Jun 26, 2010
@@ -33,6 +33,9 @@
637F074E0FAF20AD006EE129 /* ScriptingBridge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 637F074D0FAF20AD006EE129 /* ScriptingBridge.framework */; };
6390167511CCE4DA00DCCC84 /* ShareWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6390167411CCE4DA00DCCC84 /* ShareWindowController.m */; };
63906F0C0F9DE71E00797A14 /* ShareWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 63906F0B0F9DE71E00797A14 /* ShareWindow.xib */; };
+ 63A29EAC11D6B90500D2441D /* icon_inverted.png in Resources */ = {isa = PBXBuildFile; fileRef = 63A29EAA11D6B90500D2441D /* icon_inverted.png */; };
+ 63A29EAD11D6B90500D2441D /* icon_red.png in Resources */ = {isa = PBXBuildFile; fileRef = 63A29EAB11D6B90500D2441D /* icon_red.png */; };
+ 63A29EAF11D6B92100D2441D /* icon_green.png in Resources */ = {isa = PBXBuildFile; fileRef = 63A29EAE11D6B92100D2441D /* icon_green.png */; };
63C9B94A0F8672940065ED7F /* Audioscrobbler.icns in Resources */ = {isa = PBXBuildFile; fileRef = 63C9B9490F8672940065ED7F /* Audioscrobbler.icns */; };
63C9B9630F867C460065ED7F /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C9B9620F867C460065ED7F /* Security.framework */; };
63D1D09F0F97FDB3004FBC05 /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63D1D09E0F97FDB3004FBC05 /* Growl.framework */; };
@@ -87,6 +90,9 @@
6390167311CCE4DA00DCCC84 /* ShareWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShareWindowController.h; sourceTree = "<group>"; };
6390167411CCE4DA00DCCC84 /* ShareWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShareWindowController.m; sourceTree = "<group>"; };
63906F0B0F9DE71E00797A14 /* ShareWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ShareWindow.xib; sourceTree = "<group>"; };
+ 63A29EAA11D6B90500D2441D /* icon_inverted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_inverted.png; sourceTree = "<group>"; };
+ 63A29EAB11D6B90500D2441D /* icon_red.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_red.png; sourceTree = "<group>"; };
+ 63A29EAE11D6B92100D2441D /* icon_green.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_green.png; sourceTree = "<group>"; };
63C9B9490F8672940065ED7F /* Audioscrobbler.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Audioscrobbler.icns; sourceTree = "<group>"; };
63C9B9620F867C460065ED7F /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
63D1D09E0F97FDB3004FBC05 /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Growl.framework; sourceTree = "<group>"; };
@@ -96,7 +102,6 @@
63D6DAEF0F8396E000F4DCAA /* MainController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainController.h; sourceTree = "<group>"; };
63D6DAF00F8396E000F4DCAA /* MainController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainController.m; sourceTree = "<group>"; };
63D6DB360F8399E000F4DCAA /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = "<group>"; };
- 63D6DB370F8399E000F4DCAA /* inverted_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = inverted_icon.png; sourceTree = "<group>"; };
63F19A1911D67ED700205103 /* HighResolutionTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HighResolutionTimer.h; sourceTree = "<group>"; };
63F19A1A11D67ED700205103 /* HighResolutionTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HighResolutionTimer.m; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -190,7 +195,6 @@
isa = PBXGroup;
children = (
637F07050FAF180F006EE129 /* iTunes.h */,
- 32CA4F630368D1EE00C91783 /* pc.h */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
@@ -199,10 +203,13 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
+ 32CA4F630368D1EE00C91783 /* pc.h */,
+ 63D6DB360F8399E000F4DCAA /* icon.png */,
+ 63A29EAA11D6B90500D2441D /* icon_inverted.png */,
+ 63A29EAE11D6B92100D2441D /* icon_green.png */,
+ 63A29EAB11D6B90500D2441D /* icon_red.png */,
632B2000100624150009A0B7 /* Credits.html */,
63C9B9490F8672940065ED7F /* Audioscrobbler.icns */,
- 63D6DB360F8399E000F4DCAA /* icon.png */,
- 63D6DB370F8399E000F4DCAA /* inverted_icon.png */,
8D1107310486CEB800E47090 /* Info.plist */,
1DDD58140DA1D0A300B32029 /* main.xib */,
63906F0B0F9DE71E00797A14 /* ShareWindow.xib */,
@@ -268,11 +275,13 @@
files = (
1DDD58160DA1D0A300B32029 /* main.xib in Resources */,
63D6DB380F8399E000F4DCAA /* icon.png in Resources */,
- 63D6DB390F8399E000F4DCAA /* inverted_icon.png in Resources */,
63C9B94A0F8672940065ED7F /* Audioscrobbler.icns in Resources */,
63906F0C0F9DE71E00797A14 /* ShareWindow.xib in Resources */,
632B2001100624150009A0B7 /* Credits.html in Resources */,
6372C84F1007A01B00EC25F4 /* methylblue.pem in Resources */,
+ 63A29EAC11D6B90500D2441D /* icon_inverted.png in Resources */,
+ 63A29EAD11D6B90500D2441D /* icon_red.png in Resources */,
+ 63A29EAF11D6B92100D2441D /* icon_green.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
@@ -122,7 +122,7 @@ -(void)awakeFromNib
status_item = [[[NSStatusBar systemStatusBar] statusItemWithLength:27] retain];
[status_item setHighlightMode:YES];
[status_item setImage:[NSImage imageNamed:@"icon.png"]];
- [status_item setAlternateImage:[NSImage imageNamed:@"inverted_icon.png"]];
+ [status_item setAlternateImage:[NSImage imageNamed:@"icon_inverted.png"]];
[status_item setEnabled:YES];
[status_item setMenu:menu];
@@ -200,6 +200,7 @@ -(void)onPlayerInfo:(NSNotification*)userData
[share setEnabled:true];
[tag setEnabled:true];
notificationName = ASGrowlTrackStarted;
+ status_item.image = [NSImage imageNamed:@"icon.png"];
count++;
// fall through
case TrackResumed:{
@@ -235,6 +236,7 @@ -(void)onPlayerInfo:(NSNotification*)userData
[tag setEnabled:false];
[share setEnabled:false];
[love setTitle:@"Love"];
+ status_item.image = [NSImage imageNamed:@"icon.png"];
NSNumberFormatter* formatter = [[NSNumberFormatter alloc] init];
NSString* info = [NSString stringWithFormat:@"You played %@ tracks this session.",
@@ -311,10 +313,13 @@ -(void)lastfm:(Lastfm*)lastfm scrobbled:(NSDictionary*)track failureMessage:(NSS
[history_menu removeItem:item];
NSString* title = track.prettyTitle;
- if (message)
+ if (message) {
+ status_item.image = [NSImage imageNamed:@"icon_red.png"];
title = [title stringByAppendingFormat:@" (Failed: %@)", message];
- else
+ } else {
+ status_item.image = [NSImage imageNamed:@"icon_green.png"];
title = [title stringByAppendingFormat:@" (OK)"];
+ }
item = [[NSMenuItem alloc] initWithTitle:title action:@selector(historyItemClicked:) keyEquivalent:@""];
[item setTarget:self];
View
BIN icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -1,8 +0,0 @@
-set -o errexit
-test -d build && rm -r build
-xcodebuild -configuration Release -project Audioscrobbler.xcodeproj
-osascript -e 'if application "Audioscrobbler" is running then tell application "Audioscrobbler" to quit'
-open build/Release
-echo "Replace the old Audioscrobbler.app with this one"
-read -p "$*"
-open /Applications/Audioscrobbler.app

0 comments on commit dd1df70

Please sign in to comment.