┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2010-03-09 07:13:51 +0000
committerPeter Penz <[email protected]>2010-03-09 07:13:51 +0000
commit14b3d7010e9c7cad1c68db43ee7cba5d475553f9 (patch)
treece681a1dadca866f35c32e202368a1c2835a68ed
parent13f393f42db51a2bf2a91d7e024dcebb08c224c0 (diff)
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
-rw-r--r--src/dolphinviewcontainer.cpp11
1 files changed, 11 insertions, 0 deletions
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 <QtCore/QTimer>
#include <QtGui/QScrollBar>
+#include <kdesktopfile.h>
#include <kfileitemdelegate.h>
#include <kfileplacesmodel.h>
#include <kglobalsettings.h>
@@ -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();
}