Commit 3f7fb76d authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

* gladeui/glade-editor-property.c, gladeui/glade-widget-adaptor.c: Pluggin more memory leaks.

parent 4c5ed910
......@@ -3,6 +3,8 @@
* plugins/gtk+/gtk+.xml.in: Remove GtkTreeSelection from the palette, it's only available
as the internal selection of a GtkTreeView.
* gladeui/glade-editor-property.c, gladeui/glade-widget-adaptor.c: Pluggin more memory leaks.
2011-01-16 Tristan Van Berkom <tristanvb@openismus.com>
* plugins/gtk+/glade-gtk.c: Fixed warnings from glade_gtk_box_get_first_blank() when
......
......@@ -344,6 +344,8 @@ glade_editor_property_constructor (GType type,
eprop->priv->label = gtk_label_new (NULL);
gtk_event_box_set_visible_window (GTK_EVENT_BOX (eprop->priv->item_label), FALSE);
g_object_ref_sink (eprop->priv->item_label);
hbox = gtk_hbox_new (FALSE, 4);
gtk_label_set_line_wrap (GTK_LABEL (eprop->priv->label), TRUE);
......@@ -380,6 +382,20 @@ glade_editor_property_finalize (GObject * object)
G_OBJECT_CLASS (table_class)->finalize (object);
}
static void
glade_editor_property_dispose (GObject * object)
{
GladeEditorProperty *eprop = GLADE_EDITOR_PROPERTY (object);
if (eprop->priv->item_label)
{
g_object_unref (eprop->priv->item_label);
eprop->priv->item_label = NULL;
}
G_OBJECT_CLASS (table_class)->dispose (object);
}
static void
glade_editor_property_set_property (GObject * object,
guint prop_id,
......@@ -563,6 +579,7 @@ glade_editor_property_class_init (GladeEditorPropertyClass * eprop_class)
/* GObjectClass */
object_class->constructor = glade_editor_property_constructor;
object_class->finalize = glade_editor_property_finalize;
object_class->dispose = glade_editor_property_dispose;
object_class->get_property = glade_editor_property_real_get_property;
object_class->set_property = glade_editor_property_set_property;
......
......@@ -728,15 +728,18 @@ glade_widget_adaptor_real_set_property (GObject * object,
break;
case PROP_CATALOG:
/* assume once (construct-only) */
g_free (adaptor->priv->catalog);
adaptor->priv->catalog = g_value_dup_string (value);
break;
case PROP_BOOK:
/* assume once (construct-only) */
g_free (adaptor->priv->book);
adaptor->priv->book = g_value_dup_string (value);
break;
case PROP_SPECIAL_TYPE:
/* assume once (construct-only) */
adaptor->priv->special_child_type = g_value_dup_string (value);
/* assume once (construct-only) */
g_free (adaptor->priv->special_child_type);
adaptor->priv->special_child_type = g_value_dup_string (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment