diff --git a/ChangeLog b/ChangeLog index 6c7fb41f77..d1fca27032 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-09-18 Simon Budig + + * libgimpwidgets/gimpcolorhexentry.c: Removed check for len % 3 == 0, + so that the entry accepts hex colors starting with "#" again. + Untabbified. + 2004-09-18 Manish Singh * app/Makefile.am: remove LDFLAGS references to now private diff --git a/libgimpwidgets/gimpcolorhexentry.c b/libgimpwidgets/gimpcolorhexentry.c index dbf89616db..b2ab032674 100644 --- a/libgimpwidgets/gimpcolorhexentry.c +++ b/libgimpwidgets/gimpcolorhexentry.c @@ -73,14 +73,14 @@ gimp_color_hex_entry_get_type (void) static const GTypeInfo entry_info = { sizeof (GimpColorHexEntryClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) gimp_color_hex_entry_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (GimpColorHexEntry), - 0, /* n_preallocs */ - (GInstanceInitFunc) gimp_color_hex_entry_init, + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gimp_color_hex_entry_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GimpColorHexEntry), + 0, /* n_preallocs */ + (GInstanceInitFunc) gimp_color_hex_entry_init, }; entry_type = g_type_register_static (GTK_TYPE_ENTRY, @@ -156,11 +156,11 @@ gimp_color_hex_entry_init (GimpColorHexEntry *entry) gtk_entry_set_text (GTK_ENTRY (entry), "000000"); g_signal_connect (entry, "focus_out_event", - G_CALLBACK (gimp_color_hex_entry_events), - NULL); + G_CALLBACK (gimp_color_hex_entry_events), + NULL); g_signal_connect (entry, "key_press_event", - G_CALLBACK (gimp_color_hex_entry_events), - NULL); + G_CALLBACK (gimp_color_hex_entry_events), + NULL); g_signal_connect (completion, "match_selected", G_CALLBACK (gimp_color_hex_entry_matched), @@ -264,12 +264,12 @@ gimp_color_hex_entry_events (GtkWidget *widget, GimpRGB color; gsize len = strlen (text); - if (len > 0&& - ((len % 3 == 0 && gimp_rgb_parse_hex (&color, text, len)) || - (gimp_rgb_parse_name (&color, text, -1)))) - { + if (len > 0 && + (gimp_rgb_parse_hex (&color, text, len) || + gimp_rgb_parse_name (&color, text, -1))) + { gimp_color_hex_entry_set_color (entry, &color); - } + } else { gtk_entry_set_text (GTK_ENTRY (entry), buffer);