Skip to content
Snippets Groups Projects
Commit 375e0612 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

change global status when we set it through systray menu, even if one account...

change global status when we set it through systray menu, even if one account already has this status. see #3489
parent 3db9f2dd
No related branches found
No related tags found
No related merge requests found
......@@ -327,7 +327,24 @@ class Systray:
l = ['online', 'chat', 'away', 'xa', 'dnd', 'invisible', 'SEPARATOR',
'CHANGE_STATUS_MSG_MENUITEM', 'SEPARATOR', 'offline']
index = l.index(show)
gajim.interface.roster.status_combobox.set_active(index)
current = gajim.interface.roster.status_combobox.get_active()
if index != current:
gajim.interface.roster.status_combobox.set_active(index)
else:
# We maybe need to emit the changed signal if all globaly sync'ed
# account don't have the global status
need_to_change = False
accounts = gajim.connections.keys()
for acct in accounts:
if not gajim.config.get_per('accounts', acct,
'sync_with_global_status'):
continue
acct_show = gajim.SHOW_LIST[gajim.connections[acct].connected]
if acct_show != show:
need_to_change = True
break
if need_to_change:
gajim.interface.roster.status_combobox.emit('changed')
def on_change_status_message_activate(self, widget):
model = gajim.interface.roster.status_combobox.get_model()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment