Replace all add_idle()s with IdleRegister

This commit is contained in:
Flössie
2017-02-10 21:22:42 +01:00
parent 824ecaed41
commit 79ff7f5997
21 changed files with 691 additions and 637 deletions

View File

@@ -324,6 +324,8 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
ColorToning::~ColorToning()
{
idle_register.destroy();
delete colorCurveEditorG;
delete opacityCurveEditorG;
delete clCurveEditorG;
@@ -650,19 +652,18 @@ void ColorToning::adjusterChanged (ThresholdAdjuster* a, double newBottom, doubl
Glib::ustring::compose(Glib::ustring(M("TP_COLORTONING_HUE") + ": %1" + "\n" + M("TP_COLORTONING_STRENGTH") + ": %2"), int(newTop), int(newBottom)));
}
int CTChanged_UI (void* data)
{
(static_cast<ColorToning*>(data))->CTComp_ ();
return 0;
}
void ColorToning::autoColorTonChanged(int bwct, int satthres, int satprot)
{
nextbw = bwct;
nextsatth = satthres;
nextsatpr = satprot;
add_idle (CTChanged_UI, this);
const auto func = [](gpointer data) -> gboolean {
static_cast<ColorToning*>(data)->CTComp_();
return FALSE;
};
idle_register.add(func, this);
}
bool ColorToning::CTComp_ ()