From 2565e3ebe572969154b66b87f0817858104ccc69 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 28 Jan 2005 22:40:05 +0000 Subject: [PATCH] active the correct tab when we double click on an iter for which the chat window is already opened --- plugins/gtkgui/gtkgui.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index da41ffc23..afb5add7b 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -356,6 +356,11 @@ class tabbed_chat_Window: self.redraw_tab(jid) self.show_title() self.plugin.systray.remove_jid(jid, self.account) + + def active_tab(self, jid): + child = self.xmls[jid].get_widget("vbox_tab") + nb = self.xml.get_widget("notebook") + nb.set_current_page(nb.page_num(child)) def new_user(self, user): self.nb_unread[user.jid] = 0 @@ -1988,7 +1993,10 @@ class roster_Window: self.tree.expand_row(path, False) else: if self.plugin.windows[account]['chats'].has_key(jid): - self.plugin.windows[account]['chats'][jid].window.present() + if USE_TABBED_CHAT: + self.plugin.windows[account]['chats'][jid].active_tab(jid) + else: + self.plugin.windows[account]['chats'][jid].window.present() elif self.contacts[account].has_key(jid): self.new_chat(self.contacts[account][jid][0], account)