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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user