From 1f24d1b9b765363f23d7efcc6a21cd66df3afc5b Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Thu, 9 Mar 2023 15:28:44 +0600 Subject: [PATCH 01/27] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D0=B7=D1=80=D0=B0?= =?UTF-8?q?=D1=87=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20HeadBa=20Cssr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-datetime.cc | 109 ++++++++++++-------------------- style.css | 14 ++-- 2 files changed, 48 insertions(+), 75 deletions(-) diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index b6a0353..0f4cd44 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -15,8 +15,8 @@ bool flag_save = false; bool flag_save_local = false; bool flag_save_global = false; bool flag_load_global = false; -int socket_ext_id_I= 0; -int socket_trd_id_I= 0; +int socket_ext_id_I = 0; +int socket_trd_id_I = 0; CmdArgParser::CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help) : Glib::OptionGroup{p_name, p_description, p_help} { @@ -97,7 +97,6 @@ void MainWindow::settings() { this->event(); imgInfo->set("/usr/share/ubl-settings-datetime/images/checked.svg"); } - } @@ -139,7 +138,6 @@ void MainWindow::lacalization() { lblHW->set_text(_("Synchronize hardware time:")); cbHw->append(_("Local time")); cbHw->append(_("UTC time")); - } void MainWindow::flag_block_gui() { @@ -187,36 +185,20 @@ void MainWindow::add_CSS() { Glib::RefPtr styleContext = Gtk::StyleContext::create(); Glib::RefPtr screen = Gdk::Screen::get_default();//get default screen styleContext->add_provider_for_screen(screen, cssProvider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);//add provider for screen in all application - Glib::RefPtr context = boxColor->get_style_context(); - Glib::RefPtr context_lbl_head = lblHead->get_style_context(); - context->add_class("cssboxColor1"); - context_lbl_head->add_class("textHead"); - /* + Glib::RefPtr boxColor_css = boxColor->get_style_context(); + boxColor_css->add_class("cssboxColor1"); + Glib::RefPtr lblHead_css = lblHead->get_style_context(); Glib::RefPtr boxButton_css = boxButton->get_style_context(); Glib::RefPtr boxSave_css = boxSave->get_style_context(); - Glib::RefPtr btnDownload_css = btnDownload->get_style_context(); - Glib::RefPtr lblDownload_css = lblDownload->get_style_context(); - Glib::RefPtr imgDonwload_css = imgDonwload->get_style_context(); Glib::RefPtr headerBar_css = headerBar->get_style_context(); - headerBar_css->add_class("bkim"); - imgDonwload_css->add_class("bkim"); - lblDownload_css->add_class("bkim"); - btnDownload_css->add_class("bkim"); - boxButton_css->add_class("bkim"); - boxSave_css->add_class("bkim"); - double opacity= 1.0; - headerBar->set_opacity(opacity); - boxButton->set_opacity(opacity); - boxSave->set_opacity(opacity); - btnDownload->set_opacity(opacity); - lblDownload->set_opacity(opacity); - imgDonwload->set_opacity(opacity); - btnSave->set_opacity(opacity); - lblSave->set_opacity(opacity); - btnSettings->set_opacity(opacity); - imgSave->set_opacity(opacity); - imgSettings->set_opacity(opacity); - */ + lblHead_css->add_class("textHead"); + boxButton_css->add_class("bkimButton"); + boxSave_css->add_class("bkimButton"); + headerBar_css->add_class("bkimHeadBar"); + //Glib::RefPtr w = this->get_style_context(); + //w->add_class("bkim"); + + } @@ -244,22 +226,22 @@ void MainWindow::get_builder() { builder->get_widget("cldrDate", cldrDate); builder->get_widget("mess_dchp", mess_dchp); builder->get_widget("lblMessage", lblMessage); - builder->get_widget("lblDateTimeSetting",lblDateTimeSetting); - builder->get_widget("lblHead",lblHead); - builder->get_widget("lblTime",lblTime); - builder->get_widget("lblData",lblData); - builder->get_widget("lblTimeZone",lblTimeZone); - builder->get_widget("lblReg",lblReg); - builder->get_widget("lblZone",lblZone); - builder->get_widget("lblSynchronizebChkGLob",lblSynchronizebChkGLob); - builder->get_widget("lblSynchronizeBtn",lblSynchronizeBtn); - builder->get_widget("lblTimeBios",lblTimeBios); + builder->get_widget("lblDateTimeSetting", lblDateTimeSetting); + builder->get_widget("lblHead", lblHead); + builder->get_widget("lblTime", lblTime); + builder->get_widget("lblData", lblData); + builder->get_widget("lblTimeZone", lblTimeZone); + builder->get_widget("lblReg", lblReg); + builder->get_widget("lblZone", lblZone); + builder->get_widget("lblSynchronizebChkGLob", lblSynchronizebChkGLob); + builder->get_widget("lblSynchronizeBtn", lblSynchronizeBtn); + builder->get_widget("lblTimeBios", lblTimeBios); builder->get_widget("btnHardwareTime",btnHardwareTime); builder->get_widget("mess_sudo",mess_sudo); - builder->get_widget("lblMessageSudo",lblMessageSudo); + builder->get_widget("lblMessageSudo", lblMessageSudo); builder->get_widget("btnMessCloseSudo",btnMessCloseSudo); - builder->get_widget("lblSave",lblSave); - builder->get_widget("lblDownload",lblDownload); + builder->get_widget("lblSave", lblSave); + builder->get_widget("lblDownload", lblDownload); builder->get_widget("aboutWindows", aboutWindows); builder->get_widget("btnBoxAboutDialog", btnBoxAboutDialog); builder->get_widget("boxInfoError", boxInfoError); @@ -290,7 +272,6 @@ void MainWindow::get_builder() { builder->get_widget("imgDonwload", imgDonwload); builder->get_widget("imgSettings", imgSettings); builder->get_widget("imgSave", imgSave); - } void MainWindow::gui_exit() { @@ -322,7 +303,6 @@ void MainWindow::event() { btnSaveLocalGlob->signal_activate().connect([&]() {save_global_local_cfg();}); btnSaveLocal->signal_activate().connect([&]() {save_local_cfg();}); btnSaveGlob->signal_activate().connect([&]() {save_global_cfg();}); - } void MainWindow::synopsis_show() { @@ -366,10 +346,10 @@ void MainWindow::save_local_cfg() { string cmd_default = "/usr/bin/ubconfig --target system set network NTPSERVERS=default"; string cmd_dhcp = "/usr/bin/ubconfig --target system set network NTPSERVERS=dhcp"; string cmd_set_ntp = "/usr/bin/ubconfig --target system set network NTPSERVERS=\""; - string remove = "/usr/bin/ubconfig --target system remove network NTPSERVERS"; - this->save_Dhcp(cmd_default, cmd_dhcp, remove, cmd_set_ntp); + string remove_ntp = "/usr/bin/ubconfig --target system remove network NTPSERVERS"; + this->save_Dhcp(cmd_default, cmd_dhcp, remove_ntp, cmd_set_ntp); string local = "/usr/bin/ubconfig --target system set clock HWCLOCK_SYNC=localtime"; - string hw = "/usr/bin/ubconfig --target system set clock HWCLOCK_SYNC=utc"; + string hw = "/usr/bin/ubconfig --target system set clock HWCLOCK_SYNC=utc"; this->hardware_clock_global(local, hw); info_warning_error(2); } @@ -380,8 +360,8 @@ void MainWindow::save_global_cfg() { string cmd_default = "/usr/bin/ubconfig --target global set network NTPSERVERS=default"; string cmd_dhcp = "/usr/bin/ubconfig --target global set network NTPSERVERS=dhcp"; string cmd_set_ntp = "/usr/bin/ubconfig --target global set network NTPSERVERS=\""; - string remove = "/usr/bin/ubconfig --target global remove network NTPSERVERS"; - this->save_Dhcp(cmd_default, cmd_dhcp, remove, cmd_set_ntp); + string remove_ntp = "/usr/bin/ubconfig --target global remove network NTPSERVERS"; + this->save_Dhcp(cmd_default, cmd_dhcp, remove_ntp, cmd_set_ntp); string local = "/usr/bin/ubconfig --target global set clock HWCLOCK_SYNC=localtime"; string hw = "/usr/bin/ubconfig --target global set clock HWCLOCK_SYNC=utc"; this->hardware_clock_global(local, hw); @@ -560,7 +540,6 @@ bool MainWindow::focus_ntp(string &cmd_set_ntp) { mess_dchp->show(); } } - } return true; } @@ -676,8 +655,6 @@ void MainWindow::event_entry_cbDhcp() { txtNtpServer->set_text(""); btnUpdateDateTime->set_sensitive(false); txtNtpServer->set_sensitive(false); - - } else if (activ_index == 1) { btnUpdateDateTime->set_sensitive(false); @@ -685,7 +662,7 @@ void MainWindow::event_entry_cbDhcp() { txtNtpServer->set_text(""); } else if (activ_index == 2) { - if (flag_ntp_edit==false) { + if (flag_ntp_edit == false) { txtNtpServer->set_sensitive(true); } } @@ -703,7 +680,6 @@ void MainWindow::save_Dhcp(string &cmd_default, string &cmd_dhcp, string &remove } else if (activ_index == 0) { wrapper_system(cmd_default, "&"); - } else if (activ_index == 1) { wrapper_system(cmd_dhcp, "&"); @@ -761,7 +737,7 @@ void MainWindow::entry_dhcp_mess(string cmd_get_dhcp, string cmd_default_get_dhc else { cbDhcp->set_active(2); txtNtpServer->set_text(str_dhcp); - if (flag_ntp_edit==false) { + if (flag_ntp_edit ==false) { txtNtpServer->set_sensitive(true); } } @@ -772,7 +748,7 @@ void MainWindow::entry_dhcp_mess(string cmd_get_dhcp, string cmd_default_get_dhc txtNtpServer->set_text(""); txtNtpServer->set_sensitive(false); btnUpdateDateTime->set_sensitive(true); - warning_info-= 1; + warning_info -= 1; } } @@ -846,8 +822,6 @@ void MainWindow::fill_in_reg_zone(string &cmd) { } } - - void MainWindow::get_config() { this->read_file(); this->update_hour_minute(); @@ -872,7 +846,6 @@ array MainWindow::split_region_zone(string &read_reg_zon_cfg) { arr[1] = ""; } return arr; - } @@ -957,7 +930,7 @@ void MainWindow::append_region_zone(string region, string zone, Gtk::ComboBoxTex string zone_mixing = ""; string path_reg_zone = ""; string zone_offest = ""; - path_reg_zone=region + "/" + zone; + path_reg_zone = region + "/" + zone; zone_offest = this->zone_file_read(path_reg_zone) + _(zone.c_str()); if (region == "") { tmpCbZone->append(" "); @@ -1008,8 +981,7 @@ string MainWindow::call(string cmd) { status = pclose(fp); if (status == -1) { exit(1); - } - + } return path; } @@ -1018,8 +990,8 @@ void MainWindow::append_zone() { int index = cbRegion->get_active_row_number(); if (index!=-1) { string str_region = array_region[index]; - string zone_mixing= ""; - string path_dir= ""; + string zone_mixing = ""; + string path_dir = ""; if(str_region.length() != 0) { for (const auto &_str_zone : time_reg_map_local.at(str_region)) { cbZone->append(Glib::ustring(_str_zone)); @@ -1227,8 +1199,9 @@ void MainWindow::sort_zone(vector *time_reg_map_local,vector *ti b = (*time_reg_map)[j]; (*time_reg_map)[j] = (*time_reg_map)[j + 1]; (*time_reg_map)[j + 1] = b; - } } - } + } + } + } } } diff --git a/style.css b/style.css index fadccb5..6467710 100644 --- a/style.css +++ b/style.css @@ -71,11 +71,11 @@ margin-bottom:0px; } -.bkim{ - background-image: -gtk-gradient(linear, - left top, left bottom, - from(@entry_background_a), - color-stop(0.20, @entry_background_b), - color-stop(0.85, @entry_background_c), - to(@entry_background_d)); +.bkimHeadBar{ + opacity:1.0; +} + +.bkimButton{ + background-color: transparent; + opacity:1.0; } \ No newline at end of file From 6f3df24a9205b9363c13a50dff7915cf46954353 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Thu, 9 Mar 2023 15:33:58 +0600 Subject: [PATCH 02/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D0=B4=D0=B8=D0=B7=D0=B0=D0=B9=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ubl-settings-datetime.glade | 1 + 1 file changed, 1 insertion(+) diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 6fdf5c9..ab264a4 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -971,6 +971,7 @@ Format: DD.MM.YYYY 5 5 5 + 1 False ubl-settings-datetime From 6e26dca9b3feaa1226b839931fd5bfba2a74ce85 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Fri, 10 Mar 2023 16:04:48 +0600 Subject: [PATCH 03/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BB=D0=BE=D0=BA=D0=B0=D0=BB=D0=B8?= =?UTF-8?q?=D0=B7=D0=B0=D1=86=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-datetime.cc | 5 ----- source/ubl-util-standard.c | 3 +++ style.css | 5 +++++ ubl-settings-datetime.glade | 16 ++++++++-------- ubl-settings-datetime_ru.po | 18 +++++++++--------- 5 files changed, 25 insertions(+), 22 deletions(-) diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index 0f4cd44..f26b5bd 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -195,11 +195,6 @@ void MainWindow::add_CSS() { boxButton_css->add_class("bkimButton"); boxSave_css->add_class("bkimButton"); headerBar_css->add_class("bkimHeadBar"); - //Glib::RefPtr w = this->get_style_context(); - //w->add_class("bkim"); - - - } diff --git a/source/ubl-util-standard.c b/source/ubl-util-standard.c index 8cff122..df38341 100644 --- a/source/ubl-util-standard.c +++ b/source/ubl-util-standard.c @@ -52,6 +52,7 @@ inline void ubl_make_plugs(Gtk::Widget *LeftWidget, Gtk::Widget *RightWidget, in } else gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); gtk_widget_show(GTK_WIDGET(plug)); + gtk_style_context_add_class(gtk_widget_get_style_context(plug),"bkimButtonPlug"); } if (right_plug_id>0&&RightWidget){ GtkWidget *plug=gtk_plug_new(right_plug_id); @@ -64,6 +65,8 @@ inline void ubl_make_plugs(Gtk::Widget *LeftWidget, Gtk::Widget *RightWidget, in } else gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); gtk_widget_show(GTK_WIDGET(plug)); + gtk_style_context_add_class(gtk_widget_get_style_context(plug),"bkimButtonPlug"); + } } #endif \ No newline at end of file diff --git a/style.css b/style.css index 6467710..a05efb2 100644 --- a/style.css +++ b/style.css @@ -78,4 +78,9 @@ .bkimButton{ background-color: transparent; opacity:1.0; +} +.bkimButtonPlug{ + background-color: transparent; + color: rgb(0, 0, 0); + opacity:1.0; } \ No newline at end of file diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index ab264a4..f38bc75 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -56,10 +56,10 @@ False 4 - + True False - Download local + Load global configuration True @@ -71,7 +70,6 @@ True False Load local configuration - True @@ -89,7 +87,6 @@ True False Help - True @@ -100,7 +97,6 @@ True False About - True @@ -118,7 +114,6 @@ True False Save to global and local configuration - True @@ -129,7 +124,6 @@ True False Save global configuration - True @@ -140,7 +134,6 @@ True False Save local configuration - True @@ -1045,9 +1038,6 @@ Format: DD.MM.YYYY 0 - 1 @@ -1133,9 +1123,6 @@ Format: DD.MM.YYYY 1 - end diff --git a/ubl-settings-datetime_ru.po b/ubl-settings-datetime_ru.po index 9285589..d423663 100644 --- a/ubl-settings-datetime_ru.po +++ b/ubl-settings-datetime_ru.po @@ -58,7 +58,7 @@ msgstr "По умолчанию" msgid "The program must be run with \nsuperuser privileges!" msgstr "Программа должна быть запущена с правами \nсуперпользователя!" -msgid "The program must be run with superuser privileges!" +msgid "The program must be run as root" msgstr "Программа должна быть запущена с правами суперпользователя!" msgid "Manual" From 20ec428af7639eb527464aa05e2f3d0d204cc38d Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 09:14:44 +0600 Subject: [PATCH 15/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=B2=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B0=D1=85=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- #ubl-settings-datetime.glade# | 1350 +++++++++++++++++++++++++++++++ source/ubl-settings-datetime.cc | 53 +- source/ubl-settings-datetime.h | 18 +- ubl-settings-datetime.glade | 17 +- ubl-settings-datetime_ru.po | 2 +- 5 files changed, 1395 insertions(+), 45 deletions(-) create mode 100644 #ubl-settings-datetime.glade# diff --git a/#ubl-settings-datetime.glade# b/#ubl-settings-datetime.glade# new file mode 100644 index 0000000..104ec18 --- /dev/null +++ b/#ubl-settings-datetime.glade# @@ -0,0 +1,1350 @@ + + + + + + False + О Программе + False + True + center + ubl-settings-datetime + dialog + True + ubl-settings-datetime + 1.2 + Copyright © 2023 - UBSoft Software LLC + Setting the date and time + https://ublinux.ru/ + Project Home Page + Это приложение распространяется без каких-либо гарантий. +Подробнее в <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, версии 2 или позднее</a>. + UBGroup + UBGroup + ubl-settings-datetime + True + gpl-2-0 + + + False + vertical + 2 + + + False + end + + + + + + False + False + 0 + + + + + + + + + + True + False + False + False + 4 + + + True + False + Load global configuration + + + + + + True + False + Load local configuration + + + + + + True + False + False + False + 4 + + + True + False + Help + + + + + + True + False + About + + + + + + True + False + False + False + 4 + + + True + False + Save to global and local configuration + + + + + + True + False + Save global configuration + + + + + + True + False + Save local configuration + + + + + + False + + + True + False + vertical + + + True + False + vertical + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 6 + 6 + checked + + + False + True + 0 + + + + + True + False + start + 5 + 5 + 5 + 5 + 6 + 6 + + + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + vertical + + + True + False + + + 90 + True + False + 5 + 5 + 5 + 5 + 6 + 6 + 69 + ubl-settings-datetime + + + False + True + 0 + + + + + True + False + + + True + False + + + True + False + vertical + + + 255 + True + False + Date and time settings + + + + + + + + + True + True + 0 + + + + + False + True + 0 + + + + + True + True + 0 + + + + + True + False + + + False + True + 1 + + + + + True + True + 1 + + + + + False + True + 0 + + + + + False + True + 1 + + + + + True + False + vertical + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 + vertical + + + True + False + + + 0 + True + False + 5 + 5 + 5 + 5 + 6 + 6 + Time + True + 0 + + + False + True + 0 + + + + + True + True + 5 + 5 + 5 + 5 + 6 + 6 + 2 + 0.099999999776482579 + True + + + False + True + 1 + + + + + True + False + : + + + False + True + 2 + + + + + True + True + 5 + 5 + 5 + 5 + 6 + 6 + 2 + True + + + False + True + 3 + + + + + 20 + True + False + 5 + 5 + 5 + 5 + 6 + 6 + Date + True + 0 + + + False + True + 4 + + + + + -1 + True + True + Date +Format: DD.MM.YYYY + 5 + 5 + 5 + 5 + 6 + 6 + + + False + True + 5 + + + + + True + True + True + Интерактивный выбор даты + 5 + 10 + 5 + 10 + 6 + 6 + + + True + False + x-office-calendar + + + + + False + True + 6 + + + + + False + True + 1 + + + + + True + False + + + True + True + True + 7 + 5 + 7 + 5 + 6 + 6 + + + True + False + center + center + + + True + False + 5 + 5 + 5 + 5 + media-playlist-repeat + + + False + True + 0 + + + + + True + False + center + center + Sync by + + + False + True + 1 + + + + + + + True + True + 0 + + + + + True + False + + + False + True + 1 + + + + + True + False + + + False + True + 2 + + + + + True + True + True + 5 + 10 + 5 + 10 + 6 + 6 + + + True + False + center + center + Synchronize hardware time + + + + + True + True + 3 + + + + + False + True + 3 + + + + + + + True + False + Current date and time + + + + + False + True + 0 + + + + + False + True + 1 + + + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 + vertical + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 6 + 6 + + + False + True + 1 + + + + + True + True + Enter the name of the ntp server or its ip address. When entering multiple addresses, separate them with spaces. + center + 5 + 10 + 5 + 10 + 6 + 6 + + + True + True + 3 + + + + + False + True + 1 + + + + + + + True + False + Synchronize via NTP: + + + + + False + True + 0 + + + + + False + True + 2 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + vertical + + + True + False + + + True + False + start + 8 + 5 + 8 + 5 + 6 + 13 + Synchronize hardware time: + + + True + True + 0 + + + + + True + False + 55 + + + False + True + 1 + + + + + True + False + 10 + 5 + 5 + 10 + 6 + 10 + False + False + + + True + True + 2 + + + + + False + True + 0 + + + + + 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 + 10 + False + False + + + True + True + 3 + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 13 + Area + 0 + + + False + True + 4 + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 10 + False + False + + + True + True + 5 + + + + + 5 + True + False + + + False + True + 6 + + + + + True + False + + + False + True + 7 + + + + + False + True + 1 + + + + + + + True + False + Time Zone + + + + + False + True + 3 + + + + + False + True + 2 + + + + + False + True + 0 + + + + + + + True + False + True + + + True + False + start + 5 + 5 + 5 + 5 + 1 + False + ubl-settings-datetime + + + + + + + + True + False + 5 + 5 + 5 + 5 + 32 + ubl-settings-datetime + + + + + True + False + + + True + True + False + True + True + menu + none + + + True + False + + + True + False + 5 + 5 + 5 + 5 + Load + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + + + + + + False + True + 0 + + + + + 1 + + + + + True + False + + + True + True + False + True + True + menu2 + none + + + True + False + + + True + False + 5 + 5 + 5 + 5 + Save + + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + + + + + + False + True + 0 + + + + + True + True + False + True + True + menu1 + none + + + True + False + open-menu-symbolic + + + + + False + True + 1 + + + + + end + 3 + + + + + + + both + True + + + + + + + both + True + + + + + + + both + True + + + + + + + 240 + 185 + False + btnChooseDate + bottom + none + + + True + True + 10 + 10 + 10 + 10 + 10 + 10 + 2023 + 1 + 10 + + + + + False + Внимание! + dialog + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + + + True + False + 5 + 5 + 5 + 6 + 6 + 50 + gtk-dialog-warning + + + True + True + 0 + + + + + 160 + True + False + start + center + 6 + 6 + Enter DHCP ! + + + True + True + 1 + + + + + False + True + 1 + + + + + OK + True + True + True + 5 + 5 + 5 + 5 + 3 + 3 + + + False + True + 1 + + + + + + + False + popup + Внимание! + center + dialog + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + + + True + False + 5 + 5 + 5 + 6 + 6 + 50 + gtk-dialog-warning + + + True + True + 0 + + + + + 160 + True + False + start + center + 5 + 5 + 5 + 5 + 6 + 6 + Enter DHCP ! + + + True + True + 1 + + + + + False + True + 1 + + + + + OK + True + True + True + 5 + 5 + 5 + 5 + 3 + 3 + + + False + True + 1 + + + + + + diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index f9c5ef9..9547664 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -98,14 +98,14 @@ void MainWindow::settings() { btnBoxAboutDialog->set_visible(false); this->event(); this->parse_text_date(); - this->download_local_cfg(); + this->load_local_cfg(); } else { lblHW->set_sensitive(false); cbHw->set_sensitive(false); boxButton->set_sensitive(false); boxSave->set_sensitive(false); - btnDownload->set_sensitive(false); + btnLoad->set_sensitive(false); numTimeHrs->set_sensitive(false); numTimeMin->set_sensitive(false); lblTime->set_sensitive(false); @@ -135,7 +135,7 @@ void MainWindow::settings() { int MainWindow::check_root() { if (geteuid() != 0) { lblMessageSudo->set_text(_("The program must be run as root")); - mess_sudo->show(); + windowMessSudo->show(); return 1; } return 0; @@ -152,7 +152,7 @@ void MainWindow::lacalization() { aboutWindows->set_version(_(version_application.c_str())); aboutWindows->set_website_label(_("Project Home Page")); lblSave->set_label(_("Save")); - lblDownload->set_label(_("Download")); + lblLoad->set_label(_("Load")); txtDate->set_tooltip_text(_("Date of\nFormat: DD.MM.YYYY")); txtNtpServer->set_tooltip_text(_("Enter the name of the ntp-server or its ip-address.\nWhen entering multiple addresses, separate them with commas.")); lblSynchronizebChkGLob->set_text(_("Synchronize via NTP:")); @@ -169,8 +169,8 @@ void MainWindow::lacalization() { lblZone->set_text(_("Zone")); lblSynchronizeBtn->set_text(_("Sync by")); lblHeader->set_text(_("ubl-settings-datetime")); - mess_sudo->set_title(_("Warning!")); - mess_dchp->set_title(_("Warning!")); + windowMessSudo->set_title(_("Warning!")); + windowMessDchp->set_title(_("Warning!")); lblTimeBios->set_text(_("Synchronize hardware time")); lblHW->set_text(_("Synchronize hardware time:")); cbHw->append(_("Local time")); @@ -202,7 +202,7 @@ void MainWindow::flag_block_gui() { txtNtpServer->set_sensitive(false); } if (flag_load_global == true) { - btnDonwlolGlob->set_sensitive(false); + btnLoadGlob->set_sensitive(false); } if (flag_save == true) { btnSave->set_sensitive(false); @@ -255,7 +255,7 @@ void MainWindow::get_builder() { builder->get_widget("cbZone", cbZone); builder->get_widget("txtNtpServer", txtNtpServer); builder->get_widget("cldrDate", cldrDate); - builder->get_widget("mess_dchp", mess_dchp); + builder->get_widget("windowMessDchp", windowMessDchp); builder->get_widget("lblMessage", lblMessage); builder->get_widget("lblDateTimeSetting", lblDateTimeSetting); builder->get_widget("lblHead", lblHead); @@ -268,11 +268,11 @@ void MainWindow::get_builder() { builder->get_widget("lblSynchronizeBtn", lblSynchronizeBtn); builder->get_widget("lblTimeBios", lblTimeBios); builder->get_widget("btnHardwareTime",btnHardwareTime); - builder->get_widget("mess_sudo",mess_sudo); + builder->get_widget("windowMessSudo",windowMessSudo); builder->get_widget("lblMessageSudo", lblMessageSudo); builder->get_widget("btnMessCloseSudo",btnMessCloseSudo); builder->get_widget("lblSave", lblSave); - builder->get_widget("lblDownload", lblDownload); + builder->get_widget("lblLoad", lblLoad); builder->get_widget("aboutWindows", aboutWindows); builder->get_widget("btnBoxAboutDialog", btnBoxAboutDialog); builder->get_widget("boxInfoError", boxInfoError); @@ -280,11 +280,11 @@ void MainWindow::get_builder() { builder->get_widget("imgInfo", imgInfo); builder->get_widget("btnSave", btnSave); builder->get_widget("btnSettings", btnSettings); - builder->get_widget("btnDownload", btnDownload); + builder->get_widget("btnLoad", btnLoad); builder->get_widget("btnSynopsis", btnSynopsis); builder->get_widget("btnAbout", btnAbout); - builder->get_widget("btnDonwlodLocal", btnDonwlodLocal); - builder->get_widget("btnDonwlolGlob", btnDonwlolGlob); + builder->get_widget("btnLoadLocal", btnLoadLocal); + builder->get_widget("btnLoadGlob", btnLoadGlob); builder->get_widget("btnSaveLocalGlob", btnSaveLocalGlob); builder->get_widget("btnSaveLocal", btnSaveLocal); builder->get_widget("btnSaveGlob", btnSaveGlob); @@ -299,8 +299,7 @@ void MainWindow::get_builder() { builder->get_widget("standartHead", standartHead); builder->get_widget("plugBox", plugBox); builder->get_widget("window" ,window); - builder->get_widget("imgDonwload", imgDonwload); - builder->get_widget("imgDonwload", imgDonwload); + builder->get_widget("imgLoad", imgLoad); builder->get_widget("imgSettings", imgSettings); builder->get_widget("imgSave", imgSave); } @@ -326,11 +325,11 @@ void MainWindow::event() { cbDhcp->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::event_entry_cbDhcp)); cbRegion->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::append_zone)); cldrDate->signal_day_selected_double_click().connect(sigc::mem_fun(*this, &MainWindow::get_calendar)); - mess_sudo->signal_delete_event().connect(sigc::mem_fun(*this, &MainWindow::gui_exit_2)); + windowMessSudo->signal_delete_event().connect(sigc::mem_fun(*this, &MainWindow::gui_exit_2)); btnAbout->signal_activate().connect([&]() {aboutWindows->show();}); btnSynopsis->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::synopsis_show)); - btnDonwlodLocal->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::download_local_cfg)); - btnDonwlolGlob->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::download_globl_cfg)); + btnLoadLocal->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::load_local_cfg)); + btnLoadGlob->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::load_globl_cfg)); btnSaveLocalGlob->signal_activate().connect([&]() {save_global_local_cfg();}); btnSaveLocal->signal_activate().connect([&]() {save_local_cfg();}); btnSaveGlob->signal_activate().connect([&]() {save_global_cfg();}); @@ -345,7 +344,7 @@ void MainWindow::synopsis_show() { } } -void MainWindow::download_local_cfg() { +void MainWindow::load_local_cfg() { string cmd = "/usr/bin/ubconfig --default --source system get clock ZONE"; this->fill_in_reg_zone(cmd); this->update_hour_minute(); @@ -359,7 +358,7 @@ void MainWindow::download_local_cfg() { info_warning_error(0); } -void MainWindow::download_globl_cfg() { +void MainWindow::load_globl_cfg() { string cmd_get_dhcp = "/usr/bin/ubconfig --default --source global get network NTPSERVERS"; string cmd_default_get_dhcp = "/usr/bin/ubconfig --source=default get NTPSERVERS_DEFAULT"; this->entry_dhcp_mess(cmd_get_dhcp, cmd_default_get_dhcp); @@ -555,13 +554,13 @@ void MainWindow::hardware_clock() { } void MainWindow::gui_mess_close() { - mess_dchp->hide(); + windowMessDchp->hide(); } bool MainWindow::focus_ntp(string &cmd_set_ntp) { if (txtNtpServer->get_text() == "" || txtNtpServer->get_text() == " ") { lblMessage->set_text(_("Enter DHCP!")); - mess_dchp->show(); + windowMessDchp->show(); } else { string cmd = ""; @@ -587,11 +586,11 @@ bool MainWindow::focus_ntp(string &cmd_set_ntp) { else { if (flag_error == true) { lblMessage->set_text(_("An invalid character is entered")); - mess_dchp->show(); + windowMessDchp->show(); } else if (flag_error_check_ntp == true) { lblMessage->set_text(_("Error in the ntp name")); - mess_dchp->show(); + windowMessDchp->show(); } } } @@ -789,7 +788,7 @@ void MainWindow::entry_dhcp_mess(string cmd_get_dhcp, string cmd_default_get_dhc btnUpdateDateTime->set_sensitive(false); if (str_dhcp == "") { lblMessage->set_text(_("Enter DHCP!")); - mess_dchp->show(); + windowMessDchp->show(); } else if (str_dhcp == "(null)") { cbDhcp->set_active(0); @@ -1124,12 +1123,12 @@ void MainWindow::post_entry_data() { size_t index = str_error_clock.find("date:"); if (index != std::string::npos) { lblMessage->set_text(_("Incorrect date format")); - mess_dchp->show(); + windowMessDchp->show(); } } else { lblMessage->set_text(_("Incorrect date format")); - mess_dchp->show(); + windowMessDchp->show(); } } diff --git a/source/ubl-settings-datetime.h b/source/ubl-settings-datetime.h index f35ccef..dd466a6 100755 --- a/source/ubl-settings-datetime.h +++ b/source/ubl-settings-datetime.h @@ -60,8 +60,8 @@ class MainWindow : public Gtk::ApplicationWindow { Gtk::Box *boxColor; Gtk::ComboBoxText *cbRegion; Gtk::ComboBoxText *cbZone; - Gtk::Window *mess_dchp; - Gtk::Window *mess_sudo; + Gtk::Window *windowMessDchp; + Gtk::Window *windowMessSudo; Gtk::Popover *popCalendar; Gtk::Calendar *cldrDate; Gtk::Label *lblMessage; @@ -78,12 +78,12 @@ class MainWindow : public Gtk::ApplicationWindow { Gtk::Label *lblSynchronizeBtn; Gtk::Label *lblTimeBios; Gtk::Label *lblSave; - Gtk::Label *lblDownload; + Gtk::Label *lblLoad; Gtk::Button *btnHardwareTime; Gtk::CheckButton *cbxSynchronizeNtp; Gtk::Entry *txtNtpServer; Gtk::Entry *txtDate; - Gtk::Button *btnDownload; + Gtk::Button *btnLoad; Gtk::Button *btnSave; Gtk::Button *btnSettings; Gtk::AboutDialog *aboutWindows; @@ -97,8 +97,8 @@ class MainWindow : public Gtk::ApplicationWindow { Gtk::MenuItem *btnSaveLocalGlob; Gtk::MenuItem *btnSaveLocal; Gtk::MenuItem *btnSaveGlob; - Gtk::MenuItem *btnDonwlolGlob; - Gtk::MenuItem *btnDonwlodLocal; + Gtk::MenuItem *btnLoadGlob; + Gtk::MenuItem *btnLoadLocal; Gtk::MenuItem *btnAbout; Gtk::MenuItem *btnSynopsis; Gtk::HeaderBar *headerBar; @@ -111,7 +111,7 @@ class MainWindow : public Gtk::ApplicationWindow { Gtk::Widget *standartHead; Gtk::Widget *plugBox; Gtk::Window *window; - Gtk::Image *imgDonwload; + Gtk::Image *imgLoad; Gtk::Image *imgSave; Gtk::Image *imgSettings; @@ -147,11 +147,11 @@ class MainWindow : public Gtk::ApplicationWindow { void entry_hardware_clock_default(string &cmd_default); void save_global_local_cfg(); void fill_in_reg_zone(string &cmd); - void download_globl_cfg(); + void load_globl_cfg(); void save_local_cfg(); void save_global_cfg(); void save_Dhcp(string &cmd_default, string &cmd_dhcp, string &remove, string &cmd_set_ntp); - void download_local_cfg(); + void load_local_cfg(); void post_entry_data(); void lacalization(); void settings(); diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 9db607c..209863f 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -56,7 +56,7 @@ False 4 - + True False Load global configuration @@ -66,7 +66,7 @@ - + True False Load local configuration @@ -989,7 +989,7 @@ Format: DD.MM.YYYY True False - + True True False @@ -1002,14 +1002,14 @@ Format: DD.MM.YYYY True False - + True False 5 5 5 5 - Download + Load False @@ -1018,7 +1018,7 @@ Format: DD.MM.YYYY - + True False pan-down-symbolic @@ -1179,7 +1179,7 @@ Format: DD.MM.YYYY - + False Внимание! dialog @@ -1260,8 +1260,9 @@ Format: DD.MM.YYYY - + False + popup Внимание! center dialog diff --git a/ubl-settings-datetime_ru.po b/ubl-settings-datetime_ru.po index d423663..7472b4e 100644 --- a/ubl-settings-datetime_ru.po +++ b/ubl-settings-datetime_ru.po @@ -1687,7 +1687,7 @@ msgstr "Загрузить локальную конфигурацию" msgid "Disabled" msgstr "Отключено" -msgid "Download" +msgid "Load" msgstr "Загрузить" msgid "Argument not recognized\n" From 3468ec22d01467087a1fb69dbb633cc29e69edcb Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 09:18:20 +0600 Subject: [PATCH 16/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=B2=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- #ubl-settings-datetime.glade# | 1350 ------------------------------- source/ubl-settings-datetime.cc | 2 +- ubl-settings-datetime.glade | 2 +- 3 files changed, 2 insertions(+), 1352 deletions(-) delete mode 100644 #ubl-settings-datetime.glade# diff --git a/#ubl-settings-datetime.glade# b/#ubl-settings-datetime.glade# deleted file mode 100644 index 104ec18..0000000 --- a/#ubl-settings-datetime.glade# +++ /dev/null @@ -1,1350 +0,0 @@ - - - - - - False - О Программе - False - True - center - ubl-settings-datetime - dialog - True - ubl-settings-datetime - 1.2 - Copyright © 2023 - UBSoft Software LLC - Setting the date and time - https://ublinux.ru/ - Project Home Page - Это приложение распространяется без каких-либо гарантий. -Подробнее в <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, версии 2 или позднее</a>. - UBGroup - UBGroup - ubl-settings-datetime - True - gpl-2-0 - - - False - vertical - 2 - - - False - end - - - - - - False - False - 0 - - - - - - - - - - True - False - False - False - 4 - - - True - False - Load global configuration - - - - - - True - False - Load local configuration - - - - - - True - False - False - False - 4 - - - True - False - Help - - - - - - True - False - About - - - - - - True - False - False - False - 4 - - - True - False - Save to global and local configuration - - - - - - True - False - Save global configuration - - - - - - True - False - Save local configuration - - - - - - False - - - True - False - vertical - - - True - False - vertical - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - checked - - - False - True - 0 - - - - - True - False - start - 5 - 5 - 5 - 5 - 6 - 6 - - - - - - - True - True - 1 - - - - - False - True - 0 - - - - - True - False - vertical - - - True - False - - - 90 - True - False - 5 - 5 - 5 - 5 - 6 - 6 - 69 - ubl-settings-datetime - - - False - True - 0 - - - - - True - False - - - True - False - - - True - False - vertical - - - 255 - True - False - Date and time settings - - - - - - - - - True - True - 0 - - - - - False - True - 0 - - - - - True - True - 0 - - - - - True - False - - - False - True - 1 - - - - - True - True - 1 - - - - - False - True - 0 - - - - - False - True - 1 - - - - - True - False - vertical - - - True - False - vertical - - - True - False - 5 - 5 - 5 - 5 - 0.019999999552965164 - in - - - True - False - 5 - 5 - 5 - vertical - - - True - False - - - 0 - True - False - 5 - 5 - 5 - 5 - 6 - 6 - Time - True - 0 - - - False - True - 0 - - - - - True - True - 5 - 5 - 5 - 5 - 6 - 6 - 2 - 0.099999999776482579 - True - - - False - True - 1 - - - - - True - False - : - - - False - True - 2 - - - - - True - True - 5 - 5 - 5 - 5 - 6 - 6 - 2 - True - - - False - True - 3 - - - - - 20 - True - False - 5 - 5 - 5 - 5 - 6 - 6 - Date - True - 0 - - - False - True - 4 - - - - - -1 - True - True - Date -Format: DD.MM.YYYY - 5 - 5 - 5 - 5 - 6 - 6 - - - False - True - 5 - - - - - True - True - True - Интерактивный выбор даты - 5 - 10 - 5 - 10 - 6 - 6 - - - True - False - x-office-calendar - - - - - False - True - 6 - - - - - False - True - 1 - - - - - True - False - - - True - True - True - 7 - 5 - 7 - 5 - 6 - 6 - - - True - False - center - center - - - True - False - 5 - 5 - 5 - 5 - media-playlist-repeat - - - False - True - 0 - - - - - True - False - center - center - Sync by - - - False - True - 1 - - - - - - - True - True - 0 - - - - - True - False - - - False - True - 1 - - - - - True - False - - - False - True - 2 - - - - - True - True - True - 5 - 10 - 5 - 10 - 6 - 6 - - - True - False - center - center - Synchronize hardware time - - - - - True - True - 3 - - - - - False - True - 3 - - - - - - - True - False - Current date and time - - - - - False - True - 0 - - - - - False - True - 1 - - - - - True - False - vertical - - - True - False - 5 - 5 - 5 - 5 - 0.019999999552965164 - in - - - True - False - 5 - 5 - 5 - vertical - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - - - False - True - 1 - - - - - True - True - Enter the name of the ntp server or its ip address. When entering multiple addresses, separate them with spaces. - center - 5 - 10 - 5 - 10 - 6 - 6 - - - True - True - 3 - - - - - False - True - 1 - - - - - - - True - False - Synchronize via NTP: - - - - - False - True - 0 - - - - - False - True - 2 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 0.019999999552965164 - in - - - True - False - vertical - - - True - False - - - True - False - start - 8 - 5 - 8 - 5 - 6 - 13 - Synchronize hardware time: - - - True - True - 0 - - - - - True - False - 55 - - - False - True - 1 - - - - - True - False - 10 - 5 - 5 - 10 - 6 - 10 - False - False - - - True - True - 2 - - - - - False - True - 0 - - - - - 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 - 10 - False - False - - - True - True - 3 - - - - - True - False - 5 - 5 - 5 - 5 - 6 - 13 - Area - 0 - - - False - True - 4 - - - - - True - False - 5 - 5 - 5 - 5 - 6 - 10 - False - False - - - True - True - 5 - - - - - 5 - True - False - - - False - True - 6 - - - - - True - False - - - False - True - 7 - - - - - False - True - 1 - - - - - - - True - False - Time Zone - - - - - False - True - 3 - - - - - False - True - 2 - - - - - False - True - 0 - - - - - - - True - False - True - - - True - False - start - 5 - 5 - 5 - 5 - 1 - False - ubl-settings-datetime - - - - - - - - True - False - 5 - 5 - 5 - 5 - 32 - ubl-settings-datetime - - - - - True - False - - - True - True - False - True - True - menu - none - - - True - False - - - True - False - 5 - 5 - 5 - 5 - Load - - - False - True - 0 - - - - - True - False - pan-down-symbolic - - - False - True - 1 - - - - - - - False - True - 0 - - - - - 1 - - - - - True - False - - - True - True - False - True - True - menu2 - none - - - True - False - - - True - False - 5 - 5 - 5 - 5 - Save - - - - False - True - 0 - - - - - True - False - pan-down-symbolic - - - False - True - 1 - - - - - - - False - True - 0 - - - - - True - True - False - True - True - menu1 - none - - - True - False - open-menu-symbolic - - - - - False - True - 1 - - - - - end - 3 - - - - - - - both - True - - - - - - - both - True - - - - - - - both - True - - - - - - - 240 - 185 - False - btnChooseDate - bottom - none - - - True - True - 10 - 10 - 10 - 10 - 10 - 10 - 2023 - 1 - 10 - - - - - False - Внимание! - dialog - - - True - False - vertical - - - True - False - 5 - 5 - 5 - 5 - - - True - False - 5 - 5 - 5 - 6 - 6 - 50 - gtk-dialog-warning - - - True - True - 0 - - - - - 160 - True - False - start - center - 6 - 6 - Enter DHCP ! - - - True - True - 1 - - - - - False - True - 1 - - - - - OK - True - True - True - 5 - 5 - 5 - 5 - 3 - 3 - - - False - True - 1 - - - - - - - False - popup - Внимание! - center - dialog - - - True - False - vertical - - - True - False - 5 - 5 - 5 - 5 - - - True - False - 5 - 5 - 5 - 6 - 6 - 50 - gtk-dialog-warning - - - True - True - 0 - - - - - 160 - True - False - start - center - 5 - 5 - 5 - 5 - 6 - 6 - Enter DHCP ! - - - True - True - 1 - - - - - False - True - 1 - - - - - OK - True - True - True - 5 - 5 - 5 - 5 - 3 - 3 - - - False - True - 1 - - - - - - diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index 9547664..9bb8397 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -353,7 +353,7 @@ void MainWindow::load_local_cfg() { string cmd_default_get_dhcp = "/usr/bin/ubconfig --source=default get NTPSERVERS_DEFAULT"; this->entry_dhcp_mess(cmd_get_dhcp, cmd_default_get_dhcp); string hw = "/usr/bin/ubconfig --default --source system get clock HWCLOCK_SYNC"; - string hw_default = "/usr/bin/ubconfig --default --source system get clock HWCLOCK_SYNC"; + string hw_default = "/usr/bin/ubconfig --source default get clock HWCLOCK_SYNC"; this->entry_hardware_clock(hw, hw_default); info_warning_error(0); } diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 209863f..104ec18 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -1260,7 +1260,7 @@ Format: DD.MM.YYYY - + False popup Внимание! From 3591d60e35a616b833c0457a22334ab4bf7582fc Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 09:48:00 +0600 Subject: [PATCH 17/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B8=20=D0=B8=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- source/ubl-settings-datetime.cc | 6 +++--- ubl-settings-datetime.glade | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a4dbb21..5a2118a 100644 --- a/Makefile +++ b/Makefile @@ -118,7 +118,7 @@ install: check uninstall @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/emblems/" "bg_top.png" @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ubl-datetime-checked.svg" @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ubl-datetime-warning.svg" - @gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ + @gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ &>/dev/null @update-desktop-database --quiet 2>/dev/null @touch /usr/share/applications @echo "Install: OK" diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index 9bb8397..a3441ba 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -125,7 +125,7 @@ void MainWindow::settings() { lblDateTimeSetting->set_sensitive(false); btnBoxAboutDialog->set_visible(false); this->event(); - imgInfo->set("ubl-datetime-warning"); + imgInfo->set_from_icon_name("ubl-datetime-warning", Gtk::ICON_SIZE_MENU); info_status_app("boxInfoMessError"); lblWarning->set_text(_("The program must be run as root")); } @@ -416,7 +416,7 @@ void MainWindow::save_global_local_cfg() { void MainWindow::info_warning_error(int mess) { if (error_info > 0 || warning_info > 0) { info_status_app("boxInfoMessError"); - imgInfo->set("ubl-datetime-warning"); + imgInfo->set_from_icon_name("ubl-datetime-warning", Gtk::ICON_SIZE_MENU); error_info = 0; warning_info = 0; string mess_error = ""; @@ -444,7 +444,7 @@ void MainWindow::info_warning_error(int mess) { } else { info_status_app("boxInfoMessOK"); - imgInfo->set("ubl-datetime-checked"); + imgInfo->set_from_icon_name("ubl-datetime-checked", Gtk::ICON_SIZE_MENU);//Gtk::IconSize::INHERIT); if (mess == 0) { lblWarning->set_text(_("Local configuration downloaded successfully")); } diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 104ec18..9cc55e3 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -166,7 +166,8 @@ 5 6 6 - checked + 25 + 1 False From d67109c0539025c1a2498b914c062a304c137152 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 10:06:55 +0600 Subject: [PATCH 18/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D0=B1=D0=B0=D0=B3=20=D1=81=20=D0=B8=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D0=BA=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-datetime.cc | 6 +++--- ubl-settings-datetime.glade | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index 9bb8397..a3441ba 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -125,7 +125,7 @@ void MainWindow::settings() { lblDateTimeSetting->set_sensitive(false); btnBoxAboutDialog->set_visible(false); this->event(); - imgInfo->set("ubl-datetime-warning"); + imgInfo->set_from_icon_name("ubl-datetime-warning", Gtk::ICON_SIZE_MENU); info_status_app("boxInfoMessError"); lblWarning->set_text(_("The program must be run as root")); } @@ -416,7 +416,7 @@ void MainWindow::save_global_local_cfg() { void MainWindow::info_warning_error(int mess) { if (error_info > 0 || warning_info > 0) { info_status_app("boxInfoMessError"); - imgInfo->set("ubl-datetime-warning"); + imgInfo->set_from_icon_name("ubl-datetime-warning", Gtk::ICON_SIZE_MENU); error_info = 0; warning_info = 0; string mess_error = ""; @@ -444,7 +444,7 @@ void MainWindow::info_warning_error(int mess) { } else { info_status_app("boxInfoMessOK"); - imgInfo->set("ubl-datetime-checked"); + imgInfo->set_from_icon_name("ubl-datetime-checked", Gtk::ICON_SIZE_MENU);//Gtk::IconSize::INHERIT); if (mess == 0) { lblWarning->set_text(_("Local configuration downloaded successfully")); } diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 104ec18..0acafd1 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -166,7 +166,9 @@ 5 6 6 - checked + gtk-missing-image + 25 + 1 False From 621a4afab6143518de556464bfdd3100aedf77d7 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 10:12:10 +0600 Subject: [PATCH 19/27] fix --- ubl-settings-datetime.glade | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 75d0643..9cc55e3 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -166,10 +166,6 @@ 5 6 6 -<<<<<<< HEAD - gtk-missing-image -======= ->>>>>>> develop 25 1 From 3848e417791eb719e1791927076739ca01310e62 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 10:15:22 +0600 Subject: [PATCH 20/27] fix --- source/ubl-settings-datetime.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index a3441ba..a892754 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -24,17 +24,14 @@ CmdArgParser::CmdArgParser(const std::string& p_name, const std::string& p_descr socketIDArg.set_long_name("socket-id"); socketIDArg.set_flags(Glib::OptionEntry::FLAG_IN_MAIN); socketIDArg.set_description("Settings manager socket"); - Glib::OptionEntry socketExtId; socketExtId.set_long_name("socket-ext-id"); socketExtId.set_flags(Glib::OptionEntry::FLAG_IN_MAIN); socketExtId.set_description("Settings manager secondary socket"); - Glib::OptionEntry socketTrdId; socketTrdId.set_long_name("socket-trd-id"); socketTrdId.set_flags(Glib::OptionEntry::FLAG_IN_MAIN); socketTrdId.set_description("Settings manager secondary socket"); - add_entry(socketIDArg, m_socketID); add_entry(socketExtId, socket_ext_id_I); add_entry(socketTrdId, socket_trd_id_I); @@ -81,6 +78,7 @@ void MainWindow::settings() { map_error["/usr/bin/ubconfig --target global set clock HWCLOCK_SYNC=utc"] = string(_(": \"Hardware time\"")); map_error["date +%Y%m%d -s \""] = string(_(": \"Date\"")); map_error["date +%T -s \""] = string(_(": \"Date\"")); + map_error["/usr/bin/ubconfig --source default get clock HWCLOCK_SYNC"] = string(_(": \"Hardware time\"")); this->get_builder(); this->add_CSS(); ubl_make_plugs(boxSave,boxButton, socket_ext_id_I, socket_trd_id_I); From cabfa962a62682c29db3f01ea31e582ffa944ac1 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 11:12:40 +0600 Subject: [PATCH 21/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BD=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 4 ++-- ...etime-checked.svg => ru.ublinux.ubl-datetime-checked.svg | 0 ...etime-warning.svg => ru.ublinux.ubl-datetime-warning.svg | 0 source/ubl-settings-datetime.cc | 6 +++--- 4 files changed, 5 insertions(+), 5 deletions(-) rename ubl-datetime-checked.svg => ru.ublinux.ubl-datetime-checked.svg (100%) rename ubl-datetime-warning.svg => ru.ublinux.ubl-datetime-warning.svg (100%) diff --git a/Makefile b/Makefile index 5a2118a..d0405a8 100644 --- a/Makefile +++ b/Makefile @@ -116,8 +116,8 @@ install: check uninstall @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "${pkgname}.svg" @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "${pkgname}.png" @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/emblems/" "bg_top.png" - @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ubl-datetime-checked.svg" - @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ubl-datetime-warning.svg" + @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ru.ublinux.ubl-datetime-checked.svg" + @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ru.ublinux.ubl-datetime-warning.svg" @gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ &>/dev/null @update-desktop-database --quiet 2>/dev/null @touch /usr/share/applications diff --git a/ubl-datetime-checked.svg b/ru.ublinux.ubl-datetime-checked.svg similarity index 100% rename from ubl-datetime-checked.svg rename to ru.ublinux.ubl-datetime-checked.svg diff --git a/ubl-datetime-warning.svg b/ru.ublinux.ubl-datetime-warning.svg similarity index 100% rename from ubl-datetime-warning.svg rename to ru.ublinux.ubl-datetime-warning.svg diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index a892754..e7b1716 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -123,7 +123,7 @@ void MainWindow::settings() { lblDateTimeSetting->set_sensitive(false); btnBoxAboutDialog->set_visible(false); this->event(); - imgInfo->set_from_icon_name("ubl-datetime-warning", Gtk::ICON_SIZE_MENU); + imgInfo->set_from_icon_name("ru.ublinux.ubl-settings-datetime.warning", Gtk::ICON_SIZE_MENU); info_status_app("boxInfoMessError"); lblWarning->set_text(_("The program must be run as root")); } @@ -414,7 +414,7 @@ void MainWindow::save_global_local_cfg() { void MainWindow::info_warning_error(int mess) { if (error_info > 0 || warning_info > 0) { info_status_app("boxInfoMessError"); - imgInfo->set_from_icon_name("ubl-datetime-warning", Gtk::ICON_SIZE_MENU); + imgInfo->set_from_icon_name("ru.ublinux.ubl-settings-datetime.warning", Gtk::ICON_SIZE_MENU); error_info = 0; warning_info = 0; string mess_error = ""; @@ -442,7 +442,7 @@ void MainWindow::info_warning_error(int mess) { } else { info_status_app("boxInfoMessOK"); - imgInfo->set_from_icon_name("ubl-datetime-checked", Gtk::ICON_SIZE_MENU);//Gtk::IconSize::INHERIT); + imgInfo->set_from_icon_name("ru.ublinux.ubl-datetime-checked", Gtk::ICON_SIZE_MENU);//Gtk::IconSize::INHERIT); if (mess == 0) { lblWarning->set_text(_("Local configuration downloaded successfully")); } From b477d45885f3cb228ef13e0b5a2dcd648f7a67f6 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 11:34:59 +0600 Subject: [PATCH 22/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20about?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-datetime.cc | 4 ++-- ubl-settings-datetime.glade | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index e7b1716..b3a941a 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -909,13 +909,13 @@ array MainWindow::split_region_zone(string &read_reg_zon_cfg) { void MainWindow::enter_zone(string &cmd) { int activ_index_reg = cbRegion->get_active_row_number(); - string reg_text=array_region[activ_index_reg]; + string reg_text = array_region[activ_index_reg]; int activ_index = cbZone->get_active_row_number(); string zone_text = ""; if(!(reg_text.empty())) { int index= 0; for (const auto &zone: time_reg_map.at(reg_text)) { - if (index==activ_index) { + if (index == activ_index) { zone_text=zone; } index+= 1; diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 9cc55e3..459f6fa 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -11,6 +11,8 @@ ubl-settings-datetime dialog True + False + False ubl-settings-datetime 1.2 Copyright © 2023 - UBSoft Software LLC From 8a24ab6af15b501dfe74981355dda7532d0ccce6 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 12:57:29 +0600 Subject: [PATCH 23/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D0=B8=D0=BA=D0=BE=D0=BD=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 12 ++++++------ ...time.png => ru.ublinux.ubl-settings-datetime.png | Bin ...time.svg => ru.ublinux.ubl-settings-datetime.svg | 0 ubl-settings-datetime.desktop | 2 +- ubl-settings-datetime.glade | 8 +++++--- 5 files changed, 12 insertions(+), 10 deletions(-) rename ubl-settings-datetime.png => ru.ublinux.ubl-settings-datetime.png (100%) rename ubl-settings-datetime.svg => ru.ublinux.ubl-settings-datetime.svg (100%) diff --git a/Makefile b/Makefile index d0405a8..970147d 100644 --- a/Makefile +++ b/Makefile @@ -74,8 +74,8 @@ uninstall: $(RM) "/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ done @for SIZE in 16x16 32x32 48x48 scalable; do \ - $(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/${pkgname}.svg"; \ - $(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/${pkgname}.png"; \ + $(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/ru.ublinux.${pkgname}.svg"; \ + $(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/ru.ublinux.${pkgname}.png"; \ done @for FILE_SVG in $(wildcard *.svg); do \ for SIZE in 16x16 32x32 48x48 scalable; do \ @@ -103,18 +103,18 @@ install: check uninstall done @for SIZE in 16 32 48; do \ install -dm755 "${pkgdir}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ - rsvg-convert -w $${SIZE} -h $${SIZE} -f png --keep-image-data ${pkgname}.svg -o "${pkgdir}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/${pkgname}.png"; \ + rsvg-convert -w $${SIZE} -h $${SIZE} -f png --keep-image-data "ru.ublinux.${pkgname}.svg" -o "${pkgdir}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/ru.ublinux.${pkgname}.png"; \ done @install -dm755 "${pkgdir}/usr/share/icons/hicolor/scalable/apps" - @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/apps/" "${pkgname}.svg" + @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/apps/" "ru.ublinux.${pkgname}.svg" @install -Dm755 -t "${pkgdir}/usr/bin/" "${CMAKE_BUILD_DIR}/${pkgname}" @install -Dm644 -t "${pkgdir}/usr/share/applications/" "${pkgname}.desktop" @install -Dm644 -t "${pkgdir}/usr/share/polkit-1/actions/" "ru.ublinux.pkexec.${pkgname}.exec.policy" @install -dm755 "${pkgdir}/usr/share/${pkgname}"/{ui,images,css} @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/ui/" "${pkgname}.glade" @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/css/" style.css - @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "${pkgname}.svg" - @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "${pkgname}.png" + @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "ru.ublinux.${pkgname}.svg" + @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "ru.ublinux.${pkgname}.png" @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/emblems/" "bg_top.png" @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ru.ublinux.ubl-datetime-checked.svg" @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ru.ublinux.ubl-datetime-warning.svg" diff --git a/ubl-settings-datetime.png b/ru.ublinux.ubl-settings-datetime.png similarity index 100% rename from ubl-settings-datetime.png rename to ru.ublinux.ubl-settings-datetime.png diff --git a/ubl-settings-datetime.svg b/ru.ublinux.ubl-settings-datetime.svg similarity index 100% rename from ubl-settings-datetime.svg rename to ru.ublinux.ubl-settings-datetime.svg diff --git a/ubl-settings-datetime.desktop b/ubl-settings-datetime.desktop index 6ed43e7..edc26a9 100644 --- a/ubl-settings-datetime.desktop +++ b/ubl-settings-datetime.desktop @@ -8,7 +8,7 @@ Comment=Date time settings Comment[ru]=Приложение для настройки даты и времени Type=Application Exec=pkexec ubl-settings-datetime -Icon=ubl-settings-datetime +Icon=ru.ublinux.ubl-settings-datetime Terminal=false X-XfcePluggable=true X-UBLPluggable=true diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 459f6fa..d179374 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -23,7 +23,7 @@ Подробнее в <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, версии 2 или позднее</a>. UBGroup UBGroup - ubl-settings-datetime + ru.ublinux.ubl-settings-datetime True gpl-2-0 @@ -227,7 +227,7 @@ 6 6 69 - ubl-settings-datetime + ru.ublinux.ubl-settings-datetime False @@ -984,7 +984,7 @@ Format: DD.MM.YYYY 5 5 32 - ubl-settings-datetime + ru.ublinux.ubl-settings-datetime @@ -1185,6 +1185,7 @@ Format: DD.MM.YYYY False Внимание! + ru.ublinux.ubl-settings-datetime dialog @@ -1268,6 +1269,7 @@ Format: DD.MM.YYYY popup Внимание! center + ru.ublinux.ubl-settings-datetime dialog From f0b9702e41a469a2c7d52ccd5902908a1ab4108a Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 13:09:19 +0600 Subject: [PATCH 24/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BD=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 5 ++--- source/ubl-settings-datetime.cc | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 970147d..0ba8841 100644 --- a/Makefile +++ b/Makefile @@ -85,7 +85,6 @@ uninstall: @$(RM) "/usr/bin/${pkgname}" @$(RM) "/usr/share/applications/${pkgname}.desktop" @$(RM) "/usr/share/polkit-1/actions/ru.ublinux.pkexec.${pkgname}.exec.policy" - @$(RM) -rd "/usr/share/${pkgname}" @gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ &>/dev/null @update-desktop-database --quiet 2>/dev/null @touch /usr/share/applications @@ -116,8 +115,8 @@ install: check uninstall @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "ru.ublinux.${pkgname}.svg" @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "ru.ublinux.${pkgname}.png" @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/emblems/" "bg_top.png" - @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ru.ublinux.ubl-datetime-checked.svg" - @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ru.ublinux.ubl-datetime-warning.svg" + @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ru.ublinux.ubl-settings-datetime.checked.svg" + @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ru.ublinux.ubl-settings-datetime.warning.svg" @gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ &>/dev/null @update-desktop-database --quiet 2>/dev/null @touch /usr/share/applications diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index b3a941a..ee18714 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -442,7 +442,7 @@ void MainWindow::info_warning_error(int mess) { } else { info_status_app("boxInfoMessOK"); - imgInfo->set_from_icon_name("ru.ublinux.ubl-datetime-checked", Gtk::ICON_SIZE_MENU);//Gtk::IconSize::INHERIT); + imgInfo->set_from_icon_name("ru.ublinux.ubl-settings-datetime.checked", Gtk::ICON_SIZE_MENU);//Gtk::IconSize::INHERIT); if (mess == 0) { lblWarning->set_text(_("Local configuration downloaded successfully")); } From b7259665254364a3294ebe724936c79b04233a44 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 13:10:51 +0600 Subject: [PATCH 25/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BD=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...me-checked.svg => ru.ublinux.ubl-settings-datetime.checked.svg | 0 ...me-warning.svg => ru.ublinux.ubl-settings-datetime.warning.svg | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename ru.ublinux.ubl-datetime-checked.svg => ru.ublinux.ubl-settings-datetime.checked.svg (100%) rename ru.ublinux.ubl-datetime-warning.svg => ru.ublinux.ubl-settings-datetime.warning.svg (100%) diff --git a/ru.ublinux.ubl-datetime-checked.svg b/ru.ublinux.ubl-settings-datetime.checked.svg similarity index 100% rename from ru.ublinux.ubl-datetime-checked.svg rename to ru.ublinux.ubl-settings-datetime.checked.svg diff --git a/ru.ublinux.ubl-datetime-warning.svg b/ru.ublinux.ubl-settings-datetime.warning.svg similarity index 100% rename from ru.ublinux.ubl-datetime-warning.svg rename to ru.ublinux.ubl-settings-datetime.warning.svg From 5dc590b4b347e3384e46814859e29904ef714b9e Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 14:53:12 +0600 Subject: [PATCH 26/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B0=D0=BF=D0=BF=D0=B0=D1=80=D0=B0=D1=82=D0=BD=D1=8B=D1=85=20?= =?UTF-8?q?=D1=87=D0=B0=D1=81=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-datetime.cc | 40 +++++---------------------------- source/ubl-settings-datetime.h | 3 +-- 2 files changed, 6 insertions(+), 37 deletions(-) diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index ee18714..4bcbaa0 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -363,8 +363,7 @@ void MainWindow::load_globl_cfg() { string cmd_zone = "/usr/bin/ubconfig --default --source global get clock ZONE"; this->fill_in_reg_zone(cmd_zone); string hw = "/usr/bin/ubconfig --source global get clock HWCLOCK_SYNC"; - string hw_default = "/usr/bin/ubconfig --default --source global get clock HWCLOCK_SYNC"; - this->entry_hardware_clock(hw, hw_default); + this->entry_hardware_clock(hw); info_warning_error(1); } @@ -378,7 +377,7 @@ void MainWindow::save_local_cfg() { this->save_Dhcp(cmd_default, cmd_dhcp, remove_ntp, cmd_set_ntp); string local = "/usr/bin/ubconfig --target system set clock HWCLOCK_SYNC=localtime"; string hw = "/usr/bin/ubconfig --target system set clock HWCLOCK_SYNC=utc"; - this->hardware_clock_global(local, hw); + this->entry_hardware_clock(hw); info_warning_error(2); } @@ -497,29 +496,7 @@ void MainWindow::hardware_clock_global(string &local, string &etc) { } } -void MainWindow::entry_hardware_clock_default(string &cmd_default) { - int error = warning_info; - struct Result obj_result_default = this->wrapper_call(cmd_default); - if (obj_result_default.error == 0) { - if (obj_result_default.response.find("localtime") != string::npos) { - cbHw->set_active(0); - } - else if (obj_result_default.response.find("utc") != string::npos) { - cbHw->set_active(1); - - } - - } - else if (obj_result_default.error == 3) { - if (error != warning_info) { - warning_info = error; - } - cbHw->set_active(-1); - } - -} - -void MainWindow::entry_hardware_clock(string &cmd, string &cmd_default) { +void MainWindow::entry_hardware_clock(string &cmd) { int error = warning_info; struct Result obj_result = this->wrapper_call(cmd); if (obj_result.error == 0) { @@ -530,18 +507,11 @@ void MainWindow::entry_hardware_clock(string &cmd, string &cmd_default) { cbHw->set_active(1); } else { - this->entry_hardware_clock_default(cmd_default); + cbHw->set_active(-1); } } - else if (obj_result.error == 3) { - if (error != warning_info) { - warning_info = error; - } - cbHw->set_active(-1); - this->entry_hardware_clock_default(cmd_default); - } else { - this->entry_hardware_clock_default(cmd_default); + cbHw->set_active(-1); } } diff --git a/source/ubl-settings-datetime.h b/source/ubl-settings-datetime.h index dd466a6..9f32d1f 100755 --- a/source/ubl-settings-datetime.h +++ b/source/ubl-settings-datetime.h @@ -143,8 +143,7 @@ class MainWindow : public Gtk::ApplicationWindow { void hardware_clock_global(string &local, string &etc); void info_warning_error(int mess); void synopsis_show(); - void entry_hardware_clock(string &cmd, string &cmd_default); - void entry_hardware_clock_default(string &cmd_default); + void entry_hardware_clock(string &cmd); void save_global_local_cfg(); void fill_in_reg_zone(string &cmd); void load_globl_cfg(); From fd671140bb8b81f3f6af9c14d3ea49f79dddd006 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 15 Mar 2023 14:57:11 +0600 Subject: [PATCH 27/27] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B0=D0=BF=D0=BF=D0=B0=D1=80=D0=B0=D1=82=D0=BD=D1=8B=D1=85=20?= =?UTF-8?q?=D1=87=D0=B0=D1=81=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-datetime.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index 4bcbaa0..b01728f 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -351,8 +351,7 @@ void MainWindow::load_local_cfg() { string cmd_default_get_dhcp = "/usr/bin/ubconfig --source=default get NTPSERVERS_DEFAULT"; this->entry_dhcp_mess(cmd_get_dhcp, cmd_default_get_dhcp); string hw = "/usr/bin/ubconfig --default --source system get clock HWCLOCK_SYNC"; - string hw_default = "/usr/bin/ubconfig --source default get clock HWCLOCK_SYNC"; - this->entry_hardware_clock(hw, hw_default); + this->entry_hardware_clock(hw); info_warning_error(0); } @@ -513,6 +512,9 @@ void MainWindow::entry_hardware_clock(string &cmd) { else { cbHw->set_active(-1); } + if (error != warning_info){ + warning_info = error; + } }