aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2023-09-15 18:59:22 +0200
committerMihai Moldovan <ionic@ionic.de>2023-09-15 18:59:22 +0200
commit6c027e74fe2fdd1f750f6e2bdf9936cc0794de6e (patch)
treee001335fc8b6c386edc6eb9795c124548b6572a0
parent9faeec2e427ca0fb9316c71204ff0721e16337ed (diff)
parentc2846982424b3bf3f2703e7a3a19b7b5f7d3611e (diff)
downloadarctica-greeter-6c027e74fe2fdd1f750f6e2bdf9936cc0794de6e.tar.gz
arctica-greeter-6c027e74fe2fdd1f750f6e2bdf9936cc0794de6e.tar.bz2
arctica-greeter-6c027e74fe2fdd1f750f6e2bdf9936cc0794de6e.zip
Merge branch 'sunweaver-mr/session-chooser-fix-sorting'
Attributes GH PR #66: https://github.com/ArcticaProject/arctica-greeter/pull/66
-rw-r--r--src/session-list.vala10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/session-list.vala b/src/session-list.vala
index 21e9eb6..b90c751 100644
--- a/src/session-list.vala
+++ b/src/session-list.vala
@@ -29,12 +29,6 @@ public class SessionPrompt : PromptBox
Object (id: id, session: session, default_session: default_session);
}
- private unowned GLib.List<LightDM.Session> sessions_sorted_ci (GLib.List<LightDM.Session> sessions)
- {
- sessions.sort_with_data((a, b) => GLib.strcmp (a.name.casefold(), b.name.casefold()));
- return sessions;
- }
-
private ToggleBox box;
construct
@@ -53,7 +47,9 @@ public class SessionPrompt : PromptBox
}
else
{
- foreach (var session in sessions_sorted_ci( LightDM.get_sessions() ) )
+ var sessions = LightDM.get_sessions().copy();
+ sessions.sort_with_data((a, b) => GLib.strcmp (a.name.casefold().collate_key(), b.name.casefold().collate_key()));
+ foreach (var session in sessions)
{
/* Apply hide x11/wayland filter */
if (greeter.validate_session(session.key, false) != null) {