MisterGuinness / gnome-shell-extension-sensors

Gnome shell extension: Shows CPU temperature, HDD temperature, voltage and fan RPM
0 stars 0 forks source link

Fedora 40: Support latest gnome-shell version #97

Closed MisterGuinness closed 3 months ago

MisterGuinness commented 4 months ago

I was away, so missed the beta testing window, darn it.

MisterGuinness commented 4 months ago
$ gnome-shell --version
GNOME Shell 46.1
MisterGuinness commented 4 months ago

This is one is a bit odd:

gnome-shell[22399]: Extension Sensors@MisterGuinness: TypeError: this.add_actor is not a function
    Stack trace:
        _init@file:///home/mrg/.local/share/gnome-shell/extensions/Sensors@MisterGuinness/extension.js:70:14
...

I vaguely recall fixing these long ago.

MisterGuinness commented 4 months ago

Oh, it is a real change in 46, documented here:

https://gjs.guide/extensions/upgrading/gnome-shell-46.html#gjs

Clutter.Container.add_actor() and Clutter.Container.remove_actor() are deprecated and you should use Clutter.Actor.add_child() and Clutter.Actor.remove_child() instead.

MisterGuinness commented 4 months ago

I back ported those changes to F37 and they work there, which is really weird.

MisterGuinness commented 4 months ago

Also got the same error in the menu item, so changed "add" to "add_child". And an "unhandled promise rejection" calling querySensors, which I suppose is because it is async and therefore returns a promise, so there needs to be a catch somewhere. I'm assuming the error is because a possible rejection isn't caught anywhere. One day I hope to understand this better. Don't hold your breath though.