[evolution/gnome-3-30] I#135 - Cannot scroll up to previous date in Calendar's Week/Month View



commit a46e4d30664ac75ec41964516a010a5ea1a20b55
Author: Milan Crha <mcrha redhat com>
Date:   Mon Sep 24 18:48:06 2018 +0200

    I#135 - Cannot scroll up to previous date in Calendar's Week/Month View
    
    Closes https://gitlab.gnome.org/GNOME/evolution/issues/135

 src/modules/calendar/e-cal-shell-content.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/modules/calendar/e-cal-shell-content.c b/src/modules/calendar/e-cal-shell-content.c
index 824740c151..6def72f0ec 100644
--- a/src/modules/calendar/e-cal-shell-content.c
+++ b/src/modules/calendar/e-cal-shell-content.c
@@ -1114,7 +1114,11 @@ update_adjustment (ECalShellContent *cal_shell_content,
        /* Determine the first date shown. */
        start_date = week_view->base_date;
        week_offset = floor (value + 0.5);
-       g_date_add_days (&start_date, week_offset * 7);
+
+       if (week_offset > 0)
+               g_date_add_days (&start_date, week_offset * 7);
+       else
+               g_date_subtract_days (&start_date, week_offset * (-7));
 
        /* Convert the old & new first days shown to julian values. */
        old_first_day_julian = g_date_get_julian (&first_day_shown);


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