void eZapOsdSetup::init_eZapOsdSetup() { alpha = gFBDC::getInstance()->getAlpha(); sAlpha = CreateSkinnedSlider("alpha","lalpha", 0, 512 ); sAlpha->setIncrement( eSystemInfo::getInstance()->getAlphaIncrement() ); // Percent ! sAlpha->setValue( alpha); CONNECT( sAlpha->changed, eZapOsdSetup::alphaChanged ); brightness = gFBDC::getInstance()->getBrightness(); sBrightness = CreateSkinnedSlider("brightness","lbrightness", 0, 255 ); sBrightness->setIncrement( 5 ); // Percent ! sBrightness->setValue( brightness); CONNECT( sBrightness->changed, eZapOsdSetup::brightnessChanged ); gamma = gFBDC::getInstance()->getGamma(); sGamma = CreateSkinnedSlider("contrast","lcontast", 0, 255 ); sGamma->setIncrement( 5 ); // Percent ! sGamma->setValue( gamma); CONNECT( sGamma->changed, eZapOsdSetup::gammaChanged ); simpleMainMenu=CreateSkinnedCheckbox("simpleMainMenu",0,"/ezap/osd/simpleMainMenu"); CONNECT( CreateSkinnedButton("skin")->selected, eZapOsdSetup::skinPressed ); CONNECT( CreateSkinnedButton("pluginoffs")->selected, eZapOsdSetup::pluginPositionPressed ); CONNECT(CreateSkinnedButton("ok")->selected, eZapOsdSetup::okPressed); CONNECT( CreateSkinnedButton("expert")->selected, eZapOsdSetup::expertPressed ); BuildSkin("eZapOsdSetup"); setHelpID(83); }
void eTPEditDialog::init_eTPEditDialog() { setText(_("Transponder Edit")); cmove( ePoint( 120, 150 ) ); cresize( eSize( 460, 300 ) ); tpWidget=new eTransponderWidget(this, 1, eTransponderWidget::deliverySatellite| eTransponderWidget::flagNoSat| eTransponderWidget::flagNoInv); tpWidget->resize( eSize( 460, 130 ) ); tpWidget->load(); tpWidget->setTransponder( tp ); tpWidget->move( ePoint(0,-40) ); save=new eButton( this ); save->setText(_("save")); save->setShortcut("green"); save->setShortcutPixmap("green"); save->setHelpText(_("save changes and return")); save->move(ePoint( 10, getClientSize().height()-80) ); save->resize( eSize( 220, 40 ) ); save->loadDeco(); CONNECT( save->selected, eTPEditDialog::savePressed ); eStatusBar *sbar = new eStatusBar(this); sbar->move( ePoint( 0, getClientSize().height()-30) ); sbar->resize( eSize( getClientSize().width(), 30 ) ); sbar->loadDeco(); setHelpID(63); }
void eEventDisplay::init_eEventDisplay(const ePtrList<EITEvent>* e) { eventlist=0; events=0; scrollbar = new eProgress(this); scrollbar->setName("scrollbar"); scrollbar->setStart(0); scrollbar->setPerc(100); descr = new eWidget(this); descr->setName("epg_description"); eventTime = new eLabel(this); eventTime->setName("time"); eventDate = new eLabel(this); eventDate->setName("date"); channel = new eLabel(this); channel->setName("channel"); timer_icon = new eLabel(this); timer_icon->setName("timer_icon"); eSkin *skin=eSkin::getActive(); if (skin->build(this, "eventview")) eFatal("skin load of \"eventview\" failed"); long_description=new eLabel(descr); long_description->setFlags(RS_WRAP); // try to recalc long description label... ( no broken text lines.. ) float lineheight=fontRenderClass::getInstance()->getLineHeight( long_description->getFont() ); int lines = (int)(descr->getSize().height() / lineheight); pageHeight = (int)(lines * lineheight); descr->resize( eSize( descr->getSize().width(), pageHeight+(int)(lineheight/6))); long_description->resize(eSize(descr->getSize().width(), pageHeight*16)); #ifndef DISABLE_FILE addActionToHelpList( &i_epgSelectorActions->addDVRTimerEvent ); #endif #ifndef DISABLE_NETWORK addActionToHelpList( &i_epgSelectorActions->addNGRABTimerEvent ); #endif addActionToHelpList( &i_epgSelectorActions->addSwitchTimerEvent ); addActionToHelpList( &i_epgSelectorActions->removeTimerEvent ); addActionToHelpList( &i_enigmaEventViewActions->close ); if (e) setList(*e); else if (evt) setEvent(evt); addActionMap( &i_enigmaEventViewActions->map ); addActionMap( &i_epgSelectorActions->map ); setHelpID(11); }
void eTransponderEditWindow::init_eTransponderEditWindow() { addActionMap(&i_TransponderEditWindowActions->map); sat = new eButton(this); sat->setName("sat"); CONNECT(sat->selected, eTransponderEditWindow::satPressed); add = new eButton(this); add->setName("add"); CONNECT(add->selected, eTransponderEditWindow::addPressed); edit = new eButton(this); edit->setName("edit"); CONNECT(edit->selected, eTransponderEditWindow::editPressed); remove = new eButton(this); remove->setName("remove"); CONNECT(remove->selected, eTransponderEditWindow::removePressed); satellites = new eListBox<eListBoxEntryText>( this, 0, 0 ); satellites->setName("satlist"); transponders = new eListBox<eListBoxEntryTransponder>( this, 0, 0 ); transponders->setName("transponderlist"); transponders->FakeFocus( 0 ); satellites->FakeFocus( 1 ); if ( eSkin::getActive()->build( this, "TransponderWindow") ) eFatal("eTransponderEditWindow build failed"); eDVBServiceController *sapi=eDVB::getInstance()->getServiceAPI(); eTransponder *tp=0; if (sapi && sapi->transponder) tp = sapi->transponder; eListBoxEntryText *sel=0; if( !eTransponderList::getInstance()->reloadNetworks() ) { for ( std::list<tpPacket>::iterator i(eTransponderList::getInstance()->getNetworks().begin()); i != eTransponderList::getInstance()->getNetworks().end(); ++i) if ( tp && i->orbital_position == tp->satellite.orbital_position ) sel = new eListBoxEntryText(satellites, i->name, (void*) &(*i)); else new eListBoxEntryText(satellites, i->name, (void*) &(*i)); } CONNECT(satellites->selchanged, eTransponderEditWindow::satSelChanged ); if ( sel ) satellites->setCurrent(sel); else satellites->setCurrent(0); CONNECT( eWidget::focusChanged, eTransponderEditWindow::focusChanged ); satSelChanged( satellites->getCurrent() ); setHelpID(64); }
void PluginOffsetScreen::init_PluginOffsetScreen() { foreColor = eSkin::getActive()->queryColor("eWindow.titleBarFont"); setForegroundColor( foreColor ); move(ePoint(0,0)); resize(eSize(768,576)); descr = new eLabel( this ); descr->setFlags( eLabel::flagVCenter|RS_WRAP ); descr->setForegroundColor( foreColor ); descr->resize(eSize(568,300)); descr->move(ePoint(100,100)); descr->setText(_("here you can center the tuxtxt rectangle...\npress red to select the left top edge\npress green to select the right bottom edge\nuse the cursor keys to move the selected edges")); eSize ext = descr->getExtend(); ext+=eSize(8,4); // the given Size of the Text is okay... but the renderer sucks... descr->resize( ext ); descr->move( ePoint( (width()/2)-(ext.width()/2) , (height()/2)-(ext.height()/2) ) ); descr->show(); addActionMap(&i_PluginOffsetActions->map); addActionMap(&i_cursorActions->map); addActionToHelpList( &i_PluginOffsetActions->leftTop ); addActionToHelpList( &i_PluginOffsetActions->rightBottom ); setHelpID(96); }
void eZapVideoSetup::init_eZapVideoSetup() { /* eSkin *skin=eSkin::getActive(); if (skin->build(this, "setup.video")) qFatal("skin load of \"setup.video\" failed");*/ /* cresize( eSize(height(), width()) ); cmove( ePoint(0,0) );*/ if (eConfig::getInstance()->getKey("/elitedvb/video/colorformat", v_colorformat)) v_colorformat = 1; if (eConfig::getInstance()->getKey("/elitedvb/video/pin8", v_pin8)) v_pin8 = 0; if (eConfig::getInstance()->getKey("/elitedvb/video/disableWSS", v_disableWSS )) v_disableWSS = 0; if (eConfig::getInstance()->getKey("/elitedvb/video/tvsystem", v_tvsystem )) v_tvsystem = 1; if (!v_tvsystem) v_tvsystem = 1; if (eConfig::getInstance()->getKey("/elitedvb/video/vcr_switching", v_VCRSwitching )) v_VCRSwitching=1; int fd=eSkin::getActive()->queryValue("fontsize", 20); setText(_("A/V Settings")); move(ePoint(160, 90)); cresize(eSize(390, 350)); eLabel *l=new eLabel(this); l->setText(_("Color Format:")); l->move(ePoint(20, 20)); l->resize(eSize(150, fd+4)); colorformat=new eListBox<eListBoxEntryText>(this, l); colorformat->loadDeco(); colorformat->setFlags(eListBox<eListBoxEntryText>::flagNoUpDownMovement); colorformat->move(ePoint(180, 20)); colorformat->resize(eSize(120, 35)); eListBoxEntryText* entrys[4]; entrys[0]=new eListBoxEntryText(colorformat, _("CVBS"), (void*)1); entrys[1]=new eListBoxEntryText(colorformat, _("RGB"), (void*)2); entrys[2]=new eListBoxEntryText(colorformat, _("SVideo"), (void*)3); entrys[3]=new eListBoxEntryText(colorformat, _("YPbPr"), (void*)4); /* http://forum.tuxbox.org/forum/viewtopic.php?t=34005 if( eSystemInfo::getInstance()->getHwType() > eSystemInfo::dbox2Philips ) entrys[3]=new eListBoxEntryText(colorformat, _("YPbPr"), (void*)4);*/ colorformat->setCurrent(entrys[v_colorformat-1]); colorformat->setHelpText(_("choose color format ( left, right )")); CONNECT( colorformat->selchanged, eZapVideoSetup::CFormatChanged ); l=new eLabel(this); l->setText(_("Aspect Ratio:")); l->move(ePoint(20, 60)); l->resize(eSize(150, fd+4)); pin8=new eListBox<eListBoxEntryText>(this, l); pin8->loadDeco(); pin8->setFlags(eListBox<eListBoxEntryText>::flagNoUpDownMovement); pin8->move(ePoint(180, 60)); pin8->resize(eSize(170, 35)); pin8->setHelpText(_("choose aspect ratio ( left, right )")); entrys[0]=new eListBoxEntryText(pin8, _("4:3 letterbox"), (void*)0); entrys[1]=new eListBoxEntryText(pin8, _("4:3 panscan"), (void*)1); entrys[2]=new eListBoxEntryText(pin8, _("16:9"), (void*)2); /* dbox, dm700, dm7020 can do black bars left and right of 4:3 video */ if ( eSystemInfo::getInstance()->getHwType() <= eSystemInfo::DM7020 ) entrys[3]=new eListBoxEntryText(pin8, _("always 16:9"), (void*)3); pin8->setCurrent(entrys[v_pin8]); CONNECT( pin8->selchanged, eZapVideoSetup::VPin8Changed ); l=new eLabel(this); l->setText(_("TV System:")); l->move(ePoint(20, 100)); l->resize(eSize(150, fd+4)); tvsystem=new eListBox<eListBoxEntryText>(this, l); tvsystem->loadDeco(); tvsystem->setFlags(eListBox<eListBoxEntryText>::flagNoUpDownMovement); // our bitmask is: // have pal 1 // have ntsc 2 // have pal60 4 (aka. PAL-M bis wir PAL60 supporten) // allowed bitmasks: // 1 pal only, no ntsc // 2 ntsc only, no pal // 3 multinorm // 5 pal, pal60 tvsystem->move(ePoint(180, 100)); tvsystem->resize(eSize(170, 35)); tvsystem->setHelpText(_("choose TV system ( left, right )")); entrys[0]=new eListBoxEntryText(tvsystem, "PAL", (void*)1); entrys[1]=new eListBoxEntryText(tvsystem, "PAL + PAL60", (void*)5); entrys[2]=new eListBoxEntryText(tvsystem, "Multinorm", (void*)3); entrys[3]=new eListBoxEntryText(tvsystem, "NTSC", (void*)2); int i = 0; switch (v_tvsystem) { case 1: i = 0; break; case 5: i = 1; break; case 3: i = 2; break; case 2: i = 3; break; } tvsystem->setCurrent(entrys[i]); CONNECT( tvsystem->selchanged, eZapVideoSetup::TVSystemChanged ); c_disableWSS = new eCheckbox(this, v_disableWSS, 1); c_disableWSS->move(ePoint(20,140)); c_disableWSS->resize(eSize(350,30)); c_disableWSS->setText(_("Disable WSS on 4:3")); c_disableWSS->setHelpText(_("don't send WSS signal when A-ratio is 4:3")); CONNECT( c_disableWSS->checked, eZapVideoSetup::DisableWSSChanged ); int sac3default = 0; sac3default=eAudio::getInstance()->getAC3default(); ac3default=new eCheckbox(this, sac3default, 1); ac3default->setText(_("AC3 default output")); ac3default->move(ePoint(20, 175)); ac3default->resize(eSize(350, 30)); ac3default->setHelpText(_("enable/disable ac3 default output (ok)")); CONNECT( ac3default->checked, eZapVideoSetup::ac3defaultChanged ); if ( eSystemInfo::getInstance()->hasScartSwitch() ) { VCRSwitching=new eCheckbox(this, v_VCRSwitching, 1); VCRSwitching->setText(_("Auto VCR switching")); VCRSwitching->move(ePoint(20, 205)); VCRSwitching->resize(eSize(350, 30)); VCRSwitching->setHelpText(_("auto switch to VCR connector")); CONNECT( VCRSwitching->checked, eZapVideoSetup::VCRChanged ); } ok=new eButton(this); ok->setText(_("save")); ok->setShortcut("green"); ok->setShortcutPixmap("green"); ok->move(ePoint(20, 250)); ok->resize(eSize(220, 40)); ok->setHelpText(_("save changes and return")); ok->loadDeco(); CONNECT(ok->selected, eZapVideoSetup::okPressed); testpicture=new eButton(this); testpicture->setText(_("test")); testpicture->setShortcut("blue"); testpicture->setShortcutPixmap("blue"); testpicture->move(ePoint(260, 250)); testpicture->resize(eSize(100, 40)); testpicture->setHelpText(_("show testpicture")); testpicture->loadDeco(); CONNECT(testpicture->selected, eZapVideoSetup::showTestpicture); status = new eStatusBar(this); status->move( ePoint(0, clientrect.height()-50) ); status->resize( eSize( clientrect.width(), 50) ); status->loadDeco(); setHelpID(86); }
void eExpertSetup::init_eExpertSetup() { cmove(ePoint(135, 100)); int showlogo=0; if ( eConfig::getInstance()->getKey("/ezap/extra/showlogo", showlogo) ) eConfig::getInstance()->setKey("/ezap/extra/showlogo", showlogo); int logChannelName=0; if ( eConfig::getInstance()->getKey("/ezap/extra/logChannelName", logChannelName) ) eConfig::getInstance()->setKey("/ezap/extra/logChannelName", logChannelName); int lockWebIf=1; if ( eConfig::getInstance()->getKey("/ezap/webif/lockWebIf", lockWebIf) ) eConfig::getInstance()->setKey("/ezap/webif/lockWebIf", lockWebIf); int showSatPos=1; if ( eConfig::getInstance()->getKey("/extras/showSatPos", showSatPos) ) eConfig::getInstance()->setKey("/extras/showSatPos", showSatPos); int entry=0; #ifndef DISABLE_NETWORK if (eSystemInfo::getInstance()->hasNetwork()) { CONNECT((new eListBoxEntryMenu(&list, _("Communication Setup"), eString().sprintf("(%d) %s", ++entry, _("open communication setup")) ))->selected, eExpertSetup::communication_setup); CONNECT((new eListBoxEntryMenu(&list, _("Ngrab Streaming Setup"), eString().sprintf("(%d) %s", ++entry, _("open ngrab server setup")) ))->selected, eExpertSetup::ngrab_setup); switch (eSystemInfo::getInstance()->getHwType()) { case eSystemInfo::DM7020: case eSystemInfo::DM600PVR: case eSystemInfo::DM500PLUS: break; default: CONNECT((new eListBoxEntryMenu(&list, _("Software Update"), eString().sprintf("(%d) %s", ++entry, _("open software update")) ))->selected, eExpertSetup::software_update); } } int startSamba=1; if ( eConfig::getInstance()->getKey("/elitedvb/network/samba", startSamba) ) eConfig::getInstance()->setKey("/elitedvb/network/samba", startSamba); #endif CONNECT((new eListBoxEntryMenu(&list, _("Remote Control"), eString().sprintf("(%d) %s", ++entry, _("open remote control setup")) ))->selected, eExpertSetup::rc_setup); #ifndef DISABLE_HDD #ifndef DISABLE_FILE CONNECT((new eListBoxEntryMenu(&list, _("Swap Manager"), eString().sprintf("(%d) %s", ++entry, _("open swapspace setup")) ))->selected, eExpertSetup::swapmanager); #endif #endif if ( eSystemInfo::getInstance()->getHwType() >= eSystemInfo::DM7000 ) CONNECT((new eListBoxEntryMenu(&list, _("Factory reset"), eString().sprintf("(%d) %s", ++entry, _("all settings will set to factory defaults")) ))->selected, eExpertSetup::factory_reset); CONNECT((new eListBoxEntryMenu(&list, _("EPG settings"), eString().sprintf("(%d) %s", ++entry, _("open EPG settings")) ))->selected, eExpertSetup::setup_epgcache); new eListBoxEntryMenuSeparator(&list, eSkin::getActive()->queryImage("listbox.separator"), 0, true ); #ifdef ENABLE_IPKG CONNECT((new eListBoxEntryMenu(&list, _("package manager"), eString().sprintf("(%d) %s", ++entry, _("open package manager")) ))->selected, eExpertSetup::setup_ipkg); new eListBoxEntryMenuSeparator(&list, eSkin::getActive()->queryImage("listbox.separator"), 0, true ); #endif list.setFlags(list.getFlags()|eListBoxBase::flagNoPageMovement); #ifndef DISABLE_FILE if ( eSystemInfo::getInstance()->canRecordTS() && !eDVB::getInstance()->recorder ) { record_split_size = new eListBoxEntryMulti(&list, _("record split size (left, right)")); record_split_size->add(" 650MB >", 650*1024); record_split_size->add("< 700MB >", 700*1024); record_split_size->add("< 800MB >", 800*1024); record_split_size->add("< 1GB >", 1024*1024); record_split_size->add("< 1,5GB >", 1536*1024); record_split_size->add("< 2GB >", 2*1024*1024); record_split_size->add("< 4GB >", 4*1024*1024); record_split_size->add("< 8GB >", 8*1024*1024); record_split_size->add("< 16GB ", 16*1024*1024); int splitsize=0; if (eConfig::getInstance()->getKey("/extras/record_splitsize", splitsize)) splitsize=1024*1024; // 1G record_split_size->setCurrent(splitsize); CONNECT( list.selchanged, eExpertSetup::selChanged ); } // Timeroffset (Anfang) timeroffsetstart = new eListBoxEntryMulti( &list, (_("Change timer offset [start] (left, right)"))); for (int i = 0; i <= 10; i++) timeroffsetstart->add( (eString)(i ? " ":"< ") + eString().sprintf(_("Timer offset [start] %d min"), i) + (eString)(i < 10 ? " >":" "), i); int offsetstart=0; if (eConfig::getInstance()->getKey("/enigma/timeroffset", offsetstart) ) offsetstart=0; // 0 Minutes timeroffsetstart->setCurrent(offsetstart); CONNECT(list.selchanged, eExpertSetup::startoffsetChanged ); // Timeroffset (Ende) timeroffsetend = new eListBoxEntryMulti( &list, (_("Change timer offset [end] (left, right)"))); for (int i = 0; i <= 10; i++) timeroffsetend->add( (eString)(i ? " ":"< ") + eString().sprintf(_("Timer offset [end] %d min"), i) + (eString)(i < 10 ? " >":" "), i); int offsetend=0; if (eConfig::getInstance()->getKey("/enigma/timeroffset2", offsetend) ) offsetend=0; // 0 Minutes timeroffsetend->setCurrent(offsetend); CONNECT(list.selchanged, eExpertSetup::endoffsetChanged ); timerenddefaultaction = new eListBoxEntryMulti( &list, _("Default action on timer end (left, right)")); timerenddefaultaction->add( eString().sprintf("%s: %s%s",_("Action on timer end"),_("Nothing")," >").c_str(), 0 ); if ( eSystemInfo::getInstance()->canShutdown() ) { timerenddefaultaction->add( eString().sprintf("< %s: %s >", _("Action on timer end"), _("Standby")).c_str(), ePlaylistEntry::doGoSleep ); timerenddefaultaction->add( eString().sprintf("< %s: %s", _("Action on timer end"), _("Shutdown")).c_str(), ePlaylistEntry::doShutdown ); } else { timerenddefaultaction->add( eString().sprintf("< %s: %s", _("Action on timer end"), _("Standby")).c_str(), ePlaylistEntry::doGoSleep ); } int defaultaction = 0; if (eConfig::getInstance()->getKey("/enigma/timerenddefaultaction", defaultaction) ) defaultaction = 0; timerenddefaultaction->setCurrent(defaultaction); CONNECT(list.selchanged, eExpertSetup::timerenddefaultactionChanged ); new eListBoxEntryMenuSeparator(&list, eSkin::getActive()->queryImage("listbox.separator"), 0, true ); new eListBoxEntryCheck(&list, _("disable AC3 recording"), "/enigma/noac3recording", _("don't record AC3 audio track")); new eListBoxEntryCheck(&list, _("disable teletext recording"), "/enigma/nottxrecording", _("don't record teletext track")); new eListBoxEntryCheck(&list, _("disable timestamp detection"), "/enigma/notimestampdetect", _("don't try to detect duration from DVB timestamps when replaying recordings")); new eListBoxEntryMenuSeparator(&list, eSkin::getActive()->queryImage("listbox.separator"), 0, true ); #endif if ( eSystemInfo::getInstance()->getHwType() >= eSystemInfo::DM7000 ) CONNECT((new eListBoxEntryCheck(&list,_("Enable fast zapping"),"/elitedvb/extra/fastzapping",_("enables faster zapping.. but with visible sync")))->selected, eExpertSetup::fastZappingChanged ); CONNECT((new eListBoxEntryCheck(&list, _("Use http authentification"), "/ezap/webif/lockWebIf", _("enables the http (user/password) authentification")))->selected, eExpertSetup::reinitializeHTTPServer ); CONNECT((new eListBoxEntryCheck(&list, _("Don't open serial port"), "/ezap/extra/disableSerialOutput", _("don't write debug messages to /dev/tts/0")))->selected, eExpertSetup::reinitializeHTTPServer ); new eListBoxEntryCheck(&list, _("Auto bouquet change"), "/elitedvb/extra/autobouquetchange", _("change into next bouquet when end of current bouquet is reached")); new eListBoxEntryCheck(&list, _("Auto reconnect cahandler"), "/elitedvb/extra/cahandlerReconnect", _("try to reconnect when an external cahandler connection was lost")); #ifndef DISABLE_NETWORK if ( eSystemInfo::getInstance()->getHwType() == eSystemInfo::DM7000 || eSystemInfo::getInstance()->getHwType() == eSystemInfo::DM7020) new eListBoxEntryCheck(&list, _("Enable file sharing"), "/elitedvb/network/samba", _("start file sharing(samba) on startup")); #endif #ifndef TUXTXT_CFG_STANDALONE CONNECT((new eListBoxEntryCheck(&list, _("Disable teletext caching"), "/ezap/extra/teletext_caching", _("don't cache teletext pages in background")))->selected, eExpertSetup::tuxtxtCachingChanged ); #endif new eListBoxEntryCheck(&list, _("Disable internal teletext"), "/ezap/teletext/use_external", _("use external tuxtxt plugin")); new eListBoxEntryCheck(&list, _("Enable Zapping History"), "/elitedvb/extra/extzapping", _("don't care about actual mode when zapping in history list")); if ( eSystemInfo::getInstance()->getHwType() < eSystemInfo::DM5600 ) new eListBoxEntryCheck(&list, _("Disable Standby"), "/extras/fastshutdown", _("Box goes directly into Deep-Standby")); #ifdef ENABLE_MHW_EPG int mhwepg=1; if ( eConfig::getInstance()->getKey("/extras/mhwepg", mhwepg) ) eConfig::getInstance()->setKey("/extras/mhwepg", mhwepg); new eListBoxEntryCheck(&list, _("Enable MHW EPG"), "/extras/mhwepg", _("Mediahighway EPG, activate swap space when using with multiple operators")); #endif #ifdef HAVE_DREAMBOX_HARDWARE if ( eSystemInfo::getInstance()->getHwType() == eSystemInfo::DM7000 ) { int corefilesDisable = 0; if (access("/var/etc/.no_corefiles", R_OK) == 0) corefilesDisable = 1; eConfig::getInstance()->setKey("/extras/corefiles_disable", corefilesDisable); new eListBoxEntryMenuSeparator(&list, eSkin::getActive()->queryImage("listbox.separator"), 0, true ); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Disable CoreFiles"), "/extras/corefiles_disable", _("don't create 'Corefiles' after an Enigma crash")))->selected, eExpertSetup::fileToggle,"/var/etc/.no_corefiles"); #ifdef ENABLE_EXPERT_WEBIF int dontMountHDD = 0; if (access("/var/etc/.dont_mount_hdd", R_OK) == 0) dontMountHDD = 1; eConfig::getInstance()->setKey("/extras/dont_mount_hdd", dontMountHDD); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Disable HDD mount"), "/extras/dont_mount_hdd", _("don't mount the HDD via 'rcS'")))->selected, eExpertSetup::fileToggle,"/var/etc/.dont_mount_hdd"); #endif } #endif #ifndef DISABLE_FILE int autoplay=1; if ( eConfig::getInstance()->getKey("/ezap/extra/autoplay", autoplay) ) eConfig::getInstance()->setKey("/ezap/extra/autoplay", autoplay); new eListBoxEntryCheck(&list, _("Enable Filemode Autoplay"), "/ezap/extra/autoplay", _("continue playing last selected movie when entering Filemode")); #endif #ifdef HAVE_DBOX_HARDWARE new eListBoxEntryMenuSeparator(&list, eSkin::getActive()->queryImage("listbox.separator"), 0, true ); //Boot-info int bootInfo = 0; if (access("/var/etc/.boot_info", R_OK) == 0) bootInfo = 1; eConfig::getInstance()->setKey("/extras/bootinfo", bootInfo); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Show Boot-Info"), "/extras/bootinfo", _("Show Boot-Infos (IP, etc.)")))->selected, eExpertSetup::fileToggle,"/var/etc/.boot_info"); //HW-Sections int hwSectionsDisable = 0; if (access("/var/etc/.hw_sections", R_OK) == 0) hwSectionsDisable = 1; eConfig::getInstance()->setKey("/extras/hw_sections_disable", hwSectionsDisable); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Disable HW_Sections"), "/extras/hw_sections_disable", _("don't use hardware section filtering")))->selected, eExpertSetup::fileToggle,"/var/etc/.hw_sections"); //Watchdog int watchdogDisable = 0; if (access("/var/etc/.no_watchdog", R_OK) == 0) watchdogDisable = 1; eConfig::getInstance()->setKey("/extras/watchdog_disable", watchdogDisable); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Disable Watchdog"), "/extras/watchdog_disable", _("don't use the Watchdog")))->selected, eExpertSetup::fileToggle,"/var/etc/.no_watchdog"); //ENX-Watchdog - Philips and Sagem if ( eSystemInfo::getInstance()->getHwType() != eSystemInfo::dbox2Nokia ) { int enxWatchdogDisable = 0; if (access("/var/etc/.no_enxwatchdog", R_OK) == 0) enxWatchdogDisable = 1; eConfig::getInstance()->setKey("/extras/enxwatchdog_disable", enxWatchdogDisable); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Disable ENX-Watchdog"), "/extras/enxwatchdog_disable", _("don't use the ENX-Watchdog")))->selected, eExpertSetup::fileToggle,"/var/etc/.no_enxwatchdog"); } //SPTS-Recording int sptsMode = 0; if (access("/var/etc/.spts_mode", R_OK) == 0) sptsMode = 1; eConfig::getInstance()->setKey("/extras/spts_mode", sptsMode); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Enable SPTS-Mode"), "/extras/spts_mode", _("use SPTS-Mode (enables TS-recording)")))->selected, eExpertSetup::fileToggle,"/var/etc/.spts_mode"); //File I/O-Options int OSyncDisable = 0; if (access("/var/etc/.no_o_sync", R_OK) == 0) OSyncDisable = 1; eConfig::getInstance()->setKey("/extras/O_SYNC_disable", OSyncDisable); CONNECT_2_1((new eListBoxEntryCheck(&list, _("Disable O_SYNC"), "/extras/O_SYNC_disable", _("The file/recording is not opened for synchronous I/O")))->selected, eExpertSetup::fileToggle,"/var/etc/.no_o_sync"); #endif setHelpID(92); }
void eMainMenu::init_eMainMenu() { simpleMainmenu=0; eConfig::getInstance()->getKey("/ezap/osd/simpleMainMenu", simpleMainmenu); if ( !simpleMainmenu ) { addActionMap(&i_mainmenuActions->map); addActionMap(&i_cursorActions->map); addActionMap(&i_shortcutActions->map); eLabel *background=new eLabel(this); background->setName("background"); label[0]=new eLabel(this); label[0]->setName("l3"); label[1]=new eLabel(this); label[1]->setName("l2"); label[2]=new eLabel(this); label[2]->setName("l1"); label[3]=new eLabel(this); label[3]->setName("m"); label[4]=new eLabel(this); label[4]->setName("r1"); label[5]=new eLabel(this); label[5]->setName("r2"); label[6]=new eLabel(this); label[6]->setName("r3"); description=new eLabel(this); description->setName("description"); if (eSkin::getActive()->build(this, "eZapMainMenu")) eFatal("unable to load main menu"); char *pixmap_name[]={ "tv", "radio", #ifndef DISABLE_FILE "file", #endif "info", #ifndef DISABLE_FILE "shutdown", #endif "setup", #ifndef DISABLE_FILE "games", #endif "timer", "scart" }; int count = MENU_ENTRIES; if (!eSystemInfo::getInstance()->hasScartSwitch()) --count; for (int i=0; i<count; i++) { pixmaps[i][0]=eSkin::getActive()->queryImage(eString("mainmenu.") + eString(pixmap_name[i]) ); pixmaps[i][1]=eSkin::getActive()->queryImage(eString("mainmenu.") + eString(pixmap_name[i]) + ".sel" ); if (!pixmaps[i][0]) eFatal("error, mainmenu bug, mainmenu.%s not defined", pixmap_name[i]); if (!pixmaps[i][1]) eFatal("error, mainmenu bug, mainmenu.%s.sel not defined", pixmap_name[i]); pixmaps[i][0]->uncompressdata(); pixmaps[i][1]->uncompressdata(); } setActive(active=eZapMain::getInstance()->getMode()); } else { CONNECT(wndShowTimer.timeout, eMainMenu::showWindow); wnd.cmove(ePoint(180, 115)); int entry=0; int count = MENU_ENTRIES; for (int i=0; i<count; i++) { pixmaps[i][0]=NULL; pixmaps[i][1]=NULL; } CONNECT((new eListBoxEntryMenu(wnd.getList(), _("TV mode"), eString().sprintf("(%d) %s", ++entry, _("TV mode")) ))->selected, eMainMenu::sel_tv); CONNECT((new eListBoxEntryMenu(wnd.getList(), _("Radio mode"), eString().sprintf("(%d) %s", ++entry, _("Radio mode")) ))->selected, eMainMenu::sel_radio); #ifndef DISABLE_FILE CONNECT((new eListBoxEntryMenu(wnd.getList(), _("File mode"), eString().sprintf("(%d) %s", ++entry, _("File mode")) ))->selected, eMainMenu::sel_file); if ( eSystemInfo::getInstance()->hasScartSwitch() ) CONNECT((new eListBoxEntryMenu(wnd.getList(), _("VCR"), eString().sprintf("(%d) %s", ++entry, _("VCR")) ))->selected, eMainMenu::sel_vcr); new eListBoxEntryMenuSeparator(wnd.getList(), eSkin::getActive()->queryImage("listbox.separator"), 0, true ); CONNECT((new eListBoxEntryMenu(wnd.getList(), _("Timer"), eString().sprintf("(%d) %s", ++entry, _("Timer")) ))->selected, eMainMenu::sel_timer); CONNECT((new eListBoxEntryMenu(wnd.getList(), _("Setup"), eString().sprintf("(%d) %s", ++entry, _("Setup")) ))->selected, eMainMenu::sel_setup); CONNECT((new eListBoxEntryMenu(wnd.getList(), _("Games"), eString().sprintf("(%d) %s", ++entry, _("Games")) ))->selected, eMainMenu::sel_plugins); CONNECT((new eListBoxEntryMenu(wnd.getList(), _("Information"), eString().sprintf("(%d) %s", ++entry, _("Information")) ))->selected, eMainMenu::sel_info); new eListBoxEntryMenuSeparator(wnd.getList(), eSkin::getActive()->queryImage("listbox.separator"), 0, true ); CONNECT((new eListBoxEntryMenu(wnd.getList(), _("Shutdown"), eString().sprintf("(%d) %s", ++entry, _("Shutdown")) ))->selected, eMainMenu::sel_quit); #else if ( eSystemInfo::getInstance()->hasScartSwitch() ) CONNECT((new eListBoxEntryMenu(wnd.getList(), _("VCR"), eString().sprintf("(%d) %s", ++entry, _("VCR")) ))->selected, eMainMenu::sel_vcr); new eListBoxEntryMenuSeparator(wnd.getList(), eSkin::getActive()->queryImage("listbox.separator"), 0, true ); CONNECT((new eListBoxEntryMenu(wnd.getList(), _("Timer"), eString().sprintf("(%d) %s", ++entry, _("Timer")) ))->selected, eMainMenu::sel_timer); CONNECT((new eListBoxEntryMenu(wnd.getList(), _("Setup"), eString().sprintf("(%d) %s", ++entry, _("Setup")) ))->selected, eMainMenu::sel_setup); new eListBoxEntryMenuSeparator(wnd.getList(), eSkin::getActive()->queryImage("listbox.separator"), 0, true ); CONNECT((new eListBoxEntryMenu(wnd.getList(), _("Information"), eString().sprintf("(%d) %s", ++entry, _("Information")) ))->selected, eMainMenu::sel_info); #endif } setHelpID(10); }
void eParentalSetup::init_eParentalSetup() { setText(_("Parental setup")); cmove(ePoint(170, 136)); cresize(eSize(400, 280)); loadSettings(); parentallock=new eCheckbox(this, sparentallock, 1); parentallock->setText(_("Parental lock")); parentallock->move(ePoint(20, 20)); parentallock->resize(eSize(200, 30)); parentallock->setHelpText(_("enable/disable parental lock")); CONNECT(parentallock->checked, eParentalSetup::plockChecked ); changeParentalPin = new eButton(this); changeParentalPin->setText(_("change PIN")); changeParentalPin->move( ePoint( 230, 15 ) ); changeParentalPin->resize( eSize(160, 40) ); changeParentalPin->setHelpText(_("change Parental PIN (ok)")); changeParentalPin->loadDeco(); CONNECT(changeParentalPin->selected_id, eParentalSetup::changePin ); if ( !sparentallock ) changeParentalPin->hide(); setuplock=new eCheckbox(this, ssetuplock, 1); setuplock->setText(_("Setup lock")); setuplock->move(ePoint(20, 70)); setuplock->resize(eSize(200, 30)); setuplock->setHelpText(_("enable/disable setup lock")); CONNECT(setuplock->checked, eParentalSetup::slockChecked ); changeSetupPin = new eButton(this); changeSetupPin->setText(_("change PIN")); changeSetupPin->move( ePoint( 230, 65 ) ); changeSetupPin->resize( eSize(160, 40) ); changeSetupPin->setHelpText(_("change Setup PIN (ok)")); changeSetupPin->loadDeco(); CONNECT(changeSetupPin->selected_id, eParentalSetup::changePin ); if ( !ssetuplock ) changeSetupPin->hide(); hidelocked=new eCheckbox(this, shidelocked, 1); hidelocked->setText(_("Hide locked services")); hidelocked->move(ePoint(20, 120)); hidelocked->resize(eSize(370, 30)); hidelocked->setHelpText(_("don't show locked services in any list")); hidelocked->loadDeco(); CONNECT(hidelocked->checked, eParentalSetup::hidelockChecked ); if ( !sparentallock ) hidelocked->hide(); ok=new eButton(this); ok->setText(_("save")); ok->setShortcut("green"); ok->setShortcutPixmap("green"); ok->move(ePoint(20, 175)); ok->resize(eSize(220, 40)); ok->setHelpText(_("save changes and return")); ok->loadDeco(); CONNECT(ok->selected, eParentalSetup::okPressed); statusbar=new eStatusBar(this); statusbar->move( ePoint(0, clientrect.height()-50 ) ); statusbar->resize( eSize( clientrect.width(), 50) ); statusbar->loadDeco(); setHelpID(93); }
void eZapNetworkSetup::init_eZapNetworkSetup() { __u32 sip=ntohl(0x0a000061), snetmask=ntohl(0xFF000000), sdns=ntohl(0x7f000001), sgateway=ntohl(0x7f000001); int de[4]; int sdosetup=0; int connectionType=0; int webifport=80; int useDHCP=0; #ifdef USE_IFUPDOWN bool automatic_start; std::string Ip, Netmask, Broadcast, Gateway; useDHCP=!getInetAttributes("eth0", automatic_start, Ip, Netmask, Broadcast, Gateway); sdosetup=automatic_start; #else eConfig::getInstance()->getKey("/elitedvb/network/usedhcp", useDHCP); eConfig::getInstance()->getKey("/elitedvb/network/dosetup", sdosetup); #endif if (useDHCP) { getIP("eth0", sip, snetmask); getDefaultGateway(sgateway); getNameserver(sdns); } else { #ifdef USE_IFUPDOWN int tmp[4]; if ( sscanf(Ip.c_str(), "%d.%d.%d.%d", tmp, tmp+1, tmp+2, tmp+3) == 4 ) sip = tmp[0]<<24 | tmp[1] << 16 | tmp[2] << 8 | tmp[3]; else eDebug("couldn't parse ip(%s)", Ip.length()?Ip.c_str():""); if ( sscanf(Netmask.c_str(), "%d.%d.%d.%d", tmp, tmp+1, tmp+2, tmp+3) == 4 ) snetmask = tmp[0]<<24 | tmp[1] << 16 | tmp[2] << 8 | tmp[3]; else eDebug("couldn't parse netmask(%s)", Netmask.length()?Netmask.c_str():""); if ( sscanf(Gateway.c_str(), "%d.%d.%d.%d", tmp, tmp+1, tmp+2, tmp+3) == 4 ) sgateway = tmp[0]<<24 | tmp[1] << 16 | tmp[2] << 8 | tmp[3]; else eDebug("couldn't parse gateway(%s)", Gateway.length()?Gateway.c_str():""); getNameserver(sdns); // read always from /etc/resolv.conf #else eConfig::getInstance()->getKey("/elitedvb/network/ip", sip); eConfig::getInstance()->getKey("/elitedvb/network/netmask", snetmask); eConfig::getInstance()->getKey("/elitedvb/network/gateway", sgateway); eConfig::getInstance()->getKey("/elitedvb/network/dns", sdns); #endif } eConfig::getInstance()->getKey("/elitedvb/network/connectionType", connectionType); eConfig::getInstance()->getKey("/elitedvb/network/webifport", webifport); eNumber::unpack(sip, de); ip=CreateSkinnedNumberWithLabel("ip",0, 4, 0, 255, 3, de, 0, "lip", !useDHCP); ip->setFlags(eNumber::flagDrawPoints); CONNECT(ip->selected, eZapNetworkSetup::fieldSelected); dhcp = CreateSkinnedCheckbox("dhcp", useDHCP); CONNECT(dhcp->checked, eZapNetworkSetup::dhcpStateChanged); eNumber::unpack(snetmask, de); netmask=CreateSkinnedNumberWithLabel("netmask",0, 4, 0, 255, 3, de, 0, "lnetmask", !useDHCP); netmask->setFlags(eNumber::flagDrawPoints); CONNECT(netmask->selected, eZapNetworkSetup::fieldSelected); eListBoxEntryText *sel=0; combo_type=CreateSkinnedComboBoxWithLabel("combo_type", 3, "lcombo_type"); #ifdef ENABLE_PPPOE if ( !connectionType ) #endif { sel = new eListBoxEntryText( *combo_type, _("LAN"), (void*)0, 0, _("communicate to Local Area Network")); #ifdef ENABLE_PPPOE new eListBoxEntryText( *combo_type, _("WAN(PPPoE)"), (void*)1, 0, _("communicate to the Internet via DSL")); #endif } #ifdef ENABLE_PPPOE else { new eListBoxEntryText( *combo_type, _("LAN"), (void*)0, 0, _("communicate to Local Area Network")); sel = new eListBoxEntryText( *combo_type, _("WAN(PPPoE)"), (void*)1, 0, _("communicate to the Internet via DSL")); } CONNECT(combo_type->selchanged, eZapNetworkSetup::typeChanged); tdsl = new eButton(this); tdsl->move(ePoint(340,90)); tdsl->resize(eSize(100, fd+10)); tdsl->setText("T-DSL"); tdsl->loadDeco(); tdsl->hide(); tdsl->setHelpText(_("T-Online User press ok here")); CONNECT( tdsl->selected, eZapNetworkSetup::tdslPressed ); #endif eNumber::unpack(sdns, de); dns=CreateSkinnedNumberWithLabel("dns",0, 4, 0, 255, 3, de, 0, "lNameserver", !useDHCP); dns->setFlags(eNumber::flagDrawPoints); CONNECT(dns->selected, eZapNetworkSetup::fieldSelected); #ifdef ENABLE_PPPOE lLogin=new eLabel(this); lLogin->setText(_("Login:"******"/elitedvb/network/login", strLogin); login=new eTextInputField(this,lLogin); login->move(ePoint(160, 130)); login->resize(eSize(280, fd+10)); login->setMaxChars(100); login->loadDeco(); login->setHelpText(_("press ok to edit your provider login name")); if ( strLogin ) login->setText(strLogin); login->hide(); CONNECT(login->selected, eZapNetworkSetup::loginSelected ); #endif eNumber::unpack(sgateway, de); gateway=CreateSkinnedNumberWithLabel("gateway",0, 4, 0, 255, 3, de, 0, "lgateway", !useDHCP); gateway->setFlags(eNumber::flagDrawPoints); CONNECT(gateway->selected, eZapNetworkSetup::fieldSelected); #ifdef ENABLE_PPPOE lPassword=new eLabel(this); lPassword->setText(_("Password:"******"press ok to edit your provider password")); password->hide(); CONNECT(password->selected, eZapNetworkSetup::passwordSelected); #endif dosetup=CreateSkinnedCheckbox("dosetup", sdosetup); port=CreateSkinnedNumberWithLabel("port",webifport, 1, 0, 65536, 5, 0, 0, "lport"); port->setFlags(eNumber::flagDrawPoints); CONNECT(port->selected, eZapNetworkSetup::fieldSelected); #ifdef ENABLE_PPPOE int flags = getRejectFlags(); rejectWWW=new eCheckbox(this, flags&1, 1); rejectWWW->setText("WWW"); rejectWWW->move(ePoint(20,255)); rejectWWW->resize(eSize(90, fd+4)); rejectWWW->setHelpText(eString().sprintf(_("reject incoming connections on port %d"), webifport)); rejectWWW->hide(); rejectTelnet=new eCheckbox(this, flags&2, 1); rejectTelnet->setText("Telnet"); rejectTelnet->move(ePoint(130,255)); rejectTelnet->resize(eSize(90, fd+4)); rejectTelnet->setHelpText(eString().sprintf(_("reject incoming connections on port %d"), 23)); rejectTelnet->hide(); rejectSamba=new eCheckbox(this, flags&4, 1); rejectSamba->setText("Samba"); rejectSamba->move(ePoint(240,255)); rejectSamba->resize(eSize(100, fd+4)); rejectSamba->setHelpText(_("reject incoming connections on ports 137,138,139")); rejectSamba->hide(); rejectFTP=new eCheckbox(this, flags&8, 1); rejectFTP->setText("FTP"); rejectFTP->move(ePoint(360,255)); rejectFTP->resize(eSize(70, fd+4)); rejectFTP->setHelpText(eString().sprintf(_("reject incoming connections on port %d"), 21)); rejectFTP->hide(); #endif CONNECT(CreateSkinnedButton("ok")->selected, eZapNetworkSetup::okPressed); #ifndef DISABLE_NFS nfs = CreateSkinnedButton("nfs"); CONNECT(nfs->selected, eZapNetworkSetup::nfsPressed ); #else CreateSkinnedButton("nfs")->hide(); #endif BuildSkin("eZapNetworkSetup"); setHelpID(82); combo_type->setCurrent(sel,true); #ifdef ENABLE_PPPOE if ( readSecretString( secrets ) && secrets ) { unsigned int pos = secrets.find("*"); if ( pos != eString::npos ) { login->setText( secrets.left(pos) ); password->setText("******"); } } #endif }
void ENgrabSetup::init_ENgrabSetup() { setText(_("Ngrab Server")); cmove(ePoint(170, 146)); cresize(eSize(390, 310)); struct in_addr sinet_address; int nsrvport; int de[4]; int fd=eSkin::getActive()->queryValue("fontsize", 20); if ( eConfig::getInstance()->getKey("/elitedvb/network/nserver", sinet_address.s_addr) ) sinet_address.s_addr = 0xC0A80028; // 192.168.0.40 if ( eConfig::getInstance()->getKey("/elitedvb/network/nservport", nsrvport ) ) nsrvport = 4000; eLabel *l=new eLabel(this); l->setText("Srv IP:"); l->move(ePoint(20, 20)); l->resize(eSize(140, fd+4)); eNumber::unpack(sinet_address.s_addr, de); inet_address=new eNumber(this, 4, 0, 255, 3, de, 0, l); inet_address->move(ePoint(160, 20)); inet_address->resize(eSize(200, fd+10)); inet_address->setFlags(eNumber::flagDrawPoints); inet_address->setHelpText(_("enter IP Adress of the Ngrab Server (0..9, left, right)")); inet_address->loadDeco(); l=new eLabel(this); l->setText("Srv Port:"); l->move(ePoint(20, 60)); l->resize(eSize(140, fd+4)); srvport=new eNumber(this, 1, 0, 9999, 4, &nsrvport, 0, l); srvport->move(ePoint(160, 60)); srvport->resize(eSize(200, fd+10)); srvport->setFlags(eNumber::flagDrawPoints); srvport->setHelpText(_("enter ngrab server port (standard is 4000)")); srvport->loadDeco(); l=new eLabel(this); l->setText("Srv MAC:"); l->move(ePoint(20,100)); l->resize(eSize(140, fd+4)); serverMAC=new eTextInputField(this); serverMAC->move(ePoint(160,100)); serverMAC->resize(eSize(200, fd+10)); serverMAC->setHelpText(_("enter MAC address of server (for wake on lan)")); serverMAC->setUseableChars("01234567890abcdefABCDEF:"); serverMAC->setMaxChars(17); serverMAC->loadDeco(); char* sMAC=0; if ( eConfig::getInstance()->getKey("/elitedvb/network/hwaddress", sMAC ) ) serverMAC->setText("00:00:00:00:00:00"); else { serverMAC->setText(sMAC); free(sMAC); } bServerMAC=new eButton(this); bServerMAC->move(ePoint(20,150)); bServerMAC->resize(eSize(340,40)); bServerMAC->setShortcut("blue"); bServerMAC->setShortcutPixmap("blue"); bServerMAC->setText(_("detect MAC Adress")); bServerMAC->setHelpText(_("try to autodetect server MAC address")); bServerMAC->loadDeco(); CONNECT( bServerMAC->selected, ENgrabSetup::detectMAC ); ok=new eButton(this); ok->setText(_("save")); ok->setShortcut("green"); ok->setShortcutPixmap("green"); ok->move(ePoint(20, 210)); ok->resize(eSize(220, 40)); ok->setHelpText(_("save changes and return")); ok->loadDeco(); CONNECT(ok->selected, ENgrabSetup::okPressed); statusbar=new eStatusBar(this); statusbar->move( ePoint(0, clientrect.height()-50 ) ); statusbar->resize( eSize( clientrect.width(), 50) ); statusbar->loadDeco(); setHelpID(91); }