Review of "Shu Zhi" version 20

Details Page Preview

Wallpaper generation extension for GNOME Shell, inspired by jizhi For support, please report any issues via the homepage link below.

Extension Homepage
https://github.com/tuberry/shuzhi

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

All Versions

Previous Reviews on this Version

JustPerfection rejected
Please move line 13, 19, 20 (extension.js ) to enable(): https://gjs.guide/extensions/review-guidelines/review-guidelines.html#only-use-init-for-initialization
grroot posted a review
Does it matter?
JustPerfection posted a review
Yes. The global scope is the same as init() function.
grroot posted a review
`init() is called by GNOME Shell when your extension is loaded, not when it is enabled. Your extension MUST NOT create any objects, connect any signals, add any main loop sources or modify GNOME Shell here.` As is pointed, creating objects is not allowed there. Also, what is the big difference between them? `As a rule, init() should ONLY be used for operations that can only be done once and can not be undone. Most extensions should only use init() to initialize Gettext translations:` Aren't these outside lines only executed once, so they are executed multiple times when the extension is enabled?
JustPerfection posted a review
If you are creating something in global scope or `init()` function, it will be called once (will be cached). enable() will be called when the extension is getting enabled. Lock mode disables the extension. Unlock enables the extension but the global scope and init() won't be called again.
grroot posted a review
Yes, I just wish these setting objects working as global variables.The signals should be disconnected in disable(). Keeping them alive doesn't take up resources that many.