GcalManager is basically an object that is shared
among classes that need to modify calendars, while
GcalClock is just a wall clock implementation.
Move it to GcalApplication, so that objects without
access to GcalManager can still access the clock.
All events in month-popover displays hour-label indicating their start time,
but all-day events should not display their start time.
This is caused by gtk_widget_show_all recursively setting the events list-box
and all its childrens visible.
We replace gtk_widget_show_all with gtk_widget_show to show the events list-box
and its childrens.
https://gitlab.gnome.org/GNOME/gnome-calendar/issues/250
Event dates are, by definition, inclusive on their
start dates, but exclusives on their end dates. That
means that end dates don't actually contain the date
they represent.
Week grid code, however, was considering that end date
as inclusive, and the layout code was miscalculated
because of that.
Fix that by using an inclusive end date when calculating
the event span. Since Calendar does not support subsecond
precision, we do that by subtracting one second from the
exclusive end date.
Issue: #279
On HiDPI displays, the color boxes of timed events
appear distorted and not squared.
Fix that by setting a fixed size, and changing the
box alignment to always shrink to a squared state.
GcalManager:remove_event() is an asynchronous function
that, by the time the callback is executed, unreferences
the event that is being removed. This implies that, when
the function was called, a reference was taken -- we don't
want the event to be finalized during the operation, after
all.
The problem is that the reference was never taken.
Fix that by properly owning a reference to the event when
removing it, and dropping it when the removal is finished.
Issue: #268
Checking if an event is multiday is currently broken
because g_date_time_difference() returns raw time spans,
and that value means "there is 24h of difference between
these dates", when what we're looking for is "how many
days are between these two dates".
To fix that, use the GDate API instead of GDateTime.