GNOME Bugzilla – Bug 742492
current day highlight not updated on day change
Last modified: 2015-01-11 04:18:59 UTC
The current day highlight (the underline/gradient one) does not get updated when the day changes. If you check the calendar at 11:59pm and then at 00:00am (or later) you'll notice that both times the same date is highlighted. I think this is due to _rebuildCalendar not being run. The highlight for the currently selected day (the flat one) is updated properly because it gets set in the _update function, which gets called when the menu is opened. Maybe the update function should call _rebuildCalendar if !_sameDay(now, this._calendarBegin) as well.
Created attachment 293990 [details] [review] calendar: update current day highlight on day change
Created attachment 293995 [details] [review] calendar: update current day highlight on day change I probably shouldn't try to patch things that break in the middle of the night immediately after they have broken still right in the middle of the night... especially not time/date code. I just realized how incredibly wrong the previous patch is :). It "worked" - but was rebuilding the calendar every time the selected date was changed. So now for a second approach. I didn't add an explicit rebuild for !this._markedAsToday because the case of it not existing is already covered by !this._calendarBegin. (I also noticed that rebuild is triggered twice when changing months (unrelated to my patch) and multiple times during shell startup, which is something maybe worth investigating.)
Review of attachment 293995 [details] [review]: OK.
Attachment 293995 [details] pushed as 60b3d43 - calendar: update current day highlight on day change
(In reply to comment #2) > (I also noticed that rebuild is triggered twice when changing months (unrelated > to my patch) and multiple times during shell startup, which is something maybe > worth investigating.) Once upon a time I wrote a patch fixing the 'building twice' issue, it's still lurking in https://bugzilla.gnome.org/show_bug.cgi?id=729979.