From: Felix Domke Date: Sun, 5 Mar 2006 21:48:37 +0000 (+0000) Subject: fix absolute paths to be relative X-Git-Tag: 2.6.0~3870 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/cfdc155f46f816c17d098ba0bb2a3bd2037e2f1e fix absolute paths to be relative --- diff --git a/lib/python/Components/FileList.py b/lib/python/Components/FileList.py index 961eb09d..7e6ced57 100644 --- a/lib/python/Components/FileList.py +++ b/lib/python/Components/FileList.py @@ -33,12 +33,12 @@ def FileEntryComponent(name, absolute, isDir = False): res = [ (absolute, isDir) ] res.append((eListboxPythonMultiContent.TYPE_TEXT, 35, 1, 200, 20, 0, RT_HALIGN_LEFT ,name)) if isDir: - png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "/extensions/directory.png")) + png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "extensions/directory.png")) else: extension = name.split('.') extension = extension[-1] if EXTENSIONS.has_key(extension): - png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "/extensions/" + EXTENSIONS[extension] + ".png")) + png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "extensions/" + EXTENSIONS[extension] + ".png")) if png is not None: res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 10, 2, 20, 20, png)) @@ -93,4 +93,4 @@ class FileList(HTMLComponent, GUIComponent, MenuList): def GUIcreate(self, parent): self.instance = eListbox(parent) self.instance.setContent(self.l) - self.instance.setItemHeight(23) \ No newline at end of file + self.instance.setItemHeight(23) diff --git a/lib/python/Components/LanguageList.py b/lib/python/Components/LanguageList.py index 4faf8e8e..08bb6307 100644 --- a/lib/python/Components/LanguageList.py +++ b/lib/python/Components/LanguageList.py @@ -19,9 +19,9 @@ RT_VALIGN_BOTTOM = 16 def LanguageEntryComponent(file, name): res = [ 0 ] res.append((eListboxPythonMultiContent.TYPE_TEXT, 80, 10, 200, 50, 0, RT_HALIGN_LEFT ,name)) - png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "/countries/" + file + ".png")) + png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "countries/" + file + ".png")) if png == None: - png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "/countries/missing.png")) + png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "countries/missing.png")) res.append((eListboxPythonMultiContent.TYPE_PIXMAP, 10, 5, 60, 40, png)) return res diff --git a/lib/python/Components/PluginComponent.py b/lib/python/Components/PluginComponent.py index 145f3d90..095be396 100644 --- a/lib/python/Components/PluginComponent.py +++ b/lib/python/Components/PluginComponent.py @@ -47,16 +47,16 @@ class PluginComponent: continue open(directory_category + "/__init__.py", "a").close() for x in os.listdir(directory_category): - path = directory_category + "/" + x + "/" + path = directory_category + "/" + x if os.path.isdir(path): - if fileExists(path + "plugin.pyc") or fileExists(path + "plugin.py"): + if fileExists(path + "/plugin.pyc") or fileExists(path + "/plugin.py"): plugin = my_import('.'.join(["Plugins", c, x, "plugin"])) if not plugin.__dict__.has_key("Plugins"): print "Plugin %s doesn't have 'Plugin'-call." % (x) continue - plugins = plugin.Plugins() + plugins = plugin.Plugins(path=path) # allow single entry not to be a list if type(plugins) is not list: diff --git a/lib/python/Components/PluginList.py b/lib/python/Components/PluginList.py index d458ce45..1b4daf18 100644 --- a/lib/python/Components/PluginList.py +++ b/lib/python/Components/PluginList.py @@ -15,7 +15,7 @@ def PluginEntryComponent(plugin): res.append(MultiContentEntryText(pos=(80, 26), size=(300, 17), font=1, text=plugin.description)) if plugin.icon is None: - png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "/plugin.png")) + png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "plugin.png")) else: png = plugin.icon res.append(MultiContentEntryPixmapAlphaTest(pos=(10, 5), size=(60, 40), png = png)) @@ -37,7 +37,7 @@ def PluginDownloadComponent(plugin, name): res.append(MultiContentEntryText(pos=(80, 26), size=(300, 17), font=1, text=plugin.description)) if plugin.icon is None: - png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "/plugin.png")) + png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "plugin.png")) else: png = plugin.icon res.append(MultiContentEntryPixmapAlphaTest(pos=(0, 0), size=(60, 50), png = png)) diff --git a/lib/python/Components/TimerList.py b/lib/python/Components/TimerList.py index 0b7e0cc7..5e371a04 100644 --- a/lib/python/Components/TimerList.py +++ b/lib/python/Components/TimerList.py @@ -61,7 +61,7 @@ def TimerEntryComponent(timer, processed): res.append((eListboxPythonMultiContent.TYPE_TEXT, 320, 50, 240, 20, 1, RT_HALIGN_RIGHT|RT_VALIGN_CENTER, state)) if timer.disabled: - png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "/redx.png")) + png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "redx.png")) res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 490, 5, 40, 40, png)) return res diff --git a/lib/python/Components/VolumeBar.py b/lib/python/Components/VolumeBar.py index 63771e24..09dde5e1 100644 --- a/lib/python/Components/VolumeBar.py +++ b/lib/python/Components/VolumeBar.py @@ -15,4 +15,3 @@ class VolumeBar(HTMLComponent, GUIComponent, VariableValue): g = eSlider(parent) g.setRange(0, 100) return g -