aboutsummaryrefslogtreecommitdiff
path: root/src/arctica-greeter.vala
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-09-15 11:52:06 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-09-15 20:26:07 +0200
commite3e1452cf3976f27dd1385b24540b53da6cf0b75 (patch)
treede8c840ef763a083db37533cce36f3f618a07d16 /src/arctica-greeter.vala
parenta10a482c08a6b0aa98206b07dc3c88efc474ecd7 (diff)
downloadarctica-greeter-e3e1452cf3976f27dd1385b24540b53da6cf0b75.tar.gz
arctica-greeter-e3e1452cf3976f27dd1385b24540b53da6cf0b75.tar.bz2
arctica-greeter-e3e1452cf3976f27dd1385b24540b53da6cf0b75.zip
Introduce gsetting (bool): hide-default-xsession.
Diffstat (limited to 'src/arctica-greeter.vala')
-rw-r--r--src/arctica-greeter.vala12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 0aee212..6dd5f43 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -246,7 +246,10 @@ public class ArcticaGreeter : Object
public string? get_default_session ()
{
var sessions = new List<string> ();
- sessions.append ("lightdm-xsession");
+ var hide_default_xsession = AGSettings.get_boolean (AGSettings.KEY_HIDE_DEFAULT_XSESSION);
+ if (!hide_default_xsession) {
+ sessions.append ("lightdm-xsession");
+ }
var preferred_sessions = AGSettings.get_strv (AGSettings.KEY_PREFERRED_SESSIONS);
@@ -318,7 +321,12 @@ public class ArcticaGreeter : Object
var xsessions_path = Path.build_filename ("/usr/share/xsessions/", session.concat(".desktop"), null);
var wsessions_path = Path.build_filename ("/usr/share/wayland-sessions/", session.concat(".desktop"), null);
- if (AGSettings.get_boolean (AGSettings.KEY_HIDE_WAYLAND_SESSIONS) &
+ if ((session == "lightdm-xsession") &&
+ AGSettings.get_boolean (AGSettings.KEY_HIDE_DEFAULT_XSESSION)) {
+ debug ("default Xsession hidden: '%s'", session);
+ session = null;
+ }
+ else if (AGSettings.get_boolean (AGSettings.KEY_HIDE_WAYLAND_SESSIONS) &
FileUtils.test (wsessions_path, FileTest.EXISTS)) {
debug ("Wayland session hidden: '%s'", session);
session = null;