From 66152fe6537418489c2186a5e5c269c6e7c81db3 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 14 Oct 2004 15:02:32 +0000 Subject: convert to G_DEFINE_TYPE 2004-10-14 JP Rosevear * gui/calendar-view.c: convert to G_DEFINE_TYPE * gui/calendar-view-factory.c: ditto * gui/cal-search-bar.c: ditto * gui/e-cal-component-preview.c: ditto svn path=/trunk/; revision=27579 --- calendar/gui/e-cal-component-preview.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'calendar/gui/e-cal-component-preview.c') diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c index 91c48e1165..c85f90b526 100644 --- a/calendar/gui/e-cal-component-preview.c +++ b/calendar/gui/e-cal-component-preview.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -44,8 +43,7 @@ struct _ECalComponentPreviewPrivate { icaltimezone *zone; }; -static GtkTableClass *parent_class; - +G_DEFINE_TYPE (ECalComponentPreview, e_cal_component_preview, GTK_TYPE_TABLE); static void on_link_clicked (GtkHTML *html, const char *url, gpointer data) @@ -358,8 +356,8 @@ e_cal_component_preview_destroy (GtkObject *object) preview->priv = NULL; } - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); + if (GTK_OBJECT_CLASS (e_cal_component_preview_parent_class)->destroy) + (* GTK_OBJECT_CLASS (e_cal_component_preview_parent_class)->destroy) (object); } static void @@ -369,15 +367,9 @@ e_cal_component_preview_class_init (ECalComponentPreviewClass *klass) object_class = (GtkObjectClass *) klass; - parent_class = g_type_class_peek_parent (klass); - object_class->destroy = e_cal_component_preview_destroy; } -E_MAKE_TYPE (e_cal_component_preview, "ECalComponentPreview", ECalComponentPreview, - e_cal_component_preview_class_init, e_cal_component_preview_init, - GTK_TYPE_TABLE) - GtkWidget * e_cal_component_preview_new (void) { -- cgit v1.2.3