aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2023-09-15 15:35:38 +0200
committerMihai Moldovan <ionic@ionic.de>2023-09-15 15:35:38 +0200
commitcf4253c78f675aa525a59c07fc98faf504c339fe (patch)
tree9d83c2a3a131b02ec9b30412543425cf9d0a413a /src
parentb542dbe65eec71a156c828dc998f59d77b516cb2 (diff)
parent2c4ff94ef0d664fa8355db2f7035d5bf0c102690 (diff)
downloadarctica-greeter-cf4253c78f675aa525a59c07fc98faf504c339fe.tar.gz
arctica-greeter-cf4253c78f675aa525a59c07fc98faf504c339fe.tar.bz2
arctica-greeter-cf4253c78f675aa525a59c07fc98faf504c339fe.zip
Merge branch 'sunweaver-mr/preferred-sessions-gsettings'
Attributes GH PR #64: https://github.com/ArcticaProject/arctica-greeter/pull/64
Diffstat (limited to 'src')
-rw-r--r--src/arctica-greeter.vala13
-rw-r--r--src/settings.vala1
2 files changed, 6 insertions, 8 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 2ede4c5..cacfdac 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -248,14 +248,11 @@ public class ArcticaGreeter : Object
var sessions = new List<string> ();
sessions.append ("lightdm-xsession");
- // FIXME: this list should be obtained from AGSettings, ideally...
- sessions.append ("mate");
- sessions.append ("xfce");
- sessions.append ("kde-plasma");
- sessions.append ("kde");
- sessions.append ("gnome");
- sessions.append ("cinnamon");
- sessions.append ("lomiri");
+ var preferred_sessions = AGSettings.get_strv (AGSettings.KEY_PREFERRED_SESSIONS);
+
+ foreach (var preferred_session in preferred_sessions) {
+ sessions.append (preferred_session);
+ }
if (!AGSettings.get_boolean (AGSettings.KEY_HIDE_WAYLAND_SESSIONS)) {
foreach (string session in sessions) {
diff --git a/src/settings.vala b/src/settings.vala
index 16b5a82..acef828 100644
--- a/src/settings.vala
+++ b/src/settings.vala
@@ -74,6 +74,7 @@ public class AGSettings : Object
public const string KEY_HIDE_X11_SESSIONS = "hide-x11-sessions";
public const string KEY_HIDE_WAYLAND_SESSIONS = "hide-wayland-sessions";
public const string KEY_SHUTDOWN_DIALOG_TIMEOUT = "shutdown-dialog-timeout";
+ public const string KEY_PREFERRED_SESSIONS = "preferred-sessions";
public static bool get_boolean (string key)
{