adium 2305:6c5abb8a67a4: Call me paranoid, but when Apple introd...

commits at adium.im commits at adium.im
Sun May 24 08:26:33 UTC 2009


details:	http://hg.adium.im/adium/rev/6c5abb8a67a4
revision:	2305:6c5abb8a67a4
author:		David Smith <catfish.man at gmail.com>
date:		Sun May 24 01:26:25 2009 -0700

Call me paranoid, but when Apple introduces a function like sel_isEqual(), I tend to assume there's some reason for it.

diffstat:

 Plugins/WebKit Message View/AIWebKitMessageViewController.m |  17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r 4fff1c47e9f2 -r 6c5abb8a67a4 Plugins/WebKit Message View/AIWebKitMessageViewController.m
--- a/Plugins/WebKit Message View/AIWebKitMessageViewController.m	Sun May 24 01:06:52 2009 -0700
+++ b/Plugins/WebKit Message View/AIWebKitMessageViewController.m	Sun May 24 01:26:25 2009 -0700
@@ -50,6 +50,7 @@
 #import <AIUtilities/AIStringAdditions.h>
 #import <AIUtilities/AIAttributedStringAdditions.h>
 #import <AIUtilities/JVMarkedScroller.h>
+#import <objc/objc-runtime.h>
 
 #define KEY_WEBKIT_CHATS_USING_CACHED_ICON @"WebKit:Chats Using Cached Icon"
 
@@ -1525,9 +1526,13 @@
 
 + (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
 {
-	if(aSelector == @selector(handleAction:forFileTransfer:)) return NO;
-	if(aSelector == @selector(debugLog:)) return NO;
-	if(aSelector == @selector(zoomImage:)) return NO;
+	if (
+		sel_isEqual(aSelector, @selector(handleAction:forFileTransfer:)) ||
+		sel_isEqual(aSelector, @selector(debugLog:)) ||
+		sel_isEqual(aSelector, @selector(zoomImage:))
+	)
+		return NO;
+	
 	return YES;
 }
 
@@ -1542,9 +1547,9 @@
  */
 + (NSString *)webScriptNameForSelector:(SEL)aSelector
 {
-	if(aSelector == @selector(handleAction:forFileTransfer:)) return @"handleFileTransfer";
-	if(aSelector == @selector(debugLog:)) return @"debugLog";
-	if(aSelector == @selector(zoomImage:)) return @"zoomImage";
+	if (sel_isEqual(aSelector, @selector(handleAction:forFileTransfer:))) return @"handleFileTransfer";
+	if (sel_isEqual(aSelector, @selector(debugLog:))) return @"debugLog";
+	if (sel_isEqual(aSelector, @selector(zoomImage:))) return @"zoomImage";
 	return @"";
 }
 




More information about the commits mailing list