aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2001-12-07 23:40:06 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2001-12-07 23:40:06 +0800
commit4c6cdbb2adff3dcdcec59fa3da16e8b939054602 (patch)
tree0ef18dfa73f7cae303d9b02336654ec452ce61d0 /calendar/gui
parentb48a32253b4c04c801a49b776b7f1efff3f40010 (diff)
downloadgsoc2013-evolution-4c6cdbb2adff3dcdcec59fa3da16e8b939054602.tar.gz
gsoc2013-evolution-4c6cdbb2adff3dcdcec59fa3da16e8b939054602.tar.zst
gsoc2013-evolution-4c6cdbb2adff3dcdcec59fa3da16e8b939054602.zip
if the key in the config database does not exist, just return the local
2001-12-07 Rodrigo Moya <rodrigo@ximian.com> * gui/calendar-config.c (calendar_config_get_default_uri): (calendar_config_get_default_tasks_uri): if the key in the config database does not exist, just return the local URIs, but never return NULL svn path=/trunk/; revision=14930
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/calendar-config.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index b594423446..0aee3df602 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -421,7 +421,16 @@ calendar_config_write_on_exit (void)
gchar *
calendar_config_get_default_uri (void)
{
- return config->default_uri;
+ static gchar *default_uri = NULL;
+
+ if (config->default_uri)
+ return config->default_uri;
+
+ if (!default_uri)
+ default_uri = g_strdup_printf ("%/evolution/local/Calendar/calendar.ics",
+ g_get_home_dir ());
+
+ return default_uri;
}
/* Sets the default calendar URI */
@@ -439,7 +448,16 @@ calendar_config_set_default_uri (gchar *default_uri)
gchar *
calendar_config_get_default_tasks_uri (void)
{
- return config->default_tasks_uri;
+ static gchar *default_tasks_uri = NULL;
+
+ if (config->default_tasks_uri)
+ return config->default_tasks_uri;
+
+ if (!default_tasks_uri)
+ default_tasks_uri = g_strdup_printf ("%/evolution/local/Tasks/tasks.ics",
+ g_get_home_dir ());
+
+ return default_tasks_uri;
}
void