diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index aea15cc..9ad55c1 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -88,7 +88,6 @@ void MainWindow::settings(){ lblReg->set_sensitive(false); lblZone->set_sensitive(false); lblTimeZone->set_sensitive(false); - lblDateTimeSettingGlob->set_sensitive(false); lblSynchronizebChkGLob->set_sensitive(false); cbDhcp->set_sensitive(false); txtNtpServer->set_sensitive(false); @@ -122,7 +121,7 @@ void MainWindow::lacalization(){ cbDhcp->append(_("DHCP")); cbDhcp->append(_("Manual")); cbDhcp->append(_("Disabled")); - lblDateTimeSetting->set_text(_("Local Configuration")); + lblDateTimeSetting->set_text(_("Current date and time")); lblHead->set_text(_("Settings the date and time")); lblTime->set_text(_("Time")); lblData->set_text(_("Date")); @@ -130,7 +129,6 @@ void MainWindow::lacalization(){ lblReg->set_text(_("Region")); lblZone->set_text(_("Zone")); lblSynchronizeBtn->set_text(_("Sync by")); - lblDateTimeSettingGlob->set_text(_("Global customization")); this->set_title(_("ubl-settings-datetime")); windowsNnpClose->set_title(_("Warning!")); mess_sudo->set_title(_("Warning!")); @@ -168,7 +166,6 @@ void MainWindow::flag_block_gui(){ txtNtpServer->set_sensitive(false); } if (flag_update==true){ - lblDateTimeSettingGlob->set_sensitive(false); txtNtpServer->set_sensitive(false); cbDhcp->set_sensitive(false); } @@ -215,7 +212,6 @@ void MainWindow::get_builder(){ //builder->get_widget("lblSynchronizebChk",_lblSynchronizebChk); builder->get_widget("lblSynchronizebChkGLob",lblSynchronizebChkGLob); builder->get_widget("lblSynchronizeBtn",lblSynchronizeBtn); - builder->get_widget("lblDateTimeSettingGlob",lblDateTimeSettingGlob); builder->get_widget("lblTimeBios",lblTimeBios); builder->get_widget("btnHardwareTime",btnHardwareTime); builder->get_widget("mess_sudo",mess_sudo); @@ -279,6 +275,8 @@ void MainWindow::download_globl_cfg(){ void MainWindow::download_local_cfg(){ string cmd = "/usr/bin/ubconfig --default --source system get clock ZONE"; this->fill_in_reg_zone(cmd); + this->update_hour_minute(); + this->update_calendar(); } void MainWindow::save_local_cfg(){ @@ -401,11 +399,10 @@ bool MainWindow::check_ntp(string &str_ntp){ ((str_ntp.length()-index_str_ntp_2)<=3)) { string simvol; bool flag_error=false; - char char_ntp; + char char_ntp[1]={0}; for (size_t i = 0; i < str_ntp.size(); i++){ flag_error=false; - cout << str_ntp[i] << endl; - char_ntp = char(str_ntp[i]); + char_ntp[0] = str_ntp[i]; cout << char_ntp << endl; for (int index=0;index<11;index++){ @@ -415,9 +412,9 @@ bool MainWindow::check_ntp(string &str_ntp){ else{ simvol = to_string(index); } - cout << (simvol==to_string(char_ntp)) << endl; - cout << simvol << " " << to_string(char_ntp) << endl; - if (simvol==to_string(char_ntp)){ + cout << (simvol==char_ntp) << endl; + cout << simvol << " " << char_ntp << endl; + if (simvol==char_ntp){ flag_error=false; break; @@ -678,7 +675,6 @@ void MainWindow::get_config(){ this->read_file(); this->update_hour_minute(); this->update_calendar(); - this->entry_dhcp_mess(); } diff --git a/source/ubl-settings-datetime.h b/source/ubl-settings-datetime.h index 0e2640b..e2b6b1c 100644 --- a/source/ubl-settings-datetime.h +++ b/source/ubl-settings-datetime.h @@ -71,7 +71,6 @@ class MainWindow : public Gtk::ApplicationWindow { Gtk::Label *lblSynchronizebChk; Gtk::Label *lblSynchronizebChkGLob; Gtk::Label *lblSynchronizeBtn; - Gtk::Label *lblDateTimeSettingGlob; Gtk::Label *lblTimeBios; Gtk::Label *lblSave; Gtk::Label *lblDownload; diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 6ef784d..dbad9a0 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -450,150 +450,13 @@ Format: DD.MM.YYYY 3 - - - True - False - 5 - 10 - 5 - 10 - 6 - 0.019999999552965164 - in - - - True - False - - - True - False - - - False - True - 1 - - - - - True - False - 8 - 5 - 8 - 5 - 6 - 13 - Region - 0 - - - False - True - 2 - - - - - True - False - 5 - 5 - 5 - 5 - 6 - 13 - - - False - True - 3 - - - - - True - False - 10 - 5 - 10 - 5 - 6 - 13 - Area - 0 - - - False - True - 4 - - - - - True - False - 5 - 5 - 5 - 5 - 6 - 13 - - - False - True - 5 - - - - - 5 - True - False - - - False - True - 6 - - - - - True - False - - - False - True - 7 - - - - - - - True - False - Time Zone - - - - - False - True - 5 - - True False - Local Configuration + Current date and time @@ -633,25 +496,6 @@ Format: DD.MM.YYYY 5 5 vertical - - - True - False - start - 5 - 5 - 5 - 5 - 6 - 6 - Synchronize via NTP: - - - False - True - 0 - - True @@ -703,10 +547,10 @@ Format: DD.MM.YYYY - + True False - Global customization + Synchronize via NTP: @@ -723,6 +567,143 @@ Format: DD.MM.YYYY 2 + + + True + False + 5 + 10 + 5 + 10 + 6 + 0.019999999552965164 + in + + + True + False + + + True + False + + + False + True + 1 + + + + + True + False + 8 + 5 + 8 + 5 + 6 + 13 + Region + 0 + + + False + True + 2 + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 13 + + + False + True + 3 + + + + + True + False + 10 + 5 + 10 + 5 + 6 + 13 + Area + 0 + + + False + True + 4 + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 13 + + + False + True + 5 + + + + + 5 + True + False + + + False + True + 6 + + + + + True + False + + + False + True + 7 + + + + + + + True + False + Time Zone + + + + + False + True + 3 + + False diff --git a/ubl-settings-datetime_ru.po b/ubl-settings-datetime_ru.po index f28ed5e..323798f 100644 --- a/ubl-settings-datetime_ru.po +++ b/ubl-settings-datetime_ru.po @@ -52,8 +52,8 @@ msgstr "OK" msgid "Settings the date and time" msgstr "Настройки даты и времени" -msgid "Local Configuration" -msgstr "Локальная настройка" +msgid "Current date and time" +msgstr "Текущие дата и время" msgid "Global customization" msgstr "Глобальная настройка"