Tools/Directories.py: - add fallback to default_skin if SCOPE_CURRENT_SKIN is used...
authorAcid Burn <acid-burn@ACIDNET.(none)>
Tue, 10 Nov 2009 22:30:56 +0000 (23:30 +0100)
committerAcid Burn <acid-burn@ACIDNET.(none)>
Tue, 10 Nov 2009 22:30:56 +0000 (23:30 +0100)
commiteeda01368cface7208fd221ac82f4ff4a44115e3
tree6fd91a24f27f1fd5aa507bd89246f737b7dcd26c
parent5fdd7a8c7ad6c371cd1344898f68e1980e2a94b9
Tools/Directories.py: - add fallback to default_skin if SCOPE_CURRENT_SKIN is used and the wanted file is not found inside the current skin path.
- introduce SCOPE_CURRENT_PLUGIN whitch first looks inside the current skin path for the requested file and if not found fallbacks to SCOPE_PLUGINS.
For Example: pixmap = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock.png')) first looks inside /usr/lib/enigma2/yourskinfolder/skin_default/icons/ for the png file
and if not found it takes the png from /usr/lib/enigma2/skin_default/icons/.
Similiar pixmap = LoadPixmap(resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgrade.png")) does the same, except that it fallbacks to SCOPE_PLUGINS, aka /usr/lib/enigma2/python/Plugins.
In this example /usr/lib/enigma2/python/Plugins/SystemPlugins/SoftwareManager/ and gets the provided original png.
So it is now possible to reskin hardcoded pixmaps inside .py files through the skin by providing new graphics inside the current skin path and overriding the original values.
This fixes #249
lib/python/Tools/Directories.py