Updating some Copyright issues before release
[MenuTunes.git] / MenuController.m
index 0d6fc63..b0ee60f 100755 (executable)
             [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:[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)) {
             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: