[evolution] Bug #664169 - Default port is not selected by default
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #664169 - Default port is not selected by default
- Date: Wed, 7 Mar 2012 17:29:38 +0000 (UTC)
commit 5501ee7267163100f6fa4c2c9d9c52392b188bdd
Author: Milan Crha <mcrha redhat com>
Date: Wed Mar 7 18:29:11 2012 +0100
Bug #664169 - Default port is not selected by default
mail/em-account-editor.c | 18 +++++++++++++++++-
widgets/misc/e-port-entry.c | 6 ++----
2 files changed, 19 insertions(+), 5 deletions(-)
---
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 21dea7d..d53289d 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 84a514b..470249a 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");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]