Window title stuff for #1386
This commit is contained in:
parent
29ec011b9a
commit
61d50ec7fd
|
@ -219,9 +219,11 @@ class MessageWindow:
|
||||||
else:
|
else:
|
||||||
name = control.contact.get_shown_name()
|
name = control.contact.get_shown_name()
|
||||||
|
|
||||||
mc_type = control.display_name + ": "
|
prefix = ''
|
||||||
account = ' (' + _('account: ') + self.get_active_control().account + ')'
|
if self.get_num_controls() > 1:
|
||||||
title = unread_str + mc_type + name + account
|
prefix = "Chats: "
|
||||||
|
account = ' (' + _('acct: ') + self.get_active_control().account + ')'
|
||||||
|
title = unread_str + prefix + name + account
|
||||||
|
|
||||||
self.window.set_title(title)
|
self.window.set_title(title)
|
||||||
|
|
||||||
|
@ -711,12 +713,12 @@ class MessageWindowMgr:
|
||||||
return win.get_control(jid, acct)
|
return win.get_control(jid, acct)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def get_controls(self, type, acct = None):
|
def get_controls(self, type = None, acct = None):
|
||||||
ctrls = []
|
ctrls = []
|
||||||
for c in self.controls():
|
for c in self.controls():
|
||||||
if acct and c.account != acct:
|
if acct and c.account != acct:
|
||||||
continue
|
continue
|
||||||
if c.type_id == type:
|
if not type or c.type_id == type:
|
||||||
ctrls.append(c)
|
ctrls.append(c)
|
||||||
return ctrls
|
return ctrls
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue