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 2c79e25662df490ceeae90fc24735ae8e48b624f..f48c694f95525dffa9d87036887b4e17eef53d4b 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 9aee2e6fddfd544d55ad2f2cbcbb14fdbf82a03e..cd89aa557c99e26f33636baa4d2e60ec718c1cc1 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 817d399207b75178721eabaa2135e4a5329cc80d..0575b0d05d1aed09036af123171b22dc52ba529c 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 52f241a0640952f8c16ea49276eea9c4c7a9e1e8..9deabccdc9a55c1217b83396bb027546687412cf 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 6986004b4b7bac8c6f4e43c4cb2bca48a1f56452..d840ba1069bfe2539a50cbd44d79e8d7bda40dd2 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 45c79ba0f00cfe727178a967cb01b6d17618234e..a935c67f2a33935558ab395ebfdded5aed256a45 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"