From edafb41f2a1b8acb546591a7aaad4177811c93c9 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 24 Sep 2003 20:12:02 +0000 Subject: Same as below. 2003-09-24 Jeffrey Stedfast * e-msg-composer-attachment-bar.c (get_default_charset): Same as below. * e-msg-composer.c (composer_get_default_charset_setting): Handle empty-string as the charset value gotten from gconf as this can happen. Partial fix for bug #47638. svn path=/trunk/; revision=22692 --- composer/ChangeLog | 9 +++++++++ composer/e-msg-composer-attachment-bar.c | 5 +++++ composer/e-msg-composer.c | 8 +++++++- 3 files changed, 21 insertions(+), 1 deletion(-) (limited to 'composer') diff --git a/composer/ChangeLog b/composer/ChangeLog index e66876fe19..890149a843 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,12 @@ +2003-09-24 Jeffrey Stedfast + + * e-msg-composer-attachment-bar.c (get_default_charset): Same as + below. + + * e-msg-composer.c (composer_get_default_charset_setting): Handle + empty-string as the charset value gotten from gconf as this can + happen. Partial fix for bug #47638. + 2003-09-13 Charles Zhang * e-msg-composer-attachment-bar.c (remove_attachment): Add some diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c index 1d5407bdcd..9e7b42dfca 100644 --- a/composer/e-msg-composer-attachment-bar.c +++ b/composer/e-msg-composer-attachment-bar.c @@ -716,6 +716,11 @@ get_default_charset (void) gconf = gconf_client_get_default (); buf = gconf_client_get_string (gconf, "/apps/evolution/mail/composer/charset", NULL); + if (buf && buf[0] == '\0') { + g_free (buf); + buf = NULL; + } + g_object_unref (gconf); if (buf != NULL) { diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index e548bc7001..cf4a130d52 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -242,8 +242,14 @@ composer_get_default_charset_setting (void) gconf = gconf_client_get_default (); buf = gconf_client_get_string (gconf, "/apps/evolution/mail/composer/charset", NULL); - if (buf == NULL) + if (buf == NULL || buf[0] == '\0') { + g_free (buf); buf = gconf_client_get_string (gconf, "/apps/evolution/mail/format/charset", NULL); + if (buf && buf[0] == '\0') { + g_free (buf); + buf = NULL; + } + } g_object_unref (gconf); -- cgit