3 from config import config #global config instance
5 from config import configElement
6 from config import ConfigSubsection
7 from config import ConfigSlider
8 from config import configSelection
10 #temp. class for exhibition
16 def setBright(self, value):
17 os.system("lcddimm " + str(value * 10))
19 def setContrast(self, value):
20 os.system("lcdcontrast " + str(value * 6))
22 def InitSetupDevices():
23 config.timezone = ConfigSubsection();
24 config.timezone.val = configElement("config.timezone.val", configSelection, 1, ("GMT", "GMT+1", "GMT+2", "GMT+3", "GMT+4", "GMT+5", "GMT+6", "GMT+7", "GMT+8", "GMT+9") );
26 config.rc = ConfigSubsection();
27 config.rc.map = configElement("config.rc.map", configSelection, 0, ("Default", "Classic") );
29 config.keyboard = ConfigSubsection();
30 config.keyboard.keymap = configElement("config.keyboard.keymap", configSelection, 1, ("English", "German") );
32 config.osd = ConfigSubsection();
33 config.osd.alpha = configElement("config.osd.alpha", ConfigSlider, 0, "");
34 config.osd.bright = configElement("config.osd.bright", ConfigSlider, 5, "");
35 config.osd.contrast = configElement("config.osd.contrast", ConfigSlider, 5, "");
36 config.osd.language = configElement("config.osd.language", configSelection, 0, ("English", "English US") );
38 config.lcd = ConfigSubsection();
39 config.lcd.bright = configElement("config.lcd.bright", ConfigSlider, 7, "");
40 config.lcd.contrast = configElement("config.lcd.contrast", ConfigSlider, 2, "");
41 config.lcd.standby = configElement("config.lcd.standby", ConfigSlider, 1, "");
42 config.lcd.invert = configElement("config.lcd.invert", configSelection, 1, ("Enable", "Disable") );
46 def setLCDbright(configElement):
47 ilcd.setBright(configElement.value);
49 def setLCDcontrast(configElement):
50 ilcd.setContrast(configElement.value);
52 config.lcd.bright.addNotifier(setLCDbright);
53 config.lcd.contrast.addNotifier(setLCDcontrast);
55 config.parental = ConfigSubsection();
56 config.parental.lock = configElement("config.parental.lock", configSelection, 1, ("Enable", "Disable") );
57 config.parental.setuplock = configElement("config.parental.setuplock", configSelection, 1, ("Enable", "Disable") );
59 config.expert = ConfigSubsection();
60 config.expert.splitsize = configElement("config.expert.splitsize", configSelection, 1, ("0.5Gbyte", "1.0 GByte", "1.5 GByte", "2.0 GByte") );
61 config.expert.satpos = configElement("config.expert.satpos", configSelection, 1, ("Enable", "Disable") );
62 config.expert.fastzap = configElement("config.expert.fastzap", configSelection, 0, ("Enable", "Disable") );
63 config.expert.skipconfirm = configElement("config.expert.skipconfirm", configSelection, 1, ("Enable", "Disable") );
64 config.expert.hideerrors = configElement("config.expert.hideerrors", configSelection, 1, ("Enable", "Disable") );
65 config.expert.autoinfo = configElement("config.expert.autoinfo", configSelection, 1, ("Enable", "Disable") );
67 config.sat = ConfigSubsection();
68 config.sat.satA = configElement("config.sat.satA", configSelection, 1, ("Disabled" ,"Astra 19.2", "Hotbird 13.0") );
69 config.sat.satB = configElement("config.sat.satB", configSelection, 0, ("Disabled" ,"Astra 19.2", "Hotbird 13.0") );
70 config.sat.diseqcA = configElement("config.sat.diseqcA", configSelection, 3, ("no DiSEqC", "DiSEqC 1.0", "DiSEqC 1.1", "DiSEqC 1.2") );
71 config.sat.diseqcB = configElement("config.sat.diseqcB", configSelection, 0, ("no DiSEqC", "DiSEqC 1.0", "DiSEqC 1.1", "DiSEqC 1.2") );
72 config.sat.posA = configElement("config.sat.posA", configSelection, 0, ("DiSEqC A", "DiSEqC B", "DiSEqC C", "DiSEqC D") );
73 config.sat.posB = configElement("config.sat.posB", configSelection, 1, ("DiSEqC A", "DiSEqC B", "DiSEqC C", "DiSEqC D") );
75 #config.blasel = ConfigSubsection();
76 #config.blasel.val = configElement("", configSelection, 0, ("bunt", "s/w", "gruen") );
77 #config.inputDevices.delay = configElement("config.inputDevices.delay", ConfigSlider, 3);
79 #this instance anywhere else needed?
80 #iDevices = inputDevices();
82 #def inputDevicesRepeatChanged(configElement):
83 # iDevices.setRepeat(configElement.value);
85 #def inputDevicesDelayChanged(configElement):
86 # iDevices.setDelay(configElement.value);
88 # this will call the "setup-val" initial
89 #config.inputDevices.repeat.addNotifier(inputDevicesRepeatChanged);
90 #config.inputDevices.delay.addNotifier(inputDevicesDelayChanged);