hintbox/msgbox: add more specific thread names

For better tracing while debugging.
This commit is contained in:
2018-12-23 22:56:16 +01:00
parent 1022cba0cc
commit 6237bfe07c
3 changed files with 11 additions and 7 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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