From 5572f37bd186b9675d95e96e1f58085092ba95c7 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Fri, 11 Dec 2009 18:34:47 -0200 Subject: [PATCH] Replies working --- mitterlib/ui/ui_pygtk.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/mitterlib/ui/ui_pygtk.py b/mitterlib/ui/ui_pygtk.py index 3566001..010878f 100644 --- a/mitterlib/ui/ui_pygtk.py +++ b/mitterlib/ui/ui_pygtk.py @@ -625,6 +625,18 @@ class Interface(object): interval * 60 * 1000, self._refresh, None) return + + def _clear_reply(self): + """Clear the info about a reply.""" + self._reply_message_id = None + self._reply_label.set_text('') + return + + def _clear_repost(self): + """Clear the info about a repost.""" + self._repost_message_id = None + self._reply_label.set_text('') + return # ------------------------------------------------------------ # Widget callback functions @@ -655,8 +667,8 @@ class Interface(object): self._threads.add_work(self._post_update_status, self._exception_update_status, self._connection.update, - status) - # TODO: We are not dealing with replies here yet + status=status, + reply_to=self._reply_message_id) return def _clear_text(self, widget): @@ -664,8 +676,8 @@ class Interface(object): self._update_text.get_buffer().set_text('') self._delete_iter = None - self._reply_message_id = None - self._repost_message_id = None + self._clear_reply() + self._clear_repost() return @@ -850,6 +862,8 @@ class Interface(object): self._update_sensitivity(True) self._clear_text(None) self._update_statusbar('Your status was updated.') + self._clear_reply() + self._clear_repost() return def _exception_update_status(self, widget, exception):