open a new tab only if it is not already in the notebook

This commit is contained in:
Yann Leboulanger 2005-03-03 22:28:13 +00:00
parent 6ed0c6d097
commit c5b93e0b65
1 changed files with 5 additions and 2 deletions

View File

@ -609,8 +609,11 @@ class New_message_window:
self.plugin.roster.contacts[self.account][jid] = [user] self.plugin.roster.contacts[self.account][jid] = [user]
self.plugin.roster.add_user_to_roster(user.jid, self.account) self.plugin.roster.add_user_to_roster(user.jid, self.account)
else: else:
[user] = self.plugin.roster.contacts[self.account][jid] user = self.plugin.roster.contacts[self.account][jid][0]
self.plugin.roster.new_chat(user, self.account) if self.plugin.windows[self.account]['chats'].has_key(jid):
self.plugin.windows[self.account]['chats'][jid].active_tab(jid)
else:
self.plugin.roster.new_chat(user, self.account)
widget.get_toplevel().destroy() widget.get_toplevel().destroy()
def __init__(self, plugin, account): def __init__(self, plugin, account):