mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-11 23:50:58 +02:00
testmenu: use restarttuner from neutrino.cpp
Origin commit data
------------------
Commit: 61b767f204
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-10-11 (Mon, 11 Oct 2021)
This commit is contained in:
@@ -1040,29 +1040,6 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
ShowHintS(hint);
|
ShowHintS(hint);
|
||||||
return menu_return::RETURN_REPAINT;
|
return menu_return::RETURN_REPAINT;
|
||||||
}
|
}
|
||||||
else if (actionKey=="restarttuner")
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
// use with CHint instance
|
|
||||||
CHint *hint = new CHint("Restart Tuner");
|
|
||||||
hint->paint();
|
|
||||||
g_Zapit->setStandby(true);
|
|
||||||
sleep(2);
|
|
||||||
g_Zapit->setStandby(false);
|
|
||||||
sleep(2);
|
|
||||||
g_Zapit->Rezap();
|
|
||||||
delete hint;
|
|
||||||
#endif
|
|
||||||
// Use of ShowHintS with slot does the same like previous block,
|
|
||||||
// but with multiple messages and despite that with lesser effort.
|
|
||||||
std::vector <hint_message_data_t> hints;
|
|
||||||
hints.push_back({sigc::bind(sigc::mem_fun(g_Zapit, &CZapitClient::setStandby), true),"Stopping tuner...", NONEXISTANT_LOCALE, 2, true});
|
|
||||||
hints.push_back({sigc::bind(sigc::mem_fun(g_Zapit, &CZapitClient::setStandby), false), "Start tuner...", NONEXISTANT_LOCALE, 2, true});
|
|
||||||
hints.push_back({sigc::hide_return(sigc::mem_fun(g_Zapit, &CZapitClient::Rezap)), "Rezap...", NONEXISTANT_LOCALE, 2, true});
|
|
||||||
ShowHintS(hints);
|
|
||||||
|
|
||||||
return menu_return::RETURN_REPAINT;
|
|
||||||
}
|
|
||||||
else if (actionKey == "msgbox_alt_btn"){
|
else if (actionKey == "msgbox_alt_btn"){
|
||||||
CMsgBox msgBox("Variable buttontext...", "Msgbox Test");
|
CMsgBox msgBox("Variable buttontext...", "Msgbox Test");
|
||||||
msgBox.setShowedButtons(CMsgBox::mbNo | CMsgBox::mbYes);
|
msgBox.setShowedButtons(CMsgBox::mbNo | CMsgBox::mbYes);
|
||||||
@@ -1328,7 +1305,7 @@ void CTestMenu::showHWTests(CMenuWidget *widget)
|
|||||||
#endif
|
#endif
|
||||||
widget->addItem(new CMenuForwarder("HDD", true, NULL, this, "hdd"));
|
widget->addItem(new CMenuForwarder("HDD", true, NULL, this, "hdd"));
|
||||||
widget->addItem(new CMenuForwarder("SD/MMC", true, NULL, this, "mmc"));
|
widget->addItem(new CMenuForwarder("SD/MMC", true, NULL, this, "mmc"));
|
||||||
widget->addItem(new CMenuForwarder("Tuner Reset", true, NULL, this, "restarttuner"));
|
widget->addItem(new CMenuForwarder("Tuner Reset", true, NULL, CNeutrinoApp::getInstance(), "restarttuner"));
|
||||||
|
|
||||||
#if 0 //some parts DEPRECATED
|
#if 0 //some parts DEPRECATED
|
||||||
for (unsigned i = 0; i < sizeof(test_pos)/sizeof(int); i++) {
|
for (unsigned i = 0; i < sizeof(test_pos)/sizeof(int); i++) {
|
||||||
|
@@ -5494,16 +5494,11 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
|
|||||||
}
|
}
|
||||||
else if (actionKey=="restarttuner")
|
else if (actionKey=="restarttuner")
|
||||||
{
|
{
|
||||||
CHint *hint = new CHint(LOCALE_SERVICEMENU_RESTARTING_TUNER);
|
std::vector <hint_message_data_t> hints;
|
||||||
hint->paint();
|
hints.push_back({sigc::bind(sigc::mem_fun(g_Zapit, &CZapitClient::setStandby), true),"Stopping tuner...", NONEXISTANT_LOCALE, 2, true});
|
||||||
|
hints.push_back({sigc::bind(sigc::mem_fun(g_Zapit, &CZapitClient::setStandby), false), "Start tuner...", NONEXISTANT_LOCALE, 2, true});
|
||||||
g_Zapit->setStandby(true);
|
hints.push_back({sigc::hide_return(sigc::mem_fun(g_Zapit, &CZapitClient::Rezap)), "Rezap...", NONEXISTANT_LOCALE, 2, true});
|
||||||
sleep(2);
|
ShowHintS(hints);
|
||||||
g_Zapit->setStandby(false);
|
|
||||||
sleep(2);
|
|
||||||
g_Zapit->Rezap();
|
|
||||||
|
|
||||||
delete hint;
|
|
||||||
}
|
}
|
||||||
else if (actionKey == "camd_reset")
|
else if (actionKey == "camd_reset")
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user