From a0805990522d2e0e94790476cfb8b1151aebd6ee Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 22 Mar 2023 14:00:38 +0600 Subject: [PATCH 1/2] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BD=D0=B0?= =?UTF-8?q?=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B0=20=D1=84?= =?UTF-8?q?=D0=BE=D0=BD=D0=B0=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20=D0=A1++?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- #ubl-settings-datetime.glade# | 1344 ------------------------------- source/ubl-settings-datetime.cc | 11 +- source/ubl-settings-datetime.h | 3 + ubl-settings-datetime.css | 4 +- ubl-settings-datetime.glade | 170 ++-- 5 files changed, 105 insertions(+), 1427 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 26f879f..0000000 --- a/#ubl-settings-datetime.glade# +++ /dev/null @@ -1,1344 +0,0 @@ - - - - - - False - О Программе - False - True - center - ubl-settings-datetime - dialog - True - False - False - 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 - com.ublinux.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 - - - - - - 659 - False - - - True - False - vertical - - - True - False - vertical - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 6 - 6 - 25 - 1 - - - False - True - 0 - - - - - True - False - start - 5 - 5 - 5 - 5 - 6 - 6 - - - - - - - True - True - 1 - - - - - False - True - 0 - - - - - True - False - vertical - - - True - False - - - True - False - - - 90 - True - False - 5 - 5 - 5 - 5 - 6 - 6 - 69 - com.ublinux.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 - - - - - -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 - - - True - True - 5 - - - - - True - True - True - Интерактивный выбор даты - 5 - 10 - 5 - 10 - 6 - 6 - - - True - False - x-office-calendar - - - - - False - True - 6 - - - - - False - True - 1 - - - - - True - False - - - 252 - 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: - - - False - True - 0 - - - - - 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 - com.ublinux.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 - - - - - - - 240 - 185 - False - btnChooseDate - bottom - none - - - True - True - 10 - 10 - 10 - 10 - 10 - 10 - 2023 - 1 - 10 - - - - - False - Внимание! - com.ublinux.ubl-settings-datetime - 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 - com.ublinux.ubl-settings-datetime - 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 f363fe7..99a11c9 100755 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -7,6 +7,7 @@ const string path_glade = "/usr/share/ubl-settings-datetime/ui/"; const string app_name = "ubl-settings-datetime"; const string path_locale = "/usr/share/locale/"; const string path_css = "/usr/share/ubl-settings-datetime/css/ubl-settings-datetime.css"; +const string path_img_head_background = "/usr/share/ubl-settings-datetime/images/logo-background.png"; bool flag_datetime = false; bool flag_timezone = false; bool flag_ntp_mode = false; @@ -84,6 +85,10 @@ void MainWindow::settings() { map_error["ubconfig --source default get clock HWCLOCK_SYNC"] = string(gettext(": \"Hardware time\"")); this->get_builder(); this->add_CSS(); + Gtk::Widget *boxWidget; + builder->get_widget("boxColor", boxWidget); + overHead->add_overlay(*boxWidget); + ubl_make_plugs(boxSave,boxButton, socket_ext_id_I, socket_trd_id_I); year = 0; month = 0; @@ -224,8 +229,7 @@ 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 boxColor_css = boxColor->get_style_context(); - boxColor_css->add_class("cssboxColor1"); + imgHeadBackground->set(path_img_head_background); Glib::RefPtr lblHead_css = lblHead->get_style_context(); Glib::RefPtr boxButton_css = boxButton->get_style_context(); Glib::RefPtr boxSave_css = boxSave->get_style_context(); @@ -308,6 +312,9 @@ void MainWindow::get_builder() { builder->get_widget("imgSettings", imgSettings); builder->get_widget("imgSave", imgSave); builder->get_widget("boxWidgetFunc", boxWidgetFunc); + builder->get_widget("overHead", overHead); + builder->get_widget("imgHeadBackground", imgHeadBackground); + } void MainWindow::gui_exit() { diff --git a/source/ubl-settings-datetime.h b/source/ubl-settings-datetime.h index 83ee0a5..cf0933d 100644 --- a/source/ubl-settings-datetime.h +++ b/source/ubl-settings-datetime.h @@ -27,6 +27,7 @@ extern const string path_glade; extern const string app_name; extern const string path_locale; extern const string path_css; +extern const string path_img_head_background; extern bool flag_datetime; extern bool flag_timezone; extern bool flag_ntp_mode; @@ -114,6 +115,8 @@ class MainWindow : public Gtk::ApplicationWindow { Gtk::Image *imgLoad; Gtk::Image *imgSave; Gtk::Image *imgSettings; + Gtk::Overlay *overHead; + Gtk::Image *imgHeadBackground; string array_hw[2]; string array_hw_local[2]; bool flag_load = false; diff --git a/ubl-settings-datetime.css b/ubl-settings-datetime.css index e323d55..57095ec 100644 --- a/ubl-settings-datetime.css +++ b/ubl-settings-datetime.css @@ -1,9 +1,7 @@ .boxInfoMessError{ background-color: #ea9999; } -.cssboxColor1{ - background: url("/usr/share/ubl-settings-datetime/images/logo-background.png") no-repeat; -} + .boxInfoMessOK{ background-color: #f3f0ac; } diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 47400a5..9b4cd2a 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -51,6 +51,94 @@ + + True + False + + + 90 + True + False + 5 + 5 + 5 + 5 + 6 + 6 + 69 + com.ublinux.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 + + + True False @@ -213,91 +301,17 @@ False vertical - + + 81 True False - - 90 + True False - 5 - 5 - 5 - 5 - 6 - 6 - 69 - com.ublinux.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 + -1 From bbf2a5248aced2d328c52b8b51cd3dc87534a497 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Wed, 22 Mar 2023 15:28:26 +0600 Subject: [PATCH 2/2] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=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 | 145 ++++++++++++++++++++---------------- 1 file changed, 82 insertions(+), 63 deletions(-) diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 9b4cd2a..a62872a 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -361,19 +361,81 @@ True False - - 0 + True False - 5 - 5 - 5 - 5 - 6 - 6 - Time: - True - 0 + + + 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 + + False @@ -381,57 +443,6 @@ 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 @@ -512,7 +523,7 @@ Format: DD.MM.YYYY False - 252 + 0 True True True @@ -1153,6 +1164,14 @@ Format: DD.MM.YYYY + + both + True + + + + + 240 185