Created
April 13, 2012 09:40
-
-
Save runeb/2375448 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) play:(NSMenuItem*) menuItem | |
{ | |
for(NSMenuItem *i in menuItems) { | |
[i setState:NSOffState]; | |
} | |
[menuItem setState:NSOnState]; | |
NSDictionary *station = [stations objectAtIndex:menuItem.tag]; | |
NSString *name = [station valueForKey:@"name"]; | |
[systemStatusItem setTitle:name]; | |
NSLog(@"Spiller %@ fra %@", name, [station valueForKey:@"url"]); | |
[self playURLString:[station valueForKey:@"url"]]; | |
} | |
- (void) applicationWillTerminate:(NSNotification *)notification | |
{ | |
[menuItems release]; | |
[stations release]; | |
if(radio) { | |
[radio stop]; | |
[radio release]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment