aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-cell-date-edit-config.c19
-rw-r--r--calendar/gui/e-cell-date-edit-text.c22
-rw-r--r--calendar/gui/e-comp-editor-registry.c28
-rw-r--r--calendar/gui/e-date-edit-config.c19
-rw-r--r--calendar/gui/e-mini-calendar-config.c19
5 files changed, 37 insertions, 70 deletions
diff --git a/calendar/gui/e-cell-date-edit-config.c b/calendar/gui/e-cell-date-edit-config.c
index a8c607a43c..0af909eb76 100644
--- a/calendar/gui/e-cell-date-edit-config.c
+++ b/calendar/gui/e-cell-date-edit-config.c
@@ -32,14 +32,14 @@ struct _ECellDateEditConfigPrivate {
GList *notifications;
};
-static GObjectClass *parent_class = NULL;
-
/* Property IDs */
enum props {
PROP_0,
PROP_CELL,
};
+G_DEFINE_TYPE (ECellDateEditConfig, e_cell_date_edit_config, G_TYPE_OBJECT);
+
static void
e_cell_date_edit_config_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
@@ -88,8 +88,8 @@ e_cell_date_edit_config_dispose (GObject *object)
e_cell_date_edit_config_set_cell (view_config, NULL);
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (e_cell_date_edit_config_parent_class)->dispose)
+ G_OBJECT_CLASS (e_cell_date_edit_config_parent_class)->dispose (object);
}
static void
@@ -102,8 +102,8 @@ e_cell_date_edit_config_finalize (GObject *object)
g_free (priv);
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ if (G_OBJECT_CLASS (e_cell_date_edit_config_parent_class)->finalize)
+ G_OBJECT_CLASS (e_cell_date_edit_config_parent_class)->finalize (object);
}
static void
@@ -112,8 +112,6 @@ e_cell_date_edit_config_class_init (ECellDateEditConfigClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *spec;
- parent_class = g_type_class_peek_parent (klass);
-
/* Method override */
gobject_class->set_property = e_cell_date_edit_config_set_property;
gobject_class->get_property = e_cell_date_edit_config_get_property;
@@ -126,15 +124,12 @@ e_cell_date_edit_config_class_init (ECellDateEditConfigClass *klass)
}
static void
-e_cell_date_edit_config_init (ECellDateEditConfig *view_config, ECellDateEditConfigClass *klass)
+e_cell_date_edit_config_init (ECellDateEditConfig *view_config)
{
view_config->priv = g_new0 (ECellDateEditConfigPrivate, 1);
}
-E_MAKE_TYPE (e_cell_date_edit_config, "ECellDateEditConfig", ECellDateEditConfig, e_cell_date_edit_config_class_init,
- e_cell_date_edit_config_init, G_TYPE_OBJECT);
-
ECellDateEditConfig *
e_cell_date_edit_config_new (ECellDateEdit *cell)
{
diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c
index d487a78ae4..635aaf0032 100644
--- a/calendar/gui/e-cell-date-edit-text.c
+++ b/calendar/gui/e-cell-date-edit-text.c
@@ -26,7 +26,9 @@
* representation of the date, from a ECalComponentDateTime* model value.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
#include <sys/time.h>
#include <time.h>
@@ -41,11 +43,7 @@
#include "e-cell-date-edit-text.h"
-
-#define PARENT_TYPE e_cell_text_get_type ()
-
-static ECellTextClass *parent_class;
-
+G_DEFINE_TYPE (ECellDateEditText, e_cell_date_edit_text, E_CELL_TEXT_TYPE);
void
e_cell_date_edit_text_set_timezone (ECellDateEditText *ecd,
@@ -186,11 +184,9 @@ ecd_set_value (ECellText *cell, ETableModel *model, int col, int row,
static void
-e_cell_date_edit_text_class_init (GtkObjectClass *object_class)
+e_cell_date_edit_text_class_init (ECellDateEditTextClass *ecdet)
{
- ECellTextClass *ectc = (ECellTextClass *) object_class;
-
- parent_class = gtk_type_class (PARENT_TYPE);
+ ECellTextClass *ectc = E_CELL_TEXT_CLASS (ecdet);
ectc->get_text = ecd_get_text;
ectc->free_text = ecd_free_text;
@@ -199,10 +195,8 @@ e_cell_date_edit_text_class_init (GtkObjectClass *object_class)
static void
-e_cell_date_edit_text_init (GtkObject *object)
+e_cell_date_edit_text_init (ECellDateEditText *ecd)
{
- ECellDateEditText *ecd = E_CELL_DATE_EDIT_TEXT (object);
-
ecd->zone = icaltimezone_get_utc_timezone ();
ecd->use_24_hour_format = TRUE;
}
@@ -228,7 +222,3 @@ e_cell_date_edit_text_new (const char *fontname,
return (ECell *) ecd;
}
-
-E_MAKE_TYPE (e_cell_date_edit_text, "ECellDateEditText", ECellDateEditText,
- e_cell_date_edit_text_class_init, e_cell_date_edit_text_init,
- PARENT_TYPE);
diff --git a/calendar/gui/e-comp-editor-registry.c b/calendar/gui/e-comp-editor-registry.c
index c576ea7465..1f679097bd 100644
--- a/calendar/gui/e-comp-editor-registry.c
+++ b/calendar/gui/e-comp-editor-registry.c
@@ -25,7 +25,6 @@
#endif
#include <gnome.h>
-#include <gal/util/e-util.h>
#include "e-comp-editor-registry.h"
struct _ECompEditorRegistryPrivate {
@@ -42,10 +41,10 @@ struct _ECompEditorRegistryData
typedef struct _ECompEditorRegistryData ECompEditorRegistryData;
typedef struct _ECompEditorRegistryForeachData ECompEditorRegistryForeachData;
-static GObjectClass *parent_class = NULL;
-
static void editor_destroy_cb (gpointer data, GObject *where_object_was);
+G_DEFINE_TYPE (ECompEditorRegistry, e_comp_editor_registry, G_TYPE_OBJECT);
+
static void
registry_data_free (gpointer data)
{
@@ -58,7 +57,7 @@ registry_data_free (gpointer data)
}
static void
-dispose (GObject *obj)
+e_comp_editor_registry_dispose (GObject *obj)
{
ECompEditorRegistry *reg;
ECompEditorRegistryPrivate *priv;
@@ -71,11 +70,11 @@ dispose (GObject *obj)
priv->editors = NULL;
}
- (* G_OBJECT_CLASS (parent_class)->dispose) (obj);
+ (* G_OBJECT_CLASS (e_comp_editor_registry_parent_class)->dispose) (obj);
}
static void
-finalize (GObject *obj)
+e_comp_editor_registry_finalize (GObject *obj)
{
ECompEditorRegistry *reg;
ECompEditorRegistryPrivate *priv;
@@ -85,24 +84,22 @@ finalize (GObject *obj)
g_free (priv);
- (* G_OBJECT_CLASS (parent_class)->finalize) (obj);
+ (* G_OBJECT_CLASS (e_comp_editor_registry_parent_class)->finalize) (obj);
}
static void
-class_init (ECompEditorRegistryClass *klass)
+e_comp_editor_registry_class_init (ECompEditorRegistryClass *klass)
{
GObjectClass *object_class;
object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->dispose = dispose;
- object_class->finalize = finalize;
+ object_class->dispose = e_comp_editor_registry_dispose;
+ object_class->finalize = e_comp_editor_registry_finalize;
}
static void
-init (ECompEditorRegistry *reg)
+e_comp_editor_registry_init (ECompEditorRegistry *reg)
{
ECompEditorRegistryPrivate *priv;
@@ -112,11 +109,6 @@ init (ECompEditorRegistry *reg)
priv->editors = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, registry_data_free);
}
-
-
-E_MAKE_TYPE (e_comp_editor_registry, "ECompEditorRegistry", ECompEditorRegistry,
- class_init, init, G_TYPE_OBJECT);
-
GObject *
e_comp_editor_registry_new (void)
{
diff --git a/calendar/gui/e-date-edit-config.c b/calendar/gui/e-date-edit-config.c
index f3d88fdd53..acc61bda61 100644
--- a/calendar/gui/e-date-edit-config.c
+++ b/calendar/gui/e-date-edit-config.c
@@ -29,14 +29,14 @@ struct _EDateEditConfigPrivate {
GList *notifications;
};
-static GObjectClass *parent_class = NULL;
-
/* Property IDs */
enum props {
PROP_0,
PROP_EDIT,
};
+G_DEFINE_TYPE (EDateEditConfig, e_date_edit_config, G_TYPE_OBJECT);
+
static void
e_date_edit_config_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
@@ -85,8 +85,8 @@ e_date_edit_config_dispose (GObject *object)
e_date_edit_config_set_edit (edit_config, NULL);
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (e_date_edit_config_parent_class)->dispose)
+ G_OBJECT_CLASS (e_date_edit_config_parent_class)->dispose (object);
}
static void
@@ -99,8 +99,8 @@ e_date_edit_config_finalize (GObject *object)
g_free (priv);
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ if (G_OBJECT_CLASS (e_date_edit_config_parent_class)->finalize)
+ G_OBJECT_CLASS (e_date_edit_config_parent_class)->finalize (object);
}
static void
@@ -109,8 +109,6 @@ e_date_edit_config_class_init (EDateEditConfigClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *spec;
- parent_class = g_type_class_peek_parent (klass);
-
/* Method override */
gobject_class->set_property = e_date_edit_config_set_property;
gobject_class->get_property = e_date_edit_config_get_property;
@@ -123,15 +121,12 @@ e_date_edit_config_class_init (EDateEditConfigClass *klass)
}
static void
-e_date_edit_config_init (EDateEditConfig *edit_config, EDateEditConfigClass *klass)
+e_date_edit_config_init (EDateEditConfig *edit_config)
{
edit_config->priv = g_new0 (EDateEditConfigPrivate, 1);
}
-E_MAKE_TYPE (e_date_edit_config, "EDateEditConfig", EDateEditConfig, e_date_edit_config_class_init,
- e_date_edit_config_init, G_TYPE_OBJECT);
-
EDateEditConfig *
e_date_edit_config_new (EDateEdit *date_edit)
{
diff --git a/calendar/gui/e-mini-calendar-config.c b/calendar/gui/e-mini-calendar-config.c
index 2f17b23beb..120f3dba84 100644
--- a/calendar/gui/e-mini-calendar-config.c
+++ b/calendar/gui/e-mini-calendar-config.c
@@ -29,14 +29,14 @@ struct _EMiniCalendarConfigPrivate {
GList *notifications;
};
-static GObjectClass *parent_class = NULL;
-
/* Property IDs */
enum props {
PROP_0,
PROP_CALENDAR
};
+G_DEFINE_TYPE (EMiniCalendarConfig, e_mini_calendar_config, G_TYPE_OBJECT);
+
static void
e_mini_calendar_config_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
@@ -85,8 +85,8 @@ e_mini_calendar_config_dispose (GObject *object)
e_mini_calendar_config_set_calendar (mini_config, NULL);
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (e_mini_calendar_config_parent_class)->dispose)
+ G_OBJECT_CLASS (e_mini_calendar_config_parent_class)->dispose (object);
}
static void
@@ -99,8 +99,8 @@ e_mini_calendar_config_finalize (GObject *object)
g_free (priv);
- if (G_OBJECT_CLASS (parent_class)->finalize)
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ if (G_OBJECT_CLASS (e_mini_calendar_config_parent_class)->finalize)
+ G_OBJECT_CLASS (e_mini_calendar_config_parent_class)->finalize (object);
}
static void
@@ -109,8 +109,6 @@ e_mini_calendar_config_class_init (EMiniCalendarConfigClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *spec;
- parent_class = g_type_class_peek_parent (klass);
-
/* Method override */
gobject_class->set_property = e_mini_calendar_config_set_property;
gobject_class->get_property = e_mini_calendar_config_get_property;
@@ -123,15 +121,12 @@ e_mini_calendar_config_class_init (EMiniCalendarConfigClass *klass)
}
static void
-e_mini_calendar_config_init (EMiniCalendarConfig *mini_config, EMiniCalendarConfigClass *klass)
+e_mini_calendar_config_init (EMiniCalendarConfig *mini_config)
{
mini_config->priv = g_new0 (EMiniCalendarConfigPrivate, 1);
}
-E_MAKE_TYPE (e_mini_calendar_config, "EMiniCalendarConfig", EMiniCalendarConfig, e_mini_calendar_config_class_init,
- e_mini_calendar_config_init, G_TYPE_OBJECT);
-
EMiniCalendarConfig *
e_mini_calendar_config_new (ECalendar *mini_cal)
{