X-Git-Url: https://git.yukkurigames.com/?a=blobdiff_plain;ds=sidebyside;f=ConfigsController.m;h=63211ae06830e261e0cc86021060b079bcbc42e8;hb=3a40cba25b9bb38887fe4809277d4c0f73462d12;hp=3168f8d31bb7df7b99f4a654d245171364efc316;hpb=51ca12b552a9c17c4d4029b0340e193b273044a8;p=enjoyable.git diff --git a/ConfigsController.m b/ConfigsController.m index 3168f8d..63211ae 100644 --- a/ConfigsController.m +++ b/ConfigsController.m @@ -26,6 +26,9 @@ [self activateConfig: neutralConfig forApplication: NULL]; } +// TODO: Not an appropriate way to track 'neutral configs', it should just +// always be the first config and be unremovable. + -(void) activateConfig: (Config*)config forApplication: (ProcessSerialNumber*) psn { if(currentConfig == config) return; @@ -33,7 +36,6 @@ if(psn) { if(!neutralConfig) neutralConfig = currentConfig; - attachedApplication = *psn; } else { neutralConfig = NULL; } @@ -139,7 +141,7 @@ [ary addObject: cfgInfo]; } envelope[@"configurationList"] = ary; - envelope[@"selectedIndex"] = [NSNumber numberWithInt: [configs indexOfObject: [self currentNeutralConfig] ] ]; + envelope[@"selectedIndex"] = @([configs indexOfObject: [self currentNeutralConfig] ]); return envelope; } -(void) loadAllFrom: (NSDictionary*) envelope{ @@ -183,10 +185,4 @@ [self restoreNeutralConfig]; } --(ProcessSerialNumber*) targetApplication { - if(neutralConfig) - return &attachedApplication; - return NULL; -} - @end