The current GcalEventWidget implementation is a direct
GtkWidget subclass, which means we have to take care of
all the implementation details such as raising GdkWindows
and managing the drawing all by ourselves.
The event widget, however, can be easily described through
a GtkBuilder file. This would simplify the implementation
and makes us maintain less code.
Fix that by making GcalEventWidget a GtkBin subclass.
The overflow layout used to display "Other X events" text when
there is no enough space to accomodate more events.
But due to the way the events were sorted, some events are folded to
'Other events' popover even when the cell has enough space to accomodate
the event(s) or when it is not required to be folded.
We rework how the events will be sorted. First, the events are sorted by their
start dates(starting with the closest). But if two or more events have same start date
then they are sorted according to their lengths. And still if they have same start
date and length then they are sorted according to their modified times(the closest first).
https://bugzilla.gnome.org/show_bug.cgi?id=778478
When we escape first, then truncate, we might end up truncating at
the middle of a special character sequence, breaking the markup.
Fix that by escaping after truncating.
In month view and year view, when the mouse is hovering over
an event, nothing is shown. A tooltip with the event information
would be much more useful in this scenario.
Fix that by showing a tooltip displaying the event's title, time
and date, and, if present, the location and notes of the event. Long
notes are truncated and ellipsized.
https://bugzilla.gnome.org/show_bug.cgi?id=774952
Earlier the height of event-widget with duration of 30 mins or less exceeded
the desired space in week-grid. As height available was not checked beforehand,
this resulted in some event-widgets getting height assigned which was more
than the height available.
This patch fixes the erroneous assignment of event-widget's height by first
comparing the required height with the available height. If the required
height exceeds the available height, then the display-text is given as a
single-line for the widget to fit properly.
https://bugzilla.gnome.org/show_bug.cgi?id=778070
When dragging events around, the cursors show a + as opposed to a
an arrow indicating that the event is being moved. This can confuse
users.
The fix is to tell GTK that the drag being performed is a move.
https://bugzilla.gnome.org/show_bug.cgi?id=774922
Instead of using a pixbuf and relying on the underlying GdkWindow,
simply perform a custom draw() over a manually created cairo context
and avoid nasty crashes.
When the event widget's GdkWindow receives an event scroll,
the event is lost because it doesn't handle it. It should,
however, propagate the scroll event so that the container
is able to properly parse it.
Fix that by making GcalEventWidget listen and propagate
scrolled events.
Since we're storing the GdkWindow relative to the event widget,
it's usually safer to create a pixbuf of the widget *after* it's
drawn, and not while it's being drawed.
This commit moves the pixbuf retrieval code to the draw-begin
implementation, so we only create the pixbuf when actually
using it.
Ideally, every single view will support drag and drop. So
let's just assume that and make the event widget set itself
as a drag source, and let each view set itself as a drag
target.
When an event is earlier than the current date, it gets faded out.
Every event from the same calendar showed the same shade of color, either it was an old, current or forward event. That could be tricky for the user to identify which ones were already over.
Now, events that are earlier thant the current date are half transparent to allow the user to easily track where the current date/time is.
https://bugzilla.gnome.org/show_bug.cgi?id=746267
Instead of breaking the vertical alignment of events by
drawing icons both at the start and end of the widget,
only draw them by the end.
This commit also improves drawing for RTL locales.
We differentiate all day events from timed events by their
ordering, but we don't give any visual clues of this
differentiation.
Fix that by adding the start time of the event when it's a
timed event.
https://bugzilla.gnome.org/show_bug.cgi?id=753131
When we finalize, we remove the event. Normally this means
that the event also gets finalized, as the widget almost
always holds the only reference to the event.
However, there are some rare cases where we finalize the widget
but not the event. If the event the updates the color or the
summary, we try to redraw the finalized widget and crash.
Fix that by disconnecting the signals when finalizing the widget.
The compare_for_single_day() method is reproducing the
same functionality from gcal_event_compare(), and the only
consumer is the Year View. So, for now, simplify the
comparing function and put it in year view file.
Also, this commit vastly improves and documents the year
view's algorithm to add events to the sidebar list.
For now, we're going to convert every widget time into our timezone
without question. Further along the way, when we have a more complete
edit-dialog we can handle this in a less strict manner.
Size requisition previously add margin to the size requested. Margin
should be taken into account outside of the widget. Moving margin to the
container and use border, which previously was not used.