From 6ff314b9cc64c6a409f61913d40e1e935439a46c Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 14 Oct 2004 15:22:32 +0000 Subject: convert to G_DEFINE_TYPE 2004-10-14 JP Rosevear * gui/e-cal-list-view-config.c: convert to G_DEFINE_TYPE * gui/e-cal-list-view.c: ditto * gui/e-cal-model-calendar.c: ditto * gui/e-cal-model-tasks.c: ditto * gui/e-cal-model.c: ditto * gui/e-calendar-table-config.c: ditto * gui/e-calendar-table.c: ditto * gui/e-calendar-view.c: ditto svn path=/trunk/; revision=27580 --- calendar/gui/e-cal-list-view-config.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'calendar/gui/e-cal-list-view-config.c') diff --git a/calendar/gui/e-cal-list-view-config.c b/calendar/gui/e-cal-list-view-config.c index 72c97455c6..51ebd58ed4 100644 --- a/calendar/gui/e-cal-list-view-config.c +++ b/calendar/gui/e-cal-list-view-config.c @@ -30,14 +30,14 @@ struct _ECalListViewConfigPrivate { GList *notifications; }; -static GObjectClass *parent_class = NULL; - /* Property IDs */ enum props { PROP_0, PROP_VIEW, }; +G_DEFINE_TYPE (ECalListViewConfig, e_cal_list_view_config, G_TYPE_OBJECT); + static void e_cal_list_view_config_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { @@ -86,8 +86,8 @@ e_cal_list_view_config_dispose (GObject *object) e_cal_list_view_config_set_view (view_config, NULL); - if (G_OBJECT_CLASS (parent_class)->dispose) - G_OBJECT_CLASS (parent_class)->dispose (object); + if (G_OBJECT_CLASS (e_cal_list_view_config_parent_class)->dispose) + G_OBJECT_CLASS (e_cal_list_view_config_parent_class)->dispose (object); } static void @@ -100,8 +100,8 @@ e_cal_list_view_config_finalize (GObject *object) g_free (priv); - if (G_OBJECT_CLASS (parent_class)->finalize) - G_OBJECT_CLASS (parent_class)->finalize (object); + if (G_OBJECT_CLASS (e_cal_list_view_config_parent_class)->finalize) + G_OBJECT_CLASS (e_cal_list_view_config_parent_class)->finalize (object); } static void @@ -110,8 +110,6 @@ e_cal_list_view_config_class_init (ECalListViewConfigClass *klass) GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GParamSpec *spec; - parent_class = g_type_class_peek_parent (klass); - /* Method override */ gobject_class->set_property = e_cal_list_view_config_set_property; gobject_class->get_property = e_cal_list_view_config_get_property; @@ -124,15 +122,12 @@ e_cal_list_view_config_class_init (ECalListViewConfigClass *klass) } static void -e_cal_list_view_config_init (ECalListViewConfig *view_config, ECalListViewConfigClass *klass) +e_cal_list_view_config_init (ECalListViewConfig *view_config) { view_config->priv = g_new0 (ECalListViewConfigPrivate, 1); } -E_MAKE_TYPE (e_cal_list_view_config, "ECalListViewConfig", ECalListViewConfig, e_cal_list_view_config_class_init, - e_cal_list_view_config_init, G_TYPE_OBJECT); - ECalListViewConfig * e_cal_list_view_config_new (ECalListView *list_view) { -- cgit v1.2.3