git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replace old screwed stone skin with Screwed Stone II (thx to nemesis)
[enigma2.git]
/
skin.py
diff --git
a/skin.py
b/skin.py
index 07213915e404de20767e225993fc0a07364c25e3..13d56cf1b4ac1c29d76fa5444dc2447085e48f08 100644
(file)
--- a/
skin.py
+++ b/
skin.py
@@
-88,7
+88,7
@@
def collectAttributes(skinAttributes, node, skin_path_prefix=None, ignore=[]):
# TODO: localization? as in e1?
value = a.value.encode("utf-8")
# TODO: localization? as in e1?
value = a.value.encode("utf-8")
- if attrib in ["pixmap", "pointer", "seek_pointer"]:
+ if attrib in ["pixmap", "pointer", "seek_pointer"
, "backgroundPixmap", "selectionPixmap"
]:
value = resolveFilename(SCOPE_SKIN_IMAGE, value, path_prefix=skin_path_prefix)
if attrib not in ignore:
value = resolveFilename(SCOPE_SKIN_IMAGE, value, path_prefix=skin_path_prefix)
if attrib not in ignore:
@@
-115,10
+115,15
@@
def applySingleAttribute(guiObject, desktop, attrib, value):
guiObject.setFont(parseFont(value))
elif attrib == 'zPosition':
guiObject.setZPosition(int(value))
guiObject.setFont(parseFont(value))
elif attrib == 'zPosition':
guiObject.setZPosition(int(value))
- elif attrib
== "pixmap"
:
+ elif attrib
in ["pixmap", "backgroundPixmap", "selectionPixmap"]
:
ptr = loadPixmap(value) # this should already have been filename-resolved.
desktop.makeCompatiblePixmap(ptr)
ptr = loadPixmap(value) # this should already have been filename-resolved.
desktop.makeCompatiblePixmap(ptr)
- guiObject.setPixmap(ptr)
+ if attrib == "pixmap":
+ guiObject.setPixmap(ptr)
+ elif attrib == "backgroundPixmap":
+ guiObject.setBackgroundPicture(ptr)
+ elif attrib == "selectionPixmap":
+ guiObject.setSelectionPicture(ptr)
# guiObject.setPixmapFromFile(value)
elif attrib == "alphatest": # used by ePixmap
guiObject.setAlphatest(
# guiObject.setPixmapFromFile(value)
elif attrib == "alphatest": # used by ePixmap
guiObject.setAlphatest(
@@
-281,9
+286,15
@@
def lookupScreen(name):
return None, None
def readSkin(screen, skin, name, desktop):
return None, None
def readSkin(screen, skin, name, desktop):
-
- myscreen, path = lookupScreen(name)
-
+ if not isinstance(name, list):
+ name = [name]
+
+ # try all skins, first existing one have priority
+ for n in name:
+ myscreen, path = lookupScreen(n)
+ if myscreen is not None:
+ break
+
# otherwise try embedded skin
myscreen = myscreen or getattr(screen, "parsedSkin", None)
# otherwise try embedded skin
myscreen = myscreen or getattr(screen, "parsedSkin", None)
@@
-291,7
+302,7
@@
def readSkin(screen, skin, name, desktop):
if myscreen is None and getattr(screen, "skin", None):
myscreen = screen.parsedSkin = xml.dom.minidom.parseString(screen.skin).childNodes[0]
if myscreen is None and getattr(screen, "skin", None):
myscreen = screen.parsedSkin = xml.dom.minidom.parseString(screen.skin).childNodes[0]
- assert myscreen is not None, "no skin for screen '" +
name
+ "' found!"
+ assert myscreen is not None, "no skin for screen '" +
repr(name)
+ "' found!"
screen.skinAttributes = [ ]
screen.skinAttributes = [ ]