--- 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];
- (!superclassType || ([[pasteboard types] indexOfObject:myType] < [[pasteboard types] indexOfObject:superclassType]))) {
+ if (myType && !superclassType) { [self addAttachmentsFromPasteboard:pasteboard];
@@ -1542,38 +1541,15 @@
- (void)addAttachmentOfPath:(NSString *)inPath
- if ([[inPath pathExtension] caseInsensitiveCompare:@"textClipping"] == NSOrderedSame) {
- inPath = [inPath stringByAppendingString:@"/..namedfork/rsrc"];
- NSData *data = [NSData dataWithContentsOfFile:inPath];
- data = [data subdataWithRange:NSMakeRange(260, [data length] - 260)];
- NSAttributedString *clipping = [[[NSAttributedString alloc] initWithRTF:data documentAttributes:nil] autorelease];
- NSDictionary *attributes = [[self typingAttributes] copy];
- [self insertText:clipping];
- [self setTypingAttributes:attributes];
- 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]];
+ 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]];