|
|
|
@ -25,6 +25,9 @@ class CryptoBoxPlugin:
|
|
|
|
|
## default icon of this plugin (relative path)
|
|
|
|
|
defaultIconFileName = "plugin_icon.gif"
|
|
|
|
|
|
|
|
|
|
## fallback icon file (in the common plugin directory)
|
|
|
|
|
fallbackIconFileName = "plugin_icon_unknown.gif"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, cbox, pluginDir):
|
|
|
|
|
self.cbox = cbox
|
|
|
|
@ -62,7 +65,7 @@ class CryptoBoxPlugin:
|
|
|
|
|
else:
|
|
|
|
|
plugin_icon_file = os.path.join(self.pluginDir, image)
|
|
|
|
|
if not os.access(plugin_icon_file, os.R_OK):
|
|
|
|
|
plugin_icon_file = os.path.join(self.cbox.prefs["Locations"]["PluginDir"], "plugin_icon_unknown.png")
|
|
|
|
|
plugin_icon_file = os.path.join(self.cbox.prefs["Locations"]["PluginDir"], self.fallbackIconFileName)
|
|
|
|
|
return cherrypy.lib.cptools.serveFile(plugin_icon_file)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|