aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorRadek Doulik <rodo@src.gnome.org>2003-06-26 00:54:17 +0800
committerRadek Doulik <rodo@src.gnome.org>2003-06-26 00:54:17 +0800
commitdbd5112baa7cc8c711a8838cfdbb8ea44d62eb1f (patch)
treef3ebab46bc2b2fc807acce12e0985f3ed3e11949 /mail
parent87e3905bf8ce45df3bcf3890a1e7a66387ca5325 (diff)
downloadgsoc2013-evolution-dbd5112baa7cc8c711a8838cfdbb8ea44d62eb1f.tar.gz
gsoc2013-evolution-dbd5112baa7cc8c711a8838cfdbb8ea44d62eb1f.tar.zst
gsoc2013-evolution-dbd5112baa7cc8c711a8838cfdbb8ea44d62eb1f.zip
applied simpler spell error color fix
svn path=/trunk/; revision=21545
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-config.c15
2 files changed, 15 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index b60e1b1594..9e320443a1 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-25 Radek Doulik <rodo@ximian.com>
+
+ * mail-config.c (config_write_style): provide hardcoded default
+ (red) spell error color
+
2003-06-24 Jeffrey Stedfast <fejj@ximian.com>
Might fix bug #45368 but I wouldn't bet on it.
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 48928aae23..2881d7603e 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -426,16 +426,21 @@ config_cache_mime_types (void)
g_ptr_array_add (config->mime_types, NULL);
}
+#define CONFIG_GET_SPELL_VALUE(t,x,prop,f,c) G_STMT_START { \
+ val = gconf_client_get_without_default (config->gconf, "/GNOME/Spell" x, NULL); \
+ if (val) { f; prop = c (gconf_value_get_ ## t (val)); \
+ gconf_value_free (val); } } G_STMT_END
+
static void
config_write_style (void)
{
+ GConfValue *val;
char *filename;
FILE *rc;
gboolean custom;
char *fix_font;
char *var_font;
- gint red, green, blue;
-
+ gint red = 0xffff, green = 0, blue = 0;
/*
* This is the wrong way to get the path but it needs to
@@ -459,9 +464,9 @@ config_write_style (void)
var_font = gconf_client_get_string (config->gconf, "/apps/evolution/mail/display/fonts/variable", NULL);
fix_font = gconf_client_get_string (config->gconf, "/apps/evolution/mail/display/fonts/monospace", NULL);
- red = gconf_client_get_int (config->gconf, "/GNOME/Spell/spell_error_color_red", NULL);
- green = gconf_client_get_int (config->gconf, "/GNOME/Spell/spell_error_color_green", NULL);
- blue = gconf_client_get_int (config->gconf, "/GNOME/Spell/spell_error_color_blue", NULL);
+ CONFIG_GET_SPELL_VALUE (int, "/spell_error_color_red", red, (void)0, (int));
+ CONFIG_GET_SPELL_VALUE (int, "/spell_error_color_green", green, (void)0, (int));
+ CONFIG_GET_SPELL_VALUE (int, "/spell_error_color_blue", blue, (void)0, (int));
fprintf (rc, "style \"evolution-mail-custom-fonts\" {\n");
fprintf (rc, " GtkHTML::spell_error_color = \"#%02x%02x%02x\"\n",