deskbar-applet r2104 - in trunk: . deskbar/handlers



Author: sebp
Date: Sat Apr 12 13:30:17 2008
New Revision: 2104
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2104&view=rev

Log:
Use Match's new set_snippet method to display tags

Modified:
   trunk/ChangeLog
   trunk/deskbar/handlers/desklicious.py

Modified: trunk/deskbar/handlers/desklicious.py
==============================================================================
--- trunk/deskbar/handlers/desklicious.py	(original)
+++ trunk/deskbar/handlers/desklicious.py	Sat Apr 12 13:30:17 2008
@@ -25,25 +25,23 @@
 
 class DeliciousAction(ShowUrlAction):
     
-    def __init__(self, name, url, tags):
+    def __init__(self, name, url, tags=None):
+        """
+        @param tags: Is ignored since 2.23.1,
+        just there for backwards compatibility 
+        """
         ShowUrlAction.__init__(self, name, url)
-        self.tags = tags
         
     def get_verb(self):
-        return "<b>%(name)s</b>\n<span size='small' foreground='grey'>%(tags)s</span>"
-    
-    def get_name(self, text=None):
-        return {
-            "name": self._name,
-            "tags": ' '.join(self.tags),
-        }
+        return "<b>%(name)s</b>"
         
 class DeliciousMatch(deskbar.interfaces.Match):
     def __init__(self, url=None, tags=None, author=None, **args):
         deskbar.interfaces.Match.__init__ (self, icon="delicious.png", **args)
         self.url = url
         self.author = author
-        self.add_action( DeliciousAction(self.get_name(), self.url, tags) )
+        self.set_snippet(' '.join(tags))
+        self.add_action( DeliciousAction(self.get_name(), self.url) )
 
     def get_hash(self):
         return self.url



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]