diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index dd92c03..dfcee94 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -94,9 +94,6 @@ void MainWindow::settings(){ spbSecond->set_increments(1.0, 1.0); spbSecond->set_value(1); this->fill_in_view(); - - this->change_password_protecc(); - this->change_security_login(); this->set_active_boot_second(); this->str_last_launched_os = this->pars_last_launched_os(); vector os_control_list; @@ -422,10 +419,6 @@ void MainWindow::get_builder() { builder->get_widget("overHead", overHead); builder->get_widget("lblDownloadMode", lblDownloadMode); builder->get_widget("cmbDownloadMode", cmbDownloadMode); - builder->get_widget("chbSecurityLogin", chbSecurityLogin); - builder->get_widget("chbPasswordProtecc", chbPasswordProtecc); - builder->get_widget("entryPasswordProtecc", entryPasswordProtecc); - builder->get_widget("entrySecurityLogin", entrySecurityLogin); #ifdef WEBKIT_FOUND builder->get_widget("wndWeb", wndWeb); #endif @@ -492,13 +485,7 @@ void MainWindow::localization(){ btnLoad->set_label(str_load); this->set_title(name_app); // Todo: check - entrySecurityLogin->set_tooltip_text(loading_animation_without); - entryPasswordProtecc->set_tooltip_text(user_password_configuration_edit_mode); - chbSecurityLogin->set_tooltip_text(loading_animation_without); - chbPasswordProtecc->set_tooltip_text(user_password_configuration_edit_mode); lblDownloadMode->set_text(boot_screen_display_mode); - chbSecurityLogin->set_label(boot_menu_user_name); - chbPasswordProtecc->set_label(boot_menu_user_password); cmbDownloadMode->append(loading_animation_with); cmbDownloadMode->append(loading_animation_without); cmbDownloadMode->append(no_loading_animation); @@ -529,43 +516,6 @@ vector MainWindow::get_setting_entry_all(string key, std::map get_text().length() == 0) { - info_status_app(info_box_error_css); - imgInfo->set_from_icon_name(icon_warning, Gtk::ICON_SIZE_MENU); - lblWarning->set_text(enter_password); - boxSave->set_sensitive(false); - } - else { - info_status_app(info_box_ok_css); - imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU); - lblWarning->set_text(""); - boxSave->set_sensitive(true); - string key = entryPasswordProtecc->get_text(); - if (key != "************") { - map_cmd_selection["GRUB_PASSWORD"] = key; - } - - } - return true; -} -bool MainWindow::focus_out_txt_login(GdkEventFocus*) { - if (entrySecurityLogin->get_text().length() == 0) { - info_status_app(info_box_error_css); - imgInfo->set_from_icon_name(icon_warning, Gtk::ICON_SIZE_MENU); - lblWarning->set_text(enter_login); - boxSave->set_sensitive(false); - } - else { - info_status_app(info_box_ok_css); - imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU); - lblWarning->set_text(""); - map_cmd_selection["GRUB_USER"] = entrySecurityLogin->get_text(); - boxSave->set_sensitive(true); - } - return true; -} - bool MainWindow::focus_out_txt_kernel(GdkEventFocus*) { auto selection_kernel = treeViewKernel->get_selection(); selection_kernel->unselect_all(); @@ -701,10 +651,6 @@ void MainWindow::event() { entryKernel->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_kernel)); entryIPT->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_IPT)); entryOTT->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_OTT)); - entrySecurityLogin->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_login)); - entryPasswordProtecc->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_password)); - chbPasswordProtecc->signal_toggled().connect([&]() {change_password_protecc();}); - chbSecurityLogin->signal_toggled().connect([&]() {change_security_login();}); if (this->check_root() == 0) { Glib::RefPtr treeViewKernelModel = treeViewKernel->get_model(); treeViewKernelModel->signal_row_changed().connect(sigc::mem_fun(*this, &MainWindow::item_selected_kernel)); @@ -958,23 +904,6 @@ bool MainWindow::gui_exit(GdkEventAny*) { return true; } -void MainWindow::change_security_login() { - bool index = chbSecurityLogin->get_active(); - if (index == false) { - entrySecurityLogin->set_sensitive(false); - entrySecurityLogin->set_text(""); - boxSave->set_sensitive(true); - info_status_app(info_box_ok_css); - imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU); - lblWarning->set_text(""); - } - else if (index == true) { - entrySecurityLogin->set_sensitive(true); - entrySecurityLogin->set_text(""); - boxSave->set_sensitive(true); - } -} - void MainWindow::get_default_load(std::map &map_temp) { std::map :: iterator iter_map_data; iter_map_data = map_temp.find("GRUB_DEFAULT"); @@ -992,27 +921,6 @@ void MainWindow::get_default_load(std::map &map_temp) { } } -void MainWindow::change_password_protecc() { - // Todo; - bool index = chbPasswordProtecc->get_active(); - if (index == false) { - entryPasswordProtecc->set_sensitive(false); - entryPasswordProtecc->set_text(""); - boxSave->set_sensitive(true); - info_status_app(info_box_ok_css); - imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU); - lblWarning->set_text(""); - } - else if (index == true) { - entryPasswordProtecc->set_sensitive(true); - entryPasswordProtecc->set_text(""); - boxSave->set_sensitive(true); - } - else { - boxSave->set_sensitive(true); - } -} - void MainWindow::set_active_boot_second() { spbSecond->set_sensitive(chbLoadVariantSelectionTimer->get_active()); lblInfoSeconds->set_sensitive(chbLoadVariantSelectionTimer->get_active()); diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index 802abb6..be5e10a 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -250,10 +250,7 @@ public: Gtk::Image *imgBG; Gtk::Overlay *overHead; Gtk::ComboBoxText *cmbDownloadMode; - Gtk::CheckButton *chbSecurityLogin; Gtk::CheckButton *chbPasswordProtecc; - Gtk::Entry *entrySecurityLogin; - Gtk::Entry *entryPasswordProtecc; Gtk::Label *lblHeadeWndWeb; Gtk::Label *lblwebHeaderName; @@ -382,11 +379,7 @@ public: bool focus_tree_view(GdkEventFocus *); bool check_flag_save(string flag_save); void set_download_mode(); - void change_password_protecc(); - bool focus_out_txt_login(GdkEventFocus *); - void change_security_login(); void get_default_load(std::map &map_temp); - bool focus_out_txt_password(GdkEventFocus *); void set_entry(Gtk::Entry *entry, std::map &map_temp, string key); void load_template(std::map *map_temp, string cmd); vector get_setting_entry_all(string key, std::map *map_temp); diff --git a/ubl-settings-bootloader.glade b/ubl-settings-bootloader.glade index 6120f8a..0908461 100644 --- a/ubl-settings-bootloader.glade +++ b/ubl-settings-bootloader.glade @@ -579,102 +579,6 @@ specified priority 2 - - - True - False - - - Boot menu user name: - True - True - False - 2 - 5 - 2 - 5 - 6 - 6 - True - - - False - True - 0 - - - - - True - True - 5 - 5 - 5 - 5 - 6 - 6 - - - True - True - 2 - - - - - False - True - 3 - - - - - True - False - - - Boot menu user password: - True - True - False - 2 - 5 - 2 - 5 - 6 - 6 - True - - - False - True - 0 - - - - - True - True - 5 - 5 - 5 - 5 - 6 - 6 - - - True - True - 2 - - - - - False - True - 4 - - True @@ -700,8 +604,6 @@ specified priority 70 True True - 5 - 5 in @@ -709,12 +611,8 @@ specified priority False - -1 True True - - - @@ -774,7 +672,7 @@ specified priority 5 5 5 - 6 + 3 6 @@ -846,8 +744,6 @@ specified priority 70 True True - 5 - 5 in @@ -855,7 +751,6 @@ specified priority False - -1 True True @@ -920,7 +815,7 @@ specified priority 5 5 5 - 6 + 3 6 @@ -1570,8 +1465,6 @@ specified priority - -