fix a couple of GC and PM TBs
This commit is contained in:
parent
40c2b97c99
commit
8da186bffb
|
@ -2069,14 +2069,11 @@ class GroupchatControl(ChatControlBase):
|
||||||
gc_c = gajim.contacts.get_gc_contact(self.account, self.room_jid, nick)
|
gc_c = gajim.contacts.get_gc_contact(self.account, self.room_jid, nick)
|
||||||
nick_jid = gc_c.get_full_jid()
|
nick_jid = gc_c.get_full_jid()
|
||||||
|
|
||||||
win = gajim.interface.msg_win_mgr.get_window(nick_jid, self.account)
|
ctrl = gajim.interface.msg_win_mgr.get_control(nick_jid, self.account)
|
||||||
if not win:
|
if not ctrl:
|
||||||
gajim.interface.new_private_chat(gc_c, self.account)
|
ctrl = gajim.interface.new_private_chat(gc_c, self.account)
|
||||||
win = gajim.interface.msg_win_mgr.get_window(nick_jid, self.account)
|
|
||||||
|
|
||||||
ctrl = win.get_control(nick_jid, self.account)
|
ctrl.parent_win.set_active_tab(ctrl)
|
||||||
|
|
||||||
win.set_active_tab(ctrl)
|
|
||||||
|
|
||||||
return ctrl
|
return ctrl
|
||||||
|
|
||||||
|
|
|
@ -175,8 +175,7 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
||||||
jid_of_control = full_jid_with_resource
|
jid_of_control = full_jid_with_resource
|
||||||
|
|
||||||
if not self.control:
|
if not self.control:
|
||||||
# look for an existing chat control without a session
|
ctrl = gajim.interface.msg_win_mgr.get_control(jid_of_control, self.conn.name)
|
||||||
ctrl = gajim.interface.msg_win_mgr.get_control(jid, self.conn.name)
|
|
||||||
if ctrl:
|
if ctrl:
|
||||||
self.control = ctrl
|
self.control = ctrl
|
||||||
self.control.set_session(self)
|
self.control.set_session(self)
|
||||||
|
|
Loading…
Reference in New Issue