diff options
Diffstat (limited to 'calendar/gui/calendar-config.c')
-rw-r--r-- | calendar/gui/calendar-config.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index 7b133075f4..9b6d005259 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -281,12 +281,14 @@ calendar_config_get_timezone (void) /* Sets the timezone. You shouldn't really set it to the empty string or NULL, as this means that Evolution will show the timezone-setting dialog to ask - the user for the timezone. */ + the user for the timezone. It copies the string. */ void calendar_config_set_timezone (gchar *timezone) { + g_free (config->timezone); + if (timezone && timezone[0]) - config->timezone = timezone; + config->timezone = g_strdup (timezone); else config->timezone = NULL; } @@ -689,6 +691,8 @@ on_timezone_set (GnomeDialog *dialog, e_timezone_dialog_get_timezone (etd, &display_name); + g_print ("Location: %s\n", display_name ? display_name : ""); + if (display_name && display_name[0]) { calendar_config_set_timezone (display_name); |