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

This commit is contained in:
Nikos Kouremenos 2005-07-18 17:18:25 +00:00
parent f088e4203a
commit bee9df2142
3 changed files with 6 additions and 3 deletions

View File

@ -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))

View File

@ -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):

View File

@ -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()