mirror of
https://github.com/elementary/gala.git
synced 2024-09-20 20:07:11 +03:00
Screenshot: Refactor ScreenshotManager.save_image
In previous versions of GNOME Settings daemon (elementary OS <= 5), saving to clipboard was handled by the daemon. The daemon used to request Gala to save the screenshot in a temp path like "/tmp/gnome-settings-daemon-screenshot-XXXX" and copied the image to the clipboard from there. More information: https://github.com/elementary/gala/issues/474 Now, Gala is in charge of copying to clipboard when the take screenshot methods receive an empty filename. This commit: Move the code from save_image to save_image_to_file.
This commit is contained in:
parent
c0506cb99b
commit
0c9a68aa8b
@ -254,6 +254,10 @@ namespace Gala {
|
||||
}
|
||||
|
||||
static async bool save_image (Cairo.ImageSurface image, string filename, out string used_filename) {
|
||||
return yield save_image_to_file (image, filename, out used_filename);
|
||||
}
|
||||
|
||||
static async bool save_image_to_file (Cairo.ImageSurface image, string filename, out string used_filename) {
|
||||
used_filename = filename;
|
||||
|
||||
// We only alter non absolute filename because absolute
|
||||
|
Loading…
Reference in New Issue
Block a user