#65 "Enter" always selects the leftmost dialog button.

closed-fixed
Interface (27)
8
2011-06-14
2011-04-12
Skotlex
No

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 :/

Discussion

  • Skotlex

    Skotlex - 2011-04-12
    • priority: 5 --> 8
    • assigned_to: nobody --> emilbrink
     
  • Emil Brink

    Emil Brink - 2011-04-12

    Yikes, this was really scary! Good catch. I've fixed it by removing the handling of Return for now, I think that is good enough.

    Marking as Fixed until release.

     
  • Emil Brink

    Emil Brink - 2011-04-12
    • status: open --> open-fixed
     
  • Emil Brink

    Emil Brink - 2011-06-14
    • status: open-fixed --> closed-fixed
     
  • Emil Brink

    Emil Brink - 2011-06-14

    Closed, this fix is in 0.19.10 which was recently released.

     

Log in to post a comment.