diff --git a/#ubl-settings-bootloader.glade# b/#ubl-settings-bootloader.glade#
new file mode 100644
index 0000000..84887a7
--- /dev/null
+++ b/#ubl-settings-bootloader.glade#
@@ -0,0 +1,1265 @@
+
+
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ 69
+ com.ublinux.ubl-settings-bootloader
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ start
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Running applications as a user with a
+specified priority
+
+
+
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+
+
+
+ 750
+ 550
+ False
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ 25
+ 1
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ start
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ in
+
+
+ True
+ False
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+
+
+ 81
+ True
+ False
+ start
+
+
+ -1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 12
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+
+
+ Load variant selection timer
+ True
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Seconds
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ 0
+ True
+ False
+ start
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Default download
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ False
+ True
+ 1
+
+
+
+
+ The last selection will become the default boot choice
+ True
+ True
+ False
+ start
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ True
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+
+
+ 0
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Download mode
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+
+
+ 0
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Security login:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ True
+ True
+ 2
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Password protection:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ True
+ True
+ 2
+
+
+
+
+ False
+ True
+ 4
+
+
+
+
+
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 12
+
+
+ True
+ False
+ vertical
+
+
+ 140
+ True
+ True
+ in
+
+
+ True
+ False
+
+
+ -1
+ True
+ True
+
+
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Command line parameters:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 10
+
+
+
+
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Parameters passed to the kernel
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 12
+
+
+ True
+ False
+ vertical
+
+
+ 140
+ True
+ True
+ in
+
+
+ True
+ False
+
+
+ True
+ True
+
+
+
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Command line parameters:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 7
+
+
+
+
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Terminal for input
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 12
+
+
+ True
+ False
+ vertical
+
+
+ 140
+ True
+ True
+ in
+
+
+ True
+ False
+
+
+ True
+ True
+
+
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Command line parameters:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 7
+
+
+
+
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Terminal for output
+
+
+
+
+ False
+ True
+ 4
+
+
+
+
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+
+
+
+
+
+ False
+ Внимание!
+ center
+ dialog
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ 50
+ gtk-dialog-warning
+
+
+ True
+ True
+ 0
+
+
+
+
+ 160
+ True
+ False
+ start
+ center
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Warning!
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ OK
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 3
+ 3
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc
index e3e564b..273edd8 100755
--- a/source/ubl-settings-bootloader.cc
+++ b/source/ubl-settings-bootloader.cc
@@ -125,6 +125,9 @@ void MainWindow::item_selected_kernel(const Gtk::TreeModel::Path& path, const Gt
auto selection_OTT = treeViewOTT->get_selection();
selection_IPT->unselect_all();
selection_OTT->unselect_all();
+ flag_save_local = true;
+ flag_save_global = true;
+ flag_save_all = true;
if (flag_blocked_tree_view == false) {
template_item_selected(map_cmd_selection, path, list_store_kernel);
string str_flags = this->dynamic_update_entry(map_cmd_selection, vec_Option_kernel);
@@ -137,6 +140,9 @@ void MainWindow::item_selected_OTT(const Gtk::TreeModel::Path& path, const Gtk::
auto selection_IPT = treeViewIPT->get_selection();
selection_kernel->unselect_all();
selection_IPT->unselect_all();
+ flag_save_local = true;
+ flag_save_global = true;
+ flag_save_all = true;
if (flag_blocked_tree_view == false) {
template_item_selected(map_cmd_selection , path, list_store_OTT);
string str_flags = this->dynamic_update_entry(map_cmd_selection, vec_Option_OTT);
@@ -150,6 +156,9 @@ void MainWindow::item_selected_IPT(const Gtk::TreeModel::Path& path, const Gtk::
auto selection_OTT = treeViewOTT->get_selection();
selection_kernel->unselect_all();
selection_OTT->unselect_all();
+ flag_save_local = true;
+ flag_save_global = true;
+ flag_save_all = true;
if (flag_blocked_tree_view == false) {
template_item_selected(map_cmd_selection , path, list_store_IPT);
string str_flags = this->dynamic_update_entry(map_cmd_selection, vec_Option_IPT);
@@ -372,7 +381,8 @@ void MainWindow::get_menu_boot(string cmd) {
}
void MainWindow::set_menu_boot(string cmd) {
- std::string seconds = to_string(spbSecond->get_value());
+ int value = spbSecond->get_value();
+ std::string seconds = to_string(value);
cmd += seconds;
struct Result res_response = this->wrapper_call(cmd);
if (res_response.error == 0) {
@@ -389,16 +399,19 @@ void MainWindow::set_menu_boot(string cmd) {
void MainWindow::cmd_entry_all(string cmd_settings_kernel,string cmd_settings_IPT,string cmd_settings_OTT) {
string cmd_kernel = entryKernel->get_text();
string cmd_IPT = entryIPT->get_text();
- string cmd_OTT = entryIPT->get_text();
+ string cmd_OTT = entryOTT->get_text();
str_remove(cmd_kernel, ",");
str_remove(cmd_IPT, ",");
str_remove(cmd_OTT, ",");
cmd_settings_kernel += "\"" + cmd_kernel + "\"";
- this->wrapper_call(cmd_settings_kernel);
cmd_settings_IPT += "\"" + cmd_IPT + "\"";
- this->wrapper_call(cmd_settings_IPT);
cmd_settings_OTT += "\"" + cmd_OTT + "\"";
- this->wrapper_call(cmd_settings_OTT);
+ str_replace_all(cmd_settings_kernel, " \"", "\"");
+ str_replace_all(cmd_settings_IPT, " \"", "\"");
+ str_replace_all(cmd_settings_OTT, " \"", "\"");
+ this->wrapper_system(cmd_settings_kernel, "");
+ this->wrapper_system(cmd_settings_IPT, "");
+ this->wrapper_system(cmd_settings_OTT, "");
}
void MainWindow::event(){
btnSynopsis->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::synopsis_show));
@@ -427,24 +440,24 @@ void MainWindow::event(){
void MainWindow::save_global_local_cfg() {
- if (flag_save_global == false) {
- std::string cmd_boot_time = "sudo ubconfig --default --source global set boot GRUB_TIMEOUT";
+ if (flag_save_global) {
+ std::string cmd_boot_time = "sudo ubconfig --target global set boot GRUB_TIMEOUT=";
this->set_menu_boot(cmd_boot_time);
- string cmd_settings_kernel = "sudo ubconfig --default --source global set boot GRUB_BOOT_SILENT=";
- string cmd_settings_IPT = "sudo ubconfig --default --source global set boot GRUB_TERMINAL_OUTPUT=";
- string cmd_settings_OTT = "sudo ubconfig --default --source global set boot GRUB_TERMINAL_INPUT=";
+ string cmd_settings_kernel = "sudo ubconfig --target global set boot GRUB_CMDLINE_LINUX=";
+ string cmd_settings_IPT = "sudo ubconfig --target global set boot GRUB_TERMINAL_OUTPUT=";
+ string cmd_settings_OTT = "sudo ubconfig --target global set boot GRUB_TERMINAL_INPUT=";
this->cmd_entry_all(cmd_settings_kernel,cmd_settings_IPT,cmd_settings_OTT);
- flag_save_all = true;
+ flag_save_all = false;
}
- else if (flag_save_local == false) {
+ else if (flag_save_local) {
- std::string cmd_boot_time = "sudo ubconfig --default --source system set boot GRUB_TIMEOUT";
+ std::string cmd_boot_time = "sudo ubconfig --target global set boot GRUB_TIMEOUT=";
this->set_menu_boot(cmd_boot_time);
- string cmd_settings_kernel = "sudo ubconfig --default --source system set boot GRUB_BOOT_SILENT=";
- string cmd_settings_IPT = "sudo ubconfig --default --source system set boot GRUB_TERMINAL_OUTPUT=";
- string cmd_settings_OTT = "sudo ubconfig --default --source system set boot GRUB_TERMINAL_INPUT=";
+ string cmd_settings_kernel = "sudo ubconfig --target global set boot GRUB_CMDLINE_LINUX=";
+ string cmd_settings_IPT = "sudo ubconfig --target global set boot GRUB_TERMINAL_OUTPUT=";
+ string cmd_settings_OTT = "sudo ubconfig --target global set boot GRUB_TERMINAL_INPUT=";
this->cmd_entry_all(cmd_settings_kernel,cmd_settings_IPT,cmd_settings_OTT);
- flag_save_all = true;
+ flag_save_all = false;
}
else{
info_status_app("boxInfoMessOK");
@@ -456,15 +469,15 @@ void MainWindow::save_global_local_cfg() {
}
void MainWindow::save_global_cfg() {
- if (flag_save_global == false) {
- if (flag_save_all == false) {
- std::string cmd_boot_time = "sudo ubconfig --default --source global set boot GRUB_TIMEOUT";
+ if (flag_save_global) {
+ if (flag_save_all) {
+ std::string cmd_boot_time = "sudo ubconfig --target global set boot GRUB_TIMEOUT=";
this->set_menu_boot(cmd_boot_time);
- string cmd_settings_kernel = "sudo ubconfig --default --source global set boot GRUB_BOOT_SILENT=";
- string cmd_settings_IPT = "sudo ubconfig --default --source global set boot GRUB_TERMINAL_OUTPUT";
- string cmd_settings_OTT = "sudo ubconfig --default --source global set boot GRUB_TERMINAL_INPUT=";
+ string cmd_settings_kernel = "sudo ubconfig --target global set boot GRUB_CMDLINE_LINUX=";
+ string cmd_settings_IPT = "sudo ubconfig --target global set boot GRUB_TERMINAL_OUTPUT";
+ string cmd_settings_OTT = "sudo ubconfig --target global set boot GRUB_TERMINAL_INPUT=";
this->cmd_entry_all(cmd_settings_kernel,cmd_settings_IPT,cmd_settings_OTT);
- flag_save_global = true;
+ flag_save_global = false;
}
}
else{
@@ -475,13 +488,13 @@ void MainWindow::save_global_cfg() {
}
void MainWindow::save_local_cfg() {
- if (flag_save_local == false) {
- if (flag_save_all == false) {
- std::string cmd_boot_time = "sudo ubconfig --default --source system set boot GRUB_TIMEOUT";
+ if (flag_save_local) {
+ if (flag_save_all) {
+ std::string cmd_boot_time = "sudo ubconfig --target system set boot GRUB_TIMEOUT=";
this->set_menu_boot(cmd_boot_time);
- string cmd_settings_kernel = "sudo ubconfig --default --source system set boot GRUB_BOOT_SILENT=";
- string cmd_settings_IPT = "sudo ubconfig --default --source system set boot GRUB_TERMINAL_OUTPUT";
- string cmd_settings_OTT = "sudo ubconfig --default --source system set boot GRUB_TERMINAL_INPUT=";
+ string cmd_settings_kernel = "sudo ubconfig --target system set boot GRUB_CMDLINE_LINUX=";
+ string cmd_settings_IPT = "sudo ubconfig --target system set boot GRUB_TERMINAL_OUTPUT";
+ string cmd_settings_OTT = "sudo ubconfig --target system set boot GRUB_TERMINAL_INPUT=";
this->cmd_entry_all(cmd_settings_kernel,cmd_settings_IPT,cmd_settings_OTT);
flag_save_local = true;
}
@@ -497,21 +510,21 @@ void MainWindow::download_globl_cfg() {
entryKernel->set_text("");
entryOTT->set_text("");
entryIPT->set_text("");
- flag_save_local = true;
- flag_save_global = true;
- flag_save_all = true;
+ flag_save_local = false;
+ flag_save_global = false;
+ flag_save_all = false;
flag_load = true;
std::string cmd_boot_time = "sudo ubconfig --default --source global get boot GRUB_TIMEOUT";
this->get_menu_boot(cmd_boot_time);
- string cmd_kernel_entry = "sudo ubconfig --default --source global get boot GRUB_BOOT_SILENT";
+ string cmd_kernel_entry = "sudo ubconfig --default --source global get boot GRUB_CMDLINE_LINUX";
this->get_setting_entry_all(cmd_kernel_entry, *entryKernel, map_global_cmd_selection);
string cmd_ipt_entry = "sudo ubconfig --default --source global get boot GRUB_TERMINAL_INPUT";
this->get_setting_entry_all(cmd_ipt_entry, *entryIPT, map_global_cmd_selection);
string cmd_opt_entry = "sudo ubconfig --default --source global get boot GRUB_TERMINAL_OUTPUT";
this->get_setting_entry_all(cmd_opt_entry, *entryOTT, map_global_cmd_selection);
- this->set_row_all(map_global_cmd_selection,list_store_kernel, vec_Option_kernel, size_kernel);
- this->set_row_all(map_global_cmd_selection,list_store_IPT, vec_Option_IPT, size_IPT);
- this->set_row_all(map_global_cmd_selection,list_store_OTT, vec_Option_OTT, size_OTT);
+ this->set_row_all(map_global_cmd_selection, list_store_kernel, vec_Option_kernel, size_kernel);
+ this->set_row_all(map_global_cmd_selection, list_store_IPT, vec_Option_IPT, size_IPT);
+ this->set_row_all(map_global_cmd_selection, list_store_OTT, vec_Option_OTT, size_OTT);
info_warning_error(1);
}
@@ -519,21 +532,21 @@ void MainWindow::download_local_cfg() {
entryKernel->set_text("");
entryOTT->set_text("");
entryIPT->set_text("");
+ flag_save_local = false;
+ flag_save_global = false;
+ flag_save_all = false;
flag_load = false;
- flag_save_local = true;
- flag_save_global = true;
- flag_save_all = true;
std::string cmd_boot_time = "sudo ubconfig --default --source system get boot GRUB_TIMEOUT";
this->get_menu_boot(cmd_boot_time);
- string cmd_kernel_entry = "sudo ubconfig --default --source system get boot GRUB_BOOT_SILENT";
+ string cmd_kernel_entry = "sudo ubconfig --default --source system get boot GRUB_CMDLINE_LINUX";
this->get_setting_entry_all(cmd_kernel_entry, *entryKernel, map_local_cmd_selection);
string cmd_ipt_entry = "sudo ubconfig --default --source system get boot GRUB_TERMINAL_INPUT";
this->get_setting_entry_all(cmd_ipt_entry, *entryIPT, map_local_cmd_selection);
string cmd_opt_entry = "sudo ubconfig --default --source system get boot GRUB_TERMINAL_OUTPUT";
this->get_setting_entry_all(cmd_opt_entry, *entryOTT, map_local_cmd_selection);
- this->set_row_all(map_local_cmd_selection,list_store_kernel , vec_Option_kernel, size_kernel);
- this->set_row_all(map_local_cmd_selection,list_store_IPT , vec_Option_IPT, size_IPT);
- this->set_row_all(map_local_cmd_selection,list_store_OTT , vec_Option_OTT, size_OTT);
+ this->set_row_all(map_local_cmd_selection, list_store_kernel, vec_Option_kernel, size_kernel);
+ this->set_row_all(map_local_cmd_selection, list_store_IPT, vec_Option_IPT, size_IPT);
+ this->set_row_all(map_local_cmd_selection, list_store_OTT, vec_Option_OTT, size_OTT);
info_warning_error(0);
}
@@ -644,6 +657,7 @@ struct MainWindow::Result MainWindow::wrapper_call(string cmd) {
response = response.substr(0,response.find("\n"));
obj_result.response = response;
obj_result.error = 0;
+
}
else {
obj_result.response = response;
@@ -670,7 +684,8 @@ struct MainWindow::Result MainWindow::wrapper_call(string cmd) {
return obj_result;
}
-void MainWindow::log_mess_error(string &cmd){
+void MainWindow::log_mess_error(string &cmd) {
+ cout << cmd << endl;
string key = "";
if (map_cmd_error.find(cmd) != map_cmd_error.end()){
str_cmd_error = map_cmd_error[cmd];
@@ -686,6 +701,7 @@ void MainWindow::log_mess_error(string &cmd){
}
}
+
void MainWindow::fn_event_intelMax1(){
chbintelMax4->set_active(false);
}