diff --git a/src/config.cc b/src/config.cc index 8dfda00..3f3c85b 100644 --- a/src/config.cc +++ b/src/config.cc @@ -16,6 +16,10 @@ MainConfig::MainConfig() { Singleton::Config::window()->theme_variant=cfg.get("visual.gtk_theme_variant"); boost::filesystem::create_directories(boost::filesystem::path(Singleton::style_dir())); + boost::filesystem::path juci_style_path=Singleton::style_dir(); + juci_style_path+="juci.xml"; + if(!boost::filesystem::exists(juci_style_path)) + juci::filesystem::write(juci_style_path, juci_style); Singleton::Config::source()->style=cfg.get("visual.gtk_sourceview_style"); Singleton::Config::terminal()->make_command=cfg.get("project.make_command"); @@ -46,9 +50,10 @@ void MainConfig::GenerateSource() { source_cfg->highlight_current_line = source_json.get_value("highlight_current_line"); source_cfg->show_line_numbers = source_json.get_value("show_line_numbers"); - for (auto &i : source_json.get_child("clang_types")) source_cfg->clang_types[i.first] = i.second.get_value(); + + source_cfg->font=source_json.get("font"); } void MainConfig::GenerateDirectoryFilter() { diff --git a/src/files.h b/src/files.h index a1bb2b0..7a64a9e 100644 --- a/src/files.h +++ b/src/files.h @@ -4,9 +4,10 @@ const std::string configjson = " \"visual\": {\n" " \"gtk_theme\": \"Adwaita\", //Use \"\" for default theme, At least these two exist on all systems: Adwaita, Raleigh\n" " \"gtk_theme_variant\": \"\", //Use \"\" for default variant, and \"dark\" for dark theme variant\n" -" \"gtk_sourceview_style\": \"classic\" //Choices on default install: classic, cobalt, kate, oblivion, solarized-dark, solarized-light, tango\n" +" \"gtk_sourceview_style\": \"juci\" //Choices on default install: classic, cobalt, kate, oblivion, solarized-dark, solarized-light, tango\n" " },\n" " \"source\": {\n" +" \"font\": \"Monospace\", //Use \"\" for default font, and for instance \"Monospace 12\" to also set size.\n" " \"clang_types\": {\n" " \"43\": \"def:type\",\n" " \"46\": \"def:preprocessor\",\n" @@ -117,6 +118,56 @@ const std::string menuxml = " \n" "\n"; +const std::string juci_style = +"\n" +"\n" +"\n" +" juCi++ team\n" +" <_description>Default juCi++ style\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"