mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
gui/scan_setup.cpp: show sat diseqc and rotor position in sat config menu
Origin commit data
------------------
Commit: baf2df01dd
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-07-17 (Wed, 17 Jul 2013)
This commit is contained in:
@@ -887,20 +887,16 @@ int CScanSetup::showScanMenuLnbSetup()
|
|||||||
std::string satname = CServiceManager::getInstance()->GetSatelliteName(sit->first);
|
std::string satname = CServiceManager::getInstance()->GetSatelliteName(sit->first);
|
||||||
|
|
||||||
//sub menu for sat settings to selectable sat item
|
//sub menu for sat settings to selectable sat item
|
||||||
CMenuWidget *tempsat = new CMenuWidget(satname.c_str(), NEUTRINO_ICON_SETTINGS, width);
|
CMenuWidget *tempsat = new CMenuWidget(satname.c_str(), NEUTRINO_ICON_SETTINGS, width);
|
||||||
addScanMenuTempSat(tempsat, sit->second);
|
addScanMenuTempSat(tempsat, sit->second);
|
||||||
#if 0 // option not refreshed.
|
|
||||||
if(sit->second.motor_position > 0) {
|
char opt[100];
|
||||||
char mpos[10];
|
sprintf(opt, "diseqc %2d / rotor %2d", sit->second.diseqc+1, sit->second.motor_position);
|
||||||
sprintf(mpos, "%d", sit->second.motor_position);
|
satoptions.push_back(opt);
|
||||||
sat_setup->addItem(new CMenuForwarderNonLocalized(satname.c_str(), true, mpos, tempsat));
|
CMenuForwarder * mf = new CMenuForwarderNonLocalized(satname.c_str(), true, satoptions[count].c_str(), tempsat);
|
||||||
} else
|
mf->setHint("", LOCALE_MENU_HINT_SCAN_LNBCONFIG);
|
||||||
#endif
|
sat_setup->addItem(mf);
|
||||||
{
|
satmf.push_back(mf);
|
||||||
CMenuForwarder * mf = new CMenuForwarderNonLocalized(satname.c_str(), true, NULL, tempsat);
|
|
||||||
mf->setHint("", LOCALE_MENU_HINT_SCAN_LNBCONFIG);
|
|
||||||
sat_setup->addItem(mf);
|
|
||||||
}
|
|
||||||
tmp[count] = tempsat;
|
tmp[count] = tempsat;
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
@@ -910,6 +906,8 @@ int CScanSetup::showScanMenuLnbSetup()
|
|||||||
delete tmp[i];
|
delete tmp[i];
|
||||||
}
|
}
|
||||||
delete sat_setup;
|
delete sat_setup;
|
||||||
|
satmf.clear();
|
||||||
|
satoptions.clear();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1061,13 +1059,13 @@ void CScanSetup::addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t & satcon
|
|||||||
bool unicable = (dmode == DISEQC_UNICABLE);
|
bool unicable = (dmode == DISEQC_UNICABLE);
|
||||||
|
|
||||||
if (!unicable) {
|
if (!unicable) {
|
||||||
diseqc = new CMenuOptionNumberChooser(LOCALE_SATSETUP_DISEQC_INPUT, &satconfig.diseqc, ((dmode != NO_DISEQC) && (dmode != DISEQC_ADVANCED)), -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF);
|
diseqc = new CMenuOptionNumberChooser(LOCALE_SATSETUP_DISEQC_INPUT, &satconfig.diseqc, ((dmode != NO_DISEQC) && (dmode != DISEQC_ADVANCED)), -1, 15, this, 1, -1, LOCALE_OPTIONS_OFF);
|
||||||
diseqc->setHint("", LOCALE_MENU_HINT_SCAN_DISEQC);
|
diseqc->setHint("", LOCALE_MENU_HINT_SCAN_DISEQC);
|
||||||
comm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_COMM_INPUT, &satconfig.commited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF);
|
comm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_COMM_INPUT, &satconfig.commited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF);
|
||||||
comm->setHint("", LOCALE_MENU_HINT_SCAN_COMMITED);
|
comm->setHint("", LOCALE_MENU_HINT_SCAN_COMMITED);
|
||||||
uncomm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_UNCOMM_INPUT, &satconfig.uncommited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF);
|
uncomm = new CMenuOptionNumberChooser(LOCALE_SATSETUP_UNCOMM_INPUT, &satconfig.uncommited, dmode == DISEQC_ADVANCED, -1, 15, NULL, 1, -1, LOCALE_OPTIONS_OFF);
|
||||||
uncomm->setHint("", LOCALE_MENU_HINT_SCAN_UNCOMMITED);
|
uncomm->setHint("", LOCALE_MENU_HINT_SCAN_UNCOMMITED);
|
||||||
motor = new CMenuOptionNumberChooser(LOCALE_SATSETUP_MOTOR_POS, &satconfig.motor_position, true /*dmode == DISEQC_ADVANCED*/, 0, 64, NULL, 0, 0, LOCALE_OPTIONS_OFF);
|
motor = new CMenuOptionNumberChooser(LOCALE_SATSETUP_MOTOR_POS, &satconfig.motor_position, true /*dmode == DISEQC_ADVANCED*/, 0, 64, this, 0, 0, LOCALE_OPTIONS_OFF);
|
||||||
motor->setHint("", LOCALE_MENU_HINT_SCAN_MOTORPOS);
|
motor->setHint("", LOCALE_MENU_HINT_SCAN_MOTORPOS);
|
||||||
usals = new CMenuOptionChooser(LOCALE_EXTRA_USE_GOTOXX, &satconfig.use_usals, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true /*dmode == DISEQC_ADVANCED*/);
|
usals = new CMenuOptionChooser(LOCALE_EXTRA_USE_GOTOXX, &satconfig.use_usals, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true /*dmode == DISEQC_ADVANCED*/);
|
||||||
usals->setHint("", LOCALE_MENU_HINT_SCAN_USEUSALS);
|
usals->setHint("", LOCALE_MENU_HINT_SCAN_USEUSALS);
|
||||||
@@ -1515,6 +1513,21 @@ bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SATSETUP_MOTOR_POS) ||
|
||||||
|
ARE_LOCALES_EQUAL(OptionName, LOCALE_SATSETUP_DISEQC_INPUT)) {
|
||||||
|
CFrontend * fe = CFEManager::getInstance()->getFE(fenumber);
|
||||||
|
satellite_map_t & satmap = fe->getSatellites();
|
||||||
|
int count = 0;
|
||||||
|
for (sat_iterator_t sit = satmap.begin(); sit != satmap.end(); ++sit) {
|
||||||
|
if(!sit->second.configured)
|
||||||
|
continue;
|
||||||
|
char opt[100];
|
||||||
|
sprintf(opt, "diseqc %d / rotor %d", sit->second.diseqc+1, sit->second.motor_position);
|
||||||
|
satoptions[count] = opt;
|
||||||
|
satmf[count]->setOption(satoptions[count]);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SATSETUP_LOGICAL_NUMBERS)) {
|
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SATSETUP_LOGICAL_NUMBERS)) {
|
||||||
printf("[neutrino] CScanSetup::%s: logical numbers %d\n", __FUNCTION__, scansettings.scan_logical_numbers);
|
printf("[neutrino] CScanSetup::%s: logical numbers %d\n", __FUNCTION__, scansettings.scan_logical_numbers);
|
||||||
lcnhd->setActive(scansettings.scan_logical_numbers);
|
lcnhd->setActive(scansettings.scan_logical_numbers);
|
||||||
|
@@ -79,6 +79,9 @@ class CScanSetup : public CMenuTarget, public CChangeObserver
|
|||||||
/* frontend link to number */
|
/* frontend link to number */
|
||||||
int femaster;
|
int femaster;
|
||||||
|
|
||||||
|
std::vector<std::string> satoptions;
|
||||||
|
std::vector<CMenuForwarder*> satmf;
|
||||||
|
|
||||||
/* flag to allow any operations which can damage recordings */
|
/* flag to allow any operations which can damage recordings */
|
||||||
bool allow_start;
|
bool allow_start;
|
||||||
/* flag to re-init frontends */
|
/* flag to re-init frontends */
|
||||||
|
Reference in New Issue
Block a user