event-editor: Add attendees section and details page

UX/UI designed by Philipp Sauberzweig (@PhilippSauberz).

The event editor dialog is now a NavigationView and the participants
details open in a separate page. Group attendees/participants in
AdwPreferencesGroups and bind groups'
ListBox widgets to backing filter models. These are just "views" into a
single GListStore containing all the event attendees.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/671>
This commit is contained in:
mindonwarp
2026-01-21 19:37:52 +00:00
committed by Marge Bot
parent 884855ee0b
commit ba3ca061ce
17 changed files with 1495 additions and 83 deletions
+40
View File
@@ -1409,3 +1409,43 @@ gcal_create_writable_calendars_model (GcalManager *manager)
return G_LIST_MODEL (g_steal_pointer (&filter_model));
}
/**
* gcal_get_email_from_mailto_uri:
* @mailto_uri: the original mailto string.
*
* Tries to strip the "mailto:" part of the incoming string.
* The incoming original URI should be in the form: "mailto:email.address@host.org"
* if it is coming from a valid iCal event.
*
* If the incoming string is malformed, i.e. contains more than one occurrence
* of the ":" (colon) character, the original string is returned.
* This may or may not be desirable.
*
* Returns: (transfer full) (nullable): The URI without the "mailto:" part.
*/
const gchar *
gcal_get_email_from_mailto_uri (const gchar *mailto_uri)
{
if (mailto_uri == NULL)
return NULL;
GStrv uri_pieces = g_strsplit (mailto_uri, ":", 0);
if (g_strv_length (uri_pieces) != 2)
{
g_strfreev (uri_pieces);
g_warning ("Malformed organizer URI (value): %s", mailto_uri);
/* note: There was a crash here! Copying is important
* because the original string may be owned by someone else.
* (The "mailto_uri" from GcalEventAttendee and GcalEventOrganizer are not transfered) */
/* return original string */
return g_strdup (mailto_uri);
}
gchar *address = g_strdup (uri_pieces[1]);
g_strfreev (uri_pieces);
return address;
}
+1
View File
@@ -136,4 +136,5 @@ SoupSession * gcal_create_soup_session (void);
GListModel * gcal_create_writable_calendars_model (GcalManager *manager);
const gchar * gcal_get_email_from_mailto_uri (const gchar *mailto_uri);
#endif /* __GCAL_UTILS_H__ */