test-menu: sync with tuxbox

Origin commit data
------------------
Commit: c223ff6f76
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-10-11 (Mon, 11 Oct 2021)

Origin message was:
------------------
- test-menu: sync with tuxbox
This commit is contained in:
vanhofen
2021-10-11 22:24:02 +02:00
parent 37a0ddc3bb
commit db02913f25

View File

@@ -1040,6 +1040,19 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
ShowHintS(hint);
return menu_return::RETURN_REPAINT;
}
else if (actionKey == "shellwindow"){
sigc::slot3<void, std::string*, int *, bool *> sl_shell_output;
sl_shell_output = sigc::mem_fun(*this, &CTestMenu::handleShellOutput);
int r = 0;
const char *c = getenv("TEST_COMMAND");
std::string cmd = "/bin/ps auxwf";
if (c)
cmd = (std::string)c;
CTermWindow term(cmd, CTermWindow::VERBOSE | CTermWindow::ACKNOWLEDGE, &r, false);
term.OnShellOutputLoop.connect(sl_shell_output);
term.exec();
return menu_return::RETURN_REPAINT;
}
else if (actionKey == "msgbox_alt_btn"){
CMsgBox msgBox("Variable buttontext...", "Msgbox Test");
msgBox.setShowedButtons(CMsgBox::mbNo | CMsgBox::mbYes);
@@ -1056,19 +1069,6 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
return res;
}
else if (actionKey == "shellwindow"){
sigc::slot3<void, std::string*, int *, bool *> sl_shell_output;
sl_shell_output = sigc::mem_fun(*this, &CTestMenu::handleShellOutput);
int r = 0;
const char *c = getenv("TEST_COMMAND");
std::string cmd = "/bin/ps auxwf";
if (c)
cmd = (std::string)c;
CTermWindow term(cmd, CTermWindow::VERBOSE | CTermWindow::ACKNOWLEDGE, &r, false);
term.OnShellOutputLoop.connect(sl_shell_output);
term.exec();
return menu_return::RETURN_REPAINT;
}
else if (actionKey == "footer_key"){
CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, "Footer-Key pressed. Press EXIT to return", 350, NULL, NULL, CComponentsHeader::CC_BTN_EXIT);
hintBox.setTimeOut(15, true);