diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 677381d6a..3bbec4d24 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -131,6 +131,7 @@ CHintBox::CHintBox( const char * const Caption, void CHintBox::init(const std::string& Text, const int& Width, const std::string& Picon, const int& header_buttons, const int& text_mode, const int& indent) { + cc_item_type.name = "wg.hintbox"; int _Width = frameBuffer->scale2Res(Width); timeout = HINTBOX_DEFAULT_TIMEOUT; w_indentation = indent; @@ -194,7 +195,8 @@ void CHintBox::enableTimeOutBar(bool enable) timeout_pb->setValues(0, 100*timeout); if (!timeout_pb_timer) { timeout_pb_timer = new CComponentsTimer(1, true); - timeout_pb_timer->setThreadName("hb:timeoutbar"); + const string tn = cc_item_type.name + ":timeout_bar:"; + timeout_pb_timer->setThreadName(tn); } if (timeout_pb_timer->OnTimer.empty()) timeout_pb_timer->OnTimer.connect(sigc::mem_fun0(this, &CHintBox::showTimeOutBar)); @@ -439,16 +441,12 @@ int ShowHint(const char * const Caption, const neutrino_locale_t Text, const int CHint::CHint(const char * const Text, bool show_background) : CHintBox("" , Text) { - paint_bg = show_background; - ccw_show_header = false; - ccw_show_footer = false; + initHint(show_background); } CHint::CHint(const neutrino_locale_t Text, bool show_background) : CHintBox("" , g_Locale->getText(Text)) { - paint_bg = show_background; - ccw_show_header = false; - ccw_show_footer = false; + initHint(show_background); } int ShowHintS(const char * const Text, int timeout, bool show_background) diff --git a/src/gui/widget/hintbox.h b/src/gui/widget/hintbox.h index be3f8dee3..35758027b 100644 --- a/src/gui/widget/hintbox.h +++ b/src/gui/widget/hintbox.h @@ -320,6 +320,11 @@ optional disable/enable background class CHint : public CHintBox { + private: + void initHint(bool enable_bg) { paint_bg = enable_bg; + ccw_show_header = false; + ccw_show_footer = false; + cc_item_type.name = "wg.hint";} public: /**CHint Constructor * @param[in] Text diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index 700698999..aaeaf3a2e 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -83,6 +83,7 @@ CMsgBox::CMsgBox( const char* Text, void CMsgBox::init(const int& Height, const int& ShowButtons, const msg_result_t& Default_result) { + cc_item_type.name = "msgbox"; initTimeOut(); //enable footer and add its height