diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-12-01 10:53:20 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-02-20 23:04:25 +0800 |
commit | 23f5773903d64a554d977ae7d0ebbaca73528f1f (patch) | |
tree | 104e1a59da8bf96b004bce204b79f47bbe0a6d13 /calendar/gui/e-alarm-list.c | |
parent | 49bc4c2d765ee1780c23fdc9f42152850dabb220 (diff) | |
download | gsoc2013-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-alarm-list.c')
-rw-r--r-- | calendar/gui/e-alarm-list.c | 50 |
1 files changed, 8 insertions, 42 deletions
diff --git a/calendar/gui/e-alarm-list.c b/calendar/gui/e-alarm-list.c index 35c3484c13..67511165cf 100644 --- a/calendar/gui/e-alarm-list.c +++ b/calendar/gui/e-alarm-list.c @@ -40,8 +40,6 @@ static GType column_types[E_ALARM_LIST_NUM_COLUMNS]; -static void e_alarm_list_init (EAlarmList *file_list); -static void e_alarm_list_class_init (EAlarmListClass *class); static void e_alarm_list_tree_model_init (GtkTreeModelIface *iface); static GtkTreeModelFlags e_alarm_list_get_flags (GtkTreeModel *tree_model); static gint e_alarm_list_get_n_columns (GtkTreeModel *tree_model); @@ -73,50 +71,18 @@ static gboolean e_alarm_list_iter_parent (GtkTreeModel *tree_model GtkTreeIter *iter, GtkTreeIter *child); -static GObjectClass *parent_class = NULL; - -GType -e_alarm_list_get_type (void) -{ - static GType alarm_list_type = 0; - - if (!alarm_list_type) { - static const GTypeInfo alarm_list_info = - { - sizeof (EAlarmListClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) e_alarm_list_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (EAlarmList), - 0, - (GInstanceInitFunc) e_alarm_list_init, - }; - - static const GInterfaceInfo tree_model_info = - { - (GInterfaceInitFunc) e_alarm_list_tree_model_init, - NULL, - NULL - }; - - column_types[E_ALARM_LIST_COLUMN_DESCRIPTION] = G_TYPE_STRING; - - alarm_list_type = g_type_register_static (G_TYPE_OBJECT, "EAlarmList", - &alarm_list_info, 0); - g_type_add_interface_static (alarm_list_type, - GTK_TYPE_TREE_MODEL, - &tree_model_info); - } - - return alarm_list_type; -} +G_DEFINE_TYPE_WITH_CODE ( + EAlarmList, + e_alarm_list, + G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE ( + GTK_TYPE_TREE_MODEL, + e_alarm_list_tree_model_init)) static void e_alarm_list_class_init (EAlarmListClass *class) { - parent_class = g_type_class_peek_parent (class); + column_types[E_ALARM_LIST_COLUMN_DESCRIPTION] = G_TYPE_STRING; } static void |