]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Add support for recentlyused: kio to view properties.
authorDavid Murray <dave@murray.name>
Sat, 30 Oct 2021 15:39:06 +0000 (16:39 +0100)
committerDavid Murray <dave@murray.name>
Sat, 30 Oct 2021 15:39:06 +0000 (16:39 +0100)
Add "recentlyused" to the URL schemes recognised by ViewProperties as
needing special handling.  User-set view properties for the
recentlyused: kio are then saved under view_properties/recentlyused in
dolphin's app data directory.

(Previously, the recentlyused: kio was treated, by default, as if it was
a remote location for the purposes of view properties.  Since it
displays somewhat specialised results (files/directories from various
locations), users might find it useful to set particular view properties
and have them remembered.)

src/views/viewproperties.cpp

index 4b8d017c72e8a2125b163f33d3946de59b4dfa33..2bfdfe81b0d8c2da9aa70b6d8f695a24f53cda33 100644 (file)
@@ -55,6 +55,9 @@ ViewProperties::ViewProperties(const QUrl& url) :
     } else if (url.scheme() == QLatin1String("recentdocuments")) {
         m_filePath = destinationDir(QStringLiteral("recentdocuments"));
         useRecentDocumentsView = true;
+    } else if (url.scheme() == QLatin1String("recentlyused")) {
+        m_filePath = destinationDir(QStringLiteral("recentlyused"));
+        useRecentDocumentsView = true;
     } else if (url.isLocalFile()) {
         m_filePath = url.toLocalFile();