shutter-project / shutter

Screenshot tool for Linux
https://shutter-project.org/
GNU General Public License v3.0
520 stars 34 forks source link

Automatically remove screenshots from current session when close Shutter #619

Open ahplaza opened 1 year ago

ahplaza commented 1 year ago

Hello, I don't remember which version of Shutter I was using. But on the last week I installed version 0.99.2 after updated the OS and I'm missing a feature.

Before the update, when I closed Shutter all the screenshots I made are automatically removed (I can't remember if they went to the Trash or entirely removed). But now after I started it again the old screenshots are still present.

I can see that is due to the files are stored at .cache/shutter/unsaved. I only want to save the screenshots I desired since most of the time I copy and paste them to other places on the fly. Is there a way to automatically delete them like before?

Thank you for the support.

Photon89 commented 1 year ago

Could you please check what the setting is in Edit > Preferences > General > Save?

ahplaza commented 1 year ago

It's set to not automatically save, as I want.

Photon89 commented 1 year ago

I had a look into it. Shutter checks whether an unsaved screenshot got a key. If not, it is getting deleted. Looks like unsaved screenshots do get a key, so they are not getting deleted. Now I'm not sure how to proceed with it. Either don't check for a key, just remove all unsaved screenshots, or don't assign keys to unsaved screenshots. I'm not sure why there are two things characterizing the screenshot's status: saved/unsaved and has key/has no key. Seems redundant to me...

The check is at https://github.com/shutter-project/shutter/blob/f9ce66095b64520bd8d4b85e456da5583e4b1198/bin/shutter#L9243 if anyone wants to dig deeper.