when there is only a tab : show the jid in the chat window's title
This commit is contained in:
parent
35f9462813
commit
630a12ad10
|
@ -222,9 +222,6 @@ class tabbed_chat_window:
|
||||||
self.on_tabbed_chat_window_key_press_event)
|
self.on_tabbed_chat_window_key_press_event)
|
||||||
self.xml.signal_connect('on_chat_notebook_switch_page', \
|
self.xml.signal_connect('on_chat_notebook_switch_page', \
|
||||||
self.on_chat_notebook_switch_page)
|
self.on_chat_notebook_switch_page)
|
||||||
#TODO
|
|
||||||
# if use_tab:
|
|
||||||
# plugin.windows[account]['chats']['tabbed'] = self
|
|
||||||
|
|
||||||
def update_tags(self):
|
def update_tags(self):
|
||||||
for jid in self.tagIn:
|
for jid in self.tagIn:
|
||||||
|
@ -245,7 +242,10 @@ class tabbed_chat_window:
|
||||||
start = "[" + str(unread) + "] "
|
start = "[" + str(unread) + "] "
|
||||||
elif unread == 1:
|
elif unread == 1:
|
||||||
start = "* "
|
start = "* "
|
||||||
self.window.set_title(start + "Chat (" + self.account + ")")
|
chat = self.users[jid].name
|
||||||
|
if len(self.xmls) > 1:
|
||||||
|
chat = 'Chat'
|
||||||
|
self.window.set_title(start + chat + ' (' + self.account + ')')
|
||||||
|
|
||||||
def draw_widgets(self, user):
|
def draw_widgets(self, user):
|
||||||
"""draw the widgets in a tab (status_image, contact_button ...)
|
"""draw the widgets in a tab (status_image, contact_button ...)
|
||||||
|
@ -364,6 +364,7 @@ class tabbed_chat_window:
|
||||||
del self.tagStatus[jid]
|
del self.tagStatus[jid]
|
||||||
if len(self.xmls) == 1:
|
if len(self.xmls) == 1:
|
||||||
self.chat_notebook.set_show_tabs(False)
|
self.chat_notebook.set_show_tabs(False)
|
||||||
|
self.show_title()
|
||||||
|
|
||||||
def new_user(self, user):
|
def new_user(self, user):
|
||||||
self.nb_unread[user.jid] = 0
|
self.nb_unread[user.jid] = 0
|
||||||
|
@ -394,6 +395,7 @@ class tabbed_chat_window:
|
||||||
|
|
||||||
self.redraw_tab(user.jid)
|
self.redraw_tab(user.jid)
|
||||||
self.draw_widgets(user)
|
self.draw_widgets(user)
|
||||||
|
self.show_title()
|
||||||
|
|
||||||
#print queued messages
|
#print queued messages
|
||||||
if self.plugin.queues[self.account].has_key(user.jid):
|
if self.plugin.queues[self.account].has_key(user.jid):
|
||||||
|
|
Loading…
Reference in New Issue