Commit 674b80c4 authored by Martin's avatar Martin

Merge tag 'upstream/0.16.11.git20171111' into debian/experimental

parents b536a517 7e9d331b
......@@ -148,10 +148,14 @@ class HelperEvent:
if by is None:
# We can not verify who set this stanza-id, ignore it.
elif not self.conn.get_own_jid().bareMatch(by):
# by attribute does not match the server, ignore it.
return stanza_id
if stanza.getType() == 'groupchat':
if stanza.getFrom().bareMatch(by):
# by attribute must match the server
return stanza_id
elif self.conn.get_own_jid().bareMatch(by):
# by attribute must match the server
return stanza_id
def get_forwarded_message(stanza):
......@@ -780,7 +780,8 @@ def build_accounts_menu():
if len(accounts_list) > 1:
for acc in accounts_list:
label = app.config.get_per('accounts', acc, 'account_label')
label = escape_mnemonic(
app.config.get_per('accounts', acc, 'account_label'))
label or acc, get_account_menu(acc))
......@@ -806,8 +807,8 @@ def build_bookmark_menu(account):
if acc_menu.get_item_link(0, 'submenu'):
for i in range(acc_menu.get_n_items()):
label = acc_menu.get_item_attribute_value(i, 'label')
account_label = app.config.get_per('accounts', account,
account_label = escape_mnemonic(
app.config.get_per('accounts', account, 'account_label'))
if label.get_string() in (account_label, account):
menu = acc_menu.get_item_link(i, 'submenu')
......@@ -835,3 +836,11 @@ def get_encryption_menu(control_id, type_id):
if menu.get_n_items() == 1:
return None
return menu
def escape_mnemonic(label):
if label is None:
# Underscore inside a label means the next letter is a keyboard
# shortcut. To show an underscore we have to use double underscore
return label.replace('_', '__')
......@@ -1069,7 +1069,7 @@ class RosterWindow:
accounts = accounts)
account_name += ' (%s/%s)' % (repr(nbr_on), repr(nbr_total))
self.model[child_iter][Column.NAME] = account_name
self.model[child_iter][Column.NAME] = GLib.markup_escape_text(account_name)
pep_dict = app.connections[account].pep
if app.config.get('show_mood_in_roster') and 'mood' in pep_dict:
......@@ -262,7 +262,7 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):, contact, self)
obj.show_in_systray = notify.get_show_in_systray(event_type,, contact)
if obj.mtype == 'normal' and not obj.popup:
if obj.mtype == 'normal' and obj.popup:
do_event = False
do_event = True
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment