use present if already open for conversation history window

This commit is contained in:
Nikos Kouremenos 2005-05-12 16:55:48 +00:00
parent 27723d1279
commit 4ad7c30f47
1 changed files with 4 additions and 2 deletions

View File

@ -137,9 +137,11 @@ class Tabbed_chat_window(chat.Chat):
conversation_buffer.delete(start, end)
def on_history_button_clicked(self, widget):
"""When history button is pressed : call history window"""
"""When history button is pressed: call history window"""
jid = self.get_active_jid()
if not self.plugin.windows['logs'].has_key(jid):
if self.plugin.windows['logs'].has_key(jid):
self.plugin.windows['logs'][jid].present()
else:
self.plugin.windows['logs'][jid] = history_window.\
History_window(self.plugin, jid)