]> cloud.milkyroute.net Git - dolphin.git/commit
DolphinMainWindow: show a banner when the user presses the shortcut of a disabled...
authorJin Liu <m.liu.jin@gmail.com>
Wed, 3 Apr 2024 12:34:50 +0000 (12:34 +0000)
committerMéven Car <meven.car@kdemail.net>
Wed, 3 Apr 2024 12:34:50 +0000 (12:34 +0000)
commit7d49cb567b595570f59156965332428c9490a04d
treef2a9bf6334aa299cc50f30b2f1fc96811f7ceb1a
parente75bfea1cb9f6b4cab4334e29bb9d29bb09711ba
DolphinMainWindow: show a banner when the user presses the shortcut of a disabled action

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
QShortcut is deleted when the action is enabled again.

The following actions are included:
cut
paste
rename
moveToTrash
deleteWithTrashShortcut
deleted
createDir
copyToOtherView
moveToOtherView
src/CMakeLists.txt
src/disabledactionnotifier.cpp [new file with mode: 0644]
src/disabledactionnotifier.h [new file with mode: 0644]
src/dolphinmainwindow.cpp
src/dolphinmainwindow.h