Browse Source

Refresh action is disabled when getting new messages.

master
Julio Biason 15 years ago
parent
commit
604387c5fd
  1. 13
      mitterlib/ui/ui_pygtk.py

13
mitterlib/ui/ui_pygtk.py

@ -369,6 +369,12 @@ class Interface(object):
def _refresh(self, widget=None):
"""Request a refresh. *widget* is the widget that called this
function (we basically ignore it.)"""
# disable the refresh from the menu, so we don't get duplicate
# results.
refresh = self._action_group.get_action('Refresh');
refresh.set_property('sensitive', False)
if self._refresh_id:
# "De-queue" the next refresh
_log.debug('Dequeuing next refresh')
@ -806,6 +812,10 @@ class Interface(object):
self._update_statusbar(_('Auto-update disabled'))
if self._statusicon:
self._statusicon.set_from_pixbuf(self._images['icon-error'])
# re-enable the refresh from the menu
refresh = self._action_group.get_action('Refresh')
refresh.set_property('sensitive', True)
return
### replies callback
@ -835,6 +845,9 @@ class Interface(object):
interval * 60 * 1000,
self._refresh, None)
# re-enable the refresh action
refresh = self._action_group.get_action('Refresh')
refresh.set_property('sensitive', True)
return
### image download function

Loading…
Cancel
Save