diff options
| author | Peter Penz <[email protected]> | 2007-02-16 17:03:02 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-02-16 17:03:02 +0000 |
| commit | 546384562ae872614cd0c8fa568bd65ae41885da (patch) | |
| tree | 9baf799af17c8ed58f75f559040adc1995c834fd /src/dolphindetailsview.cpp | |
| parent | cf8f099bd566f1873ba1187aa9408b481c842f1a (diff) | |
Reanimated drag & drop support again after introducing the DolphinController. It is now also possible to move the items inside an icon view like discussed on kde-devel/kde-usability.
svn path=/trunk/KDE/kdebase/apps/; revision=634228
Diffstat (limited to 'src/dolphindetailsview.cpp')
| -rw-r--r-- | src/dolphindetailsview.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index 411a410d3..0b350f8b2 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -91,8 +91,7 @@ QStyleOptionViewItem DolphinDetailsView::viewOptions() const void DolphinDetailsView::contextMenuEvent(QContextMenuEvent* event) { QTreeView::contextMenuEvent(event); - m_controller->triggerContextMenuRequest(event->pos(), - event->globalPos()); + m_controller->triggerContextMenuRequest(event->pos()); } void DolphinDetailsView::mouseReleaseEvent(QMouseEvent* event) @@ -110,18 +109,14 @@ void DolphinDetailsView::dragEnterEvent(QDragEnterEvent* event) void DolphinDetailsView::dropEvent(QDropEvent* event) { - QTreeView::dropEvent(event); - // TODO: temporary deactivated until DolphinController will support this - - /*const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData()); - if (!urls.isEmpty()) { + const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData()); + if (urls.isEmpty() || (event->source() == this)) { + QTreeView::dropEvent(event); + } + else { event->acceptProposedAction(); - - // TODO: handle dropping above a directory - - const KUrl& destination = m_controller->url(); - m_controller->emitDropUrlsSignal(urls, destination); - }*/ + m_controller->indicateDroppedUrls(urls, event->pos()); + } } void DolphinDetailsView::setSortIndicatorSection(DolphinView::Sorting sorting) |
