Browse Source

Changing the update action sensitivity on the right place, althought it

doesn't seem like it is doing the way I want.
master
Julio Biason 15 years ago
parent
commit
b1f67f4177
  1. 10
      mitterlib/ui/ui_pygtk.py

10
mitterlib/ui/ui_pygtk.py

@ -486,13 +486,6 @@ class Interface(object):
# ------------------------------------------------------------
# Helper functions
# ------------------------------------------------------------
def _update_sensitivity(self, enabled):
"""Set the "sensitive" property of the update action and button. Both
should have the same property, so whenever you need to disable/enable
them, use this function."""
self._update_action.set_property('sensitive', enabled)
return
def _update_statusbar(self, message):
"""Update the statusbar with the message."""
@ -612,7 +605,7 @@ class Interface(object):
_log.debug('Status: %s', status)
self._update_statusbar(_('Sending update...'))
self._update_sensitivity(False)
self._update_action.set_sensitive(False)
self._threads.add_work(self._post_update_status,
self._exception_update_status,
self._connection.update,
@ -1120,6 +1113,7 @@ class Interface(object):
def _post_update_status(self, widget, data):
"""Called when the status is updated correctly."""
self._update_statusbar(_('Your status was updated.'))
self._update_action.set_sensitive(True)
self._clear_text(None)
return

Loading…
Cancel
Save