diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2009-06-04 03:22:25 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@novell.com> | 2009-06-04 12:30:45 +0800 |
commit | dbee806d9db60bdaf0f6e1d15b26c3ee7e2dd9db (patch) | |
tree | 4f54966564f113391763b35ba730608a41acef2f /mail | |
parent | 1d5b6c6a13059f475d8f5db941f8145f362b3eba (diff) | |
download | gsoc2013-evolution-dbee806d9db60bdaf0f6e1d15b26c3ee7e2dd9db.tar.gz gsoc2013-evolution-dbee806d9db60bdaf0f6e1d15b26c3ee7e2dd9db.tar.zst gsoc2013-evolution-dbee806d9db60bdaf0f6e1d15b26c3ee7e2dd9db.zip |
Bug 584733 – Cannot create new account
Broken stuffs post, Anjal migration.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/em-account-editor.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 0016952cff..1f0fdb8ba9 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -183,6 +183,7 @@ typedef struct _EMAccountEditorPrivate { /* for druid page preparation */ guint identity_set:1; guint receive_set:1; + guint send_set:1; guint management_set:1; } EMAccountEditorPrivate; @@ -1420,7 +1421,7 @@ emae_refresh_providers(EMAccountEditor *emae, EMAccountEditorService *service) current[len] = 0; } } else { - current = g_strdup("imap"); + current = "imap"; } store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); @@ -1466,7 +1467,6 @@ emae_refresh_providers(EMAccountEditor *emae, EMAccountEditorService *service) i++; } - gtk_cell_layout_clear((GtkCellLayout *)dropdown); gtk_combo_box_set_model(dropdown, (GtkTreeModel *)store); gtk_cell_layout_pack_start((GtkCellLayout *)dropdown, cell, TRUE); @@ -2788,28 +2788,33 @@ emae_check_complete(EConfig *ec, const gchar *pageid, gpointer data) gtk_entry_set_text(emae->priv->transport.username, user); if (uri && (url = camel_url_new(uri, NULL)) != NULL) { refresh = TRUE; - camel_url_set_protocol(url, mail_servers[index].proto); - camel_url_set_param(url, "use_ssl", mail_servers[index].ssl); - camel_url_set_host (url, mail_servers[index].recv); camel_url_set_user (url, user); - gtk_entry_set_text(emae->priv->source.hostname, mail_servers[index].recv); - gtk_entry_set_text(emae->priv->transport.hostname, mail_servers[index].send); + if (index != -1) { + camel_url_set_protocol(url, mail_servers[index].proto); + camel_url_set_param(url, "use_ssl", mail_servers[index].ssl); + camel_url_set_host (url, mail_servers[index].recv); + gtk_entry_set_text(emae->priv->source.hostname, mail_servers[index].recv); + gtk_entry_set_text(emae->priv->transport.hostname, mail_servers[index].send); + camel_url_set_host (url, mail_servers[index].recv); + + } else { + camel_url_set_host (url, ""); + } + camel_url_set_user (url, user); uri = camel_url_to_string(url, 0); e_account_set_string(emae->account, E_ACCOUNT_SOURCE_URL, uri); - g_free(uri); camel_url_free(url); - } else { - g_warning("buz1\n"); } } } else if (!strcmp(pageid, "30.send")) { + if (!emae->priv->send_set) { CamelURL *url; gchar *at, *user; gint index; gchar *uri = (gchar *)e_account_get_string(emae->account, E_ACCOUNT_TRANSPORT_URL); - + emae->priv->send_set = 1; tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS); at = strchr(tmp, '@'); user = g_alloca(at-tmp+1); @@ -2818,7 +2823,7 @@ emae_check_complete(EConfig *ec, const gchar *pageid, gpointer data) at++; index = check_servers(at); - if (uri && (url = camel_url_new(uri, NULL)) != NULL) { + if (index != -1 && uri && (url = camel_url_new(uri, NULL)) != NULL) { refresh = TRUE; camel_url_set_protocol (url, "smtp"); camel_url_set_param(url, "use_ssl", mail_servers[index].ssl); @@ -2828,11 +2833,9 @@ emae_check_complete(EConfig *ec, const gchar *pageid, gpointer data) e_account_set_string(emae->account, E_ACCOUNT_TRANSPORT_URL, uri); g_free(uri); camel_url_free(url); - } else { - g_warning("buz2\n"); } - + } } else if (!strcmp(pageid, "20.receive_options")) { if (emae->priv->source.provider && emae->priv->extra_provider != emae->priv->source.provider) { |