Show correct account lable in tooltip

Fixes #9065
This commit is contained in:
Philipp Hörist 2018-04-29 23:47:30 +02:00
parent e0e3b9609a
commit 06c4ce60b9
2 changed files with 9 additions and 4 deletions

View File

@ -1247,8 +1247,13 @@ def get_accounts_info():
message = message.strip()
if message != '':
single_line += ': ' + message
accounts.append({'name': account, 'status_line': single_line,
'show': status, 'message': message})
account_label = app.config.get_per(
'accounts', account, 'account_label')
accounts.append({'name': account,
'account_label': account_label or account,
'status_line': single_line,
'show': status,
'message': message})
return accounts
def get_current_show(account):

View File

@ -150,11 +150,11 @@ class NotificationAreaTooltip(StatusTable):
show_lock = False
if message:
self.add_status_row(file_path, acct['show'],
GLib.markup_escape_text(acct['name']) + ' - ' + message,
GLib.markup_escape_text(acct['account_label']) + ' - ' + message,
show_lock=show_lock, indent=False)
else:
self.add_status_row(file_path, acct['show'],
GLib.markup_escape_text(acct['name']), show_lock=show_lock,
GLib.markup_escape_text(acct['account_label']), show_lock=show_lock,
indent=False)
for line in acct['event_lines']:
self.add_text_row(' ' + line, 1)