diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index 833c202..e7207ba 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -112,7 +112,7 @@ void MainWindow::settings(){ btnLoad->set_sensitive(false); btnSave->set_sensitive(false); imgInfo->set_from_icon_name(icon_warning, Gtk::ICON_SIZE_MENU); - info_status_app("boxInfoMessError"); + info_status_app(info_box_error_css); lblWarning->set_text(program_as_root); this->set_active_boot_second(); this->fill_in_view(); @@ -537,13 +537,13 @@ vector MainWindow::get_setting_entry_all(string key, std::map get_text().length() == 0) { - info_status_app("boxInfoMessError"); + 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("boxInfoMessOK"); + 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); @@ -557,13 +557,13 @@ bool MainWindow::focus_out_txt_password(GdkEventFocus*) { } bool MainWindow::focus_out_txt_login(GdkEventFocus*) { if (entrySecurityLogin->get_text().length() == 0) { - info_status_app("boxInfoMessError"); + 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("boxInfoMessOK"); + 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(); @@ -684,7 +684,7 @@ void MainWindow::change_security_login() { entrySecurityLogin->set_sensitive(false); entrySecurityLogin->set_text(""); boxSave->set_sensitive(true); - info_status_app("boxInfoMessOK"); + info_status_app(info_box_ok_css); imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU); lblWarning->set_text(""); } @@ -719,7 +719,7 @@ void MainWindow::change_password_protecc() { entryPasswordProtecc->set_sensitive(false); entryPasswordProtecc->set_text(""); boxSave->set_sensitive(true); - info_status_app("boxInfoMessOK"); + info_status_app(info_box_ok_css); imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU); lblWarning->set_text(""); } @@ -977,14 +977,14 @@ void MainWindow::template_open_browser() { index_error = system(cmd.c_str()); } void MainWindow::info_status_app(string stule) { - boxInfo->remove_class("boxInfoMessOK"); - boxInfo->remove_class("boxInfoMessError"); + boxInfo->remove_class(info_box_ok_css); + boxInfo->remove_class(info_box_error_css); boxInfo->add_class(stule); } void MainWindow::info_warning_error(int mess) { if (obj_load.get_count_error() > 0 || obj_save.get_count_error() > 0) { - info_status_app("boxInfoMessError"); + info_status_app(info_box_error_css); imgInfo->set_from_icon_name(icon_warning, Gtk::ICON_SIZE_MENU); string mess_error = ""; if (mess == 0) { @@ -1012,7 +1012,7 @@ void MainWindow::info_warning_error(int mess) { obj_save.set_count_error(0); } else { - info_status_app("boxInfoMessOK"); + info_status_app(info_box_ok_css); imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU); if (mess == 0) { lblWarning->set_text(local_load_ok); diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index 1b091da..730095f 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -117,7 +117,8 @@ void me_thread(string cmd); #define path_img_head_background "/usr/share/ubl-settings-bootloader/images/logo-background.png" #define cmd_pars_list_os "/usr/lib/ublinux/scripts/grub-functions exec_get_all_menuentry" #define cmd_last_launched_os "/usr/lib/ublinux/scripts/grub-functions exec_get_last_menuentry" - +#define info_box_ok_css "boxInfoMessOK" +#define info_box_error_css "boxInfoMessError" class CmdArgParser : public Glib::OptionGroup {