CShellWindow: optimize error review after error message

Show close button in window, give user possibility to read error listing
before close the window!
This commit is contained in:
2014-11-24 11:17:28 +01:00
parent 14779cce55
commit 04ad939ea7

View File

@@ -201,25 +201,31 @@ void CShellWindow::exec()
void CShellWindow::showResult()
{
if (textBox){
bool show_button = false;
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();
if (mode & ACKNOWLEDGE){
show_button = true;
}
else if (mode & ACKNOWLEDGE_MSG){
if (*res != 0){
DisplayErrorMessage("Please press button");
show_button = true;
}else{
DisplayInfoMessage("...ready. Please press OK");
exit = true;
}
}
if (show_button){
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();
}
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]);