From 159b073c208cfab88d7fa19f4921db57251cd46c Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Mon, 13 Mar 2023 10:54:43 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=80=D0=B5=D0=B6=D0=B8=D0=BC=20=D0=B1=D0=BB?= =?UTF-8?q?=D0=BE=D0=BA=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B8=20gui=20=D0=B1?= =?UTF-8?q?=D0=B5=D0=B7=20root?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-datetime.cc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index 1abc5f3..8b452e7 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -75,6 +75,10 @@ void MainWindow::settings() { this->download_local_cfg(); } else { + lblHW->set_sensitive(false); + cbHw->set_sensitive(false); + boxButton->set_sensitive(false); + boxSave->set_sensitive(false); btnDownload->set_sensitive(false); numTimeHrs->set_sensitive(false); numTimeMin->set_sensitive(false); @@ -398,23 +402,23 @@ void MainWindow::info_warning_error(int mess) { warning_info = 0; string mess_error = ""; if (mess == 0) { - mess_error = _("Local configuration reading error") + cmd_error; + mess_error = string(_("Local configuration reading error")) + " " + cmd_error; lblWarning->set_text(mess_error); } else if (mess == 1) { - mess_error = _("Global configuration read error") + cmd_error; + mess_error = string(_("Global configuration read error")) + " " + cmd_error; lblWarning->set_text(mess_error); } else if (mess == 2) { - mess_error = _("Local configuration write error") + cmd_error; + mess_error = string(_("Local configuration write error")) + " " + cmd_error; lblWarning->set_text(mess_error); } else if (mess == 3) { - mess_error = _("Global configuration write error") + cmd_error; + mess_error = string(_("Global configuration write error")) + " " + cmd_error; lblWarning->set_text(mess_error); } else if (mess == 4) { - mess_error = _("Error saved local and global configuration") + cmd_error; + mess_error = string(_("Error saved local and global configuration")) + " " + cmd_error; lblWarning->set_text(mess_error); } cmd_error = ""; @@ -465,10 +469,10 @@ void MainWindow::entry_hardware_clock_default(string &cmd_default) { int error = warning_info; struct Result obj_result_default = this->wrapper_call(cmd_default); if (obj_result_default.error == 0) { - if (obj_result_default.response.find("localtime") !=string::npos) { + if (obj_result_default.response.find("localtime") != string::npos) { cbHw->set_active(0); } - else if (obj_result_default.response.find("utc") !=string::npos) { + else if (obj_result_default.response.find("utc") != string::npos) { cbHw->set_active(1); } @@ -487,10 +491,10 @@ void MainWindow::entry_hardware_clock(string &cmd, string &cmd_default) { int error = warning_info; struct Result obj_result = this->wrapper_call(cmd); if (obj_result.error == 0) { - if (obj_result.response.find("localtime") !=string::npos) { + if (obj_result.response.find("localtime") != string::npos) { cbHw->set_active(0); } - else if (obj_result.response.find("utc") !=string::npos) { + else if (obj_result.response.find("utc") != string::npos) { cbHw->set_active(1); } else {