From abf1336752e767c83bbf119fc5eb615470a47998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD=20=D0=9F=D0=B0=D0=BB=D0=B0?= =?UTF-8?q?=D1=83=D0=B7=D0=BE=D0=B2?= Date: Sat, 12 Oct 2024 14:02:38 +0300 Subject: [PATCH] M!143 - cal-config-caldav: request checks for DAV:calendar-auto-schedule EWebDAVBrowser: Indicate when a collection announces DAV:calendar-auto-schedule Close https://gitlab.gnome.org/GNOME/evolution/-/merge_requests/143 --- src/e-util/e-webdav-browser.c | 8 +++++++- .../cal-config-caldav/evolution-cal-config-caldav.c | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/e-util/e-webdav-browser.c b/src/e-util/e-webdav-browser.c index 0455ef31b9..6838e57f3c 100644 --- a/src/e-util/e-webdav-browser.c +++ b/src/e-util/e-webdav-browser.c @@ -536,7 +536,10 @@ webdav_browser_update_ui (EWebDAVBrowser *webdav_browser) } if (rd->resource->kind == E_WEBDAV_RESOURCE_KIND_CALENDAR) { icon_name = "x-office-calendar"; - g_string_prepend (type_info, _("Calendar")); + if ((rd->resource->supports & E_WEBDAV_DISCOVER_SUPPORTS_CALENDAR_AUTO_SCHEDULE) != 0) + g_string_prepend (type_info, _("Calendar handling meeting invitations")); + else + g_string_prepend (type_info, _("Calendar")); } else if (rd->resource->kind == E_WEBDAV_RESOURCE_KIND_SCHEDULE_INBOX) { icon_name = "mail-inbox"; g_string_prepend (type_info, _("Scheduling Inbox")); @@ -931,6 +934,9 @@ webdav_browser_gather_href_resources_sync (EWebDAVBrowser *webdav_browser, there might not be any login errors here, but even if, then bad luck. */ if (e_webdav_session_options_sync (session, resource->href, &capabilities, &allows, cancellable, NULL)) { editing_flags = webdav_browser_options_to_editing_flags (capabilities, allows); + if (capabilities && g_hash_table_contains (capabilities, E_WEBDAV_CAPABILITY_CALENDAR_AUTO_SCHEDULE)) + resource->supports |= E_WEBDAV_DISCOVER_SUPPORTS_CALENDAR_AUTO_SCHEDULE; + } if (capabilities) diff --git a/src/modules/cal-config-caldav/evolution-cal-config-caldav.c b/src/modules/cal-config-caldav/evolution-cal-config-caldav.c index b678c10634..2da62e5654 100644 --- a/src/modules/cal-config-caldav/evolution-cal-config-caldav.c +++ b/src/modules/cal-config-caldav/evolution-cal-config-caldav.c @@ -108,7 +108,7 @@ cal_config_caldav_run_dialog (GtkButton *button, switch (source_type) { case E_CAL_CLIENT_SOURCE_TYPE_EVENTS: - supports_filter = E_WEBDAV_DISCOVER_SUPPORTS_EVENTS; + supports_filter = E_WEBDAV_DISCOVER_SUPPORTS_EVENTS | E_WEBDAV_DISCOVER_SUPPORTS_CALENDAR_AUTO_SCHEDULE; title = _("Choose a Calendar"); break; case E_CAL_CLIENT_SOURCE_TYPE_MEMOS: @@ -116,7 +116,7 @@ cal_config_caldav_run_dialog (GtkButton *button, title = _("Choose a Memo List"); break; case E_CAL_CLIENT_SOURCE_TYPE_TASKS: - supports_filter = E_WEBDAV_DISCOVER_SUPPORTS_TASKS; + supports_filter = E_WEBDAV_DISCOVER_SUPPORTS_TASKS | E_WEBDAV_DISCOVER_SUPPORTS_CALENDAR_AUTO_SCHEDULE; title = _("Choose a Task List"); break; default: -- GitLab