[gnome-calendar] week-header: fix calc of events' start and end positions
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] week-header: fix calc of events' start and end positions
- Date: Wed, 15 Mar 2017 12:20:01 +0000 (UTC)
commit 669869cf3f7c81313527f740669abdc71c0cece6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Mar 15 17:45:49 2017 +0530
week-header: fix calc of events' start and end positions
Another shot in this issue. Again.
https://bugzilla.gnome.org/show_bug.cgi?id=780051
src/views/gcal-week-header.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/views/gcal-week-header.c b/src/views/gcal-week-header.c
index f44f7d0..5707f75 100644
--- a/src/views/gcal-week-header.c
+++ b/src/views/gcal-week-header.c
@@ -1630,13 +1630,13 @@ gcal_week_header_add_event (GcalWeekHeader *self,
/* Start position */
if (datetime_compare_date (start_date, week_start) >= 0)
- start = g_date_time_get_day_of_week (start_date) % 7;
+ start = floor (g_date_time_difference (start_date, week_start) / G_TIME_SPAN_DAY);
else
start = 0;
/* End position */
if (g_date_time_compare (end_date, week_end) <= 0)
- end = (g_date_time_get_day_of_week (end_date) - all_day) % 7;
+ end = floor (g_date_time_difference (end_date, week_start) / G_TIME_SPAN_DAY) - all_day;
else
end = 6;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]