[gnome-shell/wip/sass] screenshot: Respect lockdown settings
- From: Jakub Steiner <jimmac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/sass] screenshot: Respect lockdown settings
- Date: Wed, 8 Oct 2014 13:03:05 +0000 (UTC)
commit 47a0f30499f971c9a01be01b7ed827fc9de094d5
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Oct 3 16:33:37 2014 +0200
screenshot: Respect lockdown settings
We allow users/admins to lock down disk writes, respect that when
taking screenshots.
https://bugzilla.gnome.org/show_bug.cgi?id=737846
js/ui/screenshot.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js
index 81094dd..45f013c 100644
--- a/js/ui/screenshot.js
+++ b/js/ui/screenshot.js
@@ -67,12 +67,15 @@ const ScreenshotService = new Lang.Class({
this._screenShooter = new Map();
+ this._lockdownSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' });
+
Gio.DBus.session.own_name('org.gnome.Shell.Screenshot', Gio.BusNameOwnerFlags.REPLACE, null, null);
},
_createScreenshot: function(invocation) {
let sender = invocation.get_sender();
- if (this._screenShooter.has(sender)) {
+ if (this._screenShooter.has(sender) ||
+ this._lockdownSettings.get_boolean('disable-save-to-disk')) {
invocation.return_value(GLib.Variant.new('(bs)', [false, '']));
return null;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]