From d44d00f0f490d5ff27cca190b8665d726df0f718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 8 May 2013 20:25:34 +0200 Subject: [PATCH] sessionMode: Add 'allowScreencast' property Our built-in screen recorder is implemented as a component, so it will just be disabled when the session mode doesn't allow screencasting. However we will expose screencasting functionality on DBus as well, and while it makes sense to restrict its availablity to the same modes as the existing recorder, exporting/unexporting the service depending on the session mode is not very consumer friendly. For that reason, add an additional 'allowScreencast' property that for now mirrors the availability of the 'recorder' component. https://bugzilla.gnome.org/show_bug.cgi?id=696247 --- js/ui/sessionMode.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js index edf2e0623..4738c2e29 100644 --- a/js/ui/sessionMode.js +++ b/js/ui/sessionMode.js @@ -184,6 +184,10 @@ const SessionMode = new Lang.Class({ return this._modeStack[this._modeStack.length - 1]; }, + get allowScreencast() { + return this.components.indexOf('recorder') != -1; + }, + _sync: function() { let params = this._modes[this.currentMode]; let defaults;