LGiki / gnome-shell-extension-simple-system-monitor

🖥️ Show current CPU usage, memory usage and net speed on panel
https://extensions.gnome.org/extension/4506/simple-system-monitor/
GNU General Public License v2.0
48 stars 14 forks source link

feat: Support for GNOME 45 #19

Closed SteinGaming closed 11 months ago

SteinGaming commented 12 months ago

Hey there 👋 Due to GNOME being such great developers, making it that GNOME 45 breaks everything, I made it so that the extension is runnable with it.

Of course, there are some drawbacks and issues:

  1. As stated here, this version is not backwards compatible. I myself would create a seperate branch, or move the current master branch somewhere else, as a preservation.
  2. This version is only barebones: the config-menu has been overhauled, causing the current version to break, and another issue with opening the System Monitor. I am not willing to work on these currently, because there is an issue with restarting it on X11, only circumventable by closing every window.
SteinGaming commented 12 months ago

Also, this has been opened as a Draft Pull Request, due to the aforementioned issues still present.

yuhldr commented 11 months ago

something error when click setting (archlinux leatest):

The settings of extension ssm-gnome@lgiki.net had an error:

ImportError: Unable to load file from: resource:///org/gnome/shell/extensions/extension.js (位于“/org/gnome/shell/extensions/extension.js”的资源不存在)

Stack trace:

loadURI@resource:///org/gnome/gjs/modules/internal/loader.js:88:21
loadURI@resource:///org/gnome/gjs/modules/internal/loader.js:290:30
resolveModule@resource:///org/gnome/gjs/modules/internal/loader.js:179:33
moduleResolveHook@resource:///org/gnome/gjs/modules/internal/loader.js:339:29
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34
LGiki commented 11 months ago

Thank you. I've been extremely busy with work lately and haven't been able to find time to start working on GNOME45 support. I will do my best to complete it as soon as possible.

SteinGaming commented 11 months ago

Thank you. I've been extremely busy with work lately and haven't been able to find time to start working on GNOME45 support. I will do my best to complete it as soon as possible.

Don't worry, just do it at your own pace! I found a patch, which fixes the crash when trying to restart the gnome shell, so development will be much easier.

something error when click setting (archlinux leatest):

The settings of extension ssm-gnome@lgiki.net had an error:

ImportError: Unable to load file from: resource:///org/gnome/shell/extensions/extension.js (位于“/org/gnome/shell/extensions/extension.js”的资源不存在)

Stack trace:

loadURI@resource:///org/gnome/gjs/modules/internal/loader.js:88:21
loadURI@resource:///org/gnome/gjs/modules/internal/loader.js:290:30
resolveModule@resource:///org/gnome/gjs/modules/internal/loader.js:179:33
moduleResolveHook@resource:///org/gnome/gjs/modules/internal/loader.js:339:29
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

As I stated in 2., the current config system is unusable right now. I wasn't able to find a fix using the old .ui files, so the other way is to completly recode the ui, which I am working on.

SteinGaming commented 11 months ago

Well, after an hour of testing, I have been disproven! The prefs UI now works, just like before, without recoding everything again. With this, this pr is, in my eyes, ready for review!

image

LGiki commented 11 months ago

@SteinGaming Thank you very much. I will review this PR over the weekend.

SteinGaming commented 11 months ago

LGTM, thanks for your hard work! I believe this PR has implemented GNOME 45 support quite well. But I have some minor concerns. Could you make some tweaks to your code? I've already added my comments for reference.

Done! About the code that seemed unnecessary, I copied it from the upgrading guide and forgot to remove it afterwards 🤣

LGiki commented 11 months ago

Merged! Thanks a lot.