From bee9df2142ff58af97d316fa84992c17b2b8aad6 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Mon, 18 Jul 2005 17:18:25 +0000 Subject: [PATCH] evil send_message in TC sends in active jid. so you need to set_active_tab before sending message. I put that as a comment in both places --- src/config.py | 2 +- src/groupchat_window.py | 5 ++++- src/tabbed_chat_window.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/config.py b/src/config.py index 842b89fae..b918ed89c 100644 --- a/src/config.py +++ b/src/config.py @@ -1809,7 +1809,7 @@ class ManageEmoticonsWindow: if not iter: return file = model.get_value(iter, 1) - dialog = gtk.FileChooserDialog(_('Choose Ιmage'), None, + dialog = gtk.FileChooserDialog(_('Choose Image'), None, gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) diff --git a/src/groupchat_window.py b/src/groupchat_window.py index 9e86d2abc..b4bf13c8a 100644 --- a/src/groupchat_window.py +++ b/src/groupchat_window.py @@ -688,9 +688,12 @@ class GroupchatWindow(chat.Chat): u = Contact(jid = fjid, name = nick, groups = ['none'], show = show, sub = 'none') self.plugin.roster.new_chat(u, self.account) + + #make active here in case we need to send a message + self.plugin.windows[self.account]['chats'][fjid].set_active_tab(fjid) + if msg: self.plugin.windows[self.account]['chats'][fjid].send_message(msg) - self.plugin.windows[self.account]['chats'][fjid].set_active_tab(fjid) self.plugin.windows[self.account]['chats'][fjid].window.present() def on_voice_checkmenuitem_activate(self, widget, room_jid, nick): diff --git a/src/tabbed_chat_window.py b/src/tabbed_chat_window.py index bb6d8d07d..56af78cef 100644 --- a/src/tabbed_chat_window.py +++ b/src/tabbed_chat_window.py @@ -329,7 +329,7 @@ class TabbedChatWindow(chat.Chat): return True # override the default gtk+ thing for ctrl+down def send_message(self, message): - """Send the message given in the args""" + """Send the message given to the active tab""" if not message: return jid = self.get_active_jid()