From f6bced3bed6c95ad06076322382f9662e4488432 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Fri, 3 Feb 2023 14:29:21 +0600 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=BB=D0=BE=D0=BA=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BE=D0=BA=D0=BD=D0=B0=20=D0=BE=D1=82=D0=BA=D0=BB?= =?UTF-8?q?=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20ntp,=20=D0=B8=D1=81?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=B5=D0=BD=20=D0=B1=D0=B0=D0=B3=20?= =?UTF-8?q?=D1=81=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=BE=D0=B9?= =?UTF-8?q?=20=D0=B0=D0=BA=D1=82=D0=B8=D0=B2=D0=BD=D1=8B=D1=85=20ntp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-datetime.cc | 9 +++++++-- source/ubl-settings-datetime.h | 1 + ubl-settings-datetime.glade | 10 +++++----- ubl-settings-datetime_ru.po | 9 +++++++++ 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index 74d5fa9..c669d2d 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -132,6 +132,9 @@ void MainWindow::lacalization(){ this->set_title(gettext("ubl-settings-datetime")); mess_dchp->set_title(gettext("Warning!")); lblTimeBios->set_text(gettext("Synchronize hardware time")); + lblBanerStopNtp->set_text(gettext("Active service detected\nAutomatic time and date synchronization service detected")); + lblNtpStop->set_text(gettext("Stop the synchronization service")); + lblNtpClose->set_text(gettext("Close")); //_lblSynchronizebChk->set_text(gettext("Synchronize via NTP")); } @@ -328,7 +331,9 @@ void MainWindow::event_entry_cbDhcp(){ } else if (activ_index==2){ txtNtpServer->set_sensitive(true); - txtNtpServer->set_text(""); + if (txtNtpServer->get_text().find("default")!=std::string::npos){ + txtNtpServer->set_text(""); + } string str_dhcp = this->call("/usr/bin/ubconfig get network NTPSERVERS"); if ((str_dhcp!="") && (str_dhcp!="(null)") && (str_dhcp.find("default")==std::string::npos)){ str_dhcp = str_dhcp.substr(str_dhcp.find("=")+1,str_dhcp.length()); @@ -578,7 +583,7 @@ void MainWindow::append_zone_glob(){ } } void MainWindow::wrapper_update_time_date(){ - string cmd = "pidof -q systemd-timesyncd ntpd chronyd"; + string cmd = "pidof systemd-timesyncd ntpd chronyd"; string response = this->call(cmd); if (response.length()==0){ this->update_time_date(); diff --git a/source/ubl-settings-datetime.h b/source/ubl-settings-datetime.h index 952baf1..dd8ff92 100644 --- a/source/ubl-settings-datetime.h +++ b/source/ubl-settings-datetime.h @@ -119,6 +119,7 @@ class MainWindow : public Gtk::ApplicationWindow { Gtk::Label *lblSynchronizeBtn; Gtk::Label *lblDateTimeSettingGlob; Gtk::Label *lblTimeBios; + Gtk::Label *lblBanerStopNtp; Gtk::Button *btnHardwareTime; Gtk::CheckButton *cbxSynchronizeNtp; Gtk::Window *windowsNnpClose; diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 7cab1a6..828918b 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -1040,7 +1040,7 @@ Format: DD.MM.YYYY - + True False 5 @@ -1049,8 +1049,8 @@ Format: DD.MM.YYYY 5 6 6 - Обнаружен активный сервис - автоматической синхронизации времени и даты + Active service detected +Automatic time and date synchronization service detected True @@ -1104,7 +1104,7 @@ Format: DD.MM.YYYY True False - Остановить сервис синхронизации + Stop the synchronization service False @@ -1156,7 +1156,7 @@ Format: DD.MM.YYYY True False - Закрыть + Close False diff --git a/ubl-settings-datetime_ru.po b/ubl-settings-datetime_ru.po index b837623..b6a015e 100644 --- a/ubl-settings-datetime_ru.po +++ b/ubl-settings-datetime_ru.po @@ -6,6 +6,15 @@ msgid "" msgstr "" +msgid "Stop the synchronization service" +msgstr "Остановить сервис синхронизации" + +msgid "Close" +msgstr "Закрыть" + +msgid "Active service detected\nAutomatic time and date synchronization service detected" +msgstr "Обнаружен активный сервис\nавтоматической синхронизации времени и даты" + msgid "By default" msgstr "По умолчанию"