Browse Source

Updates are going now.

master
Julio Biason 15 years ago
parent
commit
072f4c86b7
  1. 2
      mitterlib/ui/helpers/gtk_updatebox.py
  2. 9
      mitterlib/ui/ui_pygtk.py

2
mitterlib/ui/helpers/gtk_updatebox.py

@ -101,6 +101,8 @@ class UpdateBox(gtk.VBox):
self._update_info.set_text(info) self._update_info.set_text(info)
else: else:
self._update_info.set_text('') self._update_info.set_text('')
self._text.grab_focus()
return return
def hide(self, caller=None): def hide(self, caller=None):

9
mitterlib/ui/ui_pygtk.py

@ -290,7 +290,6 @@ class Interface(object):
self._update_action = gtk.Action('Update', _('_Update'), self._update_action = gtk.Action('Update', _('_Update'),
_('Update your status'), gtk.STOCK_ADD) _('Update your status'), gtk.STOCK_ADD)
self._update_action.set_property('sensitive', False)
self._update_action.connect('activate', self._update_status) self._update_action.connect('activate', self._update_status)
action_group.add_action_with_accel(self._update_action, action_group.add_action_with_accel(self._update_action,
'Return') 'Return')
@ -606,10 +605,9 @@ class Interface(object):
# ------------------------------------------------------------ # ------------------------------------------------------------
def _update_status(self, widget): def _update_status(self, widget):
"""Update your status.""" """Update your status."""
_log.debug('Updating status.') status = self._update_field.text.strip()
status = _buffer_text(self._update_text.get_buffer())
status = status.strip()
if not status: if not status:
self._update_field.hide()
return return
_log.debug('Status: %s', status) _log.debug('Status: %s', status)
@ -634,7 +632,6 @@ class Interface(object):
child = self._main_tabs.get_nth_page(page) child = self._main_tabs.get_nth_page(page)
child.get_child().grab_focus() # notebook have ScrolledWindows, child.get_child().grab_focus() # notebook have ScrolledWindows,
# TreeViews inside that. # TreeViews inside that.
self._message_selected(child.get_child()) self._message_selected(child.get_child())
return return
@ -1126,9 +1123,7 @@ class Interface(object):
def _post_update_status(self, widget, data): def _post_update_status(self, widget, data):
"""Called when the status is updated correctly.""" """Called when the status is updated correctly."""
self._update_statusbar(_('Your status was updated.')) self._update_statusbar(_('Your status was updated.'))
self._update_sensitivity(False)
self._clear_text(None) self._clear_text(None)
self._hide_update_box()
return return
def _exception_update_status(self, widget, exception): def _exception_update_status(self, widget, exception):

Loading…
Cancel
Save