From 5bcfe1df4f525382ae108f26b498d657b1905c2a Mon Sep 17 00:00:00 2001 From: Littlesat Date: Mon, 6 Jan 2025 20:39:05 +0100 Subject: [PATCH] Change indents in setup by number and arrange a skin parameter string --- lib/python/Screens/Satconfig.py | 4 ++-- lib/python/Screens/Setup.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py index f94d38c2ac5..4df0fc6b283 100644 --- a/lib/python/Screens/Satconfig.py +++ b/lib/python/Screens/Satconfig.py @@ -17,7 +17,7 @@ from Screens.AutoDiseqc import AutoDiseqc from Tools.BoundFunction import boundFunction from Tools.Directories import fileExists - +from skin import parameters from time import mktime, localtime, time from datetime import datetime @@ -123,7 +123,7 @@ def createSetup(self): self.configModeATSC = self.externallyPowered = None self.have_advanced = False - self.indent = " %s" if self.nim.isCombined() else "%s" + self.indent = (parameters.get("SetupIndent", " ") + "%s") if self.nim.isCombined() else "%s" if not hasattr(self, "terrestrialCountriesEntry"): self.terrestrialCountriesEntry = None if not hasattr(self, "cableCountriesEntry"): diff --git a/lib/python/Screens/Setup.py b/lib/python/Screens/Setup.py index 153114c90c9..1d6ca023310 100644 --- a/lib/python/Screens/Setup.py +++ b/lib/python/Screens/Setup.py @@ -105,7 +105,7 @@ def addItems(self, parentNode, including=True): including = True def addItem(self, element): - indent = element.get("indent", "") + indent = parameters.get("SetupIndent", " ") * int(element.get("indents", 0)) if self.pluginLanguageDomain: itemText = indent + (dgettext(self.pluginLanguageDomain, x) if (x := element.get("text")) else "* fix me *") itemDescription = dgettext(self.pluginLanguageDomain, x) if (x := element.get("description")) else "" @@ -323,4 +323,4 @@ def getConfigMenuItem(configElement): for item in setupDom().findall("./setup/item/."): if item.text == configElement: return _(item.attrib["text"]), eval(configElement) - return "", None + return "", None \ No newline at end of file