2 #include <setup_osd_extra.h>
3 #include <lib/dvb/decoder.h>
4 #include <lib/gui/emessage.h>
5 #include <lib/system/info.h>
7 eOSDExpertSetup::eOSDExpertSetup()
8 :eSetupWindow(_("OSD Settings"), 10, 400)
10 init_eOSDExpertSetup();
13 void eOSDExpertSetup::init_eOSDExpertSetup()
15 cmove(ePoint(170, 115));
18 if ( eConfig::getInstance()->getKey("/ezap/osd/showOSDOnSwitchService", showosd
) )
19 eConfig::getInstance()->setKey("/ezap/osd/showOSDOnSwitchService", showosd
);
21 list
.setFlags(list
.getFlags()|eListBoxBase::flagNoPageMovement
);
23 timeout_infobar
= new eListBoxEntryMulti(&list
, _("infobar timeout (left, right)"));
24 timeout_infobar
->add((eString
)" " + eString().sprintf(_("Infobar timeout %d sec"), 2) + (eString
)" >", 2);
25 timeout_infobar
->add((eString
)"< " + eString().sprintf(_("Infobar timeout %d sec"), 3) + (eString
)" >", 3);
26 timeout_infobar
->add((eString
)"< " + eString().sprintf(_("Infobar timeout %d sec"), 4) + (eString
)" >", 4);
27 timeout_infobar
->add((eString
)"< " + eString().sprintf(_("Infobar timeout %d sec"), 5) + (eString
)" >", 5);
28 timeout_infobar
->add((eString
)"< " + eString().sprintf(_("Infobar timeout %d sec"), 6) + (eString
)" >", 6);
29 timeout_infobar
->add((eString
)"< " + eString().sprintf(_("Infobar timeout %d sec"), 7) + (eString
)" >", 7);
30 timeout_infobar
->add((eString
)"< " + eString().sprintf(_("Infobar timeout %d sec"), 8) + (eString
)" >", 8);
31 timeout_infobar
->add((eString
)"< " + eString().sprintf(_("Infobar timeout %d sec"), 9) + (eString
)" >", 9);
32 timeout_infobar
->add((eString
)"< " + eString().sprintf(_("Infobar timeout %d sec"), 10) + (eString
)" >", 10);
33 timeout_infobar
->add((eString
)"< " + eString().sprintf(_("Infobar timeout %d sec"), 11) + (eString
)" >", 11);
34 timeout_infobar
->add((eString
)"< " + eString().sprintf(_("Infobar timeout %d sec"), 12) + (eString
)" ", 12);
35 int timeoutInfobar
= 6;
36 eConfig::getInstance()->getKey("/enigma/timeoutInfobar", timeoutInfobar
);
37 timeout_infobar
->setCurrent(timeoutInfobar
);
38 CONNECT( list
.selchanged
, eOSDExpertSetup::selInfobarChanged
);
40 new eListBoxEntryCheck(&list
, _("show infobar on service switch"), "/ezap/osd/showOSDOnSwitchService", _("show infobar when switching to another service"));
41 CONNECT((new eListBoxEntryCheck(&list
,_("Serviceselector help buttons"),"/ezap/serviceselector/showButtons",_("show colored help buttons in service selector")))->selected
, eOSDExpertSetup::colorbuttonsChanged
);
42 if ( eSystemInfo::getInstance()->getFEType() == eSystemInfo::feSatellite
)
43 new eListBoxEntryCheck(&list
, _("Show Sat position"), "/extras/showSatPos", _("show sat position in the infobar"));
44 new eListBoxEntryCheck(&list
, _("Skip confirmations"), "/elitedvb/extra/profimode", _("enable/disable confirmations"));
45 new eListBoxEntryCheck(&list
, _("Hide error windows"), "/elitedvb/extra/hideerror", _("don't show zap error messages"));
46 new eListBoxEntryCheck(&list
, _("Auto show Infobar"), "/ezap/osd/showOSDOnEITUpdate", _("always show infobar when new event info is avail"));
47 new eListBoxEntryCheck(&list
, _("Show remaining Time"), "/ezap/osd/showCurrentRemaining", _("show event remaining time in the infobar"));
48 new eListBoxEntryCheck(&list
, _("Hide shortcut icons"), "/ezap/osd/hideshortcuts", _("hide shortcut icons in menus"));
51 void eOSDExpertSetup::selInfobarChanged(eListBoxEntryMenu
* e
)
53 if ( e
== (eListBoxEntryMenu
*)timeout_infobar
)
54 eConfig::getInstance()->setKey("/enigma/timeoutInfobar", (int)e
->getKey());
57 void eOSDExpertSetup::colorbuttonsChanged(bool b
)
59 eServiceSelector
*sel
= eZap::getInstance()->getServiceSelector();
60 sel
->setStyle( sel
->getStyle(), true );