From 7fbfa0547daccbbe3976f333330556a992b51f85 Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard Date: Thu, 5 Jun 2008 15:09:17 +0000 Subject: [PATCH] Regroup window.present() calls. See #3908. --- src/chat_control.py | 2 +- src/gajim.py | 6 ------ src/groupchat_control.py | 1 - src/message_window.py | 1 + src/roster_window.py | 3 --- src/systray.py | 1 - 6 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/chat_control.py b/src/chat_control.py index 79d97d42b..a4a7883c0 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -2039,7 +2039,7 @@ class ChatControl(ChatControlBase): # Clean events gajim.events.remove_events(self.account, self.get_full_jid(), types = ['printed_' + self.type_id, self.type_id]) - # remove all register handlers on wigets, created by self.xml + # remove all register handlers on widgets, created by self.xml # to prevent circular references among objects for i in self.handlers.keys(): if self.handlers[i].handler_is_connected(i): diff --git a/src/gajim.py b/src/gajim.py index a9e6a62b0..cd083bf1a 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -2522,7 +2522,6 @@ class Interface: self.roster.draw_contact(jid, account) if w: w.set_active_tab(ctrl) - w.window.present() w.window.window.focus() # Using isinstance here because we want to catch all derived types if isinstance(ctrl, ChatControlBase): @@ -2764,7 +2763,6 @@ class Interface: gajim.gc_connected[account][room_jid]: gc_ctrl = self.msg_win_mgr.get_gc_control(room_jid, account) win = gc_ctrl.parent_win - win.window.present() win.set_active_tab(gc_ctrl) dialogs.ErrorDialog(_('You are already in group chat %s') % room_jid) return @@ -2792,7 +2790,6 @@ class Interface: if not minimized_control_exists: gc_control = self.msg_win_mgr.get_gc_control(room_jid, account) gc_control.parent_win.set_active_tab(gc_control) - gc_control.parent_win.window.present() gajim.connections[account].join_gc(nick, room_jid, password) if password: gajim.gc_passwords[room_jid] = password @@ -2892,7 +2889,6 @@ class Interface: mw = session.control.parent_win mw.set_active_tab(session.control) - mw.window.present() # For JEP-0172 if added_to_roster: session.control.user_nick = gajim.nicks[account] @@ -2931,8 +2927,6 @@ class Interface: for ctrl in win.get_controls(fjid, account): ctrl.got_disconnected() - win.window.present() - ################################################################################ ### Other Methods ################################################################################ diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 6b8e425c2..cf8e3bc2d 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -2076,7 +2076,6 @@ class GroupchatControl(ChatControlBase): ctrl = win.get_controls(nick_jid, self.account)[0] win.set_active_tab(ctrl) - win.window.present() return ctrl diff --git a/src/message_window.py b/src/message_window.py index 0cc0d61bd..a457318d2 100644 --- a/src/message_window.py +++ b/src/message_window.py @@ -448,6 +448,7 @@ class MessageWindow(object): def set_active_tab(self, ctrl): ctrl_page = self.notebook.page_num(ctrl.widget) self.notebook.set_current_page(ctrl_page) + self.window.present() def remove_tab(self, ctrl, method, reason = None, force = False): '''reason is only for gc (offline status message) diff --git a/src/roster_window.py b/src/roster_window.py index 78d2515b4..1f60581df 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1156,7 +1156,6 @@ class RosterWindow: gajim.gc_connected[account][room_jid]: win = gajim.interface.msg_win_mgr.get_window(room_jid, account) ctrl = gajim.interface.msg_win_mgr.get_gc_control(room_jid, account) - win.window.present() win.set_active_tab(ctrl) dialogs.ErrorDialog(_('You are already in group chat %s') % room_jid) return @@ -1185,7 +1184,6 @@ class RosterWindow: gc_win = gajim.interface.msg_win_mgr.get_window(room_jid, account) gc_control = gc_win.get_gc_control(room_jid, account) gc_win.set_active_tab(gc_control) - gc_win.window.present() gajim.connections[account].join_gc(nick, room_jid, password) if password: gajim.gc_passwords[room_jid] = password @@ -2813,7 +2811,6 @@ class RosterWindow: ctrl.parent_win = mw mw.new_tab(ctrl) mw.set_active_tab(ctrl) - mw.window.present() del gajim.interface.minimized_controls[account][jid] self.remove_groupchat(jid, account) diff --git a/src/systray.py b/src/systray.py index b9df2c287..a2f0c10fb 100644 --- a/src/systray.py +++ b/src/systray.py @@ -109,7 +109,6 @@ class Systray: if gajim.interface.msg_win_mgr.has_window(jid, account): gajim.interface.msg_win_mgr.get_window(jid, account).set_active_tab( jid, account) - gajim.interface.msg_win_mgr.get_window(jid, account).window.present() elif contact: gajim.interface.new_chat(contact, account) gajim.interface.msg_win_mgr.get_window(jid, account).set_active_tab(