[Adium-commits] adium 2037:4db4f8ff70e6: Remove some unused additions

adium-commits at adiumx.com adium-commits at adiumx.com
Wed Apr 29 08:20:13 UTC 2009


details:	http://hg.adiumx.com/adium/rev/4db4f8ff70e6
revision:	2037:4db4f8ff70e6
author:		David Smith <catfish.man at gmail.com>
date:		Wed Apr 29 01:20:07 2009 -0700

Remove some unused additions

diffstat:

 Adium.xcodeproj/project.pbxproj                                  |   8 -
 Frameworks/AIUtilities Framework/Source/AIAppleScriptAdditions.h |  38 -------
 Frameworks/AIUtilities Framework/Source/AIAppleScriptAdditions.m |  60 ------------
 Frameworks/AIUtilities Framework/Source/AIEventAdditions.m       |  16 +-
 4 files changed, 8 insertions(+), 114 deletions(-)

diffs (199 lines):

diff -r 0db8c654ce7f -r 4db4f8ff70e6 Adium.xcodeproj/project.pbxproj
--- a/Adium.xcodeproj/project.pbxproj	Wed Apr 29 00:52:22 2009 -0700
+++ b/Adium.xcodeproj/project.pbxproj	Wed Apr 29 01:20:07 2009 -0700
@@ -1253,8 +1253,6 @@
 		633400720F9C14C2003C77A9 /* AISendingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6334FFA40F9C14C0003C77A9 /* AISendingTextView.m */; };
 		633400730F9C14C2003C77A9 /* AIAutoScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6334FFA70F9C14C0003C77A9 /* AIAutoScrollView.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		633400740F9C14C2003C77A9 /* AIAutoScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6334FFA80F9C14C1003C77A9 /* AIAutoScrollView.m */; };
