aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream.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/camel-stream.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/camel-stream.c')
-rw-r--r--camel/camel-stream.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/camel/camel-stream.c b/camel/camel-stream.c
index 2cdabacaba..f649494b2d 100644
--- a/camel/camel-stream.c
+++ b/camel/camel-stream.c
@@ -29,7 +29,7 @@
static CamelObjectClass *parent_class = NULL;
/* Returns the class for a CamelStream */
-#define CS_CLASS(so) CAMEL_STREAM_CLASS (GTK_OBJECT(so)->klass)
+#define CS_CLASS(so) CAMEL_STREAM_CLASS(CAMEL_OBJECT_GET_CLASS(so))
static int stream_flush (CamelStream *stream);
static int stream_close (CamelStream *stream);
@@ -39,7 +39,7 @@ static gboolean stream_eos (CamelStream *stream);
static void
camel_stream_class_init (CamelStreamClass *camel_stream_class)
{
- parent_class = gtk_type_class (camel_object_get_type ());
+ parent_class = camel_type_get_global_classfuncs( CAMEL_OBJECT_TYPE );
/* virtual method definition */
camel_stream_class->flush = stream_flush;
@@ -47,26 +47,20 @@ camel_stream_class_init (CamelStreamClass *camel_stream_class)
camel_stream_class->eos = stream_eos;
}
-GtkType
+CamelType
camel_stream_get_type (void)
{
- static GtkType camel_stream_type = 0;
-
- if (!camel_stream_type) {
- GtkTypeInfo camel_stream_info =
- {
- "CamelStream",
- sizeof (CamelStream),
- sizeof (CamelStreamClass),
- (GtkClassInitFunc) camel_stream_class_init,
- (GtkObjectInitFunc) NULL,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- camel_stream_type = gtk_type_unique (camel_object_get_type (),
- &camel_stream_info);
+ static CamelType camel_stream_type = CAMEL_INVALID_TYPE;
+
+ if (camel_stream_type == CAMEL_INVALID_TYPE) {
+ camel_stream_type = camel_type_register( CAMEL_OBJECT_TYPE,
+ "CamelStream",
+ sizeof( CamelStream ),
+ sizeof( CamelStreamClass ),
+ (CamelObjectClassInitFunc) camel_stream_class_init,
+ NULL,
+ NULL,
+ NULL );
}
return camel_stream_type;