aboutsummaryrefslogtreecommitdiff
path: root/src/arctica-greeter.vala
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-09-15 20:31:29 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-09-15 20:31:29 +0200
commit6921a384256d14653db1e1b7cff3ae4fbb7c9f98 (patch)
treefbdda140079b772f5940950aa7802c6134ebbc22 /src/arctica-greeter.vala
parentf917d8cef0adbdfaa85412be4879779793987ab7 (diff)
downloadarctica-greeter-6921a384256d14653db1e1b7cff3ae4fbb7c9f98.tar.gz
arctica-greeter-6921a384256d14653db1e1b7cff3ae4fbb7c9f98.tar.bz2
arctica-greeter-6921a384256d14653db1e1b7cff3ae4fbb7c9f98.zip
src/arctica-greeter.vala: In validate_session() make it easier for the human eye to identified code-blocks.
Diffstat (limited to 'src/arctica-greeter.vala')
-rw-r--r--src/arctica-greeter.vala24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 024e3ad..81f0045 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -308,31 +308,38 @@ public class ArcticaGreeter : Object
var excluded_sessions = AGSettings.get_strv (AGSettings.KEY_EXCLUDED_SESSIONS);
var includeonly_sessions = AGSettings.get_strv (AGSettings.KEY_INCLUDEONLY_SESSIONS);
- if (includeonly_sessions.length > 0) {
- if (!(session in includeonly_sessions)) {
+ if (includeonly_sessions.length > 0)
+ {
+ if (!(session in includeonly_sessions))
+ {
session = null;
}
}
- else if (session in excluded_sessions) {
+ else if (session in excluded_sessions)
+ {
session = null;
}
- if (session != null) {
+ if (session != null)
+ {
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 ((session == "lightdm-xsession") &&
- AGSettings.get_boolean (AGSettings.KEY_HIDE_DEFAULT_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)) {
+ FileUtils.test (wsessions_path, FileTest.EXISTS))
+ {
debug ("Wayland session hidden: '%s'", session);
session = null;
}
else if (AGSettings.get_boolean (AGSettings.KEY_HIDE_X11_SESSIONS) &&
- FileUtils.test (xsessions_path, FileTest.EXISTS)) {
+ FileUtils.test (xsessions_path, FileTest.EXISTS))
+ {
debug ("X11 session hidden: '%s'", session);
session = null;
}
@@ -344,7 +351,8 @@ public class ArcticaGreeter : Object
}
}
- if ((fallback == true) && (session == null)) {
+ if ((fallback == true) && (session == null))
+ {
var default_session = get_default_session ();
debug ("Invalid session: '%s'. Using session '%s' instead.", session, default_session);
return default_session;