diff finch/libgnt/pygnt/example/rss/gntrss.py @ 18871:2e41a68009ba

Fix a few small bugs in the example code.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 11 Aug 2007 04:17:15 +0000
parents 6976a6dae441
children 44b4e8bd759b 184d2fbcb4f0
line wrap: on
line diff
--- a/finch/libgnt/pygnt/example/rss/gntrss.py	Sat Aug 11 04:15:11 2007 +0000
+++ b/finch/libgnt/pygnt/example/rss/gntrss.py	Sat Aug 11 04:17:15 2007 +0000
@@ -55,8 +55,7 @@
             item['date'] = self.date = time.ctime()
             self.date_parsed = feedparser._parse_date(self.date)
 
-        self.title = item['title']
-        sum = item['summary']
+        self.title = item['title'].encode('utf8')
         self.summary = item['summary'].encode('utf8')
         self.link = item['link']
         self.parent = parent
@@ -79,7 +78,7 @@
 gobject.type_register(FeedItem)
 
 def item_hash(item):
-    return str(item['date'] + item['title'])
+    return str(item['title'])
 
 """
 The Feed class. It will update the 'link', 'title', 'desc' and 'items'
@@ -171,6 +170,7 @@
             self.set_property('unread', unread)
 
         for hv in tmp:
+            self.items.remove(tmp[hv])
             tmp[hv].remove()
             "Also notify the UI about the count change"