Create a new GcalTimeChooserRow widget from AdwEntryRow that parses the
entry into a time, or lets the user pick a time from a popover.
[feaneron] Improved code style, reworked regex management.
Create file to test util functions and create a test for the
gcal_date_time_from_icaltime function. The test checks if the time
zones are correctly interpreted in the conversion of an ICalTime to a
GDateTime.
Getting the time zone based on the location of the event doesn't work
with virtual time zones, causing the offset to be incorrect on the
import dialog. This changes the function to adjust the time zone of the
GDateTime based on the offset from UTC, which should work for both
virtual and real timezones.
See #1243
Currently we only show writable calendars in the calendar row, but
for read-only events, the read-only calendar must be selected. But
that's impossible because it's not in the model.
Change the model to a flattened list as follows:
+ FlattenListModel -----------+
| |
| + writable calendars -----+ |
| | | |
| | - Calendar 1 | |
| | - Calendar 2 | |
| | - Calendar 3 | |
| | [...] | |
| | | |
| +-------------------------+ |
| + read-only calendars ----+ |
| | | |
| | - Calendar 1 | |
| | [...] | |
| | | |
| +-------------------------+ |
+-----------------------------+
The read-only calendars list only ever has 1 item: the calendar
of the current event, and only if the event is in a read-only
calendar.
agenda-view sort_func uses gcal_date_time_compare_date, which is
insufficient for this case.
we want to compare events date(s) down to the last minute, so that we
can be able to sort them in chronological order.
we use the g_date_time_compare function.
Fixes: #936
Co-authored-by: Georges Basile Stavracas Neto
<georges.stavracas@gmail.com>
Files that aren't in the UTF-8 encoding were breaking the import dialog.
This tries to guess the encoding of the file before processing it, based
on the Byte Order Mark (BOM), and converts it to UTF-8.
Fixes#1243
When the user deletes a calendar in the calendar management dialog, a
popover allows them to undo the deletion. The calendar is fully deleted
only when the toast is dismissed or when the toast reaches its timeout.
When the user closes the calendar management dialog without dismissing
the toast and before the end of the timeout, the calendar can still be
manipulated for a short period of time.
To fix this, I removed the calendar-management-dialog from the UI of the
window, and made the window create and destroy the dialog on demand.
This forces the toast overlay to dismiss all toasts.