aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2014-07-09 01:04:56 +0800
committerMilan Crha <mcrha@redhat.com>2014-07-09 01:04:56 +0800
commitc082d6b81b7a32ad5a299331572690439d440691 (patch)
tree64e569f6ee22be359acd778e230da1f364d0dce2
parentc411499b98ee5fd039b5cf763be42ffb27210e8a (diff)
downloadgsoc2013-evolution-c082d6b81b7a32ad5a299331572690439d440691.tar
gsoc2013-evolution-c082d6b81b7a32ad5a299331572690439d440691.tar.gz
gsoc2013-evolution-c082d6b81b7a32ad5a299331572690439d440691.tar.bz2
gsoc2013-evolution-c082d6b81b7a32ad5a299331572690439d440691.tar.lz
gsoc2013-evolution-c082d6b81b7a32ad5a299331572690439d440691.tar.xz
gsoc2013-evolution-c082d6b81b7a32ad5a299331572690439d440691.tar.zst
gsoc2013-evolution-c082d6b81b7a32ad5a299331572690439d440691.zip
Bug 732541 - Small calendar print doesn't follow week-start-day option
-rw-r--r--calendar/gui/print.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index d4f8752a62..65466883a7 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);