This is very confusing when an user tries to, for example, delete multiple files using the keyboard. When the "delete file X" dialog comes up, no matter where you place your selection using the keyboard, if you do your choice with the "Enter" key, that becomes a hard-coded selection of the left-most button (and much confusion ensues when you keep getting asked to confirm deletion of each file despite selecting "Delete All" each time).
The culprit is in the function evt_sync_key_pressed (dialog.c), where you shouldn't handle the GDK_Return case.
I don't know if evt_sync_key_pressed is really needed, since all Gtk dialogues already cancel when you press Esc. The difference is by default, a "Esc" cancelled dialog will return -4 (GTK_RESPONSE_DELETE_EVENT) whereas your code will return the last button's value. So I'll leave it up to you to determine what you want to do with that. But PLEASE, remove handling the Enter key :/
Log in to post a comment.