Regroup window.present() calls. See #3908.
This commit is contained in:
parent
e487aa7802
commit
7fbfa0547d
|
@ -2039,7 +2039,7 @@ class ChatControl(ChatControlBase):
|
||||||
# Clean events
|
# Clean events
|
||||||
gajim.events.remove_events(self.account, self.get_full_jid(),
|
gajim.events.remove_events(self.account, self.get_full_jid(),
|
||||||
types = ['printed_' + self.type_id, self.type_id])
|
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
|
# to prevent circular references among objects
|
||||||
for i in self.handlers.keys():
|
for i in self.handlers.keys():
|
||||||
if self.handlers[i].handler_is_connected(i):
|
if self.handlers[i].handler_is_connected(i):
|
||||||
|
|
|
@ -2522,7 +2522,6 @@ class Interface:
|
||||||
self.roster.draw_contact(jid, account)
|
self.roster.draw_contact(jid, account)
|
||||||
if w:
|
if w:
|
||||||
w.set_active_tab(ctrl)
|
w.set_active_tab(ctrl)
|
||||||
w.window.present()
|
|
||||||
w.window.window.focus()
|
w.window.window.focus()
|
||||||
# Using isinstance here because we want to catch all derived types
|
# Using isinstance here because we want to catch all derived types
|
||||||
if isinstance(ctrl, ChatControlBase):
|
if isinstance(ctrl, ChatControlBase):
|
||||||
|
@ -2764,7 +2763,6 @@ class Interface:
|
||||||
gajim.gc_connected[account][room_jid]:
|
gajim.gc_connected[account][room_jid]:
|
||||||
gc_ctrl = self.msg_win_mgr.get_gc_control(room_jid, account)
|
gc_ctrl = self.msg_win_mgr.get_gc_control(room_jid, account)
|
||||||
win = gc_ctrl.parent_win
|
win = gc_ctrl.parent_win
|
||||||
win.window.present()
|
|
||||||
win.set_active_tab(gc_ctrl)
|
win.set_active_tab(gc_ctrl)
|
||||||
dialogs.ErrorDialog(_('You are already in group chat %s') % room_jid)
|
dialogs.ErrorDialog(_('You are already in group chat %s') % room_jid)
|
||||||
return
|
return
|
||||||
|
@ -2792,7 +2790,6 @@ class Interface:
|
||||||
if not minimized_control_exists:
|
if not minimized_control_exists:
|
||||||
gc_control = self.msg_win_mgr.get_gc_control(room_jid, account)
|
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.set_active_tab(gc_control)
|
||||||
gc_control.parent_win.window.present()
|
|
||||||
gajim.connections[account].join_gc(nick, room_jid, password)
|
gajim.connections[account].join_gc(nick, room_jid, password)
|
||||||
if password:
|
if password:
|
||||||
gajim.gc_passwords[room_jid] = password
|
gajim.gc_passwords[room_jid] = password
|
||||||
|
@ -2892,7 +2889,6 @@ class Interface:
|
||||||
|
|
||||||
mw = session.control.parent_win
|
mw = session.control.parent_win
|
||||||
mw.set_active_tab(session.control)
|
mw.set_active_tab(session.control)
|
||||||
mw.window.present()
|
|
||||||
# For JEP-0172
|
# For JEP-0172
|
||||||
if added_to_roster:
|
if added_to_roster:
|
||||||
session.control.user_nick = gajim.nicks[account]
|
session.control.user_nick = gajim.nicks[account]
|
||||||
|
@ -2931,8 +2927,6 @@ class Interface:
|
||||||
for ctrl in win.get_controls(fjid, account):
|
for ctrl in win.get_controls(fjid, account):
|
||||||
ctrl.got_disconnected()
|
ctrl.got_disconnected()
|
||||||
|
|
||||||
win.window.present()
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
### Other Methods
|
### Other Methods
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
|
@ -2076,7 +2076,6 @@ class GroupchatControl(ChatControlBase):
|
||||||
ctrl = win.get_controls(nick_jid, self.account)[0]
|
ctrl = win.get_controls(nick_jid, self.account)[0]
|
||||||
|
|
||||||
win.set_active_tab(ctrl)
|
win.set_active_tab(ctrl)
|
||||||
win.window.present()
|
|
||||||
|
|
||||||
return ctrl
|
return ctrl
|
||||||
|
|
||||||
|
|
|
@ -448,6 +448,7 @@ class MessageWindow(object):
|
||||||
def set_active_tab(self, ctrl):
|
def set_active_tab(self, ctrl):
|
||||||
ctrl_page = self.notebook.page_num(ctrl.widget)
|
ctrl_page = self.notebook.page_num(ctrl.widget)
|
||||||
self.notebook.set_current_page(ctrl_page)
|
self.notebook.set_current_page(ctrl_page)
|
||||||
|
self.window.present()
|
||||||
|
|
||||||
def remove_tab(self, ctrl, method, reason = None, force = False):
|
def remove_tab(self, ctrl, method, reason = None, force = False):
|
||||||
'''reason is only for gc (offline status message)
|
'''reason is only for gc (offline status message)
|
||||||
|
|
|
@ -1156,7 +1156,6 @@ class RosterWindow:
|
||||||
gajim.gc_connected[account][room_jid]:
|
gajim.gc_connected[account][room_jid]:
|
||||||
win = gajim.interface.msg_win_mgr.get_window(room_jid, account)
|
win = gajim.interface.msg_win_mgr.get_window(room_jid, account)
|
||||||
ctrl = gajim.interface.msg_win_mgr.get_gc_control(room_jid, account)
|
ctrl = gajim.interface.msg_win_mgr.get_gc_control(room_jid, account)
|
||||||
win.window.present()
|
|
||||||
win.set_active_tab(ctrl)
|
win.set_active_tab(ctrl)
|
||||||
dialogs.ErrorDialog(_('You are already in group chat %s') % room_jid)
|
dialogs.ErrorDialog(_('You are already in group chat %s') % room_jid)
|
||||||
return
|
return
|
||||||
|
@ -1185,7 +1184,6 @@ class RosterWindow:
|
||||||
gc_win = gajim.interface.msg_win_mgr.get_window(room_jid, account)
|
gc_win = gajim.interface.msg_win_mgr.get_window(room_jid, account)
|
||||||
gc_control = gc_win.get_gc_control(room_jid, account)
|
gc_control = gc_win.get_gc_control(room_jid, account)
|
||||||
gc_win.set_active_tab(gc_control)
|
gc_win.set_active_tab(gc_control)
|
||||||
gc_win.window.present()
|
|
||||||
gajim.connections[account].join_gc(nick, room_jid, password)
|
gajim.connections[account].join_gc(nick, room_jid, password)
|
||||||
if password:
|
if password:
|
||||||
gajim.gc_passwords[room_jid] = password
|
gajim.gc_passwords[room_jid] = password
|
||||||
|
@ -2813,7 +2811,6 @@ class RosterWindow:
|
||||||
ctrl.parent_win = mw
|
ctrl.parent_win = mw
|
||||||
mw.new_tab(ctrl)
|
mw.new_tab(ctrl)
|
||||||
mw.set_active_tab(ctrl)
|
mw.set_active_tab(ctrl)
|
||||||
mw.window.present()
|
|
||||||
del gajim.interface.minimized_controls[account][jid]
|
del gajim.interface.minimized_controls[account][jid]
|
||||||
|
|
||||||
self.remove_groupchat(jid, account)
|
self.remove_groupchat(jid, account)
|
||||||
|
|
|
@ -109,7 +109,6 @@ class Systray:
|
||||||
if gajim.interface.msg_win_mgr.has_window(jid, account):
|
if gajim.interface.msg_win_mgr.has_window(jid, account):
|
||||||
gajim.interface.msg_win_mgr.get_window(jid, account).set_active_tab(
|
gajim.interface.msg_win_mgr.get_window(jid, account).set_active_tab(
|
||||||
jid, account)
|
jid, account)
|
||||||
gajim.interface.msg_win_mgr.get_window(jid, account).window.present()
|
|
||||||
elif contact:
|
elif contact:
|
||||||
gajim.interface.new_chat(contact, account)
|
gajim.interface.new_chat(contact, account)
|
||||||
gajim.interface.msg_win_mgr.get_window(jid, account).set_active_tab(
|
gajim.interface.msg_win_mgr.get_window(jid, account).set_active_tab(
|
||||||
|
|
Loading…
Reference in New Issue