From 4520e26bc5fb26dcb6b685ce4e5d200d0877d6c6 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Thu, 8 Apr 2010 12:02:27 -0300 Subject: [PATCH] Re-enable the update action after a failed update. --- mitterlib/ui/ui_pygtk.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mitterlib/ui/ui_pygtk.py b/mitterlib/ui/ui_pygtk.py index edaa06c..7cd297c 100644 --- a/mitterlib/ui/ui_pygtk.py +++ b/mitterlib/ui/ui_pygtk.py @@ -499,7 +499,6 @@ class Interface(object): self._udpate_field.hide() return - _log.debug('Status: %s', status) self._update_statusbar(_('Sending update...')) @@ -862,7 +861,6 @@ class Interface(object): def _exception_update_status(self, widget, exception): """Called when there is an exception updating the status.""" - # TODO: Need the check the type of exception we got. _log.debug('Update error') _log.debug(str(exception)) error_win = gtk.MessageDialog(parent=self._main_window, @@ -872,6 +870,10 @@ class Interface(object): buttons=gtk.BUTTONS_OK) error_win.run() error_win.hide() + + # re-enable the update, or the user won't be able to repost their + # message. + self._action_group.get_action('Update').set_sensitive(True) return ### Results for the delete message call