[shivan] show in status combobox that accounts status are not synchronized. fixes #3489
This commit is contained in:
parent
c9c066f8e6
commit
401e5d2811
|
@ -3582,8 +3582,10 @@ class RosterWindow:
|
||||||
self.update_status_combobox()
|
self.update_status_combobox()
|
||||||
return
|
return
|
||||||
status = model[active][2].decode('utf-8')
|
status = model[active][2].decode('utf-8')
|
||||||
|
statuses_unified = helpers.statuses_unified()
|
||||||
if active == 7: # We choose change status message (7 is that)
|
if (active == 7 and statuses_unified) or (active == 9 and not statuses_unified):
|
||||||
|
print active
|
||||||
|
# We choose change status message (7 is that, or 9 if there is the "desync'ed" option)
|
||||||
# do not change show, just show change status dialog
|
# do not change show, just show change status dialog
|
||||||
status = model[self.previous_status_combobox_active][2].decode('utf-8')
|
status = model[self.previous_status_combobox_active][2].decode('utf-8')
|
||||||
dlg = dialogs.ChangeStatusMessageDialog(status)
|
dlg = dialogs.ChangeStatusMessageDialog(status)
|
||||||
|
@ -3725,6 +3727,12 @@ class RosterWindow:
|
||||||
# table to change index in connection.connected to index in combobox
|
# table to change index in connection.connected to index in combobox
|
||||||
table = {'offline':9, 'connecting':9, 'online':0, 'chat':1, 'away':2,
|
table = {'offline':9, 'connecting':9, 'online':0, 'chat':1, 'away':2,
|
||||||
'xa':3, 'dnd':4, 'invisible':5}
|
'xa':3, 'dnd':4, 'invisible':5}
|
||||||
|
|
||||||
|
# we check if there are more options in the combobox that it should
|
||||||
|
# if yes, we remove the first ones
|
||||||
|
while len(self.status_combobox.get_model()) > len(table)+2:
|
||||||
|
self.status_combobox.remove_text(0)
|
||||||
|
|
||||||
show = helpers.get_global_show()
|
show = helpers.get_global_show()
|
||||||
# temporarily block signal in order not to send status that we show
|
# temporarily block signal in order not to send status that we show
|
||||||
# in the combobox
|
# in the combobox
|
||||||
|
@ -3732,7 +3740,12 @@ class RosterWindow:
|
||||||
if helpers.statuses_unified():
|
if helpers.statuses_unified():
|
||||||
self.status_combobox.set_active(table[show])
|
self.status_combobox.set_active(table[show])
|
||||||
else:
|
else:
|
||||||
self.status_combobox.set_active(-1)
|
uf_show = helpers.get_uf_show(show)
|
||||||
|
liststore = self.status_combobox.get_model()
|
||||||
|
liststore.prepend(['SEPARATOR', None, '', True])
|
||||||
|
liststore.prepend([uf_show+" "+"(desync'ed)", self.jabber_state_images['16'][show],
|
||||||
|
show, False])
|
||||||
|
self.status_combobox.set_active(0)
|
||||||
self._change_awn_icon_status(show)
|
self._change_awn_icon_status(show)
|
||||||
self.combobox_callback_active = True
|
self.combobox_callback_active = True
|
||||||
if gajim.interface.systray_enabled:
|
if gajim.interface.systray_enabled:
|
||||||
|
|
Loading…
Reference in New Issue