From dd42cfa8535b09fb6f8d91f4f845470c1df45f3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 3 Oct 2014 16:40:49 +0200 Subject: [PATCH] screencast: Re-add lockdown support Commit 81bb7009ea120d3 removed support for the disable-disk-writes lockdown feature for screencasts, add it back. https://bugzilla.gnome.org/show_bug.cgi?id=737846 --- js/ui/screencast.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/ui/screencast.js b/js/ui/screencast.js index def5dc9fa..dd78d39f7 100644 --- a/js/ui/screencast.js +++ b/js/ui/screencast.js @@ -43,6 +43,8 @@ const ScreencastService = new Lang.Class({ this._recorders = new Map(); + this._lockdownSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' }); + Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated)); }, @@ -103,7 +105,8 @@ const ScreencastService = new Lang.Class({ ScreencastAsync: function(params, invocation) { let returnValue = [false, '']; - if (!Main.sessionMode.allowScreencast) { + if (!Main.sessionMode.allowScreencast || + this._lockdownSettings.get_boolean('disable-save-to-disk')) { invocation.return_value(GLib.Variant.new('(bs)', returnValue)); return; } @@ -126,7 +129,8 @@ const ScreencastService = new Lang.Class({ ScreencastAreaAsync: function(params, invocation) { let returnValue = [false, '']; - if (!Main.sessionMode.allowScreencast) { + if (!Main.sessionMode.allowScreencast || + this._lockdownSettings.get_boolean('disable-save-to-disk')) { invocation.return_value(GLib.Variant.new('(bs)', returnValue)); return; }