From 8ba888bf98e139516736b4d31b04e95477f888be Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 30 Jul 2015 10:41:22 +0200 Subject: [PATCH] Now specify where to read the configs instead of letting it happen in constructors. A stored object of MainConfig is not needed either. --- juci/juci.h | 2 -- juci/window.cc | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/juci/juci.h b/juci/juci.h index 244c9ac..4ce2cb2 100644 --- a/juci/juci.h +++ b/juci/juci.h @@ -1,7 +1,6 @@ #ifndef JUCI_JUCI_H_ #define JUCI_JUCI_H_ -#include "config.h" #include "window.h" #include "logging.h" @@ -13,7 +12,6 @@ public: void on_activate(); private: - MainConfig main_config; std::unique_ptr window; std::string directory; std::vector files; diff --git a/juci/window.cc b/juci/window.cc index acafd26..6ec8870 100644 --- a/juci/window.cc +++ b/juci/window.cc @@ -1,6 +1,7 @@ #include "window.h" #include "logging.h" #include "singletons.h" +#include "config.h" namespace sigc { SIGC_FUNCTORS_DEDUCE_RESULT_TYPE_WITH_DECLTYPE @@ -15,6 +16,7 @@ Window::Window() : notebook(), plugin_api(¬ebook), box(Gtk::ORIENTATION_VERTI //TODO: see TODO Window::on_directory_navigation directories.m_TreeView.signal_row_activated().connect(sigc::mem_fun(*this, &Window::on_directory_navigation)); + MainConfig main_config; //Read the configs here add_menu(); box.pack_start(entry_box, Gtk::PACK_SHRINK);