]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinpart.cpp
Make Konqueror and Dolphin use the new KFileItem::targetUrl() method.
[dolphin.git] / src / dolphinpart.cpp
index 16caae9d69e85339bfc06ef3bdfe3f625320e73a..aa1bb6d7c419f3da13ff34ba68291fd6a3e5a60a 100644 (file)
@@ -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,7 @@ void DolphinPart::slotOpenContextMenu(const KFileItem& _item, const KUrl&)
             editActions.append(actionCollection()->action("delete"));
         actionGroups.insert("editactions", editActions);
 
-        KFileItemList items; items.append(item);
+        KFileItemList items = m_view->selectedItems();
         emit m_extension->popupMenu(QCursor::pos(),
                                     items,
                                     KParts::OpenUrlArguments(),