icons added to all system plugins (preliminary)

This commit is contained in:
lars 2006-10-31 02:50:29 +00:00
parent abacb36dbe
commit 4b6681487e
14 changed files with 64 additions and 4 deletions

View file

@ -20,6 +20,11 @@ class CryptoBoxPlugin:
## default rank (0..100) of the plugin in listings (lower value means higher priority)
rank = 80
## default icon of this plugin (relative path)
iconFile = "plugin_icon.png"
def __init__(self, cbox, pluginDir):
self.cbox = cbox
self.hdf = {}
@ -40,6 +45,12 @@ class CryptoBoxPlugin:
def getName(self):
"""the name of the python file (module) should be the name of the plugin"""
return self.__module__
def getIcon(self):
"""return the image data of the icon of the plugin"""
import cherrypy
return cherrypy.lib.cptools.serveFile(os.path.join(self.pluginDir, self.iconFile))
def getTemplateFileName(self, template_name):

View file

@ -179,6 +179,8 @@ class WebInterfaceSites:
del args["weblang"]
except KeyError:
pass
if "icon" in args.keys():
return plugin.getIcon()
## check the device argument of volume plugins
if "volume" in plugin.pluginCapabilities:
try: