┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt6
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/dbusinterface.h4
-rw-r--r--src/dolphinbookmarkhandler.cpp7
-rw-r--r--src/dolphinmainwindow.cpp6
-rw-r--r--src/dolphintabwidget.cpp7
-rw-r--r--src/kitemviews/kitemlistcontroller.cpp2
-rw-r--r--src/org.kde.dolphin.appdata.xml1
-rw-r--r--src/panels/terminal/org.kde.KIOFuse.VFS.xml13
-rw-r--r--src/panels/terminal/terminalpanel.cpp45
-rw-r--r--src/panels/terminal/terminalpanel.h2
12 files changed, 82 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index c48f92390..6c1df4de4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ CMakeLists.txt.user
.directory
*.kdev4
/build*/
+.cmake/
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1e8ce07ca..0eb61277e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,13 +2,13 @@ cmake_minimum_required(VERSION 3.0)
# KDE Application Version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "20")
-set (RELEASE_SERVICE_VERSION_MINOR "03")
-set (RELEASE_SERVICE_VERSION_MICRO "90")
+set (RELEASE_SERVICE_VERSION_MINOR "07")
+set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
project(Dolphin VERSION ${RELEASE_SERVICE_VERSION})
set(QT_MIN_VERSION "5.11.0")
-set(KF5_MIN_VERSION "5.67.0")
+set(KF5_MIN_VERSION "5.69.0")
# ECM setup
find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 02a43a209..fc7b33cbd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -272,6 +272,7 @@ qt5_add_resources(dolphinstatic_SRCS dolphin.qrc)
qt5_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/dolphinmainwindow.h org.kde.DolphinMainWindow.xml)
qt5_add_dbus_adaptor(dolphinstatic_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.DolphinMainWindow.xml dolphinmainwindow.h DolphinMainWindow)
qt5_add_dbus_interface(dolphinstatic_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.DolphinMainWindow.xml dolphinmainwindowinterface)
+qt5_add_dbus_interface(dolphinstatic_SRCS panels/terminal/org.kde.KIOFuse.VFS.xml kiofuse_interface)
add_library(dolphinstatic STATIC ${dolphinstatic_SRCS})
diff --git a/src/dbusinterface.h b/src/dbusinterface.h
index 391916d62..c1029ea23 100644
--- a/src/dbusinterface.h
+++ b/src/dbusinterface.h
@@ -34,12 +34,12 @@ public:
Q_SCRIPTABLE void ShowItemProperties(const QStringList& uriList, const QString& startUpId);
/**
- * Set whether this interface has been created by dolphin --deamon.
+ * Set whether this interface has been created by dolphin --daemon.
*/
void setAsDaemon();
/**
- * @return Whether this interface has been created by dolphin --deamon.
+ * @return Whether this interface has been created by dolphin --daemon.
*/
bool isDaemon() const;
diff --git a/src/dolphinbookmarkhandler.cpp b/src/dolphinbookmarkhandler.cpp
index ded83d6bb..0d31b8984 100644
--- a/src/dolphinbookmarkhandler.cpp
+++ b/src/dolphinbookmarkhandler.cpp
@@ -21,6 +21,7 @@
#include "dolphinmainwindow.h"
#include "dolphinviewcontainer.h"
#include "global.h"
+#include <KActionCollection>
#include <KBookmarkMenu>
#include <KIO/Global>
#include <QDebug>
@@ -47,7 +48,11 @@ DolphinBookmarkHandler::DolphinBookmarkHandler(DolphinMainWindow *mainWindow,
}
m_bookmarkManager = KBookmarkManager::managerForFile(bookmarksFile, QStringLiteral("dolphin"));
m_bookmarkManager->setUpdate(true);
- m_bookmarkMenu.reset(new KBookmarkMenu(m_bookmarkManager, this, menu, collection));
+ m_bookmarkMenu.reset(new KBookmarkMenu(m_bookmarkManager, this, menu));
+
+ collection->addAction(QStringLiteral("add_bookmark"), m_bookmarkMenu->addBookmarkAction());
+ collection->addAction(QStringLiteral("edit_bookmarks"), m_bookmarkMenu->editBookmarksAction());
+ collection->addAction(QStringLiteral("add_bookmarks_list"), m_bookmarkMenu->bookmarkTabsAsFolderAction());
}
DolphinBookmarkHandler::~DolphinBookmarkHandler()
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index f88bc3f44..9fe870044 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -53,6 +53,7 @@
#include <KDualAction>
#include <KFileItemListProperties>
#include <KHelpMenu>
+#include <KIO/CommandLauncherJob>
#include <KIO/JobUiDelegate>
#include <KIO/OpenFileManagerWindowJob>
#include <KJobWidgets>
@@ -926,7 +927,10 @@ void DolphinMainWindow::compareFiles()
command.append("\" \"");
command.append(urlB.toDisplayString(QUrl::PreferLocalFile));
command.append('\"');
- KRun::runCommand(command, QStringLiteral("Kompare"), QStringLiteral("kompare"), this);
+
+ KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(command, this);
+ job->setDesktopName(QStringLiteral("org.kde.kompare"));
+ job->start();
}
void DolphinMainWindow::toggleShowMenuBar()
diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp
index 89c54baf5..fba6fe084 100644
--- a/src/dolphintabwidget.cpp
+++ b/src/dolphintabwidget.cpp
@@ -25,9 +25,9 @@
#include "dolphinviewcontainer.h"
#include <KConfigGroup>
-#include <KRun>
#include <KShell>
#include <kio/global.h>
+#include <KIO/CommandLauncherJob>
#include <KAcceleratorManager>
#include <QApplication>
@@ -334,8 +334,9 @@ void DolphinTabWidget::detachTab(int index)
}
args << QStringLiteral("--new-window");
- const QString command = QStringLiteral("dolphin %1").arg(KShell::joinArgs(args));
- KRun::runCommand(command, this);
+ KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob("dolphin", args, this);
+ job->setDesktopName(QStringLiteral("org.kde.dolphin"));
+ job->start();
closeTab(index);
}
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp
index 5ddf52e5f..0c25ebb8b 100644
--- a/src/kitemviews/kitemlistcontroller.cpp
+++ b/src/kitemviews/kitemlistcontroller.cpp
@@ -1219,7 +1219,7 @@ void KItemListController::startDragging()
const QPoint hotSpot((pixmap.width() / pixmap.devicePixelRatio()) / 2, 0);
drag->setHotSpot(hotSpot);
- drag->exec(Qt::MoveAction | Qt::CopyAction | Qt::LinkAction, Qt::CopyAction);
+ drag->exec(Qt::MoveAction | Qt::CopyAction | Qt::LinkAction, Qt::MoveAction);
QAccessibleEvent accessibilityEvent(view(), QAccessible::DragDropStart);
QAccessible::updateAccessibility(&accessibilityEvent);
diff --git a/src/org.kde.dolphin.appdata.xml b/src/org.kde.dolphin.appdata.xml
index 358274912..89b3646e0 100644
--- a/src/org.kde.dolphin.appdata.xml
+++ b/src/org.kde.dolphin.appdata.xml
@@ -576,6 +576,7 @@
<caption xml:lang="pt-BR">Gerenciamento de arquivos no Dolphin</caption>
<caption xml:lang="ru">Управление файлами</caption>
<caption xml:lang="sk">Správa súborov v Dolphin</caption>
+ <caption xml:lang="sl">Upravljanje datotek v Dolphinu</caption>
<caption xml:lang="sv">Filhantering i Dolphin</caption>
<caption xml:lang="uk">Керування файлами у Dolphin</caption>
<caption xml:lang="x-test">xxFile management in Dolphinxx</caption>
diff --git a/src/panels/terminal/org.kde.KIOFuse.VFS.xml b/src/panels/terminal/org.kde.KIOFuse.VFS.xml
new file mode 100644
index 000000000..56f753e41
--- /dev/null
+++ b/src/panels/terminal/org.kde.KIOFuse.VFS.xml
@@ -0,0 +1,13 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node>
+ <interface name="org.kde.KIOFuse.VFS">
+ <method name="mountUrl">
+ <arg name="remoteUrl" type="s" direction="in"/>
+ <arg type="s" direction="out"/>
+ </method>
+ <method name="remoteUrl">
+ <arg name="localUrl" type="s" direction="in"/>
+ <arg type="s" direction="out"/>
+ </method>
+ </interface>
+</node>
diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp
index 861afebee..b0aff9a77 100644
--- a/src/panels/terminal/terminalpanel.cpp
+++ b/src/panels/terminal/terminalpanel.cpp
@@ -18,6 +18,7 @@
***************************************************************************/
#include "terminalpanel.h"
+#include "kiofuse_interface.h"
#include <KIO/DesktopExecParser>
#include <KIO/Job>
@@ -25,6 +26,7 @@
#include <KJobWidgets>
#include <KLocalizedString>
#include <KMessageWidget>
+#include <KMountPoint>
#include <KParts/ReadOnlyPart>
#include <KPluginFactory>
#include <KPluginLoader>
@@ -50,7 +52,10 @@ TerminalPanel::TerminalPanel(QWidget* parent) :
m_konsolePartMissingMessage(nullptr),
m_konsolePart(nullptr),
m_konsolePartCurrentDirectory(),
- m_sendCdToTerminalHistory()
+ m_sendCdToTerminalHistory(),
+ m_kiofuseInterface(QStringLiteral("org.kde.KIOFuse"),
+ QStringLiteral("/org/kde/KIOFuse"),
+ QDBusConnection::sessionBus())
{
m_layout = new QVBoxLayout(this);
m_layout->setContentsMargins(0, 0, 0, 0);
@@ -244,6 +249,19 @@ void TerminalPanel::slotMostLocalUrlResult(KJob* job)
const QUrl url = statJob->mostLocalUrl();
if (url.isLocalFile()) {
sendCdToTerminal(url.toLocalFile());
+ } else {
+ // URL isn't local, only hope for the terminal to be in sync with the
+ // DolphinView is to mount the remote URL in KIOFuse and point to it.
+ // If we can't do that for any reason, silently fail.
+ auto reply = m_kiofuseInterface.mountUrl(url.toString());
+ QDBusPendingCallWatcher * watcher = new QDBusPendingCallWatcher(reply, this);
+ QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=] (QDBusPendingCallWatcher* watcher) {
+ watcher->deleteLater();
+ if (!reply.isError()) {
+ // Successfully mounted, point to the KIOFuse equivalent path.
+ sendCdToTerminal(reply.value());
+ }
+ });
}
m_mostLocalUrlJob = nullptr;
@@ -261,8 +279,31 @@ void TerminalPanel::slotKonsolePartCurrentDirectoryChanged(const QString& dir)
}
}
+ // User may potentially be browsing inside a KIOFuse mount.
+ // If so lets try and change the DolphinView to point to the remote URL equivalent.
+ // instead of into the KIOFuse mount itself (which can cause performance issues!)
const QUrl url(QUrl::fromLocalFile(dir));
- emit changeUrl(url);
+
+ KMountPoint::Ptr mountPoint = KMountPoint::currentMountPoints().findByPath(m_konsolePartCurrentDirectory);
+ if (mountPoint && mountPoint->mountType() != QStringLiteral("fuse.kio-fuse")) {
+ // Not in KIOFUse mount, so just switch to the corresponding URL.
+ emit changeUrl(url);
+ return;
+ }
+
+ auto reply = m_kiofuseInterface.remoteUrl(m_konsolePartCurrentDirectory);
+ QDBusPendingCallWatcher * watcher = new QDBusPendingCallWatcher(reply, this);
+ QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=] (QDBusPendingCallWatcher* watcher) {
+ watcher->deleteLater();
+ if (reply.isError()) {
+ // KIOFuse errored out... just show the normal URL
+ emit changeUrl(url);
+ } else {
+ // Our location happens to be in a KIOFuse mount and is mounted.
+ // Let's change the DolphinView to point to the remote URL equivalent.
+ emit changeUrl(QUrl::fromUserInput(reply.value()));
+ }
+ });
}
bool TerminalPanel::terminalHasFocus() const
diff --git a/src/panels/terminal/terminalpanel.h b/src/panels/terminal/terminalpanel.h
index 6ab205fe3..661fee4d4 100644
--- a/src/panels/terminal/terminalpanel.h
+++ b/src/panels/terminal/terminalpanel.h
@@ -21,6 +21,7 @@
#define TERMINALPANEL_H
#include "panels/panel.h"
+#include "kiofuse_interface.h"
#include <QQueue>
@@ -101,6 +102,7 @@ private:
KParts::ReadOnlyPart* m_konsolePart;
QString m_konsolePartCurrentDirectory;
QQueue<QString> m_sendCdToTerminalHistory;
+ org::kde::KIOFuse::VFS m_kiofuseInterface;
};
#endif // TERMINALPANEL_H