Window title mods for #1386
This commit is contained in:
parent
55c434945f
commit
1214f8d638
|
@ -219,9 +219,17 @@ class MessageWindow:
|
||||||
else:
|
else:
|
||||||
name = control.contact.get_shown_name()
|
name = control.contact.get_shown_name()
|
||||||
|
|
||||||
title = _('Messages - Gajim')
|
window_mode = gajim.interface.msg_win_mgr.mode
|
||||||
if gajim.interface.msg_win_mgr.mode == MessageWindowMgr.ONE_MSG_WINDOW_NEVER:
|
if window_mode == MessageWindowMgr.ONE_MSG_WINDOW_PERTYPE:
|
||||||
title = title + ": " + name
|
label = control.display_name
|
||||||
|
elif self.get_num_controls() == 1:
|
||||||
|
label = name
|
||||||
|
else:
|
||||||
|
label = _('Messages')
|
||||||
|
title = _('%s - Gajim') % label
|
||||||
|
|
||||||
|
if window_mode == MessageWindowMgr.ONE_MSG_WINDOW_PERACCT:
|
||||||
|
title = title + ": " + control.account
|
||||||
|
|
||||||
self.window.set_title(unread_str + title)
|
self.window.set_title(unread_str + title)
|
||||||
|
|
||||||
|
@ -806,7 +814,8 @@ class MessageWindowMgr:
|
||||||
w.notebook.remove_page(0)
|
w.notebook.remove_page(0)
|
||||||
page.unparent()
|
page.unparent()
|
||||||
controls.append(ctrl)
|
controls.append(ctrl)
|
||||||
# Must clear _controls from window to prevent MessageControl.shutdown calls
|
# Must clear _controls from window to prevent
|
||||||
|
# MessageControl.shutdown calls
|
||||||
w._controls = {}
|
w._controls = {}
|
||||||
w.window.destroy()
|
w.window.destroy()
|
||||||
|
|
||||||
|
@ -815,6 +824,7 @@ class MessageWindowMgr:
|
||||||
for ctrl in controls:
|
for ctrl in controls:
|
||||||
mw = self.get_window(ctrl.contact.jid, ctrl.account)
|
mw = self.get_window(ctrl.contact.jid, ctrl.account)
|
||||||
if not mw:
|
if not mw:
|
||||||
mw = self.create_window(ctrl.contact, ctrl.account, ctrl.type_id)
|
mw = self.create_window(ctrl.contact, ctrl.account,
|
||||||
|
ctrl.type_id)
|
||||||
ctrl.parent_win = mw
|
ctrl.parent_win = mw
|
||||||
mw.new_tab(ctrl)
|
mw.new_tab(ctrl)
|
||||||
|
|
Loading…
Reference in New Issue