diff options
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/cal-prefs-dialog.c | 4 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor-util.c | 4 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 11 | ||||
-rw-r--r-- | calendar/gui/dialogs/recurrence-page.c | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-details-page.c | 7 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 8 |
6 files changed, 10 insertions, 26 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index a821bdc70f..69fadbd136 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -868,13 +868,11 @@ show_config (DialogData *dialog_data) { CalWeekdays working_days; gint mask, day, week_start_day, time_divisions; - char *zone_name; icaltimezone *zone; gboolean sensitive; /* Timezone. */ - zone_name = calendar_config_get_timezone (); - zone = icaltimezone_get_builtin_timezone (zone_name); + zone = calendar_config_get_icaltimezone (); e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (dialog_data->timezone), zone); diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c index bdb66c6c92..2383f760e0 100644 --- a/calendar/gui/dialogs/comp-editor-util.c +++ b/calendar/gui/dialogs/comp-editor-util.c @@ -254,14 +254,12 @@ comp_editor_new_date_edit (gboolean show_date, gboolean show_time, struct tm comp_editor_get_current_time (GtkObject *object, gpointer data) { - char *location; icaltimezone *zone; struct icaltimetype tt; struct tm tmp_tm = { 0 }; /* Get the current timezone. */ - location = calendar_config_get_timezone (); - zone = icaltimezone_get_builtin_timezone (location); + zone = calendar_config_get_icaltimezone (); tt = icaltime_from_timet_with_zone (time (NULL), FALSE, zone); diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 5b04b9694a..cffa9f2e9a 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -324,11 +324,8 @@ update_time (EventPage *epage, ECalComponentDateTime *start_date, ECalComponentD /* If it is an all day event, we set both timezones to the current timezone, so that if the user toggles the 'All Day Event' checkbox the event uses the current timezone rather than none at all. */ - if (all_day_event) { - char *location = calendar_config_get_timezone (); - start_zone = end_zone = icaltimezone_get_builtin_timezone (location); - } - + if (all_day_event) + start_zone = end_zone = calendar_config_get_icaltimezone (); gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time), epage); @@ -1241,7 +1238,6 @@ init_widgets (EventPage *epage) { EventPagePrivate *priv; GtkTextBuffer *text_buffer; - char *location; icaltimezone *zone; priv = epage->priv; @@ -1327,8 +1323,7 @@ init_widgets (EventPage *epage) G_CALLBACK (source_changed_cb), epage); /* Set the default timezone, so the timezone entry may be hidden. */ - location = calendar_config_get_timezone (); - zone = icaltimezone_get_builtin_timezone (location); + zone = calendar_config_get_icaltimezone (); e_timezone_entry_set_default_timezone (E_TIMEZONE_ENTRY (priv->start_timezone), zone); e_timezone_entry_set_default_timezone (E_TIMEZONE_ENTRY (priv->end_timezone), zone); diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index cdc820e6d6..aa42fca322 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -1453,7 +1453,7 @@ fill_ending_date (RecurrencePage *rpage, struct icalrecurrencetype *r) e_cal_component_get_dtstart (priv->comp, &dt); if (dt.value->is_date) - to_zone = icaltimezone_get_builtin_timezone (calendar_config_get_timezone ()); + to_zone = calendar_config_get_icaltimezone (); else if (dt.tzid == NULL) to_zone = icaltimezone_get_utc_timezone (); else diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index 5d75c9b39a..729275a4ef 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -327,13 +327,11 @@ task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) e_cal_component_get_completed (comp, &completed); if (completed) { icaltimezone *utc_zone, *zone; - char *location; /* Completed is in UTC, but that would confuse the user, so we convert it to local time. */ utc_zone = icaltimezone_get_utc_timezone (); - location = calendar_config_get_timezone (); - zone = icaltimezone_get_builtin_timezone (location); + zone = calendar_config_get_icaltimezone (); icaltimezone_convert_time (completed, utc_zone, zone); @@ -419,8 +417,7 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp) entire time the dialog is shown. Otherwise if the user changes the timezone, the COMPLETED date may get changed as well. */ - char *location = calendar_config_get_timezone (); - icaltimezone *zone = icaltimezone_get_builtin_timezone (location); + icaltimezone *zone = calendar_config_get_icaltimezone (); icaltimezone_convert_time (&icaltime, zone, icaltimezone_get_utc_timezone ()); e_cal_component_set_completed (comp, &icaltime); diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 33fce5a6c1..e42b1fdd42 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -260,7 +260,6 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) GSList *l; const char *categories; icaltimezone *zone, *default_zone; - char *location; ESource *source; tpage = TASK_PAGE (page); @@ -286,8 +285,7 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) } e_cal_component_free_text_list (l); - location = calendar_config_get_timezone (); - default_zone = icaltimezone_get_builtin_timezone (location); + default_zone = calendar_config_get_icaltimezone (); /* Due Date. */ e_cal_component_get_due (comp, &d); @@ -823,7 +821,6 @@ init_widgets (TaskPage *tpage) { TaskPagePrivate *priv; GtkTextBuffer *text_buffer; - char *location; icaltimezone *zone; priv = tpage->priv; @@ -889,8 +886,7 @@ init_widgets (TaskPage *tpage) G_CALLBACK (source_changed_cb), tpage); /* Set the default timezone, so the timezone entry may be hidden. */ - location = calendar_config_get_timezone (); - zone = icaltimezone_get_builtin_timezone (location); + zone = calendar_config_get_icaltimezone (); e_timezone_entry_set_default_timezone (E_TIMEZONE_ENTRY (priv->start_timezone), zone); e_timezone_entry_set_default_timezone (E_TIMEZONE_ENTRY (priv->due_timezone), zone); |