Prevent saving Recent Files and LastTargetDir if history is disabled
Summary:
Disabling history in Settings → Configure → Advanced → History
does not prevent showing and populating 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.
BUG: 332853
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