|
|
|
@ -669,8 +669,8 @@ void MainWindow::set_active_boot_second() {
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::wrapper_save_all_cfg() {
|
|
|
|
void MainWindow::wrapper_save_all_cfg() {
|
|
|
|
this->set_data_cfg();
|
|
|
|
this->set_data_cfg();
|
|
|
|
bool _flag_save_global = this->save_template("boot", "global");;
|
|
|
|
bool _flag_save_global = this->save_template(global_save, global_remove , "global");
|
|
|
|
bool _flag_save_local = this->save_template("boot", "system");
|
|
|
|
bool _flag_save_local = this->save_template(system_save, system_remove , "global");
|
|
|
|
if (_flag_save_global && _flag_save_local) {
|
|
|
|
if (_flag_save_global && _flag_save_local) {
|
|
|
|
this->info_warning_error(5);
|
|
|
|
this->info_warning_error(5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -684,7 +684,7 @@ void MainWindow::wrapper_save_all_cfg() {
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::wrapper_save_global_cfg() {
|
|
|
|
void MainWindow::wrapper_save_global_cfg() {
|
|
|
|
this->set_data_cfg();
|
|
|
|
this->set_data_cfg();
|
|
|
|
if (this->save_template("boot", "global")) {
|
|
|
|
if (this->save_template(global_save, global_remove , "global")) {
|
|
|
|
this->info_warning_error(5);
|
|
|
|
this->info_warning_error(5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
@ -694,13 +694,13 @@ void MainWindow::wrapper_save_global_cfg() {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool MainWindow::save_template(string section, string flag_save) {
|
|
|
|
bool MainWindow::save_template(string cmd, string cmd_remove, string flag_save) {
|
|
|
|
bool flag_no_save = true;
|
|
|
|
bool flag_no_save = true;
|
|
|
|
obj_save.set_data_local(map_local_cmd_selection);
|
|
|
|
obj_save.set_data_local(map_local_cmd_selection);
|
|
|
|
obj_save.set_data_global(map_global_cmd_selection);
|
|
|
|
obj_save.set_data_global(map_global_cmd_selection);
|
|
|
|
obj_save.set_data_gui(map_cmd_selection);
|
|
|
|
obj_save.set_data_gui(map_cmd_selection);
|
|
|
|
obj_save.set_vec_params(vec_param_names);
|
|
|
|
obj_save.set_vec_params(vec_param_names);
|
|
|
|
obj_save.save(section, flag_save);
|
|
|
|
obj_save.save_one_cmd(cmd, cmd_remove ,flag_save);
|
|
|
|
vector<string> obj_vec_error = obj_save.get_error();
|
|
|
|
vector<string> obj_vec_error = obj_save.get_error();
|
|
|
|
flag_no_save = obj_save.get_state_save();
|
|
|
|
flag_no_save = obj_save.get_state_save();
|
|
|
|
return flag_no_save;
|
|
|
|
return flag_no_save;
|
|
|
|
@ -708,7 +708,7 @@ bool MainWindow::save_template(string section, string flag_save) {
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::wrapper_save_local_cfg() {
|
|
|
|
void MainWindow::wrapper_save_local_cfg() {
|
|
|
|
this->set_data_cfg();
|
|
|
|
this->set_data_cfg();
|
|
|
|
if (this->save_template("boot", "system")) {
|
|
|
|
if (this->save_template(system_save, system_remove , "global")) {
|
|
|
|
this->info_warning_error(5);
|
|
|
|
this->info_warning_error(5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
@ -751,26 +751,28 @@ void MainWindow::set_data_cfg() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::download_globl_cfg() {
|
|
|
|
void MainWindow::download_globl_cfg() {
|
|
|
|
this->load_template(&map_global_cmd_selection, "global");
|
|
|
|
this->load_template(&map_global_cmd_selection, global_load);
|
|
|
|
info_warning_error(1);
|
|
|
|
info_warning_error(1);
|
|
|
|
map_cmd_selection = map_global_cmd_selection;
|
|
|
|
map_cmd_selection = map_global_cmd_selection;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::download_local_cfg() {
|
|
|
|
void MainWindow::download_local_cfg() {
|
|
|
|
this->load_template(&map_local_cmd_selection, "system");
|
|
|
|
this->load_template(&map_local_cmd_selection, system_load);
|
|
|
|
info_warning_error(0);
|
|
|
|
info_warning_error(0);
|
|
|
|
map_cmd_selection = map_local_cmd_selection;
|
|
|
|
map_cmd_selection = map_local_cmd_selection;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::load_template(std::map<string, string>* map_temp, string str_load) {
|
|
|
|
void MainWindow::load_template(std::map<string, string>* map_temp, string cmd) {
|
|
|
|
this->init_dict(str_load);
|
|
|
|
if (cmd.find("system") != string::npos) {
|
|
|
|
|
|
|
|
this->init_dict("system");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
this->init_dict("global");
|
|
|
|
|
|
|
|
}
|
|
|
|
entryKernel->set_text("");
|
|
|
|
entryKernel->set_text("");
|
|
|
|
entryOTT->set_text("");
|
|
|
|
entryOTT->set_text("");
|
|
|
|
entryIPT->set_text("");
|
|
|
|
entryIPT->set_text("");
|
|
|
|
string sections;
|
|
|
|
*map_temp = obj_load.get_load_data(*map_temp, cmd);
|
|
|
|
sections = "boot";
|
|
|
|
|
|
|
|
obj_load.set_sections(sections);
|
|
|
|
|
|
|
|
*map_temp = obj_load.get_load_data(*map_temp, str_load);
|
|
|
|
|
|
|
|
this->get_menu_boot(*map_temp);
|
|
|
|
this->get_menu_boot(*map_temp);
|
|
|
|
this->get_setting_entry_all("GRUB_CMDLINE_LINUX", map_temp);
|
|
|
|
this->get_setting_entry_all("GRUB_CMDLINE_LINUX", map_temp);
|
|
|
|
this->get_setting_entry_all("GRUB_TERMINAL_INPUT", map_temp);
|
|
|
|
this->get_setting_entry_all("GRUB_TERMINAL_INPUT", map_temp);
|
|
|
|
|