Skip to content

messageTray: Make NotificationPolicy properties read-only

Philip Chimento requested to merge ptomato/gnome-shell:getters into master

These properties are never written; in the base class they are always their default values, and in the subclasses the getters are overridden.

This will be necessary because GJS is adding checks to make sure that readable properties always have a getter, writable properties always have a setter, and that the variations of camelCase/snake_case are handled correctly. It's supposedly backwards compatible, but that assumes that code is not doing things like forgetting a setter on a writable property. (If the missing setter had ever been called, it might have led to a crash, which is why we've made this change.)

This is the minimally invasive patch which should work with both older and newer versions of GJS. If you decide to require GJS 1.65.2, then you'll also be able to remove the getters from NotificationPolicy as well.

Merge request reports