2 from config import config #global config instance
3 from config import configElement
4 from config import ConfigSubsection
5 from config import ConfigSlider
6 from config import configSelection
7 from config import configText
8 from Components.Timezones import timezones
9 from Components.Language import language
11 def InitSetupDevices():
13 def timezoneNotifier(configElement):
14 timezones.activateTimezone(configElement.value)
16 config.timezone = ConfigSubsection();
17 config.timezone.val = configElement("config.timezone.val", configSelection, timezones.getDefaultTimezone(), timezones.getTimezoneList());
18 config.timezone.val.addNotifier(timezoneNotifier)
20 config.rc = ConfigSubsection();
21 config.rc.map = configElement("config.rc.map", configSelection, 0, (_("Default"), _("Classic")) );
23 config.keyboard = ConfigSubsection();
24 config.keyboard.keymap = configElement("config.keyboard.keymap", configSelection, 1, (_("English"), _("German")) );
26 config.osd = ConfigSubsection();
27 config.osd.alpha = configElement("config.osd.alpha", ConfigSlider, 0, "");
28 config.osd.bright = configElement("config.osd.bright", ConfigSlider, 5, "");
29 config.osd.contrast = configElement("config.osd.contrast", ConfigSlider, 5, "");
31 def languageNotifier(configElement):
32 language.activateLanguage(configElement.value)
34 config.osd.language = configElement("config.osd.language", configSelection, 0, language.getLanguageList() );
35 config.osd.language.addNotifier(languageNotifier)
37 config.parental = ConfigSubsection();
38 config.parental.lock = configElement("config.parental.lock", configSelection, 1, (_("Enable"), _("Disable")) );
39 config.parental.setuplock = configElement("config.parental.setuplock", configSelection, 1, (_("Enable"), _("Disable")) );
41 config.expert = ConfigSubsection();
42 config.expert.splitsize = configElement("config.expert.splitsize", configSelection, 1, ("0.5Gbyte", "1.0 GByte", "1.5 GByte", "2.0 GByte") );
43 config.expert.satpos = configElement("config.expert.satpos", configSelection, 1, (_("Enable"), _("Disable")) );
44 config.expert.fastzap = configElement("config.expert.fastzap", configSelection, 0, (_("Enable"), _("Disable")) );
45 config.expert.skipconfirm = configElement("config.expert.skipconfirm", configSelection, 1, (_("Enable"), _("Disable")) );
46 config.expert.hideerrors = configElement("config.expert.hideerrors", configSelection, 1, (_("Enable"), _("Disable")) );
47 config.expert.autoinfo = configElement("config.expert.autoinfo", configSelection, 1, (_("Enable"), _("Disable")) );