aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/ChangeLog9
-rw-r--r--composer/e-msg-composer-attachment-bar.c5
-rw-r--r--composer/e-msg-composer.c8
3 files changed, 21 insertions, 1 deletions
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 <fejj@ximian.com>
+
+ * 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 <charles.zhang@sun.com>
* 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);