diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-05-10 03:47:17 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-05-10 03:47:17 +0800 |
commit | a7171faa016ed5b46f57b3ee29ea39d83ed396b7 (patch) | |
tree | 0bdf863a86ded1881303594606f61f43e93c5a81 /calendar/pcs/cal-backend-imc.c | |
parent | 50aa4d1e2806a9ccadcfa56d5cc2fc279bcb7d5e (diff) | |
download | gsoc2013-evolution-a7171faa016ed5b46f57b3ee29ea39d83ed396b7.tar gsoc2013-evolution-a7171faa016ed5b46f57b3ee29ea39d83ed396b7.tar.gz gsoc2013-evolution-a7171faa016ed5b46f57b3ee29ea39d83ed396b7.tar.bz2 gsoc2013-evolution-a7171faa016ed5b46f57b3ee29ea39d83ed396b7.tar.lz gsoc2013-evolution-a7171faa016ed5b46f57b3ee29ea39d83ed396b7.tar.xz gsoc2013-evolution-a7171faa016ed5b46f57b3ee29ea39d83ed396b7.tar.zst gsoc2013-evolution-a7171faa016ed5b46f57b3ee29ea39d83ed396b7.zip |
Set the format when creating a new calendar.
2000-05-09 Christopher James Lahey <clahey@helixcode.com>
* pcs/cal-backend-imc.c: Set the format when creating a new calendar.
svn path=/trunk/; revision=2961
Diffstat (limited to 'calendar/pcs/cal-backend-imc.c')
-rw-r--r-- | calendar/pcs/cal-backend-imc.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/calendar/pcs/cal-backend-imc.c b/calendar/pcs/cal-backend-imc.c index 29c806a89f..792abbb4ae 100644 --- a/calendar/pcs/cal-backend-imc.c +++ b/calendar/pcs/cal-backend-imc.c @@ -443,6 +443,8 @@ remove_object (CalBackendIMC *cbimc, iCalObject *ico) break; default: + /* Make the compiler shut up. */ + list = NULL; g_assert_not_reached (); } @@ -777,6 +779,7 @@ cal_backend_imc_create (CalBackend *backend, GnomeVFSURI *uri) { CalBackendIMC *cbimc; IMCPrivate *priv; + char *str_uri; cbimc = CAL_BACKEND_IMC (backend); priv = cbimc->priv; @@ -793,6 +796,24 @@ cal_backend_imc_create (CalBackend *backend, GnomeVFSURI *uri) /* Done */ + /* FIXME: this looks rather bad; maybe we should check for local files + * and fail if they are remote. + */ + + str_uri = gnome_vfs_uri_to_string (uri, + (GNOME_VFS_URI_HIDE_USER_NAME + | GNOME_VFS_URI_HIDE_PASSWORD + | GNOME_VFS_URI_HIDE_HOST_NAME + | GNOME_VFS_URI_HIDE_HOST_PORT + | GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD)); + + /* look at the extension on the filename and decide if this is a + * iCalendar or vCalendar file. + */ + priv->format = cal_get_type_from_filename (str_uri); + + g_free (str_uri); + gnome_vfs_uri_ref (uri); priv->uri = uri; |