Skip to content

DolphinMainWindow: show a banner when the user presses the shortcut of a disabled action

Jin Liu requested to merge work/genericity/readonly-banner into master

#55

Currently, there's no feedback when the user presses a shortcut of a disabled action, e.g. cut / paste in a read-only directory. This patch shows a banner in that case.

It's implemented by enabling a QShortcut for each disabled action. The shortcut of the disabled action is temporarily cleared to prevent Qt from complaining about ambiguous shortcuts. The shortcut text is added to action->text() then, so the menu item still look the same.

Screenshot_20240319_140432

Screenshot_20240319_140509

Edited by Jin Liu

Merge request reports