aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-model.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-10-14 23:22:32 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-10-14 23:22:32 +0800
commit6ff314b9cc64c6a409f61913d40e1e935439a46c (patch)
tree423306d7f315ab72dbc34d9df87657ba6e808af5 /calendar/gui/e-cal-model.c
parent66152fe6537418489c2186a5e5c269c6e7c81db3 (diff)
downloadgsoc2013-evolution-6ff314b9cc64c6a409f61913d40e1e935439a46c.tar.gz
gsoc2013-evolution-6ff314b9cc64c6a409f61913d40e1e935439a46c.tar.zst
gsoc2013-evolution-6ff314b9cc64c6a409f61913d40e1e935439a46c.zip
convert to G_DEFINE_TYPE
2004-10-14 JP Rosevear <jpr@novell.com> * gui/e-cal-list-view-config.c: convert to G_DEFINE_TYPE * gui/e-cal-list-view.c: ditto * gui/e-cal-model-calendar.c: ditto * gui/e-cal-model-tasks.c: ditto * gui/e-cal-model.c: ditto * gui/e-calendar-table-config.c: ditto * gui/e-calendar-table.c: ditto * gui/e-calendar-view.c: ditto svn path=/trunk/; revision=27580
Diffstat (limited to 'calendar/gui/e-cal-model.c')
-rw-r--r--calendar/gui/e-cal-model.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 87f23b2f45..77f7e622ef 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -1,7 +1,6 @@
/* Evolution calendar - Data model for ETable
*
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2000 Ximian, Inc.
+ * Copyright (C) 2004 Ximian, Inc.
*
* Authors: Rodrigo Moya <rodrigo@ximian.com>
*
@@ -26,7 +25,6 @@
#include <string.h>
#include <glib/garray.h>
#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.h>
#include <e-util/e-time-utils.h>
#include <libecal/e-cal-time-util.h>
#include "comp-util.h"
@@ -76,8 +74,6 @@ struct _ECalModelPrivate {
gboolean use_24_hour_format;
};
-static void e_cal_model_class_init (ECalModelClass *klass);
-static void e_cal_model_init (ECalModel *model, ECalModelClass *klass);
static void e_cal_model_dispose (GObject *object);
static void e_cal_model_finalize (GObject *object);
@@ -109,10 +105,7 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
-static GObjectClass *parent_class = NULL;
-
-E_MAKE_TYPE (e_cal_model, "ECalModel", ECalModel, e_cal_model_class_init,
- e_cal_model_init, E_TABLE_MODEL_TYPE);
+G_DEFINE_TYPE (ECalModel, e_cal_model, E_TABLE_MODEL_TYPE);
static void
e_cal_model_class_init (ECalModelClass *klass)
@@ -120,8 +113,6 @@ e_cal_model_class_init (ECalModelClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
ETableModelClass *etm_class = E_TABLE_MODEL_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
-
object_class->dispose = e_cal_model_dispose;
object_class->finalize = e_cal_model_finalize;
@@ -160,7 +151,7 @@ e_cal_model_class_init (ECalModelClass *klass)
}
static void
-e_cal_model_init (ECalModel *model, ECalModelClass *klass)
+e_cal_model_init (ECalModel *model)
{
ECalModelPrivate *priv;
@@ -271,8 +262,8 @@ e_cal_model_dispose (GObject *object)
priv->clients = NULL;
}
- if (parent_class->dispose)
- parent_class->dispose (object);
+ if (G_OBJECT_CLASS (e_cal_model_parent_class)->dispose)
+ G_OBJECT_CLASS (e_cal_model_parent_class)->dispose (object);
}
static void
@@ -295,8 +286,8 @@ e_cal_model_finalize (GObject *object)
g_free (priv);
- if (parent_class->finalize)
- parent_class->finalize (object);
+ if (G_OBJECT_CLASS (e_cal_model_parent_class)->finalize)
+ G_OBJECT_CLASS (e_cal_model_parent_class)->finalize (object);
}
/* ETableModel methods */