From f9b4d697114fbb6b24b9d1cf2e3e109bcceb9688 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 30 Oct 2001 22:59:13 +0000 Subject: Do not ignore the exceptions of the cases that do not have defaults. 2001-10-30 Federico Mena Quintero * gui/calendar-config.c (config_read): Do not ignore the exceptions of the cases that do not have defaults. svn path=/trunk/; revision=14496 --- calendar/ChangeLog | 5 +++++ calendar/gui/calendar-config.c | 27 ++++++++++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 982faedcb4..c964be13ee 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +2001-10-30 Federico Mena Quintero + + * gui/calendar-config.c (config_read): Do not ignore the + exceptions of the cases that do not have defaults. + 2001-10-30 JP Rosevear * gui/e-meeting-time-sel.c diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index 699644767a..419f4cedb5 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -128,14 +128,35 @@ config_read (void) CORBA_exception_free (&ev); + CORBA_exception_init (&ev); config->default_uri = bonobo_config_get_string (db, - "/Calendar/DefaultUri", NULL); + "/Calendar/DefaultUri", &ev); + if (BONOBO_USER_EX (&ev, ex_Bonobo_ConfigDatabase_NotFound)) + config->default_uri = NULL; + else if (BONOBO_EX (&ev)) + g_message ("config_read(): Could not get the /Calendar/DefaultUri"); + + CORBA_exception_free (&ev); + CORBA_exception_init (&ev); config->default_tasks_uri = bonobo_config_get_string (db, - "/Calendar/DefaultTasksUri", NULL); + "/Calendar/DefaultTasksUri", &ev); + if (BONOBO_USER_EX (&ev, ex_Bonobo_ConfigDatabase_NotFound)) + config->default_tasks_uri = NULL; + else if (BONOBO_EX (&ev)) + g_message ("config_read(): Could not get the /Calendar/DefaultTasksUri"); + CORBA_exception_free (&ev); + + CORBA_exception_init (&ev); config->timezone = bonobo_config_get_string (db, - "/Calendar/Display/Timezone", NULL); + "/Calendar/Display/Timezone", &ev); + if (BONOBO_USER_EX (&ev, ex_Bonobo_ConfigDatabase_NotFound)) + config->timezone = NULL; + else if (BONOBO_EX (&ev)) + g_message ("config_read(): Could not get the /Calendar/Display/Timezone"); + + CORBA_exception_free (&ev); config->working_days = bonobo_config_get_long_with_default (db, "/Calendar/Display/WorkingDays", CAL_MONDAY | CAL_TUESDAY | -- cgit v1.2.3