adium 2261:64a72fff7362: Add any text dragged to a contact in th...
commits at adium.im
commits at adium.im
Thu May 21 17:49:59 UTC 2009
details: http://hg.adium.im/adium/rev/64a72fff7362
revision: 2261:64a72fff7362
author: Zachary West <zacw at adium.im>
date: Thu May 21 13:49:32 2009 -0400
Add any text dragged to a contact in the list to the input line. Refs #12089.
diffstat:
Source/AIListController.m | 25 ++++---------------------
1 files changed, 4 insertions(+), 21 deletions(-)
diffs (50 lines):
diff -r 4820d804caeb -r 64a72fff7362 Source/AIListController.m
--- a/Source/AIListController.m Wed May 20 23:17:17 2009 -0400
+++ b/Source/AIListController.m Thu May 21 13:49:32 2009 -0400
@@ -17,6 +17,7 @@
#import "AIListController.h"
#import "AIAnimatingListOutlineView.h"
#import "AIListWindowController.h"
+#import "AIMessageViewController.h"
#import <Adium/AIChat.h>
#import <Adium/AIChatControllerProtocol.h>
#import <Adium/AIContactControllerProtocol.h>
@@ -807,7 +808,6 @@
if ([item isKindOfClass:[AIListContact class]]) {
/* This will send the message. Alternately, we could just insert it into the text view... */
AIChat *chat;
- AIContentMessage *messageContent;
NSAttributedString *messageAttributedString = nil;
if ([availableType isEqualToString:NSRTFPboardType]) {
@@ -824,27 +824,10 @@
}
if(messageAttributedString && [messageAttributedString length] !=0) {
- NSString *title = [NSString stringWithFormat:AILocalizedString(@"Send Text to %@", "Window title to the text send confirmation window"), ((AIListObject *)item).displayName];
+ chat = [adium.chatController openChatWithContact:(AIListContact *)(item.listObject)
+ onPreferredAccount:YES];
- NSString *question = [NSString stringWithFormat:AILocalizedString(@"Are you sure you want to send the text to %@?", "Question asked in the file transfer confirmation window"),
- ((AIListObject *)item).displayName];
-
- if (NSRunAlertPanel(title,
- question,
- AILocalizedString(@"Send Text", nil),
- AILocalizedString(@"Cancel", nil),
- nil) == NSAlertDefaultReturn) {
- chat = [adium.chatController openChatWithContact:(AIListContact *)(item.listObject)
- onPreferredAccount:YES];
- messageContent = [AIContentMessage messageInChat:chat
- withSource:chat.account
- destination:chat.listObject
- date:nil
- message:messageAttributedString
- autoreply:NO];
-
- [adium.contentController sendContentObject:messageContent];
- }
+ [chat.chatContainer.messageViewController addToTextEntryView:messageAttributedString];
}
else {
success = NO;
More information about the commits
mailing list