Message timeout: try to fix timeout defines

Some parameters were confused.
This commit is contained in:
2016-12-07 11:07:41 +01:00
committed by Jacek Jendrzej
parent bd5e82fdc4
commit 4382daf5e4
4 changed files with 20 additions and 15 deletions

View File

@@ -114,7 +114,7 @@ void CMsgBox::init(const int& Height, const int& ShowButtons, const msg_result_t
void CMsgBox::initTimeOut()
{
timeout = -1;
timeout = NO_TIMEOUT;
enable_timeout_result = false;
}
@@ -238,7 +238,9 @@ int CMsgBox::exec()
ccw_footer->getSelectedButtonObject()->setButtonAlias(mb_show_button);
int selected = ccw_footer->getSelectedButton();
if (timeout == NO_TIMEOUT)
timeout = MSGBOX_DEFAULT_TIMEOUT;
timeout = 0;
if (timeout == DEFAULT_TIMEOUT)
timeout = g_settings.timing[SNeutrinoSettings::TIMING_STATIC_MESSAGES];
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(timeout);
@@ -528,12 +530,12 @@ int ShowMsg( const std::string & Title,
void DisplayErrorMessage(const char * const ErrorMsg, const neutrino_locale_t& caption, const int& Text_mode)
{
ShowMsg(caption, ErrorMsg, CMsgBox::mbrCancel, CMsgBox::mbBack, NEUTRINO_ICON_ERROR, 500, -1, false, Text_mode, COL_RED);
ShowMsg(caption, ErrorMsg, CMsgBox::mbrCancel, CMsgBox::mbBack, NEUTRINO_ICON_ERROR, 500, NO_TIMEOUT, false, Text_mode, COL_RED);
}
void DisplayErrorMessage(const char * const ErrorMsg, const std::string& caption, const int& Text_mode)
{
ShowMsg(caption, ErrorMsg, CMsgBox::mbrCancel, CMsgBox::mbBack, NEUTRINO_ICON_ERROR, 500, -1, false, Text_mode, COL_RED);
ShowMsg(caption, ErrorMsg, CMsgBox::mbrCancel, CMsgBox::mbBack, NEUTRINO_ICON_ERROR, 500, NO_TIMEOUT, false, Text_mode, COL_RED);
}
void DisplayErrorMessage(const char * const ErrorMsg, const int& Text_mode)
@@ -543,12 +545,12 @@ void DisplayErrorMessage(const char * const ErrorMsg, const int& Text_mode)
void DisplayInfoMessage(const char * const InfoMsg, const neutrino_locale_t& caption, const int& Text_mode, fb_pixel_t color_frame)
{
ShowMsg(caption, InfoMsg, CMsgBox::mbrBack, CMsgBox::mbOk, NEUTRINO_ICON_INFO, 500, -1, false, Text_mode, color_frame);
ShowMsg(caption, InfoMsg, CMsgBox::mbrBack, CMsgBox::mbOk, NEUTRINO_ICON_INFO, 500, NO_TIMEOUT, false, Text_mode, color_frame);
}
void DisplayInfoMessage(const char * const InfoMsg, const std::string& caption, const int& Text_mode, fb_pixel_t color_frame)
{
ShowMsg(caption, InfoMsg, CMsgBox::mbrBack, CMsgBox::mbOk, NEUTRINO_ICON_INFO, 500, -1, false, Text_mode, color_frame);
ShowMsg(caption, InfoMsg, CMsgBox::mbrBack, CMsgBox::mbOk, NEUTRINO_ICON_INFO, 500, NO_TIMEOUT, false, Text_mode, color_frame);
}
void DisplayInfoMessage(const char * const InfoMsg, const int& Text_mode, fb_pixel_t color_frame)