aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-11-09 04:20:33 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-11-09 04:20:33 +0800
commitba1c0d0543d02df34348f27683ebd30a27d68502 (patch)
treee83f7ac94c79df8138421144ff506c36f9c3e4d0 /calendar/gui
parent88e9abec50a746253fb33ff04741e482b51505ce (diff)
downloadgsoc2013-evolution-ba1c0d0543d02df34348f27683ebd30a27d68502.tar
gsoc2013-evolution-ba1c0d0543d02df34348f27683ebd30a27d68502.tar.gz
gsoc2013-evolution-ba1c0d0543d02df34348f27683ebd30a27d68502.tar.bz2
gsoc2013-evolution-ba1c0d0543d02df34348f27683ebd30a27d68502.tar.lz
gsoc2013-evolution-ba1c0d0543d02df34348f27683ebd30a27d68502.tar.xz
gsoc2013-evolution-ba1c0d0543d02df34348f27683ebd30a27d68502.tar.zst
gsoc2013-evolution-ba1c0d0543d02df34348f27683ebd30a27d68502.zip
(calendar_offline_handler_class_init): GObjectified.
(impl_finalize): Finalize impl. (impl_dispose): Dispose impl. (calendar_offline_handler_new): Use g_object_new(). (backend_cal_opened): use g_signal_connect() instead of gtk_signal_connect(). (backend_go_offline): Likewise. (backend_cal_opened): g_object_unref() instead of gtk_object_unref(). (backend_go_offline): Likewise. svn path=/trunk/; revision=18671
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/calendar-offline-handler.c39
1 files changed, 24 insertions, 15 deletions
diff --git a/calendar/gui/calendar-offline-handler.c b/calendar/gui/calendar-offline-handler.c
index a01d3fa160..c6c61ef3d1 100644
--- a/calendar/gui/calendar-offline-handler.c
+++ b/calendar/gui/calendar-offline-handler.c
@@ -152,12 +152,11 @@ backend_cal_opened (CalClient *client, CalClientOpenStatus status, gpointer data
if (status != CAL_CLIENT_OPEN_SUCCESS) {
update_offline (offline_handler);
- gtk_object_unref (GTK_OBJECT (client));
+ g_object_unref (client);
return;
}
- gtk_signal_connect (GTK_OBJECT (client), "cal_set_mode",
- backend_cal_set_mode, offline_handler);
+ g_signal_connect (client, "cal_set_mode", G_CALLBACK (backend_cal_set_mode), offline_handler);
cal_client_set_mode (client, CAL_MODE_LOCAL);
}
@@ -170,12 +169,11 @@ backend_go_offline (gpointer data, gpointer user_data)
gboolean success;
client = cal_client_new ();
- gtk_signal_connect (GTK_OBJECT (client), "cal_opened",
- backend_cal_opened, offline_handler);
+ g_signal_connect (client, "cal_opened", G_CALLBACK (backend_cal_opened), offline_handler);
success = cal_client_open_calendar (client, uri, TRUE);
if (!success) {
update_offline (offline_handler);
- gtk_object_unref (GTK_OBJECT (client));
+ g_object_unref (client);
return;
}
}
@@ -211,10 +209,10 @@ impl_goOnline (PortableServer_Servant servant,
priv = offline_handler->priv;
}
-/* GtkObject methods. */
+/* GObject methods. */
static void
-impl_destroy (GtkObject *object)
+impl_dispose (GtkObject *object)
{
CalendarOfflineHandler *offline_handler;
CalendarOfflineHandlerPrivate *priv;
@@ -228,12 +226,22 @@ impl_destroy (GtkObject *object)
CORBA_exception_init (&ev);
CORBA_Object_release (priv->listener_interface, &ev);
CORBA_exception_free (&ev);
+
+ priv->listener_interface = CORBA_OBJECT_NIL;
}
- g_free (priv);
+}
+
+static void
+impl_finalize (GtkObject *object)
+{
+ CalendarOfflineHandler *offline_handler;
+ CalendarOfflineHandlerPrivate *priv;
+
+ offline_handler = CALENDAR_OFFLINE_HANDLER (object);
+ priv = offline_handler->priv;
- if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ g_free (priv);
}
/* GTK+ type initialization. */
@@ -241,11 +249,12 @@ impl_destroy (GtkObject *object)
static void
calendar_offline_handler_class_init (CalendarOfflineHandlerClass *klass)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
POA_GNOME_Evolution_Offline__epv *epv;
- object_class = GTK_OBJECT_CLASS (klass);
- object_class->destroy = impl_destroy;
+ object_class = G_OBJECT_CLASS (klass);
+ object_class->dispose = impl_dispose;
+ object_class->finalize = impl_finalize;
epv = & klass->epv;
epv->_get_isOffline = impl__get_isOffline;
@@ -274,7 +283,7 @@ calendar_offline_handler_new (void)
{
CalendarOfflineHandler *new;
- new = gtk_type_new (calendar_offline_handler_get_type ());
+ new = g_object_new (calendar_offline_handler_get_type (), NULL);
return new;
}