aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/mail-config.c20
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;