From f433b2ae87e05574ffacf3964b6e36edb5fd5c20 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Mon, 16 Aug 1999 20:02:27 +0000 Subject: [PATCH] 1999-08-16 Federico Mena Quintero * gmain.c (default_edition_colors): "brightred" is not a standard X color; use "red" instead. (get_color): Take into account the result of gdk_color_parse(). --- gnome/ChangeLog | 6 ++++++ gnome/gmain.c | 21 ++++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index b4c0fd509..58e68aae4 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,9 @@ +1999-08-16 Federico Mena Quintero + + * gmain.c (default_edition_colors): "brightred" is not a standard + X color; use "red" instead. + (get_color): Take into account the result of gdk_color_parse(). + 1999-08-13 Federico Mena Quintero * gscreen.c (rename_file_with_context): Moved the try_rename() diff --git a/gnome/gmain.c b/gnome/gmain.c index 4092303f5..b48dc3031 100644 --- a/gnome/gmain.c +++ b/gnome/gmain.c @@ -37,13 +37,13 @@ struct gmc_color_pairs_s gmc_color_pairs [MAX_COLOR_PAIRS]; char *default_edition_colors = "normal=black:" "selected=white,darkblue:" -"viewunderline=brightred,blue:" +"viewunderline=red,blue:" "directory=blue:" "markselect=yellow,darkblue:" "marked=yellow,seagreen:" "execute=slateblue:" "link=green:" -"stalledlink=brightred:" +"stalledlink=red:" "device=magenta:" "core=red:" "menuhotsel=cyan,black:" @@ -86,14 +86,21 @@ void get_color (char *cpp, GdkColor **colp) { GdkColor *new_color; - gint status; + int result; + gint status; new_color = g_new (GdkColor, 1); - gdk_color_parse (cpp, new_color); + result = gdk_color_parse (cpp, new_color); new_color->pixel = 0; - status = 0; - gdk_color_context_get_pixels (mc_cc, &new_color->red, &new_color->green, &new_color->blue, 1, - &new_color->pixel, &status); + + if (result) { + status = 0; + gdk_color_context_get_pixels (mc_cc, + &new_color->red, &new_color->green, &new_color->blue, + 1, &new_color->pixel, &status); + } else + new_color->red = new_color->green = new_color->blue = 0; + *colp = new_color; }