From 184542a4d131d685a7023c32688d115ff5ddd1d1 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 27 Apr 2005 19:09:34 +0000 Subject: [PATCH] when we double click on a contact (or when we click on the systray icon), present the chat_window. idem for gc window --- src/dialogs.py | 2 ++ src/roster_window.py | 7 ++----- src/systray.py | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dialogs.py b/src/dialogs.py index 91ad53e97..933a4a676 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -531,6 +531,8 @@ class Join_groupchat_window: self.recently_groupchat = self.recently_groupchat[0:10] gajim.config.set('recently_groupchat', ' '.join(self.recently_groupchat)) self.plugin.roster.new_room(jid, nickname, self.account) + self.plugin.windows[account]['gc'][jid].active_tab(jid) + self.plugin.windows[account]['gc'][jid].window.present() gajim.connections[self.account].join_gc(nickname, room, server, password) self.window.destroy() diff --git a/src/roster_window.py b/src/roster_window.py index 74f840aba..f6f92343f 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -894,8 +894,6 @@ class Roster_window: self.plugin.windows[account]['gc']['tabbed'].new_room(jid, nick) self.plugin.windows[account]['gc'][jid] = \ self.plugin.windows[account]['gc']['tabbed'] - self.plugin.windows[account]['gc']['tabbed'].window.present() - self.plugin.windows[account]['gc']['tabbed'].active_tab(jid) else: self.plugin.windows[account]['gc'][jid] = \ groupchat_window.Groupchat_window(jid, nick, self.plugin, account) @@ -1081,12 +1079,11 @@ class Roster_window: self.tree.expand_row(path, False) else: if self.plugin.windows[account]['chats'].has_key(jid): - if gajim.config.get('usetabbedchat'): - self.plugin.windows[account]['chats'][jid].active_tab(jid) - self.plugin.windows[account]['chats'][jid].window.present() + self.plugin.windows[account]['chats'][jid].active_tab(jid) elif self.contacts[account].has_key(jid): self.new_chat(self.contacts[account][jid][0], account) self.plugin.windows[account]['chats'][jid].active_tab(jid) + self.plugin.windows[account]['chats'][jid].window.present() def on_roster_treeview_row_expanded(self, widget, iter, path): '''When a row is expanded change the icon of the arrow''' diff --git a/src/systray.py b/src/systray.py index f1c0150d4..c893a8f0e 100644 --- a/src/systray.py +++ b/src/systray.py @@ -207,6 +207,7 @@ class Systray: else: self.plugin.roster.new_chat( self.plugin.roster.contacts[account][jid][0], account) + acc['chats'][jid].window.present() if event.button == 3: # right click self.make_menu(event)