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