[gimp] app: unref the filtered container in GObject::dispose()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: unref the filtered container in GObject::dispose()
- Date: Thu, 24 Jun 2010 16:39:23 +0000 (UTC)
commit ad83462570595434d1a82892f63d0fa3e8cdc6a1
Author: Michael Natterer <mitch gimp org>
Date: Thu Jun 24 12:48:57 2010 +0200
app: unref the filtered container in GObject::dispose()
It was simply never destroyed at all before.
app/widgets/gimpdatafactoryview.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpdatafactoryview.c b/app/widgets/gimpdatafactoryview.c
index ac45935..2fb8a6b 100644
--- a/app/widgets/gimpdatafactoryview.c
+++ b/app/widgets/gimpdatafactoryview.c
@@ -70,6 +70,7 @@ struct _GimpDataFactoryViewPriv
};
+static void gimp_data_factory_view_dispose (GObject *object);
static void gimp_data_factory_view_activate_item (GimpContainerEditor *editor,
GimpViewable *viewable);
static void gimp_data_factory_view_select_item (GimpContainerEditor *editor,
@@ -89,8 +90,11 @@ G_DEFINE_TYPE (GimpDataFactoryView, gimp_data_factory_view,
static void
gimp_data_factory_view_class_init (GimpDataFactoryViewClass *klass)
{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpContainerEditorClass *editor_class = GIMP_CONTAINER_EDITOR_CLASS (klass);
+ object_class->dispose = gimp_data_factory_view_dispose;
+
editor_class->select_item = gimp_data_factory_view_select_item;
editor_class->activate_item = gimp_data_factory_view_activate_item;
@@ -115,6 +119,20 @@ gimp_data_factory_view_init (GimpDataFactoryView *view)
view->priv->refresh_button = NULL;
}
+static void
+gimp_data_factory_view_dispose (GObject *object)
+{
+ GimpDataFactoryView *factory_view = GIMP_DATA_FACTORY_VIEW (object);
+
+ if (factory_view->priv->tag_filtered_container)
+ {
+ g_object_unref (factory_view->priv->tag_filtered_container);
+ factory_view->priv->tag_filtered_container = NULL;
+ }
+
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
GtkWidget *
gimp_data_factory_view_new (GimpViewType view_type,
GimpDataFactory *factory,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]