mirror of
https://gitlab.gnome.org/GNOME/glade.git
synced 2025-09-08 00:02:20 -04:00
* gladeui/glade-catalog.c, gladeui/glade-inspector.c, gladeui/glade-property-class.c,
gladeui/glade-utils.c, gladeui/glade-widget-adaptor.c, gladeui/glade-widget.c, gladeui/glade-xml-utils.c, plugins/gtk+/glade-gtk.c: Plugging leaks found with valgrind.
This commit is contained in:
parent
f99c4bd02d
commit
5e61eef754
@ -10,6 +10,11 @@
|
||||
* gladeui/glade-widget.c: Notify widget row changes when parentless widget references
|
||||
are added/removed from a widget.
|
||||
|
||||
* gladeui/glade-catalog.c, gladeui/glade-inspector.c, gladeui/glade-property-class.c,
|
||||
gladeui/glade-utils.c, gladeui/glade-widget-adaptor.c, gladeui/glade-widget.c,
|
||||
gladeui/glade-xml-utils.c, plugins/gtk+/glade-gtk.c:
|
||||
Plugging leaks found with valgrind.
|
||||
|
||||
2011-01-15 Emilio Pozuelo Monfort <pochu27@gmail.com>
|
||||
|
||||
* plugins/gtk+/Makefile.am: Don't install .in files.
|
||||
|
@ -481,6 +481,8 @@ catalogs_from_path (GList * catalogs, const gchar * path)
|
||||
else
|
||||
g_warning ("Unable to open the catalog file %s.\n", filename);
|
||||
}
|
||||
|
||||
g_dir_close (dir);
|
||||
}
|
||||
else
|
||||
g_warning ("Failed to open catalog directory '%s': %s", path,
|
||||
|
@ -493,12 +493,22 @@ glade_inspector_dispose (GObject * object)
|
||||
|
||||
glade_inspector_set_project (inspector, NULL);
|
||||
|
||||
if (inspector->priv->idle_complete)
|
||||
{
|
||||
g_source_remove (inspector->priv->idle_complete);
|
||||
inspector->priv->idle_complete = 0;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (glade_inspector_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
glade_inspector_finalize (GObject * object)
|
||||
{
|
||||
GladeInspector *inspector = GLADE_INSPECTOR (object);
|
||||
|
||||
g_completion_free (inspector->priv->completion);
|
||||
|
||||
G_OBJECT_CLASS (glade_inspector_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
@ -1527,9 +1527,8 @@ gpc_read_displayable_values_from_node (GladeXmlNode * node,
|
||||
GFlagsValue *flags_val;
|
||||
|
||||
|
||||
id = glade_xml_get_property_string_required (child, GLADE_TAG_ID, NULL);
|
||||
name =
|
||||
glade_xml_get_property_string_required (child, GLADE_TAG_NAME, NULL);
|
||||
id = glade_xml_get_property_string_required (child, GLADE_TAG_ID, NULL);
|
||||
name = glade_xml_get_property_string_required (child, GLADE_TAG_NAME, NULL);
|
||||
|
||||
if (!id || !name)
|
||||
continue;
|
||||
@ -1566,6 +1565,7 @@ gpc_read_displayable_values_from_node (GladeXmlNode * node,
|
||||
}
|
||||
|
||||
g_free (id);
|
||||
g_free (name);
|
||||
|
||||
child = glade_xml_node_next (child);
|
||||
}
|
||||
@ -1837,6 +1837,9 @@ glade_property_class_parse_specifications (GladePropertyClass * klass,
|
||||
else
|
||||
g_critical ("Unsupported pspec type %s (value -> string)",
|
||||
g_type_name (spec_type));
|
||||
|
||||
g_free (minstr);
|
||||
g_free (maxstr);
|
||||
}
|
||||
return pspec;
|
||||
}
|
||||
|
@ -882,7 +882,10 @@ glade_util_canonical_path (const gchar * path)
|
||||
if (g_chdir (dirname) == 0)
|
||||
{
|
||||
if ((direct_dir = g_get_current_dir ()) != NULL)
|
||||
direct_name = g_build_filename (direct_dir, basename, NULL);
|
||||
{
|
||||
direct_name = g_build_filename (direct_dir, basename, NULL);
|
||||
g_free (direct_dir);
|
||||
}
|
||||
else
|
||||
g_warning ("g_path");
|
||||
|
||||
|
@ -1558,6 +1558,7 @@ gwa_derive_adaptor_for_type (GType object_type, GWADerivedClassData * data)
|
||||
type_name = g_strdup_printf ("Glade%sAdaptor", g_type_name (object_type));
|
||||
derived_type = g_type_register_static (parent_type, type_name,
|
||||
&adaptor_info, 0);
|
||||
g_free (type_name);
|
||||
|
||||
return derived_type;
|
||||
}
|
||||
@ -2539,6 +2540,8 @@ glade_widget_adaptor_from_catalog (GladeCatalog * catalog,
|
||||
|
||||
glade_widget_adaptor_register (adaptor);
|
||||
|
||||
g_free (name);
|
||||
|
||||
return adaptor;
|
||||
}
|
||||
|
||||
@ -3182,6 +3185,9 @@ glade_widget_adaptor_child_set_property (GladeWidgetAdaptor * adaptor,
|
||||
g_return_if_fail (property_name != NULL && value != NULL);
|
||||
g_return_if_fail (g_type_is_a (G_OBJECT_TYPE (container), adaptor->priv->type));
|
||||
|
||||
/* XXX Valgrind says that the above 'g_type_is_a' line allocates uninitialized stack memory
|
||||
* that is later used in glade_gtk_box_child_set_property, why ? */
|
||||
|
||||
if (GLADE_WIDGET_ADAPTOR_GET_CLASS (adaptor)->child_set_property)
|
||||
GLADE_WIDGET_ADAPTOR_GET_CLASS
|
||||
(adaptor)->child_set_property (adaptor, container, child,
|
||||
|
@ -146,7 +146,7 @@ struct _GladeWidgetPrivate {
|
||||
GList *locked_widgets; /* A list of widgets this widget has locked down.
|
||||
*/
|
||||
|
||||
GtkTreeModel *signal_model; /* Signal model (or NULL if not yet requested) */
|
||||
GtkTreeModel *signal_model; /* Signal model (or NULL if not yet requested) */
|
||||
|
||||
/* Construct parameters: */
|
||||
GladeWidget *construct_template;
|
||||
@ -951,6 +951,7 @@ glade_widget_finalize (GObject * object)
|
||||
|
||||
g_free (widget->priv->name);
|
||||
g_free (widget->priv->internal);
|
||||
g_free (widget->priv->construct_internal);
|
||||
g_free (widget->priv->support_warning);
|
||||
g_hash_table_destroy (widget->priv->signals);
|
||||
|
||||
|
@ -509,6 +509,9 @@ glade_xml_get_property_version (GladeXmlNode * node_in,
|
||||
|
||||
g_strfreev (split);
|
||||
}
|
||||
|
||||
g_free (value);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -550,6 +553,9 @@ glade_xml_get_property_targetable_versions (GladeXmlNode * node_in,
|
||||
|
||||
g_strfreev (split);
|
||||
}
|
||||
|
||||
g_free (value);
|
||||
|
||||
return targetable;
|
||||
}
|
||||
|
||||
|
@ -350,7 +350,8 @@ glade_gtk_parse_atk_relation (GladeProperty * property, GladeXmlNode * node)
|
||||
if (string)
|
||||
{
|
||||
g_object_set_data_full (G_OBJECT (property), "glade-loaded-object",
|
||||
g_strdup (string), g_free);
|
||||
/* 'string' here is already allocated on the heap */
|
||||
string, g_free);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1447,6 +1448,9 @@ sort_box_children (GtkWidget * widget_a, GtkWidget * widget_b)
|
||||
|
||||
box = gtk_widget_get_parent (widget_a);
|
||||
|
||||
/* XXX Sometimes the packing "position" property doesnt exist here, why ?
|
||||
*/
|
||||
|
||||
if (gwidget_a)
|
||||
glade_widget_pack_property_get (gwidget_a, "position", &position_a);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user