From bec1f559e771ed11273616a53fe3efdecd7b10a6 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Fri, 7 Apr 2023 09:27:34 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B1=D0=B0=D0=B3=20=D1=81=20=D0=B7=D0=B0=D0=B3?= =?UTF-8?q?=D1=80=D1=83=D0=B7=D0=BA=D0=BE=D0=B9=20TreeView?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-bootloader.cc | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) 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); } }