Adding loads of neato registration stuff!
[MenuTunes.git] / MenuController.m
index 13867ed..f57f331 100755 (executable)
                     keyEquivalent:@""];
             [tempItem setTag:MTMenuQuitItem];
             [tempItem setTarget:self];
                     keyEquivalent:@""];
             [tempItem setTag:MTMenuQuitItem];
             [tempItem setTarget:self];
+            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];
+            }
         } else if ([nextObject isEqualToString:@"trackInfo"]) {
             ITDebugLog(@"Check to see if a Track is playing...");
             //Handle playing radio too
         } else if ([nextObject isEqualToString:@"trackInfo"]) {
             ITDebugLog(@"Check to see if a Track is playing...");
             //Handle playing radio too
     tempItem = [menu addItemWithTitle:NSLocalizedString(@"preferences", @"Preferences...") action:@selector(performMainMenuAction:) keyEquivalent:@""];
     [tempItem setTag:MTMenuPreferencesItem];
     [tempItem setTarget:self];
     tempItem = [menu addItemWithTitle:NSLocalizedString(@"preferences", @"Preferences...") action:@selector(performMainMenuAction:) keyEquivalent:@""];
     [tempItem setTag:MTMenuPreferencesItem];
     [tempItem setTarget:self];
+    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:@""];
     [tempItem setTag:MTMenuQuitItem];
     ITDebugLog(@"Add \"Quit\" menu item.");
     tempItem = [menu addItemWithTitle:NSLocalizedString(@"quit", @"Quit") action:@selector(performMainMenuAction:) keyEquivalent:@""];
     [tempItem setTag:MTMenuQuitItem];
 
 - (void)rebuildSubmenus
 {
 
 - (void)rebuildSubmenus
 {
-    NSLog(@"Rebuilding all of the submenus.");
+    ITDebugLog(@"Rebuilding all of the submenus.");
     
     currentRemote = [[MainController sharedController] currentRemote];
     _currentPlaylist = [currentRemote currentPlaylistIndex];
     
     currentRemote = [[MainController sharedController] currentRemote];
     _currentPlaylist = [currentRemote currentPlaylistIndex];
     [_upcomingSongsMenu release];
     [_playlistsMenu release];
     [_eqMenu release];
     [_upcomingSongsMenu release];
     [_playlistsMenu release];
     [_eqMenu release];
-    NSLog(@"Beginning Rebuild of \"Song Rating\" submenu.");
+    ITDebugLog(@"Beginning Rebuild of \"Song Rating\" submenu.");
     _ratingMenu = [self ratingMenu];
     _ratingMenu = [self ratingMenu];
-    NSLog(@"Beginning Rebuild of \"Upcoming Songs\" submenu.");
+    ITDebugLog(@"Beginning Rebuild of \"Upcoming Songs\" submenu.");
     _upcomingSongsMenu = [self upcomingSongsMenu];
     _upcomingSongsMenu = [self upcomingSongsMenu];
-    NSLog(@"Beginning Rebuild of \"Playlists\" submenu.");
+    ITDebugLog(@"Beginning Rebuild of \"Playlists\" submenu.");
     _playlistsMenu = [self playlistsMenu];
     _playlistsMenu = [self playlistsMenu];
-    NSLog(@"Beginning Rebuild of \"EQ Presets\" submenu.");
+    ITDebugLog(@"Beginning Rebuild of \"EQ Presets\" submenu.");
     _eqMenu = [self eqMenu];
     _eqMenu = [self eqMenu];
-    NSLog(@"Done rebuilding all of the submenus.");
+    ITDebugLog(@"Done rebuilding all of the submenus.");
 }
 
 - (NSMenu *)ratingMenu
 }
 
 - (NSMenu *)ratingMenu
             ITDebugLog(@"Performing Menu Action: Quit");
             [[MainController sharedController] quitMenuTunes];
             break;
             ITDebugLog(@"Performing Menu Action: Quit");
             [[MainController sharedController] quitMenuTunes];
             break;
+        case MTMenuRegisterItem:
+            ITDebugLog(@"Performing Menu Action: Register");
+            [[MainController sharedController] blingNow];
+            break;
         default:
             ITDebugLog(@"Performing Menu Action: Unimplemented Menu Item OR Child-bearing Menu Item");
             break;
         default:
             ITDebugLog(@"Performing Menu Action: Unimplemented Menu Item OR Child-bearing Menu Item");
             break;