diff --git a/source/load.cc b/source/load.cc index e336dce..e8a361b 100644 --- a/source/load.cc +++ b/source/load.cc @@ -4,6 +4,12 @@ namespace Lib_Load{ void Load::set_sections(string sections){ this->sections = sections; } + void Load::set_count_error(int count_error) { + process.set_count_error(count_error); + } + string Load::get_cmd_error() { + return process.get_cmd_error(); + } map& Load::get_load_data(std::map &map_temp, string str_flag_load) { string cmd = ""; string response = ""; @@ -26,5 +32,8 @@ namespace Lib_Load{ } return map_temp; } + int Load::get_count_error() { + return process.get_count_error(); + } } \ No newline at end of file diff --git a/source/load.h b/source/load.h index d7eb473..26aaf96 100644 --- a/source/load.h +++ b/source/load.h @@ -10,6 +10,9 @@ namespace Lib_Load{ My_Process::My_Process_call process = My_Process::My_Process_call(); public: void set_sections(string sections); + int get_count_error(); + void set_count_error(int count_error); + string get_cmd_error(); map& get_load_data(std::map &map_temp, string str_flag_load); }; diff --git a/source/save.cc b/source/save.cc index e9617e8..0c753f1 100644 --- a/source/save.cc +++ b/source/save.cc @@ -64,6 +64,18 @@ bool Save::check_save(string flag_save, string key_name) { return true; } +int Save::get_count_error() { + return process.get_count_error(); +} + +string Save::get_cmd_error() { + return process.get_cmd_error(); +} + +void Save::set_count_error(int count_error) { + process.set_count_error(count_error); +} + void Save::set_vec_params(vector& vec_param_names) { this->vec_param_names = &vec_param_names; } diff --git a/source/save.h b/source/save.h index e26f4ca..1730a80 100644 --- a/source/save.h +++ b/source/save.h @@ -19,6 +19,9 @@ public: void set_data_gui(std::map &map_gui); bool check_save(string flag_save, string key_name); bool get_state_save(); + int get_count_error(); + string get_cmd_error(); + void set_count_error(int count_error); void set_vec_params(vector& vec_param_names); void save(string sections, string str_flag_save) ; vector get_error(); diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index d596e64..c0bad27 100755 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -853,10 +853,9 @@ void MainWindow::info_status_app(string stule) { } void MainWindow::info_warning_error(int mess) { - if (obj_process_system.get_count_error() > 0 || obj_process_call.get_count_error() > 0) { + if (obj_load.get_count_error() > 0 || obj_save.get_count_error() > 0) { info_status_app("boxInfoMessError"); imgInfo->set_from_icon_name("com.ublinux.ubl-settings-bootloader.warning", Gtk::ICON_SIZE_MENU); - index_error = 0; string mess_error = ""; if (mess == 0) { mess_error = string(_("Local configuration reading error")) + str_cmd_error; @@ -879,6 +878,8 @@ void MainWindow::info_warning_error(int mess) { lblWarning->set_text(mess_error); } str_cmd_error = ""; + obj_load.set_count_error(0); + obj_save.set_count_error(0); } else { info_status_app("boxInfoMessOK"); diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index dc79fc7..ac0ca76 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -131,7 +131,6 @@ class MainWindow : public Gtk::ApplicationWindow { size_t size_kernel = 0; size_t size_IPT = 0; size_t size_OTT = 0; - int index_error = 0; Glib::RefPtr boxInfo; string str_cmd_error = ""; template