aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/pcs/cal.c')
-rw-r--r--calendar/pcs/cal.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c
index 861cc47c89..20ec86eb28 100644
--- a/calendar/pcs/cal.c
+++ b/calendar/pcs/cal.c
@@ -28,9 +28,9 @@
#include "query.h"
#include "Evolution-Wombat.h"
-#define PARENT_TYPE BONOBO_X_OBJECT_TYPE
+#define PARENT_TYPE BONOBO_TYPE_OBJECT
-static BonoboXObjectClass *parent_class;
+static BonoboObjectClass *parent_class;
/* Private part of the Cal structure */
struct _CalPrivate {
@@ -553,6 +553,7 @@ impl_Cal_get_query (PortableServer_Servant servant,
CORBA_exception_init (&ev2);
query_copy = CORBA_Object_duplicate (BONOBO_OBJREF (query), &ev2);
if (BONOBO_EX (&ev2)) {
+ bonobo_object_unref (query);
CORBA_exception_free (&ev2);
g_message ("Cal_get_query(): Could not duplicate the query reference");
bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_CouldNotCreate);
@@ -687,7 +688,7 @@ cal_new (CalBackend *backend, GNOME_Evolution_Calendar_Listener listener)
g_return_val_if_fail (backend != NULL, NULL);
g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL);
- cal = CAL (gtk_type_new (CAL_TYPE));
+ cal = CAL (g_object_new (CAL_TYPE, NULL));
retval = cal_construct (cal, backend, listener);
if (!retval) {
@@ -701,7 +702,7 @@ cal_new (CalBackend *backend, GNOME_Evolution_Calendar_Listener listener)
/* Destroy handler for the calendar */
static void
-cal_destroy (GtkObject *object)
+cal_finalize (GObject *object)
{
Cal *cal;
CalPrivate *priv;
@@ -725,8 +726,8 @@ cal_destroy (GtkObject *object)
g_free (priv);
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ (* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
@@ -735,13 +736,13 @@ cal_destroy (GtkObject *object)
static void
cal_class_init (CalClass *klass)
{
- GtkObjectClass *object_class = (GtkObjectClass *) klass;
+ GObjectClass *object_class = (GObjectClass *) klass;
POA_GNOME_Evolution_Calendar_Cal__epv *epv = &klass->epv;
- parent_class = gtk_type_class (PARENT_TYPE);
+ parent_class = g_type_class_peek_parent (klass);
/* Class method overrides */
- object_class->destroy = cal_destroy;
+ object_class->finalize = cal_finalize;
/* Epv methods */
epv->_get_uri = impl_Cal_get_uri;
@@ -767,7 +768,7 @@ cal_class_init (CalClass *klass)
/* Object initialization function for the calendar */
static void
-cal_init (Cal *cal)
+cal_init (Cal *cal, CalClass *klass)
{
CalPrivate *priv;
@@ -777,7 +778,7 @@ cal_init (Cal *cal)
priv->listener = CORBA_OBJECT_NIL;
}
-BONOBO_X_TYPE_FUNC_FULL (Cal, GNOME_Evolution_Calendar_Cal, PARENT_TYPE, cal);
+BONOBO_TYPE_FUNC_FULL (Cal, GNOME_Evolution_Calendar_Cal, PARENT_TYPE, cal);
/**
* cal_notify_mode: