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?

** Changed in: gnome-shell (Ubuntu)
   Importance: Undecided => Wishlist

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-shell in Ubuntu.
https://bugs.launchpad.net/bugs/1818905

Title:
  Store screenshots to the org.gnome.gnome-screenshot auto-save-
  directory directory, if defined

Status in gnome-shell package in Ubuntu:
  New

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-directory` gsetting in `org.gnome.gnome-screenshot`. This
  will allow GNOME Shell to also use that key, and store screenshots in
  this location when found.

  ### Implementation Note

  I added a `CowPtr` type to make it possible for the
  `get_screenshot_directory()` function to return a `gchar*` which is
  either owned or borrowed, and to free a value when it is owned.
  `g_get_user_special_dir ()` and `g_get_home_dir ()` return `gchar*`
  values which are owned by GLib, and must not be freed, but
  `g_settings_get_string` is owned, and must be freed.

  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.gnome-screenshot auto-save-directory $HOME/Screenshots
  ```
  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.gnome-screenshot auto-save-directory
  ```

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1818905/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to