From: Joe Wreschnig Date: Fri, 1 Mar 2013 16:28:08 +0000 (+0100) Subject: Clean up some comments. X-Git-Tag: version-1.0~71 X-Git-Url: https://git.yukkurigames.com/?a=commitdiff_plain;h=681ca0346ecb3f3da2c45a1a470601f15aad22cf;p=enjoyable.git Clean up some comments. --- diff --git a/Enjoyable.xcodeproj/project.pbxproj b/Enjoyable.xcodeproj/project.pbxproj index 2c79e25..f48c694 100644 --- a/Enjoyable.xcodeproj/project.pbxproj +++ b/Enjoyable.xcodeproj/project.pbxproj @@ -192,10 +192,10 @@ 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( - EE1D7C9416E0ECCF00B000EB /* NSError+Description.h */, - EE1D7C9516E0ECCF00B000EB /* NSError+Description.m */, 32CA4F630368D1EE00C91783 /* Enjoyable_Prefix.pch */, 29B97316FDCFA39411CA2CEA /* main.m */, + EE1D7C9416E0ECCF00B000EB /* NSError+Description.h */, + EE1D7C9516E0ECCF00B000EB /* NSError+Description.m */, EE1D7C9016E01E7000B000EB /* NSView+FirstResponder.h */, EE1D7C9116E01E7000B000EB /* NSView+FirstResponder.m */, ); diff --git a/NSView+FirstResponder.h b/NSView+FirstResponder.h index 9aee2e6..cd89aa5 100644 --- a/NSView+FirstResponder.h +++ b/NSView+FirstResponder.h @@ -1,15 +1,11 @@ -// -// NSView+FirstResponder.h -// Enjoy -// -// Created by Joe Wreschnig on 3/1/13. -// -// - #import @interface NSView (FirstResponder) - (BOOL)resignIfFirstResponder; + // Resign first responder status if this view is the active first + // responder in its window. Returns whether first responder status + // was resigned; YES if it was and NO if refused or the view was + // not the first responder. @end diff --git a/NSView+FirstResponder.m b/NSView+FirstResponder.m index 817d399..0575b0d 100644 --- a/NSView+FirstResponder.m +++ b/NSView+FirstResponder.m @@ -1,19 +1,12 @@ -// -// NSView+FirstResponder.m -// Enjoy -// -// Created by Joe Wreschnig on 3/1/13. -// -// - #import "NSView+FirstResponder.h" @implementation NSView (FirstResponder) - (BOOL)resignIfFirstResponder { - if (self.window.firstResponder == self) - return [self.window makeFirstResponder:nil]; - return NO; + NSWindow *window = self.window; + return window.firstResponder == self + ? [window makeFirstResponder:nil] + : NO; } @end diff --git a/TargetMouseMove.m b/TargetMouseMove.m index 52f241a..9deabcc 100644 --- a/TargetMouseMove.m +++ b/TargetMouseMove.m @@ -3,7 +3,6 @@ // Enjoy // // Created by Yifeng Huang on 7/26/12. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. // #import "TargetMouseMove.h" diff --git a/TargetMouseScroll.m b/TargetMouseScroll.m index 6986004..d840ba1 100644 --- a/TargetMouseScroll.m +++ b/TargetMouseScroll.m @@ -3,7 +3,6 @@ // Enjoy // // Created by Yifeng Huang on 7/28/12. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. // #import "TargetMouseScroll.h" diff --git a/TargetToggleMouseScope.h b/TargetToggleMouseScope.h index 45c79ba..a935c67 100644 --- a/TargetToggleMouseScope.h +++ b/TargetToggleMouseScope.h @@ -3,7 +3,6 @@ // Enjoy // // Created by Yifeng Huang on 7/28/12. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. // #import "Target.h"