GNOME Bugzilla – Bug 631888
Update gnome-shell to latest gdm user manager code
Last modified: 2010-10-13 23:31:39 UTC
The user manager code in GDM upstream has been changed to talk to the freedesktop accounts service. It's also been changed to be more asynchronous and overall have better performance than the old code. It's probably a good idea to update gnome-shell to this code. One thing that's a little yucky about the gdmuser code, is that it supports fallback if the accounts service is unavailable. That fallback support really dirties the code up. I think this code should be treated as a stop-gap. In the near term, I'm going to move the gdm user manager code to the accounts service repository and provide a proper library. At that point, it's going to lose the dirty fallback code mentioned above and we should move the shell to use the library.
Created attachment 172104 [details] [review] gdm: resync cut-and-paste code from gdm tree. The GDM code upstream talks to the account service now, has better introspection annotations, and is more asynchronous. This commit updates the shell's copy to the latest upstream. Note, the API changed somewhat and so the callers will need to be fixed up subsequently.
Created attachment 172105 [details] [review] statusMenu: port to new gdmuser api
*** Bug 622090 has been marked as a duplicate of this bug. ***
I've put the start of a client library here: http://cgit.freedesktop.org/accountsservice/commit/?id=8c031bce3f6fe67bd5f0f782a457aebd6af0ceba It's just the above code moved into accounts service with the fallback stuff quickly stripped out (and a few other minor changes). Once accounts dialog is in control center we should switch to using this library I think.
Comment on attachment 172104 [details] [review] gdm: resync cut-and-paste code from gdm tree. mostly not reviewing this this time, but... >+ -DGDM_CACHE_DIR=\""$(localstatedir)/cache/gdm"\" \ Shouldn't this point to gdm's localstatedir, not gnome-shell's?
Comment on attachment 172105 [details] [review] statusMenu: port to new gdmuser api >- this._userNameChangedId = this._user.connect('notify::display-name', Lang.bind(this, this._updateUserName)); >+ this._userLoadedId = this._user.connect('notify::is-loaded', Lang.bind(this, this._updateUserName)); >+ this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUserName)); Any reason you can't just connect to 'notify::real-name'? If the answer is "because the C code isn't calling g_object_notify() everywhere it should", then... otherwise looks good
(In reply to comment #5) > (From update of attachment 172104 [details] [review]) > mostly not reviewing this this time, but... > > >+ -DGDM_CACHE_DIR=\""$(localstatedir)/cache/gdm"\" \ > > Shouldn't this point to gdm's localstatedir, not gnome-shell's? Yea, but gdm's cache dir isn't really queryable (one of the pitfalls of copy and paste code i guess). If it's wrong it just means a user's icon won't show up in a fallback case that's getting removed soon anyway. I'm not too worried about it. (In reply to comment #6) > (From update of attachment 172105 [details] [review]) > >- this._userNameChangedId = this._user.connect('notify::display-name', Lang.bind(this, this._updateUserName)); > >+ this._userLoadedId = this._user.connect('notify::is-loaded', Lang.bind(this, this._updateUserName)); > >+ this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUserName)); > Any reason you can't just connect to 'notify::real-name'? If the answer is > "because the C code isn't calling g_object_notify() everywhere it should", > then... "because the C code doesn't export real-name as a gobject property anymore", which I agree is wrong, and I fixed when making the library mentioned in comment 4, but isn't fixed in this stop gap code.