From: Peter Penz Date: Tue, 9 Mar 2010 07:13:51 +0000 (+0000) Subject: Port patch 1098976 for Konqueror by David Faure to Dolphin: When the user clicks... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/14b3d7010e9c7cad1c68db43ee7cba5d475553f9?ds=inline Port patch 1098976 for Konqueror by David Faure to Dolphin: When the user clicks on a Type=Link desktop files that point to a directory, let's open that directory in the current view, rather than starting a new Konqueror. As requested by LukasLT for http://forum.kde.org/viewtopic.php?f=14&t=66660 svn path=/trunk/KDE/kdebase/apps/; revision=1101071 --- diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 89cf6cdbd..184dd2bee 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -483,6 +484,16 @@ void DolphinViewContainer::slotItemTriggered(const KFileItem& item) } } + if (item.mimetype() == "application/x-desktop") { + // redirect to the url in Type=Link desktop files + KDesktopFile desktopFile(url.toLocalFile()); + if (desktopFile.hasLinkType()) { + url = desktopFile.readUrl(); + m_view->setUrl(url); + return; + } + } + item.run(); }