1 from config import ConfigSubsection, ConfigYesNo, config, ConfigSelection, ConfigText, ConfigInteger
2 from enigma import Misc_Options
6 config.usage = ConfigSubsection();
7 config.usage.showdish = ConfigYesNo(default = False)
8 config.usage.multibouquet = ConfigYesNo(default = False)
9 config.usage.quickzap_bouquet_change = ConfigYesNo(default = False)
10 config.usage.e1like_radio_mode = ConfigYesNo(default = False)
11 config.usage.infobar_timeout = ConfigSelection(default = "5", choices = [
12 ("0", _("no timeout")), ("1", "1 " + _("second")), ("2", "2 " + _("seconds")), ("3", "3 " + _("seconds")),
13 ("4", "4 " + _("seconds")), ("5", "5 " + _("seconds")), ("6", "6 " + _("seconds")), ("7", "7 " + _("seconds")),
14 ("8", "8 " + _("seconds")), ("9", "9 " + _("seconds")), ("10", "10 " + _("seconds"))])
15 config.usage.show_infobar_on_zap = ConfigYesNo(default = True)
16 config.usage.show_infobar_on_skip = ConfigYesNo(default = True)
17 config.usage.show_infobar_on_event_change = ConfigYesNo(default = True)
18 config.usage.hdd_standby = ConfigSelection(default = "120", choices = [
19 ("0", _("no standby")), ("2", "10 " + _("seconds")), ("6", "30 " + _("seconds")),
20 ("12", "1 " + _("minute")), ("24", "2 " + _("minutes")),
21 ("60", "5 " + _("minutes")), ("120", "10 " + _("minutes")), ("240", "20 " + _("minutes")),
22 ("241", "30 " + _("minutes")), ("242", "1 " + _("hour")), ("244", "2 " + _("hours")),
23 ("248", "4 " + _("hours")) ])
24 config.usage.output_12V = ConfigSelection(default = "do not change", choices = [
25 ("do not change", _("do not change")), ("off", _("off")), ("on", _("on")) ])
26 config.usage.self_defined_seek = ConfigInteger(default=10, limits=(1,9999))
28 config.usage.pip_zero_button = ConfigSelection(default = "standard", choices = [
29 ("standard", _("standard")), ("swap", _("swap PiP and main picture")),
30 ("swapstop", _("move PiP to main picture")), ("stop", _("stop PiP")) ])
32 def setHDDStandby(configElement):
33 os.system("hdparm -S" + configElement.value + " /dev/ide/host0/bus0/target0/lun0/disc")
34 config.usage.hdd_standby.addNotifier(setHDDStandby)
36 def set12VOutput(configElement):
37 if configElement.value == "on":
38 Misc_Options.getInstance().set_12V_output(1)
39 elif configElement.value == "off":
40 Misc_Options.getInstance().set_12V_output(0)
41 config.usage.output_12V.addNotifier(set12VOutput)
43 config.usage.keymap = ConfigText(default = "/usr/share/enigma2/keymap.xml")