From df0dbaef4aa3530ca72ff879b51472d6dc1a8ad0 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 9 Aug 2001 06:25:54 +0000 Subject: Chain to the destroy handler in the parent class! 2001-08-09 Federico Mena Quintero * gui/e-itip-control.c (destroy): Chain to the destroy handler in the parent class! * gui/dialogs/comp-editor-page.c (comp_editor_page_destroy): Likewise. Sigh. * gui/cal-search-bar.c (cal_search_bar_destroy): Whoops, added a destroy handler. svn path=/trunk/; revision=11820 --- calendar/ChangeLog | 11 +++++++++++ calendar/gui/cal-search-bar.c | 29 +++++++++++++++++++++++++++++ calendar/gui/dialogs/comp-editor-page.c | 7 +++++++ calendar/gui/e-itip-control.c | 3 +++ 4 files changed, 50 insertions(+) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 01b84bf5d1..1267014928 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,14 @@ +2001-08-09 Federico Mena Quintero + + * gui/e-itip-control.c (destroy): Chain to the destroy handler in + the parent class! + + * gui/dialogs/comp-editor-page.c (comp_editor_page_destroy): + Likewise. Sigh. + + * gui/cal-search-bar.c (cal_search_bar_destroy): Whoops, added a + destroy handler. + 2001-08-08 Damon Chaplin * gui/goto-dialog.glade: removed underlined accelerator key from diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c index a112409412..5ffbfcdb82 100644 --- a/calendar/gui/cal-search-bar.c +++ b/calendar/gui/cal-search-bar.c @@ -68,10 +68,13 @@ struct CalSearchBarPrivate { static void cal_search_bar_class_init (CalSearchBarClass *class); static void cal_search_bar_init (CalSearchBar *cal_search); +static void cal_search_bar_destroy (GtkObject *object); static void cal_search_bar_query_changed (ESearchBar *search); static void cal_search_bar_menu_activated (ESearchBar *search, int item); +static ESearchBarClass *parent_class = NULL; + /* Signal IDs */ enum { SEXP_CHANGED, @@ -124,6 +127,8 @@ cal_search_bar_class_init (CalSearchBarClass *class) e_search_bar_class = (ESearchBarClass *) class; object_class = (GtkObjectClass *) class; + parent_class = gtk_type_class (E_SEARCH_BAR_TYPE); + cal_search_bar_signals[SEXP_CHANGED] = gtk_signal_new ("sexp_changed", GTK_RUN_FIRST, @@ -149,6 +154,8 @@ cal_search_bar_class_init (CalSearchBarClass *class) e_search_bar_class->query_changed = cal_search_bar_query_changed; e_search_bar_class->menu_activated = cal_search_bar_menu_activated; + + object_class->destroy = cal_search_bar_destroy; } /* Object initialization function for the calendar search bar */ @@ -163,6 +170,28 @@ cal_search_bar_init (CalSearchBar *cal_search) priv->categories_omenu = NULL; } +/* Destroy handler for the calendar search bar */ +static void +cal_search_bar_destroy (GtkObject *object) +{ + CalSearchBar *cal_search; + CalSearchBarPrivate *priv; + + g_return_if_fail (object != NULL); + g_return_if_fail (IS_CAL_SEARCH_BAR (object)); + + cal_search = CAL_SEARCH_BAR (object); + priv = cal_search->priv; + + priv->categories_omenu = NULL; + + g_free (priv); + cal_search->priv = NULL; + + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); +} + /* Emits the "sexp_changed" signal for the calendar search bar */ diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c index 4e15ebeda9..27f4041d3a 100644 --- a/calendar/gui/dialogs/comp-editor-page.c +++ b/calendar/gui/dialogs/comp-editor-page.c @@ -32,6 +32,8 @@ static void comp_editor_page_class_init (CompEditorPageClass *class); static void comp_editor_page_init (CompEditorPage *page); static void comp_editor_page_destroy (GtkObject *object); +static GtkObjectClass *parent_class = NULL; + /* Signal IDs */ enum { @@ -89,6 +91,8 @@ comp_editor_page_class_init (CompEditorPageClass *class) object_class = (GtkObjectClass *) class; + parent_class = gtk_type_class (GTK_TYPE_OBJECT); + comp_editor_page_signals[CHANGED] = gtk_signal_new ("changed", GTK_RUN_FIRST, @@ -166,6 +170,9 @@ comp_editor_page_destroy (GtkObject *object) gtk_object_ref (GTK_OBJECT (page->client)); page->client = NULL; } + + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 45f49421ae..e5400cd97a 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -385,6 +385,9 @@ destroy (GtkObject *obj) gtk_object_unref (GTK_OBJECT (priv->task_client)); g_free (priv); + + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (obj); } GtkWidget * -- cgit