BOOL active;
}
-@synthesize jsController;
-@synthesize targetController;
-@synthesize configsController;
-
- (void)didSwitchApplication:(NSNotification *)notification {
NSRunningApplication *currentApp = notification.userInfo[NSWorkspaceApplicationKey];
[self.configsController activateConfigForProcess:currentApp.localizedName];
[dockMenuBase removeItemAtIndex:dockMenuBase.numberOfItems - 1];
for (Config *config in self.configsController.configs)
[dockMenuBase addItemWithTitle:config.name action:@selector(chooseConfig:) keyEquivalent:@""];
+ [_targetController refreshConfigs];
[self configChanged];
}
- (void)chooseConfig:(id)sender {
int idx = [dockMenuBase indexOfItem:sender] - [self firstConfigMenuIndex];
Config *chosen = self.configsController.configs[idx];
- [configsController activateConfig:chosen];
+ [_configsController activateConfig:chosen];
}
@end