summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c2163b5)
raw | patch | inline | side by side (parent: c2163b5)
| author | gouldtj <gouldtj@users.sourceforge.net> | |
| Tue, 2 May 2006 05:25:27 +0000 (05:25 +0000) | ||
| committer | gouldtj <gouldtj@users.sourceforge.net> | |
| Tue, 2 May 2006 05:25:27 +0000 (05:25 +0000) |
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()
before. Now new GTK+ objects that aren't internally referenced are
surrounded by Gtk::manage()
| src/extension/error-file.cpp | patch | blob | history | |
| src/extension/extension.cpp | patch | blob | history | |
| src/extension/parameter.cpp | patch | blob | history |
index 4f6987930beebf2423038a01151f716bbfb31b8e..d6239b1a14b9aa60f0486196f408da3e631f0026 100644 (file)
Gtk::VBox * vbox = get_vbox();
/* This is some filler text, needs to change before relase */
- checkbutton = new Gtk::CheckButton(_("Show dialog on startup"));
+ checkbutton = Gtk::manage(new Gtk::CheckButton(_("Show dialog on startup")));
vbox->pack_start(*checkbutton, true, false, 5);
checkbutton->show();
checkbutton->set_active(prefs_get_int_attribute(PREFERENCE_ID, 1) == 0 ? false : true);
set_resizable(true);
- //Gtk::HPaned *splitter = new Gtk::HPaned();
Inkscape::UI::Dialogs::ExtensionsPanel* extens = new Inkscape::UI::Dialogs::ExtensionsPanel();
extens->set_full(false);
vbox->pack_start( *extens, true, true );
index 7004e848f2c1ab41e22b2e3d00b2bc7622decd31..e41990a1c9153e8c746f25dcfeec3261ebcd5a8a 100644 (file)
{
if (g_slist_length(parameters) == 0) return NULL;
- Gtk::VBox * vbox = new Gtk::VBox();
- vbox = new Gtk::VBox();
+ Gtk::VBox * vbox = Gtk::manage(new Gtk::VBox());
for (GSList * list = parameters; list != NULL; list = g_slist_next(list)) {
Parameter * param = reinterpret_cast<Parameter *>(list->data);
index 57bc98fcc55c04043d99297464a4b7b19d9446df..59d6ee09c8b0042ee845e6646d06dc838b09b876 100644 (file)
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);
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);
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);
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);