Bug 362474 - Copy To/Move To does not remember path any more
Summary: Copy To/Move To does not remember path any more
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: Other (add details in bug description)
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
: 374936 383532 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-04-29 15:36 UTC by Peter Mühlenpfordt
Modified: 2017-11-20 16:40 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In: 17.08.1


Attachments
Additional patch to make the targetUrl persistent (909 bytes, patch)
2017-11-10 11:47 UTC, Peter Mühlenpfordt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Mühlenpfordt 2016-04-29 15:36:21 UTC
Older versions of gwenview (I used 4.13.3 from Kubuntu 14.04 LTS) stored the path where files are copied to (F7) or moved to (F8) and the "Copy To"/"Move To" dialog box starts in this directory again.
Since upgrade to Kubuntu 16.04 and gwenview 15.12.3 the file dialog always starts in the gwenview working directory (where gwenview is started from).
There's a "Rember folders and URLs" config option, but it has no effect on this issue.

Release: Kubuntu 16.04 LTS
Version of gwenview: 4:15.12.3-0ubuntu1


Reproducible: Always

Steps to Reproduce:
1. Open any image with gwenview (e.g. in your home)
2. Press F7 (copy to)
3. Select e.g. /tmp folder as destination
4. Press F7 again


Actual Results:  
Second dialog box starts in home directory (or whereever you started gwenview from).

Expected Results:  
Second dialog box should start in /tmp directory again (or whereever you copied the previous image to).
Comment 1 Achim Bohnet 2016-04-29 16:06:40 UTC
Same here.
Comment 2 cippalippa 2016-05-21 09:07:19 UTC
Same here.
Ubuntu 16.04.
Comment 3 DR 2016-05-21 11:15:43 UTC
Same here
gwenview 4:15.08.3-1 (Debian)
Comment 4 JP 2016-08-05 03:24:16 UTC
Same here.
Gwenview 15.12.3
KDE Frameworks 5.23.0
Qt 5.5.1
Kubuntu 16.04.1
Comment 5 Yuriy 2016-09-05 14:52:27 UTC
Same here 16.04.3
Comment 6 Simon 2016-09-12 06:11:18 UTC
If anyone cares, here is a workaround/hack that stores the path in a static variable.
https://github.com/thielsn/gwenview/commit/2ae15844267de360c210ed15a41d7b315448b49b

For a real fix the path should probably be stored in QSettings.
Comment 7 Simon 2016-09-12 06:24:22 UTC
The issue was introduced when porting to QFileDialog:

https://github.com/KDE/gwenview/commit/6cd4688f7b17ede3e2c01e9b97207e0c1400325a

Re-using the pseudo URL "kfiledialog:///<copyMoveOrLink>" apparently not supported in QFileDialog.
Comment 8 Christoph Feck 2016-12-20 20:34:04 UTC
*** Bug 373629 has been marked as a duplicate of this bug. ***
Comment 9 Daniel Schröter 2017-03-26 19:37:32 UTC
No Fix for one year :-(
I touch this bug every week.

Is it a QT problem. Should we report it there?
Comment 10 John O'Neall 2017-06-15 17:04:58 UTC
Problem persists. Very annoying if working on lots of images.

Gwenviw 17.04.0, KDE 5.33.0.
Comment 11 Simon 2017-06-24 22:31:33 UTC
I've updated and improved the fix for the current version of the master branch on GitHub at https://github.com/thielsn/gwenview/commits/fix_362474
Comment 12 Christoph Feck 2017-06-26 18:41:30 UTC
https://phabricator.kde.org/D6379
Comment 13 Christoph Feck 2017-08-15 15:38:40 UTC
*** Bug 383532 has been marked as a duplicate of this bug. ***
Comment 14 Christoph Feck 2017-08-18 00:45:50 UTC
Git commit 7be60997b7478c0bb79ae6e915600de3ac17d89e by Christoph Feck, on behalf of Simon Thiel.
Committed on 18/08/2017 at 00:42.
Pushed by cfeck into branch 'Applications/17.08'.

Remember paths for Copy-To and Move-To
FIXED-IN: 17.08.1

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

M  +12   -9    app/fileoperations.cpp
M  +5    -3    app/fileoperations.h
M  +3    -3    app/fileopscontextmanageritem.cpp
M  +12   -0    lib/contextmanager.cpp
M  +4    -0    lib/contextmanager.h

https://commits.kde.org/gwenview/7be60997b7478c0bb79ae6e915600de3ac17d89e
Comment 15 Peter Mühlenpfordt 2017-11-10 11:47:35 UTC
Created attachment 108775 [details]
Additional patch to make the targetUrl persistent

Many thanks for fixing this issue.  :-)
I added a few more lines to make the targetUrl persistent, as it used to be in the 'original' version.
Comment 16 null 2017-11-10 13:09:42 UTC
> Additional patch to make the targetUrl persistent
Thanks a lot! Can you confirm this fixes bug 374936?

It would be great if you could upload the patch to https://phabricator.kde.org for review. (You'd need to register first at https://identity.kde.org/index.php?r=registration/index, see also https://community.kde.org/Infrastructure/Phabricator).

If that's too much of a hassle, I can do this too, but it might take me a while to get to it and maybe you want to contribute more patches fixing some of the low-hanging fruits in Gwenview in the future too ;)
Comment 17 Peter Mühlenpfordt 2017-11-10 17:15:17 UTC
Patch is uploaded here:
https://phabricator.kde.org/D8747

Sorry, I can not confirm bug 374936 or if it's fixed by these patches.
Comment 18 Nate Graham 2017-11-10 21:11:28 UTC
It does definitely seem like bug 374936 is a duplicate of this.
Comment 19 Nate Graham 2017-11-10 21:11:40 UTC
*** Bug 374936 has been marked as a duplicate of this bug. ***
Comment 20 null 2017-11-20 16:40:58 UTC
Git commit 9056aa941e0d624094ef2762e9bbb705e56f753e by Henrik Fehlauer, on behalf of Peter Mühlenpfordt.
Committed on 20/11/2017 at 16:40.
Pushed by rkflx into branch 'Applications/17.12'.

Persist path for "Copy/Move/Link To" to config file

Summary:
Additional patch to make the targetUrl persistent again.
Modified storage of dirpath only instead of filepath.
Save temporarily stored path of Copy/Move/Link To file dialogues from ContextManager in rc-file and restore on next start.

Reviewers: rkflx

Reviewed By: rkflx

Subscribers: ngraham, dhaumann, rkflx

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

M  +4    -1    app/fileoperations.cpp
M  +2    -0    app/mainwindow.cpp
M  +11   -0    lib/contextmanager.cpp
M  +3    -0    lib/contextmanager.h
M  +6    -0    lib/gwenviewconfig.kcfg

https://commits.kde.org/gwenview/9056aa941e0d624094ef2762e9bbb705e56f753e