fix a traceback [do not pass empty jid]

This commit is contained in:
Nikos Kouremenos 2005-07-22 20:06:16 +00:00
parent 7e570e66b4
commit 4108ef31b8
1 changed files with 4 additions and 2 deletions

View File

@ -125,7 +125,7 @@ class Chat:
start = '[' + str(self.nb_unread[jid]) + '] '
elif self.nb_unread[jid] == 1:
start = '* '
child = self.childs[jid]
if self.widget_name == 'tabbed_chat_window':
nickname = self.notebook.get_tab_label(child).get_children()[1]
@ -138,6 +138,7 @@ class Chat:
nickname.set_text(start + self.names[jid])
def on_window_destroy(self, widget, kind): #kind is 'chats' or 'gc'
'''clean self.plugin.windows[self.account][kind]'''
for jid in self.xmls:
@ -272,7 +273,8 @@ class Chat:
if self.widget_name == 'tabbed_chat_window':
# send chatstate inactive to the one we're leaving
# 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)
conversation_textview = self.xmls[new_jid].get_widget(