[evolution] Bug 732541 - Small calendar print doesn't follow week-start-day option



commit c082d6b81b7a32ad5a299331572690439d440691
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jul 8 19:04:56 2014 +0200

    Bug 732541 - Small calendar print doesn't follow week-start-day option

 calendar/gui/print.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index d4f8752..6546688 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -298,8 +298,11 @@ build_month (ECalModel *model,
 
        weekday = e_weekday_from_tm_wday (d_week);
 
+       /* Figure out which square we want to put the 1 in. */
+       weekday = (weekday + 7 - week_start_day) % 7;
+
        for (i = 0; i < d_month; i++)
-               days[d_week + i] = i + 1;
+               days[weekday + i] = i + 1;
 
        if (start)
                *start = e_weekday_get_days_between (week_start_day, weekday);


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