search: Fold recurring events into single results

When searching for events, users are typically interested in finding the
event rather than seeing a repetitive list of every occurrence instance.
By configuring the search timelines with "expand-recurrences" set to FALSE,
recurring events are loaded as their single master component instead of
expanding all individual occurrences.

Additionally:
- Update GcalSearchHitEvent subtitle to display "Recurring" (e.g. "Tomorrow • Recurring"
  or "Recurring") when the event has a recurrence rule.
- Safeguard gcal_event_format_date() when running without a default GApplication.

Fixes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/991
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/808>
This commit is contained in:
John Cardullo
2026-10-27 11:10:58 -07:00
parent 9d29a7a34e
commit cc4e537987
4 changed files with 30 additions and 4 deletions
+9 -2
View File
@@ -1911,8 +1911,15 @@ gcal_event_format_date (GcalEvent *self)
/* XXX: nasty... */
application = GCAL_APPLICATION (g_application_get_default ());
context = gcal_application_get_context (application);
time_format = gcal_context_get_time_format (context);
if (application)
{
context = gcal_application_get_context (application);
time_format = gcal_context_get_time_format (context);
}
else
{
time_format = GCAL_TIME_FORMAT_24H;
}
if (time_format == GCAL_TIME_FORMAT_24H)
hour_format = "%R";