aboutsummaryrefslogtreecommitdiff
path: root/src/user-list.vala
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2023-11-24 17:40:21 +0100
committerRobert Tari <robert@tari.in>2023-11-24 17:40:21 +0100
commit3f333ac16ef828522bb506f87f3d8a8b38b3ec67 (patch)
tree33aaef3016dfc5c377a0cd79917deac7cc2c118f /src/user-list.vala
parentd604c30921766834dfd40622e66757f650c26842 (diff)
downloadarctica-greeter-3f333ac16ef828522bb506f87f3d8a8b38b3ec67.tar.gz
arctica-greeter-3f333ac16ef828522bb506f87f3d8a8b38b3ec67.tar.bz2
arctica-greeter-3f333ac16ef828522bb506f87f3d8a8b38b3ec67.zip
Send user change signal for manual user entries
Diffstat (limited to 'src/user-list.vala')
-rw-r--r--src/user-list.vala21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/user-list.vala b/src/user-list.vala
index 2c2fe3b..dee3850 100644
--- a/src/user-list.vala
+++ b/src/user-list.vala
@@ -39,6 +39,7 @@ int remote_server_field_sort_function (RemoteServerField? item1, RemoteServerFie
public class UserList : GreeterList
{
private bool _offer_guest = false;
+ private string sLastAddedUser = null;
public bool offer_guest
{
get { return _offer_guest; }
@@ -936,6 +937,11 @@ public class UserList : GreeterList
e.set_is_active (is_active);
debug ("Adding user to list. User: %s, background: %s, is_active: %s, has_messages: %s, session: %s", e.label, e.background, is_active.to_string(), has_messages.to_string(), session);
+ if (have_entries () && always_show_manual)
+ {
+ this.sLastAddedUser = label;
+ }
+
/* Remove manual option when have users */
if (have_entries () && !always_show_manual)
remove_entry ("*other");
@@ -1207,7 +1213,22 @@ public class UserList : GreeterList
}
}
else
+ {
base.show_prompt_cb (text, type);
+
+ if (type == LightDM.PromptType.SECRET && this.sLastAddedUser != null)
+ {
+ try
+ {
+ DBusServer pServer = this.greeter.getDBusServer ();
+ pServer.sendUserChange (this.sLastAddedUser);
+ }
+ catch (Error pError)
+ {
+ error ("Panic: %s", pError.message);
+ }
+ }
+ }
}
/* A lot of test code below here */