|
|
|
|
@ -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 <string, string> &map_temp) {
|
|
|
|
|
@ -341,11 +344,10 @@ void MainWindow::get_password_protec(string cmd, std::map <string, string> &map_
|
|
|
|
|
struct Result<string> 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;
|
|
|
|
|
}
|
|
|
|
|
|