[gnome-shell/wip/sass] screencast: Re-add lockdown support



commit cff5417180ac68d72b169b77c242e4c93e2e99e6
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Oct 3 16:40:49 2014 +0200

    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 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/screencast.js b/js/ui/screencast.js
index def5dc9..dd78d39 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;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]