diff options
author | Peter Williams <peterw@src.gnome.org> | 2000-08-11 01:30:50 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2000-08-11 01:30:50 +0800 |
commit | 8cb514d6dd9497893a35a089d07a132d51263ee7 (patch) | |
tree | 9f4e5d1f929da7e0be900919753d419fe4c9c61a /camel/providers/vee/camel-vee-store.c | |
parent | bcbb63c59f80eb4e684036c5ef58ab141fb01b03 (diff) | |
download | gsoc2013-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/vee/camel-vee-store.c')
-rw-r--r-- | camel/providers/vee/camel-vee-store.c | 50 |
1 files changed, 14 insertions, 36 deletions
diff --git a/camel/providers/vee/camel-vee-store.c b/camel/providers/vee/camel-vee-store.c index 4b1fc3f23b..8be8298b2c 100644 --- a/camel/providers/vee/camel-vee-store.c +++ b/camel/providers/vee/camel-vee-store.c @@ -32,33 +32,22 @@ struct _CamelVeeStorePrivate { static void camel_vee_store_class_init (CamelVeeStoreClass *klass); static void camel_vee_store_init (CamelVeeStore *obj); -static void camel_vee_store_finalise (GtkObject *obj); static CamelStoreClass *camel_vee_store_parent; -enum SIGNALS { - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - -guint +CamelType camel_vee_store_get_type (void) { - static guint type = 0; + static CamelType type = CAMEL_INVALID_TYPE; - if (!type) { - GtkTypeInfo type_info = { - "CamelVeeStore", - sizeof (CamelVeeStore), - sizeof (CamelVeeStoreClass), - (GtkClassInitFunc) camel_vee_store_class_init, - (GtkObjectInitFunc) camel_vee_store_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL - }; - - type = gtk_type_unique (camel_store_get_type (), &type_info); + if (type == CAMEL_INVALID_TYPE) { + type = camel_type_register (camel_store_get_type (), "CamelVeeStore", + sizeof (CamelVeeStore), + sizeof (CamelVeeStoreClass), + (CamelObjectClassInitFunc) camel_vee_store_class_init, + NULL, + (CamelObjectInitFunc) camel_vee_store_init, + NULL); } return type; @@ -68,18 +57,13 @@ static void camel_vee_store_class_init (CamelVeeStoreClass *klass) { - GtkObjectClass *object_class = (GtkObjectClass *) klass; CamelStoreClass *store_class = (CamelStoreClass *) klass; - camel_vee_store_parent = gtk_type_class (camel_store_get_type ()); + camel_vee_store_parent = CAMEL_STORE_CLASS(camel_type_get_global_classfuncs (camel_store_get_type ())); /* virtual method overload */ store_class->get_folder = vee_get_folder; store_class->get_folder_name = vee_get_folder_name; - - object_class->finalize = camel_vee_store_finalise; - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } static void @@ -90,12 +74,6 @@ camel_vee_store_init (CamelVeeStore *obj) p = _PRIVATE(obj) = g_malloc0(sizeof(*p)); } -static void -camel_vee_store_finalise (GtkObject *obj) -{ - ((GtkObjectClass *)(camel_vee_store_parent))->finalize((GtkObject *)obj); -} - /** * camel_vee_store_new: * @@ -106,7 +84,7 @@ camel_vee_store_finalise (GtkObject *obj) CamelVeeStore * camel_vee_store_new (void) { - CamelVeeStore *new = CAMEL_VEE_STORE ( gtk_type_new (camel_vee_store_get_type ())); + CamelVeeStore *new = CAMEL_VEE_STORE ( camel_object_new (camel_vee_store_get_type ())); return new; } @@ -115,9 +93,9 @@ vee_get_folder (CamelStore *store, const char *folder_name, gboolean create, Cam { CamelFolder *folder; - folder = gtk_type_new (camel_vee_folder_get_type()); + folder = CAMEL_FOLDER (camel_object_new (camel_vee_folder_get_type())); - ((CamelFolderClass *)((GtkObject *)folder)->klass)->init (folder, store, NULL, folder_name, "/", TRUE, ex); + ((CamelFolderClass *)(CAMEL_OBJECT_GET_CLASS(folder)))->init (folder, store, NULL, folder_name, "/", TRUE, ex); return folder; } |