After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 742492 - current day highlight not updated on day change
current day highlight not updated on day change
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: calendar
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-01-06 23:30 UTC by Sebastian Keller
Modified: 2015-01-11 04:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
calendar: update current day highlight on day change (935 bytes, patch)
2015-01-07 00:32 UTC, Sebastian Keller
none Details | Review
calendar: update current day highlight on day change (1.13 KB, patch)
2015-01-07 01:46 UTC, Sebastian Keller
committed Details | Review

Description Sebastian Keller 2015-01-06 23:30:21 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.
Comment 1 Sebastian Keller 2015-01-07 00:32:40 UTC
Created attachment 293990 [details] [review]
calendar: update current day highlight on day change
Comment 2 Sebastian Keller 2015-01-07 01:46:41 UTC
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.)
Comment 3 drago01 2015-01-10 12:20:03 UTC
Review of attachment 293995 [details] [review]:

OK.
Comment 4 drago01 2015-01-10 16:44:55 UTC
Attachment 293995 [details] pushed as 60b3d43 - calendar: update current day highlight on day change
Comment 5 Volker Sobek (weld) 2015-01-11 04:18:59 UTC
(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.