2013-07-17 19:26:06 +00:00
|
|
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
|
|
|
|
|
|
|
const Main = imports.ui.main;
|
|
|
|
const PanelMenu = imports.ui.panelMenu;
|
|
|
|
|
2017-10-31 01:19:44 +00:00
|
|
|
var Indicator = class extends PanelMenu.SystemIndicator {
|
|
|
|
constructor() {
|
|
|
|
super();
|
2013-07-17 19:26:06 +00:00
|
|
|
|
|
|
|
this._indicator = this._addIndicator();
|
|
|
|
this._indicator.icon_name = 'media-record-symbolic';
|
|
|
|
this._indicator.add_style_class_name('screencast-indicator');
|
|
|
|
this._sync();
|
|
|
|
|
2017-12-02 00:27:35 +00:00
|
|
|
Main.screencastService.connect('updated', this._sync.bind(this));
|
2017-10-31 01:19:44 +00:00
|
|
|
}
|
2013-07-17 19:26:06 +00:00
|
|
|
|
2017-10-31 00:03:21 +00:00
|
|
|
_sync() {
|
2013-07-17 19:26:06 +00:00
|
|
|
this._indicator.visible = Main.screencastService.isRecording;
|
2017-10-31 01:19:44 +00:00
|
|
|
}
|
|
|
|
};
|