diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-01-18 04:11:36 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-01-18 04:11:36 +0800 |
commit | 99a779567bde67b8994af25d13bfd6f6e48fea04 (patch) | |
tree | 3c5ea3a51b11eb1791089f8d629042a260c98d0e /mail/mail-accounts.c | |
parent | 74325ce55b6f25801f6a23f0fe33b3cfedb6181e (diff) | |
download | gsoc2013-evolution-99a779567bde67b8994af25d13bfd6f6e48fea04.tar gsoc2013-evolution-99a779567bde67b8994af25d13bfd6f6e48fea04.tar.gz gsoc2013-evolution-99a779567bde67b8994af25d13bfd6f6e48fea04.tar.bz2 gsoc2013-evolution-99a779567bde67b8994af25d13bfd6f6e48fea04.tar.lz gsoc2013-evolution-99a779567bde67b8994af25d13bfd6f6e48fea04.tar.xz 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-accounts.c')
-rw-r--r-- | mail/mail-accounts.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c index a5baecdc2f..965454da8b 100644 --- a/mail/mail-accounts.c +++ b/mail/mail-accounts.c @@ -105,11 +105,17 @@ load_accounts (MailAccountsDialog *dialog) account = node->data; - url = camel_url_new (account->source->url, NULL); + if (account->source->url) + url = camel_url_new (account->source->url, NULL); + else + url = NULL; + text[0] = g_strdup (account->name); - text[1] = g_strdup_printf ("%s%s", url->protocol, - account->default_account ? " (default)" : ""); - camel_url_free (url); + text[1] = g_strdup_printf ("%s%s", url && url->protocol ? url->protocol : _("None"), + account->default_account ? _(" (default)") : ""); + + if (url) + camel_url_free (url); gtk_clist_append (dialog->mail_accounts, text); g_free (text[0]); |