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/dolphiniconsview.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/dolphiniconsview.cpp')
| -rw-r--r-- | src/dolphiniconsview.cpp | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 7c32715db..3f9df0316 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -65,8 +65,7 @@ QStyleOptionViewItem DolphinIconsView::viewOptions() const void DolphinIconsView::contextMenuEvent(QContextMenuEvent* event) { QListView::contextMenuEvent(event); - m_controller->triggerContextMenuRequest(event->pos(), - event->globalPos()); + m_controller->triggerContextMenuRequest(event->pos()); } void DolphinIconsView::mouseReleaseEvent(QMouseEvent* event) @@ -84,31 +83,14 @@ void DolphinIconsView::dragEnterEvent(QDragEnterEvent* event) void DolphinIconsView::dropEvent(QDropEvent* event) { - QListView::dropEvent(event); - // TODO: temporary deactivated until DolphinController will support this - - /* KFileItem* directory = 0; - bool dropIntoDirectory = false; - const QModelIndex index = indexAt(event->pos()); - if (index.isValid()) { - KFileItem* item = m_dolphinView->fileItem(index); - assert(item != 0); - dropIntoDirectory = item->isDir(); - if (dropIntoDirectory) { - directory = item; - } - } - const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData()); - if (urls.isEmpty() || (event->source() == this) && !dropIntoDirectory) { + if (urls.isEmpty() || (event->source() == this)) { QListView::dropEvent(event); } else { event->acceptProposedAction(); - const KUrl& destination = (directory == 0) ? m_dolphinView->url() : - directory->url(); - m_dolphinView->mainWindow()->dropUrls(urls, destination); - }*/ + m_controller->indicateDroppedUrls(urls, event->pos()); + } } #include "dolphiniconsview.moc" |
