Remove hard-coded directory path from plugins

This commit is contained in:
shortcutme 2019-08-02 16:05:19 +02:00
parent 1eb97ea381
commit 3e97c154a0
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
8 changed files with 39 additions and 17 deletions

View file

@ -8,8 +8,11 @@ from Translate import Translate
allow_reload = False # No source reload supported in this plugin
plugin_dir = os.path.dirname(__file__)
if "_" not in locals():
_ = Translate("plugins/Trayicon/languages/")
_ = Translate(plugin_dir + "/languages/")
@PluginManager.registerTo("Actions")
@ -23,8 +26,6 @@ class ActionsPlugin(object):
self.main = main
fs_encoding = sys.getfilesystemencoding()
icon = notificationicon.NotificationIcon(
os.path.join(os.path.dirname(os.path.abspath(__file__)), 'trayicon.ico'),
"ZeroNet %s" % config.version