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.
This commit is contained in:
@@ -607,10 +607,12 @@ update_list_box_headers (GtkListBoxRow *row,
|
|||||||
row_child = gtk_bin_get_child (GTK_BIN (row));
|
row_child = gtk_bin_get_child (GTK_BIN (row));
|
||||||
row_event = gcal_event_widget_get_event (GCAL_EVENT_WIDGET (row_child));
|
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 = gcal_event_widget_get_date_start (GCAL_EVENT_WIDGET (row_child));
|
||||||
|
row_date = g_date_time_to_local (row_date);
|
||||||
if (before != NULL)
|
if (before != NULL)
|
||||||
{
|
{
|
||||||
before_child = gtk_bin_get_child (GTK_BIN (before));
|
before_child = gtk_bin_get_child (GTK_BIN (before));
|
||||||
before_date = gcal_event_widget_get_date_start (GCAL_EVENT_WIDGET (before_child));
|
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) &&
|
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);
|
gtk_list_box_row_set_header (row, vbox);
|
||||||
g_free (time);
|
g_free (time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_clear_pointer (&before_date, g_date_time_unref);
|
||||||
|
g_clear_pointer (&row_date, g_date_time_unref);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|||||||
Reference in New Issue
Block a user