|
|
|
@ -4,6 +4,7 @@ |
|
|
|
MainConfig::MainConfig() : |
|
|
|
MainConfig::MainConfig() : |
|
|
|
keybindings_cfg_(), source_cfg_() { |
|
|
|
keybindings_cfg_(), source_cfg_() { |
|
|
|
boost::property_tree::json_parser::read_json("config.json", cfg_); |
|
|
|
boost::property_tree::json_parser::read_json("config.json", cfg_); |
|
|
|
|
|
|
|
|
|
|
|
GenerateSource(); |
|
|
|
GenerateSource(); |
|
|
|
GenerateKeybindings(); |
|
|
|
GenerateKeybindings(); |
|
|
|
GenerateDirectoryFilter(); |
|
|
|
GenerateDirectoryFilter(); |
|
|
|
@ -28,10 +29,8 @@ void MainConfig::GenerateKeybindings() { |
|
|
|
std::string line; |
|
|
|
std::string line; |
|
|
|
std::ifstream menu_xml("menu.xml"); |
|
|
|
std::ifstream menu_xml("menu.xml"); |
|
|
|
if (menu_xml.is_open()) { |
|
|
|
if (menu_xml.is_open()) { |
|
|
|
while (getline(menu_xml, line)) { |
|
|
|
while (getline(menu_xml, line)) |
|
|
|
keybindings_cfg_.AppendXml(line);
|
|
|
|
keybindings_cfg_.AppendXml(line);
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
boost::property_tree::ptree keys_json = cfg_.get_child("keybindings"); |
|
|
|
boost::property_tree::ptree keys_json = cfg_.get_child("keybindings"); |
|
|
|
for (auto &i : keys_json) |
|
|
|
for (auto &i : keys_json) |
|
|
|
|