GNOME Bugzilla – Bug 669349
Adapt to GDBus API changes
Last modified: 2019-02-27 17:46:03 UTC
OK, so we're going to be landing a bunch of new GJS stuff pretty soon, including gobject-inheritance as well as a ton of other things. While I'm not going to be doing any heavy porting, Giovanni once again decided to break the GDBus methods, which is nice, because it actually provides a neat API this time. Unfortunately, it still requires porting. "See patch."
Created attachment 206735 [details] [review] Adapt to GDBus API changes
Of note, having this ACN and ready to commit would be a nice thing to have so we don't have a broken Shell for a while.
OK, I decided to land the big branch without the GDBus changes, so I filed a new bug for those. Dep'ing.
Review of attachment 206735 [details] [review]: It's a shame that you duplicated this work, just because I didn't push it somewhere public... In any case, should be fine. Not tested though, because it depends on the extension prefs bug. ::: js/misc/consoleKit.js @@ +45,3 @@ + this.connect('notify::g-name-owner', Lang.bind(this, this._onGNameOwnerChanged)); + this._onGNameOwnerChanged(); + this.parent.apply(this, arguments); I think this needs be called first, otherwise the first this.connect will fail because there is no GObject yet. ::: js/misc/screenSaver.js @@ +28,2 @@ + _init: function() { + this.parent(); I'd keep params here, even if unused, just to keep the convention. ::: js/ui/endSessionDialog.js @@ +333,3 @@ })); + this._dbusImpl = new EndSessionDialogImpl(this); Not exactly the nicest way to use the new API, but yeah, it should work.
(In reply to comment #4) > Review of attachment 206735 [details] [review]: > > It's a shame that you duplicated this work, just because I didn't push it > somewhere public... How can I contact you in this case? > In any case, should be fine. Not tested though, because it depends on the > extension prefs bug. > > ::: js/misc/consoleKit.js > @@ +45,3 @@ > + this.connect('notify::g-name-owner', Lang.bind(this, > this._onGNameOwnerChanged)); > + this._onGNameOwnerChanged(); > + this.parent.apply(this, arguments); > > I think this needs be called first, otherwise the first this.connect will fail > because there is no GObject yet. Fixed locally. > ::: js/misc/screenSaver.js > @@ +28,2 @@ > + _init: function() { > + this.parent(); > > I'd keep params here, even if unused, just to keep the convention. What convention? > ::: js/ui/endSessionDialog.js > @@ +333,3 @@ > })); > > + this._dbusImpl = new EndSessionDialogImpl(this); > > Not exactly the nicest way to use the new API, but yeah, it should work. Given that we already inherit from another thing, how else would you do it? In cases like these where monkey patching is cleaner, I'm thinking we should keep both approaches available in gjs.
Bug 669350 never happened, so there's little sense in keeping this bug.