From 823966442841f00ea04fe0720db60e6edf7486dc Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Tue, 15 Apr 2014 13:58:59 +0200 Subject: [PATCH] Indentation fixes. --- gnome-shell-extension/extension.js | 78 +++++++++++++++--------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/gnome-shell-extension/extension.js b/gnome-shell-extension/extension.js index eb7095f..9bca0e6 100644 --- a/gnome-shell-extension/extension.js +++ b/gnome-shell-extension/extension.js @@ -44,63 +44,63 @@ const CameraStatusButton = new Lang.Class({ Extends: PanelMenu.Button, _init: function() { - this.parent(0.0, _("Webcam status")); - - let icon = new St.Icon({ icon_name: 'camera-web-symbolic', + this.parent(0.0, _("Webcam status")); + + let icon = new St.Icon({ icon_name: 'camera-web-symbolic', style_class: 'system-status-icon' }); this.actor.add_child(icon); this.camera_is_on = false; - this._proxy = new WebcamStatusDbusProxy( - Gio.DBus.session, - 'com.uploadedlobster.WebcamAccessMonitor', - '/com/uploadedlobster/WebcamAccessMonitor'); + this._proxy = new WebcamStatusDbusProxy( + Gio.DBus.session, + 'com.uploadedlobster.WebcamAccessMonitor', + '/com/uploadedlobster/WebcamAccessMonitor'); - this._setupWatch(); - this._checkCameraIsActive(); + this._setupWatch(); + this._checkCameraIsActive(); }, _setupWatch: function() { - this._changedSignalId = this._proxy.connectSignal( - 'stateChanged', Lang.bind(this, this._onStateChange)); + this._changedSignalId = this._proxy.connectSignal( + 'stateChanged', Lang.bind(this, this._onStateChange)); }, _onStateChange: function(emitter, senderName, parameters) { - // parameters is a tuple of type (si), e.g. ('/dev/video0', 1) - let device = parameters[0][0] - let state = parameters[0][1]; - log('DEBUG: Camera device ' + device + ' changed state ' + state); - this._updateCameraStatus(state == 1); + // parameters is a tuple of type (si), e.g. ('/dev/video0', 1) + let device = parameters[0][0] + let state = parameters[0][1]; + log('DEBUG: Camera device ' + device + ' changed state ' + state); + this._updateCameraStatus(state == 1); }, _checkCameraIsActive: function() { - this._proxy.getAllDeviceStatesRemote( - Lang.bind(this, function(result, excp) { - [result] = result - var status = true; - for (var device in result) { - log('DEBUG: Camera device ' + device + ' state ' + result[device]); - status &= result[device] == 1; - } - - this._updateCameraStatus(status); - })); + this._proxy.getAllDeviceStatesRemote( + Lang.bind(this, function(result, excp) { + [result] = result + var status = true; + for (var device in result) { + log('DEBUG: Camera device ' + device + ' state ' + result[device]); + status &= result[device] == 1; + } + + this._updateCameraStatus(status); + })); }, _updateCameraStatus: function(status) { - if (this.camera_is_on != status) { - this.camera_is_on = status; - - // if (this.camera_is_on) { - // Main.notify("Webcam activated"); - // } - // else { - // Main.notify("Webcam deactivated"); - // } - } - - this.actor.visible = this.camera_is_on; + if (this.camera_is_on != status) { + this.camera_is_on = status; + + // if (this.camera_is_on) { + // Main.notify("Webcam activated"); + // } + // else { + // Main.notify("Webcam deactivated"); + // } + } + + this.actor.visible = this.camera_is_on; }, });