From 8a30fde1e54aa9d213b9c4c3013ab5a0bdf69d69 Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Thu, 19 Dec 2002 13:09:14 +0000 Subject: Replace gtk_signal_disconnect_by_data() with 2002-12-19 Hans Petter Jansson * gui/calendar-commands.c (calendar_control_deactivate): Replace gtk_signal_disconnect_by_data() with g_signal_handlers_disconnect_matched(). Former takes GtkObject, latter takes GObject. * gui/calendar-model.c (calendar_model_destroy): Ditto. (update_query): Ditto. (calendar_model_set_cal_client): Ditto. * gui/e-day-view.c (e_day_view_destroy): Ditto. (update_query): Ditto. (e_day_view_set_cal_client): Ditto. * gui/e-tasks.c (query_eval_error_cb): Ditto. (query_query_done_cb): Ditto. * gui/e-week-view.c (e_week_view_destroy): Ditto. (update_query): Ditto. (e_week_view_set_cal_client): Ditto. * gui/gnome-cal.c (update_query): Ditto. (gnome_calendar_destroy): Ditto. * gui/tasks-control.c (tasks_control_deactivate): Ditto. * gui/e-comp-editor-registry.c (foreach_close_cb): Replace gtk_signal_handler_(un)block_by_data() with g_signal_handlers_(un)block_matched(). Former takes GtkObject, latter takes GObject. * gui/dialogs/alarm-page.c (alarm_page_get_type): Replace with E_MAKE_TYPE(). (alarm_page_class_init): Use GObject as base class instead of GtkObject, and set up finalization instead of destroy handler. (alarm_page_destroy): Change to alarm_page_finalize() and assume parent is GObject, not GtkObject. (alarm_page_new): Use g_object_new(), not gtk_type_new(). * gui/dialogs/event-page.c: Same general changes as above file. (update_time): Replace gtk_signal_handler_(un)block_by_data() with g_signal_handlers_(un)block_matched(). (clear_widgets): Ditto. (times_updated): Ditto. * gui/dialogs/recurrence-page.c: Same general changes as above file. (clear_widgets): Replace gtk_signal_handler_(un)block_by_data() with g_signal_handlers_(un)block_matched(). (append_exception): Ditto. (fill_ending_date): Ditto. (recurrence_page_fill_widgets): Ditto. * gui/dialogs/comp-editor.c: Same general changes as above file. (comp_editor_finalize): Replace gtk_signal_disconnect_by_data() with g_signal_handlers_disconnect_matched(). (comp_editor_remove_page): Ditto. * gui/dialogs/event-editor.c: Same general changes as above file. * gui/dialogs/meeting-page.c: Same general changes as above file. * gui/dialogs/schedule-page.c: Same general changes as above file. * gui/dialogs/task-details-page.c: Same general changes. * gui/dialogs/task-editor.c: Same general changes as above file. * gui/dialogs/task-page.c: Same general changes as above file. * gui/dialogs/e-delegate-dialog.c: Same general changes. svn path=/trunk/; revision=19167 --- calendar/gui/dialogs/e-delegate-dialog.c | 45 +++++++++----------------------- 1 file changed, 12 insertions(+), 33 deletions(-) (limited to 'calendar/gui/dialogs/e-delegate-dialog.c') diff --git a/calendar/gui/dialogs/e-delegate-dialog.c b/calendar/gui/dialogs/e-delegate-dialog.c index 43aea1c0ba..da49772f00 100644 --- a/calendar/gui/dialogs/e-delegate-dialog.c +++ b/calendar/gui/dialogs/e-delegate-dialog.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include "Evolution-Addressbook-SelectNames.h" @@ -57,49 +58,27 @@ static const char *section_name = "Delegate To"; static void e_delegate_dialog_class_init (EDelegateDialogClass *class); static void e_delegate_dialog_init (EDelegateDialog *edd); -static void e_delegate_dialog_destroy (GtkObject *object); +static void e_delegate_dialog_finalize (GObject *object); static gboolean get_widgets (EDelegateDialog *edd); static void addressbook_clicked_cb (GtkWidget *widget, gpointer data); static GtkObjectClass *parent_class; - -GtkType -e_delegate_dialog_get_type (void) -{ - static GtkType e_delegate_dialog_type = 0; - - if (!e_delegate_dialog_type) { - static const GtkTypeInfo e_delegate_dialog_info = { - "EDelegateDialog", - sizeof (EDelegateDialog), - sizeof (EDelegateDialogClass), - (GtkClassInitFunc) e_delegate_dialog_class_init, - (GtkObjectInitFunc) e_delegate_dialog_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - e_delegate_dialog_type = gtk_type_unique (GTK_TYPE_OBJECT, - &e_delegate_dialog_info); - } - - return e_delegate_dialog_type; -} +E_MAKE_TYPE (e_delegate_dialog, "EDelegateDialog", EDelegateDialog, e_delegate_dialog_class_init, + e_delegate_dialog_init, G_TYPE_OBJECT); /* Class initialization function for the event editor */ static void e_delegate_dialog_class_init (EDelegateDialogClass *class) { - GtkObjectClass *object_class; + GObjectClass *gobject_class; - object_class = (GtkObjectClass *) class; + gobject_class = (GObjectClass *) class; - parent_class = g_type_class_ref(GTK_TYPE_OBJECT); + parent_class = g_type_class_ref (G_TYPE_OBJECT); - object_class->destroy = e_delegate_dialog_destroy; + gobject_class->finalize = e_delegate_dialog_finalize; } /* Object initialization function for the event editor */ @@ -116,7 +95,7 @@ e_delegate_dialog_init (EDelegateDialog *edd) /* Destroy handler for the event editor */ static void -e_delegate_dialog_destroy (GtkObject *object) +e_delegate_dialog_finalize (GObject *object) { EDelegateDialog *edd; EDelegateDialogPrivate *priv; @@ -138,8 +117,8 @@ e_delegate_dialog_destroy (GtkObject *object) g_free (priv); edd->priv = NULL; - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); + if (G_OBJECT_CLASS (parent_class)->finalize) + (* G_OBJECT_CLASS (parent_class)->finalize) (object); } @@ -269,7 +248,7 @@ e_delegate_dialog_new (const char *name, const char *address) { EDelegateDialog *edd; - edd = E_DELEGATE_DIALOG (gtk_type_new (E_TYPE_DELEGATE_DIALOG)); + edd = E_DELEGATE_DIALOG (g_object_new (E_TYPE_DELEGATE_DIALOG, NULL)); return e_delegate_dialog_construct (E_DELEGATE_DIALOG (edd), name, address); } -- cgit