[gnome-calendar] month-view: use adjust hours on popover headers



commit 1af016e2d5a4ee3a18b37e2087bb2fcfa7033f66
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Feb 18 03:42:41 2016 +0100

    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 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index ee8706a..f1e6834 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]