aboutsummaryrefslogtreecommitdiff
path: root/src/arctica-greeter.vala
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2022-12-06 01:48:20 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-02-06 08:30:01 +0100
commit600fbb680106b697c1801fcd67aa51477743a30d (patch)
treee2fa32864ef42fbecdddbaf6d7563aa35ae33a93 /src/arctica-greeter.vala
parentb2fac08944adadd4b278a58a5fe363ef0df1e9c2 (diff)
downloadarctica-greeter-600fbb680106b697c1801fcd67aa51477743a30d.tar.gz
arctica-greeter-600fbb680106b697c1801fcd67aa51477743a30d.tar.bz2
arctica-greeter-600fbb680106b697c1801fcd67aa51477743a30d.zip
src/settings.vala: make SingleInstance class.
This way, we will be able to use it everywhere, as long as we hold a reference in the main greeter object. We will extend this class with other properties later on.
Diffstat (limited to 'src/arctica-greeter.vala')
-rw-r--r--src/arctica-greeter.vala10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 96a98ce..09c1feb 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -807,6 +807,16 @@ public class ArcticaGreeter
if (value != "")
settings.set ("gtk-xft-rgba", value, null);
+ /*
+ * Keep a reference to an AGSettings instance for the whole program
+ * run, so that the SingleInstance property is working the way we'd
+ * like it to work.
+ *
+ * We want to do this before creating the actual greeter, since the
+ * latter is using AGSettings quite extensively.
+ */
+ var agsettings = new AGSettings ();
+
debug ("Creating Arctica Greeter");
var greeter = new ArcticaGreeter (do_test_mode);