[Gnucash-changes] r13149 - gnucash/trunk/src/gnome-utils - Convert GncTreeModelPrice and GncTreeModelCommodity to use GObject dispose

Chris Shoemaker chris at cvs.gnucash.org
Tue Feb 7 21:24:00 EST 2006


Author: chris
Date: 2006-02-07 21:23:59 -0500 (Tue, 07 Feb 2006)
New Revision: 13149
Trac: http://svn.gnucash.org/trac/changeset/13149

Modified:
   gnucash/trunk/src/gnome-utils/gnc-tree-model-commodity.c
   gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c
Log:
   Convert GncTreeModelPrice and GncTreeModelCommodity to use GObject dispose
   path instead of GtkObject destroy path.


Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-commodity.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-commodity.c	2006-02-08 01:55:07 UTC (rev 13148)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-commodity.c	2006-02-08 02:23:59 UTC (rev 13149)
@@ -50,7 +50,7 @@
 static void gnc_tree_model_commodity_class_init (GncTreeModelCommodityClass *klass);
 static void gnc_tree_model_commodity_init (GncTreeModelCommodity *model);
 static void gnc_tree_model_commodity_finalize (GObject *object);
-static void gnc_tree_model_commodity_destroy (GtkObject *object);
+static void gnc_tree_model_commodity_dispose (GObject *object);
 
 static void gnc_tree_model_commodity_tree_model_init (GtkTreeModelIface *iface);
 static guint gnc_tree_model_commodity_get_flags (GtkTreeModel *tree_model);
@@ -140,15 +140,12 @@
 gnc_tree_model_commodity_class_init (GncTreeModelCommodityClass *klass)
 {
 	GObjectClass *o_class = G_OBJECT_CLASS (klass);
-	GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
 
 	parent_class = g_type_class_peek_parent (klass);
 
 	o_class->finalize = gnc_tree_model_commodity_finalize;
+	o_class->dispose = gnc_tree_model_commodity_dispose;
 
-	/* GtkObject signals */
-	object_class->destroy = gnc_tree_model_commodity_destroy;
-
 	g_type_class_add_private(klass, sizeof(GncTreeModelCommodityPrivate));
 }
 
@@ -181,7 +178,7 @@
 }
 
 static void
-gnc_tree_model_commodity_destroy (GtkObject *object)
+gnc_tree_model_commodity_dispose (GObject *object)
 {
 	GncTreeModelCommodity *model;
 	GncTreeModelCommodityPrivate *priv;
@@ -198,8 +195,8 @@
 	  priv->event_handler_id = 0;
 	}
 
-	if (GTK_OBJECT_CLASS (parent_class)->destroy)
-	  (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+	if (G_OBJECT_CLASS (parent_class)->dispose)
+            G_OBJECT_CLASS (parent_class)->dispose (object);
 	LEAVE(" ");
 }
 

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c	2006-02-08 01:55:07 UTC (rev 13148)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c	2006-02-08 02:23:59 UTC (rev 13149)
@@ -69,7 +69,7 @@
 static void gnc_tree_model_price_class_init (GncTreeModelPriceClass *klass);
 static void gnc_tree_model_price_init (GncTreeModelPrice *model);
 static void gnc_tree_model_price_finalize (GObject *object);
-static void gnc_tree_model_price_destroy (GtkObject *object);
+static void gnc_tree_model_price_dispose (GObject *object);
 
 static void gnc_tree_model_price_tree_model_init (GtkTreeModelIface *iface);
 static guint gnc_tree_model_price_get_flags (GtkTreeModel *tree_model);
@@ -160,15 +160,12 @@
 gnc_tree_model_price_class_init (GncTreeModelPriceClass *klass)
 {
 	GObjectClass *o_class = G_OBJECT_CLASS (klass);
-	GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
 
 	parent_class = g_type_class_peek_parent (klass);
 
 	o_class->finalize = gnc_tree_model_price_finalize;
+	o_class->dispose = gnc_tree_model_price_dispose;
 
-	/* GtkObject signals */
-	object_class->destroy = gnc_tree_model_price_destroy;
-
 	g_type_class_add_private(klass, sizeof(GncTreeModelPricePrivate));
 }
 
@@ -207,7 +204,7 @@
 }
 
 static void
-gnc_tree_model_price_destroy (GtkObject *object)
+gnc_tree_model_price_dispose (GObject *object)
 {
 	GncTreeModelPrice *model;
 	GncTreeModelPricePrivate *priv;
@@ -224,8 +221,8 @@
 	  priv->event_handler_id = 0;
 	}
 
-	if (GTK_OBJECT_CLASS (parent_class)->destroy)
-	  (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+	if (G_OBJECT_CLASS (parent_class)->dispose)
+            G_OBJECT_CLASS (parent_class)->dispose (object);
 	LEAVE(" ");
 }
 



More information about the gnucash-changes mailing list