Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP4:SLECandidates
hamster-time-tracker
0169-extension.js-adapt-to-GNOME-45.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0169-extension.js-adapt-to-GNOME-45.patch of Package hamster-time-tracker
From 3ce1d776309872c543594934ee03b13112812213 Mon Sep 17 00:00:00 2001 From: Martin Wilck <mwilck@suse.com> Date: Fri, 22 Sep 2023 21:18:08 +0200 Subject: [PATCH 169/173] extension.js: adapt to GNOME 45 https://gjs.guide/extensions/upgrading/gnome-shell-45.html#extension-js Signed-off-by: Martin Wilck <mwilck@suse.com> --- extension/extension.js | 11 +++-------- extension/widgets/panelWidget.js | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/extension/extension.js b/extension/extension.js index 31068ef..7873763 100644 --- a/extension/extension.js +++ b/extension/extension.js @@ -88,11 +88,11 @@ let WindowsProxy = Gio.DBusProxy.makeProxyWrapper(WindowsProxyIface); * * @class */ -class Controller { +export default class Controller extends Extension { constructor(extensionMeta) { let dateMenu = Main.panel.statusArea.dateMenu; - this.extensionMeta = extensionMeta; + super(extensionMeta); this.panelWidget = null; this.settings = null; this.placement = 0; @@ -136,7 +136,7 @@ class Controller { if (!this.shouldEnable || !this.apiProxy || !this.windowsProxy) return; - this.settings = ExtensionUtils.getSettings(); + this.settings = this.getSettings(); this.panelWidget = new PanelWidget(this); this.placement = this.settings.get_int("panel-placement"); @@ -281,8 +281,3 @@ class Controller { } } - -function init(extensionMeta) { - ExtensionUtils.initTranslations(); - return new Controller(extensionMeta); -} diff --git a/extension/widgets/panelWidget.js b/extension/widgets/panelWidget.js index b02d37b..bfdc41b 100644 --- a/extension/widgets/panelWidget.js +++ b/extension/widgets/panelWidget.js @@ -62,7 +62,7 @@ class PanelWidget extends PanelMenu.Button { this._controller = controller; // [FIXME] // Still needed? - this._extensionMeta = controller.extensionMeta; + this._extensionMeta = controller.metadata; this._settings = controller.settings; this._windowsProxy = controller.windowsProxy; -- 2.42.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor