aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-top-item.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2008-05-23 01:27:48 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-05-23 01:27:48 +0800
commite99e12428d46db3be2878f6c2ca63bd7510149f4 (patch)
treef3e50bd91132262198bea8761f84913a232790bd /calendar/gui/e-day-view-top-item.c
parente1d0bcf694c806af75cb4d9683d1941d9721a1f9 (diff)
downloadgsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.tar
gsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.tar.gz
gsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.tar.bz2
gsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.tar.lz
gsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.tar.xz
gsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.tar.zst
gsoc2013-evolution-e99e12428d46db3be2878f6c2ca63bd7510149f4.zip
** Fixes bug #534360
2008-05-22 Matthew Barnes <mbarnes@redhat.com> ** 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
Diffstat (limited to 'calendar/gui/e-day-view-top-item.c')
-rw-r--r--calendar/gui/e-day-view-top-item.c83
1 files changed, 49 insertions, 34 deletions
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index e19ef570e6..bdfe58f734 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -37,9 +37,10 @@
#include "e-calendar-view.h"
#include "e-day-view-top-item.h"
-static void e_day_view_top_item_set_arg (GtkObject *o,
- GtkArg *arg,
- guint arg_id);
+static void e_day_view_top_item_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
static void e_day_view_top_item_update (GnomeCanvasItem *item,
double *affine,
ArtSVP *clip_path,
@@ -76,9 +77,9 @@ static gint e_day_view_top_item_event (GnomeCanvasItem *item,
/* The arguments we take */
enum {
- ARG_0,
- ARG_DAY_VIEW,
- ARG_SHOW_DATES
+ PROP_0,
+ PROP_DAY_VIEW,
+ PROP_SHOW_DATES
};
G_DEFINE_TYPE (EDayViewTopItem, e_day_view_top_item, GNOME_TYPE_CANVAS_ITEM)
@@ -86,27 +87,36 @@ G_DEFINE_TYPE (EDayViewTopItem, e_day_view_top_item, GNOME_TYPE_CANVAS_ITEM)
static void
e_day_view_top_item_class_init (EDayViewTopItemClass *class)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
GnomeCanvasItemClass *item_class;
- object_class = (GtkObjectClass *) class;
- item_class = (GnomeCanvasItemClass *) class;
-
- gtk_object_add_arg_type ("EDayViewTopItem::day_view",
- GTK_TYPE_POINTER, GTK_ARG_WRITABLE,
- ARG_DAY_VIEW);
-
- gtk_object_add_arg_type ("EDayViewTopItem::show_dates",
- GTK_TYPE_BOOL, GTK_ARG_WRITABLE,
- ARG_SHOW_DATES);
-
- object_class->set_arg = e_day_view_top_item_set_arg;
-
- /* GnomeCanvasItem method overrides */
- item_class->update = e_day_view_top_item_update;
- item_class->draw = e_day_view_top_item_draw;
- item_class->point = e_day_view_top_item_point;
- item_class->event = e_day_view_top_item_event;
+ object_class = G_OBJECT_CLASS (class);
+ object_class->set_property = e_day_view_top_item_set_property;
+
+ item_class = GNOME_CANVAS_ITEM_CLASS (class);
+ item_class->update = e_day_view_top_item_update;
+ item_class->draw = e_day_view_top_item_draw;
+ item_class->point = e_day_view_top_item_point;
+ item_class->event = e_day_view_top_item_event;
+
+ g_object_class_install_property (
+ object_class,
+ PROP_DAY_VIEW,
+ g_param_spec_pointer (
+ "day_view",
+ NULL,
+ NULL,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_SHOW_DATES,
+ g_param_spec_boolean (
+ "show_dates",
+ NULL,
+ NULL,
+ TRUE,
+ G_PARAM_WRITABLE));
}
@@ -119,20 +129,25 @@ e_day_view_top_item_init (EDayViewTopItem *dvtitem)
static void
-e_day_view_top_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
+e_day_view_top_item_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
EDayViewTopItem *dvtitem;
- dvtitem = E_DAY_VIEW_TOP_ITEM (o);
+ dvtitem = E_DAY_VIEW_TOP_ITEM (object);
- switch (arg_id){
- case ARG_DAY_VIEW:
- dvtitem->day_view = GTK_VALUE_POINTER (*arg);
- break;
- case ARG_SHOW_DATES:
- dvtitem->show_dates = GTK_VALUE_BOOL (*arg);
- break;
+ switch (property_id) {
+ case PROP_DAY_VIEW:
+ dvtitem->day_view = g_value_get_pointer (value);
+ return;
+ case PROP_SHOW_DATES:
+ dvtitem->show_dates = g_value_get_boolean (value);
+ return;
}
+
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}