Changeset 8916

Show
Ignore:
Timestamp:
10/18/07 18:42:48 (13 months ago)
Author:
asterix
Message:

[shivan] show in status combobox that accounts status are not synchronized. fixes #3489

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/roster_window.py

    r8914 r8916  
    35833583                        return 
    35843584                status = model[active][2].decode('utf-8') 
    3585  
    3586                 if active == 7: # We choose change status message (7 is that) 
     3585                statuses_unified = helpers.statuses_unified() 
     3586                if (active == 7 and statuses_unified) or (active == 9 and not statuses_unified): 
     3587                        print active 
     3588                        # We choose change status message (7 is that, or 9 if there is the "desync'ed" option) 
    35873589                        # do not change show, just show change status dialog 
    35883590                        status = model[self.previous_status_combobox_active][2].decode('utf-8') 
     
    37263728                table = {'offline':9, 'connecting':9, 'online':0, 'chat':1, 'away':2, 
    37273729                        'xa':3, 'dnd':4, 'invisible':5} 
     3730 
     3731                # we check if there are more options in the combobox that it should 
     3732                # if yes, we remove the first ones 
     3733                while len(self.status_combobox.get_model()) > len(table)+2: 
     3734                        self.status_combobox.remove_text(0) 
     3735 
    37283736                show = helpers.get_global_show() 
    37293737                # temporarily block signal in order not to send status that we show 
     
    37333741                        self.status_combobox.set_active(table[show]) 
    37343742                else: 
    3735                         self.status_combobox.set_active(-1) 
     3743                        uf_show = helpers.get_uf_show(show) 
     3744                        liststore = self.status_combobox.get_model() 
     3745                        liststore.prepend(['SEPARATOR', None, '', True]) 
     3746                        liststore.prepend([uf_show+" "+"(desync'ed)", self.jabber_state_images['16'][show], 
     3747                        show, False]) 
     3748                        self.status_combobox.set_active(0) 
    37363749                self._change_awn_icon_status(show) 
    37373750                self.combobox_callback_active = True