Changing hotkeys in the prefs now writes to the prefs and rebuilds the menu.
[MenuTunes.git] / PreferencesController.m
index c230e13..5c9f059 100755 (executable)
@@ -459,6 +459,8 @@ static PreferencesController *prefs = nil;
         toggleShuffleCombo = [combo copy];
         [toggleShuffleButton setTitle:string];
     }
+    [df setKeyCombo:combo forKey:setHotKey];
+    [controller rebuildMenu];
     [self cancelHotKey:sender];
 }
 
@@ -778,7 +780,11 @@ static PreferencesController *prefs = nil;
 {
     if (aTableView == menuTableView) {
         if ([[aTableColumn identifier] isEqualToString:@"name"]) {
-            return [myItems objectAtIndex:rowIndex];
+            NSString *object = [myItems objectAtIndex:rowIndex];
+            if ([object isEqualToString:@"Show Player"]) {
+                return [NSString stringWithFormat:@"Show %@", [[controller currentRemote] playerSimpleName]];
+            }
+            return object;
         } else {
             if ([submenuItems containsObject:[myItems objectAtIndex:rowIndex]])
             {