open chat window quicker and print restored_conversation after window is shown
This commit is contained in:
parent
58138ce994
commit
21e203f6c2
1 changed files with 22 additions and 20 deletions
|
@ -441,6 +441,13 @@ class TabbedChatWindow(chat.Chat):
|
||||||
chat.Chat.remove_tab(self, jid, 'chats')
|
chat.Chat.remove_tab(self, jid, 'chats')
|
||||||
del self.contacts[jid]
|
del self.contacts[jid]
|
||||||
|
|
||||||
|
def init_conversation(self, contact):
|
||||||
|
# restore previous conversation
|
||||||
|
self.restore_conversation(contact.jid)
|
||||||
|
|
||||||
|
if gajim.awaiting_events[self.account].has_key(contact.jid):
|
||||||
|
self.read_queue(contact.jid)
|
||||||
|
|
||||||
def new_tab(self, contact):
|
def new_tab(self, contact):
|
||||||
'''when new tab is created'''
|
'''when new tab is created'''
|
||||||
self.names[contact.jid] = contact.name
|
self.names[contact.jid] = contact.name
|
||||||
|
@ -473,12 +480,7 @@ class TabbedChatWindow(chat.Chat):
|
||||||
self.redraw_tab(contact.jid)
|
self.redraw_tab(contact.jid)
|
||||||
self.draw_widgets(contact)
|
self.draw_widgets(contact)
|
||||||
|
|
||||||
# restore previous conversation
|
gobject.idle_add(self.init_conversation, contact)
|
||||||
self.restore_conversation(contact.jid)
|
|
||||||
|
|
||||||
if gajim.awaiting_events[self.account].has_key(contact.jid):
|
|
||||||
self.read_queue(contact.jid)
|
|
||||||
|
|
||||||
self.childs[contact.jid].show_all()
|
self.childs[contact.jid].show_all()
|
||||||
|
|
||||||
# chatstates
|
# chatstates
|
||||||
|
|
Loading…
Add table
Reference in a new issue