Commit 34cf2826 authored by Fernando Herrera's avatar Fernando Herrera Committed by Fernando Herrera de las Heras

copy filename to builder->priv instead of holding a reference to it. Bug

2007-09-04  Fernando Herrera  <fherrera@onirica.com>

        * gtk/gtkbuilder.c: (gtk_builder_finalize),
        (gtk_builder_add_from_file): copy filename to builder->priv instead of
        holding a reference to it. Bug #472643


svn path=/trunk/; revision=18722
parent c99040a4
2007-09-04 Fernando Herrera <fherrera@onirica.com>
* gtk/gtkbuilder.c: (gtk_builder_finalize),
(gtk_builder_add_from_file): copy filename to builder->priv instead of
holding a reference to it. Bug #472643
2007-09-04 Michael Natterer <mitch@imendio.com>
* gtk/gtkmodules.c: added missing \n to g_print() in GTK_NOTE().
......
......@@ -70,7 +70,7 @@ struct _GtkBuilderPrivate
GSList *signals;
gchar *current_root;
GSList *root_objects;
const gchar *filename;
gchar *filename;
};
G_DEFINE_TYPE (GtkBuilder, gtk_builder, G_TYPE_OBJECT)
......@@ -142,6 +142,7 @@ gtk_builder_finalize (GObject *object)
g_hash_table_destroy (builder->priv->objects);
g_slist_foreach (builder->priv->root_objects, (GFunc)g_object_unref, NULL);
g_slist_free (builder->priv->root_objects);
g_free (builder->priv->filename);
}
static void
......@@ -651,7 +652,7 @@ gtk_builder_add_from_file (GtkBuilder *builder,
return 0;
}
builder->priv->filename = filename;
builder->priv->filename = g_strdup (filename);
_gtk_builder_parser_parse_buffer (builder, filename,
buffer, length,
......
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