Clean up some comments.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Fri, 1 Mar 2013 16:28:08 +0000 (17:28 +0100)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Fri, 1 Mar 2013 16:28:08 +0000 (17:28 +0100)
Enjoyable.xcodeproj/project.pbxproj
NSView+FirstResponder.h
NSView+FirstResponder.m
TargetMouseMove.m
TargetMouseScroll.m
TargetToggleMouseScope.h

index 2c79e25..f48c694 100644 (file)
                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 */,
                        );
index 9aee2e6..cd89aa5 100644 (file)
@@ -1,15 +1,11 @@
-//
-//  NSView+FirstResponder.h
-//  Enjoy
-//
-//  Created by Joe Wreschnig on 3/1/13.
-//
-//
-
 #import <Cocoa/Cocoa.h>
 
 @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
index 817d399..0575b0d 100644 (file)
@@ -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
index 52f241a..9deabcc 100644 (file)
@@ -3,7 +3,6 @@
 //  Enjoy
 //
 //  Created by Yifeng Huang on 7/26/12.
-//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
 //
 
 #import "TargetMouseMove.h"
index 6986004..d840ba1 100644 (file)
@@ -3,7 +3,6 @@
 //  Enjoy
 //
 //  Created by Yifeng Huang on 7/28/12.
-//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
 //
 
 #import "TargetMouseScroll.h"
index 45c79ba..a935c67 100644 (file)
@@ -3,7 +3,6 @@
 //  Enjoy
 //
 //  Created by Yifeng Huang on 7/28/12.
-//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
 //
 
 #import "Target.h"