From 52a7ee7590f4fffa0a9fb671763ef35174941fab Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Sat, 28 Oct 2023 19:14:39 -0300 Subject: [PATCH] screenshot: Make captureScreenshot() return the GFile Make the captureScreenshot() auxiliary function return the GFile at which the texture was saved. This file will be used to return the screenshot URI to the new D-Bus method to take interactive screenshots. Part-of: --- js/ui/screenshot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 8875d9325..cfd5fbd85 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -2279,6 +2279,8 @@ function _storeScreenshot(bytes, pixbuf) { notification.setTransient(true); Main.messageTray.add(source); source.showNotification(notification); + + return file; } /** @@ -2312,7 +2314,7 @@ export async function captureScreenshot(texture, geometry, scale, cursor) { ); stream.close(null); - _storeScreenshot(stream.steal_as_bytes(), pixbuf); + return _storeScreenshot(stream.steal_as_bytes(), pixbuf); } /**