From ee0d757b0e61151304a15d96792276d29aa41ce8 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 4 Jun 2011 19:23:03 +0100 Subject: [PATCH] Some more fixes for plugins not fetching data from the correct namespace. --- deluge/plugins/Execute/deluge/plugins/execute/gtkui.py | 5 +++-- .../plugins/Label/deluge/plugins/label/gtkui/sidebar_menu.py | 4 +++- deluge/plugins/Stats/deluge/plugins/stats/gtkui.py | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/deluge/plugins/Execute/deluge/plugins/execute/gtkui.py b/deluge/plugins/Execute/deluge/plugins/execute/gtkui.py index cab4e08ad..8e1741210 100644 --- a/deluge/plugins/Execute/deluge/plugins/execute/gtkui.py +++ b/deluge/plugins/Execute/deluge/plugins/execute/gtkui.py @@ -92,8 +92,9 @@ class ExecutePreferences(object): self.plugin.deregister_hook("on_show_prefs", self.load_commands) def get_resource(self, filename): - return pkg_resources.resource_filename("execute", os.path.join("data", - filename)) + return pkg_resources.resource_filename( + "deluge.plugins.execute", os.path.join("data", filename) + ) def add_command(self, command_id, event, command): log.debug("Adding command `%s`", command_id) diff --git a/deluge/plugins/Label/deluge/plugins/label/gtkui/sidebar_menu.py b/deluge/plugins/Label/deluge/plugins/label/gtkui/sidebar_menu.py index 5070b647c..c489ebb9f 100644 --- a/deluge/plugins/Label/deluge/plugins/label/gtkui/sidebar_menu.py +++ b/deluge/plugins/Label/deluge/plugins/label/gtkui/sidebar_menu.py @@ -51,7 +51,9 @@ NO_LABEL = "No Label" def get_resource(filename): import pkg_resources import os - return pkg_resources.resource_filename("label", os.path.join("data", filename)) + return pkg_resources.resource_filename( + "deluge.plugins.label", os.path.join("data", filename) + ) #menu class LabelSidebarMenu(object): diff --git a/deluge/plugins/Stats/deluge/plugins/stats/gtkui.py b/deluge/plugins/Stats/deluge/plugins/stats/gtkui.py index 499084f99..5f4bc7adc 100644 --- a/deluge/plugins/Stats/deluge/plugins/stats/gtkui.py +++ b/deluge/plugins/Stats/deluge/plugins/stats/gtkui.py @@ -150,4 +150,6 @@ class GtkUI(GtkPluginBase): def get_resource(self, filename): import pkg_resources, os - return pkg_resources.resource_filename("stats", os.path.join("data", filename)) + return pkg_resources.resource_filename( + "deluge.plugins.stats", os.path.join("data", filename) + )