aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/settings.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-03-10 19:53:24 +0100
committerfiaxh <git@mx.ax.lt>2017-03-10 19:53:24 +0100
commit24b55d83a1f9e21b028c8d5ac9778e75565f417d (patch)
tree195b0f332e32d08e1a18fc3d8a5a6725c5ed11d7 /libdino/src/settings.vala
parent4c48c5c16d5f5b010c2e5dfb1affcb59f937510c (diff)
parent29ca70a6d534e1cd79963718c793ae740318cff1 (diff)
downloaddino-24b55d83a1f9e21b028c8d5ac9778e75565f417d.tar.gz
dino-24b55d83a1f9e21b028c8d5ac9778e75565f417d.zip
Merge branch 'master' of github.com:dino/dino
Diffstat (limited to 'libdino/src/settings.vala')
-rw-r--r--libdino/src/settings.vala28
1 files changed, 28 insertions, 0 deletions
diff --git a/libdino/src/settings.vala b/libdino/src/settings.vala
new file mode 100644
index 00000000..17177232
--- /dev/null
+++ b/libdino/src/settings.vala
@@ -0,0 +1,28 @@
+namespace Dino {
+
+public class Settings {
+
+ private GLib.Settings gsettings;
+
+ public bool send_read {
+ get { return gsettings.get_boolean("send-read"); }
+ set { gsettings.set_boolean("send-read", value); }
+ }
+
+ public bool convert_utf8_smileys {
+ get { return gsettings.get_boolean("convert-utf8-smileys"); }
+ set { gsettings.set_boolean("convert-utf8-smileys", value); }
+ }
+
+ public Settings(GLib.Settings gsettings) {
+ this.gsettings = gsettings;
+ }
+
+ public static Settings instance() {
+ SettingsSchemaSource sss = SettingsSchemaSource.get_default();
+ SettingsSchema schema = sss.lookup("org.dino-im", false);
+ return new Settings(new GLib.Settings.full(schema, null, null));
+ }
+}
+
+} \ No newline at end of file