diff options
author | Marius Vollmer <mvollmer@redhat.com> | 2013-06-18 09:34:44 +0300 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2013-10-15 16:13:59 -0400 |
commit | fee34e4a5e5d752baf74e2f7065e2d953d652d35 (patch) | |
tree | 92b5a2c90cee7b22022ef3ab17d7cf4b5f1f66d2 | |
parent | 9aefb5d811e7946d9e1074fc97f88aa4ddb64a56 (diff) | |
download | accountsservice-fee34e4a5e5d752baf74e2f7065e2d953d652d35.tar.gz |
daemon: Emit "changed" signal when account type changes.
We currently emit the "changed" signal when most aspects of a user
change, but we neglect to do it when the account type changes.
This commit fixes that.
https://bugs.freedesktop.org/show_bug.cgi?id=65846
-rw-r--r-- | src/user.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -165,6 +165,7 @@ user_update_from_pwent (User *user, const gchar *passwd; gboolean locked; PasswordMode mode; + AccountType account_type; g_object_freeze_notify (G_OBJECT (user)); @@ -223,7 +224,12 @@ user_update_from_pwent (User *user, /* GID */ user->gid = pwent->pw_gid; - user->account_type = account_type_from_pwent (pwent); + account_type = account_type_from_pwent (pwent); + if (account_type != user->account_type) { + user->account_type = account_type; + changed = TRUE; + g_object_notify (G_OBJECT (user), "account-type"); + } /* Username */ if (g_strcmp0 (user->user_name, pwent->pw_name) != 0) { |