aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2010-12-03 07:33:57 +0800
committerFederico Mena Quintero <federico@novell.com>2010-12-04 07:57:15 +0800
commitce1832ea6c14c24f20993d5afe79999e8f6baa08 (patch)
tree839cf050a70015550ccd990ecc87eec75986a2bc /mail
parent100956ab098a4cccf2d9f2f5951c85d27741c5ee (diff)
downloadgsoc2013-evolution-ce1832ea6c14c24f20993d5afe79999e8f6baa08.tar
gsoc2013-evolution-ce1832ea6c14c24f20993d5afe79999e8f6baa08.tar.gz
gsoc2013-evolution-ce1832ea6c14c24f20993d5afe79999e8f6baa08.tar.bz2
gsoc2013-evolution-ce1832ea6c14c24f20993d5afe79999e8f6baa08.tar.lz
gsoc2013-evolution-ce1832ea6c14c24f20993d5afe79999e8f6baa08.tar.xz
gsoc2013-evolution-ce1832ea6c14c24f20993d5afe79999e8f6baa08.tar.zst
gsoc2013-evolution-ce1832ea6c14c24f20993d5afe79999e8f6baa08.zip
Only set the URL's defaults when we are creating a new account
Diffstat (limited to 'mail')
-rw-r--r--mail/em-account-editor.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index c55c06695f..f2ad70f110 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -220,7 +220,7 @@ static void emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService
static void em_account_editor_construct (EMAccountEditor *emae, EMAccountEditorType type, const gchar *id);
static void emae_account_folder_changed (EMFolderSelectionButton *folder, EMAccountEditor *emae);
static ServerData * emae_check_servers (const gchar *email);
-static void set_provider_defaults_on_url (CamelProvider *provider, CamelURL *url)
+static void set_provider_defaults_on_url (EMAccountEditor *emae, CamelProvider *provider, CamelURL *url);
static gpointer parent_class;
@@ -1540,7 +1540,7 @@ emae_service_provider_changed (EMAccountEditorService *service)
gint enable;
GtkWidget *dwidget = NULL;
- set_provider_defaults_on_url (service->provider, url);
+ set_provider_defaults_on_url (service->emae, service->provider, url);
camel_url_set_protocol (url, service->provider->protocol);
gtk_label_set_text (service->description, service->provider->description);
@@ -1733,7 +1733,7 @@ emae_refresh_providers (EMAccountEditor *emae, EMAccountEditorService *service)
CamelURL *url = emae_account_url (emae, info->account_uri_key);
camel_url_set_protocol (url, provider->protocol);
- set_provider_defaults_on_url (provider, url);
+ set_provider_defaults_on_url (emae, provider, url);
emae_uri_changed (service, url);
camel_url_free (url);
}
@@ -3472,7 +3472,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data)
camel_url_set_protocol (url, sdata->proto);
if (emae->priv->source.provider)
- set_provider_defaults_on_url (emae->priv->source.provider, url);
+ set_provider_defaults_on_url (emae, emae->priv->source.provider, url);
if (sdata->recv_sock && *sdata->recv_sock)
camel_url_set_param (url, "use_ssl", sdata->recv_sock);
@@ -3518,7 +3518,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data)
camel_url_set_protocol (url, "smtp");
if (emae->priv->source.provider)
- set_provider_defaults_on_url (emae->priv->source.provider, url);
+ set_provider_defaults_on_url (emae, emae->priv->source.provider, url);
if (sdata->send_sock && *sdata->send_sock)
camel_url_set_param (url, "use_ssl", sdata->send_sock);
@@ -3742,11 +3742,14 @@ set_checkspin_default (CamelProviderConfEntry *entry, CamelURL *url)
}
static void
-set_provider_defaults_on_url (CamelProvider *provider, CamelURL *url)
+set_provider_defaults_on_url (EMAccountEditor *emae, CamelProvider *provider, CamelURL *url)
{
CamelProviderConfEntry *entries;
int i;
+ if (!emae->priv->new_account)
+ return;
+
entries = provider->extra_conf;
for (i = 0; entries && entries[i].type != CAMEL_PROVIDER_CONF_END; i++) {