From 27918089faa740f644c36f2a839501c76c7ba49b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 2 May 2006 05:25:27 +0000 Subject: r11463@tres: ted | 2006-04-19 08:28:18 -0700 Making GTK+ manage all the memory that I thought it was already doing before. Now new GTK+ objects that aren't internally referenced are surrounded by Gtk::manage() (bzr r671) --- src/extension/parameter.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/extension/parameter.cpp') diff --git a/src/extension/parameter.cpp b/src/extension/parameter.cpp index 57bc98fcc..59d6ee09c 100644 --- a/src/extension/parameter.cpp +++ b/src/extension/parameter.cpp @@ -593,14 +593,14 @@ ParamIntAdjustment::val_changed (void) Gtk::Widget * ParamFloat::get_widget (void) { - Gtk::HBox * hbox = new Gtk::HBox(); + Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox()); - Gtk::Label * label = new Gtk::Label(_(_text), Gtk::ALIGN_LEFT); + Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT)); label->show(); hbox->pack_start(*label, true, true); ParamFloatAdjustment * fadjust = new ParamFloatAdjustment(this); - Gtk::SpinButton * spin = new Gtk::SpinButton(*fadjust, 0.1, 1); + Gtk::SpinButton * spin = Gtk::manage(new Gtk::SpinButton(*fadjust, 0.1, 1)); spin->show(); hbox->pack_start(*spin, false, false); @@ -617,14 +617,14 @@ ParamFloat::get_widget (void) Gtk::Widget * ParamInt::get_widget (void) { - Gtk::HBox * hbox = new Gtk::HBox(); + Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox()); - Gtk::Label * label = new Gtk::Label(_(_text), Gtk::ALIGN_LEFT); + Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT)); label->show(); hbox->pack_start(*label, true, true); ParamIntAdjustment * fadjust = new ParamIntAdjustment(this); - Gtk::SpinButton * spin = new Gtk::SpinButton(*fadjust, 1.0, 0); + Gtk::SpinButton * spin = Gtk::manage(new Gtk::SpinButton(*fadjust, 1.0, 0)); spin->show(); hbox->pack_start(*spin, false, false); @@ -676,9 +676,9 @@ ParamBoolCheckButton::on_toggle (void) Gtk::Widget * ParamBool::get_widget (void) { - Gtk::HBox * hbox = new Gtk::HBox(); + Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox()); - Gtk::Label * label = new Gtk::Label(_(_text), Gtk::ALIGN_LEFT); + Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT)); label->show(); hbox->pack_start(*label, true, true); @@ -730,9 +730,9 @@ ParamStringEntry::changed_text (void) Gtk::Widget * ParamString::get_widget (void) { - Gtk::HBox * hbox = new Gtk::HBox(); + Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox()); - Gtk::Label * label = new Gtk::Label(_(_text), Gtk::ALIGN_LEFT); + Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT)); label->show(); hbox->pack_start(*label, true, true); -- cgit v1.2.3