Skip to content

Instantly share code, notes, and snippets.

@runeb
Created April 13, 2012 09:40
Show Gist options
  • Save runeb/2375448 to your computer and use it in GitHub Desktop.
Save runeb/2375448 to your computer and use it in GitHub Desktop.
-(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