Skip to content
Snippets Groups Projects
Commit 892d8893 authored by rds's avatar rds
Browse files

fix destroy code to use gtkobject chain rather than the gobject one

parent a297f684
No related branches found
No related tags found
No related merge requests found
......@@ -27,13 +27,14 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Jun 3 09:46 2009 (rds)
* Last edited: Jun 10 14:53 2009 (rds)
* Created: Mon Jul 30 13:09:33 2007 (rds)
* CVS info: $Id: zmapWindowContainerAlignment.c,v 1.2 2009-06-03 22:29:08 rds Exp $
* CVS info: $Id: zmapWindowContainerAlignment.c,v 1.3 2009-06-10 14:00:38 rds Exp $
*-------------------------------------------------------------------
*/
#include <zmapWindowContainerAlignment_I.h>
#include <zmapWindowContainerUtils.h>
static void zmap_window_container_alignment_class_init (ZMapWindowContainerAlignmentClass container_align_class);
static void zmap_window_container_alignment_init (ZMapWindowContainerAlignment container_align);
......@@ -83,16 +84,25 @@ GType zmapWindowContainerAlignmentGetType(void)
}
ZMapWindowContainerAlignment zmapWindowContainerAlignmentCreate(void)
ZMapWindowContainerAlignment zmapWindowContainerAlignmentCreate(FooCanvasGroup *parent)
{
ZMapWindowContainerAlignment container_align;
ZMapWindowContainerAlignment container_align = NULL;
return container_align;
}
ZMapWindowContainerAlignment zmapWindowContainerAlignmentAugment(ZMapWindowContainerAlignment alignment,
ZMapFeatureAlignment feature)
{
zmapWindowContainerAttachFeatureAny((ZMapWindowContainerGroup)alignment,
(ZMapFeatureAny)feature);
return alignment;
}
ZMapWindowContainerAlignment zmapWindowContainerAlignmentDestroy(ZMapWindowContainerAlignment container_alignment)
{
g_object_unref(G_OBJECT(container_alignment));
gtk_object_destroy(GTK_OBJECT(container_alignment));
container_alignment = NULL;
......
......@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: May 20 13:19 2009 (rds)
* Last edited: Jun 10 14:53 2009 (rds)
* Created: Wed Dec 3 08:21:03 2008 (rds)
* CVS info: $Id: zmapWindowContainerAlignment.h,v 1.1 2009-06-02 11:20:23 rds Exp $
* CVS info: $Id: zmapWindowContainerAlignment.h,v 1.2 2009-06-10 14:00:38 rds Exp $
*-------------------------------------------------------------------
*/
......@@ -62,7 +62,9 @@ typedef struct _zmapWindowContainerAlignmentClassStruct zmapWindowContainerAlig
/* Public funcs */
GType zmapWindowContainerAlignmentGetType(void);
ZMapWindowContainerAlignment zMapWindowContainerAlignmentCreate(FooCanvasGroup *parent);
ZMapWindowContainerAlignment zmapWindowContainerAlignmentCreate(FooCanvasGroup *parent);
ZMapWindowContainerAlignment zmapWindowContainerAlignmentAugment(ZMapWindowContainerAlignment alignment,
ZMapFeatureAlignment feature);
ZMapWindowContainerAlignment zMapWindowContainerAlignmentDestroy(ZMapWindowContainerAlignment canvas_item);
......
......@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Jun 8 10:20 2009 (rds)
* Last edited: Jun 10 14:36 2009 (rds)
* Created: Mon Jul 30 13:09:33 2007 (rds)
* CVS info: $Id: zmapWindowContainerBlock.c,v 1.5 2009-06-08 09:43:37 rds Exp $
* CVS info: $Id: zmapWindowContainerBlock.c,v 1.6 2009-06-10 14:00:38 rds Exp $
*-------------------------------------------------------------------
*/
......@@ -60,8 +60,7 @@ static void zmap_window_container_block_get_property(GObject *gobject,
guint param_id,
GValue *value,
GParamSpec *pspec);
static void zmap_window_container_block_dispose (GObject *object);
static void zmap_window_container_block_finalize (GObject *object);
static void zmap_window_container_block_destroy (GtkObject *gtkobject);
static GObjectClass *parent_class_G = NULL;
......@@ -96,8 +95,11 @@ GType zmapWindowContainerBlockGetType(void)
}
ZMapWindowContainerBlock zmapWindowContainerBlockAugment(ZMapWindowContainerBlock container_block)
ZMapWindowContainerBlock zmapWindowContainerBlockAugment(ZMapWindowContainerBlock container_block,
ZMapFeatureBlock feature)
{
zmapWindowContainerAttachFeatureAny((ZMapWindowContainerGroup)container_block,
(ZMapFeatureAny)feature);
return container_block;
}
......@@ -360,7 +362,7 @@ gboolean zmapWindowContainerBlockIsColumnLoaded(ZMapWindowContainerBlock co
ZMapWindowContainerBlock zmapWindowContainerBlockDestroy(ZMapWindowContainerBlock container_block)
{
g_object_unref(G_OBJECT(container_block));
gtk_object_destroy(GTK_OBJECT(container_block));
container_block = NULL;
......@@ -398,9 +400,11 @@ static ZMapSeqBitmap get_bitmap_for_key(ZMapWindowContainerBlock block_data,
/* Object code */
static void zmap_window_container_block_class_init(ZMapWindowContainerBlockClass block_data_class)
{
GtkObjectClass *gtkobject_class;
GObjectClass *gobject_class;
gobject_class = (GObjectClass *)block_data_class;
gtkobject_class = (GtkObjectClass *)block_data_class;
gobject_class->set_property = zmap_window_container_block_set_property;
gobject_class->get_property = zmap_window_container_block_get_property;
......@@ -416,10 +420,10 @@ static void zmap_window_container_block_class_init(ZMapWindowContainerBlockClass
"The minimum width the column should be displayed at.",
0.0, 32000.00, 16.0,
ZMAP_PARAM_STATIC_RO));
#endif
gobject_class->dispose = zmap_window_container_block_dispose;
gobject_class->finalize = zmap_window_container_block_finalize;
gtkobject_class->destroy = zmap_window_container_block_destroy;
return ;
}
......@@ -466,12 +470,12 @@ static void zmap_window_container_block_get_property(GObject *gobject,
return ;
}
static void zmap_window_container_block_dispose(GObject *object)
static void zmap_window_container_block_destroy(GtkObject *gtkobject)
{
ZMapWindowContainerBlock block_data;
GObjectClass *gobject_class = G_OBJECT_CLASS(parent_class_G);
GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS(parent_class_G);
block_data = ZMAP_CONTAINER_BLOCK(object);
block_data = ZMAP_CONTAINER_BLOCK(gtkobject);
block_data->window = NULL; /* not ours */
......@@ -494,19 +498,8 @@ static void zmap_window_container_block_dispose(GObject *object)
block_data->loaded_region_hash = NULL;
}
if(gobject_class->dispose)
(*gobject_class->dispose)(object);
return ;
}
static void zmap_window_container_block_finalize(GObject *object)
{
GObjectClass *gobject_class = G_OBJECT_CLASS(parent_class_G);
if(gobject_class->finalize)
(*gobject_class->finalize)(object);
if(gtkobject_class->destroy)
(gtkobject_class->destroy)(gtkobject);
return ;
}
......@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Jun 4 10:04 2009 (rds)
* Last edited: Jun 10 14:48 2009 (rds)
* Created: Wed Dec 3 08:21:03 2008 (rds)
* CVS info: $Id: zmapWindowContainerBlock.h,v 1.2 2009-06-04 09:13:04 rds Exp $
* CVS info: $Id: zmapWindowContainerBlock.h,v 1.3 2009-06-10 14:00:38 rds Exp $
*-------------------------------------------------------------------
*/
......@@ -62,7 +62,8 @@ typedef struct _zmapWindowContainerBlockClassStruct zmapWindowContainerBlockCla
/* Public funcs */
GType zmapWindowContainerBlockGetType(void);
ZMapWindowContainerBlock zmapWindowContainerBlockAugment(ZMapWindowContainerBlock container_block);
ZMapWindowContainerBlock zmapWindowContainerBlockAugment(ZMapWindowContainerBlock container_block,
ZMapFeatureBlock feature_block);
void zmapWindowContainerBlockAddCompressedColumn(ZMapWindowContainerBlock block_data,
FooCanvasGroup *container);
GList *zmapWindowContainerBlockRemoveCompressedColumns(ZMapWindowContainerBlock block_data);
......
......@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Jun 8 11:56 2009 (rds)
* Last edited: Jun 10 14:10 2009 (rds)
* Created: Mon Jul 30 13:09:33 2007 (rds)
* CVS info: $Id: zmapWindowContainerFeatureSet.c,v 1.5 2009-06-10 10:06:06 rds Exp $
* CVS info: $Id: zmapWindowContainerFeatureSet.c,v 1.6 2009-06-10 14:00:38 rds Exp $
*-------------------------------------------------------------------
*/
#include <string.h> /* memset */
......@@ -85,8 +85,7 @@ static void zmap_window_item_feature_set_get_property(GObject *gobject,
guint param_id,
GValue *value,
GParamSpec *pspec);
static void zmap_window_item_feature_set_dispose (GObject *object);
static void zmap_window_item_feature_set_finalize (GObject *object);
static void zmap_window_item_feature_set_destroy (GtkObject *gtkobject);
static void extract_value_from_style_table(gpointer key, gpointer value, gpointer user_data);
......@@ -727,9 +726,12 @@ gboolean zmapWindowStyleListGetSetting(GList *list_of_styles,
static void zmap_window_item_feature_set_class_init(ZMapWindowContainerFeatureSetClass container_set_class)
{
GObjectClass *gobject_class;
GtkObjectClass *gtkobject_class;
gobject_class = (GObjectClass *)container_set_class;
gtkobject_class = (GtkObjectClass *)container_set_class;
gobject_class->set_property = zmap_window_item_feature_set_set_property;
gobject_class->get_property = zmap_window_item_feature_set_get_property;
......@@ -826,8 +828,7 @@ static void zmap_window_item_feature_set_class_init(ZMapWindowContainerFeatureSe
FALSE, ZMAP_PARAM_STATIC_RO));
gobject_class->dispose = zmap_window_item_feature_set_dispose;
gobject_class->finalize = zmap_window_item_feature_set_finalize;
gtkobject_class->destroy = zmap_window_item_feature_set_destroy;
return ;
}
......@@ -896,12 +897,12 @@ static void zmap_window_item_feature_set_get_property(GObject *gobject,
return ;
}
static void zmap_window_item_feature_set_dispose(GObject *object)
static void zmap_window_item_feature_set_destroy(GtkObject *gtkobject)
{
ZMapWindowContainerFeatureSet container_set;
GObjectClass *gobject_class = G_OBJECT_CLASS(parent_class_G);
GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS(parent_class_G);
container_set = ZMAP_CONTAINER_FEATURESET(object);
container_set = ZMAP_CONTAINER_FEATURESET(gtkobject);
if(container_set->style_table)
{
......@@ -919,23 +920,12 @@ static void zmap_window_item_feature_set_dispose(GObject *object)
container_set->user_hidden_stack = NULL;
}
if(gobject_class->dispose)
(*gobject_class->dispose)(object);
return ;
}
static void zmap_window_item_feature_set_finalize(GObject *object)
{
GObjectClass *gobject_class = G_OBJECT_CLASS(parent_class_G);
if(gobject_class->finalize)
(*gobject_class->finalize)(object);
if(gtkobject_class->destroy)
(gtkobject_class->destroy)(gtkobject);
return ;
}
/* INTERNAL */
static void extract_value_from_style_table(gpointer key, gpointer value, gpointer user_data)
......
......@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Jun 10 11:55 2009 (rds)
* Last edited: Jun 10 14:21 2009 (rds)
* Created: Wed Dec 3 10:02:22 2008 (rds)
* CVS info: $Id: zmapWindowContainerGroup.c,v 1.5 2009-06-10 11:17:50 rds Exp $
* CVS info: $Id: zmapWindowContainerGroup.c,v 1.6 2009-06-10 14:00:38 rds Exp $
*-------------------------------------------------------------------
*/
......@@ -65,7 +65,7 @@ static void zmap_window_container_group_get_property(GObject *obje
guint param_id,
GValue *value,
GParamSpec *pspec);
static void zmap_window_container_group_destroy (GObject *object);
static void zmap_window_container_group_destroy (GtkObject *gtkobject);
static void zmap_window_container_group_draw (FooCanvasItem *item, GdkDrawable *drawable,
......@@ -397,7 +397,7 @@ void zmapWindowContainerGroupRemoveUpdateHook(ZMapWindowContainerGroup container
ZMapWindowContainerGroup zmapWindowContainerGroupDestroy(ZMapWindowContainerGroup container)
{
g_object_unref(G_OBJECT(container));
gtk_object_destroy(GTK_OBJECT(container));
container = NULL;
......@@ -423,9 +423,11 @@ static void zmap_window_container_group_class_init (ZMapWindowContainerGroupCla
{
ZMapWindowContainerGroupClass canvas_class;
FooCanvasItemClass *item_class;
GtkObjectClass *gtkobject_class;
GObjectClass *gobject_class;
GParamSpec *param_spec;
gtkobject_class = (GtkObjectClass *) container_class;
gobject_class = (GObjectClass *) container_class;
canvas_class = (ZMapWindowContainerGroupClass)container_class;
item_class = (FooCanvasItemClass *)container_class;
......@@ -454,7 +456,7 @@ static void zmap_window_container_group_class_init (ZMapWindowContainerGroupCla
container_class->reposition_group = zmap_window_container_group_reposition;
gobject_class->dispose = zmap_window_container_group_destroy;
gtkobject_class->destroy = zmap_window_container_group_destroy;
return ;
}
......@@ -631,25 +633,30 @@ static double zmap_window_container_group_item_point (FooCanvasItem *item,
}
#endif
static void zmap_window_container_group_destroy (GObject *object)
static void zmap_window_container_group_destroy (GtkObject *gtkobject)
{
ZMapWindowContainerGroup container;
GObjectClass *object_class;
GtkObjectClass *gtkobject_class;
object_class = (GObjectClass *)item_parent_class_G;
container = (ZMapWindowContainerGroup)object;
gtkobject_class = (GtkObjectClass *)item_parent_class_G;
container = (ZMapWindowContainerGroup)gtkobject;
if(container->pre_update_hooks)
{
g_slist_foreach(container->pre_update_hooks, (GFunc)g_free, NULL);
g_slist_free(container->pre_update_hooks);
container->pre_update_hooks = NULL;
}
g_slist_foreach(container->pre_update_hooks, (GFunc)g_free, NULL);
g_slist_free(container->pre_update_hooks);
container->pre_update_hooks = NULL;
g_slist_foreach(container->post_update_hooks, (GFunc)g_free, NULL);
g_slist_free(container->post_update_hooks);
container->post_update_hooks = NULL;
if(container->post_update_hooks)
{
g_slist_foreach(container->post_update_hooks, (GFunc)g_free, NULL);
g_slist_free(container->post_update_hooks);
container->post_update_hooks = NULL;
}
if(object_class->dispose)
(object_class->dispose)(object);
if(gtkobject_class->destroy)
(gtkobject_class->destroy)(gtkobject);
return ;
}
......
......@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Jun 4 09:13 2009 (rds)
* Last edited: Jun 10 14:18 2009 (rds)
* Created: Wed May 20 10:59:40 2009 (rds)
* CVS info: $Id: zmapWindowContainerStrand.c,v 1.3 2009-06-04 09:13:04 rds Exp $
* CVS info: $Id: zmapWindowContainerStrand.c,v 1.4 2009-06-10 14:00:38 rds Exp $
*-------------------------------------------------------------------
*/
......@@ -103,7 +103,7 @@ void zmapWindowContainerStrandSetAsSeparator(ZMapWindowContainerStrand container
ZMapWindowContainerStrand zMapWindowContainerStrandDestroy(ZMapWindowContainerStrand container_strand)
{
g_object_unref(container_strand);
gtk_object_destroy(GTK_OBJECT(container_strand));
container_strand = NULL;
......@@ -125,11 +125,6 @@ static void zmap_window_container_strand_class_init (ZMapWindowContainerStrandC
parent_class_G = g_type_class_peek_parent(container_class);
#endif /* CHAINING_REQUIRED */
#ifdef EXTRA_DATA_NEEDS_FREE
gobject_class->dispose = zmap_window_container_context_dispose;
gobject_class->finalize = zmap_window_container_context_finalize;
#endif /* EXTRA_DATA_NEEDS_FREE */
return ;
}
......
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