diff options
author | Dan Winship <danw@src.gnome.org> | 2002-04-11 00:58:14 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2002-04-11 00:58:14 +0800 |
commit | 6ee39cc8619bf63082159433397875df30180fb1 (patch) | |
tree | 4b083f4d0cf306a95bfcc82916df9c341a595932 /calendar/cal-client | |
parent | c5ac2a9e510fa9e53683e4f270c82e0296da8043 (diff) | |
download | gsoc2013-evolution-6ee39cc8619bf63082159433397875df30180fb1.tar gsoc2013-evolution-6ee39cc8619bf63082159433397875df30180fb1.tar.gz gsoc2013-evolution-6ee39cc8619bf63082159433397875df30180fb1.tar.bz2 gsoc2013-evolution-6ee39cc8619bf63082159433397875df30180fb1.tar.lz gsoc2013-evolution-6ee39cc8619bf63082159433397875df30180fb1.tar.xz gsoc2013-evolution-6ee39cc8619bf63082159433397875df30180fb1.tar.zst gsoc2013-evolution-6ee39cc8619bf63082159433397875df30180fb1.zip |
Use new-and-improved default folder URI config paths.
* cal-client/cal-client.c (get_default_uri): Use new-and-improved
default folder URI config paths.
* gui/calendar-config.c (calendar_config_{get,set}_default_uri,
calendar_config_{get,set}_default_tasks_uri): Remove these. The
shell owns this information now. (Weren't being used anyway.)
* gui/component-factory.c (get_data_uri): Fix another place that
hardcoded tacking foo.ics on to the end of URLs.
svn path=/trunk/; revision=16421
Diffstat (limited to 'calendar/cal-client')
-rw-r--r-- | calendar/cal-client/cal-client.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c index d30e13089e..60063a72b2 100644 --- a/calendar/cal-client/cal-client.c +++ b/calendar/cal-client/cal-client.c @@ -796,7 +796,7 @@ static char * get_default_uri (gboolean tasks) { Bonobo_ConfigDatabase db; - char *uri, *fall_back = NULL; + char *uri, *file_uri; CORBA_Environment ev; CORBA_exception_init (&ev); @@ -808,19 +808,24 @@ get_default_uri (gboolean tasks) return NULL; } - CORBA_exception_free (&ev); - - fall_back = get_fall_back_uri (tasks); if (tasks) - uri = bonobo_config_get_string_with_default (db, "/Calendar/DefaultTasksUri", - fall_back, NULL); + uri = bonobo_config_get_string (db, "/DefaultFolders/tasks_uri", &ev); else - uri = bonobo_config_get_string_with_default (db, "/Calendar/DefaultUri", - fall_back, NULL); - g_free (fall_back); - + uri = bonobo_config_get_string (db, "/DefaultFolders/calendar_uri", &ev); bonobo_object_release_unref (db, NULL); + if (BONOBO_EX (&ev)) { + CORBA_exception_free (&ev); + uri = get_fall_back_uri (tasks); + } else if (!strncmp (uri, "file:", 5)) { + for (file_uri = uri + 5; *file_uri == '/'; file_uri++) + ; + file_uri = g_strdup_printf ("/%s/%s.ics", file_uri, + tasks ? "tasks" : "calendar"); + g_free (uri); + uri = file_uri; + } + return uri; } |