Store screenshots to the org.gnome.gnome-screenshot auto-save-directory directory, if defined
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnome-shell (Ubuntu) |
Invalid
|
Wishlist
|
Michael Aaron Murphy |
Bug Description
When the `PrintScrn` key is pressed in GNOME Shell, it takes a screenshot and writes it to `$HOME/Pictures`, or otherwise falling back to `$HOME` if that directory is not found. The `gnome-screenshot` tool does a similar action, but also checks for the existence of the `auto-save-
### Implementation Note
I added a `CowPtr` type to make it possible for the `get_screenshot
Alternatively, I could `g_strdup()` the values to copy them onto the heap.
### Testing
1. Before applying the patch, take a screenshot with the PrintScrn key.
2. A screenshot should now be stored in `$HOME/Pictures`.
3. Create the new screenshot directory, and set the value for gnome-screenshot:
```sh
mkdir $HOME/Screenshots
gsettings set org.gnome.
```
4. Take the screenshot again, and notice that it stores in `$HOME/Pictures` instead of `$HOME/Screenshots`
5. Apply the patch, and restart `gnome-shell`, then take the screenshot again
6. The screenshot should be written in `$HOME/Screenshots` instead of `$HOME/Pictures`.
7. Delete the gsettings value, and try again, to see that it returns to storing screenshots in `$HOME/Pictures`
```sh
gsettings reset org.gnome.
```
Thank you for your bug report and work, the right place to suggest code changes is upstream though, https:/ /gitlab. gnome.org/ GNOME/gnome- shell/issues
Can you merge propose your changes there?