aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-account-editor.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-01-18 04:11:36 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-18 04:11:36 +0800
commit99a779567bde67b8994af25d13bfd6f6e48fea04 (patch)
tree3c5ea3a51b11eb1791089f8d629042a260c98d0e /mail/mail-account-editor.c
parent74325ce55b6f25801f6a23f0fe33b3cfedb6181e (diff)
downloadgsoc2013-evolution-99a779567bde67b8994af25d13bfd6f6e48fea04.tar.gz
gsoc2013-evolution-99a779567bde67b8994af25d13bfd6f6e48fea04.tar.zst
gsoc2013-evolution-99a779567bde67b8994af25d13bfd6f6e48fea04.zip
Handle NULL source and, while we're at it, transport URLs. Apparently
2001-01-17 Jeffrey Stedfast <fejj@ximian.com> * mail-account-editor.c (construct): Handle NULL source and, while we're at it, transport URLs. Apparently camel_url_new() and/or camel-url_free() don't handle NULL input well. * mail-accounts.c (load_accounts): Handle NULL source URLs. svn path=/trunk/; revision=7595
Diffstat (limited to 'mail/mail-account-editor.c')
-rw-r--r--mail/mail-account-editor.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
index a75ae27a64..5a08db93a8 100644
--- a/mail/mail-account-editor.c
+++ b/mail/mail-account-editor.c
@@ -645,7 +645,11 @@ construct (MailAccountEditor *editor, const MailConfigAccount *account)
gtk_entry_set_text (GTK_ENTRY (entry), account->id->signature);
/* Servers */
- url = camel_url_new (account->source->url, NULL);
+ if (account->source->url)
+ url = camel_url_new (account->source->url, NULL);
+ else
+ url = NULL;
+
editor->source_type = glade_xml_get_widget (gui, "txtSourceType");
if (GTK_IS_LABEL (editor->source_type))
gtk_label_set_text (GTK_LABEL (editor->source_type), url ? url->protocol : _("None"));
@@ -675,10 +679,15 @@ construct (MailAccountEditor *editor, const MailConfigAccount *account)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->keep_on_server), account->source->keep_on_server);
source_check (editor, url);
source_auth_init (editor, url);
- camel_url_free (url);
+ if (url)
+ camel_url_free (url);
/* Transport */
- url = camel_url_new (account->transport->url, NULL);
+ if (account->transport->url)
+ url = camel_url_new (account->transport->url, NULL);
+ else
+ url = NULL;
+
editor->transport_type = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuTransportType"));
editor->transport_host = GTK_ENTRY (glade_xml_get_widget (gui, "txtTransportHost"));
gtk_entry_set_text (editor->transport_host, url && url->host ? url->host : "");
@@ -693,7 +702,8 @@ construct (MailAccountEditor *editor, const MailConfigAccount *account)
if (editor->transport_ssl)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->transport_ssl), account->transport->use_ssl);
transport_type_init (editor, url);
- camel_url_free (url);
+ if (url)
+ camel_url_free (url);
editor->account = account;
}