[evolution/wip/gsettings] mail: Use G_DEFINE_TYPE for EmFolderTreeModel
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/gsettings] mail: Use G_DEFINE_TYPE for EmFolderTreeModel
- Date: Wed, 29 Jun 2011 17:01:48 +0000 (UTC)
commit e5cddb452f481990c84a4758962300dabdbae921
Author: Benjamin Otte <otte redhat com>
Date: Thu Jan 20 21:32:55 2011 +0100
mail: Use G_DEFINE_TYPE for EmFolderTreeModel
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 f29a5fe..c217d63 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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]