[gnome-calendar/gnome-3-36] week-grid: Convert event timezones to local on allocation
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/gnome-3-36] week-grid: Convert event timezones to local on allocation
- Date: Thu, 18 Jun 2020 00:36:58 +0000 (UTC)
commit 745a065dca34766e6b6c56ab7ae31ddca153baa6
Author: Douglas Fuller <douglas fuller gmail com>
Date: Tue May 12 11:07:12 2020 -0400
week-grid: Convert event timezones to local on allocation
When inserting events into the display grid, use local start and end
times.
Fixes #599
src/views/gcal-week-grid.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/views/gcal-week-grid.c b/src/views/gcal-week-grid.c
index 7a06774e..72d492d3 100644
--- a/src/views/gcal-week-grid.c
+++ b/src/views/gcal-week-grid.c
@@ -575,12 +575,12 @@ gcal_week_grid_size_allocate (GtkWidget *widget,
for (j = 0; widgets_data && j < widgets_data->len; j++)
{
+ g_autoptr (GDateTime) event_start = NULL;
+ g_autoptr (GDateTime) event_end = NULL;
GtkStyleContext *context;
GtkAllocation child_allocation;
GtkWidget *event_widget;
GcalRange *event_range;
- GDateTime *event_start;
- GDateTime *event_end;
ChildData *data;
GtkBorder margin;
guint64 events_at_range;
@@ -594,8 +594,8 @@ gcal_week_grid_size_allocate (GtkWidget *widget,
data = g_ptr_array_index (widgets_data, j);
event_widget = data->widget;
event_range = gcal_event_get_range (data->event);
- event_start = gcal_event_get_date_start (data->event);
- event_end = gcal_event_get_date_end (data->event);
+ event_start = g_date_time_to_local (gcal_event_get_date_start (data->event));
+ event_end = g_date_time_to_local (gcal_event_get_date_end (data->event));
context = gtk_widget_get_style_context (event_widget);
/* The total number of events available in this range */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]