Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert ArgosButton and ArgosLineView to GObject.registerClass(). Unfortunately, this time it seems that we can't maintain backward compatibility. For reasons I can't explain, until GNOME 41 the "complex" classes ArgosButton and ArgosLineView could still be defined using Lang.Class(), therefore we could get away with the simplistic makeSimpleClass() trick to define classes differently for different GNOME shell versions. Now this doesn't work any more, classes with multiple methods can't be converted between Lang.Class() and GObject.registerClass() syntax without complex text procesing. This fixes errors like this: Mar 25 18:11:49 apollon.suse.de gnome-shell[15049]: JS ERROR: Extension argos@pew.worldwidemann.com: TypeError: Object 0x284558126958 is not a subclass of GObject_Objec> _construct@resource:///org/gnome/gjs/modules/script/_legacy.js:536:31 wrapper@resource:///org/gnome/gjs/modules/script/_legacy.js:83:27 newClass@resource:///org/gnome/gjs/modules/script/_legacy.js:115:21 Class@resource:///org/gnome/gjs/modules/script/_legacy.js:66:16 @/home/mwilck/.local/share/gnome-shell/extensions/argos@pew.worldwidemann.com/button.js:24:19 @/home/mwilck/.local/share/gnome-shell/extensions/argos@pew.worldwidemann.com/extension.js:18:21 I've removed GNOME shell < 3.34 from the compatibility list. GObject.registerClass() should be available in 3.34. So far I have only tested this with GNOME shell 42.
- Loading branch information