From 61d50ec7fd16ca31aa4c0dbcde6fbe60f0d335ce Mon Sep 17 00:00:00 2001 From: Travis Shirk Date: Sat, 4 Feb 2006 23:47:40 +0000 Subject: [PATCH] Window title stuff for #1386 --- src/message_window.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/message_window.py b/src/message_window.py index 1d9f9a5ef..9965f7e38 100644 --- a/src/message_window.py +++ b/src/message_window.py @@ -219,9 +219,11 @@ class MessageWindow: else: name = control.contact.get_shown_name() - mc_type = control.display_name + ": " - account = ' (' + _('account: ') + self.get_active_control().account + ')' - title = unread_str + mc_type + name + account + prefix = '' + if self.get_num_controls() > 1: + prefix = "Chats: " + account = ' (' + _('acct: ') + self.get_active_control().account + ')' + title = unread_str + prefix + name + account self.window.set_title(title) @@ -711,12 +713,12 @@ class MessageWindowMgr: return win.get_control(jid, acct) return None - def get_controls(self, type, acct = None): + def get_controls(self, type = None, acct = None): ctrls = [] for c in self.controls(): if acct and c.account != acct: continue - if c.type_id == type: + if not type or c.type_id == type: ctrls.append(c) return ctrls