diff options
author | Punit Jain <jpunit@novell.com> | 2011-11-09 23:46:12 +0800 |
---|---|---|
committer | Punit Jain <jpunit@novell.com> | 2011-11-09 23:46:12 +0800 |
commit | 7f962687ba526b96d56508b67bdd8d42a9ad188b (patch) | |
tree | c887b59b851640930568a8067d031e80bf7554b8 /capplet | |
parent | e13266896bbd6f1ae809479d09029b076c368135 (diff) | |
download | gsoc2013-evolution-7f962687ba526b96d56508b67bdd8d42a9ad188b.tar.gz gsoc2013-evolution-7f962687ba526b96d56508b67bdd8d42a9ad188b.tar.zst gsoc2013-evolution-7f962687ba526b96d56508b67bdd8d42a9ad188b.zip |
Bug #636214 fetch configuration details from server
Code changes
Diffstat (limited to 'capplet')
-rw-r--r-- | capplet/settings/Makefile.am | 6 | ||||
-rw-r--r-- | capplet/settings/mail-account-view.c | 85 |
2 files changed, 1 insertions, 90 deletions
diff --git a/capplet/settings/Makefile.am b/capplet/settings/Makefile.am index 9bd84db94b..1367fd5a75 100644 --- a/capplet/settings/Makefile.am +++ b/capplet/settings/Makefile.am @@ -1,5 +1,3 @@ -SUBDIRS = mail-autoconfig - privsolib_LTLIBRARIES = libevolution-mail-settings.la libevolution_mail_settings_la_CPPFLAGS = \ @@ -48,9 +46,7 @@ libevolution_mail_settings_la_SOURCES = \ mail-capplet-shell.c \ mail-capplet-shell.h \ anjal-mail-view.h \ - anjal-mail-view.c \ - mail-guess-servers.c \ - mail-guess-servers.h + anjal-mail-view.c libevolution_mail_settings_la_LIBADD = \ $(EVOLUTION_DATA_SERVER_LIBS) \ diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c index 3617c6a866..85afccd837 100644 --- a/capplet/settings/mail-account-view.c +++ b/capplet/settings/mail-account-view.c @@ -33,7 +33,6 @@ #include "mail-view.h" #include "e-util/e-config.h" #include "mail/e-mail-backend.h" -#include "mail-guess-servers.h" struct _MailAccountViewPrivate { GtkWidget *tab_str; @@ -962,89 +961,6 @@ mav_construct_page (MailAccountView *view, return (GtkWidget *) page; } -static ServerData * -emae_check_servers (const gchar *email) -{ - ServerData *sdata = g_new0 (ServerData, 1); - EmailProvider *provider = g_new0 (EmailProvider, 1); - gchar *dupe = g_strdup (email); - gchar *tmp; - - /* FIXME: Find a way to free the provider once given to account settings. */ - provider->email = (gchar *) email; - tmp = strchr (email, '@'); - tmp++; - provider->domain = tmp; - tmp = strchr (dupe, '@'); - *tmp = 0; - provider->username = (gchar *) g_quark_to_string (g_quark_from_string (dupe)); - g_free (dupe); - - if (!mail_guess_servers (provider)) { - g_free (provider); - g_free (sdata); - return NULL; - } - /*printf("Recv: %s\n%s(%s), %s by %s \n Send: %s\n%s(%s), %s by %s\n via %s to %s\n", - provider->recv_type, provider->recv_hostname, provider->recv_port, provider->recv_username, provider->recv_auth, - provider->send_type, provider->send_hostname, provider->send_port, provider->send_username, provider->send_auth, - provider->recv_socket_type, provider->send_socket_type); */ - - sdata->recv = provider->recv_hostname; - 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"); - else - sdata->proto = provider->recv_type; - if (provider->recv_socket_type) { - 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) { - 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 - method = CAMEL_NETWORK_SECURITY_METHOD_NONE; - - sdata->send_security_method = method; - } - - sdata->send_auth = provider->send_auth; - sdata->recv_auth = provider->recv_auth; - sdata->send_user = provider->send_username; - sdata->recv_user = provider->recv_username; - - g_free (provider); - - return sdata; -} - static void next_page (GtkWidget *entry, MailAccountView *mav) @@ -1080,7 +996,6 @@ mail_account_view_construct (MailAccountView *view, view->original, EMAE_PAGES, backend, "org.gnome.evolution.mail.config.accountWizard", view->wpages); gtk_widget_hide (e_config_create_widget (E_CONFIG (view->edit->config))); - view->edit->emae_check_servers = emae_check_servers; if (!view->original) { e_account_set_bool (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_SOURCE_SAVE_PASSWD, TRUE); e_account_set_bool (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_TRANSPORT_SAVE_PASSWD, TRUE); |