From 1af016e2d5a4ee3a18b37e2087bb2fcfa7033f66 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Thu, 18 Feb 2016 03:42:41 +0100 Subject: [PATCH] month-view: use adjust hours on popover headers If an event is from a different timezone, the headers of the overflown popover should be translated to the current timezone. For example, if an event happens at 17h -0300, the translated hour is 22h +0200. The current code already handles these differnces, but the listbox row wasn't updated. --- src/gcal-month-view.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c index ee8706a0..f1e68341 100644 --- a/src/gcal-month-view.c +++ b/src/gcal-month-view.c @@ -607,10 +607,12 @@ update_list_box_headers (GtkListBoxRow *row, row_child = gtk_bin_get_child (GTK_BIN (row)); row_event = gcal_event_widget_get_event (GCAL_EVENT_WIDGET (row_child)); row_date = gcal_event_widget_get_date_start (GCAL_EVENT_WIDGET (row_child)); + row_date = g_date_time_to_local (row_date); if (before != NULL) { before_child = gtk_bin_get_child (GTK_BIN (before)); before_date = gcal_event_widget_get_date_start (GCAL_EVENT_WIDGET (before_child)); + before_date = g_date_time_to_local (before_date); } if (!gcal_event_is_multiday (row_event) && @@ -640,6 +642,9 @@ update_list_box_headers (GtkListBoxRow *row, gtk_list_box_row_set_header (row, vbox); g_free (time); } + + g_clear_pointer (&before_date, g_date_time_unref); + g_clear_pointer (&row_date, g_date_time_unref); } static gboolean