┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-10-30 19:44:55 +0000
committerPeter Penz <[email protected]>2007-10-30 19:44:55 +0000
commitd9f5e191a6bd32a4dc15b3a3eb34795cda7697dd (patch)
tree0d03dac95431421dd5045a09f8c1e921098df3b6 /src/dolphinview.cpp
parent65c11d72c949695143023641e59f2d1bb645d39d (diff)
* fixed drag & drop issue in column view (dropping on files was not possible -> handled as viewport now)
* only show the hover-drop-indicator on directories (dropping on file-items is handled like dropping on the viewport) * simplified signature of drop signal (source widget not required anymore) svn path=/trunk/KDE/kdebase/apps/; revision=731129
Diffstat (limited to 'src/dolphinview.cpp')
-rw-r--r--src/dolphinview.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index c280b40d0..004b158ed 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -103,8 +103,8 @@ DolphinView::DolphinView(QWidget* parent,
connect(m_controller, SIGNAL(requestContextMenu(const QPoint&)),
this, SLOT(openContextMenu(const QPoint&)));
- connect(m_controller, SIGNAL(urlsDropped(const KUrl::List&, const KUrl&, const KFileItem&, QWidget*)),
- this, SLOT(dropUrls(const KUrl::List&, const KUrl&, const KFileItem&, QWidget*)));
+ connect(m_controller, SIGNAL(urlsDropped(const KUrl::List&, const KUrl&, const KFileItem&)),
+ this, SLOT(dropUrls(const KUrl::List&, const KUrl&, const KFileItem&)));
connect(m_controller, SIGNAL(sortingChanged(DolphinView::Sorting)),
this, SLOT(updateSorting(DolphinView::Sorting)));
connect(m_controller, SIGNAL(sortOrderChanged(Qt::SortOrder)),
@@ -730,24 +730,14 @@ void DolphinView::openContextMenu(const QPoint& pos)
void DolphinView::dropUrls(const KUrl::List& urls,
const KUrl& destPath,
- const KFileItem& destItem,
- QWidget* source)
+ const KFileItem& destItem)
{
- bool dropAboveDir = false;
- if (!destItem.isNull()) {
- dropAboveDir = destItem.isDir();
- if (!dropAboveDir) {
- // the dropping is done above a file
- return;
- }
- } else if (source == itemView()) {
- // the dropping is done into the same viewport where the dragging
- // has been started
- return;
+ const KUrl& destination = !destItem.isNull() && destItem.isDir() ?
+ destItem.url() : destPath;
+ const KUrl sourceDir = KUrl(urls.first().directory());
+ if (sourceDir != destination) {
+ dropUrls(urls, destination);
}
-
- const KUrl& destination = dropAboveDir ? destItem.url() : destPath;
- dropUrls(urls, destination);
}
void DolphinView::dropUrls(const KUrl::List& urls,