diff options
author | JP Rosevear <jpr@ximian.com> | 2002-07-01 22:31:58 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2002-07-01 22:31:58 +0800 |
commit | 56867f3fe28668dc013dd2f54703ddb7affdbc48 (patch) | |
tree | 60326865cd3e6a31f8a37932184e0d72cea236e9 | |
parent | 9fd05c275495a4b3b60309466ee927ead3a8e9ef (diff) | |
download | gsoc2013-evolution-56867f3fe28668dc013dd2f54703ddb7affdbc48.tar gsoc2013-evolution-56867f3fe28668dc013dd2f54703ddb7affdbc48.tar.gz gsoc2013-evolution-56867f3fe28668dc013dd2f54703ddb7affdbc48.tar.bz2 gsoc2013-evolution-56867f3fe28668dc013dd2f54703ddb7affdbc48.tar.lz gsoc2013-evolution-56867f3fe28668dc013dd2f54703ddb7affdbc48.tar.xz gsoc2013-evolution-56867f3fe28668dc013dd2f54703ddb7affdbc48.tar.zst gsoc2013-evolution-56867f3fe28668dc013dd2f54703ddb7affdbc48.zip |
listen for timezone config change (property_change_cb): set the timezone
2002-07-01 JP Rosevear <jpr@ximian.com>
* gui/calendar-config.c (config_read): listen for timezone config
change
(property_change_cb): set the timezone if it changed elsewhere
* gui/main.c (init_bonobo): call bonobo_activate because we make
bonobo related calls before the bonobo_main call
svn path=/trunk/; revision=17335
-rw-r--r-- | calendar/ChangeLog | 13 | ||||
-rw-r--r-- | calendar/gui/calendar-config.c | 17 | ||||
-rw-r--r-- | calendar/gui/main.c | 3 |
3 files changed, 31 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index f3a70554a4..9f7d80d2bb 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,12 @@ +2002-07-01 JP Rosevear <jpr@ximian.com> + + * gui/calendar-config.c (config_read): listen for timezone config + change + (property_change_cb): set the timezone if it changed elsewhere + + * gui/main.c (init_bonobo): call bonobo_activate because we make + bonobo related calls before the bonobo_main call + 2002-06-25 Rodrigo Moya <rodrigo@ximian.com> Fixes #25410 @@ -6,8 +15,8 @@ cleanup on removal of clients. (alarm_notify_add_calendar): ditto. -2002-06-25 JP Rosevear <jpr@ximian.com> - +2002-06-27 JP Rosevear <jpr@ximian.com> + * gui/itip-utils.c (comp_compliant): plug leak and actually use the minimal comp we create 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 "". */ diff --git a/calendar/gui/main.c b/calendar/gui/main.c index b9b504826b..e00ea7a1e7 100644 --- a/calendar/gui/main.c +++ b/calendar/gui/main.c @@ -65,6 +65,9 @@ init_bonobo (int argc, char **argv) if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) g_error (_("Could not initialize Bonobo")); + + if (!bonobo_activate ()) + g_error (_("Could not activate Bonobo")); } /* Factory function for the calendar component factory; just creates and |