mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
gui/scan_setup.cpp: for single-tuner, disable mode switch, dont show link option
Origin commit data
------------------
Commit: ca8185bff9
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-01-18 (Fri, 18 Jan 2013)
This commit is contained in:
@@ -385,7 +385,7 @@ int CScanSetup::showScanMenu()
|
|||||||
|
|
||||||
//sat/provider selector
|
//sat/provider selector
|
||||||
|
|
||||||
if(CFEManager::getInstance()->getFrontendCount() > 1) {
|
if(CFEManager::getInstance()->haveSat() || CFEManager::getInstance()->getFrontendCount() > 1) {
|
||||||
CMenuWidget * setupMenu = new CMenuWidget(LOCALE_SATSETUP_FE_SETUP, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_SCAN_FE_SETUP);
|
CMenuWidget * setupMenu = new CMenuWidget(LOCALE_SATSETUP_FE_SETUP, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_SCAN_FE_SETUP);
|
||||||
addScanMenuFrontendSetup(setupMenu);
|
addScanMenuFrontendSetup(setupMenu);
|
||||||
mf = new CMenuDForwarder(LOCALE_SATSETUP_FE_SETUP, allow_start, NULL, setupMenu, "", CRCInput::convertDigitToKey(shortcut++));
|
mf = new CMenuDForwarder(LOCALE_SATSETUP_FE_SETUP, allow_start, NULL, setupMenu, "", CRCInput::convertDigitToKey(shortcut++));
|
||||||
@@ -681,7 +681,7 @@ int CScanSetup::showFrontendSetup(int number)
|
|||||||
bool enable = true;
|
bool enable = true;
|
||||||
/* disable mode option, if fe is master and there are links - prevent master mode change
|
/* disable mode option, if fe is master and there are links - prevent master mode change
|
||||||
and hence linked in undefined state */
|
and hence linked in undefined state */
|
||||||
if (fe->hasLinks())
|
if (fe->hasLinks() || fecount == 1)
|
||||||
enable = false;
|
enable = false;
|
||||||
|
|
||||||
if (CFrontend::linked(femode))
|
if (CFrontend::linked(femode))
|
||||||
@@ -696,9 +696,11 @@ int CScanSetup::showFrontendSetup(int number)
|
|||||||
/* disable all but mode option for linked frontends */
|
/* disable all but mode option for linked frontends */
|
||||||
bool allow_moptions = !CFrontend::linked(femode);
|
bool allow_moptions = !CFrontend::linked(femode);
|
||||||
|
|
||||||
|
if (fecount > 1) {
|
||||||
/* link to master select */
|
/* link to master select */
|
||||||
linkfe = new CMenuOptionChooser(LOCALE_SATSETUP_FE_MODE_MASTER, &femaster, feselect, select_count, !allow_moptions, this, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN, true);
|
linkfe = new CMenuOptionChooser(LOCALE_SATSETUP_FE_MODE_MASTER, &femaster, feselect, select_count, !allow_moptions, this, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN, true);
|
||||||
setupMenu->addItem(linkfe);
|
setupMenu->addItem(linkfe);
|
||||||
|
}
|
||||||
/* diseqc type select */
|
/* diseqc type select */
|
||||||
dtype = new CMenuOptionChooser(LOCALE_SATSETUP_DISEQC, (int *)&dmode, SATSETUP_DISEQC_OPTIONS, SATSETUP_DISEQC_OPTION_COUNT,
|
dtype = new CMenuOptionChooser(LOCALE_SATSETUP_DISEQC, (int *)&dmode, SATSETUP_DISEQC_OPTIONS, SATSETUP_DISEQC_OPTION_COUNT,
|
||||||
femode != CFrontend::FE_MODE_UNUSED && femode != CFrontend::FE_MODE_LINK_LOOP,
|
femode != CFrontend::FE_MODE_UNUSED && femode != CFrontend::FE_MODE_LINK_LOOP,
|
||||||
@@ -759,6 +761,7 @@ int CScanSetup::showFrontendSetup(int number)
|
|||||||
fillSatSelect(satSelect);
|
fillSatSelect(satSelect);
|
||||||
|
|
||||||
delete setupMenu;
|
delete setupMenu;
|
||||||
|
linkfe = NULL;
|
||||||
/* re-link in case mode changed, without fe init */
|
/* re-link in case mode changed, without fe init */
|
||||||
CFEManager::getInstance()->linkFrontends(false);
|
CFEManager::getInstance()->linkFrontends(false);
|
||||||
/* copy settings from master, if it set and fe linked */
|
/* copy settings from master, if it set and fe linked */
|
||||||
@@ -1399,6 +1402,7 @@ bool CScanSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*
|
|||||||
CFrontend * fe = CFEManager::getInstance()->getFE(fenumber);
|
CFrontend * fe = CFEManager::getInstance()->getFE(fenumber);
|
||||||
fe->setMode(femode);
|
fe->setMode(femode);
|
||||||
if (fe && fe->getType() == FE_QPSK) {
|
if (fe && fe->getType() == FE_QPSK) {
|
||||||
|
if (linkfe)
|
||||||
linkfe->setActive(CFrontend::linked(femode));
|
linkfe->setActive(CFrontend::linked(femode));
|
||||||
dtype->setActive(femode != CFrontend::FE_MODE_UNUSED && femode != CFrontend::FE_MODE_LINK_LOOP);
|
dtype->setActive(femode != CFrontend::FE_MODE_UNUSED && femode != CFrontend::FE_MODE_LINK_LOOP);
|
||||||
uniSetup->setActive(dmode == DISEQC_UNICABLE && femode != CFrontend::FE_MODE_UNUSED && femode != CFrontend::FE_MODE_LINK_LOOP);
|
uniSetup->setActive(dmode == DISEQC_UNICABLE && femode != CFrontend::FE_MODE_UNUSED && femode != CFrontend::FE_MODE_LINK_LOOP);
|
||||||
|
Reference in New Issue
Block a user