]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinpart.cpp
assure that the Dolphin KPart inside Konqueror gets updated when the settings are...
[dolphin.git] / src / dolphinpart.cpp
index 16caae9d69e85339bfc06ef3bdfe3f625320e73a..e155573cccb0e6b00118da85026771574f0bbabf 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,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(),
@@ -364,6 +367,11 @@ void DolphinPartBrowserExtension::paste()
     m_part->view()->paste();
 }
 
+void DolphinPartBrowserExtension::reparseConfiguration()
+{
+    m_part->view()->refresh();
+}
+
 ////
 
 void DolphinPart::slotEditMimeType()