While fixing timezone bugs, it was found that the calendar property needs
to be set before the component property. The component times may require
to have the calendar set, to be able to lookup the custom timezones in the
calendar, thus make sure the calendar is set before the component is set,
during the construction time.
Rework the initialization process so that setting the construct-only
component property merely takes a hold on the references; and the actual
setting up of the event happens during g_initable_init().
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/788
Two things changes:
a) the actual crash cause in on_client_readonly_changed(), to test whether
the 'unit' is valid at all before dereferencing it
b) the callback doesn't seem to be disconnected at all, thus added a disconnect
of it on the source removal as well
The b) might be enough, but just to be sure I included also a).
https://bugzilla.gnome.org/show_bug.cgi?id=751211
It was caused by missing view events remove notifications when replacing
ongoing ECalClientView. The previously known (ViewData::lost_components)
were not notified as removed, thus made incorrect counts in the mini-calendar.