diff options
author | Federico Mena Quintero <federico@helixcode.com> | 2000-01-25 11:17:54 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 2000-01-25 11:17:54 +0800 |
commit | 32ce476a23e9f2757e9cc539532f38f4ab21837c (patch) | |
tree | 4a9aeebfe355427fe035d27441b02bbc7be0bc4d /calendar/cal.c | |
parent | 50e5c22f0f5c4083ceee623b5bc02a6a7fc4f18c (diff) | |
download | gsoc2013-evolution-32ce476a23e9f2757e9cc539532f38f4ab21837c.tar gsoc2013-evolution-32ce476a23e9f2757e9cc539532f38f4ab21837c.tar.gz gsoc2013-evolution-32ce476a23e9f2757e9cc539532f38f4ab21837c.tar.bz2 gsoc2013-evolution-32ce476a23e9f2757e9cc539532f38f4ab21837c.tar.lz gsoc2013-evolution-32ce476a23e9f2757e9cc539532f38f4ab21837c.tar.xz gsoc2013-evolution-32ce476a23e9f2757e9cc539532f38f4ab21837c.tar.zst gsoc2013-evolution-32ce476a23e9f2757e9cc539532f38f4ab21837c.zip |
Added the gnome-pilot and capplet checks; they will likely be reworked for
2000-01-24 Federico Mena Quintero <federico@helixcode.com>
* configure.in: Added the gnome-pilot and capplet checks; they
will likely be reworked for the Evolution framework, but for now
the calendar/ directory needs them.
* configure.in: Added checks for gnome-vfs.
2000-01-24 Federico Mena Quintero <federico@helixcode.com>
* tlacuache.c: New main module for the Tlacuache personal calendar
server.
* tlacuache.gnorba: New gnorba file for Tlacuache, the GNOME
personal calendar server.
* Makefile.am: Added the stuff necessary to build Tlacuache.
* cal.c (Cal_get_uri): Convert the URI to a string before
returning it.
* cal-factory.c (CalFactory_create): Doh, this function is void.
* job.c (job_add): Use g_idle_add(), not gtk_idle_add().
svn path=/trunk/; revision=1623
Diffstat (limited to 'calendar/cal.c')
-rw-r--r-- | calendar/cal.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/calendar/cal.c b/calendar/cal.c index be7c8e74eb..f855def92b 100644 --- a/calendar/cal.c +++ b/calendar/cal.c @@ -31,7 +31,7 @@ typedef struct { CalBackend *backend; /* Listener on the client we notify */ - GNOME_Calendar_listener listener; + GNOME_Calendar_Listener listener; } CalPrivate; @@ -119,8 +119,7 @@ cal_destroy (GtkObject *object) { Cal *cal; CalPrivate *priv; - GList *l; - CORBA_Environment *ev; + CORBA_Environment ev; g_return_if_fail (object != NULL); g_return_if_fail (IS_CAL (object)); @@ -129,13 +128,11 @@ cal_destroy (GtkObject *object) priv = cal->priv; CORBA_exception_init (&ev); + CORBA_Object_release (priv->listener, &ev); + if (ev._major != CORBA_NO_EXCEPTION) + g_message ("cal_destroy(): could not release the listener"); - for (l = priv->listeners; l; l = l->next) { - GNOME_Unknown_unref (l->data, &ev); - CORBA_Object_release (l->data, &ev); - } - - g_list_free (priv->listeners); + CORBA_exception_free (&ev); g_free (priv); @@ -143,7 +140,6 @@ cal_destroy (GtkObject *object) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } - /* CORBA servant implementation */ @@ -155,11 +151,20 @@ Cal_get_uri (PortableServer_Servant servant, { Cal *cal; CalPrivate *priv; + GnomeVFSURI *uri; + char *str_uri; + CORBA_char *str_uri_copy; cal = CAL (gnome_object_from_servant (servant)); priv = cal->priv; - return CORBA_string_dup (priv->uri); + uri = cal_backend_get_uri (priv->backend); + str_uri = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE); + str_uri_copy = CORBA_string_dup (str_uri); + g_free (str_uri); + + return str_uri_copy; + } /** @@ -176,7 +181,7 @@ cal_get_epv (void) POA_GNOME_Calendar_Cal__epv *epv; epv = g_new0 (POA_GNOME_Calendar_Cal__epv, 1); - epv->get_uri = Cal_get_uri; + epv->_get_uri = Cal_get_uri; return epv; } @@ -207,8 +212,8 @@ cal_construct (Cal *cal, g_return_val_if_fail (cal != NULL, NULL); g_return_val_if_fail (IS_CAL (cal), NULL); - g_return_val_if_fail (backend != NULL); - g_return_val_if_fail (IS_CAL_BACKEND (backend)); + g_return_val_if_fail (backend != NULL, NULL); + g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL); priv = cal->priv; @@ -283,14 +288,14 @@ cal_new (CalBackend *backend, GNOME_Calendar_Listener listener) CORBA_Environment ev; gboolean ret; - g_return_val_if_fail (backend != NULL); - g_return_val_if_fail (IS_CAL_BACKEND (backend)); + 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)); corba_cal = cal_corba_object_create (GNOME_OBJECT (cal)); CORBA_exception_init (&ev); - ret = CORBA_object_is_nil (corba_cal, &ev); + ret = CORBA_Object_is_nil ((CORBA_Object) corba_cal, &ev); if (ev._major != CORBA_NO_EXCEPTION || ret) { g_message ("cal_new(): could not create the CORBA object"); gtk_object_unref (GTK_OBJECT (cal)); @@ -303,7 +308,7 @@ cal_new (CalBackend *backend, GNOME_Calendar_Listener listener) retval = cal_construct (cal, corba_cal, backend, listener); if (!retval) { g_message ("cal_new(): could not construct the calendar client interface"); - gtk_object_unref (cal); + gtk_object_unref (GTK_OBJECT (cal)); return NULL; } |