diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-08-25 02:29:15 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-08-25 02:29:15 +0800 |
commit | 68a61c2f072020a3a594ee7246140fd61655bada (patch) | |
tree | 5a079921407d28cce1db99d747c67ca11b4a34e7 /mail | |
parent | 5461762966047b5f482d623a68bc600f8aa44751 (diff) | |
download | gsoc2013-evolution-68a61c2f072020a3a594ee7246140fd61655bada.tar gsoc2013-evolution-68a61c2f072020a3a594ee7246140fd61655bada.tar.gz gsoc2013-evolution-68a61c2f072020a3a594ee7246140fd61655bada.tar.bz2 gsoc2013-evolution-68a61c2f072020a3a594ee7246140fd61655bada.tar.lz gsoc2013-evolution-68a61c2f072020a3a594ee7246140fd61655bada.tar.xz gsoc2013-evolution-68a61c2f072020a3a594ee7246140fd61655bada.tar.zst gsoc2013-evolution-68a61c2f072020a3a594ee7246140fd61655bada.zip |
Don't let the uri be an empty string (how the fuck is this even happening
2001-08-24 Jeffrey Stedfast <fejj@ximian.com>
* mail-config.c (mail_config_set_thread_list): Don't let the uri
be an empty string (how the fuck is this even happening in the
first place??).
(mail_config_get_thread_list): Same.
(mail_config_set_show_preview): And here.
(mail_config_get_show_preview): And finally here.
svn path=/trunk/; revision=12443
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 9 | ||||
-rw-r--r-- | mail/mail-config.c | 20 |
2 files changed, 17 insertions, 12 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 5fee79adc6..fa8e473540 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2001-08-24 Jeffrey Stedfast <fejj@ximian.com> + + * mail-config.c (mail_config_set_thread_list): Don't let the uri + be an empty string (how the fuck is this even happening in the + first place??). + (mail_config_get_thread_list): Same. + (mail_config_set_show_preview): And here. + (mail_config_get_show_preview): And finally here. + 2001-08-23 Larry Ewing <lewing@ximian.com> * mail-search.c (mail_search_construct): attach to the destroy diff --git a/mail/mail-config.c b/mail/mail-config.c index 7c0b4a4c97..89bc55f5ef 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -894,20 +894,16 @@ mail_config_is_configured (void) static char * uri_to_key (const char *uri) { - char *rval; - int i = 0; + char *rval, *ptr; if (!uri) return NULL; rval = g_strdup (uri); - while (rval [i]) { - if (rval [i] == '/' || rval [i] == ':') - rval [i] = '_'; - - i++; - } + for (ptr = rval; *ptr; ptr++) + if (*ptr == '/' || *ptr == ':') + *ptr = '_'; return rval; } @@ -927,7 +923,7 @@ mail_config_set_empty_trash_on_exit (gboolean value) gboolean mail_config_get_show_preview (const char *uri) { - if (uri) { + if (uri && *uri) { gpointer key, val; char *dbkey; @@ -962,7 +958,7 @@ mail_config_get_show_preview (const char *uri) void mail_config_set_show_preview (const char *uri, gboolean value) { - if (uri) { + if (uri && *uri) { char *dbkey = uri_to_key (uri); gpointer key, val; @@ -984,7 +980,7 @@ mail_config_set_show_preview (const char *uri, gboolean value) gboolean mail_config_get_thread_list (const char *uri) { - if (uri) { + if (uri && *uri) { gpointer key, val; char *dbkey; @@ -1019,7 +1015,7 @@ mail_config_get_thread_list (const char *uri) void mail_config_set_thread_list (const char *uri, gboolean value) { - if (uri) { + if (uri && *uri) { char *dbkey = uri_to_key (uri); gpointer key, val; |