elementary / calendar

Desktop calendar app designed for elementary OS
https://elementary.io
GNU General Public License v3.0
130 stars 39 forks source link

Support glib 2.73.1+: Avoid property notification during object construction #761

Closed bobby285271 closed 1 year ago

bobby285271 commented 1 year ago

What Happened?

In https://github.com/elementary/calendar/issues/756#issuecomment-1249990402, we noticed that the calendar app does not show any date numbers, after making a minimal reproducer in https://github.com/bobby285271/e-calendar-issue and bisecting glib commits (thanks @jtojnar!), we noticed that this glib commit intentionally changes the behavior, which is part of glib 2.73.1+. It will be nice to adjust the code here so the app can still work nicely with glib 2.73.1+.

The affected code is at

https://github.com/elementary/calendar/blob/7e65ae0053696b5dae1453ec3ceac391ed870890/src/Grid/GridDay.vala#L104-L107

The workaround is at https://github.com/elementary/calendar/issues/756#issuecomment-1252400047.

Steps to Reproduce

  1. Build with glib 2.73.1+
  2. Launch the app
  3. Notice the app does not show any date numbers
bobby285271 commented 1 year ago

I actually don't know how bad the effect will be for other Pantheon apps, for example in https://github.com/NixOS/nixpkgs/pull/192686#issuecomment-1256840424 we also noticed that iconbrowser is affected.

jtojnar commented 1 year ago

This handler might be suffering from the same issue. Although compute_ranges() is already called in the constructor, the other two methods are not. But I have not checked if they are necessary and am not sure how to test the EventStore.