X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/c7b9645a6f9d7d38c99df19e2ce2bbfaf9e3fa99..bbfcb7ea1f040d030277e2b6f2efa9ea0967bf2b:/lib/python/Components/InputDevice.py diff --git a/lib/python/Components/InputDevice.py b/lib/python/Components/InputDevice.py index 1c2598d2..3c3bd7a1 100644 --- a/lib/python/Components/InputDevice.py +++ b/lib/python/Components/InputDevice.py @@ -1,26 +1,28 @@ -from config import configElement -from config import config +from config import config, ConfigSlider, ConfigSubsection class inputDevices: def __init__(self): pass def setRepeat(self, value): + #print "setup rc repeat" pass def setDelay(self, value): + #print "setup rc delay" pass def InitInputDevices(): - config.inputDevices = config; - config.inputDevices.repeat = configElement("config.inputDevices.repeat", config.Slider, 10); - config.inputDevices.delay = configElement("config.inputDevices.delay", config.Slider, 10); + config.inputDevices = ConfigSubsection(); + config.inputDevices.repeat = ConfigSlider(default=5, limits=(1, 10)) + config.inputDevices.delay = ConfigSlider(default=4, limits=(1, 10)) + + #this instance anywhere else needed? + iDevices = inputDevices(); def inputDevicesRepeatChanged(configElement): - print "setup rc repeat" - #inputDevices.setRepeat(configElement.value); + iDevices.setRepeat(configElement.value); def inputDevicesDelayChanged(configElement): - print "setup rc delay" - #inputDevices.setDelay(configElement.value); + iDevices.setDelay(configElement.value); # this will call the "setup-val" initial config.inputDevices.repeat.addNotifier(inputDevicesRepeatChanged);