More compiler warnings on. Make all properties nonatomic.
[enjoyable.git] / ApplicationController.m
index b86a5f2..61910a6 100644 (file)
 - (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 {
@@ -77,7 +75,7 @@
     NSInteger firstConfig = [self firstConfigMenuIndex];
     Config *current = self.configsController.currentConfig;
     NSArray *configs = self.configsController.configs;
-    for (int i = 0; i < configs.count; ++i)
+    for (NSUInteger i = 0; i < configs.count; ++i)
         [dockMenuBase itemAtIndex:i + firstConfig].state = configs[i] == current;
 }