After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673841 - [PATCH] Cannot unset user icon
[PATCH] Cannot unset user icon
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: User Accounts
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-10 13:55 UTC by Michael Terry
Modified: 2012-11-26 03:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (864 bytes, patch)
2012-04-10 13:55 UTC, Michael Terry
reviewed Details | Review

Description Michael Terry 2012-04-10 13:55:14 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.
Comment 1 Bastien Nocera 2012-04-10 14:31:35 UTC
Review of attachment 211739 [details] [review]:

Could you please format the patch ready for git?
Comment 2 Matthias Clasen 2012-04-10 14:36:03 UTC
> (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.
Comment 3 Michael Terry 2012-04-10 15:11:13 UTC
> 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.
Comment 4 Matthias Clasen 2012-04-10 17:00:00 UTC
(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.
Comment 5 Olav Vitters 2012-09-12 21:20:26 UTC
Michael: Any chance for an updated patch? Thanks
Comment 6 Michael Terry 2012-09-12 21:25:15 UTC
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.
Comment 7 Dag Odenhall 2012-11-24 17:28:16 UTC
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.
Comment 8 Matthias Clasen 2012-11-26 03:51:24 UTC
I've pushed an equivalent fix