X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/8eed64171cfdee8be2690e4fb7e0aaeb3aafc6e5..ac73af7bedeebe2afa451249e8a6500651a6ec00:/src/dolphinpart.cpp diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 12ba14a9f..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()); @@ -154,10 +158,10 @@ void DolphinPart::createActions() connect(goActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(slotGoTriggered(QAction*))); - createGoAction("go_applications", "start-here", + createGoAction("go_applications", "start-here-kde", i18nc("@action:inmenu Go", "App&lications"), QString("programs:/"), goActionGroup); - createGoAction("go_network_folders", "drive-remote", + createGoAction("go_network_folders", "folder-remote", i18nc("@action:inmenu Go", "&Network Folders"), QString("remote:/"), goActionGroup); createGoAction("go_settings", "preferences-system", @@ -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); } }