|
|
|
|
@ -100,6 +100,10 @@ void MainWindow::settings(){
|
|
|
|
|
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->write_list_entry_os(os_control_list);
|
|
|
|
|
this->download_local_cfg();
|
|
|
|
|
this->download_globl_cfg();
|
|
|
|
|
}
|
|
|
|
|
@ -116,6 +120,23 @@ void MainWindow::settings(){
|
|
|
|
|
this->event();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
vector<string> MainWindow::pars_os(vector<string> &os_control_list) {
|
|
|
|
|
string str_list_os = obj_process_call.call_all_sections(cmd_pars_list_os);
|
|
|
|
|
os_control_list = Utils::split(str_list_os, '\n');
|
|
|
|
|
return os_control_list;
|
|
|
|
|
}
|
|
|
|
|
string MainWindow::pars_last_launched_os() {
|
|
|
|
|
string str_list_os = obj_process_call.call_all_sections(cmd_last_launched_os);
|
|
|
|
|
Utils::str_replace_all(str_list_os, "\n" , "");
|
|
|
|
|
return str_list_os;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MainWindow::write_list_entry_os(vector<string> &os_control_list) {
|
|
|
|
|
for (string &name_os: os_control_list) {
|
|
|
|
|
cmbDefaultDonw->append(name_os);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MainWindow::flag_block_gui() {
|
|
|
|
|
if (flag_load_global == true) {
|
|
|
|
|
btnLoadGlob->set_sensitive(false);
|
|
|
|
|
@ -851,6 +872,14 @@ void MainWindow::load_template(std::map<string, string>* map_temp, string cmd) {
|
|
|
|
|
this->set_entry(entryKernel, *map_temp, "GRUB_CMDLINE_LINUX");
|
|
|
|
|
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"];
|
|
|
|
|
if (str_last_launched_os_ubconfig.length() != 0) {
|
|
|
|
|
cmbDefaultDonw->set_active_text(str_last_launched_os_ubconfig);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
cmbDefaultDonw->set_active_text(str_last_launched_os);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MainWindow::set_entry(Gtk::Entry* entry , std::map<string, string> &map_temp, string key) {
|
|
|
|
|
|