Bug 394182 - Customized screenshot directory is not respected in certain actions
Summary: Customized screenshot directory is not respected in certain actions
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 18.04.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2018-05-13 00:43 UTC by Tom
Modified: 2018-10-15 22:07 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 18.12.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom 2018-05-13 00:43:22 UTC
I changed the screenshot directory from (default) ~/Bilder to ~/Bilder/Screenshots .

I noticed that when I click "save", the screenshot is correctly stored to the new directory, but when I click "save under...", the old default directory ~/Bilder is opened for selection, not the new one.

Similar problem for the menu point Extra > Open screenshot folder. Also here, the old default folder is opened (~/Bilder) but I expected that my customized folder ~/Bilder/Screenshot is opened.

Bug? Or Feature? I am puzzled.
Comment 1 null 2018-05-13 08:00:29 UTC
Well, you spotted a valid inconsistency in the UI.

Technically, your are only setting the default location for the Save button, and the "Open screenshot folder" action as well as the "Save As" action default to the regular XDG Pictures location in case you did not save a screenshot before (the last used location should then be remembered for the next invocation).

As the Save location setting defaults to the same XDG Pictures folder, I think it makes sense to use this setting also for the other actions as a default if the user has customized it.

Marking this as a junior job to indicate this is an easy bug to get started with.
Comment 2 Nate Graham 2018-10-15 19:52:53 UTC
Git commit 74a2df918f87d81eba16117bb6ae242f6ab07937 by Nate Graham, on behalf of Kyle Utecht.
Committed on 15/10/2018 at 19:52.
Pushed by ngraham into branch 'master'.

clarify logic for openScreenshotsFolder, refactor preferences access, and clarify method names

Summary:
New openScreenshotsFolder logic is to highlight recently saved file, then default save location
(save mode) or last saved file's folder (save as mode) with failsafe as default save location.
SpectacleConfig now stores the last saved files and can determine the last saved file location from the
file name through separate method. Removed extraneous methods and variables from ExportManager.
ExportManager now uses SpectacleConfig to access save location preferences.

Reviewers: #spectacle, ngraham

Reviewed By: #spectacle, ngraham

Subscribers: ngraham, #spectacle

Tags: #spectacle

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

M  +8    -26   src/ExportManager.cpp
M  +1    -6    src/ExportManager.h
M  +21   -14   src/Gui/KSMainWindow.cpp
M  +2    -2    src/Gui/SettingsDialog/SaveOptionsPage.cpp
M  +30   -6    src/SpectacleConfig.cpp
M  +11   -5    src/SpectacleConfig.h

https://commits.kde.org/spectacle/74a2df918f87d81eba16117bb6ae242f6ab07937