From 05b60f793cc6d7dff47b5980487f7ee1248d8f08 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 14 Oct 2004 14:44:41 +0000 Subject: convert to G_DEFINE_TYPE 2004-10-14 JP Rosevear * gui/e-day-view.c: convert to G_DEFINE_TYPE * gui/e-day-view-config.c: ditto * gui/e-day-view-main-item.c: ditto * gui/e-day-view-time-item.c: ditto * gui/e-day-view-top-item.c: ditto svn path=/trunk/; revision=27577 --- calendar/gui/e-day-view-top-item.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'calendar/gui/e-day-view-top-item.c') diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index c15278a3c8..c84ed2859c 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -25,17 +25,16 @@ * EDayViewTopItem - displays the top part of the Day/Work Week calendar view. */ +#ifdef HAVE_CONFIG_H #include +#endif + #include #include -#include #include "e-util/e-categories-config.h" #include #include "e-day-view-top-item.h" -static void e_day_view_top_item_class_init (EDayViewTopItemClass *class); -static void e_day_view_top_item_init (EDayViewTopItem *dvtitem); - static void e_day_view_top_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); @@ -73,16 +72,13 @@ static gint e_day_view_top_item_event (GnomeCanvasItem *item, GdkEvent *event); -static GnomeCanvasItemClass *parent_class; - /* The arguments we take */ enum { ARG_0, ARG_DAY_VIEW }; -E_MAKE_TYPE (e_day_view_top_item, "EDayViewTopItem", EDayViewTopItem, e_day_view_top_item_class_init, - e_day_view_top_item_init, GNOME_TYPE_CANVAS_ITEM); +G_DEFINE_TYPE (EDayViewTopItem, e_day_view_top_item, GNOME_TYPE_CANVAS_ITEM); static void e_day_view_top_item_class_init (EDayViewTopItemClass *class) @@ -90,8 +86,6 @@ e_day_view_top_item_class_init (EDayViewTopItemClass *class) GtkObjectClass *object_class; GnomeCanvasItemClass *item_class; - parent_class = g_type_class_peek_parent (class); - object_class = (GtkObjectClass *) class; item_class = (GnomeCanvasItemClass *) class; @@ -139,8 +133,8 @@ e_day_view_top_item_update (GnomeCanvasItem *item, ArtSVP *clip_path, int flags) { - if (GNOME_CANVAS_ITEM_CLASS (parent_class)->update) - (* GNOME_CANVAS_ITEM_CLASS (parent_class)->update) (item, affine, clip_path, flags); + if (GNOME_CANVAS_ITEM_CLASS (e_day_view_top_item_parent_class)->update) + (* GNOME_CANVAS_ITEM_CLASS (e_day_view_top_item_parent_class)->update) (item, affine, clip_path, flags); /* The item covers the entire canvas area. */ item->x1 = 0; -- cgit