diff options
Diffstat (limited to 'calendar/conduits')
-rw-r--r-- | calendar/conduits/calendar/calendar-conduit.c | 10 | ||||
-rw-r--r-- | calendar/conduits/todo/todo-conduit.c | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index 552ba41e69..58b7a7020f 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -261,14 +261,16 @@ get_default_timezone (void) CORBA_exception_free (&ev); - location = bonobo_config_get_string (db, "/Calendar/Display/Timezone", NULL); - if (location == NULL) - goto cleanup; + location = bonobo_config_get_string_with_default (db, + "/Calendar/Display/Timezone", "UTC", NULL); + if (!location || !location[0]) { + g_free (location); + location = g_strdup ("UTC"); + } timezone = icaltimezone_get_builtin_timezone (location); g_free (location); - cleanup: bonobo_object_release_unref (db, NULL); return timezone; diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 99da43b13f..4964860e22 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -265,14 +265,16 @@ get_default_timezone (void) CORBA_exception_free (&ev); - location = bonobo_config_get_string (db, "/Calendar/Display/Timezone", NULL); - if (location == NULL) - goto cleanup; + location = bonobo_config_get_string_with_default (db, + "/Calendar/Display/Timezone", "UTC", NULL); + if (!location || !location[0]) { + g_free (location); + location = g_strdup ("UTC"); + } timezone = icaltimezone_get_builtin_timezone (location); g_free (location); - cleanup: bonobo_object_release_unref (db, NULL); return timezone; |