diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-02 15:37:32 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-02 15:37:32 +0100 |
commit | 56bc45ce4d07a7a9a415e9dc8ad2f7c3f3c9e48d (patch) | |
tree | 0bd0c2c80cb81179c26282fb3fbe8fd22983f40b /client/src/settings.vala | |
download | dino-56bc45ce4d07a7a9a415e9dc8ad2f7c3f3c9e48d.tar.gz dino-56bc45ce4d07a7a9a415e9dc8ad2f7c3f3c9e48d.zip |
Initial commit
Diffstat (limited to 'client/src/settings.vala')
-rw-r--r-- | client/src/settings.vala | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/client/src/settings.vala b/client/src/settings.vala new file mode 100644 index 00000000..17177232 --- /dev/null +++ b/client/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 |