From fe6523216e14ada0ab489229a612358fe466455b Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Thu, 18 May 2023 10:57:36 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BC=D0=B8=D0=BD=D0=B8=D0=BC=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D1=80=D0=B0=D0=B7=D0=BC=D0=B5=D1=80=20=D0=BE?= =?UTF-8?q?=D0=BA=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- #ubl-settings-bootloader.glade# | 1978 +++++++++++++++++++++++++++++ source/ubl-settings-bootloader.cc | 70 +- source/ubl-settings-bootloader.h | 4 +- ubl-settings-bootloader.glade | 4 +- ubl-settings-bootloader_ru.po | 8 +- 5 files changed, 1999 insertions(+), 65 deletions(-) create mode 100644 #ubl-settings-bootloader.glade# diff --git a/#ubl-settings-bootloader.glade# b/#ubl-settings-bootloader.glade# new file mode 100644 index 0000000..b3c7b21 --- /dev/null +++ b/#ubl-settings-bootloader.glade# @@ -0,0 +1,1978 @@ + + + + + + + both + True + + + + + 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://wiki.ublinux.com/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 + + + True + False + 5 + 5 + 5 + 5 + 2 + ubl-settings-bootloader + + + + + + + + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 69 + com.ublinux.ubl-settings-bootloader + + + False + True + 0 + + + + + True + False + start + 5 + 5 + 5 + 5 + 5 + 5 + Running applications as a user with a +specified priority + + + + + + + + True + True + 1 + + + + + True + False + + + 1 + 1 + True + False + **** + 0.009999999776482582 + + + True + True + 0 + + + + + 1 + 1 + True + True + True + + + True + False + gtk-goto-last + + + + + + False + True + 1 + + + + + 1 + 1 + True + True + True + + + 1 + 1 + True + False + 0 + + + + + True + False + + + True + False + False + False + 4 + + + True + False + Load global configuration + + + + + + True + False + Load local configuration + + + + + + True + False + False + False + 4 + + + True + False + Help + + + + + + True + False + About + + + + + + True + False + False + False + 4 + + + True + False + Save to global and local configuration + + + + + + True + False + Save global configuration + + + + + + True + False + Save local configuration + + + + + + 650 + 500 + False + com.ublinux.ubl-settings-bootloader + + + True + False + vertical + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 25 + 1 + + + False + True + 0 + + + + + True + False + start + 5 + 5 + 5 + 5 + 5 + 5 + + + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + + + 81 + True + False + start + + + -1 + + + + + False + True + 1 + + + + + True + True + always + in + + + True + False + + + True + False + vertical + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + + + True + False + vertical + + + True + False + + + Boot selection menu timer + True + True + False + 3 + 5 + 3 + 5 + 5 + 5 + True + + + False + True + 0 + + + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Seconds + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + + + True + False + start + 5 + 5 + 5 + 5 + 5 + 5 + Default load + start + 0 + + + False + True + 0 + + + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + True + True + 2 + + + + + True + True + True + 5 + 10 + 5 + 10 + 5 + 5 + + + True + False + open-menu-symbolic + + + + + False + True + 3 + + + + + False + True + 1 + + + + + True + False + + + True + False + start + 5 + 5 + 5 + 5 + 5 + 5 + Load screen display mode: + start + 0 + + + False + True + 0 + + + + + True + False + 5 + 10 + 5 + 10 + 5 + 5 + + + True + True + 1 + + + + + False + True + 2 + + + + + True + False + 5 + 10 + 5 + 10 + 5 + 5 + 0.019999999552965164 + in + + + True + False + + + True + False + 5 + + + True + False + vertical + + + 65 + True + True + 3 + 5 + 3 + 5 + in + + + True + False + + + True + True + + + + + + + + + + False + True + 0 + + + + + + + True + True + 0 + + + + + True + False + vertical + + + True + True + True + 5 + 10 + 5 + 10 + 5 + 5 + + + True + False + list-add + + + + + False + True + 0 + + + + + True + True + True + 5 + 10 + 5 + 10 + 3 + 10 + + + True + False + gtk-remove + + + + + False + True + 1 + + + + + False + True + 1 + + + + + + + True + False + start + 5 + 5 + 5 + 5 + 5 + 5 + Boot Menu Users + start + + + + + False + True + 5 + + + + + True + False + 5 + 10 + 5 + 10 + 5 + 5 + 0.019999999552965164 + in + + + True + False + + + True + False + 5 + + + True + False + vertical + + + 65 + True + True + 5 + 5 + 5 + 5 + in + + + True + False + + + True + True + + + + + + + + + + False + True + 0 + + + + + + + True + True + 0 + + + + + True + False + vertical + + + True + True + True + 5 + 10 + 5 + 10 + 5 + 5 + + + True + False + list-add + + + + + False + True + 0 + + + + + True + True + True + 5 + 10 + 5 + 10 + 3 + 10 + + + True + False + gtk-remove + + + + + False + True + 1 + + + + + False + True + 1 + + + + + + + True + False + start + 5 + 5 + 5 + 5 + 5 + 5 + Ringtone at startup + start + + + + + False + True + 5 + + + + + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Download menu + + + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + + + True + False + vertical + + + 140 + True + True + 5 + 10 + 5 + 10 + 5 + 5 + in + + + True + False + + + True + True + + + + + + + + + + False + True + 0 + + + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 1 + 5 + Command line parameters: + + + False + True + 0 + + + + + True + True + 5 + 10 + 5 + 10 + 5 + 5 + + + True + True + 1 + + + + + False + True + 10 + + + + + + + + + True + False + start + 5 + 5 + 5 + 5 + 5 + 5 + Parameters passed to the kernel + start + + + + + False + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + + + True + False + vertical + + + 140 + True + True + 5 + 10 + 5 + 10 + 5 + 5 + in + + + True + False + + + True + True + + + + + + + + + + False + True + 1 + + + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 1 + 5 + Command line parameters: + + + False + True + 0 + + + + + True + True + 5 + 10 + 5 + 10 + 5 + 5 + + + True + True + 1 + + + + + False + True + 7 + + + + + + + + + True + False + start + 5 + 5 + 5 + 5 + 5 + 5 + Terminal for input + start + + + + + False + True + 2 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + + + True + False + vertical + + + 140 + True + True + 5 + 10 + 5 + 10 + 5 + 5 + in + + + True + False + + + True + True + + + + + + + + + + False + True + 0 + + + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 1 + 5 + Command line parameters: + + + False + True + 0 + + + + + True + True + 5 + 10 + 5 + 10 + 5 + 5 + + + True + True + 1 + + + + + False + True + 7 + + + + + + + + + True + False + start + 5 + 5 + 5 + 5 + 5 + 5 + Terminal for output + start + + + + + False + True + 3 + + + + + False + True + 5 + + + + + + + + + True + True + 2 + + + + + + + True + False + True + + + True + False + ubl-settings-bootloader + + + + + + + + True + False + 32 + com.ublinux.ubl-settings-bootloader + + + + + True + False + + + True + False + + + True + True + False + True + True + menu2 + none + + + True + False + + + True + False + 5 + 5 + 5 + 5 + Save + + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + + + + + + False + True + 0 + + + + + True + True + False + True + True + menu1 + none + + + True + False + open-menu-symbolic + + + + + False + True + 1 + + + + + + False + True + 0 + + + + + end + 1 + + + + + True + False + + + True + True + False + True + True + menu + none + + + True + False + + + True + False + 5 + 5 + 5 + 5 + Load + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + + + + + + False + True + 0 + + + + + + 2 + + + + + + + both + True + + + + + + + + both + True + + + + + + + + + + + + + + + False + btnOpenMenuOS + bottom + + + True + False + + + 0 + 0 + True + False + none + + + True + False + vertical + + + + + + + + True + True + 0 + + + + + 0 + 0 + True + False + none + True + + + True + False + vertical + + + 1 + 1 + True + True + True + + + True + False + start + 0 + gtk-goto-first + + + + + False + True + 0 + + + + + True + False + vertical + + + + + + False + True + 1 + + + + + + + False + True + 1 + + + + + + + False + Внимание! + center + dialog + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 50 + gtk-dialog-warning + + + True + True + 0 + + + + + 160 + True + False + start + center + 5 + 5 + 5 + 5 + 5 + 5 + 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 + 5 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + start + 10 + 5 + Would you like to read documentation in the Web? + True + 0 + + + + + + + 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 + + + + + + + True + False + True + + + True + False + ubl-settings-bootloader + + + + + + + + True + False + 32 + dialog-question-symbolic + + + + + + + 800 + 600 + False + True + True + com.ublinux.ubl-settings-datetime + + + + + + True + False + True + + + True + False + ubl-settings-bootloader + + + + + True + False + 32 + com.ublinux.ubl-settings-bootloader + 5 + + + + + + diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index 29b5162..0a29560 100644 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -230,13 +230,11 @@ void MainWindow::item_selected_kernel(const Gtk::TreeModel::Path&, const Gtk::Tr treeViewOTT->get_selection()->unselect_all(); treeViewUser->get_selection()->unselect_all(); treeViewMelody->get_selection()->unselect_all(); - if (flag_blocked_tree_view == false) { - if (this->intel_idle_cstate_check(size_kernel, list_store_kernel, "GRUB_CMDLINE_LINUX") == false) { - string str_flags = template_item_selected(size_kernel, list_store_kernel, "GRUB_CMDLINE_LINUX"); - map_cmd_selection["GRUB_CMDLINE_LINUX"] = str_flags; - // Utils::str_replace_all(str_flags, " ", ", "); - entryKernel->set_text(str_flags); - } + if (flag_blocked_tree_view == false) { + string str_flags = template_item_selected(size_kernel, list_store_kernel, "GRUB_CMDLINE_LINUX"); + map_cmd_selection["GRUB_CMDLINE_LINUX"] = str_flags; + // Utils::str_replace_all(str_flags, " ", ", "); + entryKernel->set_text(str_flags); } } @@ -246,12 +244,10 @@ void MainWindow::item_selected_OTT(const Gtk::TreeModel::Path&, const Gtk::TreeM treeViewUser->get_selection()->unselect_all(); treeViewMelody->get_selection()->unselect_all(); if (flag_blocked_tree_view == false) { - if (this->intel_idle_cstate_check(size_OTT, list_store_OTT, "GRUB_TERMINAL_OUTPUT") == false) { - string str_flags = template_item_selected(size_OTT, list_store_OTT, "GRUB_TERMINAL_OUTPUT"); - map_cmd_selection["GRUB_TERMINAL_OUTPUT"] = str_flags; - // Utils::str_replace_all(str_flags, " ", ", "); - entryOTT->set_text(str_flags); - } + string str_flags = template_item_selected(size_OTT, list_store_OTT, "GRUB_TERMINAL_OUTPUT"); + map_cmd_selection["GRUB_TERMINAL_OUTPUT"] = str_flags; + // Utils::str_replace_all(str_flags, " ", ", "); + entryOTT->set_text(str_flags); } } @@ -261,12 +257,10 @@ void MainWindow::item_selected_IPT(const Gtk::TreeModel::Path&, const Gtk::TreeM treeViewUser->get_selection()->unselect_all(); treeViewMelody->get_selection()->unselect_all(); if (flag_blocked_tree_view == false) { - if (this->intel_idle_cstate_check(size_IPT, list_store_IPT, "GRUB_TERMINAL_INPUT") == false) { - string str_flags = template_item_selected(size_IPT, list_store_IPT, "GRUB_TERMINAL_INPUT"); - map_cmd_selection["GRUB_TERMINAL_INPUT"] = str_flags; - // Utils::str_replace_all(str_flags, " ", ", "); - entryIPT->set_text(str_flags); - } + string str_flags = template_item_selected(size_IPT, list_store_IPT, "GRUB_TERMINAL_INPUT"); + map_cmd_selection["GRUB_TERMINAL_INPUT"] = str_flags; + // Utils::str_replace_all(str_flags, " ", ", "); + entryIPT->set_text(str_flags); } } @@ -323,44 +317,6 @@ void MainWindow::set_download_mode() { map_cmd_selection["GRUB_BOOT_SILENT"] = key; } -bool MainWindow::intel_idle_cstate_check(int size, Glib::RefPtr &list_store, string key) { - string cmds_old = map_cmd_selection[key]; - string cmds = ""; - string param = ""; - int index_1 = -1; - int index_4 = -1; - bool active = false; - for (int index = 0; index < size; index++) { - Gtk::TreeModel::Row row = list_store->children()[index]; - if(row) { - param = row[m_columns.name] + ""; - active = row[m_columns.check_button]; - if (param == "intel_idle.max_cstate=1" && active == true) { - index_1 = index; - } - else if (param == "intel_idle.max_cstate=4" && active == true) { - index_4 = index; - } - } - } - if (index_1 != -1 && index_4 != -1) { - if (cmds_old.find("intel_idle.max_cstate=1") == string::npos) { - Gtk::TreeModel::Row row = list_store->children()[index_4]; - row[m_columns.check_button] = false; - return true; - } - else if (cmds_old.find("intel_idle.max_cstate=4") == string::npos) { - Gtk::TreeModel::Row row = list_store->children()[index_1]; - row[m_columns.check_button] = false; - return true; - } - else { - return false; - } - } - return false; -} - string MainWindow::template_item_selected(int size, Glib::RefPtr &list_store, string key) { string cmds_old = map_cmd_selection[key]; string cmds = ""; diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index ce0c52a..6c7b31e 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -63,7 +63,7 @@ void me_thread(string cmd); #define cancel _("Cancel") #define always_redirect _("Always redirect") #define boot_screen_display_mode _("Boot screen display mode:") -#define no_loading_animation _("No loading animation, full log") +#define no_loading_animation _("No loading animation,\nfull log") #define boot_menu_user_name _("Boot menu user name:") #define boot_menu_user_password _("Boot menu user password:") #define last_successful_upload _("Last successful upload") @@ -73,7 +73,7 @@ void me_thread(string cmd); #define user_password_configuration_edit_mode _("User password to enter boot configuration edit mode") #define loading_animation_with _("Loading animation with the magazine") #define loading_animation_without _("Loading animation without a magazine") -#define lack_loading_animation _("Lack of loading animation with the output of the abbreviated log") +#define lack_loading_animation _("Lack of loading animation with the\noutput of the abbreviated log") #define web_url _("https://wiki.ublinux.com") #define enter_password _("Enter your password") #define enter_login _("Enter login") diff --git a/ubl-settings-bootloader.glade b/ubl-settings-bootloader.glade index 8b01366..64bf3da 100644 --- a/ubl-settings-bootloader.glade +++ b/ubl-settings-bootloader.glade @@ -283,8 +283,8 @@ specified priority - 760 - 560 + 650 + 500 False com.ublinux.ubl-settings-bootloader diff --git a/ubl-settings-bootloader_ru.po b/ubl-settings-bootloader_ru.po index 47cb711..d2ed953 100644 --- a/ubl-settings-bootloader_ru.po +++ b/ubl-settings-bootloader_ru.po @@ -205,8 +205,8 @@ msgstr "Терминал для вывода" #: source/ubl-settings-bootloader.h:75 source/ubl-settings-bootloader.h:74 #: source/ubl-settings-bootloader.cc:451 -msgid "Lack of loading animation with the output of the abbreviated log" -msgstr "Отсутствие анимации загрузки с выводом сокращенного журнала" +msgid "Lack of loading animation with the\noutput of the abbreviated log" +msgstr "Отсутствие анимации загрузки с\nвыводом сокращенного журнала" #, fuzzy msgid "Last Successful Download" @@ -294,8 +294,8 @@ msgid "Maximum performance, power management" msgstr "Максимальная производительность, управление питанием" #: source/ubl-settings-bootloader.h:65 source/ubl-settings-bootloader.h:64 -msgid "No loading animation, full log" -msgstr "Отсутствие анимации загрузки с выводом журнала" +msgid "No loading animation,\nfull log" +msgstr "Отсутствие анимации загрузки\nс выводом журнала" #: source/ubl-settings-bootloader.cc:444 source/ubl-settings-bootloader.cc:446 msgid "Not available"