HarlemSquirrel / gnome-shell-extension-sensory-perception

Displays CPU/GPU/mobo/disk temperatures, voltages and fan speeds
https://extensions.gnome.org/extension/1145/sensory-perception/
GNU General Public License v3.0
27 stars 11 forks source link

Does not work on 3.38 #28

Closed mokilcde closed 3 years ago

mokilcde commented 3 years ago

Hi!

I add this patch to get it to work. I hope that this helps

$ diff -pbaur /tmp/extension.js extension.js
--- /tmp/extension.js   2020-10-03 07:45:30.948829630 +0200
+++ extension.js    2020-10-03 07:44:26.064459625 +0200
@@ -34,12 +34,15 @@ const SensorsItem = class SensoryPercept
         this._menuItem._label = label;
         this._menuItem._value = value;

-        this._menuItem.add(new St.Icon({
+       this._icon = new St.Icon({
             style_class: 'sensory-perception-sensor-icon',
             gicon: Utilities.giconFor('sensors-' + type + '-symbolic')
-        }));
-        this._menuItem.add(new St.Label({ text: label }));
-        this._menuItem.add(new St.Label({ text: value }), { align: St.Align.END });
+       });
+        this._menuItem.add_child(this._icon);
+       this._label = new St.Label({ text: label });
+        this._menuItem.add_child(this._label);
+        this._value = new St.Label({text: value, x_align: St.Align.END});
+        this._menuItem.add_child(this._value);
     }

     getPanelString() {
HarlemSquirrel commented 3 years ago

Hi, thank you for opening this ticket. Could you open a pull request with this change?

HarlemSquirrel commented 3 years ago

Thank you