adium 4839:ba605f0e271c: Fix #14081 by undoing old/69938621a779,...

commits at adium.im commits at adium.im
Sat Jun 2 14:54:35 UTC 2012


details:	http://hg.adium.im/adium/rev/ba605f0e271c
revision:	4839:ba605f0e271c
branch:		(none)
author:		Frank Dowsett <wixardy at adium.im>
date:		Sat Jun 02 10:51:31 2012 -0400

Fix #14081 by undoing old/69938621a779, the Office clips work properly now by default and regular ones can again be used.
Subject: adium 4840:26c6b254cb38: Add some casts to fix some compile errors.

details:	http://hg.adium.im/adium/rev/26c6b254cb38
revision:	4840:26c6b254cb38
branch:		(none)
author:		Frank Dowsett <wixardy at adium.im>
date:		Sat Jun 02 10:51:31 2012 -0400

Add some casts to fix some compile errors.

diffs (85 lines):

diff -r d51a831588dc -r 26c6b254cb38 Frameworks/Adium Framework/Source/AIChat.m
--- a/Frameworks/Adium Framework/Source/AIChat.m	Mon May 21 22:51:41 2012 +0200
+++ b/Frameworks/Adium Framework/Source/AIChat.m	Sat Jun 02 10:51:31 2012 -0400
@@ -398,7 +398,7 @@
 		if(flagA > flagB) {
 			return (NSComparisonResult)NSOrderedAscending;
 		} else if (flagA < flagB) {
-			return NSOrderedDescending;
+			return (NSComparisonResult)NSOrderedDescending;
 		} else {
 			return [[self displayNameForContact:objectA] localizedCaseInsensitiveCompare:[self displayNameForContact:objectB]];
 		}
diff -r d51a831588dc -r 26c6b254cb38 Frameworks/Adium Framework/Source/AIMessageEntryTextView.m
--- a/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m	Mon May 21 22:51:41 2012 +0200
+++ b/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m	Sat Jun 02 10:51:31 2012 -0400
@@ -1380,8 +1380,7 @@
 	NSString *myType = [[pasteboard types] firstObjectCommonWithArray:FILES_AND_IMAGES_TYPES];
 	NSString *superclassType = [[pasteboard types] firstObjectCommonWithArray:PASS_TO_SUPERCLASS_DRAG_TYPE_ARRAY];
 	
-	if (myType &&
-		(!superclassType || ([[pasteboard types] indexOfObject:myType] < [[pasteboard types] indexOfObject:superclassType]))) {
+	if (myType && !superclassType) {
 		[self addAttachmentsFromPasteboard:pasteboard];
 		
 		success = YES;		
@@ -1542,38 +1541,15 @@
  */
 - (void)addAttachmentOfPath:(NSString *)inPath
 {
-	if ([[inPath pathExtension] caseInsensitiveCompare:@"textClipping"] == NSOrderedSame) {
-		inPath = [inPath stringByAppendingString:@"/..namedfork/rsrc"];
-
-		NSData *data = [NSData dataWithContentsOfFile:inPath];
-		if (data) {
-			data = [data subdataWithRange:NSMakeRange(260, [data length] - 260)];
-			
-			NSAttributedString *clipping = [[[NSAttributedString alloc] initWithRTF:data documentAttributes:nil] autorelease];
-			if (clipping) {
-				NSDictionary	*attributes = [[self typingAttributes] copy];
-				
-				[self insertText:clipping];
-
-				if (attributes) {
-					[self setTypingAttributes:attributes];
-				}
-				
-				[attributes release];
-			}
-		}
-
-	} else {
-		AITextAttachmentExtension   *attachment = [[AITextAttachmentExtension alloc] init];
-		[attachment setPath:inPath];
-		[attachment setString:[inPath lastPathComponent]];
-		[attachment setShouldSaveImageForLogging:YES];
-		
-		//Insert an attributed string into the text at the current insertion point
-		[self insertText:[self attributedStringWithTextAttachmentExtension:attachment]];
-		
-		[attachment release];
-	}
+	AITextAttachmentExtension   *attachment = [[AITextAttachmentExtension alloc] init];
+	[attachment setPath:inPath];
+	[attachment setString:[inPath lastPathComponent]];
+	[attachment setShouldSaveImageForLogging:YES];
+	
+	//Insert an attributed string into the text at the current insertion point
+	[self insertText:[self attributedStringWithTextAttachmentExtension:attachment]];
+	
+	[attachment release];
 }
 
 /*!
diff -r d51a831588dc -r 26c6b254cb38 Source/ESContactAlertsController.m
--- a/Source/ESContactAlertsController.m	Mon May 21 22:51:41 2012 +0200
+++ b/Source/ESContactAlertsController.m	Sat Jun 02 10:51:31 2012 -0400
@@ -246,7 +246,7 @@
 			return (NSComparisonResult)NSOrderedAscending;
 			
 		} else if (groupB < groupA) {
-			return NSOrderedDescending;
+			return (NSComparisonResult)NSOrderedDescending;
 			
 		} else {
 			NSString	*descriptionA = [eventHandlerA globalShortDescriptionForEventID:objectA];




More information about the commits mailing list