aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-08-21 17:16:25 +0200
committerfiaxh <git@mx.ax.lt>2017-08-22 16:22:56 +0200
commit4a4b5956c9b12bbfb583da1794ef0184e760ac33 (patch)
tree05a8581e46cc839e3064e5978e0708ad37a056db /main
parenta8aceb1e395e3d0d5a570f6570a1613e2f990d87 (diff)
downloaddino-4a4b5956c9b12bbfb583da1794ef0184e760ac33.tar.gz
dino-4a4b5956c9b12bbfb583da1794ef0184e760ac33.zip
Move settings from GSettings to own db
Diffstat (limited to 'main')
-rw-r--r--main/src/ui/application.vala1
-rw-r--r--main/src/ui/chat_input/smiley_converter.vala4
-rw-r--r--main/src/ui/contact_details/settings_provider.vala2
-rw-r--r--main/src/ui/settings_dialog.vala2
4 files changed, 5 insertions, 4 deletions
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala
index f91e951d..33208786 100644
--- a/main/src/ui/application.vala
+++ b/main/src/ui/application.vala
@@ -8,6 +8,7 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application {
private UnifiedWindow window;
public Database db { get; set; }
+ public Dino.Entities.Settings settings { get; set; }
public StreamInteractor stream_interaction { get; set; }
public Plugins.Registry plugin_registry { get; set; default = new Plugins.Registry(); }
public SearchPathGenerator? search_path_generator { get; set; }
diff --git a/main/src/ui/chat_input/smiley_converter.vala b/main/src/ui/chat_input/smiley_converter.vala
index 849745f9..f8d29225 100644
--- a/main/src/ui/chat_input/smiley_converter.vala
+++ b/main/src/ui/chat_input/smiley_converter.vala
@@ -42,7 +42,7 @@ class SmileyConverter {
}
private void check_convert() {
- if (Dino.Settings.instance().convert_utf8_smileys) {
+ if (Dino.Application.get_default().settings.convert_utf8_smileys) {
foreach (string smiley in smiley_translations.keys) {
if (text_input.buffer.text.has_suffix(smiley)) {
if (text_input.buffer.text.length == smiley.length ||
@@ -55,4 +55,4 @@ class SmileyConverter {
}
}
-} \ No newline at end of file
+}
diff --git a/main/src/ui/contact_details/settings_provider.vala b/main/src/ui/contact_details/settings_provider.vala
index 64d4598c..47cdb795 100644
--- a/main/src/ui/contact_details/settings_provider.vala
+++ b/main/src/ui/contact_details/settings_provider.vala
@@ -100,4 +100,4 @@ public class SettingsProvider : Plugins.ContactDetailsProvider, Object {
}
}
-} \ No newline at end of file
+}
diff --git a/main/src/ui/settings_dialog.vala b/main/src/ui/settings_dialog.vala
index 6d4daf3b..e4b2a95f 100644
--- a/main/src/ui/settings_dialog.vala
+++ b/main/src/ui/settings_dialog.vala
@@ -10,7 +10,7 @@ class SettingsDialog : Dialog {
[GtkChild] private CheckButton notification_checkbutton;
[GtkChild] private CheckButton emoji_checkbutton;
- Dino.Settings settings = Dino.Settings.instance();
+ Dino.Entities.Settings settings = Dino.Application.get_default().settings;
public SettingsDialog() {
Object(use_header_bar : 1);