endlessm/gnome-initial-setup — pull request #69 by magcius (2014-11-05 23:09:31+00:00)
Title: location: Fix date corruption when on the last day of the month

When we constructed the adjustment for the day spinbutton, we created it
with num_days as the upper bound, but the upper bound is exclusive, not
inclusive! As such, if you were on the last day of the month, we'd push
you back to the closest upper bound, which was the day before.

Thankfully, when we have the user change the month in
month_year_changed, we actually get the upper get right by adding on an
additional 1. So we first make it too low, and then we set it back to
the correct value immediately afterwards.

To fix this, set an unreasonably large upper bound to
start out with. Since we call month_year_changed almost immediately
afterwards, the lower bound will be set properly and we'll be fine.

[endlessm/eos-shell#3249]