From: Joe Wreschnig Date: Mon, 4 Mar 2013 13:06:53 +0000 (+0100) Subject: Signal mappings menu entry by a tag, not a check for a separator. Remove dead code. X-Git-Tag: version-1.0~46 X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=commitdiff_plain;h=04a5164fec6b5d856b4ab181a2b7c870c2dc679a Signal mappings menu entry by a tag, not a check for a separator. Remove dead code. --- diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index 2e2b440..a110b51 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -240,6 +240,7 @@ 2147483647 + 1 @@ -336,6 +337,7 @@ {{0, 14}, {140, 25}} + _NS:9 YES @@ -386,6 +388,7 @@ {{5, 14}, {67, 25}} + _NS:9 YES @@ -461,7 +464,7 @@ - + @@ -695,6 +698,7 @@ {{227, 55}, {180, 24}} + _NS:9 YES @@ -1174,6 +1178,7 @@ {{67, 19}, {39, 28}} + YES 603979776 @@ -2379,27 +2384,28 @@ EnjoyableApplicationDelegate NSObject + + toggleActivity: + id + + + toggleActivity: + + toggleActivity: + id + + - NSMenuItem NSMenu - NSDrawer NJDeviceController NJMappingsController NJOutputController - - activeMenuItem - NSMenuItem - dockMenuBase NSMenu - - drawer - NSDrawer - inputController NJDeviceController diff --git a/EnjoyableApplicationDelegate.h b/EnjoyableApplicationDelegate.h index 17737e8..3e74418 100644 --- a/EnjoyableApplicationDelegate.h +++ b/EnjoyableApplicationDelegate.h @@ -11,7 +11,6 @@ @class NJMappingsController; @interface EnjoyableApplicationDelegate : NSObject { - IBOutlet NSMenuItem *activeMenuItem; IBOutlet NSMenu *dockMenuBase; } diff --git a/EnjoyableApplicationDelegate.m b/EnjoyableApplicationDelegate.m index 74e8265..0dbea22 100644 --- a/EnjoyableApplicationDelegate.m +++ b/EnjoyableApplicationDelegate.m @@ -39,9 +39,7 @@ name:NJEventTranslationDeactivated object:nil]; - mappingsMenuIndex = dockMenuBase.numberOfItems; - while (![dockMenuBase itemAtIndex:mappingsMenuIndex - 1].isSeparatorItem) - --mappingsMenuIndex; + while (![dockMenuBase itemAtIndex:mappingsMenuIndex++].tag); self.outputController.enabled = NO; [self.inputController setup]; @@ -69,10 +67,6 @@ NSLog(@"Ignoring application changes."); } -- (IBAction)toggleActivity:(id)sender { - self.inputController.translatingEvents = !self.inputController.translatingEvents; -} - - (void)mappingsChanged { NSInteger removeFrom = mappingsMenuIndex; while (dockMenuBase.numberOfItems > removeFrom)