[gnome-shell] screenshot-ui: Make screenshots appear in recent items
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] screenshot-ui: Make screenshots appear in recent items
- Date: Thu, 27 Jan 2022 22:30:54 +0000 (UTC)
commit 4442ced76032e09cea2fa14c7dfa6e056fa8e3d0
Author: Ivan Molodetskikh <yalterz gmail com>
Date: Mon Oct 11 10:17:08 2021 +0300
screenshot-ui: Make screenshots appear in recent items
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
js/ui/screenshot.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js
index 41a4dfe16e..c6b4c1387f 100644
--- a/js/ui/screenshot.js
+++ b/js/ui/screenshot.js
@@ -1,7 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported ScreenshotService, ScreenshotUI, showScreenshotUI */
-const { Clutter, Gio, GObject, GLib, Meta, Shell, St } = imports.gi;
+const { Clutter, Gio, GObject, GLib, Gtk, Meta, Shell, St } = imports.gi;
const GrabHelper = imports.ui.grabHelper;
const Layout = imports.ui.layout;
@@ -1586,6 +1586,9 @@ class ScreenshotUI extends St.Widget {
}
}
+ // Add it to recent files.
+ Gtk.RecentManager.get_default().add_item(file.get_uri());
+
// Show a notification.
const source = new MessageTray.Source(
// Translators: notification source name.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]