[gnome-calendar] gcal-edit-dialog: Use event timezone if available
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] gcal-edit-dialog: Use event timezone if available
- Date: Fri, 15 Jun 2018 14:59:13 +0000 (UTC)
commit ac879dd8ecd46d2aa6ed37eb07fe49da47c85057
Author: Elias Entrup <elias-git flump de>
Date: Sat Jun 2 11:36:30 2018 +0200
gcal-edit-dialog: Use event timezone if available
Changing the time of an event with a different
timezone was automatically changing the timezone
to the local one.
This patch checks whether a timezone is already
set and uses that.
Fixes #273
src/gcal-edit-dialog.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index 182afde8..a2478dc0 100644
--- a/src/gcal-edit-dialog.c
+++ b/src/gcal-edit-dialog.c
@@ -1467,7 +1467,17 @@ return_datetime_for_widgets (GcalEditDialog *dialog,
/* Use UTC timezone for All Day events, otherwise use the event's timezone */
all_day = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->all_day_check));
- tz = all_day ? g_time_zone_new_utc () : g_time_zone_new_local ();
+ if (all_day)
+ {
+ tz = g_time_zone_new_utc ();
+ }
+ else
+ {
+ if (gcal_event_get_timezone (dialog->event))
+ tz = g_time_zone_ref (gcal_event_get_timezone (dialog->event));
+ else
+ tz = g_time_zone_new_local ();
+ }
date = gcal_date_selector_get_date (date_selector);
time = gcal_time_selector_get_time (time_selector);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]