X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/fe09a37c59f3f326556b31e76974758badcc1dad..fbe257768cf88efb65064b3302aa88c074eaf719:/src/dolphindropcontroller.cpp diff --git a/src/dolphindropcontroller.cpp b/src/dolphindropcontroller.cpp index 002c242ac..a9fd94df5 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 @@ -86,7 +85,7 @@ void DolphinDropController::dropUrls(const KUrl::List& urls, seq = QKeySequence(Qt::ControlModifier + Qt::ShiftModifier).toString(); seq.chop(1); - QAction* linkAction = popup.addAction(KIcon("insert-link"), + QAction* linkAction = popup.addAction(KIcon("edit-create-symbolic-link"), i18nc("@action:inmenu", "&Link Here\t%1", seq));