Blob Blame History Raw
From c005b6876df80058ff803a87c3ffb0c1fe474d83 Mon Sep 17 00:00:00 2001
From: Nicolas ViƩville <nicolas.vieville@uphf.fr>
Date: Wed, 9 Nov 2022 16:00:47 +0100
Subject: [PATCH] Add support for Gnome shell 43

Signed-off-by: Nicolas ViƩville <nicolas.vieville@uphf.fr>
---
 system-monitor@paradoxxx.zero.gmail.com/extension.js  | 6 +++++-
 system-monitor@paradoxxx.zero.gmail.com/metadata.json | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/system-monitor@paradoxxx.zero.gmail.com/extension.js b/system-monitor@paradoxxx.zero.gmail.com/extension.js
index 1c56f0d..2f0868f 100644
--- a/system-monitor@paradoxxx.zero.gmail.com/extension.js
+++ b/system-monitor@paradoxxx.zero.gmail.com/extension.js
@@ -1082,7 +1082,11 @@ const Battery = class SystemMonitor_Battery extends ElementBase {
         this.icon_hidden = false;
         this.percentage = 0;
         this.timeString = '-- ';
-        this._proxy = StatusArea.aggregateMenu._power._proxy;
+        if (shell_Version >= '43') {
+            this._proxy = StatusArea.quickSettings._system._systemItem._powerToggle._proxy;
+        } else {
+            this._proxy = StatusArea.aggregateMenu._power._proxy;
+        }
         if (typeof (this._proxy) === 'undefined') {
             this._proxy = StatusArea.battery._proxy;
         }
diff --git a/system-monitor@paradoxxx.zero.gmail.com/metadata.json b/system-monitor@paradoxxx.zero.gmail.com/metadata.json
index 1851c46..37e481e 100644
--- a/system-monitor@paradoxxx.zero.gmail.com/metadata.json
+++ b/system-monitor@paradoxxx.zero.gmail.com/metadata.json
@@ -1,5 +1,5 @@
 {
-    "shell-version": ["3.26", "3.28", "3.30", "3.32", "3.34", "3.36", "40", "41", "42"],
+    "shell-version": ["3.26", "3.28", "3.30", "3.32", "3.34", "3.36", "40", "41", "42", "43"],
     "uuid": "system-monitor@paradoxxx.zero.gmail.com",
     "name": "system-monitor",
     "url": "https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet",
-- 
2.38.1