Allow clicking on the key field directly.
[enjoyable.git] / ApplicationController.m
index aa51eeb..dd38323 100644 (file)
     BOOL active;
 }
 
-@synthesize jsController;
-@synthesize targetController;
-@synthesize configsController;
-
 - (void)didSwitchApplication:(NSNotification *)notification {
     NSRunningApplication *currentApp = notification.userInfo[NSWorkspaceApplicationKey];
     [self.configsController activateConfigForProcess:currentApp.localizedName];
@@ -67,6 +63,7 @@
         [dockMenuBase removeItemAtIndex:dockMenuBase.numberOfItems - 1];
     for (Config *config in self.configsController.configs)
         [dockMenuBase addItemWithTitle:config.name action:@selector(chooseConfig:) keyEquivalent:@""];
+    [_targetController refreshConfigs];
     [self configChanged];
 }
 
@@ -81,6 +78,6 @@
 - (void)chooseConfig:(id)sender {
     int idx = [dockMenuBase indexOfItem:sender] - [self firstConfigMenuIndex];
     Config *chosen = self.configsController.configs[idx];
-    [configsController activateConfig:chosen];
+    [_configsController activateConfig:chosen];
 }
 @end