accept SVG color names in the hex entry. Not very intuitive but probably a
2004-07-26 Sven Neumann <sven@gimp.org> * libgimpwidgets/gimpcolorscales.c (gimp_color_scales_hex_events): accept SVG color names in the hex entry. Not very intuitive but probably a nice experts feature and it can be improved later.
This commit is contained in:

committed by
Sven Neumann

parent
3d05015a24
commit
0cb50e20f2
@ -1,3 +1,9 @@
|
|||||||
|
2004-07-26 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* libgimpwidgets/gimpcolorscales.c (gimp_color_scales_hex_events):
|
||||||
|
accept SVG color names in the hex entry. Not very intuitive but
|
||||||
|
probably a nice experts feature and it can be improved later.
|
||||||
|
|
||||||
2004-07-26 Michael Natterer <mitch@gimp.org>
|
2004-07-26 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/main.c (main): use #ifdef GIMP_UNSTABLE instead of looking
|
* app/main.c (main): use #ifdef GIMP_UNSTABLE instead of looking
|
||||||
|
@ -491,10 +491,11 @@ gimp_color_scales_hex_events (GtkWidget *widget,
|
|||||||
gimp_rgb_get_uchar (&selector->rgb, &r, &g, &b);
|
gimp_rgb_get_uchar (&selector->rgb, &r, &g, &b);
|
||||||
g_snprintf (buffer, sizeof (buffer), "%.2x%.2x%.2x", r, g, b);
|
g_snprintf (buffer, sizeof (buffer), "%.2x%.2x%.2x", r, g, b);
|
||||||
|
|
||||||
if ((strlen (hex_color) == 6) &&
|
if (g_ascii_strcasecmp (buffer, hex_color) != 0)
|
||||||
(g_ascii_strcasecmp (buffer, hex_color) != 0))
|
|
||||||
{
|
{
|
||||||
if (gimp_rgb_parse_hex (&selector->rgb, hex_color, 6))
|
if ((strlen (hex_color) == 6 &&
|
||||||
|
gimp_rgb_parse_hex (&selector->rgb, hex_color, 6)) ||
|
||||||
|
(gimp_rgb_parse_name (&selector->rgb, hex_color, -1)))
|
||||||
{
|
{
|
||||||
gimp_rgb_to_hsv (&selector->rgb, &selector->hsv);
|
gimp_rgb_to_hsv (&selector->rgb, &selector->hsv);
|
||||||
|
|
||||||
@ -504,9 +505,9 @@ gimp_color_scales_hex_events (GtkWidget *widget,
|
|||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
gtk_entry_set_text (GTK_ENTRY (widget), buffer);
|
gtk_entry_set_text (GTK_ENTRY (widget), buffer);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user