Gnome team requirements
Closed this issue · 0 comments
-
throwing like that in global scope is bad (extension.js line 18).
I recommend to use Main.notify('Failed') instead of throwing like that.
Also do those try catch blocks should be inside a function. and then enable() can call that function and disable should null them out.
You can also ask in GNOME Matrix channel about those issues you commented. Maybe you can find a solution there. -
Instead of creating folders or files with spawn command use Gio.File:
https://gjs-docs.gnome.org/gio20~2.66p/gio.file -
Don't use spawn command for sending notification. Use Main.notify():
https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/c3f5aa6c5c4d06acd89837119cbe380f092cae67/js/ui/main.js#L460 -
Use initTranslations() and getSettings() from ExtensionUtils instead of creating your own custom functions (supported on 3.34 and higher):
https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/misc/extensionUtils.js -
Multi versioning is supported here. You can remove those shell version checking (for example line 16 prefs.js) and have a much cleaner code.
-
You can remove "40.1" (metadata.json) since you are using "40".