aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/alarm-notify/save.c23
2 files changed, 15 insertions, 14 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 6e809e8598..41cf3cf014 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2001-11-11 Federico Mena Quintero <federico@ximian.com>
+
+ * gui/alarm-notify/save.c (get_calendars_to_load): The last
+ argument to the bonobo_config_get_XXX_with_default() is a gboolean
+ *, not a CORBA_Environment *. Fixes bug #14655.
+
2001-11-11 JP Rosevear <jpr@ximian.com>
* pcs/cal-backend-file.c (free_busy_instance): recurrence
diff --git a/calendar/gui/alarm-notify/save.c b/calendar/gui/alarm-notify/save.c
index 72a52c24fa..a7f70cd740 100644
--- a/calendar/gui/alarm-notify/save.c
+++ b/calendar/gui/alarm-notify/save.c
@@ -193,7 +193,6 @@ GPtrArray *
get_calendars_to_load (void)
{
Bonobo_ConfigDatabase db;
- CORBA_Environment ev;
GPtrArray *uris;
int len, i;
@@ -201,30 +200,26 @@ get_calendars_to_load (void)
if (db == CORBA_OBJECT_NIL)
return NULL;
- /* Get the value */
-
- CORBA_exception_init (&ev);
+ /* Getting the default value below is not necessarily an error, as we
+ * may not have saved the list of calendar yet.
+ */
- len = bonobo_config_get_long_with_default (db, KEY_NUM_CALENDARS_TO_LOAD, 0, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Cannot read key %s -- %s", KEY_NUM_CALENDARS_TO_LOAD, ev._repo_id);
- len = 0;
- }
+ len = bonobo_config_get_long_with_default (db, KEY_NUM_CALENDARS_TO_LOAD, 0, NULL);
uris = g_ptr_array_new ();
g_ptr_array_set_size (uris, len);
for (i = 0; i < len; i++) {
char *key;
+ gboolean used_default;
key = g_strdup_printf ("%s%d", BASE_KEY_CALENDAR_TO_LOAD, i);
- uris->pdata[i] = bonobo_config_get_string_with_default (db, key, "", &ev);
- if (ev._major != NULL)
- g_warning ("Cannot read key %s -- %s", key, ev._repo_id);
+ uris->pdata[i] = bonobo_config_get_string_with_default (db, key, "", &used_default);
+ if (used_default)
+ g_message ("get_calendars_to_load(): Could not read calendar name %d", i);
+
g_free (key);
}
- CORBA_exception_free (&ev);
-
return uris;
}