mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
widget/hintbox.cpp/h: use disconnect instead check for OnTimer
diconnect ensures handle of current slot.
This commit is contained in:
@@ -198,8 +198,9 @@ void CHintBox::enableTimeOutBar(bool enable)
|
|||||||
const string tn = cc_item_type.name + ":timeout_bar:";
|
const string tn = cc_item_type.name + ":timeout_bar:";
|
||||||
timeout_pb_timer->setThreadName(tn);
|
timeout_pb_timer->setThreadName(tn);
|
||||||
}
|
}
|
||||||
if (timeout_pb_timer->OnTimer.empty())
|
sl_tbar_on_timer.disconnect();
|
||||||
timeout_pb_timer->OnTimer.connect(sigc::mem_fun0(this, &CHintBox::showTimeOutBar));
|
sl_tbar_on_timer = sigc::mem_fun0(this, &CHintBox::showTimeOutBar);
|
||||||
|
timeout_pb_timer->OnTimer.connect(sl_tbar_on_timer);
|
||||||
timeout_pb_timer->startTimer();
|
timeout_pb_timer->startTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -62,6 +62,7 @@ class CHintBox : public CComponentsWindow
|
|||||||
int h_hint_obj;
|
int h_hint_obj;
|
||||||
int w_indentation;
|
int w_indentation;
|
||||||
bool enable_txt_scroll;
|
bool enable_txt_scroll;
|
||||||
|
sigc::slot0<void> sl_tbar_on_timer;
|
||||||
|
|
||||||
Font* hb_font;
|
Font* hb_font;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user