aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-01-17 09:34:22 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-17 09:34:22 +0800
commita8acf02a64906ad1f3d84dd047ef1ad1bc61ac3e (patch)
treede455398d0209053942308a21f69f99454f00cd2 /mail/mail-config.c
parent4f5effdf884b53299fb85bf344ccd5441f01d7fe (diff)
downloadgsoc2013-evolution-a8acf02a64906ad1f3d84dd047ef1ad1bc61ac3e.tar
gsoc2013-evolution-a8acf02a64906ad1f3d84dd047ef1ad1bc61ac3e.tar.gz
gsoc2013-evolution-a8acf02a64906ad1f3d84dd047ef1ad1bc61ac3e.tar.bz2
gsoc2013-evolution-a8acf02a64906ad1f3d84dd047ef1ad1bc61ac3e.tar.lz
gsoc2013-evolution-a8acf02a64906ad1f3d84dd047ef1ad1bc61ac3e.tar.xz
gsoc2013-evolution-a8acf02a64906ad1f3d84dd047ef1ad1bc61ac3e.tar.zst
gsoc2013-evolution-a8acf02a64906ad1f3d84dd047ef1ad1bc61ac3e.zip
Modify to be able to handle a NULL source_url. (source_auth_init): Allow
2001-01-16 Jeffrey Stedfast <fejj@ximian.com> * mail-account-editor.c (apply_changes): Modify to be able to handle a NULL source_url. (source_auth_init): Allow for a NULL source url. (source_check): Same. * mail-config.c (mail_config_write): Allow for NULL source URLs. And while we're at it, NULL transport URLs as well. Might as well save the use_ssl variable too. (config_read): Same. * mail-config-druid.c (druid_finish): Modify to allow a NULL source url. (incoming_next): Modify to check for a NULL source and jump to the transport page if one is encountered (this means the user decided not to config a source). (incoming_type_changed): Modify to set all widgets insensitive if the user selected the "None" source menu item (aka NULL provider). (incoming_check): Modify to allow the user to go to the next page when he/she has chosen "None" for their source type. (mail_config_druid_get_source_url): Return NULL if the provider is NULL. (mail_config_druid_get_transport_url): Same. svn path=/trunk/; revision=7561
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r--mail/mail-config.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 04d59f7f17..47a2392767 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -246,12 +246,22 @@ config_read (void)
path = g_strdup_printf ("source_url_%d", i);
source->url = gnome_config_get_string (path);
g_free (path);
+
+ if (!*source->url) {
+ /* no source associated with this account */
+ g_free (source->url);
+ source->url = NULL;
+ }
+
path = g_strdup_printf ("source_keep_on_server_%d", i);
source->keep_on_server = gnome_config_get_bool (path);
g_free (path);
path = g_strdup_printf ("source_save_passwd_%d", i);
source->save_passwd = gnome_config_get_bool (path);
g_free (path);
+ path = g_strdup_printf ("source_use_ssl_%d", i);
+ source->use_ssl = gnome_config_get_bool (path);
+ g_free (path);
/* get the transport */
transport = g_new0 (MailConfigService, 1);
@@ -259,6 +269,16 @@ config_read (void)
transport->url = gnome_config_get_string (path);
g_free (path);
+ if (!*transport->url) {
+ /* no transport associated with this account */
+ g_free (transport->url);
+ transport->url = NULL;
+ }
+
+ path = g_strdup_printf ("transport_use_ssl_%d", i);
+ transport->use_ssl = gnome_config_get_bool (path);
+ g_free (path);
+
account->id = id;
account->source = source;
account->transport = transport;
@@ -357,7 +377,7 @@ mail_config_write (void)
/* source info */
path = g_strdup_printf ("source_url_%d", i);
- gnome_config_set_string (path, account->source->url);
+ gnome_config_set_string (path, account->source->url ? account->source->url : "");
g_free (path);
path = g_strdup_printf ("source_keep_on_server_%d", i);
gnome_config_set_bool (path, account->source->keep_on_server);
@@ -368,7 +388,7 @@ mail_config_write (void)
/* transport info */
path = g_strdup_printf ("transport_url_%d", i);
- gnome_config_set_string (path, account->transport->url);
+ gnome_config_set_string (path, account->transport->url ? account->transport->url : "");
g_free (path);
}
gnome_config_pop_prefix ();