aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-11-13 04:22:01 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-11-13 04:22:50 +0800
commit3333eb445be869a93935e6417d9cdabb5cffb594 (patch)
tree7c477deaa411ac7f01cd8c6ac68a3b24669a24a4 /mail
parent29310c0c67025e0ca16f7731055a4c7a427306e5 (diff)
downloadgsoc2013-evolution-3333eb445be869a93935e6417d9cdabb5cffb594.tar.gz
gsoc2013-evolution-3333eb445be869a93935e6417d9cdabb5cffb594.tar.zst
gsoc2013-evolution-3333eb445be869a93935e6417d9cdabb5cffb594.zip
Bug 663836 - emae_send_page() gets wrong CamelProvider
Also silence some runtime warnings when choosing server type 'None'.
Diffstat (limited to 'mail')
-rw-r--r--mail/em-account-editor.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index adf051c610..ca90654faf 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -2214,10 +2214,12 @@ emae_service_provider_changed (EMAccountEditorService *service)
{
EConfig *config;
EMConfigTargetSettings *target;
- CamelProvider *provider;
+ CamelProvider *provider = NULL;
const gchar *description;
- provider = camel_provider_get (service->protocol, NULL);
+ /* Protocol is NULL when server type is 'None'. */
+ if (service->protocol != NULL)
+ provider = camel_provider_get (service->protocol, NULL);
description = (provider != NULL) ? provider->description : "";
gtk_label_set_text (service->description, description);
@@ -2566,7 +2568,7 @@ emae_setup_service (EMAccountEditor *emae,
GtkBuilder *builder)
{
struct _service_info *info = &emae_service_info[service->type];
- CamelProvider *provider;
+ CamelProvider *provider = NULL;
CamelURL *url;
/* GtkComboBox internalizes ID strings, which for the provider
@@ -2576,7 +2578,9 @@ emae_setup_service (EMAccountEditor *emae,
service->protocol = g_intern_string (url->protocol);
camel_url_free (url);
- provider = camel_provider_get (service->protocol, NULL);
+ /* Protocol is NULL when server type is 'None'. */
+ if (service->protocol != NULL)
+ provider = camel_provider_get (service->protocol, NULL);
/* Extract all widgets we need from the builder file. */
@@ -3589,7 +3593,7 @@ emae_send_page (EConfig *ec,
GtkWidget *w;
GtkBuilder *builder;
- provider = emae_get_store_provider (emae);
+ provider = emae_get_transport_provider (emae);
if (provider == NULL)
return NULL;
@@ -4269,7 +4273,7 @@ static gboolean
emae_service_complete (EMAccountEditor *emae,
EMAccountEditorService *service)
{
- CamelProvider *provider;
+ CamelProvider *provider = NULL;
const gchar *host = NULL;
const gchar *path = NULL;
const gchar *user = NULL;
@@ -4282,7 +4286,9 @@ emae_service_complete (EMAccountEditor *emae,
gboolean need_port;
gboolean need_user;
- provider = camel_provider_get (service->protocol, NULL);
+ /* Protocol is NULL when server type is 'None'. */
+ if (service->protocol != NULL)
+ provider = camel_provider_get (service->protocol, NULL);
if (provider == NULL)
return TRUE;