For GC, draw banner AFTER we change status of control

This commit is contained in:
Jean-Marie Traissard 2006-05-11 21:46:55 +00:00
parent 7db9216442
commit de3af10b75
1 changed files with 13 additions and 11 deletions

View File

@ -831,17 +831,6 @@ class Interface:
fjid = room_jid + '/' + nick
show = array[1]
status = array[2]
# print status in chat window and update status/GPG image
if self.msg_win_mgr.has_window(fjid, account):
ctrl = self.msg_win_mgr.get_control(fjid, account)
contact = ctrl.contact
contact.show = show
contact.status = status
ctrl.update_ui()
uf_show = helpers.get_uf_show(show)
ctrl.print_conversation(_('%s is now %s (%s)') % (nick, uf_show, status),
'status')
ctrl.draw_banner()
# Get the window and control for the updated status, this may be a PrivateChatControl
control = self.msg_win_mgr.get_control(room_jid, account)
@ -855,6 +844,19 @@ class Interface:
if self.remote_ctrl:
self.remote_ctrl.raise_signal('GCPresence', (account, array))
# print status in chat window and update status/GPG image
if self.msg_win_mgr.has_window(fjid, account):
ctrl = self.msg_win_mgr.get_control(fjid, account)
contact = ctrl.contact
contact.show = show
contact.status = status
ctrl.update_ui()
uf_show = helpers.get_uf_show(show)
ctrl.print_conversation(_('%s is now %s (%s)') % (nick, uf_show, status),
'status')
ctrl.draw_banner()
def handle_event_gc_msg(self, account, array):
# ('GC_MSG', account, (jid, msg, time))
jids = array[0].split('/', 1)