[evolution] I#476 - Hide "Server handles meeting invitations" for VJOURNAL/CalDAV
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#476 - Hide "Server handles meeting invitations" for VJOURNAL/CalDAV
- Date: Fri, 7 Jun 2019 13:38:56 +0000 (UTC)
commit adbe4d5e522394d1f46731d30ed25f8c7d58841a
Author: Milan Crha <mcrha redhat com>
Date: Fri Jun 7 15:40:53 2019 +0200
I#476 - Hide "Server handles meeting invitations" for VJOURNAL/CalDAV
Closes https://gitlab.gnome.org/GNOME/evolution/issues/476
.../evolution-cal-config-caldav.c | 41 +++++++++++++---------
1 file changed, 24 insertions(+), 17 deletions(-)
---
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 fc991468a4..0c50551d76 100644
--- a/src/modules/cal-config-caldav/evolution-cal-config-caldav.c
+++ b/src/modules/cal-config-caldav/evolution-cal-config-caldav.c
@@ -89,6 +89,7 @@ cal_config_caldav_run_dialog (GtkButton *button,
ESourceConfig *config;
ESourceRegistry *registry;
ESourceWebdav *webdav_extension;
+ ECalClientSourceType source_type;
ECredentialsPrompter *prompter;
SoupURI *uri;
gchar *base_url;
@@ -103,8 +104,9 @@ cal_config_caldav_run_dialog (GtkButton *button,
parent = gtk_widget_get_toplevel (GTK_WIDGET (config));
parent = gtk_widget_is_toplevel (parent) ? parent : NULL;
+ source_type = e_cal_source_config_get_source_type (E_CAL_SOURCE_CONFIG (config));
- switch (e_cal_source_config_get_source_type (E_CAL_SOURCE_CONFIG (config))) {
+ switch (source_type) {
case E_CAL_CLIENT_SOURCE_TYPE_EVENTS:
supports_filter = E_WEBDAV_DISCOVER_SUPPORTS_EVENTS;
title = _("Choose a Calendar");
@@ -158,13 +160,15 @@ cal_config_caldav_run_dialog (GtkButton *button,
e_source_webdav_set_display_name (webdav_extension, display_name);
e_source_webdav_set_soup_uri (webdav_extension, uri);
- e_source_webdav_set_calendar_auto_schedule (webdav_extension, (supports &
E_WEBDAV_DISCOVER_SUPPORTS_CALENDAR_AUTO_SCHEDULE) != 0);
+
+ if (source_type != E_CAL_CLIENT_SOURCE_TYPE_MEMOS)
+ e_source_webdav_set_calendar_auto_schedule (webdav_extension,
(supports & E_WEBDAV_DISCOVER_SUPPORTS_CALENDAR_AUTO_SCHEDULE) != 0);
if (color && *color) {
ESourceSelectable *selectable_extension;
const gchar *extension_name;
- switch (e_cal_source_config_get_source_type (E_CAL_SOURCE_CONFIG
(config))) {
+ switch (source_type) {
case E_CAL_CLIENT_SOURCE_TYPE_EVENTS:
extension_name = E_SOURCE_EXTENSION_CALENDAR;
break;
@@ -321,12 +325,11 @@ cal_config_caldav_insert_widgets (ESourceConfigBackend *backend,
e_source_config_add_secure_connection_for_webdav (
config, scratch_source);
+ source_type = e_cal_source_config_get_source_type (E_CAL_SOURCE_CONFIG (config));
+
if (!collection_source) {
e_source_config_add_user_entry (config, scratch_source);
- source_type = e_cal_source_config_get_source_type (
- E_CAL_SOURCE_CONFIG (config));
-
switch (source_type) {
case E_CAL_CLIENT_SOURCE_TYPE_EVENTS:
label = _("Find Calendars");
@@ -358,23 +361,27 @@ cal_config_caldav_insert_widgets (ESourceConfigBackend *backend,
context->email_entry = g_object_ref (widget);
gtk_widget_show (widget);
- widget = gtk_check_button_new_with_label (
- _("Server handles meeting invitations"));
- e_source_config_insert_widget (
- config, scratch_source, NULL, widget);
- context->auto_schedule_toggle = g_object_ref (widget);
- gtk_widget_show (widget);
+ if (source_type != E_CAL_CLIENT_SOURCE_TYPE_MEMOS) {
+ widget = gtk_check_button_new_with_label (
+ _("Server handles meeting invitations"));
+ e_source_config_insert_widget (
+ config, scratch_source, NULL, widget);
+ context->auto_schedule_toggle = g_object_ref (widget);
+ gtk_widget_show (widget);
+ }
e_source_config_add_refresh_interval (config, scratch_source);
extension_name = E_SOURCE_EXTENSION_WEBDAV_BACKEND;
extension = e_source_get_extension (scratch_source, extension_name);
- e_binding_bind_property (
- extension, "calendar-auto-schedule",
- context->auto_schedule_toggle, "active",
- G_BINDING_BIDIRECTIONAL |
- G_BINDING_SYNC_CREATE);
+ if (context->auto_schedule_toggle) {
+ e_binding_bind_property (
+ extension, "calendar-auto-schedule",
+ context->auto_schedule_toggle, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+ }
e_binding_bind_object_text_property (
extension, "email-address",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]