diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-11-05 06:15:04 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-11-05 06:15:04 +0800 |
commit | 877e911cdf220fa6dde24df147b9e8843c42fae9 (patch) | |
tree | 6f9eb4a02513076faa00b9b2a14baf5c9d271cbb /libwombat | |
parent | 4cd8e78e09223d606ad564aa472339d683a5314f (diff) | |
download | gsoc2013-evolution-877e911cdf220fa6dde24df147b9e8843c42fae9.tar.gz gsoc2013-evolution-877e911cdf220fa6dde24df147b9e8843c42fae9.tar.zst gsoc2013-evolution-877e911cdf220fa6dde24df147b9e8843c42fae9.zip |
fixed flags for $(ORBIT_IDL).
2002-11-04 Rodrigo Moya <rodrigo@ximian.com>
* Makefile.am: fixed flags for $(ORBIT_IDL).
* wombat-client.[ch]: converted to BonoboObject.
svn path=/trunk/; revision=18537
Diffstat (limited to 'libwombat')
-rw-r--r-- | libwombat/ChangeLog | 6 | ||||
-rw-r--r-- | libwombat/Makefile.am | 2 | ||||
-rw-r--r-- | libwombat/wombat-client.c | 57 | ||||
-rw-r--r-- | libwombat/wombat-client.h | 16 |
4 files changed, 32 insertions, 49 deletions
diff --git a/libwombat/ChangeLog b/libwombat/ChangeLog index db185f310b..668f5d6375 100644 --- a/libwombat/ChangeLog +++ b/libwombat/ChangeLog @@ -1,3 +1,9 @@ +2002-11-04 Rodrigo Moya <rodrigo@ximian.com> + + * Makefile.am: fixed flags for $(ORBIT_IDL). + + * wombat-client.[ch]: converted to BonoboObject. + 2002-11-01 Rodrigo Moya <rodrigo@ximian.com> * wombat-client.h: compilation fixes for GNOME 2 porting. diff --git a/libwombat/Makefile.am b/libwombat/Makefile.am index 877fada9bc..24e2243d4b 100644 --- a/libwombat/Makefile.am +++ b/libwombat/Makefile.am @@ -12,7 +12,7 @@ IDL_GENERATED = \ $(IDLS): $(ORBIT_IDL) $(IDL_GENERATED): $(IDLS) - $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \ + $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl $(IDL_INCLUDES) \ $(top_srcdir)/wombat/Evolution-Wombat.idl # Wombat library diff --git a/libwombat/wombat-client.c b/libwombat/wombat-client.c index cd7a7d7ac9..c3a0280b60 100644 --- a/libwombat/wombat-client.c +++ b/libwombat/wombat-client.c @@ -21,7 +21,7 @@ #include "wombat-client.h" -#define PARENT_TYPE BONOBO_X_OBJECT_TYPE +#define PARENT_TYPE BONOBO_TYPE_OBJECT struct _WombatClientPrivate { WombatClientGetPasswordFn get_password; @@ -30,8 +30,10 @@ struct _WombatClientPrivate { }; static void wombat_client_class_init (WombatClientClass *klass); -static void wombat_client_init (WombatClient *client); -static void wombat_client_destroy (GtkObject *objct); +static void wombat_client_init (WombatClient *client, WombatClientClass *klass); +static void wombat_client_finalize (GObject *objct); + +static GObjectClass *parent_class = NULL; /* * CORBA interface implementation @@ -44,7 +46,7 @@ impl_GNOME_Evolution_WombatClient_getPassword (PortableServer_Servant servant, { WombatClient *client; - client = WOMBAT_CLIENT (bonobo_x_object (servant)); + client = WOMBAT_CLIENT (bonobo_object_from_servant (servant)); g_return_val_if_fail (WOMBAT_IS_CLIENT (client), NULL); g_return_val_if_fail (client->priv != NULL, NULL); @@ -61,7 +63,7 @@ impl_GNOME_Evolution_WombatClient_forgetPassword (PortableServer_Servant servant { WombatClient *client; - client = WOMBAT_CLIENT (bonobo_x_object (servant)); + client = WOMBAT_CLIENT (bonobo_object_from_servant (servant)); g_return_if_fail (WOMBAT_IS_CLIENT (client)); g_return_if_fail (client->priv != NULL); @@ -75,25 +77,26 @@ impl_GNOME_Evolution_WombatClient_forgetPassword (PortableServer_Servant servant static void wombat_client_class_init (WombatClientClass *klass) { - GtkObjectClass *object_class = GTK_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); POA_GNOME_Evolution_WombatClient__epv *epv = &klass->epv; - object_class->destroy = wombat_client_destroy; + parent_class = g_type_class_peek_parent (klass); + + object_class->finalize = wombat_client_finalize; epv->getPassword = impl_GNOME_Evolution_WombatClient_getPassword; epv->forgetPassword = impl_GNOME_Evolution_WombatClient_forgetPassword; } static void -wombat_client_init (WombatClient *client) +wombat_client_init (WombatClient *client, WombatClientClass *klass) { client->priv = g_new0 (WombatClientPrivate, 1); } static void -wombat_client_destroy (GtkObject *object) +wombat_client_finalize (GObject *object) { - GtkObjectClass *parent_class; WombatClient *client = (WombatClient *) object; g_return_if_fail (WOMBAT_IS_CLIENT (client)); @@ -104,37 +107,11 @@ wombat_client_destroy (GtkObject *object) } /* call parent class' destroy handler */ - parent_class = GTK_OBJECT_CLASS (gtk_type_class (PARENT_TYPE)); - if (parent_class->destroy != NULL) - parent_class->destroy (GTK_OBJECT(client)); + if (parent_class->finalize != NULL) + parent_class->finalize (object); } -/** - * wombat_client_get_type - */ -GtkType -wombat_client_get_type (void) -{ - static GtkType type = 0; - - if (!type) { - GtkTypeInfo info = { - "WombatClient", - sizeof (WombatClient), - sizeof (WombatClientClass), - (GtkClassInitFunc) wombat_client_class_init, - (GtkObjectInitFunc) wombat_client_init, - (GtkArgSetFunc) NULL, - (GtkArgSetFunc) NULL - }; - type = bonobo_x_type_unique( - PARENT_TYPE, - POA_GNOME_Evolution_WombatClient__init, NULL, - GTK_STRUCT_OFFSET (WombatClientClass, epv), - &info); - } - return type; -} +BONOBO_TYPE_FUNC_FULL(WombatClient, GNOME_Evolution_WombatClient, PARENT_TYPE, wombat_client) /** * wombat_client_construct @@ -165,7 +142,7 @@ wombat_client_new (WombatClientGetPasswordFn get_password_fn, { WombatClient *client; - client = WOMBAT_CLIENT (gtk_type_new (WOMBAT_TYPE_CLIENT)); + client = WOMBAT_CLIENT (g_object_new (WOMBAT_TYPE_CLIENT, NULL)); return wombat_client_construct (client, get_password_fn, forget_password_fn, diff --git a/libwombat/wombat-client.h b/libwombat/wombat-client.h index f6c54c629b..20afe4c1db 100644 --- a/libwombat/wombat-client.h +++ b/libwombat/wombat-client.h @@ -22,28 +22,28 @@ #ifndef WOMBAT_CLIENT_H #define WOMBAT_CLIENT_H -#include <bonobo/bonobo-xobject.h> +#include <bonobo/bonobo-object.h> #include "Evolution-Wombat.h" G_BEGIN_DECLS #define WOMBAT_TYPE_CLIENT (wombat_client_get_type()) -#define WOMBAT_CLIENT(obj) GTK_CHECK_CAST(obj, WOMBAT_TYPE_CLIENT, WombatClient) -#define WOMBAT_CLIENT_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, WOMBAT_TYPE_CLIENT, WombatClientClass) -#define WOMBAT_IS_CLIENT(obj) GTK_CHECK_TYPE(obj, WOMBAT_TYPE_CLIENT) -#define WOMBAT_IS_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), WOMBAT_TYPE_CLIENT)) +#define WOMBAT_CLIENT(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, WOMBAT_TYPE_CLIENT, WombatClient) +#define WOMBAT_CLIENT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST(klass, WOMBAT_TYPE_CLIENT, WombatClientClass) +#define WOMBAT_IS_CLIENT(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, WOMBAT_TYPE_CLIENT) +#define WOMBAT_IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WOMBAT_TYPE_CLIENT)) typedef struct _WombatClient WombatClient; typedef struct _WombatClientClass WombatClientClass; typedef struct _WombatClientPrivate WombatClientPrivate; struct _WombatClient { - BonoboXObject object; + BonoboObject object; WombatClientPrivate *priv; }; struct _WombatClientClass { - BonoboXObjectClass parent_class; + BonoboObjectClass parent_class; POA_GNOME_Evolution_WombatClient__epv epv; }; @@ -56,7 +56,7 @@ typedef void (* WombatClientForgetPasswordFn) (WombatClient *client, const gchar *key, gpointer user_data); -GtkType wombat_client_get_type (void); +GType wombat_client_get_type (void); WombatClient *wombat_client_construct (WombatClient *client, WombatClientGetPasswordFn get_password_fn, |