Bug 336792

Summary: React to name and picture changes
Product: [Plasma] plasmashell Reporter: Vishesh Handa <me>
Component: Application Launcher (Kickoff) widgetAssignee: Sebastian Kügler <sebas>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, notmart, sitter
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Vishesh Handa 2014-06-27 12:58:59 UTC
Kickoff doesn't update the name or picture when it changes. It ideally should. One should not need to restart plasma.
Comment 1 Marco Martin 2014-06-30 16:08:11 UTC
*** Bug 336903 has been marked as a duplicate of this bug. ***
Comment 2 Marco Martin 2014-06-30 16:24:41 UTC
it uses kuser that unfortunately is not a qobject (so doesn't have signals)

it will have to work around that, monitoring the file
~/.face.icon and /etc/passwd directly for the name
(quite quite crude, is there a better way?)
Comment 3 Harald Sitter 2014-06-30 19:51:45 UTC
Accountsservice's Changed signal might be an option. Ultimately I think this sort of data should be obtained from accountsservice anyway.

[1] http://cgit.freedesktop.org/accountsservice/tree/data/org.freedesktop.Accounts.User.xml#n769
Comment 4 Sebastian Kügler 2014-07-01 09:06:26 UTC
I'll fix it.
Comment 5 Vishesh Handa 2014-07-01 09:07:31 UTC
Relevant patch which has still not been pushed - https://git.reviewboard.kde.org/r/118974/
Comment 6 Aleix Pol 2014-07-07 18:01:23 UTC
Now it has, can we close the bug?
Comment 7 Vishesh Handa 2014-07-07 18:56:26 UTC
The patch was to use the Accounts Service in the KCM when setting the "name". This way one can easily react to it. It had nothing to do with actually reacting to the name change.

I apologize for the confusion.
Comment 8 Sebastian Kügler 2014-07-09 12:00:52 UTC
Git commit 060432bd8cf40f9e1a9856f68198a619319641f0 by Sebastian Kügler.
Committed on 08/07/2014 at 01:36.
Pushed by sebas into branch 'master'.

[kickoff] Update face icon and user names at runtime

Since KUser doesn't provide any change signalling, we're watching both,
/etc/passwd (if it exists) and the face icon path for changes. The
latter is a pretty static thing in KUser, so it's safe to assume it
doesn't change at runtime.

This makes updating the user's full name and face image from
Personal Settings / Password & User Account update Kickoff's header work
at runtime.

See also
REVIEW:119176

M  +32   -2    applets/kickoff/core/kuserproxy.cpp
M  +12   -4    applets/kickoff/core/kuserproxy.h
M  +2    -1    applets/kickoff/package/contents/ui/Header.qml

http://commits.kde.org/plasma-desktop/060432bd8cf40f9e1a9856f68198a619319641f0