fix bluescreen in some conditions
[enigma2.git] / lib / python / Components / InputDevice.py
1 from config import config, ConfigSlider, ConfigSubsection
2
3 class inputDevices:
4         def __init__(self):
5                 pass
6         def setRepeat(self, value):
7                 #print "setup rc repeat"
8                 pass
9         def setDelay(self, value):
10                 #print "setup rc delay"
11                 pass
12
13 def InitInputDevices():
14         config.inputDevices = ConfigSubsection();
15         config.inputDevices.repeat = ConfigSlider(default=5, limits=(1, 10))
16         config.inputDevices.delay = ConfigSlider(default=4, limits=(1, 10))
17
18         #this instance anywhere else needed?    
19         iDevices = inputDevices();      
20         
21         def inputDevicesRepeatChanged(configElement):
22                 iDevices.setRepeat(configElement.value);
23
24         def inputDevicesDelayChanged(configElement):
25                 iDevices.setDelay(configElement.value);
26
27         # this will call the "setup-val" initial
28         config.inputDevices.repeat.addNotifier(inputDevicesRepeatChanged);
29         config.inputDevices.delay.addNotifier(inputDevicesDelayChanged);