From 882ba03bd3cc9b42624ad7309a8cd36f2d0fe535 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Tue, 21 Mar 2023 17:24:40 +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=D0=B1=D0=B0=D0=B3=20=D1=81=20=D0=B1=D0=BB=D0=BE?= =?UTF-8?q?=D0=BA=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=BE=D0=B9=20ntp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-datetime.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index 147c6c1..206e2aa 100755 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -339,7 +339,9 @@ void MainWindow::event() { bool MainWindow::focus_ntp(GdkEventFocus* event) { if (event!=NULL){ } - this->focus_ntp_text(); + if (flag_ntp_edit == false) { + this->focus_ntp_text(); + } return true; } @@ -995,12 +997,13 @@ void MainWindow::save_Dhcp(string &cmd_default, string &cmd_dhcp, string &remove wrapper_system(cmd_dhcp, "&"); } else if (activ_index == 2) { - - if (this->focus_ntp_text()){ - string str_ntp = txtNtpServer->get_text(); - string cmd = cmd_set_ntp + str_ntp + "\""; - this->write_config(str_ntp, "dhcp"); - wrapper_system(cmd, "&"); + if (flag_ntp_edit == false) { + if (this->focus_ntp_text()){ + string str_ntp = txtNtpServer->get_text(); + string cmd = cmd_set_ntp + str_ntp + "\""; + this->write_config(str_ntp, "dhcp"); + wrapper_system(cmd, "&"); + } } }