Skip to content

Commit

Permalink
[skin] revert: OpenViX/enigma2@5455b31
Browse files Browse the repository at this point in the history
... not required, for reasons discussed with the author.
  • Loading branch information
Huevos committed Oct 9, 2023
1 parent 3071837 commit 9eda36e
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions lib/python/skin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
menus = {} # Dictionary of images associated with menu entries.
menuicons = {} # Dictionary of icons associated with menu items.
parameters = {} # Dictionary of skin parameters used to modify code behavior.
stringparameters = {} # Dictionary that contains string type parameters for use in screens
setups = {} # Dictionary of images associated with setup menus.
switchPixmap = {} # Dictionary of switch images.
scrollbarStyle = None # When set, a dictionary of scrollbar styles
Expand Down Expand Up @@ -65,7 +64,7 @@

def InitSkins(booting=True):
global currentPrimarySkin, currentDisplaySkin
global domScreens, colors, BodyFont, fonts, menus, menuicons, parameters, stringparameters, setups, switchPixmap, scrollbarStyle, windowStyles, xres, yres
global domScreens, colors, BodyFont, fonts, menus, menuicons, parameters, setups, switchPixmap, scrollbarStyle, windowStyles, xres, yres
# Reset skin dictionaries. We can reload skins without a restart
# Make sure we keep the original dictionaries as many modules now import skin globals explicitly
domScreens.clear()
Expand All @@ -77,7 +76,6 @@ def InitSkins(booting=True):
menus.clear()
menuicons.clear()
parameters.clear()
stringparameters.clear()
setups.clear()
switchPixmap.clear()
scrollbarStyle = None
Expand Down Expand Up @@ -766,7 +764,7 @@ def reloadWindowStyles():
def loadSingleSkinData(desktop, screenID, domSkin, pathSkin, scope=SCOPE_CURRENT_SKIN):
"""Loads skin data like colors, windowstyle etc."""
assert domSkin.tag == "skin", "root element in skin must be 'skin'!"
global colors, fonts, menus, menuicons, parameters, stringparameters, setups, switchPixmap, scrollbarStyle, xres, yres
global colors, fonts, menus, menuicons, parameters, setups, switchPixmap, scrollbarStyle, xres, yres
for tag in domSkin.findall("output"):
scrnID = int(tag.attrib.get("id", GUI_SKIN_ID))
if scrnID == GUI_SKIN_ID:
Expand Down Expand Up @@ -939,15 +937,6 @@ def loadResolvedPixmap(filename):
# print("[Skin] DEBUG: Menu key='%s', image='%s'." % (key, image))
else:
raise SkinError("Tag 'menuicon' needs key and image, got key='%s' and image='%s'" % (key, image))
for tag in domSkin.findall("stringparameters"):
for stringparam in tag.findall("stringparam"):
key = stringparam.attrib.get("key")
value = stringparam.attrib.get("value")
if key and value:
stringparameters[key] = value
# print("[Skin] DEBUG: Menu key='%s', image='%s'." % (key, image))
else:
raise SkinError("Tag 'stringparameters' needs key and value, got key='%s' and value='%s'" % (key, value))
for tag in domSkin.findall("setups"):
for setup in tag.findall("setup"):
key = setup.attrib.get("key")
Expand Down

0 comments on commit 9eda36e

Please sign in to comment.