Code

r11512@tres: ted | 2006-04-24 21:36:08 -0700
[inkscape.git] / src / extension / parameter.cpp
index 57bc98fcc55c04043d99297464a4b7b19d9446df..ce6c8c272634a19baadfe1558c19da1c3fd270d0 100644 (file)
@@ -481,8 +481,10 @@ Parameter::Parameter (const gchar * name, const gchar * guitext, const gchar * d
 {
     if (name != NULL)
         _name = g_strdup(name);
-    if (desc != NULL)
+    if (desc != NULL) {
         _desc = g_strdup(desc);
+        // printf("Adding description: '%s' on '%s'\n", _desc, _name);
+    }
 
 
     if (guitext != NULL)
@@ -593,14 +595,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 +619,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 +678,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 +732,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);