aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/calendar-config.c')
-rw-r--r--calendar/gui/calendar-config.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 572db1fe2c..d1e3c76ab8 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -109,6 +109,16 @@ calendar_config_locale_supports_12_hour_format (void)
return s[0] != '\0';
}
+static void
+property_change_cb (BonoboListener *listener,
+ char *event_name,
+ CORBA_any *any,
+ CORBA_Environment *ev,
+ gpointer user_data)
+{
+ calendar_config_set_timezone (BONOBO_ARG_GET_STRING (any));
+}
+
static void
config_read (void)
{
@@ -125,6 +135,13 @@ config_read (void)
return;
}
+ /* The start up wizard can set the timezone externally */
+ bonobo_event_source_client_add_listener (db, property_change_cb,
+ "=Bonobo/ConfigDatabase:change/Calendar/Display:Timezone",
+ &ev, NULL);
+ if (BONOBO_EX (&ev))
+ g_message ("config_read(): Could not listen to db changes");
+
CORBA_exception_free (&ev);
/* Default to UTC if the timezone is not set or is "". */