1999-08-16 Federico Mena Quintero <federico@redhat.com>

* 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().
This commit is contained in:
Miguel de Icaza 1999-08-16 20:02:27 +00:00
parent cb49109679
commit f433b2ae87
2 changed files with 20 additions and 7 deletions

View File

@ -1,3 +1,9 @@
1999-08-16 Federico Mena Quintero <federico@redhat.com>
* 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 <federico@redhat.com>
* gscreen.c (rename_file_with_context): Moved the try_rename()

View File

@ -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;
}