From 8cb514d6dd9497893a35a089d07a132d51263ee7 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Thu, 10 Aug 2000 17:30:50 +0000 Subject: Merge with camel-async. svn path=/trunk/; revision=4687 --- camel/camel-transport.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'camel/camel-transport.c') diff --git a/camel/camel-transport.c b/camel/camel-transport.c index 849248a6e7..ff07728f5f 100644 --- a/camel/camel-transport.c +++ b/camel/camel-transport.c @@ -28,27 +28,21 @@ #include "camel-exception.h" /* Returns the class for a CamelTransport */ -#define CT_CLASS(so) CAMEL_TRANSPORT_CLASS (GTK_OBJECT(so)->klass) +#define CT_CLASS(so) CAMEL_TRANSPORT_CLASS (CAMEL_OBJECT_GET_CLASS(so)) -GtkType +CamelType camel_transport_get_type (void) { - static GtkType camel_transport_type = 0; + static CamelType camel_transport_type = CAMEL_INVALID_TYPE; - if (!camel_transport_type) { - GtkTypeInfo camel_transport_info = - { - "CamelTransport", - sizeof (CamelTransport), - sizeof (CamelTransportClass), - (GtkClassInitFunc) NULL, - (GtkObjectInitFunc) NULL, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - camel_transport_type = gtk_type_unique (CAMEL_SERVICE_TYPE, &camel_transport_info); + if (camel_transport_type == CAMEL_INVALID_TYPE) { + camel_transport_type = camel_type_register (CAMEL_SERVICE_TYPE, "CamelTransport", + sizeof (CamelTransport), + sizeof (CamelTransportClass), + NULL, + NULL, + NULL, + NULL); } return camel_transport_type; -- cgit v1.2.3