mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
Merge remote-tracking branch 'check/next-cc'
needs buildfixing...
Conflicts:
src/eitd/sectionsd.cpp
src/gui/audioplayer.cpp
src/gui/bedit/bouqueteditor_channels.cpp
src/gui/infoclock.cpp
src/gui/infoviewer.cpp
src/gui/motorcontrol.cpp
src/gui/osd_setup.cpp
src/gui/scan.cpp
src/gui/scan_setup.cpp
src/gui/streaminfo2.cpp
src/gui/update.cpp
src/gui/widget/progresswindow.cpp
src/gui/widget/textbox.cpp
src/neutrino.cpp
src/zapit/include/zapit/femanager.h
Origin commit data
------------------
Branch: ni/coolstream
Commit: 32de6beef0
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-09-01 (Sun, 01 Sep 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -67,7 +67,7 @@ extern char zapit_long[20];
|
||||
/* ugly */
|
||||
extern CHintBox *reloadhintBox;
|
||||
|
||||
static int all_usals = 1;
|
||||
//static int all_usals = 1;
|
||||
//sat_iterator_t sit;
|
||||
|
||||
#define SCANTS_BOUQUET_OPTION_COUNT 3
|
||||
@@ -802,6 +802,7 @@ int CScanSetup::showFrontendSetup(int number)
|
||||
mc->setHint("", LOCALE_MENU_HINT_SCAN_FEMODE);
|
||||
setupMenu->addItem(mc);
|
||||
|
||||
msettings.Clear();
|
||||
if (fe->getInfo()->type == FE_QPSK) {
|
||||
/* disable all but mode option for linked frontends */
|
||||
bool allow_moptions = !CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED;
|
||||
@@ -854,25 +855,30 @@ int CScanSetup::showFrontendSetup(int number)
|
||||
setupMenu->addItem(uniSetup);
|
||||
|
||||
setupMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SATSETUP_EXTENDED_MOTOR));
|
||||
CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_MOTOR_SPEED, (int *)&fe_config.motorRotationSpeed, true, 0, 64, NULL);
|
||||
CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_MOTOR_SPEED, (int *)&fe_config.motorRotationSpeed, allow_moptions, 0, 64, NULL);
|
||||
nc->setHint("", LOCALE_MENU_HINT_SCAN_MOTOR_SPEED);
|
||||
setupMenu->addItem(nc);
|
||||
msettings.Add(nc);
|
||||
|
||||
mc = new CMenuOptionChooser(LOCALE_EXTRA_ZAPIT_HVOLTAGE, (int *)&fe_config.highVoltage, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
|
||||
mc = new CMenuOptionChooser(LOCALE_EXTRA_ZAPIT_HVOLTAGE, (int *)&fe_config.highVoltage, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, allow_moptions);
|
||||
mc->setHint("", LOCALE_MENU_HINT_SCAN_MOTOR_18V);
|
||||
setupMenu->addItem(mc);
|
||||
msettings.Add(mc);
|
||||
|
||||
mc = new CMenuOptionChooser(LOCALE_SATSETUP_USE_USALS, &all_usals, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this);
|
||||
mc = new CMenuOptionChooser(LOCALE_SATSETUP_USE_USALS, &fe_config.use_usals, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, allow_moptions, this);
|
||||
mc->setHint("", LOCALE_MENU_HINT_SCAN_USALSALL);
|
||||
setupMenu->addItem(mc);
|
||||
msettings.Add(mc);
|
||||
|
||||
CMenuForwarder * mf = new CMenuForwarder(LOCALE_MOTORCONTROL_HEAD, true, NULL, this, "satfind", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE);
|
||||
CMenuForwarder * mf = new CMenuForwarder(LOCALE_MOTORCONTROL_HEAD, allow_moptions, NULL, this, "satfind", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE);
|
||||
mf->setHint("", LOCALE_MENU_HINT_SCAN_SATFIND);
|
||||
setupMenu->addItem(mf);
|
||||
msettings.Add(mf);
|
||||
}
|
||||
|
||||
int res = setupMenu->exec(NULL, "");
|
||||
feselected = setupMenu->getSelected();
|
||||
msettings.Clear();
|
||||
|
||||
/* add configured satellites to satSelect in case they changed */
|
||||
if (fe->isSat())
|
||||
@@ -944,20 +950,16 @@ int CScanSetup::showScanMenuLnbSetup()
|
||||
std::string satname = CServiceManager::getInstance()->GetSatelliteName(sit->first);
|
||||
|
||||
//sub menu for sat settings to selectable sat item
|
||||
CMenuWidget *tempsat = new CMenuWidget(satname.c_str(), NEUTRINO_ICON_SETTINGS, width);
|
||||
addScanMenuTempSat(tempsat, sit->second);
|
||||
#if 0 // option not refreshed.
|
||||
if(sit->second.motor_position > 0) {
|
||||
char mpos[10];
|
||||
sprintf(mpos, "%d", sit->second.motor_position);
|
||||
sat_setup->addItem(new CMenuForwarderNonLocalized(satname.c_str(), true, mpos, tempsat));
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
CMenuForwarder * mf = new CMenuForwarderNonLocalized(satname.c_str(), true, NULL, tempsat);
|
||||
mf->setHint("", LOCALE_MENU_HINT_SCAN_LNBCONFIG);
|
||||
sat_setup->addItem(mf);
|
||||
}
|
||||
CMenuWidget *tempsat = new CMenuWidget(satname.c_str(), NEUTRINO_ICON_SETTINGS, width);
|
||||
addScanMenuTempSat(tempsat, sit->second);
|
||||
|
||||
char opt[100];
|
||||
sprintf(opt, "diseqc %2d / rotor %2d", sit->second.diseqc+1, sit->second.motor_position);
|
||||
satoptions.push_back(opt);
|
||||
CMenuForwarder * mf = new CMenuForwarderNonLocalized(satname.c_str(), true, satoptions[count].c_str(), tempsat);
|
||||
mf->setHint("", LOCALE_MENU_HINT_SCAN_LNBCONFIG);
|
||||
sat_setup->addItem(mf);
|
||||
satmf.push_back(mf);
|
||||
tmp[count] = tempsat;
|
||||
count++;
|
||||
}
|
||||
@@ -967,6 +969,8 @@ int CScanSetup::showScanMenuLnbSetup()
|
||||
delete tmp[i];
|
||||
}
|
||||
delete sat_setup;
|
||||
satmf.clear();
|
||||
satoptions.clear();
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -1062,13 +1066,14 @@ int CScanSetup::showScanMenuSatFind()
|
||||
int count = 0;
|
||||
CFrontend * fe = CFEManager::getInstance()->getFE(fenumber);
|
||||
char name[255];
|
||||
static int selected = 0;
|
||||
|
||||
r_system = DVB_S;
|
||||
|
||||
snprintf(name, sizeof(name), "%s %d: %s", g_Locale->getText(LOCALE_MOTORCONTROL_HEAD), fenumber+1, fe->getInfo()->name);
|
||||
|
||||
CMenuWidget* sat_findMenu = new CMenuWidget(name /*LOCALE_MOTORCONTROL_HEAD*/, NEUTRINO_ICON_SETTINGS, width);
|
||||
|
||||
sat_findMenu->setSelected(selected);
|
||||
sat_findMenu->addIntroItems();
|
||||
|
||||
CMenuOptionStringChooser * feSatSelect = new CMenuOptionStringChooser(LOCALE_SATSETUP_SATELLITE, scansettings.satName, true, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
||||
@@ -1108,6 +1113,7 @@ int CScanSetup::showScanMenuSatFind()
|
||||
sat_findMenu->addItem(mf);
|
||||
|
||||
int res = sat_findMenu->exec(NULL, "");
|
||||
selected = sat_findMenu->getSelected();
|
||||
delete sat_findMenu;
|
||||
return res;
|
||||
}
|
||||
@@ -1127,13 +1133,13 @@ void CScanSetup::addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t & satcon
|
||||
CMenuForwarder *mf;
|
||||
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
@@ -1142,9 +1148,10 @@ void CScanSetup::addScanMenuTempSat(CMenuWidget *temp_sat, sat_config_t & satcon
|
||||
satconfig.diseqc = 0;
|
||||
unilnb = new CMenuOptionNumberChooser(LOCALE_UNICABLE_LNB, &satconfig.diseqc, true, 0, 1);
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(!satconfig.use_usals)
|
||||
all_usals = 0;
|
||||
#endif
|
||||
|
||||
CIntInput* lofL = new CIntInput(LOCALE_SATSETUP_LOFL, (int&) satconfig.lnbOffsetLow, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
||||
CIntInput* lofH = new CIntInput(LOCALE_SATSETUP_LOFH, (int&) satconfig.lnbOffsetHigh, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
||||
@@ -1329,7 +1336,7 @@ void CScanSetup::addScanMenuCable(CMenuWidget *menu)
|
||||
|
||||
menu->addItem(GenericMenuSeparatorLine);
|
||||
|
||||
CStringInput *freq = new CStringInput(LOCALE_EXTRA_TP_FREQ, (char *) scansettings.cable_TP_freq, freq_length, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
|
||||
CStringInput *freq = new CStringInput(LOCALE_EXTRA_TP_FREQ, (char *) scansettings.cable_TP_freq, 6, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
|
||||
CMenuForwarder *Freq = new CMenuDForwarder(LOCALE_EXTRA_TP_FREQ, true, scansettings.cable_TP_freq, freq, "", CRCInput::convertDigitToKey(shortCut++));
|
||||
Freq->setHint("", LOCALE_MENU_HINT_SCAN_FREQ);
|
||||
|
||||
@@ -1376,7 +1383,7 @@ int CScanSetup::addScanOptionsItems(CMenuWidget *options_menu, const int &shortc
|
||||
CMenuForwarder *Freq = NULL;
|
||||
CMenuForwarder *Rate = NULL;
|
||||
if (r_system == DVB_S) {
|
||||
CStringInput *freq = new CStringInput(LOCALE_EXTRA_TP_FREQ, (char *) scansettings.sat_TP_freq, freq_length, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
|
||||
CStringInput *freq = new CStringInput(LOCALE_EXTRA_TP_FREQ, (char *) scansettings.sat_TP_freq, 8, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
|
||||
Freq = new CMenuDForwarder(LOCALE_EXTRA_TP_FREQ, true, scansettings.sat_TP_freq, freq, "", CRCInput::convertDigitToKey(shortCut++));
|
||||
Freq->setHint("", LOCALE_MENU_HINT_SCAN_FREQ);
|
||||
|
||||
@@ -1388,7 +1395,7 @@ int CScanSetup::addScanOptionsItems(CMenuWidget *options_menu, const int &shortc
|
||||
mod_pol = new CMenuOptionChooser(LOCALE_EXTRA_TP_POL, (int *)&scansettings.sat_TP_pol, SATSETUP_SCANTP_POL, SATSETUP_SCANTP_POL_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
||||
mod_pol->setHint("", LOCALE_MENU_HINT_SCAN_POL);
|
||||
} else if (r_system == DVB_C) {
|
||||
CStringInput *freq = new CStringInput(LOCALE_EXTRA_TP_FREQ, (char *) scansettings.cable_TP_freq, freq_length, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
|
||||
CStringInput *freq = new CStringInput(LOCALE_EXTRA_TP_FREQ, (char *) scansettings.cable_TP_freq, 6, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
|
||||
Freq = new CMenuDForwarder(LOCALE_EXTRA_TP_FREQ, true, scansettings.cable_TP_freq, freq, "", CRCInput::convertDigitToKey(shortCut++));
|
||||
Freq->setHint("", LOCALE_MENU_HINT_SCAN_FREQ);
|
||||
|
||||
@@ -1465,8 +1472,10 @@ void CScanSetup::saveScanSetup()
|
||||
dprintf(DEBUG_NORMAL, "error while saving scan-settings!\n");
|
||||
|
||||
//CServiceManager::getInstance()->SaveMotorPositions();
|
||||
zapitCfg.gotoXXLatitude = strtod(zapit_lat, NULL);
|
||||
zapitCfg.gotoXXLongitude = strtod(zapit_long, NULL);
|
||||
if(zapit_lat[0] != '#')//check if var ok
|
||||
zapitCfg.gotoXXLatitude = strtod(zapit_lat, NULL);
|
||||
if(zapit_long[0] != '#')//check if var ok
|
||||
zapitCfg.gotoXXLongitude = strtod(zapit_long, NULL);
|
||||
|
||||
CZapit::getInstance()->SetConfig(&zapitCfg);
|
||||
CFEManager::getInstance()->saveSettings(true);
|
||||
@@ -1478,12 +1487,14 @@ bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*
|
||||
bool ret = false;
|
||||
|
||||
if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SATSETUP_USE_USALS)) {
|
||||
#if 0
|
||||
CFrontend * fe = CFEManager::getInstance()->getFE(fenumber);
|
||||
printf("[neutrino] CScanSetup::%s: all usals %d \n", __FUNCTION__, all_usals);
|
||||
satellite_map_t & satmap = fe->getSatellites();
|
||||
for (sat_iterator_t sit = satmap.begin(); sit != satmap.end(); sit++) {
|
||||
sit->second.use_usals = all_usals;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if(ARE_LOCALES_EQUAL(OptionName, LOCALE_SATSETUP_DISEQC)) {
|
||||
printf("[neutrino] CScanSetup::%s: diseqc %d fenumber %d\n", __FUNCTION__, dmode, fenumber);
|
||||
@@ -1549,6 +1560,8 @@ bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*
|
||||
bool enable = (dmode < DISEQC_ADVANCED) && (dmode != NO_DISEQC);
|
||||
ojDiseqcRepeats->setActive(!CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED && enable);
|
||||
|
||||
msettings.Activate(!CFrontend::linked(femode) && femode != CFrontend::FE_MODE_UNUSED);
|
||||
|
||||
/* if mode changed, set current master too */
|
||||
if (femaster >= 0)
|
||||
fe->setMaster(femaster);
|
||||
@@ -1576,6 +1589,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)) {
|
||||
printf("[neutrino] CScanSetup::%s: logical numbers %d\n", __FUNCTION__, scansettings.scan_logical_numbers);
|
||||
lcnhd->setActive(scansettings.scan_logical_numbers);
|
||||
|
Reference in New Issue
Block a user