Bug 311218 - Recent Documents feature should use the FreeDesktop standard "~/.local/share/recently-used.xbel" to store data
Summary: Recent Documents feature should use the FreeDesktop standard "~/.local/share/...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kcoreaddons
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.24.0
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-05 17:19 UTC by Dean Montogmery
Modified: 2019-10-05 05:43 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.63
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Montogmery 2012-12-05 17:19:37 UTC
krunner_recentdocuments uses...

    ~/.kde/share/apps/RecentDocuments/*.desktop

... to store recently used documents.  This works great for KDE applications.  However there are many core opensource applications which follow freedesktop.org standards (Gimp, Firefox, OpenOffice, LibreOffice) store their recent document list in...

    ~/.local/share/recently-used.xbel

http://www.freedesktop.org/wiki/Specifications/desktop-bookmark-spec

Would there be a way to have krunner_recentdocuments merge both .kde/share/apps/RecentDocuments and .local/share/recently-used.xbel into one list - so kde can see recently downloaded files, saved documents etc from any application?

Or maybe a inotify watch on .local/share/recently-used.xbel that parses the into .kde/share/apps/RecentDocuments/

Reproducible: Always

Steps to Reproduce:
1. Download a file in firefox or create/save a document in LibreOffice or create an image in Gimp.
2. Non kde app documents do not appear in kde's recently used.
Actual Results:  
Only kde apps show in the list of Recently Used ( kate, kdenlive, etc)

Expected Results:  
All recently used documents should appear in the lists.
Comment 1 Nikos Platis 2015-09-03 04:44:39 UTC
This is really missing from KDE right now.

Of course, if there is a freedesktop.org standard, maybe it is KDE that should adhere to it by putting its recent documents in the  ~/.local/share/recently-used.xbel file so that other desktop environments notice them as well.
Comment 2 Moritz Moeller-Herrmann 2016-07-27 11:05:33 UTC
I can confirm that KDE/qt apps store the recent items in the wrong place and do not comply with the freedesktop recommendation that is follows by Firefox, GTK, Libreoffice etc.


This is really a bug, as you cannot find a file for uploading in firefox under recent items that has been created in a KDE / Plasma / Qt app - annoying as hell and breaks the work-flow when using Plasma together with any non-plasma applications.

I guess the change should be applied to "KRecentFilesAction" or the qt equivalent.
Comment 3 Méven Car 2019-08-17 17:05:55 UTC
https://phabricator.kde.org/D23112 solves partially the bug.

With KDE framework 5.62 the recent document accessed from apps using gtk framework  will be accessible in the history of the kicker/kickoff menu.

More work is active to make it accessible in dolphin and KDE file open dialog.
See https://phabricator.kde.org/D7446 and https://phabricator.kde.org/D22144 for details.
Comment 4 Nate Graham 2019-08-18 01:46:30 UTC
This is awesome work, Méven!

I wonder if we should eventually move to using the recently-used.xbel file as the kactivities recent documents data store once everything is using the kactivities backend. Then we'd be in compliance with the FDO spec.
Comment 5 Méven Car 2019-08-18 06:37:38 UTC
Despite the xbel spec is interesting, it cannot cover some of our use cases, or at least we would need to expand the spec, in particular activities and score.
Furthermore Kactivities backend is based on sqlite and allows interesting things like access date filtering and not just last ones, and more.
The store we could want to replace with the recently-used.xbel file would be KRecentDocuments that currently stores its history in multiple desktop file in ~/.local/share/RecentDocuments/

Ivan would probably make a better point.
Comment 6 Méven Car 2019-10-05 05:43:30 UTC
Git commit e65bf3bc541ac5ee7962432ff308c477a1dad882 by Méven Car, on behalf of Nate Graham.
Committed on 05/10/2019 at 05:43.
Pushed by meven into branch 'master'.

[Places panel] Revamp the Recently Saved section

Summary:
Related: bug 110016, bug 159299
FIXED-IN: 5.63

Revamp the {nav Recently Saved} section, including the following changes:
- Change the section name to "Recent"
- Change the name of the existing entries to "Modified Today" and "Modified Yesterday", for clarity.
- Add "Recent Files" and "Recent Locations" item corresponding to `recentlyused:/files` and `recentlyused:/locations` listing the last 30 files or directories accessed in the current activity, and adjust the code to support this.

Depends on D22144
Depends on D23742
Depends on D23737
Depends on D23741
Depends on D23760

Test Plan:
LANG="EN" ctest

{F7324750}

Adds "Recent Files"  "Recent Locations" entries to user accounts places recent group.

Reviewers: #dolphin, broulik, elvisangelaccio, #vdg, #frameworks, ngraham

Reviewed By: #dolphin, elvisangelaccio, #vdg, ngraham

Subscribers: meven, trickyricky26, andreask, huftis, svenmauch, kde-frameworks-devel, spoorun, andreaska, gregormi, markg, alexeymin, broulik, elvisangelaccio, dfaure, davidedmundson, ltoscano, #konqueror

Tags: #dolphin, #frameworks

Maniphest Tasks: T8349

Differential Revision: https://phabricator.kde.org/D7446

M  +101  -50   autotests/kfileplacesmodeltest.cpp
M  +12   -6    autotests/kfileplacesviewtest.cpp
M  +3    -2    src/filewidgets/kfileplacesitem.cpp
M  +41   -2    src/filewidgets/kfileplacesmodel.cpp
M  +7    -0    src/filewidgets/kfileplacesmodel.h

https://commits.kde.org/kio/e65bf3bc541ac5ee7962432ff308c477a1dad882