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 "По умолчанию"