diff options
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/calendar-config.c | 22 |
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 |