|
|
|
|
@ -74,6 +74,7 @@ void MainWindow::settings(){
|
|
|
|
|
vec_param_names.push_back("GRUB_USER");
|
|
|
|
|
vec_param_names.push_back("GRUB_PASSWORD");
|
|
|
|
|
vec_param_names.push_back("GRUB_DEFAULT");
|
|
|
|
|
vec_param_names.push_back("GRUB_PLAY");
|
|
|
|
|
this->get_builder();
|
|
|
|
|
this->localization();
|
|
|
|
|
this->add_CSS();
|
|
|
|
|
@ -93,15 +94,17 @@ void MainWindow::settings(){
|
|
|
|
|
spbSecond->set_increments(1.0, 1.0);
|
|
|
|
|
spbSecond->set_value(1);
|
|
|
|
|
this->fill_in_view();
|
|
|
|
|
this->set_init_data_music();
|
|
|
|
|
|
|
|
|
|
this->change_password_protecc();
|
|
|
|
|
this->change_security_login();
|
|
|
|
|
this->set_active_boot_second();
|
|
|
|
|
this->str_last_launched_os = this->pars_last_launched_os();
|
|
|
|
|
vector<string> os_control_list;
|
|
|
|
|
this->pars_os(os_control_list);
|
|
|
|
|
|
|
|
|
|
this->download_local_cfg();
|
|
|
|
|
this->download_globl_cfg();
|
|
|
|
|
this->view_add_colums_music(*treeViewMusic);
|
|
|
|
|
std::map<string, vector<string>> map_list_os = format_os_list(os_control_list);
|
|
|
|
|
obj_menu_os.set_builder(builder, path_glade);
|
|
|
|
|
obj_menu_os.set_map(map_list_os);
|
|
|
|
|
@ -843,14 +846,16 @@ void get_tree_view_music() {
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
void MainWindow::set_init_data_music() {
|
|
|
|
|
void MainWindow::set_init_data_music(std::map<string, string> &map_temp) {
|
|
|
|
|
treeViewMusic->reset_expander_column();
|
|
|
|
|
list_store_music = Gtk::ListStore::create(m_columns_music);
|
|
|
|
|
treeViewMusic->set_model(list_store_music);
|
|
|
|
|
string path_name = "";
|
|
|
|
|
path_name = path_name + path_resources + "/" + "grub-music.csv";
|
|
|
|
|
vector<tuple<string, string>> vec_music = Utils::read_csv_music(path_name);
|
|
|
|
|
bool flag = false;
|
|
|
|
|
string cgf_code_music = map_cmd_selection["GRUB_PLAY"];
|
|
|
|
|
string cgf_code_music = map_temp["GRUB_PLAY"];
|
|
|
|
|
cout << cgf_code_music << endl;
|
|
|
|
|
for (tuple<string, string>& tuple_music: vec_music) {
|
|
|
|
|
string name = get<0>(tuple_music);
|
|
|
|
|
string code = get<1>(tuple_music);
|
|
|
|
|
@ -858,7 +863,7 @@ void MainWindow::set_init_data_music() {
|
|
|
|
|
this->set_add_data_music(row_music, flag, name, code);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this->view_add_colums_music(*treeViewMusic);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MainWindow::set_add_data_music(Gtk::TreeModel::Row &row, bool flag, string &name, string &code) {
|
|
|
|
|
@ -1107,6 +1112,7 @@ void MainWindow::load_template(std::map<string, string>* map_temp, string cmd) {
|
|
|
|
|
this->set_entry(entryIPT, *map_temp, "GRUB_TERMINAL_INPUT");
|
|
|
|
|
this->set_entry(entryOTT, *map_temp, "GRUB_TERMINAL_OUTPUT");
|
|
|
|
|
string str_last_launched_os_ubconfig = (*map_temp)["GRUB_DEFAULT"];
|
|
|
|
|
this->set_init_data_music(*map_temp);
|
|
|
|
|
if (str_last_launched_os_ubconfig.length() != 0) {
|
|
|
|
|
entrListOS->set_text(str_last_launched_os_ubconfig);
|
|
|
|
|
}
|
|
|
|
|
@ -1116,7 +1122,7 @@ void MainWindow::load_template(std::map<string, string>* map_temp, string cmd) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MainWindow::set_entry(Gtk::Entry* entry , std::map<string, string> &map_temp, string key) {
|
|
|
|
|
void MainWindow::set_entry(Gtk::Entry* entry, std::map<string, string> &map_temp, string key) {
|
|
|
|
|
if (map_temp.find(key) != map_temp.end()) {
|
|
|
|
|
string value = map_temp[key];
|
|
|
|
|
Utils::str_replace_all(value, "\"", "");
|
|
|
|
|
|