Reduce number of leakes ui handles per editor instance, #3937

This commit is contained in:
heckflosse
2017-06-29 19:09:40 +02:00
parent b0fdc58a07
commit 5f97800e69
4 changed files with 28 additions and 33 deletions

View File

@@ -849,13 +849,15 @@ bool MyExpander::get_expanded()
return expBox ? expBox->get_visible() : false;
}
void MyExpander::add (Gtk::Container& widget)
void MyExpander::add (Gtk::Container& widget, bool setChild)
{
child = &widget;
if(setChild) {
child = &widget;
}
expBox = Gtk::manage (new ExpanderBox (child));
expBox->add (*child);
expBox->add (widget);
pack_start(*expBox, Gtk::PACK_SHRINK, 0);
child->show();
widget.show();
expBox->hideBox();
}
@@ -889,11 +891,6 @@ bool MyExpander::on_toggle(GdkEventButton* event)
return false;
}
Gtk::Container* MyExpander::getChild()
{
return child;
}
// used to connect a function to the enabled_toggled signal
MyExpander::type_signal_enabled_toggled MyExpander::signal_enabled_toggled()
{