Bug 332853 - File -> Open Recent still present after disabling history
Summary: File -> Open Recent still present after disabling history
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 4.13.0 rc1
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords: junior-jobs
: 324033 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-31 12:36 UTC by Matt Ruffalo
Modified: 2018-03-14 08:25 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Ruffalo 2014-03-31 12:36:46 UTC
Gwenview reports its version as "4.13.0 beta3", which isn't present in the version selection above.

I have always disabled the "Remember folders and URLs" option in Gwenview, and opening the program without loading an image indeed shows "History has been disabled." in white text below the toolbar. In all previous versions of Gwenview that I can remember, disabling history also removed the "Open Recent" option from the File menu, but this is present in this version of Gwenview. Recent files are remembered in the "Open Recent" list and I would prefer not to manually clear this.

I asked about this on the KDE forums at https://forum.kde.org/viewtopic.php?f=213&t=120345 and was recommended to file a bug.

Reproducible: Always

Steps to Reproduce:
1. Settings -> Configure Gwenview... -> Advanced -> disable "Remember folders and URLs"
2. Note that "History has been disabled." shows on the main screen after clicking OK
3. Open an image (either by double-clicking from Dolphin or from Gwenview itself)
4. Observe the Open Recent menu items, which contains the file that was just opened.
5. Close and re-open Gwenview. Note that the file history is preserved.
Actual Results:  
Files are remembered in the Open Recent menu after this option is explicitly disabled. All previous releases of Gwenview in previous KDE versions (as far as I remember) completely removed "Open Recent" from the File menu upon disabling history.

Expected Results:  
"Open Recent" should not be present in the File menu when history is disabled (and of course file names should not be actually stored in ~/.kde/share/config/gwenviewrc either).
Comment 1 Nate Graham 2017-09-09 20:06:24 UTC
Confirmed. Still a problem.
Comment 2 Nate Graham 2017-09-09 20:07:19 UTC
*** Bug 324033 has been marked as a duplicate of this bug. ***
Comment 3 null 2018-03-07 23:25:22 UTC
It does not sound too complicated to implement (access the history setting before saving recent URLs, clear recent URLs from the config when closing the config dialog with checkbox unchecked).
Comment 4 Peter Mühlenpfordt 2018-03-14 08:25:48 UTC
Git commit 8bd2f625c67966ed9d32f98c74f769caf56f6fdd by Peter Mühlenpfordt.
Committed on 14/03/2018 at 08:22.
Pushed by muhlenpfordt into branch 'master'.

Prevent saving Recent Files and LastTargetDir if history is disabled

Summary:
Disabling history in {nav Settings > Configure > Advanced > History}
does not prevent showing and populating {nav File > Open Recent}.
The last target directory for Copy/Move/Link To dialog does not check
for history option too.
This patch only saves/restores file history if the option is enabled
and hides the menu entry if disabled.
Related: bug 391527

Depends on D11280

Test Plan:
* Enable/disable history option
* Open some images/folders in Gwenview
* Copy/Move/Link To some images
* Check if history is (not) saved/restored according to option value

Reviewers: #gwenview, rkflx

Reviewed By: #gwenview, rkflx

Subscribers: rkflx

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

M  +10   -4    app/mainwindow.cpp
M  +2    -1    lib/contextmanager.cpp

https://commits.kde.org/gwenview/8bd2f625c67966ed9d32f98c74f769caf56f6fdd