[tempItem setTag:MTMenuPreferencesItem];
[tempItem setTarget:self];
} else if ([nextObject isEqualToString:@"quit"]) {
- ITDebugLog(@"Add \"Quit\" menu item.");
if ([[MainController sharedController] blingBling] == NO) {
ITDebugLog(@"Add \"Register MenuTunes...\" menu item.");
tempItem = [menu addItemWithTitle:NSLocalizedString(@"register", @"Register MenuTunes...") action:@selector(performMainMenuAction:) keyEquivalent:@""];
[tempItem setTag:MTMenuRegisterItem];
[tempItem setTarget:self];
}
+ ITDebugLog(@"Add \"Quit\" menu item.");
tempItem = [menu addItemWithTitle:NSLocalizedString(@"quit", @"Quit")
action:@selector(performMainMenuAction:)
keyEquivalent:@""];
[menu addItemWithTitle:title action:nil keyEquivalent:@""]];
}
+ if (!_playingRadio) {
if ([defaults boolForKey:@"showAlbum"]) {
NSString *curAlbum = [currentRemote currentSongAlbum];
ITDebugLog(@"Add Track Album (\"%@\") menu item.", curAlbum);
[menu addItemWithTitle:[NSString stringWithFormat:@"%@ %i", NSLocalizedString(@"track", @"Track"), track] action:nil keyEquivalent:@""]];
}
}
-
- if ([defaults boolForKey:@"showTime"] && ( ([currentRemote currentSongElapsed] != nil) || ([currentRemote currentSongLength] != nil) )) {
- ITDebugLog(@"Add Track Elapsed (\"%@/%@\") menu item.", [currentRemote currentSongElapsed], [currentRemote currentSongLength]);
- [menu indentItem:[menu addItemWithTitle:[NSString stringWithFormat:@"%@/%@", [currentRemote currentSongElapsed], [currentRemote currentSongLength]] action:nil keyEquivalent:@""]];
- }
-
+ }
+
+ if ([defaults boolForKey:@"showTime"] && ( ([currentRemote currentSongElapsed] != nil) || ([currentRemote currentSongLength] != nil) )) {
+ ITDebugLog(@"Add Track Elapsed (\"%@/%@\") menu item.", [currentRemote currentSongElapsed], [currentRemote currentSongLength]);
+ [menu indentItem:[menu addItemWithTitle:[NSString stringWithFormat:@"%@/%@", [currentRemote currentSongElapsed], [currentRemote currentSongLength]] action:nil keyEquivalent:@""]];
+ }
+
+ if (!_playingRadio) {
if ([defaults boolForKey:@"showTrackRating"] && ( [currentRemote currentSongRating] != -1.0 )) {
NSString *string = nil;
switch ((int)([currentRemote currentSongRating] * 5)) {
ITDebugLog(@"Add Track Rating (\"%@\") menu item.", string);
[menu indentItem:[menu addItemWithTitle:string action:nil keyEquivalent:@""]];
}
-
+ }
} else {
ITDebugLog(@"No Track is Playing, Add \"No Song\" menu item.");
[menu addItemWithTitle:NSLocalizedString(@"noSong", @"No Song") action:NULL keyEquivalent:@""];
SetMenuItemKeyGlyph(menuRef, 0, kMenuBlankGlyph);
charcode = 'b';*/
unichar buffer;
- [[NSString stringWithString:@"_"] getCharacters:&buffer]; // this will have to do for now :(
+ [[NSString stringWithString:@" "] getCharacters:&buffer]; // this will have to do for now :(
charcode = buffer;
}
break;
break;
case 105:
- ITDebugLog(@"Keycode for menu item \"%@\": 105 (F3)", [item title]);
- charcode = NSF3FunctionKey;
+ ITDebugLog(@"Keycode for menu item \"%@\": 105 (F13)", [item title]);
+ charcode = NSF13FunctionKey;
break;
case 107: