Changeset 8906

Show
Ignore:
Timestamp:
10/14/07 18:55:03 (13 months ago)
Author:
asterix
Message:

change global status when we set it through systray menu, even if one account already has this status. see #3489

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/systray.py

    r8564 r8906  
    328328                        'CHANGE_STATUS_MSG_MENUITEM', 'SEPARATOR', 'offline'] 
    329329                index = l.index(show) 
    330                 gajim.interface.roster.status_combobox.set_active(index) 
     330                current = gajim.interface.roster.status_combobox.get_active() 
     331                if index != current: 
     332                        gajim.interface.roster.status_combobox.set_active(index) 
     333                else: 
     334                        # We maybe need to emit the changed signal if all globaly sync'ed 
     335                        # account don't have the global status 
     336                        need_to_change = False 
     337                        accounts = gajim.connections.keys() 
     338                        for acct in accounts: 
     339                                if not gajim.config.get_per('accounts', acct, 
     340                                'sync_with_global_status'): 
     341                                        continue 
     342                                acct_show = gajim.SHOW_LIST[gajim.connections[acct].connected] 
     343                                if acct_show != show: 
     344                                        need_to_change = True 
     345                                        break 
     346                        if need_to_change: 
     347                                gajim.interface.roster.status_combobox.emit('changed') 
    331348 
    332349        def on_change_status_message_activate(self, widget):