aboutsummaryrefslogtreecommitdiff
path: root/src/settings.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/settings.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/settings.vala')
-rw-r--r--src/settings.vala11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/settings.vala b/src/settings.vala
index 701d5a1..3c50bbc 100644
--- a/src/settings.vala
+++ b/src/settings.vala
@@ -2,6 +2,7 @@
*
* Copyright (C) 2011,2012 Canonical Ltd
* Copyright (C) 2015,2017 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+ * Copyright (C) 2022 Mihai Moldovan <ionic@ionic.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
@@ -20,7 +21,8 @@
* Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
*/
-public class AGSettings
+[SingleInstance]
+public class AGSettings : Object
{
public const string KEY_BACKGROUND = "background";
public const string KEY_BACKGROUND_COLOR = "background-color";
@@ -105,5 +107,12 @@ public class AGSettings
return gsettings.set_strv (key, value);
}
+ public AGSettings ()
+ {
+ }
+
+ construct {
+ }
+
private const string SCHEMA = "org.ArcticaProject.arctica-greeter";
}