2013-07-17 15:26:06 -04:00
|
|
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
|
|
|
|
|
|
|
const Lang = imports.lang;
|
|
|
|
|
|
|
|
const Main = imports.ui.main;
|
|
|
|
const PanelMenu = imports.ui.panelMenu;
|
|
|
|
|
2017-07-18 13:41:25 -04:00
|
|
|
var Indicator = new Lang.Class({
|
2013-07-17 15:26:06 -04:00
|
|
|
Name: 'ScreencastIndicator',
|
|
|
|
Extends: PanelMenu.SystemIndicator,
|
|
|
|
|
2017-10-30 20:03:21 -04:00
|
|
|
_init() {
|
2013-07-17 15:26:06 -04:00
|
|
|
this.parent();
|
|
|
|
|
|
|
|
this._indicator = this._addIndicator();
|
|
|
|
this._indicator.icon_name = 'media-record-symbolic';
|
|
|
|
this._indicator.add_style_class_name('screencast-indicator');
|
|
|
|
this._sync();
|
|
|
|
|
2017-12-01 19:27:35 -05:00
|
|
|
Main.screencastService.connect('updated', this._sync.bind(this));
|
2013-07-17 15:26:06 -04:00
|
|
|
},
|
|
|
|
|
2017-10-30 20:03:21 -04:00
|
|
|
_sync() {
|
2013-07-17 15:26:06 -04:00
|
|
|
this._indicator.visible = Main.screencastService.isRecording;
|
|
|
|
},
|
|
|
|
});
|