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/camel-seekable-stream.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/camel-seekable-stream.c')
-rw-r--r-- | camel/camel-seekable-stream.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/camel/camel-seekable-stream.c b/camel/camel-seekable-stream.c index 507c69dd48..c4ca950baa 100644 --- a/camel/camel-seekable-stream.c +++ b/camel/camel-seekable-stream.c @@ -29,7 +29,7 @@ static CamelStreamClass *parent_class = NULL; /* Returns the class for a CamelSeekableStream */ -#define CSS_CLASS(so) CAMEL_SEEKABLE_STREAM_CLASS (GTK_OBJECT(so)->klass) +#define CSS_CLASS(so) CAMEL_SEEKABLE_STREAM_CLASS (CAMEL_OBJECT_GET_CLASS(so)) static off_t seek (CamelSeekableStream *stream, off_t offset, CamelStreamSeekPolicy policy); @@ -43,7 +43,7 @@ camel_seekable_stream_class_init (CamelSeekableStreamClass *camel_seekable_strea CamelStreamClass *camel_stream_class = CAMEL_STREAM_CLASS (camel_seekable_stream_class); - parent_class = gtk_type_class (camel_stream_get_type ()); + parent_class = CAMEL_STREAM_CLASS( camel_type_get_global_classfuncs( CAMEL_STREAM_TYPE ) ); /* seekable stream methods */ camel_seekable_stream_class->seek = seek; @@ -63,25 +63,20 @@ camel_seekable_stream_init (void *o) stream->bound_end = CAMEL_STREAM_UNBOUND; } -GtkType +CamelType camel_seekable_stream_get_type (void) { - static GtkType camel_seekable_stream_type = 0; - - if (!camel_seekable_stream_type) { - GtkTypeInfo camel_seekable_stream_info = - { - "CamelSeekableStream", - sizeof (CamelSeekableStream), - sizeof (CamelSeekableStreamClass), - (GtkClassInitFunc) camel_seekable_stream_class_init, - (GtkObjectInitFunc) camel_seekable_stream_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - camel_seekable_stream_type = gtk_type_unique (camel_stream_get_type (), &camel_seekable_stream_info); + static CamelType camel_seekable_stream_type = CAMEL_INVALID_TYPE; + + if (camel_seekable_stream_type == CAMEL_INVALID_TYPE) { + camel_seekable_stream_type = camel_type_register( CAMEL_STREAM_TYPE, + "CamelSeekableStream", + sizeof( CamelSeekableStream ), + sizeof( CamelSeekableStreamClass ), + (CamelObjectClassInitFunc) camel_seekable_stream_class_init, + NULL, + (CamelObjectInitFunc) camel_seekable_stream_init, + NULL ); } return camel_seekable_stream_type; |