From 5e70f5f3dd2a1b34dcfc9fa4a7749d17762c9ea5 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 9 Aug 2001 03:14:48 +0000 Subject: Chain to the destroy handler in the parent class! 2001-08-08 Federico Mena Quintero * e-cell-pixbuf.c (pixbuf_destroy): Chain to the destroy handler in the parent class! * e-table-field-chooser.c (e_table_field_chooser_destroy): Likewise. Sigh. * e-table-one.c (one_destroy): Likewise. Double sigh. * e-tree-selection-model.c (etsm_destroy): Likewise. Triple sigh. svn path=/trunk/; revision=11811 --- widgets/table/e-cell-pixbuf.c | 3 ++- widgets/table/e-table-field-chooser.c | 3 +++ widgets/table/e-table-one.c | 7 +++++++ widgets/table/e-tree-selection-model.c | 3 +++ 4 files changed, 15 insertions(+), 1 deletion(-) (limited to 'widgets/table') diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c index 3014c45019..f2764199bd 100644 --- a/widgets/table/e-cell-pixbuf.c +++ b/widgets/table/e-cell-pixbuf.c @@ -176,7 +176,8 @@ pixbuf_max_width (ECellView *ecell_view, int model_col, int view_col) static void pixbuf_destroy (GtkObject *object) { - /* ... */ + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c index 345883cb89..2f3562a8f3 100644 --- a/widgets/table/e-table-field-chooser.c +++ b/widgets/table/e-table-field-chooser.c @@ -187,6 +187,9 @@ e_table_field_chooser_destroy (GtkObject *object) if (etfc->gui) gtk_object_unref(GTK_OBJECT(etfc->gui)); + + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } GtkWidget* diff --git a/widgets/table/e-table-one.c b/widgets/table/e-table-one.c index eee4a916cb..78f6289f08 100644 --- a/widgets/table/e-table-one.c +++ b/widgets/table/e-table-one.c @@ -15,6 +15,8 @@ #define PARENT_TYPE e_table_model_get_type () +static ETableModelClass *parent_class = NULL; + static int one_column_count (ETableModel *etm) { @@ -140,6 +142,9 @@ one_destroy (GtkObject *object) } g_free(one->data); + + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void @@ -147,6 +152,8 @@ e_table_one_class_init (GtkObjectClass *object_class) { ETableModelClass *model_class = (ETableModelClass *) object_class; + parent_class = gtk_type_class (E_TABLE_MODEL_TYPE); + model_class->column_count = one_column_count; model_class->row_count = one_row_count; model_class->value_at = one_value_at; diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c index 3c06515cc9..e359b9aa07 100644 --- a/widgets/table/e-tree-selection-model.c +++ b/widgets/table/e-tree-selection-model.c @@ -591,6 +591,9 @@ etsm_destroy (GtkObject *object) g_free(etsm->priv); etsm->priv = NULL; + + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void -- cgit