diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index acf79da..342bbf6 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -154,7 +154,7 @@ void MainWindow::item_selected_OTT(const Gtk::TreeModel::Path&, const Gtk::TreeM Utils::str_replace_all(str_flags, " \"", "\""); Utils::str_replace_all(str_flags, "\"", ""); map_cmd_selection["GRUB_TERMINAL_OUTPUT"] = str_flags; - Utils::str_replace_all(str_flags, " ", ","); + Utils::str_replace_all(str_flags, " ", ", "); entryOTT->set_text(str_flags); } } @@ -170,7 +170,7 @@ void MainWindow::item_selected_IPT(const Gtk::TreeModel::Path&, const Gtk::TreeM Utils::str_replace_all(str_flags, " \"", "\""); Utils::str_replace_all(str_flags, "\"", ""); map_cmd_selection["GRUB_TERMINAL_INPUT"] = str_flags; - Utils::str_replace_all(str_flags, " ", ","); + Utils::str_replace_all(str_flags, " ", ", "); entryIPT->set_text(str_flags); } } @@ -793,7 +793,6 @@ void MainWindow::set_entry(Gtk::Entry* entry , std::map &map_tem string value = map_temp[key]; Utils::str_replace_all(value, "\"", ""); Utils::str_replace_all(value, " ", ", "); - cout << value << endl; entry->set_text(value); } else { @@ -817,25 +816,17 @@ void MainWindow::init_dict() { map_local_cmd_selection = map_cmd_selection_n; } -void MainWindow::set_row_all(std::map &map_cmd, Glib::RefPtr &list_store, vector &list_params, size_t size,string key="") { +void MainWindow::set_row_all(std::map &map_cmd, Glib::RefPtr &list_store, vector &list_params, size_t size,string key) { for (auto &name: list_params) { this->set_row(list_store, size, name, false); } - cout << key << endl; - for (auto &name: list_params) { - if (map_cmd.find(name) != map_cmd.end()) { - if (map_cmd[name] == "1") { - cout << name << "|||" << endl; - this->set_row(list_store, size, name, true); - } - else { - this->set_row(list_store, size, name, false); - } - - } - else { - this->set_row(list_store, size, name, false); - } + // TODO: + // Баг + string value = map_cmd[key]; + Utils::str_replace_all(value, "\"", ""); + vector vec_params = Utils::split(value, ' '); + for (auto &name: vec_params) { + this->set_row(list_store, size, name, true); } }