aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/mbox/camel-mbox-store.c
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-08-11 01:30:50 +0800
committerPeter Williams <peterw@src.gnome.org>2000-08-11 01:30:50 +0800
commit8cb514d6dd9497893a35a089d07a132d51263ee7 (patch)
tree9f4e5d1f929da7e0be900919753d419fe4c9c61a /camel/providers/mbox/camel-mbox-store.c
parentbcbb63c59f80eb4e684036c5ef58ab141fb01b03 (diff)
downloadgsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.gz
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.bz2
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.lz
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.xz
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.zst
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.zip
Merge with camel-async.
svn path=/trunk/; revision=4687
Diffstat (limited to 'camel/providers/mbox/camel-mbox-store.c')
-rw-r--r--camel/providers/mbox/camel-mbox-store.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/camel/providers/mbox/camel-mbox-store.c b/camel/providers/mbox/camel-mbox-store.c
index 475fbd1352..e90c90275e 100644
--- a/camel/providers/mbox/camel-mbox-store.c
+++ b/camel/providers/mbox/camel-mbox-store.c
@@ -35,9 +35,9 @@
#include "camel-url.h"
/* Returns the class for a CamelMboxStore */
-#define CMBOXS_CLASS(so) CAMEL_MBOX_STORE_CLASS (GTK_OBJECT(so)->klass)
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CMBOXF_CLASS(so) CAMEL_MBOX_FOLDER_CLASS (GTK_OBJECT(so)->klass)
+#define CMBOXS_CLASS(so) CAMEL_MBOX_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
+#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
+#define CMBOXF_CLASS(so) CAMEL_MBOX_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
static char *get_name (CamelService *service, gboolean brief);
static CamelFolder *get_folder (CamelStore *store, const char *folder_name,
@@ -75,25 +75,19 @@ camel_mbox_store_init (gpointer object, gpointer klass)
store->folders = g_hash_table_new (g_str_hash, g_str_equal);
}
-GtkType
+CamelType
camel_mbox_store_get_type (void)
{
- static GtkType camel_mbox_store_type = 0;
+ static CamelType camel_mbox_store_type = CAMEL_INVALID_TYPE;
- if (!camel_mbox_store_type) {
- GtkTypeInfo camel_mbox_store_info =
- {
- "CamelMboxStore",
- sizeof (CamelMboxStore),
- sizeof (CamelMboxStoreClass),
- (GtkClassInitFunc) camel_mbox_store_class_init,
- (GtkObjectInitFunc) camel_mbox_store_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- camel_mbox_store_type = gtk_type_unique (CAMEL_STORE_TYPE, &camel_mbox_store_info);
+ if (camel_mbox_store_type == CAMEL_INVALID_TYPE) {
+ camel_mbox_store_type = camel_type_register (CAMEL_STORE_TYPE, "CamelMboxStore",
+ sizeof (CamelMboxStore),
+ sizeof (CamelMboxStoreClass),
+ (CamelObjectClassInitFunc) camel_mbox_store_class_init,
+ NULL,
+ (CamelObjectInitFunc) camel_mbox_store_init,
+ NULL);
}
return camel_mbox_store_type;
@@ -156,7 +150,7 @@ get_folder (CamelStore *store, const char *folder_name, gboolean create,
return NULL;
}
- new_folder = gtk_type_new (CAMEL_MBOX_FOLDER_TYPE);
+ new_folder = CAMEL_FOLDER (camel_object_new (CAMEL_MBOX_FOLDER_TYPE));
CF_CLASS (new_folder)->init (new_folder, store, NULL,
folder_name, "/", TRUE, ex);