┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-12-06 17:47:35 +0000
committerPeter Penz <[email protected]>2008-12-06 17:47:35 +0000
commit05cc6c2f4d9b8804c1e460e3765e27543847e72d (patch)
tree8b67521991e9f0a0dac54ff64516211de4d3d193 /src
parent1fe9858983ba2fac40cbd6a2da76afd5d2f48f25 (diff)
show a "Copy Here" and "Link Here" action, when a file is dragged within the same folder
BUG: 164314 svn path=/trunk/KDE/kdebase/apps/; revision=893493
Diffstat (limited to 'src')
-rw-r--r--src/draganddrophelper.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/draganddrophelper.cpp b/src/draganddrophelper.cpp
index ff319dfb8..387448deb 100644
--- a/src/draganddrophelper.cpp
+++ b/src/draganddrophelper.cpp
@@ -101,24 +101,8 @@ void DragAndDropHelper::dropUrls(const KFileItem& destItem,
QDBusConnection::sessionBus().call(message);
} else {
const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
- const KUrl source = urls.first();
- const KUrl sourceDir = KUrl(source.directory());
- const bool singleSelection = (urls.count() == 1);
-
- if (singleSelection && (source == destination)) {
+ if ((urls.count() == 1) && (urls.first() == destination)) {
emit errorMessage(i18nc("@info:status", "A folder cannot be dropped into itself"));
- } else if (sourceDir == destination) {
- QString msg;
- if (singleSelection) {
- msg = i18nc("@info:status",
- "The dropped item <filename>%1</filename> is already inside "
- "the folder <filename>%2</filename>", source.fileName(), destination.fileName());
- } else {
- msg = i18nc("@info:status",
- "The dropped items are already inside the folder <filename>%1</filename>",
- destination.fileName());
- }
- emit errorMessage(msg);
} else if (dropToItem) {
KonqOperations::doDrop(destItem, destination, event, widget);
} else {