X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/597b083dbc3984aeb68b14634308ca98cf098cfd..ac73af7bedeebe2afa451249e8a6500651a6ec00:/src/dolphinpart.cpp diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 3a1e6f72c..d26f14061 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -47,6 +48,9 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QStringLi setComponentData( DolphinPartFactory::componentData() ); m_extension = new DolphinPartBrowserExtension(this); + // make sure that other apps using this part find Dolphin's view-file-columns icons + KIconLoader::global()->addAppDir("dolphin"); + m_dirLister = new KDirLister; m_dirLister->setAutoUpdate(true); m_dirLister->setMainWindow(parentWidget->topLevelWidget()); @@ -277,6 +281,14 @@ void DolphinPart::slotRequestItemInfo(const KFileItem& item) void DolphinPart::slotItemTriggered(const KFileItem& item) { + KParts::OpenUrlArguments args; + args.setMimeType(item.mimetype()); + + // Ideally, konqueror should be changed to not require trustedSource for directory views, + // since the idea was not to need BrowserArguments for non-browser stuff... + KParts::BrowserArguments browserArgs; + browserArgs.trustedSource = true; + // MMB click support. // TODO: this doesn't work, mouseButtons() is always 0. // Issue N176832 for the missing QAIV signal; task 177399 @@ -284,9 +296,7 @@ void DolphinPart::slotItemTriggered(const KFileItem& item) if (QApplication::mouseButtons() & Qt::MidButton) { kDebug() << "MMB!!" << item.mimetype(); if (item.mimeTypePtr()->is("inode/directory")) { - KParts::OpenUrlArguments args; - args.setMimeType( item.mimetype() ); - emit m_extension->createNewWindow( item.url(), args ); + emit m_extension->createNewWindow(item.url(), args); } else { kDebug() << "run()"; item.run(); @@ -294,7 +304,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()); + emit m_extension->openUrlRequest(item.url(), args, browserArgs); } }