aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-internet-address.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-internet-address.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-internet-address.c')
-rw-r--r--camel/camel-internet-address.c53
1 files changed, 20 insertions, 33 deletions
diff --git a/camel/camel-internet-address.c b/camel/camel-internet-address.c
index 9abbc8c632..0e68f718c2 100644
--- a/camel/camel-internet-address.c
+++ b/camel/camel-internet-address.c
@@ -35,47 +35,16 @@ struct _address {
char *address;
};
-enum SIGNALS {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_internet_address_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "CamelInternetAddress",
- sizeof (CamelInternetAddress),
- sizeof (CamelInternetAddressClass),
- (GtkClassInitFunc) camel_internet_address_class_init,
- (GtkObjectInitFunc) camel_internet_address_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (camel_address_get_type (), &type_info);
- }
-
- return type;
-}
-
static void
camel_internet_address_class_init (CamelInternetAddressClass *klass)
{
- GtkObjectClass *object_class = (GtkObjectClass *) klass;
CamelAddressClass *address = (CamelAddressClass *) klass;
- camel_internet_address_parent = gtk_type_class (camel_address_get_type ());
+ camel_internet_address_parent = CAMEL_ADDRESS_CLASS (camel_type_get_global_classfuncs (camel_address_get_type ()));
address->decode = internet_decode;
address->encode = internet_encode;
address->remove = internet_remove;
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
}
static void
@@ -83,6 +52,24 @@ camel_internet_address_init (CamelInternetAddress *obj)
{
}
+CamelType
+camel_internet_address_get_type (void)
+{
+ static CamelType type = CAMEL_INVALID_TYPE;
+
+ if (type == CAMEL_INVALID_TYPE) {
+ type = camel_type_register (camel_address_get_type (), "CamelInternetAddress",
+ sizeof (CamelInternetAddress),
+ sizeof (CamelInternetAddressClass),
+ (CamelObjectClassInitFunc) camel_internet_address_class_init,
+ NULL,
+ (CamelObjectInitFunc) camel_internet_address_init,
+ NULL);
+ }
+
+ return type;
+}
+
static int
internet_decode (CamelAddress *a, const char *raw)
{
@@ -164,7 +151,7 @@ static void internet_remove (CamelAddress *a, int index)
CamelInternetAddress *
camel_internet_address_new (void)
{
- CamelInternetAddress *new = CAMEL_INTERNET_ADDRESS ( gtk_type_new (camel_internet_address_get_type ()));
+ CamelInternetAddress *new = CAMEL_INTERNET_ADDRESS ( camel_object_new (camel_internet_address_get_type ()));
return new;
}