2013-07-17 15:26:06 -04:00
|
|
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
|
|
|
|
|
|
|
const Main = imports.ui.main;
|
|
|
|
const PanelMenu = imports.ui.panelMenu;
|
|
|
|
|
2017-10-30 21:19:44 -04:00
|
|
|
var Indicator = class extends PanelMenu.SystemIndicator {
|
|
|
|
constructor() {
|
|
|
|
super();
|
2013-07-17 15:26:06 -04:00
|
|
|
|
|
|
|
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));
|
2017-10-30 21:19:44 -04:00
|
|
|
}
|
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;
|
2017-10-30 21:19:44 -04:00
|
|
|
}
|
|
|
|
};
|