From db02913f25e158cd4ba6d33964b7b6768c7ef30e Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 11 Oct 2021 22:24:02 +0200 Subject: [PATCH] test-menu: sync with tuxbox Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c223ff6f76801a9e2ad863929b1591ebc3bc5cee Author: vanhofen Date: 2021-10-11 (Mon, 11 Oct 2021) Origin message was: ------------------ - test-menu: sync with tuxbox --- src/gui/test_menu.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index 97a57bc06..63a2992f0 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -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 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 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);