diff --git a/#ubl-settings-bootloader.glade# b/#ubl-settings-bootloader.glade#
new file mode 100644
index 0000000..72d0071
--- /dev/null
+++ b/#ubl-settings-bootloader.glade#
@@ -0,0 +1,1944 @@
+
+
+
+
+
+
+
+
+
+ False
+ False
+ True
+ center
+ com.ublinux.ubl-settings-diskquota
+ dialog
+ True
+ True
+ ubl-settings-bootloader
+ 1.0
+ Copyright © 2022 - 2023, UBSoft LLC
+ ubl-settings-bootloader
+ https://ublinux.ru/
+ Project Home Page
+ Это приложение распространяется без каких-либо гарантий.
+Подробнее в <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, версии 2 или позднее</a>.
+ UBGroup
+ UBGroup
+ UBGroup
+ UBGroup
+ com.ublinux.ubl-settings-bootloader
+ True
+ gpl-2-0
+
+
+ True
+ False
+ vertical
+ 2
+
+
+ False
+ end
+
+
+ False
+ False
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+
+
+
+ True
+ True
+ True
+
+
+ True
+ False
+ 0
+
+
+
+
+
+
+
+
+ 750
+ 550
+ False
+ com.ublinux.ubl-settings-bootloader
+
+
+ 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
+ False
+
+
+ 81
+ True
+ False
+ start
+
+
+ -1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+ in
+
+
+ True
+ False
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 12
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+
+
+ Boot selection menu timer
+ True
+ True
+ False
+ 3
+ 5
+ 3
+ 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
+
+
+ True
+ False
+ start
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Default load
+ start
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ True
+ True
+ 2
+
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ start
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Load screen display mode:
+ start
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+
+
+ True
+ False
+ 12
+
+
+ True
+ False
+ vertical
+
+
+ 65
+ True
+ True
+ 6
+ in
+
+
+ True
+ False
+
+
+ True
+ True
+
+
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+
+
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ True
+ False
+ list-add
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 3
+ 6
+
+
+ True
+ False
+ gtk-remove
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+
+
+
+ False
+ True
+ 5
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+
+
+ True
+ False
+ 12
+
+
+ True
+ False
+ vertical
+
+
+ 65
+ True
+ True
+ 6
+ in
+
+
+ True
+ False
+
+
+ True
+ True
+
+
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+
+
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+
+
+ True
+ False
+ list-add
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 3
+ 6
+
+
+ True
+ False
+ gtk-remove
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+ True
+ False
+ start
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Ringtone at startup
+ start
+
+
+
+
+ False
+ True
+ 6
+
+
+
+
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 12
+
+
+ True
+ False
+ vertical
+
+
+ 140
+ True
+ True
+ 5
+ 5
+ 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
+ start
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Parameters passed to the kernel
+ start
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 12
+
+
+ True
+ False
+ vertical
+
+
+ 140
+ True
+ True
+ 5
+ 5
+ 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
+ start
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Terminal for input
+ start
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 12
+
+
+ True
+ False
+ vertical
+
+
+ 140
+ True
+ True
+ 5
+ 5
+ 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
+ start
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ Terminal for output
+ start
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ False
+ True
+ 5
+
+
+
+
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+
+
+
+
+
+ both
+ True
+
+
+
+
+
+
+
+ both
+ True
+
+
+
+
+
+
+
+
+ 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
+
+
+
+
+
+
+ True
+ False
+ none
+
+
+ True
+ False
+ vertical
+
+
+
+
+
+
+
+ False
+ start
+ start
+ False
+ 450
+ 250
+ dialog-question-symbolic
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+
+
+ True
+ False
+ start
+ 20
+ 20
+ dialog-question-symbolic
+ 6
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ start
+ start
+ 10
+ 10
+ You will be redirected to documentation website where documentation is translated and supported by community.
+ True
+ 0
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ Always redirect to online documentation
+ True
+ True
+ False
+ end
+ 10
+ True
+
+
+
+ False
+ True
+ 2
+
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 30
+ True
+
+
+ Cancel
+ True
+ True
+ True
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ Read Online
+ True
+ True
+ True
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+
+
+
+ 800
+ 600
+ False
+ True
+ True
+ com.ublinux.ubl-settings-datetime
+
+
+
+
+
+
+
+
diff --git a/source/menu_os.cc b/source/menu_os.cc
index a9658a5..6fa884f 100644
--- a/source/menu_os.cc
+++ b/source/menu_os.cc
@@ -164,6 +164,5 @@ void Menu_os::html_last_launched_os(string name_os, Gtk::Label *label) {
label->set_text(name_os);
}
}
-
}
diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc
index d36566f..c50e581 100755
--- a/source/ubl-settings-bootloader.cc
+++ b/source/ubl-settings-bootloader.cc
@@ -98,7 +98,6 @@ void MainWindow::settings() {
this->download_local_cfg();
this->download_globl_cfg();
//this->view_add_colums_melody(*treeViewMelody);
- this->view_add_colums_user(*treeViewUser);
std::map> 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);
@@ -125,7 +124,6 @@ map> MainWindow::format_os_list(vector &os_contro
std::map> map_list_os;
set set_key;
for (string& name_os : os_control_list) {
-
if (name_os.find(">") != string::npos) {
set_key.insert(name_os.substr(0,name_os.find(">")+1));
}
@@ -219,10 +217,10 @@ void MainWindow::view_add_colums_melody(Gtk::TreeView &treeView) {
}
void MainWindow::item_selected_kernel(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&) {
- auto selection_IPT = treeViewIPT->get_selection();
- auto selection_OTT = treeViewOTT->get_selection();
- selection_IPT->unselect_all();
- selection_OTT->unselect_all();
+ treeViewIPT->get_selection()->unselect_all();
+ treeViewOTT->get_selection()->unselect_all();
+ treeViewUser->get_selection()->unselect_all();
+ treeViewMelody->get_selection()->unselect_all();
if (flag_blocked_tree_view == false) {
string str_flags = template_item_selected(size_kernel, list_store_kernel, "GRUB_CMDLINE_LINUX");
Utils::str_replace_all(str_flags, " \"", "\"");
@@ -234,10 +232,10 @@ void MainWindow::item_selected_kernel(const Gtk::TreeModel::Path&, const Gtk::Tr
}
void MainWindow::item_selected_OTT(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&) {
- auto selection_kernel = treeViewKernel->get_selection();
- auto selection_IPT = treeViewIPT->get_selection();
- selection_kernel->unselect_all();
- selection_IPT->unselect_all();
+ treeViewIPT->get_selection()->unselect_all();
+ treeViewKernel->get_selection()->unselect_all();
+ treeViewUser->get_selection()->unselect_all();
+ treeViewMelody->get_selection()->unselect_all();
if (flag_blocked_tree_view == false) {
string str_flags = template_item_selected(size_OTT, list_store_OTT, "GRUB_TERMINAL_OUTPUT");
Utils::str_replace_all(str_flags, " \"", "\"");
@@ -250,9 +248,10 @@ 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&) {
auto selection_kernel = treeViewKernel->get_selection();
- auto selection_OTT = treeViewOTT->get_selection();
- selection_kernel->unselect_all();
- selection_OTT->unselect_all();
+ treeViewKernel->get_selection()->unselect_all();
+ treeViewOTT->get_selection()->unselect_all();
+ treeViewUser->get_selection()->unselect_all();
+ treeViewMelody->get_selection()->unselect_all();
if (flag_blocked_tree_view == false) {
string str_flags = template_item_selected(size_IPT, list_store_IPT, "GRUB_TERMINAL_INPUT");
Utils::str_replace_all(str_flags, " \"", "\"");
@@ -505,8 +504,8 @@ vector MainWindow::get_setting_entry_all(string key, std::map get_selection();
- selection_kernel->unselect_all();
+ treeViewKernel->get_selection()->unselect_all();
+ treeViewUser->get_selection()->unselect_all();
this->set_entry_to_tree_view(list_store_kernel, *entryKernel, vec_Option_kernel, size_kernel, "GRUB_CMDLINE_LINUX");
this->set_row_all(map_cmd_selection, list_store_kernel, vec_Option_kernel, size_kernel, "GRUB_CMDLINE_LINUX");
flag_blocked_tree_view = false;
@@ -514,8 +513,8 @@ bool MainWindow::focus_out_txt_kernel(GdkEventFocus*) {
}
bool MainWindow::focus_out_txt_IPT(GdkEventFocus*) {
- auto selection_IPT = treeViewIPT->get_selection();
- selection_IPT->unselect_all();
+ treeViewIPT->get_selection()->unselect_all();
+ treeViewUser->get_selection()->unselect_all();
this->set_entry_to_tree_view(list_store_IPT, *entryIPT, vec_Option_IPT, size_IPT, "GRUB_TERMINAL_INPUT");
this->set_row_all(map_cmd_selection, list_store_IPT, vec_Option_IPT, size_IPT, "GRUB_TERMINAL_INPUT");
flag_blocked_tree_view = false;
@@ -523,8 +522,8 @@ bool MainWindow::focus_out_txt_IPT(GdkEventFocus*) {
}
bool MainWindow::focus_out_txt_OTT(GdkEventFocus*) {
- auto selection_OTT = treeViewIPT->get_selection();
- selection_OTT->unselect_all();
+ treeViewIPT->get_selection()->unselect_all();
+ treeViewUser->get_selection()->unselect_all();
this->set_entry_to_tree_view(list_store_OTT, *entryOTT, vec_Option_OTT, size_OTT, "GRUB_TERMINAL_OUTPUT");
this->set_row_all(map_cmd_selection, list_store_OTT, vec_Option_OTT, size_OTT, "GRUB_TERMINAL_OUTPUT");
flag_blocked_tree_view = false;
@@ -652,6 +651,8 @@ void MainWindow::event() {
void MainWindow::set_tree_view_user() {
string key = "";
string users_root = "";
+ string password = "";
+ bool flag_available = false;
Glib::RefPtr treeViewUser_model = treeViewUser->get_model();
Gtk::TreeModel::Children children = treeViewUser_model->children();
for(Gtk::TreeModel::iterator iter = children.begin(); iter != children.end(); ++iter) {
@@ -659,9 +660,20 @@ void MainWindow::set_tree_view_user() {
if(row) {
string superuser_name = row[m_columns_user.name] + "";
if (row[m_columns_user.check_button] && superuser_name.length() != 0) {
- key = "GRUB_PASSWORD[" + superuser_name + "]=";
- if ((row[m_columns_user.password] + "") != "************") {
- map_cmd_selection[key] = row[m_columns_user.password] + "";
+ key = "GRUB_PASSWORD[" + superuser_name + "]";
+ password = row[m_columns_user.password] + "";
+ if (password != "************") {
+ map_cmd_selection[key] = password;
+ flag_available = false;
+ for (size_t index = 0; index < vec_param_names.size(); index++) {
+ if (vec_param_names[index] == map_cmd_selection[key]) {
+ flag_available = true;
+ }
+ }
+ if (flag_available == false) {
+ vec_param_names.push_back(key);
+ }
+
}
else {
// map_cmd_selection[key] = "";
@@ -680,6 +692,9 @@ void MainWindow::set_tree_view_user() {
if (users_root.length() != 0) {
map_cmd_selection["GRUB_SUPERUSERS"] = users_root;
}
+ else {
+ map_cmd_selection["GRUB_SUPERUSERS"] = "";
+ }
}
void MainWindow::set_init_data_user(std::map &map_temp) {
@@ -799,8 +814,17 @@ void MainWindow::set_add_data_melody(Gtk::TreeModel::Row &row, bool flag, string
void MainWindow::remove_user() {
if (flag_validate_del_user && list_store_user->iter_is_valid(iter_user_del)) {
+ Gtk::TreeModel::Row row = *iter_user_del;
+ if(row) {
+ string name = row[m_columns_user.name] + "";
+ string key = "GRUB_PASSWORD[" + name + "]";
+ map_cmd_selection[key] = "";
+ }
list_store_user->erase(iter_user_del);
flag_validate_del_user = false;
+ info_status_app(info_box_ok_css);
+ imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU);
+ lblWarning->set_text("");
}
flag_validate_del_user = false;
}
@@ -809,11 +833,18 @@ void MainWindow::remove_melody() {
if (flag_validate_del_melody && list_store_melody->iter_is_valid(iter_melody_del)) {
list_store_melody->erase(iter_melody_del);
flag_validate_del_melody = false;
+ info_status_app(info_box_ok_css);
+ imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU);
+ lblWarning->set_text("");
}
flag_validate_del_melody = false;
}
void MainWindow::remove_line_user(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator& iter) {
+ treeViewKernel->get_selection()->unselect_all();
+ treeViewOTT->get_selection()->unselect_all();
+ treeViewIPT->get_selection()->unselect_all();
+ treeViewMelody->get_selection()->unselect_all();
iter_user_del = iter;
flag_validate_del_user = true;
bool flag_error = false;
@@ -825,7 +856,7 @@ void MainWindow::remove_line_user(const Gtk::TreeModel::Path&, const Gtk::TreeMo
Gtk::TreeModel::Row row = *iter;
name = row[m_columns_user.name] + "";
password = row[m_columns_user.password] + "";
- if (name.length() == 0 && password.length() == 0) {
+ if (name.length() == 0 || password.length() == 0) {
flag_error = true;
break;
}
@@ -843,16 +874,22 @@ void MainWindow::remove_line_user(const Gtk::TreeModel::Path&, const Gtk::TreeMo
}
void MainWindow::remove_line_melody(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator& iter) {
+ treeViewKernel->get_selection()->unselect_all();
+ treeViewOTT->get_selection()->unselect_all();
+ treeViewIPT->get_selection()->unselect_all();
+ treeViewUser->get_selection()->unselect_all();
iter_melody_del = iter;
flag_validate_del_melody = true;
string code_melodyes = "";
+ string melody_title = "";
bool flag_error = false;
Glib::RefPtr treeViewMelody_model = treeViewMelody->get_model();
Gtk::TreeModel::Children children = treeViewMelody_model->children();
for(Gtk::TreeModel::iterator iter = children.begin(); iter != children.end(); ++iter) {
Gtk::TreeModel::Row row = *iter;
code_melodyes = row[m_columns_melody.melody_code] + "";
- if (code_melodyes.length() == 0 && (row[m_columns_melody.title] + "").length() == 0) {
+ melody_title = row[m_columns_melody.title] + "";
+ if (code_melodyes.length() == 0 || melody_title.length() == 0) {
flag_error = true;
break;
}