-		633400750F9C14C2003C77A9 /* AIAppleScriptAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6334FFAA0F9C14C1003C77A9 /* AIAppleScriptAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		633400760F9C14C2003C77A9 /* AIAppleScriptAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6334FFAB0F9C14C1003C77A9 /* AIAppleScriptAdditions.m */; };
 		633400770F9C14C2003C77A9 /* AIApplicationAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6334FFAC0F9C14C1003C77A9 /* AIApplicationAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		633400780F9C14C2003C77A9 /* AIApplicationAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6334FFAD0F9C14C1003C77A9 /* AIApplicationAdditions.m */; };
 		633400790F9C14C2003C77A9 /* AIArrayAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6334FFAE0F9C14C1003C77A9 /* AIArrayAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -4216,8 +4214,6 @@
 		6334FFA40F9C14C0003C77A9 /* AISendingTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AISendingTextView.m; path = "Frameworks/AIUtilities Framework/Source/AISendingTextView.m"; sourceTree = "<group>"; };
 		6334FFA70F9C14C0003C77A9 /* AIAutoScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIAutoScrollView.h; path = "Frameworks/AIUtilities Framework/Source/AIAutoScrollView.h"; sourceTree = "<group>"; };
 		6334FFA80F9C14C1003C77A9 /* AIAutoScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIAutoScrollView.m; path = "Frameworks/AIUtilities Framework/Source/AIAutoScrollView.m"; sourceTree = "<group>"; };
-		6334FFAA0F9C14C1003C77A9 /* AIAppleScriptAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIAppleScriptAdditions.h; path = "Frameworks/AIUtilities Framework/Source/AIAppleScriptAdditions.h"; sourceTree = "<group>"; };
-		6334FFAB0F9C14C1003C77A9 /* AIAppleScriptAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIAppleScriptAdditions.m; path = "Frameworks/AIUtilities Framework/Source/AIAppleScriptAdditions.m"; sourceTree = "<group>"; };
 		6334FFAC0F9C14C1003C77A9 /* AIApplicationAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIApplicationAdditions.h; path = "Frameworks/AIUtilities Framework/Source/AIApplicationAdditions.h"; sourceTree = "<group>"; };
 		6334FFAD0F9C14C1003C77A9 /* AIApplicationAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIApplicationAdditions.m; path = "Frameworks/AIUtilities Framework/Source/AIApplicationAdditions.m"; sourceTree = "<group>"; };
 		6334FFAE0F9C14C1003C77A9 /* AIArrayAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIArrayAdditions.h; path = "Frameworks/AIUtilities Framework/Source/AIArrayAdditions.h"; sourceTree = "<group>"; };
@@ -7806,8 +7802,6 @@
 		6334FFA90F9C14C1003C77A9 /* Additions */ = {
 			isa = PBXGroup;
 			children = (
-				6334FFAA0F9C14C1003C77A9 /* AIAppleScriptAdditions.h */,
-				6334FFAB0F9C14C1003C77A9 /* AIAppleScriptAdditions.m */,
 				6334FFAC0F9C14C1003C77A9 /* AIApplicationAdditions.h */,
 				6334FFAD0F9C14C1003C77A9 /* AIApplicationAdditions.m */,
 				6334FFAE0F9C14C1003C77A9 /* AIArrayAdditions.h */,
@@ -9059,7 +9053,6 @@
 				6334006F0F9C14C2003C77A9 /* AISmartStepper.h in Headers */,
 				633400710F9C14C2003C77A9 /* AISendingTextView.h in Headers */,
 				633400730F9C14C2003C77A9 /* AIAutoScrollView.h in Headers */,
-				633400750F9C14C2003C77A9 /* AIAppleScriptAdditions.h in Headers */,
 				633400770F9C14C2003C77A9 /* AIApplicationAdditions.h in Headers */,
 				633400790F9C14C2003C77A9 /* AIArrayAdditions.h in Headers */,
 				6334007B0F9C14C2003C77A9 /* AIAttributedStringAdditions.h in Headers */,
@@ -10558,7 +10551,6 @@
 				633400700F9C14C2003C77A9 /* AISmartStepper.m in Sources */,
 				633400720F9C14C2003C77A9 /* AISendingTextView.m in Sources */,
 				633400740F9C14C2003C77A9 /* AIAutoScrollView.m in Sources */,
-				633400760F9C14C2003C77A9 /* AIAppleScriptAdditions.m in Sources */,
 				633400780F9C14C2003C77A9 /* AIApplicationAdditions.m in Sources */,
 				6334007A0F9C14C2003C77A9 /* AIArrayAdditions.m in Sources */,
 				6334007C0F9C14C2003C77A9 /* AIAttributedStringAdditions.m in Sources */,
diff -r 0db8c654ce7f -r 4db4f8ff70e6 Frameworks/AIUtilities Framework/Source/AIAppleScriptAdditions.h
--- a/Frameworks/AIUtilities Framework/Source/AIAppleScriptAdditions.h	Wed Apr 29 00:52:22 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-//
-//  AIAppleScriptAdditions.h
-//  Adium
-//
-//  Created by Adam Iser on Mon Feb 16 2004.
-//  Copyright (c) 2004-2005 The Adium Team. All rights reserved.
-//
-
-/*!
- * @category NSAppleScript(AIAppleScriptAdditions)
- * @brief Provides methods for executing functions in an NSAppleScript
- *
- * These methods allow functions to be executed within an NSApplescript and arguments to be passed to those functions
- */
- at interface NSAppleScript (AIAppleScriptAdditions)
-
-/*!
- * @brief Execute a function
- *
- * Executes a function <b>functionName</b> within the <tt>NSAppleScript</tt>, returning error information if necessary
- * @param functionName An <tt>NSString</tt> of the function to be called. It is case sensitive.
- * @param errorInfo A reference to an <tt>NSDictionary</tt> variable, which will be filled with error information if needed. It may be nil if error information is not requested.
- * @return An <tt>NSAppleEventDescriptor</tt> generated by executing the function.
- */
-- (NSAppleEventDescriptor *)executeFunction:(NSString *)functionName error:(NSDictionary **)errorInfo;
-
-/*!
- * @brief Execute a function with arguments
- *
- * Executes a function <b>functionName</b> within the <tt>NSAppleScript</tt>, returning error information if necessary. Arguments in <b>argumentArray</b> are passed to the function.
- * @param functionName An <tt>NSString</tt> of the function to be called. It is case sensitive.
- * @param argumentArray An <tt>NSArray</tt> of <tt>NSString</tt>s to be passed to the function when it is called.
- * @param errorInfo A reference to an <tt>NSDictionary</tt> variable, which will be filled with error information if needed. It may be nil if error information is not requested.
- * @return An <tt>NSAppleEventDescriptor</tt> generated by executing the function.
- */
-- (NSAppleEventDescriptor *)executeFunction:(NSString *)functionName withArguments:(NSArray *)argumentArray error:(NSDictionary **)errorInfo;
-
- at end
diff -r 0db8c654ce7f -r 4db4f8ff70e6 Frameworks/AIUtilities Framework/Source/AIAppleScriptAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AIAppleScriptAdditions.m	Wed Apr 29 00:52:22 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-//
-//  AIAppleScriptAdditions.m
-//  Adium
-//
-//  Created by Adam Iser on Mon Feb 16 2004.
-//  Copyright (c) 2004-2005 The Adium Team. All rights reserved.
-//
-
-#import "AIAppleScriptAdditions.h"
-#import <Carbon/Carbon.h>
-
- at implementation NSAppleScript (AIAppleScriptAdditions)
-
-//Execute an applescript function
-- (NSAppleEventDescriptor *)executeFunction:(NSString *)functionName error:(NSDictionary **)errorInfo
-{
-	return [self executeFunction:functionName withArguments:nil error:errorInfo];
-}
-
-- (NSAppleEventDescriptor *)executeFunction:(NSString *)functionName withArguments:(NSArray *)argumentArray error:(NSDictionary **)errorInfo
-{
-	NSAppleEventDescriptor	*thisApplication;
-	NSAppleEventDescriptor	*containerEvent;
-
-	//Get a descriptor for ourself
-	int pid = [[NSProcessInfo processInfo] processIdentifier];
-	thisApplication = [NSAppleEventDescriptor descriptorWithDescriptorType:typeKernelProcessID
-																	 bytes:&pid
-																	length:sizeof(pid)];
-	
-	//Create the container event
-	containerEvent = [NSAppleEventDescriptor appleEventWithEventClass:kASAppleScriptSuite
-															  eventID:kASSubroutineEvent
-													 targetDescriptor:thisApplication
-															 returnID:kAutoGenerateReturnID
-														transactionID:kAnyTransactionID];
-	
-	//Set the target function
-	[containerEvent setParamDescriptor:[NSAppleEventDescriptor descriptorWithString:functionName]
-							forKeyword:keyASSubroutineName];
-	
-	//Pass arguments - arguments is expecting an NSArray with only NSString objects
-	if ([argumentArray count]) {
-		NSAppleEventDescriptor  *arguments = [[[NSAppleEventDescriptor alloc] initListDescriptor] autorelease];
-		NSEnumerator			*enumerator = [argumentArray objectEnumerator];
-		NSString				*object;
-
-		while ((object = [enumerator nextObject])) {
-			[arguments insertDescriptor:[NSAppleEventDescriptor descriptorWithString:object]
-								atIndex:[arguments numberOfItems]+1]; //This +1 seems wrong... but it's not :)
-		}
-		
-		[containerEvent setParamDescriptor:arguments forKeyword:keyDirectObject];
-	}
-	
-	//Execute the event
-	return [self executeAppleEvent:containerEvent error:nil];
-}
-
- at end
diff -r 0db8c654ce7f -r 4db4f8ff70e6 Frameworks/AIUtilities Framework/Source/AIEventAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AIEventAdditions.m	Wed Apr 29 00:52:22 2009 -0700
+++ b/Frameworks/AIUtilities Framework/Source/AIEventAdditions.m	Wed Apr 29 01:20:07 2009 -0700
@@ -20,35 +20,35 @@
 
 //There seems to be a bug in OS X which causes cocoa calls for the current modifier key to fail during application launch, so we use the carbon calls.
 + (BOOL)cmdKey{
-    return (((GetCurrentKeyModifiers() & (cmdKey)) != 0) ? YES : NO);
+    return (GetCurrentKeyModifiers() & cmdKey) != 0;
 }
 
 + (BOOL)shiftKey{
-    return (((GetCurrentKeyModifiers() & (shiftKey | rightShiftKey)) != 0) ? YES : NO);
+    return (GetCurrentKeyModifiers() & (shiftKey | rightShiftKey)) != 0;
 }
 
 + (BOOL)optionKey{
-    return (((GetCurrentKeyModifiers() & (optionKey | rightOptionKey)) != 0) ? YES : NO);
+    return (GetCurrentKeyModifiers() & (optionKey | rightOptionKey)) != 0;
 }
 
 + (BOOL)controlKey{
-    return (((GetCurrentKeyModifiers() & (controlKey | rightControlKey)) != 0) ? YES : NO);
+    return (GetCurrentKeyModifiers() & (controlKey | rightControlKey)) != 0;
 }
 
 - (BOOL)cmdKey{
-    return ( ([self modifierFlags] & NSCommandKeyMask) != 0 );
+    return ([self modifierFlags] & NSCommandKeyMask) != 0;
 }
 
 - (BOOL)shiftKey{
-    return ( ([self modifierFlags] & NSShiftKeyMask) != 0 );
+    return ([self modifierFlags] & NSShiftKeyMask) != 0;
 }
 
 - (BOOL)optionKey{
-    return ( ([self modifierFlags] & NSAlternateKeyMask) != 0);
+    return ([self modifierFlags] & NSAlternateKeyMask) != 0;
 }
 
 - (BOOL)controlKey{
-    return ( ([self modifierFlags] & NSControlKeyMask) != 0);
+    return ([self modifierFlags] & NSControlKeyMask) != 0;
 }
 
 @end




More information about the commits mailing list