MichalW / gnome-bluetooth-battery-indicator

Gnome-Shell extension displaying battery percentage for bluetooth devices
GNU General Public License v3.0
121 stars 40 forks source link

Support for GNOME Shell 45 #75

Closed kred-jon closed 10 months ago

kred-jon commented 12 months ago

Hello, everything working good, but now we have under new Gnome version.

We have to update it, as it's not working anymore.

thank you!

bmn001 commented 11 months ago

According to the recent code commits, this was added last week.

Right now it's just a matter of it getting through the Gnome extensions review team's process, which can sometimes take as long as 2-3 weeks before it will show up at extensions.gnome.org

MichalW commented 11 months ago

Regarding the review, unfortunately it was rejected. If anyone would like to speed things up, a PR with corrections would be greatly appreciated:

Review:

  1. Timeouts should be removed on destroy (line 25 extension.js): https://gjs.guide/extensions/review-guidelines/review-guidelines.html#remove-main-loop-sources
  2. Don't use spawn command to open prefs. You can use openPreferences() (line 41 indicator.js): https://gjs.guide/extensions/upgrading/gnome-shell-45.html#extensionutils
  3. The source id should be removed/cancelled on disable (line 14 and 32 utils.js). You can read about cancellable sub process here: https://gjs.guide/guides/gio/subprocesses.html#cancellable-processes
  4. lookupByUUID() is a bad practice when you have access to the instance in the entry point (line 28 settingsWidget.js). You can do this in prefs.js instead (dependency injection): new SettingsWidget(this.getSettings());