From 5516cad087b0c92fa1e960521491c640f962023b 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 6ddf04197..cfb315e8b 100644 --- a/js/ui/sessionMode.js +++ b/js/ui/sessionMode.js @@ -195,6 +195,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;