From d6ef204f50e0f7f36c30b7d4e826c1e7762dbce4 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 23 Dec 2016 20:51:39 +0100 Subject: [PATCH] megbox.cpp/h: add overloaded version of ShowMsg() with string/locale combination Constellation was missed. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/22a7006644530841aa2b28951883fe34b956c4f6 Author: Thilo Graf Date: 2016-12-23 (Fri, 23 Dec 2016) ------------------ This commit was generated by Migit --- src/gui/widget/msgbox.cpp | 16 ++++++++++++++++ src/gui/widget/msgbox.h | 11 +++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index 5f6e375e0..b5144fa97 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -528,6 +528,22 @@ int ShowMsg( const std::string & Title, return (result); } +int ShowMsg( const std::string & Title, + const neutrino_locale_t Text, + const CMsgBox::msg_result_t Default, + const uint32_t ShowButtons, + const char * const Icon, + const int Width, + const int Timeout, + bool returnDefaultOnTimeout, + const int& Text_mode, + fb_pixel_t color_frame) +{ + int result = ShowMsg2UTF(Title.c_str(), g_Locale->getText(Text), Default, ShowButtons, Icon, Width, Timeout, returnDefaultOnTimeout, Text_mode, color_frame); + + return (result); +} + 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, NO_TIMEOUT, false, Text_mode, COL_RED); diff --git a/src/gui/widget/msgbox.h b/src/gui/widget/msgbox.h index 5325bd764..f20083296 100644 --- a/src/gui/widget/msgbox.h +++ b/src/gui/widget/msgbox.h @@ -392,6 +392,17 @@ int ShowMsg( const std::string & Title, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE, fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 +int ShowMsg( const std::string & Title, + const neutrino_locale_t Text, + const CMsgBox::msg_result_t Default, + const uint32_t ShowButtons, + const char * const Icon = NULL, + const int Width = MSGBOX_MIN_WIDTH, + const int Timeout = NO_TIMEOUT, + bool returnDefaultOnTimeout = false, + const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE, + fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 + void DisplayErrorMessage(const char * const ErrorMsg, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8 void DisplayErrorMessage(const char * const ErrorMsg, const neutrino_locale_t& caption, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8 void DisplayErrorMessage(const char * const ErrorMsg, const std::string& caption, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8