From: Joe Wreschnig Date: Thu, 7 Mar 2013 10:07:07 +0000 (+0100) Subject: Fix some stray tabs and style violations. X-Git-Tag: version-1.0~8 X-Git-Url: https://git.yukkurigames.com/?a=commitdiff_plain;h=b8c30e0c06effb8f4a937378e5c4cf8a22f40c59;p=enjoyable.git Fix some stray tabs and style violations. --- diff --git a/EnjoyableApplicationDelegate.m b/EnjoyableApplicationDelegate.m index 59c3025..c477511 100644 --- a/EnjoyableApplicationDelegate.m +++ b/EnjoyableApplicationDelegate.m @@ -113,7 +113,7 @@ return proposedMax - OUTPUT_PANE_MIN_WIDTH; } --(void)splitView:(NSSplitView *)splitView resizeSubviewsWithOldSize:(NSSize)oldSize { +- (void)splitView:(NSSplitView *)splitView resizeSubviewsWithOldSize:(NSSize)oldSize { NSView *inputView = splitView.subviews[0]; NSView *outputView = splitView.subviews[1]; if (outputView.frame.size.width < OUTPUT_PANE_MIN_WIDTH) { diff --git a/NJDeviceController.h b/NJDeviceController.h index f9221c0..7658c64 100644 --- a/NJDeviceController.h +++ b/NJDeviceController.h @@ -12,9 +12,9 @@ @class NJOutputController; @interface NJDeviceController : NSObject { - IBOutlet NSOutlineView *outlineView; - IBOutlet NJOutputController *outputController; - IBOutlet NJMappingsController *mappingsController; + IBOutlet NSOutlineView *outlineView; + IBOutlet NJOutputController *outputController; + IBOutlet NJMappingsController *mappingsController; IBOutlet NSButton *translatingEventsButton; IBOutlet NSMenuItem *translatingEventsMenu; } diff --git a/NJMappingsController.m b/NJMappingsController.m index 2063d24..45085b5 100644 --- a/NJMappingsController.m +++ b/NJMappingsController.m @@ -122,7 +122,7 @@ [self mappingsChanged]; } --(void)tableViewSelectionDidChange:(NSNotification *)notify { +- (void)tableViewSelectionDidChange:(NSNotification *)notify { [self activateMapping:self[tableView.selectedRow]]; } diff --git a/NJOutputMouseButton.m b/NJOutputMouseButton.m index ad44b39..d5b1f16 100644 --- a/NJOutputMouseButton.m +++ b/NJOutputMouseButton.m @@ -19,12 +19,12 @@ + (NJOutput *)outputDeserialize:(NSDictionary *)serialization withMappings:(NSArray *)mappings { - NJOutputMouseButton *output = [[NJOutputMouseButton alloc] init]; + NJOutputMouseButton *output = [[NJOutputMouseButton alloc] init]; output.button = [serialization[@"button"] intValue]; - return output; + return output; } --(void) trigger { +- (void)trigger { CGFloat height = NSScreen.mainScreen.frame.size.height; NSPoint mouseLoc = NSEvent.mouseLocation; CGEventType eventType = (_button == kCGMouseButtonLeft) ? kCGEventLeftMouseDown : kCGEventRightMouseDown; @@ -36,7 +36,7 @@ CFRelease(click); } --(void) untrigger { +- (void)untrigger { CGFloat height = NSScreen.mainScreen.frame.size.height; NSPoint mouseLoc = NSEvent.mouseLocation; CGEventType eventType = (_button == kCGMouseButtonLeft) ? kCGEventLeftMouseUp : kCGEventRightMouseUp; diff --git a/NJOutputMouseMove.m b/NJOutputMouseMove.m index 4cafb1c..884a3d3 100644 --- a/NJOutputMouseMove.m +++ b/NJOutputMouseMove.m @@ -11,10 +11,6 @@ @implementation NJOutputMouseMove --(BOOL) isContinuous { - return YES; -} - + (NSString *)serializationCode { return @"mouse move"; } @@ -28,12 +24,16 @@ + (NJOutput *)outputDeserialize:(NSDictionary *)serialization withMappings:(NSArray *)mappings { - NJOutputMouseMove *output = [[NJOutputMouseMove alloc] init]; + NJOutputMouseMove *output = [[NJOutputMouseMove alloc] init]; output.axis = [serialization[@"axis"] intValue]; output.speed = [serialization[@"speed"] floatValue]; if (!output.speed) output.speed = 4; - return output; + return output; +} + +- (BOOL)isContinuous { + return YES; } - (BOOL)update:(NJDeviceController *)jc { diff --git a/NJOutputMouseScroll.m b/NJOutputMouseScroll.m index 7bbf4f8..812685f 100644 --- a/NJOutputMouseScroll.m +++ b/NJOutputMouseScroll.m @@ -22,10 +22,10 @@ + (NJOutput *)outputDeserialize:(NSDictionary *)serialization withMappings:(NSArray *)mappings { - NJOutputMouseScroll *output = [[NJOutputMouseScroll alloc] init]; + NJOutputMouseScroll *output = [[NJOutputMouseScroll alloc] init]; output.direction = [serialization[@"direction"] intValue]; output.speed = [serialization[@"direction"] floatValue]; - return output; + return output; } - (BOOL)isContinuous {