[kupfer] gwibber: Make Message a plain Leaf instead of TextLeaf
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] gwibber: Make Message a plain Leaf instead of TextLeaf
- Date: Thu, 10 Mar 2011 23:28:23 +0000 (UTC)
commit 32c1b29cc16b8e637951cd4d0107c92128c1cd51
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Fri Mar 11 00:25:32 2011 +0100
gwibber: Make Message a plain Leaf instead of TextLeaf
Message is much too complicated to be a TextLeaf.
kupfer/plugin/gwibber.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/plugin/gwibber.py b/kupfer/plugin/gwibber.py
index 61e819b..b255906 100644
--- a/kupfer/plugin/gwibber.py
+++ b/kupfer/plugin/gwibber.py
@@ -136,9 +136,9 @@ def unicode_strftime(fmt, time_tuple=None):
enc = locale.getpreferredencoding(False)
return unicode(time.strftime(fmt, time_tuple), enc, "replace")
-class Message(TextLeaf):
+class Message (Leaf):
def __init__(self, text, msg, service):
- TextLeaf.__init__(self, text)
+ Leaf.__init__(self, text, text)
self.id = msg['id']
self.msg_url = msg.get('url')
self.msg_sender = msg['sender']['nick'] if 'nick' in msg['sender'] \
@@ -175,6 +175,9 @@ class Message(TextLeaf):
def get_description(self):
return self._description
+ def get_text_representation(self):
+ return self.object
+
def get_gicon(self):
return icons.ComposedIcon("gwibber", "stock_mail")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]