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/comp-editor.c | |
parent | f523f2d1539e6a3f54cc9f486f3f9201376d6006 (diff) | |
download | gsoc2013-evolution-8a30fde1e54aa9d213b9c4c3013ab5a0bdf69d69.tar gsoc2013-evolution-8a30fde1e54aa9d213b9c4c3013ab5a0bdf69d69.tar.gz gsoc2013-evolution-8a30fde1e54aa9d213b9c4c3013ab5a0bdf69d69.tar.bz2 gsoc2013-evolution-8a30fde1e54aa9d213b9c4c3013ab5a0bdf69d69.tar.lz gsoc2013-evolution-8a30fde1e54aa9d213b9c4c3013ab5a0bdf69d69.tar.xz 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/comp-editor.c')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 45 |
1 files changed, 12 insertions, 33 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index b2197dc5bc..46a08da33d 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -86,7 +86,7 @@ struct _CompEditorPrivate { static void comp_editor_class_init (CompEditorClass *class); static void comp_editor_init (CompEditor *editor); static gint comp_editor_key_press_event (GtkWidget *d, GdkEventKey *e); -static void comp_editor_destroy (GtkObject *object); +static void comp_editor_finalize (GObject *object); static void real_set_cal_client (CompEditor *editor, CalClient *client); static void real_edit_comp (CompEditor *editor, CalComponent *comp); @@ -148,38 +148,17 @@ static GtkObjectClass *parent_class; -GtkType -comp_editor_get_type (void) -{ - static GtkType comp_editor_type = 0; - - if (!comp_editor_type) { - static const GtkTypeInfo comp_editor_info = { - "CompEditor", - sizeof (CompEditor), - sizeof (CompEditorClass), - (GtkClassInitFunc) comp_editor_class_init, - (GtkObjectInitFunc) comp_editor_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - comp_editor_type = gtk_type_unique (BONOBO_TYPE_WINDOW, - &comp_editor_info); - } - - return comp_editor_type; -} +E_MAKE_TYPE (comp_editor, "CompEditor", CompEditor, comp_editor_class_init, comp_editor_init, + BONOBO_TYPE_WINDOW); /* Class initialization function for the calendar component editor */ static void comp_editor_class_init (CompEditorClass *klass) { - GtkObjectClass *object_class; + GObjectClass *object_class; GtkWidgetClass *widget_class; - object_class = GTK_OBJECT_CLASS (klass); + object_class = G_OBJECT_CLASS (klass); widget_class = GTK_WIDGET_CLASS (klass); parent_class = g_type_class_ref(BONOBO_TYPE_WINDOW); @@ -189,7 +168,7 @@ comp_editor_class_init (CompEditorClass *klass) klass->send_comp = real_send_comp; widget_class->key_press_event = comp_editor_key_press_event; - object_class->destroy = comp_editor_destroy; + object_class->finalize = comp_editor_finalize; } /* Creates the basic in the editor */ @@ -271,7 +250,7 @@ comp_editor_key_press_event (GtkWidget *d, GdkEventKey *e) /* Destroy handler for the calendar component editor */ static void -comp_editor_destroy (GtkObject *object) +comp_editor_finalize (GObject *object) { CompEditor *editor; CompEditorPrivate *priv; @@ -280,7 +259,7 @@ comp_editor_destroy (GtkObject *object) editor = COMP_EDITOR (object); priv = editor->priv; - gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client), editor); + g_signal_handlers_disconnect_matched (priv->client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor); /* We want to destroy the pages after the widgets get destroyed, since they have lots of signal handlers connected to the widgets @@ -296,8 +275,8 @@ comp_editor_destroy (GtkObject *object) g_free (priv); editor->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); } static gboolean @@ -708,8 +687,8 @@ comp_editor_remove_page (CompEditor *editor, CompEditorPage *page) return; /* Disconnect all the signals added in append_page(). */ - gtk_signal_disconnect_by_data (GTK_OBJECT (page), editor); - gtk_signal_disconnect_by_data (GTK_OBJECT (page_widget), page); + g_signal_handlers_disconnect_matched (page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor); + g_signal_handlers_disconnect_matched (page_widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, page); gtk_notebook_remove_page (priv->notebook, page_num); |