parent
1fe0213dea
commit
d2218d5f3b
2 changed files with 7 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
{
|
||||
"shell-version": ["3.28", "3.30"],
|
||||
"shell-version": ["3.28", "3.30", "3.32"],
|
||||
"uuid": "batime@martin.zurowietz.de",
|
||||
"url": "https://github.com/mzur/gnome-shell-batime",
|
||||
"settings-schema": "org.gnome.shell.extensions.batime",
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
const Lang = imports.lang;
|
||||
const UPower = imports.gi.UPowerGlib;
|
||||
const BaseIndicator = imports.ui.status.power.Indicator;
|
||||
|
||||
var Indicator = new Lang.Class({
|
||||
Name: 'PowerIndicator',
|
||||
|
||||
Extends: imports.ui.status.power.Indicator,
|
||||
|
||||
var Indicator = class extends BaseIndicator {
|
||||
// Adapted from _getStatus of the parent.
|
||||
_getTime() {
|
||||
let seconds = 0;
|
||||
|
|
@ -33,10 +30,10 @@ var Indicator = new Lang.Class({
|
|||
|
||||
// Translators: this is <hours>:<minutes>
|
||||
return _("%d\u2236%02d").format(hours, minutes);
|
||||
},
|
||||
}
|
||||
|
||||
_sync() {
|
||||
this.parent();
|
||||
super._sync();
|
||||
this._percentageLabel.clutter_text.set_markup('<span size="smaller">' + this._getTime() + '</span>');
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue