|
|
@ -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): |
|
|
|