From 6fc59b69641e386f6e9b09eec8c8b60a30bc980d Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Tue, 25 Apr 2023 11:14:39 +0600 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=BD=D1=8B=D0=B5=20css=20=D0=B2=D1=8B=D0=BD=D0=B5=D1=81=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=B2=20=D0=BE=D1=82=D0=B4=D0=B5=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D1=8B=D0=B9=20=D1=84=D0=B0=D0=B9=D0=BB?= 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 | 3 ++- 2 files changed, 13 insertions(+), 12 deletions(-) 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 {