adium 2360:7d004b148df5: Fix dragging/dropping text and files on...
commits at adium.im
commits at adium.im
Thu May 28 04:40:38 UTC 2009
details: http://hg.adium.im/adium/rev/7d004b148df5
revision: 2360:7d004b148df5
author: Zachary West <zacw at adium.im>
date: Thu May 28 00:31:58 2009 -0400
Fix dragging/dropping text and files onto a bookmark.
Subject: adium 2361:ff9f4f1bd5bb: I think this release is a little too overzealous.
details: http://hg.adium.im/adium/rev/ff9f4f1bd5bb
revision: 2361:ff9f4f1bd5bb
author: Zachary West <zacw at adium.im>
date: Thu May 28 00:36:27 2009 -0400
I think this release is a little too overzealous.
Subject: adium 2362:da445a448b9f: Don't release here either.
details: http://hg.adium.im/adium/rev/da445a448b9f
revision: 2362:da445a448b9f
author: Zachary West <zacw at adium.im>
date: Thu May 28 00:40:30 2009 -0400
Don't release here either.
diffstat:
Frameworks/Adium Framework/Source/AIListBookmark.h | 2 +-
Frameworks/Adium Framework/Source/AIListBookmark.m | 6 +++++-
Plugins/Image Uploading Plugin/AIPicImImageUploader.m | 10 ----------
Source/AIListController.m | 21 +++++++++++++++++----
4 files changed, 23 insertions(+), 16 deletions(-)
diffs (116 lines):
diff -r 805e6f9d8ad3 -r da445a448b9f Frameworks/Adium Framework/Source/AIListBookmark.h
--- a/Frameworks/Adium Framework/Source/AIListBookmark.h Wed May 27 21:05:17 2009 -0700
+++ b/Frameworks/Adium Framework/Source/AIListBookmark.h Thu May 28 00:40:30 2009 -0400
@@ -27,6 +27,6 @@
@property (readonly, nonatomic) NSString *name;
@property (readonly, nonatomic) NSDictionary *chatCreationDictionary;
-- (void)openChat;
+- (AIChat *)openChat;
@end
diff -r 805e6f9d8ad3 -r da445a448b9f Frameworks/Adium Framework/Source/AIListBookmark.m
--- a/Frameworks/Adium Framework/Source/AIListBookmark.m Wed May 27 21:05:17 2009 -0700
+++ b/Frameworks/Adium Framework/Source/AIListBookmark.m Thu May 28 00:40:30 2009 -0400
@@ -245,10 +245,12 @@
/*!
* @brief Open our chat
*
+ * @return A chat for the bookmark
+ *
* This is called when we are double-clicked in the contact list.
* Either find or create a chat appropriately, and activate it.
*/
-- (void)openChat
+- (AIChat *)openChat
{
AIChat *chat = [self openChatWithoutActivating];
@@ -257,6 +259,8 @@
}
[adium.interfaceController setActiveChat:chat];
+
+ return chat;
}
/*!
diff -r 805e6f9d8ad3 -r da445a448b9f Plugins/Image Uploading Plugin/AIPicImImageUploader.m
--- a/Plugins/Image Uploading Plugin/AIPicImImageUploader.m Wed May 27 21:05:17 2009 -0700
+++ b/Plugins/Image Uploading Plugin/AIPicImImageUploader.m Thu May 28 00:40:30 2009 -0400
@@ -21,7 +21,6 @@
chat:(AIChat *)inChat;
- (void)uploadImage;
- (void)parseResponse:(NSData *)data;
-- (void)finishResponse;
@end
@implementation AIPicImImageUploader
@@ -150,8 +149,6 @@
{
AILogWithSignature(@"%@", [error localizedDescription]);
- [responseParser release]; responseParser = nil;
-
[uploader errorWithMessage:[error localizedDescription] forChat:chat];
}
@@ -189,13 +186,6 @@
}
- (void)parserDidEndDocument:(NSXMLParser *)parser
-{
- [responseParser release]; responseParser = nil;
-
- [self finishResponse];
-}
-
-- (void)finishResponse
{
NSDictionary *status = [[response objectForKey:@"trim"] objectForKey:@"status"];
diff -r 805e6f9d8ad3 -r da445a448b9f Source/AIListController.m
--- a/Source/AIListController.m Wed May 27 21:05:17 2009 -0700
+++ b/Source/AIListController.m Thu May 28 00:40:30 2009 -0400
@@ -29,6 +29,7 @@
#import <Adium/AIListContact.h>
#import <Adium/AIListGroup.h>
#import <Adium/AIListObject.h>
+#import <Adium/AIListBookmark.h>
#import <Adium/AIContactList.h>
#import <Adium/AIMetaContact.h>
#import <Adium/AIListOutlineView.h>
@@ -810,8 +811,14 @@
[attachment release];
}
- AIChat *chat = [adium.chatController openChatWithContact:(AIListContact *)(item.listObject)
- onPreferredAccount:YES];
+ AIChat *chat = nil;
+
+ if ([item.listObject isKindOfClass:[AIListBookmark class]]) {
+ chat = [item.listObject openChat];
+ } else {
+ chat = [adium.chatController openChatWithContact:(AIListContact *)(item.listObject)
+ onPreferredAccount:YES];
+ }
[chat.chatContainer.messageViewController addToTextEntryView:mutableString];
@@ -846,8 +853,14 @@
}
if(messageAttributedString && [messageAttributedString length] !=0) {
- chat = [adium.chatController openChatWithContact:(AIListContact *)(item.listObject)
- onPreferredAccount:YES];
+ AIChat *chat = nil;
+
+ if ([item.listObject isKindOfClass:[AIListBookmark class]]) {
+ chat = [item.listObject openChat];
+ } else {
+ chat = [adium.chatController openChatWithContact:(AIListContact *)(item.listObject)
+ onPreferredAccount:YES];
+ }
[chat.chatContainer.messageViewController addToTextEntryView:messageAttributedString];
More information about the commits
mailing list