screenshot-ui: Make screenshots appear in recent items
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
This commit is contained in:
parent
0b83541a3b
commit
4442ced760
@ -1,7 +1,7 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
/* exported ScreenshotService, ScreenshotUI, showScreenshotUI */
|
/* 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 GrabHelper = imports.ui.grabHelper;
|
||||||
const Layout = imports.ui.layout;
|
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.
|
// Show a notification.
|
||||||
const source = new MessageTray.Source(
|
const source = new MessageTray.Source(
|
||||||
// Translators: notification source name.
|
// Translators: notification source name.
|
||||||
|
Loading…
Reference in New Issue
Block a user