X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=ApplicationController.m;h=445456526329370a5b8f3f2fc9f6b66e65848003;hp=b86a5f2067f8ebc36e09e8bdc58bd90eda2b70ff;hb=794561a4606fa9e31e3b2b077891f5b1e6084698;hpb=9584becb2e5469e8f482d73e6f0c9c3bf879e0db diff --git a/ApplicationController.m b/ApplicationController.m index b86a5f2..4454565 100644 --- a/ApplicationController.m +++ b/ApplicationController.m @@ -44,17 +44,15 @@ - (IBAction)toggleActivity:(id)sender { BOOL sendRealEvents = !self.jsController.sendingRealEvents; self.jsController.sendingRealEvents = sendRealEvents; - activeButton.label = sendRealEvents ? @"Stop" : @"Start"; activeButton.image = [NSImage imageNamed:sendRealEvents ? @"NSStopProgressFreestandingTemplate" : @"NSGoRightTemplate"]; activeMenuItem.state = sendRealEvents; } - (NSInteger)firstConfigMenuIndex { - NSInteger count = dockMenuBase.numberOfItems; - for (int i = 0; i < count; ++i) + for (NSInteger i = dockMenuBase.numberOfItems - 1; i >= 0; --i) if ([dockMenuBase itemAtIndex:i].isSeparatorItem) return i + 1; - return count; + return dockMenuBase.numberOfItems; } - (void)configsChanged {