[gnome-calendar] window: month view navigation fixed for February



commit 8af1e6c02a47432e29426a11188b347194e927c3
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Thu Jan 29 09:20:27 2015 -0500

    window: month view navigation fixed for February
    
    Since February have 28 days sometimes when you add month to January, 29
    icaltime_normalize() takes you to February, 29 which is actually, March, 1.
    The same happens for January 30 and 31.

 src/gcal-window.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 8a922f7..b435cc9 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -374,6 +374,7 @@ date_updated (GtkButton  *button,
           new_date->day += 7 * (move_back ? -1 : 1);
           break;
         case GCAL_WINDOW_VIEW_MONTH:
+          new_date->day = 1;
           new_date->month += 1 * (move_back ? -1 : 1);
           break;
         case GCAL_WINDOW_VIEW_YEAR:


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