diff options
author | JP Rosevear <jpr@novell.com> | 2004-10-14 23:36:27 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-10-14 23:36:27 +0800 |
commit | 086338bb035c96491b792bd93f65a94d1f236916 (patch) | |
tree | bf14d53b366e260b5018646b26d3edbfdee68983 /calendar/gui/e-cell-date-edit-text.c | |
parent | d976bf57c403c11f800ad49340466146fd56a6eb (diff) | |
download | gsoc2013-evolution-086338bb035c96491b792bd93f65a94d1f236916.tar.gz gsoc2013-evolution-086338bb035c96491b792bd93f65a94d1f236916.tar.zst gsoc2013-evolution-086338bb035c96491b792bd93f65a94d1f236916.zip |
convert to G_DEFINE_TYPE
2004-10-14 JP Rosevear <jpr@novell.com>
* gui/e-cell-date-edit-config.c: convert to G_DEFINE_TYPE
* gui/e-cell-date-edit-text.c: ditto
* gui/e-comp-editor-registry.c: ditto
* gui/e-date-edit-config.c: ditto
* gui/e-mini-calendar-config.c: ditto
svn path=/trunk/; revision=27583
Diffstat (limited to 'calendar/gui/e-cell-date-edit-text.c')
-rw-r--r-- | calendar/gui/e-cell-date-edit-text.c | 22 |
1 files changed, 6 insertions, 16 deletions
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); |