Browse Source

Cancel is now always enabled

master
Julio Biason 15 years ago
parent
commit
0aacf51c2e
  1. 20
      mitterlib/ui/ui_pygtk.py

20
mitterlib/ui/ui_pygtk.py

@ -408,7 +408,6 @@ class Interface(object):
self._cancel_action = gtk.Action('Cancel', '_Cancel',
'Cancel the update', gtk.STOCK_CANCEL)
self._cancel_action.set_property('sensitive', False)
self._cancel_action.connect('activate', self._clear_text)
action_group.add_action_with_accel(self._cancel_action,
'Escape')
@ -489,7 +488,6 @@ class Interface(object):
self._cancel_button = gtk.Button(label='Cancel')
self._cancel_button.connect('clicked', self._clear_text)
self._cancel_button.set_property('sensitive', False)
info_box = gtk.HBox(True, 0)
self._count_label = gtk.Label()
@ -639,7 +637,6 @@ class Interface(object):
self._update_button.set_property('sensitive', enabled)
self._update_action.set_property('sensitive', enabled)
self._cancel_button.set_property('sensitive', enabled)
self._cancel_action.set_property('sensitive', enabled)
return
def _update_statusbar(self, message):
@ -828,6 +825,12 @@ class Interface(object):
self._delete_iter = None
self._clear_reply()
self._remove_count_status()
# change the focus to the grid.
page = self._main_tabs.get_current_page()
child = self._main_tabs.get_nth_page(page)
child.get_child().grab_focus() # notebook have ScrolledWindows,
# TreeViews inside that.
return
def _quit_app(self, widget=None, user_data=None):
@ -1246,16 +1249,9 @@ class Interface(object):
### Results for the update status call
def _post_update_status(self, widget, data):
"""Called when the status is updated correctly."""
self._update_sensitivity(True)
self._clear_text(None)
self._update_statusbar('Your status was updated.')
self._clear_reply()
# change the focus to the grid.
page = self._main_tabs.get_current_page()
child = self._main_tabs.get_nth_page(page)
child.get_child().grab_focus() # notebook have ScrolledWindows,
# TreeViews inside that.
self._update_sensitivity(False)
self._clear_text(None)
return
def _exception_update_status(self, widget, exception):

Loading…
Cancel
Save