aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-composer-prefs.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-05-22 05:45:58 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-05-22 05:45:58 +0800
commit47ac3261fff7588ea4cda15cdfdf24366a4f5bf8 (patch)
treee32c2ca8cb5548183be05ea98ef11f785510e84e /mail/mail-composer-prefs.c
parentbec22b99bb0c5afa61934c09b2bd633775a19c7e (diff)
downloadgsoc2013-evolution-47ac3261fff7588ea4cda15cdfdf24366a4f5bf8.tar
gsoc2013-evolution-47ac3261fff7588ea4cda15cdfdf24366a4f5bf8.tar.gz
gsoc2013-evolution-47ac3261fff7588ea4cda15cdfdf24366a4f5bf8.tar.bz2
gsoc2013-evolution-47ac3261fff7588ea4cda15cdfdf24366a4f5bf8.tar.lz
gsoc2013-evolution-47ac3261fff7588ea4cda15cdfdf24366a4f5bf8.tar.xz
gsoc2013-evolution-47ac3261fff7588ea4cda15cdfdf24366a4f5bf8.tar.zst
gsoc2013-evolution-47ac3261fff7588ea4cda15cdfdf24366a4f5bf8.zip
Use a new macro, STR_EQUAL, to tell if the 2 values are equal or not
2002-05-21 Jeffrey Stedfast <fejj@ximian.com> * mail-composer-prefs.c (spell_save_values): Use a new macro, STR_EQUAL, to tell if the 2 values are equal or not rather than using strcmp since one or both strings could be NULL. svn path=/trunk/; revision=16971
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);
}