--- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -2319,49 +2319,7 @@ function _storeScreenshot(bytes, pixbuf) { pixbuf.rowstride ); - // Show a notification. - const source = new MessageTray.Source({ - // Translators: notification source name. - title: _('Screenshot'), - iconName: 'screenshot-recorded-symbolic', - }); - const notification = new MessageTray.Notification({ - source, - // Translators: notification title. - title: _('Screenshot captured'), - // Translators: notification body when a screenshot was captured. - body: _('You can paste the image from the clipboard.'), - datetime: time, - gicon: content, - isTransient: true, - }); - - if (!disableSaveToDisk) { - // Translators: button on the screenshot notification. - notification.addAction(_('Show in Files'), () => { - const app = - Gio.app_info_get_default_for_type('inode/directory', false); - - if (app === null) { - // It may be null e.g. in a toolbox without nautilus. - log('Error showing in files: no default app set for inode/directory'); - return; - } - - app.launch([file], global.create_app_launch_context(0, -1)); - }); - notification.connect('activated', () => { - try { - Gio.app_info_launch_default_for_uri( - file.get_uri(), global.create_app_launch_context(0, -1)); - } catch (err) { - logError(err, 'Error opening screenshot'); - } - }); - } - - Main.messageTray.add(source); - source.addNotification(notification); + // patched: do not show a notification after taking a screenshot return file; }