From 4a4b5956c9b12bbfb583da1794ef0184e760ac33 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Mon, 21 Aug 2017 17:16:25 +0200 Subject: Move settings from GSettings to own db --- libdino/src/application.vala | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libdino/src/application.vala') 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); } -- cgit v1.2.3-54-g00ecf