|
|
|
@ -158,7 +158,6 @@ Window::Window() : box(Gtk::ORIENTATION_VERTICAL), compiling(false) { |
|
|
|
} // Window constructor
|
|
|
|
} // Window constructor
|
|
|
|
|
|
|
|
|
|
|
|
void Window::configure() { |
|
|
|
void Window::configure() { |
|
|
|
MainConfig(); // Read the configs here
|
|
|
|
|
|
|
|
auto style_context = Gtk::StyleContext::create(); |
|
|
|
auto style_context = Gtk::StyleContext::create(); |
|
|
|
auto screen = Gdk::Screen::get_default(); |
|
|
|
auto screen = Gdk::Screen::get_default(); |
|
|
|
auto css_provider = Gtk::CssProvider::get_named(Singleton::Config::window()->theme_name, Singleton::Config::window()->theme_variant); |
|
|
|
auto css_provider = Gtk::CssProvider::get_named(Singleton::Config::window()->theme_name, Singleton::Config::window()->theme_variant); |
|
|
|
@ -259,13 +258,13 @@ void Window::create_menu() { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
menu.action_group->add(Gtk::Action::create("Preferences", "Preferences..."), Gtk::AccelKey(menu.key_map["preferences"]), [this]() { |
|
|
|
menu.action_group->add(Gtk::Action::create("Preferences", "Preferences..."), Gtk::AccelKey(menu.key_map["preferences"]), [this]() { |
|
|
|
notebook.open(Singleton::config_json()); |
|
|
|
notebook.open(Singleton::Config::main()->juci_home_path()/"config"/"config.json"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
menu.action_group->add(Gtk::Action::create("FileSave", "Save"), Gtk::AccelKey(menu.key_map["save"]), [this]() { |
|
|
|
menu.action_group->add(Gtk::Action::create("FileSave", "Save"), Gtk::AccelKey(menu.key_map["save"]), [this]() { |
|
|
|
if(notebook.save_current()) { |
|
|
|
if(notebook.save_current()) { |
|
|
|
if(notebook.get_current_page()!=-1) { |
|
|
|
if(notebook.get_current_page()!=-1) { |
|
|
|
if(notebook.get_current_view()->file_path==Singleton::config_json()) { |
|
|
|
if(notebook.get_current_view()->file_path==Singleton::Config::main()->juci_home_path()/"config"/"config.json") { |
|
|
|
configure(); |
|
|
|
configure(); |
|
|
|
for(int c=0;c<notebook.size();c++) { |
|
|
|
for(int c=0;c<notebook.size();c++) { |
|
|
|
notebook.get_view(c)->configure(); |
|
|
|
notebook.get_view(c)->configure(); |
|
|
|
|