From e99e12428d46db3be2878f6c2ca63bd7510149f4 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 22 May 2008 17:27:48 +0000 Subject: ** Fixes bug #534360 2008-05-22 Matthew Barnes ** Fixes bug #534360 Migrate from deprecated GtkObject symbols to GObject equivalents. Touches over 150 files in all components; too many to list. svn path=/trunk/; revision=35526 --- calendar/gui/e-week-view-main-item.c | 55 +++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 23 deletions(-) (limited to 'calendar/gui/e-week-view-main-item.c') diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c index 1931e7c76c..f3ebdd306b 100644 --- a/calendar/gui/e-week-view-main-item.c +++ b/calendar/gui/e-week-view-main-item.c @@ -36,9 +36,10 @@ #include "e-week-view-main-item.h" #include "ea-calendar.h" -static void e_week_view_main_item_set_arg (GtkObject *o, - GtkArg *arg, - guint arg_id); +static void e_week_view_main_item_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec); static void e_week_view_main_item_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, @@ -66,8 +67,8 @@ static double e_week_view_main_item_point (GnomeCanvasItem *item, /* The arguments we take */ enum { - ARG_0, - ARG_WEEK_VIEW + PROP_0, + PROP_WEEK_VIEW }; G_DEFINE_TYPE (EWeekViewMainItem, e_week_view_main_item, GNOME_TYPE_CANVAS_ITEM) @@ -75,22 +76,25 @@ G_DEFINE_TYPE (EWeekViewMainItem, e_week_view_main_item, GNOME_TYPE_CANVAS_ITEM) static void e_week_view_main_item_class_init (EWeekViewMainItemClass *class) { - GtkObjectClass *object_class; + GObjectClass *object_class; GnomeCanvasItemClass *item_class; - object_class = (GtkObjectClass *) class; - item_class = (GnomeCanvasItemClass *) class; + object_class = G_OBJECT_CLASS (class); + object_class->set_property = e_week_view_main_item_set_property; - gtk_object_add_arg_type ("EWeekViewMainItem::week_view", - GTK_TYPE_POINTER, GTK_ARG_WRITABLE, - ARG_WEEK_VIEW); + item_class = GNOME_CANVAS_ITEM_CLASS (class); + item_class->update = e_week_view_main_item_update; + item_class->draw = e_week_view_main_item_draw; + item_class->point = e_week_view_main_item_point; - object_class->set_arg = e_week_view_main_item_set_arg; - - /* GnomeCanvasItem method overrides */ - item_class->update = e_week_view_main_item_update; - item_class->draw = e_week_view_main_item_draw; - item_class->point = e_week_view_main_item_point; + g_object_class_install_property ( + object_class, + PROP_WEEK_VIEW, + g_param_spec_pointer ( + "week_view", + NULL, + NULL, + G_PARAM_WRITABLE)); /* init the accessibility support for e_week_view_main_item */ e_week_view_main_item_a11y_init (); @@ -105,17 +109,22 @@ e_week_view_main_item_init (EWeekViewMainItem *wvmitem) static void -e_week_view_main_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) +e_week_view_main_item_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec) { EWeekViewMainItem *wvmitem; - wvmitem = E_WEEK_VIEW_MAIN_ITEM (o); + wvmitem = E_WEEK_VIEW_MAIN_ITEM (object); - switch (arg_id){ - case ARG_WEEK_VIEW: - wvmitem->week_view = GTK_VALUE_POINTER (*arg); - break; + switch (property_id) { + case PROP_WEEK_VIEW: + wvmitem->week_view = g_value_get_pointer (value); + return; } + + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } -- cgit