aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-03-08 01:29:11 +0800
committerMilan Crha <mcrha@redhat.com>2012-03-08 01:29:11 +0800
commit5501ee7267163100f6fa4c2c9d9c52392b188bdd (patch)
tree8effe9c44c2f452b59e7f16772a13622dc9f7c3b
parentee82d456d057ac63ff3e9193d8bbe882bf02192c (diff)
downloadgsoc2013-evolution-5501ee7267163100f6fa4c2c9d9c52392b188bdd.tar
gsoc2013-evolution-5501ee7267163100f6fa4c2c9d9c52392b188bdd.tar.gz
gsoc2013-evolution-5501ee7267163100f6fa4c2c9d9c52392b188bdd.tar.bz2
gsoc2013-evolution-5501ee7267163100f6fa4c2c9d9c52392b188bdd.tar.lz
gsoc2013-evolution-5501ee7267163100f6fa4c2c9d9c52392b188bdd.tar.xz
gsoc2013-evolution-5501ee7267163100f6fa4c2c9d9c52392b188bdd.tar.zst
gsoc2013-evolution-5501ee7267163100f6fa4c2c9d9c52392b188bdd.zip
Bug #664169 - Default port is not selected by default
-rw-r--r--mail/em-account-editor.c18
-rw-r--r--widgets/misc/e-port-entry.c6
2 files changed, 19 insertions, 5 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);
}
diff --git a/widgets/misc/e-port-entry.c b/widgets/misc/e-port-entry.c
index 84a514b653..470249a772 100644
--- a/widgets/misc/e-port-entry.c
+++ b/widgets/misc/e-port-entry.c
@@ -362,10 +362,6 @@ e_port_entry_init (EPortEntry *port_entry)
gtk_cell_layout_add_attribute (
GTK_CELL_LAYOUT (port_entry),
renderer, "text", PORT_DESC_COLUMN);
-
- g_signal_connect (
- port_entry, "notify::security-method",
- G_CALLBACK (port_entry_method_changed), NULL);
}
GtkWidget *
@@ -474,6 +470,8 @@ e_port_entry_set_security_method (EPortEntry *port_entry,
port_entry->priv->method = method;
+ port_entry_method_changed (port_entry);
+
g_object_notify (G_OBJECT (port_entry), "security-method");
}