diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-11-09 04:20:33 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-11-09 04:20:33 +0800 |
commit | ba1c0d0543d02df34348f27683ebd30a27d68502 (patch) | |
tree | e83f7ac94c79df8138421144ff506c36f9c3e4d0 | |
parent | 88e9abec50a746253fb33ff04741e482b51505ce (diff) | |
download | gsoc2013-evolution-ba1c0d0543d02df34348f27683ebd30a27d68502.tar.gz 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
-rw-r--r-- | calendar/ChangeLog | 14 | ||||
-rw-r--r-- | calendar/Makefile.am | 2 | ||||
-rw-r--r-- | calendar/gui/calendar-offline-handler.c | 39 |
3 files changed, 39 insertions, 16 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 2778c099bc..e80acbbecd 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,17 @@ +2002-11-08 Ettore Perazzoli <ettore@ximian.com> + + * gui/calendar-offline-handler.c + (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. + 2002-11-08 Rodrigo Moya <rodrigo@ximian.com> * importers/evolution-calendar-importer.h: use GLib macros. diff --git a/calendar/Makefile.am b/calendar/Makefile.am index 89cea775bd..0e4c8d28eb 100644 --- a/calendar/Makefile.am +++ b/calendar/Makefile.am @@ -4,6 +4,6 @@ else CONDUIT_DIR = endif -SUBDIRS = idl cal-util pcs cal-client gui importers $(CONDUIT_DIR) +SUBDIRS = idl cal-util pcs cal-client gui $(CONDUIT_DIR) EXTRA_DIST = zones.h 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; } |