fix a traceback [do not pass empty jid]
This commit is contained in:
parent
7e570e66b4
commit
4108ef31b8
1 changed files with 4 additions and 2 deletions
|
@ -125,7 +125,7 @@ class Chat:
|
||||||
start = '[' + str(self.nb_unread[jid]) + '] '
|
start = '[' + str(self.nb_unread[jid]) + '] '
|
||||||
elif self.nb_unread[jid] == 1:
|
elif self.nb_unread[jid] == 1:
|
||||||
start = '* '
|
start = '* '
|
||||||
|
|
||||||
child = self.childs[jid]
|
child = self.childs[jid]
|
||||||
if self.widget_name == 'tabbed_chat_window':
|
if self.widget_name == 'tabbed_chat_window':
|
||||||
nickname = self.notebook.get_tab_label(child).get_children()[1]
|
nickname = self.notebook.get_tab_label(child).get_children()[1]
|
||||||
|
@ -138,6 +138,7 @@ class Chat:
|
||||||
|
|
||||||
nickname.set_text(start + self.names[jid])
|
nickname.set_text(start + self.names[jid])
|
||||||
|
|
||||||
|
|
||||||
def on_window_destroy(self, widget, kind): #kind is 'chats' or 'gc'
|
def on_window_destroy(self, widget, kind): #kind is 'chats' or 'gc'
|
||||||
'''clean self.plugin.windows[self.account][kind]'''
|
'''clean self.plugin.windows[self.account][kind]'''
|
||||||
for jid in self.xmls:
|
for jid in self.xmls:
|
||||||
|
@ -272,7 +273,8 @@ class Chat:
|
||||||
if self.widget_name == 'tabbed_chat_window':
|
if self.widget_name == 'tabbed_chat_window':
|
||||||
# send chatstate inactive to the one we're leaving
|
# send chatstate inactive to the one we're leaving
|
||||||
# and active to the one we visit
|
# and active to the one we visit
|
||||||
self.send_chatstate('inactive', old_jid)
|
if old_jid != '':
|
||||||
|
self.send_chatstate('inactive', old_jid)
|
||||||
self.send_chatstate('active', new_jid)
|
self.send_chatstate('active', new_jid)
|
||||||
|
|
||||||
conversation_textview = self.xmls[new_jid].get_widget(
|
conversation_textview = self.xmls[new_jid].get_widget(
|
||||||
|
|
Loading…
Add table
Reference in a new issue