parent
062304ba21
commit
e842589bb2
3 changed files with 9 additions and 7 deletions
|
|
@ -8,14 +8,14 @@ class BaTimeExtension {
|
||||||
this.originalIndicator = this.aggregateMenu._power;
|
this.originalIndicator = this.aggregateMenu._power;
|
||||||
this.customIndicator = new BaTime.imports.power.Indicator();
|
this.customIndicator = new BaTime.imports.power.Indicator();
|
||||||
this.aggregateMenu._indicators.replace_child(
|
this.aggregateMenu._indicators.replace_child(
|
||||||
this.originalIndicator.indicators,
|
this.originalIndicator,
|
||||||
this.customIndicator.indicators
|
this.customIndicator
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
destroy() {
|
destroy() {
|
||||||
this.aggregateMenu._indicators.replace_child(
|
this.aggregateMenu._indicators.replace_child(
|
||||||
this.customIndicator.indicators,
|
this.customIndicator,
|
||||||
this.originalIndicator.indicators
|
this.originalIndicator
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
"shell-version": ["3.28", "3.30", "3.32", "3.34"],
|
"shell-version": ["3.36"],
|
||||||
"uuid": "batime@martin.zurowietz.de",
|
"uuid": "batime@martin.zurowietz.de",
|
||||||
"url": "https://github.com/mzur/gnome-shell-batime",
|
"url": "https://github.com/mzur/gnome-shell-batime",
|
||||||
"settings-schema": "org.gnome.shell.extensions.batime",
|
"settings-schema": "org.gnome.shell.extensions.batime",
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
|
const { GObject} = imports.gi;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const UPower = imports.gi.UPowerGlib;
|
const UPower = imports.gi.UPowerGlib;
|
||||||
const BaseIndicator = imports.ui.status.power.Indicator;
|
const BaseIndicator = imports.ui.status.power.Indicator;
|
||||||
|
|
||||||
var Indicator = class extends BaseIndicator {
|
var Indicator = GObject.registerClass(
|
||||||
|
class Indicator extends BaseIndicator {
|
||||||
// Adapted from _getStatus of the parent.
|
// Adapted from _getStatus of the parent.
|
||||||
_getTime() {
|
_getTime() {
|
||||||
let seconds = 0;
|
let seconds = 0;
|
||||||
|
|
@ -36,4 +38,4 @@ var Indicator = class extends BaseIndicator {
|
||||||
super._sync();
|
super._sync();
|
||||||
this._percentageLabel.clutter_text.set_markup('<span size="smaller">' + this._getTime() + '</span>');
|
this._percentageLabel.clutter_text.set_markup('<span size="smaller">' + this._getTime() + '</span>');
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue