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.
This avoids some web servers or WAFs doing weird stuff with our requests
which would lead to situations where our web calendar source discovery
would face server errors, redirects, incorrect contents, etc.
Fixes#651
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/290
This patch fixes an issue when creating new events in week view the week
after the daylight saving change.
The problem was in the calc of the selected date, that's done couting
the 30 minutes slots and adding that minutes to the week_start datetime.
When there's a daylight saving change, the real date to select should be
adjusted. This patch adds a new util function to make it easy to add
minutes ignoring the tz so we can make this calc directly with
gcal_date_time_add_floating_minutes.
This also includes a new test file with some checks for the new util
function and spring / autumn changes.
This new function could be used in other places to fix specific issues
that could be caused by the same logic error, calculate a selection or
event position based on GDateTime operations.
Fix https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/482
Zero length ranges, such as for events without a DTEND could be
considered to overlap a range if they were at exactly the end of the
range. The end of a range however is the first date that is supposed to
not overlap, so a zero-length range on exactly this point should not be
considered overlapping.
This fixes cases where all-day events from the next month could show up
on the same day of the current month if they did not have a DTEND.
This also adds tests for all possible cases of such zero-length events
overlapping.
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/701
Using raw integers forces us to select a pre-defined
start and end ranges for the timeline. Since we want
to reuse this data structure on GcalTimeline, make it
a bit more useful.
The new source discoverer is a complete overhaul of
the current code. It is async-only, correctly threaded,
and easier to maintain.
A major new feature of this web source discoverer is
that it now pings the server to see if the URL feeds
us back with an iCalendar file.
Furthermore, it continues to use E-D-S WebDAV discovery
functions as a fallback mechanism.
Fixes#380
Introduce a new GcalStubCalendar class that essentially
removes the ECalClient initialization from GcalCalendar,
and use it as part of a new private library consumed by
the tests.
The unit test that checks GCalManager test fails due to missing
schemas.
This patch allows schemas to be compiled in the build tree and also
sets the environment variables so tests can found them and run
properly.
Additional code and testing from Mohammed Sadiq <sadiq@sadiqpk.org>
The first outcome of the test suite. This separation does
not make much sense now, and GcalManager is basically a
holder for all data types.
This commit moves the GSettings to the GcalManager instance
of the application. Of course, in the future, the plan is to
split GcalManager nicely.