*neutrino scansetup: use correct actionkey

previous solution was bad, sry.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1333 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
thilo
2011-03-24 09:26:46 +00:00
parent 7cd862d52a
commit 91071d38f8

View File

@@ -239,18 +239,20 @@ int CScanSetup::exec(CMenuTarget* parent, const std::string &actionKey)
} }
//starting scan //starting scan
std::string s_to_comp = "scan_"; std::string scants_key[] = {"all", "manual", "test", "fast", "auto"/*doesn't exists in CScanTs!*/};
int l = s_to_comp.length();
std::string scan_cmd = actionKey.substr(0, l); //returns content of "s_to_comp" if present, note: don't add new actionKeys which contains content of "s_to_comp"! for (uint i=0; i< (sizeof(scants_key)/sizeof(scants_key[0])); i++)
if(!scan_cmd.empty())
{ {
printf("[neutrino] CScanSetup::%s %s...\n", __FUNCTION__, actionKey.c_str()); if (actionKey == scants_key[i])
//ensure that be saved all settings before scan... {
saveScanSetup(); printf("[neutrino] CScanSetup::%s %s...\n", __FUNCTION__, scants_key[i].c_str());
//...then start scan //ensure that be saved all settings before scan...
CScanTs scanTs; saveScanSetup();
scanTs.exec(NULL, actionKey); //...then start scan
return res; CScanTs scanTs;
scanTs.exec(NULL, scants_key[i]);
return res;
}
} }
@@ -625,8 +627,8 @@ void CScanSetup::addScanMenuManualScan(CMenuWidget *manual_Scan)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
manual_Scan->addItem(GenericMenuSeparatorLine); manual_Scan->addItem(GenericMenuSeparatorLine);
manual_Scan->addItem(new CMenuForwarder(LOCALE_SCANTS_TEST, true, NULL, this, "scan_test", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); manual_Scan->addItem(new CMenuForwarder(LOCALE_SCANTS_TEST, true, NULL, this, "test", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
manual_Scan->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, this, "scan_manual", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE)); manual_Scan->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, this, "manual", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
} }
//init auto scan all menu //init auto scan all menu
@@ -655,7 +657,7 @@ void CScanSetup::addScanMenuAutoScanAll(CMenuWidget *auto_ScanAll)
addListFlagsItems(auto_ScanAll, 1); addListFlagsItems(auto_ScanAll, 1);
//---------------------------------------------------------------------- //----------------------------------------------------------------------
auto_ScanAll->addItem(GenericMenuSeparatorLine); auto_ScanAll->addItem(GenericMenuSeparatorLine);
auto_ScanAll->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, this, "scan_all", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); auto_ScanAll->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, this, "all", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
} }
#ifdef ENABLE_FASTSCAN #ifdef ENABLE_FASTSCAN
@@ -673,7 +675,7 @@ void CScanSetup::addScanMenuFastScan(CMenuWidget *fast_ScanMenu)
fast_ScanMenu->addItem(fastType); fast_ScanMenu->addItem(fastType);
//---------------------------------------------------------------------- //----------------------------------------------------------------------
fast_ScanMenu->addItem(GenericMenuSeparatorLine); fast_ScanMenu->addItem(GenericMenuSeparatorLine);
fast_ScanMenu->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, this, "scan_fast", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); fast_ScanMenu->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, this, "fast", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
} }
#endif /*ENABLE_FASTSCAN*/ #endif /*ENABLE_FASTSCAN*/
@@ -689,7 +691,7 @@ void CScanSetup::addScanMenuAutoScan(CMenuWidget *auto_Scan)
addListFlagsItems(auto_Scan, 1); addListFlagsItems(auto_Scan, 1);
//---------------------------------------------------------------------- //----------------------------------------------------------------------
auto_Scan->addItem(GenericMenuSeparatorLine); auto_Scan->addItem(GenericMenuSeparatorLine);
auto_Scan->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, this, "scan_autoscan", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN)); auto_Scan->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, this, "auto", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
} }