aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-event.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-12-01 10:53:20 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-02-20 23:04:25 +0800
commit23f5773903d64a554d977ae7d0ebbaca73528f1f (patch)
tree104e1a59da8bf96b004bce204b79f47bbe0a6d13 /calendar/gui/e-cal-event.c
parent49bc4c2d765ee1780c23fdc9f42152850dabb220 (diff)
downloadgsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.gz
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.bz2
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.lz
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.xz
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.zst
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'calendar/gui/e-cal-event.c')
-rw-r--r--calendar/gui/e-cal-event.c44
1 files changed, 9 insertions, 35 deletions
diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c
index 176e2923b3..9683ddefe1 100644
--- a/calendar/gui/e-cal-event.c
+++ b/calendar/gui/e-cal-event.c
@@ -26,18 +26,7 @@
#include "e-cal-event.h"
-static GObjectClass *ece_parent;
-
-static void
-ece_init (GObject *o)
-{
-}
-
-static void
-ece_finalize (GObject *o)
-{
- ((GObjectClass *) ece_parent)->finalize (o);
-}
+G_DEFINE_TYPE (ECalEvent, e_cal_event, E_TYPE_EVENT)
static void
ece_target_free (EEvent *ev,
@@ -53,36 +42,21 @@ ece_target_free (EEvent *ev,
break; }
}
- ((EEventClass *) ece_parent)->target_free (ev, t);
+ E_EVENT_CLASS (e_cal_event_parent_class)->target_free (ev, t);
}
static void
-ece_class_init (GObjectClass *klass)
+e_cal_event_class_init (ECalEventClass *class)
{
- klass->finalize = ece_finalize;
- ((EEventClass *) klass)->target_free = ece_target_free;
+ EEventClass *event_class;
+
+ event_class = E_EVENT_CLASS (class);
+ event_class->target_free = ece_target_free;
}
-GType
-e_cal_event_get_type (void)
+static void
+e_cal_event_init (ECalEvent *event)
{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ECalEventClass),
- NULL, NULL,
- (GClassInitFunc) ece_class_init,
- NULL, NULL,
- sizeof (ECalEvent), 0,
- (GInstanceInitFunc) ece_init
- };
- ece_parent = g_type_class_ref (e_event_get_type ());
- type = g_type_register_static (
- e_event_get_type (), "ECalEvent", &info, 0);
- }
-
- return type;
}
ECalEvent *