Network.py,NetworkSetup.py,skin_default.xml: * Introduce new unified naming for netwo...
[enigma2.git] / lib / python / Components / FileList.py
index b187ee3ef1d732c22d8e20e776247707e7cbbd68..841a2fe5fc6ba47be6a8b585648812b29a2cb0c8 100755 (executable)
@@ -3,7 +3,7 @@ from os import path as os_path, listdir
 from MenuList import MenuList
 from Components.Harddisk import harddiskmanager
 
-from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename, fileExists
+from Tools.Directories import SCOPE_CURRENT_SKIN, resolveFilename, fileExists
 
 from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, \
        eServiceReference, eServiceCenter, gFont
@@ -35,12 +35,12 @@ def FileEntryComponent(name, absolute = None, isDir = False):
        res = [ (absolute, isDir) ]
        res.append((eListboxPythonMultiContent.TYPE_TEXT, 35, 1, 470, 20, 0, RT_HALIGN_LEFT, name))
        if isDir:
-               png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "extensions/directory.png"))
+               png = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "extensions/directory.png"))
        else:
                extension = name.split('.')
                extension = extension[-1].lower()
                if EXTENSIONS.has_key(extension):
-                       png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "extensions/" + EXTENSIONS[extension] + ".png"))
+                       png = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "extensions/" + EXTENSIONS[extension] + ".png"))
                else:
                        png = None
        if png is not None:
@@ -259,12 +259,12 @@ def MultiFileSelectEntryComponent(name, absolute = None, isDir = False, selected
        res = [ (absolute, isDir, selected, name) ]
        res.append((eListboxPythonMultiContent.TYPE_TEXT, 55, 1, 470, 20, 0, RT_HALIGN_LEFT, name))
        if isDir:
-               png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "extensions/directory.png"))
+               png = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "extensions/directory.png"))
        else:
                extension = name.split('.')
                extension = extension[-1].lower()
                if EXTENSIONS.has_key(extension):
-                       png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "extensions/" + EXTENSIONS[extension] + ".png"))
+                       png = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "extensions/" + EXTENSIONS[extension] + ".png"))
                else:
                        png = None
        if png is not None:
@@ -272,10 +272,10 @@ def MultiFileSelectEntryComponent(name, absolute = None, isDir = False, selected
 
        if not name.startswith('<'):
                if selected is False:
-                       icon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/lock_off.png"))
+                       icon = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/lock_off.png"))
                        res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 2, 0, 25, 25, icon))
                else:
-                       icon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/lock_on.png"))
+                       icon = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/lock_on.png"))
                        res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 2, 0, 25, 25, icon))
        
        return res