diff options
author | Benjamin Otte <otte@redhat.com> | 2011-01-21 04:32:55 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-01-23 00:14:49 +0800 |
commit | f17bd11443f53b61a627aa867e961a056f22a00d (patch) | |
tree | 9869986105f2f38cbe6b28e48d77782842e82274 /mail | |
parent | 54a449adacdb24ffad2e64fe1962161e4ecb24a9 (diff) | |
download | gsoc2013-evolution-f17bd11443f53b61a627aa867e961a056f22a00d.tar.gz gsoc2013-evolution-f17bd11443f53b61a627aa867e961a056f22a00d.tar.zst gsoc2013-evolution-f17bd11443f53b61a627aa867e961a056f22a00d.zip |
mail: Use G_DEFINE_TYPE for EmFolderTreeModel
Diffstat (limited to 'mail')
-rw-r--r-- | mail/em-folder-tree-model.c | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index f29a5fe5d4..c217d63ebb 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -97,6 +97,8 @@ extern CamelStore *vfolder_store; static gpointer parent_class; static guint signals[LAST_SIGNAL]; +G_DEFINE_TYPE (EMFolderTreeModel, em_folder_tree_model, GTK_TYPE_TREE_STORE) + static void store_info_free (EMFolderTreeModelStoreInfo *si) { @@ -378,7 +380,7 @@ folder_tree_model_finalize (GObject *object) } static void -folder_tree_model_class_init (EMFolderTreeModelClass *class) +em_folder_tree_model_class_init (EMFolderTreeModelClass *class) { GObjectClass *object_class; @@ -501,7 +503,7 @@ folder_tree_model_set_unread_count (EMFolderTreeModel *model, } static void -folder_tree_model_init (EMFolderTreeModel *model) +em_folder_tree_model_init (EMFolderTreeModel *model) { GHashTable *store_index; GHashTable *uri_index; @@ -559,33 +561,6 @@ folder_tree_model_init (EMFolderTreeModel *model) G_CALLBACK (account_added_cb), model); } -GType -em_folder_tree_model_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - static const GTypeInfo type_info = { - sizeof (EMFolderTreeModelClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) folder_tree_model_class_init, - (GClassFinalizeFunc) NULL, - NULL, /* class_data */ - sizeof (EMFolderTreeModel), - 0, /* n_preallocs */ - (GInstanceInitFunc) folder_tree_model_init, - NULL /* value_table */ - }; - - type = g_type_register_static ( - GTK_TYPE_TREE_STORE, "EMFolderTreeModel", - &type_info, 0); - } - - return type; -} - EMFolderTreeModel * em_folder_tree_model_new (void) { |