X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/905277aac40f2a55daa5bb2925acb6d4046dacfd..8cb8b519099e2d8bc86a574e014fc3cd780acfa8:/src/dolphinpart.cpp diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 1cd336c8c..9e6f6047e 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -46,7 +46,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QStringLi : KParts::ReadOnlyPart(parent) { Q_UNUSED(args) - setComponentData( DolphinPartFactory::componentData() ); + setComponentData(DolphinPartFactory::componentData(), false); m_extension = new DolphinPartBrowserExtension(this); // make sure that other apps using this part find Dolphin's view-file-columns icons @@ -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())); @@ -94,7 +94,6 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QStringLi this, SLOT(slotUrlChanged(KUrl))); connect(m_view, SIGNAL(modeChanged()), this, SIGNAL(viewModeChanged())); // relay signal - // TODO slotSortingChanged m_actionHandler = new DolphinViewActionHandler(actionCollection(), this); m_actionHandler->setCurrentView(m_view); @@ -111,6 +110,8 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QStringLi // TODO there was a "always open a new window" (when clicking on a directory) setting in konqueror // (sort of spacial navigation) + + loadPlugins(this, this, componentData()); } DolphinPart::~DolphinPart() @@ -218,6 +219,7 @@ bool DolphinPart::openUrl(const KUrl& url) emit m_extension->setLocationBarUrl(prettyUrl); emit started(0); // get the wheel to spin m_view->setUrl(url); + emit aboutToOpenURL(); if (reload) m_view->reload(); return true; @@ -274,7 +276,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); } } @@ -328,7 +330,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(), @@ -365,6 +370,11 @@ void DolphinPartBrowserExtension::paste() m_part->view()->paste(); } +void DolphinPartBrowserExtension::reparseConfiguration() +{ + m_part->view()->refresh(); +} + //// void DolphinPart::slotEditMimeType()