diff --git a/src/gui/widget/shellwindow.cpp b/src/gui/widget/shellwindow.cpp index 19790edf1..08a829895 100644 --- a/src/gui/widget/shellwindow.cpp +++ b/src/gui/widget/shellwindow.cpp @@ -34,7 +34,6 @@ #include #include -#include #include #include #include @@ -43,6 +42,7 @@ #include #include #include +#include #include CShellWindow::CShellWindow(const std::string &command, const int _mode, int *res) { @@ -189,23 +189,34 @@ CShellWindow::CShellWindow(const std::string &command, const int _mode, int *res CShellWindow::~CShellWindow() { - if (textBox && (mode & ACKNOWLEDGE)) { - int b_width = 150; - int b_height = 35; - int xpos = frameBuffer->getScreenWidth() - b_width; - int ypos = frameBuffer->getScreenHeight() - b_height; + if (textBox){ + bool exit = false; + if (mode & ACKNOWLEDGE){ + int b_width = 150; + int b_height = 35; + int xpos = frameBuffer->getScreenWidth() - b_width; + int ypos = frameBuffer->getScreenHeight() - b_height; - CComponentsButton btn(xpos, ypos, b_width, b_height, LOCALE_MESSAGEBOX_OK, NEUTRINO_ICON_BUTTON_OKAY, NULL, true, true); - btn.paint(); + CComponentsButton btn(xpos, ypos, b_width, b_height, LOCALE_MESSAGEBOX_OK, NEUTRINO_ICON_BUTTON_OKAY, NULL, true, true); + btn.paint(); + } + else if (mode & ACKNOWLEDGE_MSG){ + DisplayInfoMessage("...ready. Please press OK"); + exit = true; + } frameBuffer->blit(); neutrino_msg_t msg; neutrino_msg_data_t data; uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); - do - g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd); - while (msg != CRCInput::RC_ok && msg != CRCInput::RC_home && msg != CRCInput::RC_timeout); + + if (!exit) + { + do + g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd); + while (msg != CRCInput::RC_ok && msg != CRCInput::RC_home && msg != CRCInput::RC_timeout); + } frameBuffer->Clear(); frameBuffer->blit(); diff --git a/src/gui/widget/shellwindow.h b/src/gui/widget/shellwindow.h index f46efa9cd..ee6cb3953 100644 --- a/src/gui/widget/shellwindow.h +++ b/src/gui/widget/shellwindow.h @@ -39,7 +39,8 @@ class CShellWindow enum shellwindow_modes { VERBOSE = 1, - ACKNOWLEDGE = 2 + ACKNOWLEDGE = 2, + ACKNOWLEDGE_MSG = 4 }; CShellWindow(const std::string &cmd, const int mode = 0, int *res = NULL); ~CShellWindow();