From a63c5f120e228b83b0f9a9e5b2e2bfcf5b243547 Mon Sep 17 00:00:00 2001 From: Littlesat Date: Sun, 5 Jan 2025 10:49:13 +0100 Subject: [PATCH] Add possibility to indent configs in setup.xml files Add a possiblity to indent a config in the setup.xml file by adding an indent attribute where you can put a string (most likelu spaces) to indent a config. E.g. when you have a switch or a config that allows more additional settings then it can indent so you can build a better overview. The new attribute in setup.xml is just a simple string that will be added in front of the config text. --- lib/python/Screens/Setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/python/Screens/Setup.py b/lib/python/Screens/Setup.py index dcc83d77eb6..153114c90c9 100644 --- a/lib/python/Screens/Setup.py +++ b/lib/python/Screens/Setup.py @@ -105,11 +105,12 @@ def addItems(self, parentNode, including=True): including = True def addItem(self, element): + indent = element.get("indent", "") if self.pluginLanguageDomain: - itemText = dgettext(self.pluginLanguageDomain, x) if (x := element.get("text")) else "* fix me *" + 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 "" else: - itemText = _(x) if (x := element.get("text")) else "* fix me *" + itemText = indent + (_(x) if (x := element.get("text")) else "* fix me *") itemDescription = _(x) if (x := element.get("description")) else "" item = eval(element.text or "") if item == "":