remove faulty debug print
[enigma2.git] / lib / python / Plugins / Plugin.py
index d363509189cc8f4204deebcc76f5171d5d466193..3db703979cc622e281d34f2de4003d2852a7efa5 100644 (file)
@@ -1,3 +1,5 @@
+from enigma import loadPNG
+
 class PluginDescriptor:
        """An object to describe a plugin."""
        
@@ -31,8 +33,20 @@ class PluginDescriptor:
                else:
                        self.where = [ where ]
                self.description = description
-               if type(fnc) is str:
-                       self.icon = loadPNG("..")
+
+               if type(icon) is str or icon is None:
+                       self.iconstr = icon
+                       self.icon = None
                else:
                        self.icon = icon
+
                self.__call__ = fnc
+
+       def updateIcon(self, path):
+               if type(self.iconstr) is str:
+                       self.icon = loadPNG(path + self.iconstr)
+               else:
+                       self.icon = None
+
+       def __eq__(self, other):
+               return self.__call__ == other.__call__