diff --git a/batime@martin.zurowietz.de/metadata.json b/batime@martin.zurowietz.de/metadata.json index 89f7363..cf13188 100644 --- a/batime@martin.zurowietz.de/metadata.json +++ b/batime@martin.zurowietz.de/metadata.json @@ -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", diff --git a/batime@martin.zurowietz.de/power.js b/batime@martin.zurowietz.de/power.js index b0cc103..dbbb8c0 100644 --- a/batime@martin.zurowietz.de/power.js +++ b/batime@martin.zurowietz.de/power.js @@ -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 : return _("%d\u2236%02d").format(hours, minutes); - }, + } _sync() { - this.parent(); + super._sync(); this._percentageLabel.clutter_text.set_markup('' + this._getTime() + ''); - }, -}); + } +}