┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2008-06-05 22:25:07 +0000
committerDavid Faure <[email protected]>2008-06-05 22:25:07 +0000
commit3d28c535643ce8ad0c91b20adbdd1229031d3c82 (patch)
tree5b4d3b175129147105da6e52a432de4da565d830 /src/dolphinmainwindow.cpp
parent008f524498475dd28717b1f3d65e2c99bbdb5b2a (diff)
When "move_to_trash" is disabled and "delete" is enabled (e.g. non-local files),
enable a hidden action with Key_Del as shortcut, so that the user can press Del to delete the file. BUG: 76016 svn path=/trunk/KDE/kdebase/apps/; revision=817389
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 81d1e2670..57926d33e 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -1113,6 +1113,7 @@ void DolphinMainWindow::updateEditActions()
QAction* moveToTrashAction = col->action("move_to_trash");
QAction* deleteAction = col->action("delete");
QAction* cutAction = col->action(KStandardAction::name(KStandardAction::Cut));
+ QAction* deleteWithTrashShortcut = col->action("delete_shortcut"); // see DolphinViewActionHandler
KonqFileItemCapabilities capabilities(list);
const bool enableMoveToTrash = capabilities.isLocal() && capabilities.supportsMoving();
@@ -1120,6 +1121,7 @@ void DolphinMainWindow::updateEditActions()
renameAction->setEnabled(capabilities.supportsMoving());
moveToTrashAction->setEnabled(enableMoveToTrash);
deleteAction->setEnabled(capabilities.supportsDeleting());
+ deleteWithTrashShortcut->setEnabled(capabilities.supportsDeleting() && !enableMoveToTrash);
cutAction->setEnabled(capabilities.supportsMoving());
}
updatePasteAction();