From 6e6c2704fd5bfc1c7978a25f0aa14e0548afd878 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 7 Apr 2020 10:27:33 +0200 Subject: [PATCH] Load snippets at startup --- src/snippets.cc | 4 ---- src/snippets.h | 4 +--- src/window.cc | 1 + 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/snippets.cc b/src/snippets.cc index bd01553..5b8bac3 100644 --- a/src/snippets.cc +++ b/src/snippets.cc @@ -4,10 +4,6 @@ #include "terminal.h" #include -Snippets::Snippets() { - load(); -} - void Snippets::load() { auto snippets_file = Config::get().home_juci_path / "snippets.json"; diff --git a/src/snippets.h b/src/snippets.h index 8e8f204..5f3c924 100644 --- a/src/snippets.h +++ b/src/snippets.h @@ -6,8 +6,6 @@ #include class Snippets { - Snippets(); - public: class Snippet { public: @@ -25,4 +23,4 @@ public: std::vector>> snippets; void load(); -}; \ No newline at end of file +}; diff --git a/src/window.cc b/src/window.cc index 99d809b..ed19838 100644 --- a/src/window.cc +++ b/src/window.cc @@ -146,6 +146,7 @@ Window::Window() { void Window::configure() { Config::get().load(); + Snippets::get().load(); auto screen = get_screen(); static Glib::RefPtr css_provider_theme;