Skip to content

Commit

Permalink
Change indents in setup by number and arrange a skin parameter string
Browse files Browse the repository at this point in the history
  • Loading branch information
Littlesat committed Jan 6, 2025
1 parent 0cd341a commit 5bcfe1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/python/Screens/Satconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"):
Expand Down
4 changes: 2 additions & 2 deletions lib/python/Screens/Setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down Expand Up @@ -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

0 comments on commit 5bcfe1d

Please sign in to comment.