1 from config import ConfigSubsection, ConfigYesNo, config, ConfigSelection, ConfigText, ConfigInteger
2 from enigma import Misc_Options, setTunerTypePriorityOrder;
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 config.usage.setup_level = ConfigSelection(default = "intermediate", choices = [
33 ("simple", _("Simple")),
34 ("intermediate", _("Intermediate")),
35 ("expert", _("Expert")) ])
37 config.usage.on_long_powerpress = ConfigSelection(default = "show_menu", choices = [
38 ("show_menu", _("show shutdown menu")),
39 ("shutdown", _("immediate shutdown")) ] )
41 config.usage.alternatives_priority = ConfigSelection(default = "0", choices = [
47 ("5", "DVB-T/-S/-C") ])
49 config.usage.blinking_display_clock_during_recording = ConfigYesNo(default = False)
51 def TunerTypePriorityOrderChanged(configElement):
52 setTunerTypePriorityOrder(int(configElement.value))
53 config.usage.alternatives_priority.addNotifier(TunerTypePriorityOrderChanged)
55 def setHDDStandby(configElement):
56 os.system("hdparm -S" + configElement.value + " /dev/ide/host0/bus0/target0/lun0/disc")
57 config.usage.hdd_standby.addNotifier(setHDDStandby)
59 def set12VOutput(configElement):
60 if configElement.value == "on":
61 Misc_Options.getInstance().set_12V_output(1)
62 elif configElement.value == "off":
63 Misc_Options.getInstance().set_12V_output(0)
64 config.usage.output_12V.addNotifier(set12VOutput)
66 config.usage.keymap = ConfigText(default = "/usr/share/enigma2/keymap.xml")