MessageWindow: When grouped by type, show contact's name if only one conversation

When chat windows are grouped by type, the window title is either Chats or Group Chats.
If there is only one conversation of either type, the window's title now shows the
contact's or group chat's name.
This commit is contained in:
Daniel Brötzmann 2019-04-26 12:23:43 +02:00 committed by Philipp Hörist
parent b262d5add9
commit 87bbf4738a
1 changed files with 5 additions and 1 deletions

View File

@ -520,8 +520,12 @@ class MessageWindow:
# Show the plural form since number of tabs > 1
if self.type_ == 'chat':
label = Q_('?Noun:Chats')
if self.get_num_controls() == 1:
label = name
elif self.type_ == 'gc':
label = _('Groupchats')
label = _('Group Chats')
if self.get_num_controls() == 1:
label = name
else:
label = _('Private Chats')
elif window_mode == MessageWindowMgr.ONE_MSG_WINDOW_ALWAYS_WITH_ROSTER: