Skip to content

Commit

Permalink
[ServiceList]
Browse files Browse the repository at this point in the history
* move config init to UsageConfig
  • Loading branch information
jbleyel committed Aug 24, 2024
1 parent 0c3cfb4 commit 570945a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 26 deletions.
23 changes: 1 addition & 22 deletions lib/python/Components/ServiceList.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from enigma import eListboxServiceContent, eListbox, eServiceCenter, eServiceReference, gFont, eRect, eSize

from Components.config import config, ConfigYesNo, ConfigSelection, ConfigSubsection
from Components.config import config
from Components.GUIComponent import GUIComponent
from Components.Renderer.Picon import getPiconName
from skin import parseColor, parseFont
Expand All @@ -9,27 +9,6 @@
from Tools.TextBoundary import getTextBoundarySize


def InitServiceListSettings():
config.channelSelection = ConfigSubsection()
config.channelSelection.showNumber = ConfigYesNo(default=True)
config.channelSelection.showPicon = ConfigYesNo(default=False)
config.channelSelection.showServiceTypeIcon = ConfigYesNo(default=False)
config.channelSelection.showCryptoIcon = ConfigYesNo(default=False)
config.channelSelection.recordIndicatorMode = ConfigSelection(default=2, choices=[
(0, _("None")),
(1, _("Record Icon")),
(2, _("Colored Text"))
])
config.channelSelection.piconRatio = ConfigSelection(default=167, choices=[
(167, _("XPicon, ZZZPicon")),
(235, _("ZZPicon")),
(250, _("ZPicon"))
])
choiceList = [("", _("Legacy mode"))]
config.channelSelection.screenStyle = ConfigSelection(default="", choices=choiceList)
config.channelSelection.widgetStyle = ConfigSelection(default="", choices=choiceList)


def refreshServiceList(configElement=None):
from Screens.InfoBar import InfoBar
InfoBarInstance = InfoBar.instance
Expand Down
23 changes: 23 additions & 0 deletions lib/python/Components/UsageConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,29 @@ def setNumberModeChange(configElement):
config.usage.multiepg_ask_bouquet = ConfigYesNo(default=False)
config.usage.showpicon = ConfigYesNo(default=True)

# New ServiceList
config.channelSelection = ConfigSubsection()
config.channelSelection.showNumber = ConfigYesNo(default=True)
config.channelSelection.showPicon = ConfigYesNo(default=False)
config.channelSelection.showServiceTypeIcon = ConfigYesNo(default=False)
config.channelSelection.showCryptoIcon = ConfigYesNo(default=False)
config.channelSelection.recordIndicatorMode = ConfigSelection(default=2, choices=[
(0, _("None")),
(1, _("Record Icon")),
(2, _("Colored Text"))
])
config.channelSelection.piconRatio = ConfigSelection(default=167, choices=[
(167, _("XPicon, ZZZPicon")),
(235, _("ZZPicon")),
(250, _("ZPicon"))
])

config.channelSelection.showTimers = ConfigYesNo(default=False)

screenChoiceList = [("", _("Legacy mode"))]
config.channelSelection.screenStyle = ConfigSelection(default="", choices=screenChoiceList)
config.channelSelection.widgetStyle = ConfigSelection(default="", choices=screenChoiceList)

# ######## Workaround for VTI Skins ##############
config.usage.picon_dir = ConfigDirectory(default="/usr/share/enigma2/picon")
config.usage.movielist_show_picon = ConfigYesNo(default=False)
Expand Down
4 changes: 0 additions & 4 deletions lib/python/StartEnigma.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,10 +837,6 @@ def quietEmit(self, eventDict):
from skin import InitSkins
InitSkins()

enigma.eProfileWrite("InitServiceList")
from Components.ServiceList import InitServiceListSettings
InitServiceListSettings()

enigma.eProfileWrite("InitInputDevices")
from Components.InputDevice import InitInputDevices
InitInputDevices()
Expand Down

0 comments on commit 570945a

Please sign in to comment.