From ff69c6110c368512ec618cc0eb153280cb23870b Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 5 Apr 2023 14:11:20 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=B1=D0=B0=D0=B3=D0=B8=20=D1=81=20=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=BE=D0=BB=D0=B5=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-bootloader.cc | 22 ++++++++++++++-------- source/ubl-settings-bootloader.h | 1 + ubl-settings-bootloader.glade | 4 ++-- ubl-settings-bootloader_ru.po | 7 +++++-- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index 45faabd..18c06ab 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -319,7 +319,7 @@ void MainWindow::set_password_protec(string cmd = "", string cmd_remove = "") { } else if (index == 1) { key = entryPasswordProtecc->get_text(); - if (cmd.length() != 0) { + if (cmd.length() != 0 and key != "************") { entryPasswordProtecc->set_text(key); cmd = cmd + "\"" + key + "\""; wrapper_system(cmd, ""); @@ -333,7 +333,10 @@ void MainWindow::set_password_protec(string cmd = "", string cmd_remove = "") { else if (index == -1) { return; } - map_cmd_selection["GRUB_PASSWORD"] = key; + if (key!= "************") { + map_cmd_selection["GRUB_PASSWORD"] = key; + } + } void MainWindow::get_password_protec(string cmd, std::map &map_temp) { @@ -341,11 +344,10 @@ void MainWindow::get_password_protec(string cmd, std::map &map_ struct Result res_response = this->wrapper_call(cmd); if (res_response.error == 0) { str_replace_all(res_response.response, "\"",""); - // entryPasswordProtecc->set_text(res_response.response); if (res_response.response.length() != 0) { chbPasswordProtecc->set_active(1); map_temp["GRUB_PASSWORD"] = res_response.response; - entryPasswordProtecc->set_text(""); + entryPasswordProtecc->set_text("************"); entryPasswordProtecc->set_sensitive(true); } else{ @@ -497,7 +499,7 @@ void MainWindow::localization(){ lblInfoCommand->set_text(_("Command line parameters:")); lblInfoCommand1->set_text(_("Command line parameters:")); lblInfoCommand2->set_text(_("Command line parameters:")); - lblInfoDefaultDonw->set_text(_("Load screen display mode:")); + lblInfoDefaultDonw->set_text(_("Load default:")); lblInfoSeconds->set_text(_("Seconds")); lblLoadMenu->set_text(_("Download menu")); lblInfoInputTerminal->set_text(_("Terminal for input")); @@ -517,8 +519,8 @@ void MainWindow::localization(){ lblSecurityLogin->set_tooltip_text(gettext("User name to enter boot configuration editing mode")); lblDownloadMode->set_text(_("Load screen display mode:")); - lblSecurityLogin->set_text(_("Download menu user name:")); - lblPasswordProtec->set_text(_("Download menu user password:")); + lblSecurityLogin->set_text(_("Load menu user name:")); + lblPasswordProtec->set_text(_("Load menu user password:")); chbSecurityLogin->append(_("Not available")); chbSecurityLogin->append(_("Mine")); @@ -568,7 +570,11 @@ bool MainWindow::focus_out_txt_password(GdkEventFocus*) { } else { boxSave->set_sensitive(true); - map_cmd_selection["GRUB_PASSWORD"] = entryPasswordProtecc->get_text(); + string key = entryPasswordProtecc->get_text(); + if (key != "************") { + map_cmd_selection["GRUB_PASSWORD"] = key; + } + } return true; } diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index c4ea0b5..c6914e5 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -141,6 +141,7 @@ class MainWindow : public Gtk::ApplicationWindow { void set_row(Glib::RefPtr &list_store, int size, std::string name, bool flag_chbox); void get_builder(); void add_CSS(); + void show_pass(); void localization(); void event(); void settings(); diff --git a/ubl-settings-bootloader.glade b/ubl-settings-bootloader.glade index 4b3511b..d6bcd4a 100644 --- a/ubl-settings-bootloader.glade +++ b/ubl-settings-bootloader.glade @@ -486,7 +486,7 @@ specified priority 5 6 6 - Download menu user name: + Load menu user name: start 0 @@ -552,7 +552,7 @@ specified priority 5 6 6 - Download menu user password: + Load menu user password: start 0 diff --git a/ubl-settings-bootloader_ru.po b/ubl-settings-bootloader_ru.po index 7ea8135..f97b883 100644 --- a/ubl-settings-bootloader_ru.po +++ b/ubl-settings-bootloader_ru.po @@ -43,16 +43,19 @@ msgstr "Отсутствие анимации загрузки с выводом msgid "Lack of loading animation with the output of the abbreviated log" msgstr "Отсутствие анимации загрузки с выводом сокращенного журнала" -msgid "Download menu user name:" +msgid "Load menu user name:" msgstr "Имя пользователя меню загрузки:" msgid "Not available" msgstr "Отсутствует" +msgid "Load default:" +msgstr "Загрузка по умолчанию:" + msgid "User name to enter boot configuration editing mode" msgstr "Имя пользователя для входа в режим редактирования конфигурации загрузки" -msgid "Download menu user password:" +msgid "Load menu user password:" msgstr "Пароль пользователя меню загрузки:" #: source/ubl-settings-bootloader.cc:301