X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/ceb65233f7ffd73c2fd3b471d7e15ab7abefb553..04367132ac506360ff31ef1404087678a8cb275b:/MenuController.m diff --git a/MenuController.m b/MenuController.m index 0d6fc63..b0ee60f 100755 --- a/MenuController.m +++ b/MenuController.m @@ -193,13 +193,13 @@ [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:@""]; @@ -247,12 +247,14 @@ [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)) { @@ -654,7 +656,7 @@ 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; @@ -715,8 +717,8 @@ 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: