diff options
| author | Mark Gaiser <[email protected]> | 2010-09-17 19:47:01 +0000 |
|---|---|---|
| committer | Mark Gaiser <[email protected]> | 2010-09-17 19:47:01 +0000 |
| commit | 304e9524b6c1f3e1582a07c34cdf42ea1c3167bb (patch) | |
| tree | e3cb389b64076bba01d1e32b950fcaa24aeb2de2 /src/dolphinmainwindow.cpp | |
| parent | 02c02a05c16366126db177f981991880f2375278 (diff) | |
When you view the context menu of a file/folder and shift is pressed (and the delete action line is not enabled in the settings) then the
"Move to trash (del)" action gets replaced by the "Delete (shift del)" action and replaced back to "Move to trash (del)" when you release
shift.
BUG: 194275
svn path=/trunk/KDE/kdebase/apps/; revision=1176493
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 722a90f93..6f407a84a 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -114,7 +114,8 @@ DolphinMainWindow::DolphinMainWindow(int id) : m_actionHandler(0), m_remoteEncoding(0), m_settingsDialog(0), - m_lastHandleUrlStatJob(0) + m_lastHandleUrlStatJob(0), + m_keyInfo(new KModifierKeyInfo) { setObjectName("Dolphin#"); @@ -1167,6 +1168,12 @@ void DolphinMainWindow::openContextMenu(const KFileItem& item, const QList<QAction*>& customActions) { DolphinContextMenu contextMenu(this, item, url); + + if(m_keyInfo.isKeyPressed(Qt::Key_Shift) || m_keyInfo.isKeyLatched(Qt::Key_Shift)) { + contextMenu.setShiftIsPressed(true); + } + + connect(&m_keyInfo, SIGNAL(keyPressed(Qt::Key, bool)), &contextMenu, SLOT(deleteOrTrashMenuEntry(Qt::Key, bool))); contextMenu.setCustomActions(customActions); contextMenu.open(); } |
