GNOME Bugzilla – Bug 673841
[PATCH] Cannot unset user icon
Last modified: 2012-11-26 03:51:24 UTC
Created attachment 211739 [details] [review] Proposed patch 1) Open the Users panel 2) Click on your user icon dropdown 3) Click on the generic person icon on the bottom right Nothing will happen. But I would expect that it would reset to the generic person icon. (Actually, what it should do is reset to ~/.face, but for new accounts, that would be the generic icon.) The fix is to not try to send NULL over DBus. Instead send the empty string.
Review of attachment 211739 [details] [review]: Could you please format the patch ready for git?
> (Actually, what it should do is reset to ~/.face, but for new accounts, that > would be the generic icon.) I disagree with that. Selecting one of the icons and have something else (or nothing) show up is just wrong and confusing. If you select the generic icon, that should become your avatar.
> I disagree with that. Selecting one of the icons and have something else (or > nothing) show up is just wrong and confusing. If you select the generic icon, > that should become your avatar. OK. The ~/.face behavior I described is baked into accountsservice when you send an empty string. So we can get your desired behavior by just sending the path to the generic-avatar icon. However, it might be nice to also show ~/.face in the photo grid if it exists.
(In reply to comment #3) > So we can get your desired behavior by just sending the path to the > generic-avatar icon. However, it might be nice to also show ~/.face in the > photo grid if it exists. That, I fully agree with.
Michael: Any chance for an updated patch? Thanks
I'm busy now and the desired behavior is a bit more involved than my small patch. I can't promise promptness, but I'll try not to forget about it.
For me the expected behavior is to have the generic icon remove the "Icon=" line from /var/lib/AccountsService/users/$USER and then apply that in accountservice immediately. I guess that is the same as reverting to ~/.face? I think in the current state, we have a rather annoying bug. If you set an avatar, the only way to undo it is to edit the relevant file manually (and you have to know which one) and log out. The avatar is central to your personal identity so having an avatar you don't identify with is more annoying than perhaps it should be, but alas. Why not merge the original patch in the mean time until the more complete solution is finished? It fixes a bug and makes the current UI work intuitively. The "desired behavior" is IMHO a separate UI feature, not a bugfix for this bug per se.
I've pushed an equivalent fix