[evolution] I#111 - Disable secure/insecure http change for WebDAV collection sources
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#111 - Disable secure/insecure http change for WebDAV collection sources
- Date: Wed, 12 Sep 2018 11:55:28 +0000 (UTC)
commit 6eedee3e28700705f600b4d6707068c7e25723dd
Author: Milan Crha <mcrha redhat com>
Date: Thu Sep 6 14:49:56 2018 +0200
I#111 - Disable secure/insecure http change for WebDAV collection sources
Closes https://gitlab.gnome.org/GNOME/evolution/issues/111
src/e-util/e-source-config.c | 55 ++++++++++++++++++++++++--------------------
1 file changed, 30 insertions(+), 25 deletions(-)
---
diff --git a/src/e-util/e-source-config.c b/src/e-util/e-source-config.c
index cd830684d0..9fe29357ab 100644
--- a/src/e-util/e-source-config.c
+++ b/src/e-util/e-source-config.c
@@ -1504,43 +1504,48 @@ e_source_config_add_secure_connection_for_webdav (ESourceConfig *config,
GtkWidget *widget;
ESourceExtension *extension;
ESourceAuthentication *authentication_extension;
+ ESource *collection_source;
const gchar *extension_name;
const gchar *label;
g_return_if_fail (E_IS_SOURCE_CONFIG (config));
g_return_if_fail (E_IS_SOURCE (scratch_source));
- extension_name = E_SOURCE_EXTENSION_SECURITY;
- extension = e_source_get_extension (scratch_source, extension_name);
-
- label = _("Use a secure connection");
- widget = gtk_check_button_new_with_label (label);
- e_source_config_insert_widget (config, scratch_source, NULL, widget);
- gtk_widget_show (widget);
-
- e_binding_bind_property (
- extension, "secure",
- widget, "active",
- G_BINDING_BIDIRECTIONAL |
- G_BINDING_SYNC_CREATE);
-
- extension_name = E_SOURCE_EXTENSION_AUTHENTICATION;
- authentication_extension =
- e_source_get_extension (scratch_source, extension_name);
-
- e_binding_bind_property_full (
- extension, "secure",
- authentication_extension, "port",
- G_BINDING_DEFAULT,
- secure_to_port_cb,
- NULL, NULL, NULL);
+ collection_source = e_source_config_get_collection_source (config);
+
+ if (!collection_source) {
+ extension_name = E_SOURCE_EXTENSION_SECURITY;
+ extension = e_source_get_extension (scratch_source, extension_name);
+
+ label = _("Use a secure connection");
+ widget = gtk_check_button_new_with_label (label);
+ e_source_config_insert_widget (config, scratch_source, NULL, widget);
+ gtk_widget_show (widget);
+
+ e_binding_bind_property (
+ extension, "secure",
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+
+ extension_name = E_SOURCE_EXTENSION_AUTHENTICATION;
+ authentication_extension =
+ e_source_get_extension (scratch_source, extension_name);
+
+ e_binding_bind_property_full (
+ extension, "secure",
+ authentication_extension, "port",
+ G_BINDING_DEFAULT,
+ secure_to_port_cb,
+ NULL, NULL, NULL);
+ }
extension_name = E_SOURCE_EXTENSION_WEBDAV_BACKEND;
extension = e_source_get_extension (scratch_source, extension_name);
widget = gtk_button_new_with_mnemonic (
_("Unset _trust for SSL/TLS certificate"));
- gtk_widget_set_margin_left (widget, 24);
+ gtk_widget_set_margin_left (widget, collection_source ? 0 : 24);
e_source_config_insert_widget (config, scratch_source, NULL, widget);
gtk_widget_show (widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]