From 90f957b99e665b520b77745f02c31cb6e77e4313 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Thu, 26 Jan 2023 12:44:56 +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=D1=8B=20=D0=B1=D0=B0=D0=B3=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 1 + bg_top.png | Bin 0 -> 7400 bytes source/ubl-settings-datetime.cc | 97 ++-- source/ubl-settings-datetime.h | 8 +- style.css | 3 +- ubl-settings-datetime.glade | 764 +++++++++++++++----------------- ubl-settings-datetime_ru.po | 8 +- 7 files changed, 442 insertions(+), 439 deletions(-) create mode 100644 bg_top.png diff --git a/Makefile b/Makefile index 376e6da..e1f25a0 100644 --- a/Makefile +++ b/Makefile @@ -109,6 +109,7 @@ install: check uninstall @install -Dm644 -t /usr/share/${PKGNAME}/css/ style.css @install -Dm644 -t /usr/share/${PKGNAME}/images/ ${PKGNAME}.svg @install -Dm644 -t /usr/share/${PKGNAME}/images/ ${PKGNAME}.png + @install -Dm644 -t /usr/share/${PKGNAME}/images/ bg_top.png @gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ @update-desktop-database --quiet 2>/dev/null @touch /usr/share/applications diff --git a/bg_top.png b/bg_top.png new file mode 100644 index 0000000000000000000000000000000000000000..7feeb92ae255f1a0f3cda83b20e873e60f5cc8a3 GIT binary patch literal 7400 zcmW+*1ymH@7hVKGLIeb91f)R_M9KvuR&wc-QbGYGWsxP7?uI4YMVD^r4yl!pl@f62 zT0&Sty8iR~&p9*ioS8Fo-@EtD{l5FXC_Npu+Y~GmAQ0%bhPtW&FkS;E(Phl8pd!lkUdrR_@RdsiM;1AE=2!T zxrpHf>=At9zNC}7fhF6`$>0#h7-KTVH&*PHH%^k8P9uqk>ySz5g5J%WB_}S1tqvzt`92k;V;}N_)f7V>+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8Pn9H*Ts0_SI3Q{~2smkF=?{Cq25dR<;vimrJcqo3Y+MNVM^<~vCGVr>Pg%AO|8kUp2dp=v7t0{i0QRuN0 zYviJ}DZKiDjZE?KUrO-f0wS&*uyf>AGXRiAWwKB(*|8VNo?t}+`c};})z;w|Nxey% z%%VU!#jk}-&bLTz)|EE(jV5>LMSE$NDZzm?L)OSf4@nj$4fz;RT)lV>mKH+0Lm<4u z)uX$21`il{KQtkL4Gkcg|3UEUnoorDw(lFvIlDFJnq%wm#Yo>_ z5)aJEwBOA1B1k9Q;Xf)Til{5DY?|b}H@oK(JK=0xRAkV}%lZiJHwoJVmM2U<`nr&r zi(CQz`Hl{?bJ_&e@ckcyvYAXD9b~w!b&pd~$dn@WKVE~?M&Qa^?n>X(Ox9|Eoyf#{ z`1!@``IIS_31M1d27LFhyY~FYN1jhY`$ABFpdE_CSy$`PzpRwb$){ol9>A;2;NCTpyTA}set_tooltip_text(gettext("Date of\nFormat: DD.MM.YYYY")); - _lblSynchronizebChk->set_text(gettext("Synchronize via NTP")); + _lblSynchronizebChkGLob->set_text(gettext("Synchronize via NTP")); _cbDhcp->append(gettext("DHCP")); _cbDhcp->append(gettext("Manually")); _lblDateTimeSetting->set_text(gettext("Settings the date and time")); - _lblNtpServer1->set_text(gettext("Settings the date and time")); + //_lblNtpServer1->set_text(gettext("Settings the date and time")); _lblTime->set_text(gettext("Time")); _lblData->set_text(gettext("Date")); _lblTimeZone->set_text(gettext("Time zone")); @@ -90,12 +90,12 @@ void MainWindow::lacalization(){ _lblRegGlob->set_text(gettext("Region")); _lblZone1Glob->set_text(gettext("Zone")); _lblTimeZoneGlob->set_text(gettext("Time zone")); - _lblSynchronizeBtn->set_text(gettext("Sync by")); + _lblSynchronizeBtn->set_text(gettext("Apply local date and time settings")); _lblDateTimeSettingGlob->set_text(gettext("Setting date and time in global configuration")); this->set_title(gettext("ubl-settings-datetime")); _mess_dchp->set_title(gettext("Warning!")); _lblTimeBios->set_text(gettext("Synchronize hardware time")); - _lblTimeBiosGlob->set_text(gettext("Synchronize hardware time")); + _lblSynchronizebChk->set_text(gettext("Synchronize via NTP")); } void MainWindow::flag_block_gui(){ @@ -114,14 +114,15 @@ void MainWindow::flag_block_gui(){ _cbDhcp->set_sensitive(false); } if (flag_ntp==true){ - _cbxSynchronizeNtp->set_sensitive(false); + _cbxSynchronizeNtpGlob->set_sensitive(false); _cbDhcp->set_sensitive(false); _txtNtpServer->set_sensitive(false); + _cbxSynchronizeNtp->set_sensitive(false); } if (flag_update==true){ _lblDateTimeSettingGlob->set_sensitive(false); - _lblSynchronizebChk->set_sensitive(false); - _cbxSynchronizeNtp->set_sensitive(false); + _lblSynchronizebChkGLob->set_sensitive(false); + _cbxSynchronizeNtpGlob->set_sensitive(false); _lblTimeZoneGlob->set_sensitive(false); _lblRegGlob->set_sensitive(false); _cbRegionGlob->set_sensitive(false); @@ -146,7 +147,7 @@ void MainWindow::get_builder(){ builder->get_widget("btnUpdateDateTime", _btnUpdateDateTime); builder->get_widget("btnChooseDate", _btnChooseDate); builder->get_widget("btnMessClose", _btnMessClose); - builder->get_widget("cbxSynchronizeNtp", _cbxSynchronizeNtp); + builder->get_widget("cbxSynchronizeNtpGlob", _cbxSynchronizeNtpGlob); builder->get_widget("popCalendar", _popCalendar); builder->get_widget("numTimeHrs", _numTimeHrs); builder->get_widget("numTimeMin", _numTimeMin); @@ -171,20 +172,22 @@ void MainWindow::get_builder(){ builder->get_widget("lblZone1Glob",_lblZone1Glob); builder->get_widget("lblTimeZoneGlob",_lblTimeZoneGlob); 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("lblTimeBiosGlob",_lblTimeBiosGlob); - - + builder->get_widget("btnHardwareTime",_btnHardwareTime); + builder->get_widget("cbxSynchronizeNtp",_cbxSynchronizeNtp); this->add_CSS(); } void MainWindow::event(){ + _cbxSynchronizeNtp->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_ntp_toggle)); + _btnHardwareTime->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::hardware_clock)); _btnMessClose->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::gui_mess_close)); //_cldrDate->signal_day_selected().connect(sigc::mem_fun(*this, &MainWindow::get_calendar)); - _cbxSynchronizeNtp->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_ntp_toggle)); + _cbxSynchronizeNtpGlob->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_ntp_toggle_glob)); _btnUpdateDateTime->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::update_time_date)); _btnChooseDate->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::calendar_show)); _cbDhcp->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::event_entry_cbDhcp)); @@ -196,6 +199,33 @@ void MainWindow::event(){ _cldrDate->signal_day_selected_double_click().connect(sigc::mem_fun(*this, &MainWindow::get_calendar)); } +void MainWindow::set_ntp_toggle(){ + bool flag = _cbxSynchronizeNtp->get_active(); + if (flag_ntp==true){ + } + else { + _numTimeHrs->set_sensitive(!flag); + _numTimeMin->set_sensitive(!flag); + _btnChooseDate->set_sensitive(!flag); + _txtDate->set_sensitive(!flag); + _lblTimeBios->set_sensitive(!flag); + } + string cmd = ""; + if (flag==false){ + cmd="systemctl --now disable systemd-timesyncd.service ntpd.service"; + system(cmd.c_str()); + } + else { + cmd = "systemctl --now enable systemd-timesyncd.service"; + system(cmd.c_str()); + } +} + + +void MainWindow::hardware_clock(){ + string cmd = "hwclock --systohc"; + system(cmd.c_str()); +} void MainWindow::gui_mess_close(){ _mess_dchp->hide(); @@ -288,7 +318,7 @@ void MainWindow::calendar_show(){ void MainWindow::enry_dhcp_mess(){ string str_dhcp = this->call("/usr/bin/ubconfig get network NTPSERVERS"); if ((str_dhcp!="") && (str_dhcp!="(null)")){ - _cbxSynchronizeNtp->set_active(1); + _cbxSynchronizeNtpGlob->set_active(1); str_dhcp = str_dhcp.substr(str_dhcp.find("=")+1,str_dhcp.length()); str_dhcp = str_dhcp.substr(0,str_dhcp.find("\n")); if (str_dhcp=="dhcp"){ @@ -305,10 +335,10 @@ void MainWindow::enry_dhcp_mess(){ _txtNtpServer->set_text(str_dhcp); } } - this->set_ntp_toggle(); + this->set_ntp_toggle_glob(); } else{ - _cbxSynchronizeNtp->set_active(0); + _cbxSynchronizeNtpGlob->set_active(0); _cbDhcp->set_sensitive(0); _txtNtpServer->set_sensitive(0); } @@ -322,9 +352,19 @@ void MainWindow::get_config(){ string str_ntp = this->call("systemctl status ntpd.service systemd-timesyncd.service | grep \"Active: active\""); if (str_ntp.length()<50) { _cbxSynchronizeNtp->set_active(false); + _numTimeHrs->set_sensitive(true); + _numTimeMin->set_sensitive(true); + _btnChooseDate->set_sensitive(true); + _txtDate->set_sensitive(true); + _lblTimeBios->set_sensitive(true); } else{ _cbxSynchronizeNtp->set_active(true); + _numTimeHrs->set_sensitive(false); + _numTimeMin->set_sensitive(false); + _btnChooseDate->set_sensitive(false); + _txtDate->set_sensitive(false); + _lblTimeBios->set_sensitive(false); } string read_reg_zon_cfg = this->call("/usr/bin/ubconfig get clock ZONE"); if ((read_reg_zon_cfg != "") && (read_reg_zon_cfg !="(null)")){ @@ -382,25 +422,15 @@ void MainWindow::enter_zone_glob(){ } } -void MainWindow::set_ntp_toggle(){ +void MainWindow::set_ntp_toggle_glob(){ bool flag = _cbxSynchronizeNtp->get_active(); - if (flag_datetime==true){ - } - else { - _numTimeHrs->set_sensitive(!flag); - _numTimeMin->set_sensitive(!flag); - _btnChooseDate->set_sensitive(!flag); - _txtDate->set_sensitive(!flag); - } - string cmd = ""; - if (flag==false){ - cmd="systemctl --now disable systemd-timesyncd.service ntpd.service"; - system(cmd.c_str()); + if (flag==true){ + } - else { - cmd = "systemctl --now enable systemd-timesyncd.service"; - system(cmd.c_str()); + else{ + } + } void MainWindow::append_region_zone(string region, string zone){ @@ -475,7 +505,7 @@ void MainWindow::append_zone_glob(){ void MainWindow::update_time_date(){ //this->enter_zone(); - bool flag = _cbxSynchronizeNtp->get_active(); + bool flag = _cbxSynchronizeNtpGlob->get_active(); string cmd = ""; if ((year!=0) && (month !=0) && (day !=0)){ string str_month = ""; @@ -500,8 +530,7 @@ void MainWindow::update_time_date(){ cmd = "date +%Y%m%d -s \"" + to_string(year)+ str_month+str_day+"\""; system(cmd.c_str()); - //cmd = "hwclock --systohc"; - //system(cmd.c_str()); + _txtDate->set_text(str_data); year=0; month=0; diff --git a/source/ubl-settings-datetime.h b/source/ubl-settings-datetime.h index 7d34d73..de8fc92 100644 --- a/source/ubl-settings-datetime.h +++ b/source/ubl-settings-datetime.h @@ -73,6 +73,8 @@ class MainWindow : public Gtk::ApplicationWindow { void update_calendar(); void read_file(); void parse_text_date(); + void hardware_clock(); + void set_ntp_toggle_glob(); vector split(const std::string &s, char delim); private: Glib::RefPtr builder; @@ -82,7 +84,7 @@ class MainWindow : public Gtk::ApplicationWindow { Gtk::ComboBoxText *_cbDhcp; Gtk::SpinButton *_numTimeHrs; Gtk::SpinButton *_numTimeMin; - Gtk::CheckButton *_cbxSynchronizeNtp; + Gtk::CheckButton *_cbxSynchronizeNtpGlob; Gtk::Box *_boxColor; Gtk::Entry *_txtDate; Gtk::ComboBoxText *_cbRegion; @@ -105,10 +107,12 @@ class MainWindow : public Gtk::ApplicationWindow { Gtk::Label *_lblZone1Glob; Gtk::Label *_lblTimeZoneGlob; Gtk::Label *_lblSynchronizebChk; + Gtk::Label *_lblSynchronizebChkGLob; Gtk::Label *_lblSynchronizeBtn; Gtk::Label *_lblDateTimeSettingGlob; Gtk::Label *_lblTimeBios; - Gtk::Label *_lblTimeBiosGlob; + Gtk::Button *_btnHardwareTime; + Gtk::CheckButton *_cbxSynchronizeNtp; std::map > time_reg_map; unsigned int year=0; unsigned int month=0; diff --git a/style.css b/style.css index f3bdf4e..12dcd25 100644 --- a/style.css +++ b/style.css @@ -1,4 +1,3 @@ .cssboxColor1{ - background-color: rgb(255, 255, 255); - background-size: 100% auto; + background-image: url("/usr/share/ubl-settings-datetime/images/bg_top.png"); } \ No newline at end of file diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index e7ac7c2..1c55ddb 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -79,29 +79,6 @@ - - 240 - 185 - False - btnChooseDate - bottom - none - - - True - True - 10 - 10 - 10 - 10 - 10 - 10 - 2023 - 1 - 10 - - - False Настройки даты и времени @@ -111,7 +88,7 @@ False vertical - + True False @@ -135,50 +112,62 @@ - - 145 + True False - 5 - 5 - 5 - 5 - 3 - 6 - Настройка даты и времени - True - 28 - 0 - - - - + + + True + False + + + True + False + vertical + + + 255 + True + False + + + False + True + 0 + + + + + False + True + 0 + + + + + True + True + 0 + + + + + True + False + + + False + True + 1 + + - False + True True 1 - - - 100 - True - False - 15 - 5 - 15 - 5 - - - - - - False - True - 2 - - False @@ -209,6 +198,38 @@ 6 5 vertical + + + True + True + False + 5 + 5 + 5 + 6 + 6 + True + + + 145 + True + False + 5 + 5 + 5 + 5 + 6 + 6 + Синхронизировать через NTP + + + + + False + True + 0 + + True @@ -218,7 +239,6 @@ 145 True False - 5 5 5 5 @@ -289,7 +309,7 @@ False True - 0 + 1 @@ -301,7 +321,6 @@ 145 True False - 5 5 5 5 @@ -319,7 +338,7 @@ - 221 + 191 True True Дата @@ -367,34 +386,13 @@ False True - 1 + 2 True False - - - 145 - True - False - 5 - 5 - 5 - 5 - 6 - 6 - Часовой пояс - True - 0 - - - False - True - 0 - - True @@ -407,18 +405,9 @@ - + True False - Регион - 5 - 5 - 5 - 5 - 6 - 6 - Регион - 0 False @@ -427,140 +416,27 @@ - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - - - False - True - 3 - - - - - True - False - Зона - 5 - 5 - 5 - 5 - 6 - 6 - Зона - 0 - - - False - True - 4 - - - - + True - False - 5 + True + True 5 5 5 - 6 - 6 - - - False - True - 5 - - - - - 5 - True - False - - - False - True - 6 - - - - - True - False - - - False - True - 7 - - - - - True - True - 2 - - - - - True - False - - - True - True - False - True - 145 True False - 5 - 5 - 5 - 5 - 6 - 5 + center + center Синхронизировать аппаратное время - False - True - 0 - - - - - True - False - - - False - True - 1 - - - - - True - False - - - False + True True - 2 + 3 @@ -571,39 +447,178 @@ - + True - True - True + False 5 + 5 5 6 6 + 0.019999999552965164 + in True False - center - center - + True False - media-playlist-repeat False True - 0 + 1 - + True False - center + Регион + 5 + 5 + 5 + 5 + 8 + Регион + 0 + + + False + True + 2 + + + + + True + False + 5 + 5 + 5 + 5 + 8 + + + False + True + 3 + + + + + True + False + Зона + 5 + 5 + 5 + 5 + 8 + Зона + 0 + + + False + True + 4 + + + + + True + False + 5 + 5 + 5 + 5 + 8 + + + False + True + 5 + + + + + 5 + True + False + + + False + True + 6 + + + + + True + False + + + False + True + 7 + + + + + + + True + False + Часовой пояс + + + + + False + True + 5 + + + + + True + True + True + 5 + 5 + 5 + 6 + + + True + False + center + center + + + True + False + 5 + 5 + 5 + 5 + media-playlist-repeat + + + False + True + 0 + + + + + True + False + center center - Синхронизировать + Применить локальную настройку даты и времени False @@ -617,7 +632,7 @@ False True - 4 + 6 @@ -657,7 +672,7 @@ 5 5 5 - 0.019999999552965164 + 0.05999999865889549 in @@ -671,7 +686,7 @@ True False - + True True False @@ -680,10 +695,9 @@ 5 5 6 - 6 True - + True False Синхронизировать через NTP @@ -701,7 +715,6 @@ True False 6 - 6 False @@ -720,7 +733,6 @@ 5 5 6 - 6 True @@ -736,193 +748,128 @@ - + True False + 5 + 5 + 5 + 6 + 0.019999999552965164 + in - - 145 - True - False - 5 - 5 - 5 - 5 - 6 - 6 - Часовой пояс - True - 28 - 0 - - - False - True - 0 - - - - - True - False - - - False - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - Регион - 0 - - - False - True - 2 - - - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - - - False - True - 3 - - - - - True - False - 5 - 5 - 5 - 5 - Зона - 0 - - - False - True - 4 - - - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - - - False - True - 5 - - - - - 5 + True False - 15 - 5 - 15 - 5 - - - False - True - 6 - - - - - True - True - 1 - - - - - True - False - - - True - True - False - True - - 145 + + True + False + + + False + True + 1 + + + + True False 5 5 5 5 - 6 - 5 - Синхронизировать аппаратное время + 8 + Регион + 0 + + False + True + 2 + + + + + True + False + 5 + 5 + 5 + 5 + 8 + + + False + True + 3 + + + + + True + False + 5 + 5 + 5 + 5 + 8 + Зона + 0 + + + False + True + 4 + + + + + True + False + 5 + 5 + 5 + 5 + 8 + + + False + True + 5 + + + + + 5 + True + False + 15 + 5 + 15 + 5 + + + False + True + 6 + - - False - True - 0 - - - - - True - False - - - False - True - 1 - - - + + True False + Часовой пояс - - False - True - 2 - False True - 2 + 1 @@ -951,4 +898,27 @@ + + 240 + 185 + False + btnChooseDate + bottom + none + + + True + True + 10 + 10 + 10 + 10 + 10 + 10 + 2023 + 1 + 10 + + + diff --git a/ubl-settings-datetime_ru.po b/ubl-settings-datetime_ru.po index a9bbf62..b4bd9a1 100644 --- a/ubl-settings-datetime_ru.po +++ b/ubl-settings-datetime_ru.po @@ -9,8 +9,8 @@ msgstr "" msgid "Manually" msgstr "Вручную" -msgid "Enter DHCP !" -msgstr "Введите DHCP !" +msgid "Enter DHCP!" +msgstr "Введите DHCP!" msgid "OK" msgstr "OK" @@ -54,8 +54,8 @@ msgstr "Регион" msgid "Zone" msgstr "Зона" -msgid "Sync by" -msgstr "Синхронизировать" +msgid "Apply local date and time settings" +msgstr "Применить локальную настройку даты и времени" msgid "Automatic time synchronization" msgstr "Автоматическая синхронизация времени"