diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2002-12-19 21:09:14 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2002-12-19 21:09:14 +0800 |
commit | 8a30fde1e54aa9d213b9c4c3013ab5a0bdf69d69 (patch) | |
tree | a2a1574a3622a44a4f35d1068b59aedc3e1ffa24 /calendar/gui/dialogs/alarm-page.c | |
parent | f523f2d1539e6a3f54cc9f486f3f9201376d6006 (diff) | |
download | gsoc2013-evolution-8a30fde1e54aa9d213b9c4c3013ab5a0bdf69d69.tar.gz gsoc2013-evolution-8a30fde1e54aa9d213b9c4c3013ab5a0bdf69d69.tar.zst gsoc2013-evolution-8a30fde1e54aa9d213b9c4c3013ab5a0bdf69d69.zip |
Replace gtk_signal_disconnect_by_data() with
2002-12-19 Hans Petter Jansson <hpj@ximian.com>
* 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
Diffstat (limited to 'calendar/gui/dialogs/alarm-page.c')
-rw-r--r-- | calendar/gui/dialogs/alarm-page.c | 44 |
1 files changed, 12 insertions, 32 deletions
diff --git a/calendar/gui/dialogs/alarm-page.c b/calendar/gui/dialogs/alarm-page.c index 64e79d8f9d..1af357e7c3 100644 --- a/calendar/gui/dialogs/alarm-page.c +++ b/calendar/gui/dialogs/alarm-page.c @@ -115,7 +115,7 @@ static const int time_map[] = { static void alarm_page_class_init (AlarmPageClass *class); static void alarm_page_init (AlarmPage *apage); -static void alarm_page_destroy (GtkObject *object); +static void alarm_page_finalize (GObject *object); static GtkWidget *alarm_page_get_widget (CompEditorPage *page); static void alarm_page_focus_main_widget (CompEditorPage *page); @@ -136,41 +136,21 @@ static CompEditorPageClass *parent_class = NULL; * * Return value: The type ID of the #AlarmPage class. **/ -GtkType -alarm_page_get_type (void) -{ - static GtkType alarm_page_type; - - if (!alarm_page_type) { - static const GtkTypeInfo alarm_page_info = { - "AlarmPage", - sizeof (AlarmPage), - sizeof (AlarmPageClass), - (GtkClassInitFunc) alarm_page_class_init, - (GtkObjectInitFunc) alarm_page_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - alarm_page_type = gtk_type_unique (TYPE_COMP_EDITOR_PAGE, - &alarm_page_info); - } - return alarm_page_type; -} +E_MAKE_TYPE (alarm_page, "AlarmPage", AlarmPage, alarm_page_class_init, + alarm_page_init, TYPE_COMP_EDITOR_PAGE); /* Class initialization function for the alarm page */ static void alarm_page_class_init (AlarmPageClass *class) { CompEditorPageClass *editor_page_class; - GtkObjectClass *object_class; + GObjectClass *gobject_class; editor_page_class = (CompEditorPageClass *) class; - object_class = (GtkObjectClass *) class; + gobject_class = (GObjectClass *) class; - parent_class = g_type_class_ref(TYPE_COMP_EDITOR_PAGE); + parent_class = g_type_class_ref (TYPE_COMP_EDITOR_PAGE); editor_page_class->get_widget = alarm_page_get_widget; editor_page_class->focus_main_widget = alarm_page_focus_main_widget; @@ -179,7 +159,7 @@ alarm_page_class_init (AlarmPageClass *class) editor_page_class->set_summary = alarm_page_set_summary; editor_page_class->set_dates = alarm_page_set_dates; - object_class->destroy = alarm_page_destroy; + gobject_class->finalize = alarm_page_finalize; } /* Object initialization function for the alarm page */ @@ -223,7 +203,7 @@ alarm_page_init (AlarmPage *apage) /* Destroy handler for the alarm page */ static void -alarm_page_destroy (GtkObject *object) +alarm_page_finalize (GObject *object) { AlarmPage *apage; AlarmPagePrivate *priv; @@ -247,8 +227,8 @@ alarm_page_destroy (GtkObject *object) g_free (priv); apage->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); } @@ -891,9 +871,9 @@ alarm_page_new (void) { AlarmPage *apage; - apage = gtk_type_new (TYPE_ALARM_PAGE); + apage = g_object_new (TYPE_ALARM_PAGE, NULL); if (!alarm_page_construct (apage)) { - g_object_unref((apage)); + g_object_unref ((apage)); return NULL; } |