diff --git a/screenshot/screenshot.png b/screenshot/screenshot.png index 366fb8b..31c16fe 100644 Binary files a/screenshot/screenshot.png and b/screenshot/screenshot.png differ diff --git a/source/my_process.cc b/source/my_process.cc index 8845d86..658afd5 100644 --- a/source/my_process.cc +++ b/source/my_process.cc @@ -66,7 +66,7 @@ string My_Process::get_cmd_error() { return this->str_cmd_error; } string My_Process_call::call_all_sections(string cmd) { - char buffer[PATH_MAX]; + char buffer[PATH_MAX] = {0}; std::string result = ""; FILE* pipe = popen(cmd.c_str(), "r"); if (!pipe) throw std::runtime_error("popen() failed!"); diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index 342bbf6..ea99067 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -94,18 +94,19 @@ void MainWindow::settings(){ this->change_security_login(); this->set_active_boot_second(); this->download_local_cfg(); - //this->download_globl_cfg(); + this->download_globl_cfg(); } else{ boxWidgetAll->set_sensitive(false); btnLoad->set_sensitive(false); - boxSave->set_sensitive(false); + btnSave->set_sensitive(false); imgInfo->set_from_icon_name("com.ublinux.ubl-settings-bootloader.warning", Gtk::ICON_SIZE_MENU); info_status_app("boxInfoMessError"); lblWarning->set_text(_("The program must be run as root")); this->set_active_boot_second(); + this->fill_in_view(); } this->event(); } @@ -159,8 +160,6 @@ void MainWindow::item_selected_OTT(const Gtk::TreeModel::Path&, const Gtk::TreeM } } void MainWindow::item_selected_IPT(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&) { - // TODO - // Баг auto selection_kernel = treeViewKernel->get_selection(); auto selection_OTT = treeViewOTT->get_selection(); selection_kernel->unselect_all(); @@ -687,7 +686,7 @@ void MainWindow::wrapper_save_global_cfg() { bool MainWindow::save_global_cfg() { bool flag_no_save = true; - obj_save.set_data_local(map_cmd_selection); + obj_save.set_data_local(map_local_cmd_selection); obj_save.set_data_global(map_global_cmd_selection); obj_save.set_data_gui(map_cmd_selection); obj_save.set_vec_params(vec_param_names); @@ -710,8 +709,8 @@ void MainWindow::wrapper_save_local_cfg() { bool MainWindow::save_local_cfg() { bool flag_no_save = true; - obj_save.set_data_local(map_cmd_selection); - obj_save.set_data_global(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_gui(map_cmd_selection); obj_save.set_vec_params(vec_param_names); obj_save.save("boot", "system"); @@ -755,10 +754,12 @@ void MainWindow::set_data_cfg() { void MainWindow::download_globl_cfg() { this->load_template(&map_global_cmd_selection, "global"); + info_warning_error(1); } void MainWindow::download_local_cfg() { this->load_template(&map_local_cmd_selection, "system"); + info_warning_error(0); } void MainWindow::load_template(std::map* map_temp, string str_load) { @@ -784,7 +785,6 @@ void MainWindow::load_template(std::map* map_temp, string str_lo 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"); - info_warning_error(1); map_cmd_selection = *map_temp; } @@ -820,8 +820,6 @@ void MainWindow::set_row_all(std::map &map_cmd, Glib::RefPtrset_row(list_store, size, name, false); } - // TODO: - // Баг string value = map_cmd[key]; Utils::str_replace_all(value, "\"", ""); vector vec_params = Utils::split(value, ' '); @@ -842,7 +840,7 @@ void MainWindow::set_row(Glib::RefPtr &list_store, int size, std } void MainWindow::synopsis_show() { - string cmd = "xdg-open " + string(_("https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/")) + app_name + " &"; + string cmd = "xdg-open " + string(_("https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/")) + app_name; if (geteuid() == 0) { string response_user = getlogin(); cmd = "su -l " + response_user + " -c \" DISPLAY=$DISPLAY " + cmd + " \""; diff --git a/ubl-settings-bootloader.glade b/ubl-settings-bootloader.glade index 8d7cbd6..20eb89c 100644 --- a/ubl-settings-bootloader.glade +++ b/ubl-settings-bootloader.glade @@ -663,6 +663,9 @@ specified priority -1 True True + + + @@ -776,6 +779,9 @@ specified priority True True + + + @@ -889,6 +895,9 @@ specified priority True True + + + @@ -1206,6 +1215,15 @@ specified priority + + + + + + + + + False Внимание!