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