diff options
| author | Peter Penz <[email protected]> | 2008-01-30 22:39:42 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-01-30 22:39:42 +0000 |
| commit | 10f94beaafd815837c702478def354d5acbb8102 (patch) | |
| tree | befd2db2ab3edc3bf95fca5dd176bed82a918110 /src | |
| parent | 9a944644e94a1a969590cb2fef59a1b22270e150 (diff) | |
Don't offer a Move Here/Copy Here/Link Here menu when dropping items above the trash, just move the things into the trash instead. TODO: as the inline comment already says KonqOperations::doDrop() should be used as longterm solution...
svn path=/trunk/KDE/kdebase/apps/; revision=768925
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphindropcontroller.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/dolphindropcontroller.cpp b/src/dolphindropcontroller.cpp index 002c242ac..d322c593d 100644 --- a/src/dolphindropcontroller.cpp +++ b/src/dolphindropcontroller.cpp @@ -45,24 +45,23 @@ void DolphinDropController::dropUrls(const KUrl::List& urls, kDebug() << "Source" << urls; kDebug() << "Destination:" << destination; + if (destination.protocol() == "trash") { + KonqOperations::del(m_parentWidget, KonqOperations::TRASH, urls); + return; + } + Qt::DropAction action = Qt::CopyAction; Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers(); const bool shiftPressed = modifier & Qt::ShiftModifier; const bool controlPressed = modifier & Qt::ControlModifier; const bool altPressed = modifier & Qt::AltModifier; - if (shiftPressed && controlPressed) { - // shortcut for 'Link Here' is used + if ((shiftPressed && controlPressed) || altPressed) { action = Qt::LinkAction; - } else if (shiftPressed) { - // shortcut for 'Move Here' is used - action = Qt::MoveAction; } else if (controlPressed) { - // shortcut for 'Copy Here' is used action = Qt::CopyAction; - } else if (altPressed) { - // shortcut for 'Link Here' is used - action = Qt::LinkAction; + } else if (shiftPressed) { + action = Qt::MoveAction; } else { // open a context menu which offers the following actions: // - Move Here |
