aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/application.vala
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 /libdino/src/application.vala
parenta8aceb1e395e3d0d5a570f6570a1613e2f990d87 (diff)
downloaddino-4a4b5956c9b12bbfb583da1794ef0184e760ac33.tar.gz
dino-4a4b5956c9b12bbfb583da1794ef0184e760ac33.zip
Move settings from GSettings to own db
Diffstat (limited to 'libdino/src/application.vala')
-rw-r--r--libdino/src/application.vala6
1 files changed, 6 insertions, 0 deletions
diff --git a/libdino/src/application.vala b/libdino/src/application.vala
index 72dbfeae..4b5f3b64 100644
--- a/libdino/src/application.vala
+++ b/libdino/src/application.vala
@@ -3,6 +3,7 @@ using Dino.Entities;
public interface Dino.Application : GLib.Application {
public abstract Database db { get; set; }
+ public abstract Dino.Entities.Settings settings { get; set; }
public abstract StreamInteractor stream_interaction { get; set; }
public abstract Plugins.Registry plugin_registry { get; set; }
public abstract SearchPathGenerator? search_path_generator { get; set; }
@@ -20,6 +21,7 @@ public interface Dino.Application : GLib.Application {
}
this.db = new Database(Path.build_filename(get_storage_dir(), "dino.db"));
+ this.settings = new Dino.Entities.Settings.from_db(db);
this.stream_interaction = new StreamInteractor(db);
AvatarManager.start(stream_interaction, db);
@@ -43,6 +45,10 @@ public interface Dino.Application : GLib.Application {
return Path.build_filename(Environment.get_user_data_dir(), "dino");
}
+ public static unowned Application get_default() {
+ return (Dino.Application) GLib.Application.get_default();
+ }
+
protected void add_connection(Account account) {
stream_interaction.connect(account);
}