Use a GtkListBox and bind from the model. Create rows from the model
items, and bind properties as needed.
The action target is set only when the calendar is writable because
setting an invalid action+target pair makes the row insensitive.
Remove the ancient menu icon hack.
- Fix a bug where clicking the "Add Event" button created an empty title in the event editor dialog.
- Add "error" class when the user writes an invalid event name.
- Add new function to validate event name.
Because the sections are split into files, the event editor will need a signal to check that each section is correct, and each section will have to emit the signal. This will need to be done in a future commit.
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
This refactor combines the functions
gcal_utils_launch_online_accounts_panel and
gcal_utils_launch_datetime_settings_panel into a single function that
takes a panel ID as an argument.
Shortcut is added so that time-related system settings can be easily
accessed. See #1023
The code is largely just a copy-paste of the code that opens the
"Online Accounts…" menu.
Fixes#1023
The Google Meet URL is extracted from the Calendar Event Notes by using a substring with a fixed length. This length is too short by 1 character.
In order to get the right URL the substring needs to be 1 character longer. In order to match the Google Meet URL add an "x" in the given URL pattern.
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/749
In locales where the first weekday is a monday, the previous code
had a off by one error determining the week a sunday is in.
The problem ultimately arose because in the
`gcal_date_time_get_start_of_week()` function the variable
`n_days_after_week_start` would become negative (-1 in this case) making
the following `g_date_time_add_days (date, -n_days_after_week_start)`
add 1 day resulting in `start_of_week` being set to the start of the
following week.
The solution was to make sure `n_days_after_week_start` would be
positive by adding 7 to it. The variable is taken modulo 7 hence this
should not introduce any bugs.
Fixes#583
Right now, comparing dates with gcal_date_time_compare_date() gives
the exact opposite result of when comparing using g_date_time_compare().
As shown by this patch, this was a source of *many* bugs.
For whatever reason, libical doesn't support the Etc/UTC timezone.
Currently we crash gnome-calendar whenever libical doesn't support the
current timezone (as returned by GTimeZone). Let's fall back to UTC
instead.
Fixes#485
The return value is nullable, but gnome-calendar fails to check it.
Because the nullable return value is inconvenient for us, we can instead
add and use gcal_context_get_icaltimezone() to supplement the existing
gcal_context_get_timezone().
We'll also need a function to convert from GTimeZone to ICalTimezone,
gcal_timezone_to_icaltimezone().
Fixes#419
The method ask_recurrence_modification_type() currently
receives an ESource, and tried to fetch the ECalClient
from the ESource by using g_object_get_data().
However, since we moved to GcalCalendar, we do not set
this data field in ESource.
Receive a GcalCalendar instead, and use the appropriate
function gcal_calendar_get_client() instead.
GNOME Calendar needs to deal with two different
weekday ranges:
1. Sunday → 0 ... Saturday → 6
2. Monday → 1 ... Sunday → 7 (used by GDateTime)
When converting (2) into (1), the correct calculation
is `weekday % 7`.
However, gcal_date_time_get_start_of_week() was doing
`weekday - 1` instead.
Fix it and do the correct calculation instead.
https://gitlab.gnome.org/GNOME/gnome-calendar/issues/451
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