applied simpler spell error color fix

svn path=/trunk/; revision=21545
This commit is contained in:
Radek Doulik
2003-06-25 16:54:17 +00:00
parent 87e3905bf8
commit dbd5112baa
2 changed files with 15 additions and 5 deletions

View File

@ -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> 2003-06-24 Jeffrey Stedfast <fejj@ximian.com>
Might fix bug #45368 but I wouldn't bet on it. Might fix bug #45368 but I wouldn't bet on it.

View File

@ -426,16 +426,21 @@ config_cache_mime_types (void)
g_ptr_array_add (config->mime_types, NULL); 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 static void
config_write_style (void) config_write_style (void)
{ {
GConfValue *val;
char *filename; char *filename;
FILE *rc; FILE *rc;
gboolean custom; gboolean custom;
char *fix_font; char *fix_font;
char *var_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 * 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); 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); 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); CONFIG_GET_SPELL_VALUE (int, "/spell_error_color_red", red, (void)0, (int));
green = gconf_client_get_int (config->gconf, "/GNOME/Spell/spell_error_color_green", NULL); CONFIG_GET_SPELL_VALUE (int, "/spell_error_color_green", green, (void)0, (int));
blue = gconf_client_get_int (config->gconf, "/GNOME/Spell/spell_error_color_blue", NULL); CONFIG_GET_SPELL_VALUE (int, "/spell_error_color_blue", blue, (void)0, (int));
fprintf (rc, "style \"evolution-mail-custom-fonts\" {\n"); fprintf (rc, "style \"evolution-mail-custom-fonts\" {\n");
fprintf (rc, " GtkHTML::spell_error_color = \"#%02x%02x%02x\"\n", fprintf (rc, " GtkHTML::spell_error_color = \"#%02x%02x%02x\"\n",