from os import path
from enigma import eSize, ePoint, gFont, eWindow, eLabel, ePixmap, eWindowStyleManager, \
loadPNG, addFont, gRGB, eWindowStyleSkinned
from Components.config import ConfigSubsection, ConfigText, config
from os import path
from enigma import eSize, ePoint, gFont, eWindow, eLabel, ePixmap, eWindowStyleManager, \
loadPNG, addFont, gRGB, eWindowStyleSkinned
from Components.config import ConfigSubsection, ConfigText, config
from Components.Converter.Converter import Converter
from Tools.Directories import resolveFilename, SCOPE_SKIN, SCOPE_SKIN_IMAGE, SCOPE_FONTS
from Tools.Import import my_import
from Components.Converter.Converter import Converter
from Tools.Directories import resolveFilename, SCOPE_SKIN, SCOPE_SKIN_IMAGE, SCOPE_FONTS
from Tools.Import import my_import
guiObject.setZPosition(int(value))
elif attrib == "pixmap":
ptr = loadPixmap(value) # this should already have been filename-resolved.
guiObject.setZPosition(int(value))
elif attrib == "pixmap":
ptr = loadPixmap(value) # this should already have been filename-resolved.
- # that __deref__ still scares me!
- desktop.makeCompatiblePixmap(ptr.__deref__())
- guiObject.setPixmap(ptr.__deref__())
+ desktop.makeCompatiblePixmap(ptr)
+ guiObject.setPixmap(ptr)
- desktop.makeCompatiblePixmap(ptr.__deref__())
- guiObject.setPointer({"pointer": 0, "seek_pointer": 1}[attrib], ptr.__deref__(), pos)
+ desktop.makeCompatiblePixmap(ptr)
+ guiObject.setPointer({"pointer": 0, "seek_pointer": 1}[attrib], ptr, pos)
- desktop.makeCompatiblePixmap(png.__deref__())
- style.setPixmap(eWindowStyleSkinned.__dict__[bsName], eWindowStyleSkinned.__dict__[bpName], png.__deref__())
+ desktop.makeCompatiblePixmap(png)
+ style.setPixmap(eWindowStyleSkinned.__dict__[bsName], eWindowStyleSkinned.__dict__[bpName], png)
for color in elementsWithTag(windowstyle.childNodes, "color"):
type = str(color.getAttribute("name"))
for color in elementsWithTag(windowstyle.childNodes, "color"):
type = str(color.getAttribute("name"))
return None, None
def readSkin(screen, skin, name, desktop):
return None, None
def readSkin(screen, skin, name, desktop):
myscreen, path = lookupScreen(name)
# otherwise try embedded skin
myscreen, path = lookupScreen(name)
# otherwise try embedded skin
# now walk all widgets
for widget in elementsWithTag(myscreen.childNodes, "widget"):
# ok, we either have 1:1-mapped widgets ('old style'), or 1:n-mapped
# now walk all widgets
for widget in elementsWithTag(myscreen.childNodes, "widget"):
# ok, we either have 1:1-mapped widgets ('old style'), or 1:n-mapped
raise SkinError("component with name '" + wname + "' was not found in skin of screen '" + name + "'!")
# assert screen[wname] is not Source
raise SkinError("component with name '" + wname + "' was not found in skin of screen '" + name + "'!")
# assert screen[wname] is not Source
# and collect attributes for this
collectAttributes(attributes, widget, skin_path_prefix, ignore=['name'])
elif wsource:
# and collect attributes for this
collectAttributes(attributes, widget, skin_path_prefix, ignore=['name'])
elif wsource:
+ from Components.GUIComponent import GUIComponent
+ nonvisited_components = [x for x in set(screen.keys()) - visited_components if isinstance(x, GUIComponent)]
+
+ assert not nonvisited_components, "the following components in %s don't have a skin entry: %s" % (name, ', '.join(nonvisited_components))
+
# now walk additional objects
for widget in elementsWithTag(myscreen.childNodes, lambda x: x != "widget"):
if widget.tagName == "applet":
# now walk additional objects
for widget in elementsWithTag(myscreen.childNodes, lambda x: x != "widget"):
if widget.tagName == "applet":