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/task-editor.c | 40 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 30 deletions(-) (limited to 'calendar/gui/dialogs/task-editor.c') diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 62c7a07e4a..6f6e402883 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -52,7 +52,7 @@ static void task_editor_class_init (TaskEditorClass *class); static void task_editor_init (TaskEditor *te); static void task_editor_edit_comp (CompEditor *editor, CalComponent *comp); static gboolean task_editor_send_comp (CompEditor *editor, CalComponentItipMethod method); -static void task_editor_destroy (GtkObject *object); +static void task_editor_finalize (GObject *object); static void assign_task_cmd (GtkWidget *widget, gpointer data); static void refresh_task_cmd (GtkWidget *widget, gpointer data); @@ -83,38 +83,18 @@ static CompEditorClass *parent_class; * * Return value: The type ID of the #TaskEditor class. **/ -GtkType -task_editor_get_type (void) -{ - static GtkType task_editor_type = 0; - - if (!task_editor_type) { - static const GtkTypeInfo task_editor_info = { - "TaskEditor", - sizeof (TaskEditor), - sizeof (TaskEditorClass), - (GtkClassInitFunc) task_editor_class_init, - (GtkObjectInitFunc) task_editor_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - task_editor_type = gtk_type_unique (TYPE_COMP_EDITOR, - &task_editor_info); - } - return task_editor_type; -} +E_MAKE_TYPE (task_editor, "TaskEditor", TaskEditor, task_editor_class_init, task_editor_init, + TYPE_COMP_EDITOR); /* Class initialization function for the event editor */ static void task_editor_class_init (TaskEditorClass *klass) { - GtkObjectClass *object_class; + GObjectClass *object_class; CompEditorClass *editor_class; - object_class = (GtkObjectClass *) klass; + object_class = (GObjectClass *) klass; editor_class = (CompEditorClass *) klass; parent_class = g_type_class_ref(TYPE_COMP_EDITOR); @@ -122,7 +102,7 @@ task_editor_class_init (TaskEditorClass *klass) editor_class->edit_comp = task_editor_edit_comp; editor_class->send_comp = task_editor_send_comp; - object_class->destroy = task_editor_destroy; + object_class->finalize = task_editor_finalize; } static void @@ -334,7 +314,7 @@ task_editor_send_comp (CompEditor *editor, CalComponentItipMethod method) /* Destroy handler for the event editor */ static void -task_editor_destroy (GtkObject *object) +task_editor_finalize (GObject *object) { TaskEditor *te; TaskEditorPrivate *priv; @@ -351,8 +331,8 @@ task_editor_destroy (GtkObject *object) g_object_unref((priv->model)); - 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); } /** @@ -369,7 +349,7 @@ task_editor_new (CalClient *client) { TaskEditor *te; - te = TASK_EDITOR (gtk_type_new (TYPE_TASK_EDITOR)); + te = g_object_new (TYPE_TASK_EDITOR, NULL); return task_editor_construct (te, client); } -- cgit v1.2.3