GNOME Bugzilla – Bug 319962
CTRL-C doesn't work in message dialogs
Last modified: 2008-01-15 13:01:45 UTC
Text in GNOME dialog boxes can be selected and copied. GIMP dialog boxes allow text to be selected, and there is a copy command in the context menu which works. However, CTRL-C has no effect. Examples: Revert image dialog, file not found dialog.
Why should Ctrl-C have any effect? Noone claims that it would and since it already has a meaning in GIMP, I don't think that overloading the keyboard shortcut would be an improvement.
What is the meaning of Ctrl-C in GIMP? Having it do something while a dialog is in focus isn't overloading IMO. Being able to copy text from dialog boxes is standard behaviour in gnome. Use case: I get an error message I don't understand and I want to quote it on a mailing list, web forum, or IRC to get help.
From the GNOME HIG: "Make your application consistent with itself and with other applications, in both its appearance and its behavior." If I can select some text, I should be able to copy it with the standard shorcut. (By the way, some GIMP dialog boxes don't allow text to be selected, eg Tip of The Day.)
It doesn't always make sense to be able to select text. Error dialogs are special cased because it might be useful to be able to copy and paste the error message. We explicitely set the label selectable to achieve that and GTK+ does the rest. If you think that the content of selectable labels should be copied to the clipboard on Ctrl-C, perhaps you should file a bug report against GTK+. This report should IMO be closed as WONTFIX for the reasons already given. I will keep it open for a day or two just in case someone wants to add a comment.
I agree that this should happen at the Gtk level. Note that the GtkEntry widget already uses the key-binding that Joachim describes (which is pretty much universal on the Windows platform). I suggest reassiging to Gtk rather than closing as WONTFIX.
There is no bug. We explicitely disable "can-focus" on the labels in GimpMessageBox, so you can select them, but not copy from them. See bug #302400. I would argue that we should either use no selectable labels at all, or leave them in the focus chain. We can't have one without the other. Setting milestone to 2.4 since we need to decide this at some point before. Personally I'd favor selectable labels, even if they are in the focus chain (we could even hack the focus chain to not include them).
Let's undo the change done for bug #302400 then and special case the focus chain in the Close dialog then so that we don't have to reopen it.
I've found a simpler solution that seems to work quite well: 2005-10-31 Sven Neumann <sven@gimp.org> * app/widgets/gimpmessagebox.c (gimp_message_box_init): reverted the change for bug #302400; it caused bug #319962 to be opened. Instead unset the focus chain for the message box.