Review of "Notification Counter" version 2

Details Page Preview

Shows number of notifications in queue.

Extension Homepage
https://github.com/vkrizan/NotificationCounter

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

Version Status
8 Active
7 Active
6 Active
5 Active
4 Active
3 Active
2 Active
1 Active

Previous Reviews on this Version

andyholmes active
Overriding the `destroy()` function of a ClutterActor is usually a bad idea, you should generally connect to the `destroy` signal instead to do your cleanup.
coolllsk posted a review
Thanks for a quick review Andy. I've tried to use the signal, and I guess it did not worked. Even-though the `destroy()` is overridden, its super is called. This should not be any different than having a method with a different name that would call destroy, or did I missed something?
andyholmes posted a review
Strictly speaking, to override `destroy` you should be overriding `vfunc_destroy()` and calling `super.vfunc_destroy()` in the override, but that too is not a great idea. There are a couple commits in gnome-shell with more details about this: https://github.com/GNOME/gnome-shell/search?q=vfunc_destroy&type=Commits This should work fine for your use case, and ensures `this`/`actor` has not been finalized and the `::destroy` signal does not recurse: ``` // this === actor this.connect('destroy', (actor) => actor._signals.forEach( (sig) => sig[0].disconnect(sig[1]) )); ```
coolllsk posted a review
I'll improve it. Thanks.