Regroup window.present() calls. See #3908.

This commit is contained in:
Jean-Marie Traissard 2008-06-05 15:09:17 +00:00
parent e487aa7802
commit 7fbfa0547d
6 changed files with 2 additions and 12 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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