Skip to content

Pre-select "Delete" in Delete Confirmation Dialog

Felix Ernst requested to merge felixernst/kio:focus_delete_in_dialog into master

This commit makes the "Delete" button the default button in the dialog for confirming direct deletion of a file and in the dialog for confirming emptying of the trash.

This was accidentally changed in 8144733c while trying to change the dialog styling to be more like a warning. Users were unhappy about this because it broke their muscle memory of "Shift+Del" into "Return" to permanently delete a file.

Before After
Screenshot_20221220_002236 Screenshot_20221221_001633

The fix is based on Friedrich's comment:

I'd propose to rather look into fixing DeleteOrTrashJob (either by for now switching back to KMessageDialog::Question* or better by adding API to KMessageDialog to decouple default button and message severity style and using that), see also comment !1005 (comment 578251)

BUG: 462845

Edited by Felix Ernst

Merge request reports

Loading