Browse Source

replies receive a NetworkUser object, so it may be easier to change in in the future

master
Julio Biason 15 years ago
parent
commit
589fb940ed
  1. 4
      mitterlib/ui/helpers/gtk_updatebox.py
  2. 15
      mitterlib/ui/ui_pygtk.py

4
mitterlib/ui/helpers/gtk_updatebox.py

@ -42,8 +42,6 @@ class UpdateBox(gtk.VBox):
def __init__(self, avatar, spell_check=True):
super(UpdateBox, self).__init__(False, 0)
self._reply_to = None
self._text = gtk.TextView()
self._text.set_property('wrap-mode', gtk.WRAP_WORD)
@ -97,7 +95,7 @@ class UpdateBox(gtk.VBox):
self.show_all()
if reply_to:
info = _('(replying to %s)') % (self._reply_to)
info = _('(replying to %s)') % (reply_to.username)
self._update_info.set_text(info)
else:
self._update_info.set_text('')

15
mitterlib/ui/ui_pygtk.py

@ -595,16 +595,15 @@ class Interface(object):
store.sort_column_changed()
return
def _show_update_box(self):
"""Enables the update box."""
self._update_field.show()
return
# ------------------------------------------------------------
# Widget callback functions
# ------------------------------------------------------------
def _update_status(self, widget):
"""Update your status."""
if not self._update_field.get_property('visible'):
self._update_field.show()
return
status = self._update_field.text.strip()
if not status:
self._update_field.hide()
@ -784,11 +783,9 @@ class Interface(object):
(grid, _) = self._grids[self._main_tabs.get_current_page()]
(model, iter) = grid.get_selection().get_selected()
message = model.get_value(iter, 0)
self._update_text.get_buffer().set_text(
self._connection.reply_prefix(message))
self._update_field.text = self._connection.reply_prefix(message)
self._reply_message_id = message
self._show_update_box()
self._update_field.show(message.author)
return
def _repost_message(self, widget, user_data=None):

Loading…
Cancel
Save