After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 113561 - Don't leave garbage in colorsel hex_entry
Don't leave garbage in colorsel hex_entry
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: Other
2.2.x
Other Linux
: Normal minor
: Medium feature
Assigned To: gtk-bugs
gtk-bugs
Depends on: 50276
Blocks:
 
 
Reported: 2003-05-22 22:18 UTC by Matthias Clasen
Modified: 2013-02-11 05:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch (576 bytes, patch)
2003-05-22 22:20 UTC, Matthias Clasen
needs-work Details | Review

Description Matthias Clasen 2003-05-22 22:18:05 UTC
If the user types in unparsable garbage and presses enter, the color isn't
updated (ok), but the garbage is left in place. It would be more consistent
to always replace the current content of the hex entry with the hex value
of the current color when the user presses enter.
Comment 1 Matthias Clasen 2003-05-22 22:20:05 UTC
Created attachment 16749 [details] [review]
a patch
Comment 2 Owen Taylor 2003-05-22 22:42:52 UTC
Sounds reasonable to me if we don't want to go to
all the way and pop up a dialog (and dialogs on
focus out are typically a bad idea)

I'm wondering if addition to restoring the current
color we should grab_focus() and select_all()

So:
 
 A) It's clear that something happened
 B) The user can try again easily.
Comment 3 Matthias Clasen 2003-05-22 23:15:02 UTC
We could even beep :-). Unfortunately, grab_focus() from a focus_out
handler doesn't seem to work very well. And playing around with this
some more, I'm not convinced that it makes the error really obvious,
unless we beep. Maybe an error dialog is a better idea.
Comment 4 Owen Taylor 2003-05-23 18:27:09 UTC
Let's see if the usability folks have any ideas here
about what the best behavior is for invalid entries
in the 'color name' field.

[I think we should try to make gtk_widget_grab_focus()
 in focus out work, while it's frequently a bit
 questionable to prevent focus-out, it's something that 
 people have asked about on gtk-list multiple times. ]
Comment 5 Havoc Pennington 2003-05-30 04:02:10 UTC
Isn't garbage most likely to be a typo? If so you'd want to leave it
there so the user could fix it.

If we ever close that bug about GtkEntry validation, we could just use
the validation feature. ;-)
Comment 6 Matthias Clasen 2003-05-30 16:17:03 UTC
I have to agree with havoc that this should probably be handled as a
use case for entry validation. 
Comment 7 Matthias Clasen 2013-02-11 05:12:02 UTC
closing old bugs