aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-composer-prefs.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-composer-prefs.c')
-rw-r--r--mail/mail-composer-prefs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mail/mail-composer-prefs.c b/mail/mail-composer-prefs.c
index c196d4635e..15f87826c6 100644
--- a/mail/mail-composer-prefs.c
+++ b/mail/mail-composer-prefs.c
@@ -623,6 +623,8 @@ spell_load_values (MailComposerPrefs *prefs)
#define SET(t,x,prop) \
gconf_client_set_ ## t (prefs->gconf, GNOME_SPELL_GCONF_DIR x, prop, NULL);
+#define STR_EQUAL(str1, str2) ((str1 == NULL && str2 == NULL) || (str1 && str2 && !strcmp (str1, str2)))
+
static void
spell_save_values (MailComposerPrefs *prefs, gboolean force)
{
@@ -631,7 +633,7 @@ spell_save_values (MailComposerPrefs *prefs, gboolean force)
SET (int, "/spell_error_color_green", prefs->spell_error_color.green);
SET (int, "/spell_error_color_blue", prefs->spell_error_color.blue);
}
- if (force || strcmp (prefs->language_str, prefs->language_str_orig)) {
+ if (force || !STR_EQUAL (prefs->language_str, prefs->language_str_orig)) {
SET (string, "/language", prefs->language_str);
}