aboutsummaryrefslogtreecommitdiffstats
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
parentb48a32253b4c04c801a49b776b7f1efff3f40010 (diff)
downloadgsoc2013-evolution-4c6cdbb2adff3dcdcec59fa3da16e8b939054602.tar
gsoc2013-evolution-4c6cdbb2adff3dcdcec59fa3da16e8b939054602.tar.gz
gsoc2013-evolution-4c6cdbb2adff3dcdcec59fa3da16e8b939054602.tar.bz2
gsoc2013-evolution-4c6cdbb2adff3dcdcec59fa3da16e8b939054602.tar.lz
gsoc2013-evolution-4c6cdbb2adff3dcdcec59fa3da16e8b939054602.tar.xz
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
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/calendar-config.c22
2 files changed, 27 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index cb18f6fa87..067afc7e8a 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+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
+
2001-12-06 Rodrigo Moya <rodrigo@ximian.com>
* gui/dialogs/event-page.c (event_page_fill_widgets): default
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