diff options
author | Milan Crha <mcrha@redhat.com> | 2012-03-08 01:29:11 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-03-08 01:29:11 +0800 |
commit | 5501ee7267163100f6fa4c2c9d9c52392b188bdd (patch) | |
tree | 8effe9c44c2f452b59e7f16772a13622dc9f7c3b /mail | |
parent | ee82d456d057ac63ff3e9193d8bbe882bf02192c (diff) | |
download | gsoc2013-evolution-5501ee7267163100f6fa4c2c9d9c52392b188bdd.tar.gz gsoc2013-evolution-5501ee7267163100f6fa4c2c9d9c52392b188bdd.tar.zst gsoc2013-evolution-5501ee7267163100f6fa4c2c9d9c52392b188bdd.zip |
Bug #664169 - Default port is not selected by default
Diffstat (limited to 'mail')
-rw-r--r-- | mail/em-account-editor.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 21dea7dff7..d53289d3c5 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -2521,6 +2521,14 @@ emae_refresh_providers (EMAccountEditor *emae, gtk_combo_box_set_active_id ( GTK_COMBO_BOX (combo_box), service->protocol); + + /* make sure at least something is selected; + this applies for cases when user changed from provider which was + store and transport together, to a store provider only (like from + exchange to imap provider), which left unselected transport type + */ + if (gtk_combo_box_get_active (GTK_COMBO_BOX (combo_box)) == -1) + gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0); } static void @@ -2927,10 +2935,18 @@ emae_setup_service (EMAccountEditor *emae, /* old authtype will be destroyed when we exit */ emae_refresh_providers (emae, service); - if (provider != NULL && provider->port_entries) + if (provider != NULL && provider->port_entries) { e_port_entry_set_camel_entries ( service->port, provider->port_entries); + /* update also port in settings, because it's not bind yet */ + if (service->settings && CAMEL_IS_NETWORK_SETTINGS (service->settings)) { + camel_network_settings_set_port ( + CAMEL_NETWORK_SETTINGS (service->settings), + e_port_entry_get_port (service->port)); + } + } + emae_service_provider_changed (service); } |