mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
hintbox/msgbox: add more specific thread names
For better tracing while debugging.
This commit is contained in:
@@ -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)
|
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);
|
int _Width = frameBuffer->scale2Res(Width);
|
||||||
timeout = HINTBOX_DEFAULT_TIMEOUT;
|
timeout = HINTBOX_DEFAULT_TIMEOUT;
|
||||||
w_indentation = indent;
|
w_indentation = indent;
|
||||||
@@ -194,7 +195,8 @@ void CHintBox::enableTimeOutBar(bool enable)
|
|||||||
timeout_pb->setValues(0, 100*timeout);
|
timeout_pb->setValues(0, 100*timeout);
|
||||||
if (!timeout_pb_timer) {
|
if (!timeout_pb_timer) {
|
||||||
timeout_pb_timer = new CComponentsTimer(1, true);
|
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())
|
if (timeout_pb_timer->OnTimer.empty())
|
||||||
timeout_pb_timer->OnTimer.connect(sigc::mem_fun0(this, &CHintBox::showTimeOutBar));
|
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)
|
CHint::CHint(const char * const Text, bool show_background) : CHintBox("" , Text)
|
||||||
{
|
{
|
||||||
paint_bg = show_background;
|
initHint(show_background);
|
||||||
ccw_show_header = false;
|
|
||||||
ccw_show_footer = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CHint::CHint(const neutrino_locale_t Text, bool show_background) : CHintBox("" , g_Locale->getText(Text))
|
CHint::CHint(const neutrino_locale_t Text, bool show_background) : CHintBox("" , g_Locale->getText(Text))
|
||||||
{
|
{
|
||||||
paint_bg = show_background;
|
initHint(show_background);
|
||||||
ccw_show_header = false;
|
|
||||||
ccw_show_footer = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ShowHintS(const char * const Text, int timeout, bool show_background)
|
int ShowHintS(const char * const Text, int timeout, bool show_background)
|
||||||
|
@@ -320,6 +320,11 @@ optional disable/enable background
|
|||||||
|
|
||||||
class CHint : public CHintBox
|
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:
|
public:
|
||||||
/**CHint Constructor
|
/**CHint Constructor
|
||||||
* @param[in] Text
|
* @param[in] Text
|
||||||
|
@@ -83,6 +83,7 @@ CMsgBox::CMsgBox( const char* Text,
|
|||||||
|
|
||||||
void CMsgBox::init(const int& Height, const int& ShowButtons, const msg_result_t& Default_result)
|
void CMsgBox::init(const int& Height, const int& ShowButtons, const msg_result_t& Default_result)
|
||||||
{
|
{
|
||||||
|
cc_item_type.name = "msgbox";
|
||||||
initTimeOut();
|
initTimeOut();
|
||||||
|
|
||||||
//enable footer and add its height
|
//enable footer and add its height
|
||||||
|
Reference in New Issue
Block a user