From 072f4c86b7a47b2aaf41d3e7cd5d188b8c469ccd Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Sun, 28 Mar 2010 10:46:36 -0300 Subject: [PATCH] Updates are going now. --- mitterlib/ui/helpers/gtk_updatebox.py | 2 ++ mitterlib/ui/ui_pygtk.py | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/mitterlib/ui/helpers/gtk_updatebox.py b/mitterlib/ui/helpers/gtk_updatebox.py index 0017d41..2608ff6 100644 --- a/mitterlib/ui/helpers/gtk_updatebox.py +++ b/mitterlib/ui/helpers/gtk_updatebox.py @@ -101,6 +101,8 @@ class UpdateBox(gtk.VBox): self._update_info.set_text(info) else: self._update_info.set_text('') + + self._text.grab_focus() return def hide(self, caller=None): diff --git a/mitterlib/ui/ui_pygtk.py b/mitterlib/ui/ui_pygtk.py index 40c4d4b..9383b68 100644 --- a/mitterlib/ui/ui_pygtk.py +++ b/mitterlib/ui/ui_pygtk.py @@ -290,7 +290,6 @@ class Interface(object): self._update_action = gtk.Action('Update', _('_Update'), _('Update your status'), gtk.STOCK_ADD) - self._update_action.set_property('sensitive', False) self._update_action.connect('activate', self._update_status) action_group.add_action_with_accel(self._update_action, 'Return') @@ -606,10 +605,9 @@ class Interface(object): # ------------------------------------------------------------ def _update_status(self, widget): """Update your status.""" - _log.debug('Updating status.') - status = _buffer_text(self._update_text.get_buffer()) - status = status.strip() + status = self._update_field.text.strip() if not status: + self._update_field.hide() return _log.debug('Status: %s', status) @@ -634,7 +632,6 @@ class Interface(object): child = self._main_tabs.get_nth_page(page) child.get_child().grab_focus() # notebook have ScrolledWindows, # TreeViews inside that. - self._message_selected(child.get_child()) return @@ -1126,9 +1123,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_sensitivity(False) self._clear_text(None) - self._hide_update_box() return def _exception_update_status(self, widget, exception):