diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-08-15 22:38:14 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-14 20:08:50 +0800 |
commit | f30ea2184c4983ab05e7409bc7f8c9923a654bb2 (patch) | |
tree | 2b2fc7f2ed679202906111a37ce7cec232cf6cb9 /capplet | |
parent | 06f3ea68de9622da4ed43049e8d47b98d7330030 (diff) | |
download | gsoc2013-evolution-f30ea2184c4983ab05e7409bc7f8c9923a654bb2.tar gsoc2013-evolution-f30ea2184c4983ab05e7409bc7f8c9923a654bb2.tar.gz gsoc2013-evolution-f30ea2184c4983ab05e7409bc7f8c9923a654bb2.tar.bz2 gsoc2013-evolution-f30ea2184c4983ab05e7409bc7f8c9923a654bb2.tar.lz gsoc2013-evolution-f30ea2184c4983ab05e7409bc7f8c9923a654bb2.tar.xz gsoc2013-evolution-f30ea2184c4983ab05e7409bc7f8c9923a654bb2.tar.zst gsoc2013-evolution-f30ea2184c4983ab05e7409bc7f8c9923a654bb2.zip |
MailAccountView: Adapt to URL parameter renames.
It's "security-method" now instead of "use_ssl".
Diffstat (limited to 'capplet')
-rw-r--r-- | capplet/settings/mail-account-view.c | 74 |
1 files changed, 36 insertions, 38 deletions
diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c index d1c5246702..e579e6a070 100644 --- a/capplet/settings/mail-account-view.c +++ b/capplet/settings/mail-account-view.c @@ -549,7 +549,7 @@ create_review (MailAccountView *view) gtk_widget_show (label); PACK_BOX (label); gtk_table_attach ((GtkTable *) table, box, 0, 1, 7, 8, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); - enc = (gchar *)camel_url_get_param(url, "use_ssl"); + enc = (gchar *)camel_url_get_param(url, "security-method"); entry = gtk_label_new (enc ? enc : _("never")); gtk_widget_show (entry); PACK_BOX (entry); @@ -584,7 +584,7 @@ create_review (MailAccountView *view) PACK_BOX (entry); gtk_table_attach ((GtkTable *) table, box, 2, 3, 6, 7, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); - enc = (gchar *)camel_url_get_param(url, "use_ssl"); + enc = (gchar *)camel_url_get_param(url, "security-method"); entry = gtk_label_new (enc ? enc : _("never")); gtk_widget_show (entry); PACK_BOX (entry); @@ -661,13 +661,13 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) e_account_set_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_NAME, e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_ID_ADDRESS)); if (uri != NULL && (url = camel_url_new (uri, NULL)) != NULL) { - camel_url_set_param(url, "check_all", "1"); - camel_url_set_param(url, "sync_offline", "1"); + camel_url_set_param(url, "check-all", "true"); + camel_url_set_param(url, "stay-synchronized", "true"); if (!mav->original) { e_account_set_bool (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_SOURCE_AUTO_CHECK, TRUE); } - if (!mav->original && strcmp(url->protocol, "pop") == 0) { + if (!mav->original && strcmp (url->protocol, "pop") == 0) { e_account_set_bool (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_SOURCE_KEEP_ON_SERVER, TRUE); } @@ -991,47 +991,45 @@ emae_check_servers (const gchar *email) sdata->recv_port = provider->recv_port; sdata->send = provider->send_hostname; sdata->send_port = provider->send_port; - if (strcmp(provider->recv_type, "pop3") == 0) - sdata->proto = g_strdup("pop"); - else if (strcmp(provider->recv_type, "imap") == 0) - sdata->proto = g_strdup("imapx"); + if (strcmp (provider->recv_type, "pop3") == 0) + sdata->proto = g_strdup ("pop"); + else if (strcmp (provider->recv_type, "imap") == 0) + sdata->proto = g_strdup ("imapx"); else sdata->proto = provider->recv_type; if (provider->recv_socket_type) { - if (g_ascii_strcasecmp(provider->recv_socket_type, "SSL") == 0) { - sdata->ssl = g_strdup("always"); - sdata->recv_sock = g_strdup("always"); - } - else if (g_ascii_strcasecmp(provider->recv_socket_type, "secure") == 0) { - sdata->ssl = g_strdup("always"); - sdata->recv_sock = g_strdup("always"); - } - else if (g_ascii_strcasecmp(provider->recv_socket_type, "STARTTLS") == 0) { - sdata->ssl = g_strdup("when-possible"); - sdata->recv_sock = g_strdup("when-possible"); - } - else if (g_ascii_strcasecmp(provider->recv_socket_type, "TLS") == 0) { - sdata->ssl = g_strdup("when-possible"); - sdata->recv_sock = g_strdup("when-possible"); - } - else { - sdata->ssl = g_strdup("never"); - sdata->recv_sock = g_strdup("never"); - } + CamelNetworkSecurityMethod method; + + if (g_ascii_strcasecmp (provider->recv_socket_type, "SSL") == 0) + method = CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT; + else if (g_ascii_strcasecmp (provider->recv_socket_type, "secure") == 0) + method = CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT; + else if (g_ascii_strcasecmp (provider->recv_socket_type, "STARTTLS") == 0) + method = CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT; + else if (g_ascii_strcasecmp (provider->recv_socket_type, "TLS") == 0) + method = CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT; + else + method = CAMEL_NETWORK_SECURITY_METHOD_NONE; + sdata->security_method = method; + sdata->recv_security_method = method; } if (provider->send_socket_type) { - if (g_ascii_strcasecmp(provider->send_socket_type, "SSL") == 0) - sdata->send_sock = g_strdup("always"); - else if (g_ascii_strcasecmp(provider->send_socket_type, "secure") == 0) - sdata->send_sock = g_strdup("always"); - else if (g_ascii_strcasecmp(provider->send_socket_type, "STARTTLS") == 0) - sdata->send_sock = g_strdup("when-possible"); - else if (g_ascii_strcasecmp(provider->send_socket_type, "TLS") == 0) - sdata->send_sock = g_strdup("when-possible"); + CamelNetworkSecurityMethod method; + + if (g_ascii_strcasecmp (provider->send_socket_type, "SSL") == 0) + method = CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT; + else if (g_ascii_strcasecmp (provider->send_socket_type, "secure") == 0) + method = CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT; + else if (g_ascii_strcasecmp (provider->send_socket_type, "STARTTLS") == 0) + method = CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT; + else if (g_ascii_strcasecmp (provider->send_socket_type, "TLS") == 0) + method = CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT; else - sdata->send_sock = g_strdup("never"); + method = CAMEL_NETWORK_SECURITY_METHOD_NONE; + + sdata->send_security_method = method; } sdata->send_auth = provider->send_auth; |