X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a8a050952df82d8f9cc1191f410fca7c6a219da3..bd925ea49a7e4e7c6e652f4529dcd0c4e25fd19a:/src/dolphinpart.cpp diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 16caae9d6..0ea761d2d 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -54,7 +54,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QStringLi m_dirLister = new KDirLister; m_dirLister->setAutoUpdate(true); - m_dirLister->setMainWindow(parentWidget->topLevelWidget()); + m_dirLister->setMainWindow(parentWidget->window()); m_dirLister->setDelayedMimeTypes(true); //connect(m_dirLister, SIGNAL(started(KUrl)), this, SLOT(slotStarted())); @@ -273,7 +273,7 @@ void DolphinPart::slotItemTriggered(const KFileItem& item) } else { // Left button. [Right button goes to slotOpenContextMenu before triggered can be emitted] kDebug() << "LMB"; - emit m_extension->openUrlRequest(item.url(), args, browserArgs); + emit m_extension->openUrlRequest(item.targetUrl(), args, browserArgs); } } @@ -327,7 +327,10 @@ void DolphinPart::slotOpenContextMenu(const KFileItem& _item, const KUrl&) editActions.append(actionCollection()->action("delete")); actionGroups.insert("editactions", editActions); - KFileItemList items; items.append(item); + // TODO: We should change the signature of the slots (and signals) for being able + // to tell for which items we want a popup. + KFileItemList items = (m_view->selectedItems().count() ? m_view->selectedItems() + : KFileItemList() << item); emit m_extension->popupMenu(QCursor::pos(), items, KParts::OpenUrlArguments(),