From c1187cc18a6cded610f54febe78018dc2cda13b7 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 1 Jan 2019 21:50:50 +0100 Subject: [PATCH] hintbox/msgbox: add more specific thread names For better tracing while debugging. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/957b5e00ea404e8b160f191f145cfbcb1cef8e19 Author: Thilo Graf Date: 2019-01-01 (Tue, 01 Jan 2019) ------------------ This commit was generated by Migit --- src/gui/widget/hintbox.cpp | 12 +++++------- src/gui/widget/hintbox.h | 5 +++++ src/gui/widget/msgbox.cpp | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) 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