Добавлен банер

pull/55/head
Igor Belitskiy 3 years ago
parent 0f6c42dc90
commit 7923ce74b7

@ -117,6 +117,10 @@ 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/${pkgname}/images/" bg_top.png
@install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" alert.svg
@install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" checked.svg
@install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" warning.svg
@install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" close.svg
@gtk-update-icon-cache -fiq /usr/share/icons/hicolor/
@update-desktop-database --quiet 2>/dev/null
@touch /usr/share/applications

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 24 24"
id="svg2"
version="1.1"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
sodipodi:docname="alert.svg"
width="24"
height="24"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata
id="metadata12">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs10" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1027"
id="namedview8"
showgrid="false"
inkscape:zoom="26.825864"
inkscape:cx="10.735908"
inkscape:cy="11.462818"
inkscape:current-layer="svg2"
inkscape:pagecheckerboard="0"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<path
id="path4140"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 12 1 A 11 11 0 0 0 1 12 A 11 11 0 0 0 12 23 A 11 11 0 0 0 23 12 A 11 11 0 0 0 12 1 z M 3.75 10.625 L 20.25 10.625 L 20.25 13.375 L 3.75 13.375 L 3.75 10.625 z " />
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -0,0 +1,327 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
version="1.1"
viewBox="0 0 24 24"
id="svg25"
sodipodi:docname="checked.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview27"
pagecolor="#ffffff"
bordercolor="#999999"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="14.8125"
inkscape:cx="-12.219409"
inkscape:cy="9.9578059"
inkscape:window-width="1920"
inkscape:window-height="1027"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg25" />
<defs
id="defs19">
<style
id="current-color-scheme"
type="text/css">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style3">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style5">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style7">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style9">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style11">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style13">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style15">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style17">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
</defs>
<path
id="path21"
d="M 12 1 C 5.906 1 1 5.906 1 12 C 1 18.094 5.906 23 12 23 C 18.094 23 23 18.094 23 12 C 23 5.906 18.094 1 12 1 z M 15.480469 8.9042969 C 16.392469 8.8782969 16.860031 9.9850937 16.207031 10.621094 L 11 15.828125 L 8.09375 12.921875 C 7.11175 11.979875 8.5648125 10.525813 9.5078125 11.507812 L 11 13 L 14.792969 9.2070312 A 1 1 0 0 1 15.480469 8.9042969 z "
style="fill:#ffffff" />
</svg>

After

Width:  |  Height:  |  Size: 7.4 KiB

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 24 24"
id="svg2"
version="1.1"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
sodipodi:docname="close.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata
id="metadata12">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs10" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1027"
id="namedview8"
showgrid="false"
inkscape:zoom="8"
inkscape:cx="6.875"
inkscape:cy="11.0625"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
inkscape:pagecheckerboard="0" />
<path
d="M 3.8312451,0.00270105 C 6.6165637,2.6335365 9.2800785,5.3919927 12.002108,8.0876398 14.724116,5.3918531 17.387684,2.6337829 20.172977,0.00270105 l 3.827655,3.82765225 c -2.630952,2.7854245 -5.389244,5.4487758 -8.084944,8.1708607 2.695781,2.722007 5.453855,5.385575 8.084944,8.170866 l -3.827655,3.827648 c -2.78543,-2.630944 -5.448781,-5.389235 -8.170869,-8.084934 -2.7220013,2.695782 -5.3855699,5.453852 -8.1708629,8.084934 L 0.0035959,20.17208 C 2.634542,17.386651 5.3928334,14.723302 8.0885352,12.001214 5.3927504,9.2792119 2.6346777,6.6156425 0.0035959,3.8303533 Z"
style="fill:#ffffff;stroke-width:2.18155"
id="path6"
inkscape:connector-curvature="0" />
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -78,8 +78,11 @@ void MainWindow::settings(){
btnBoxAboutDialog->set_visible(false);
this->event();
this->parse_text_date();
btnSaveGlobl->set_sensitive(false);
this->download_globl_cfg();
this->download_local_cfg();
orevrlayInfo->add_overlay(*boxInfoError);
imgInfo->set("/usr/share/ubl-settings-datetime/images/checked.svg");
imageCloseInfo->set("/usr/share/ubl-settings-datetime/images/close.svg");
}
else{
btnSaveLocal->set_sensitive(false);
@ -112,14 +115,6 @@ void MainWindow::settings(){
}
bool MainWindow::gui_set_orientation(GdkEventConfigure* event){
if (event){}
//int w;
//w = this->get_width();
//popWarning->set_default_widget(w);
return false;
}
int MainWindow::check_root(){
if (geteuid()!=0){
@ -131,12 +126,12 @@ int MainWindow::check_root(){
}
void MainWindow::lacalization(){
//aboutWindows->set_title(_(""));
aboutWindows->set_comments(_("Settings the date and time"));
btnSynopsis->set_label(_("Synopsis"));
aboutProgram->set_label(_("About the program"));
aboutWindows->set_comments(_("Setting the date and time"));
lblSave->set_label(_("Save"));
lblDownload->set_label(_("Download"));
btnDownloadGlobal->set_label(_("Download global"));
btnDownloadlocal->set_label(_("Download local"));
btnSaveLocal->set_label(_("Save local"));
btnSaveGlobl->set_label(_("Save global"));
txtDate->set_tooltip_text(_("Date of\nFormat: DD.MM.YYYY"));
@ -155,13 +150,9 @@ void MainWindow::lacalization(){
lblZone->set_text(_("Zone"));
lblSynchronizeBtn->set_text(_("Sync by"));
this->set_title(_("ubl-settings-datetime"));
windowsNnpClose->set_title(_("Warning!"));
mess_sudo->set_title(_("Warning!"));
mess_dchp->set_title(_("Warning!"));
lblTimeBios->set_text(_("Synchronize hardware time"));
lblBanerStopNtp->set_text(_("Active service detected\nAutomatic time and date synchronization service detected"));
lblNtpStop->set_text(_("Stop the synchronization service"));
lblNtpClose->set_text(_("Close"));
//_lblSynchronizebChk->set_text(_("Synchronize via NTP"));
}
@ -207,7 +198,22 @@ void MainWindow::add_CSS(){
//Glib::RefPtr<Gtk::StyleContext> context_button = btnHardwareTime->get_style_context();
context->add_class("cssboxColor1");
context_lbl_head->add_class("textHead");
//context_button->add_class("textHead");
Glib::RefPtr<Gtk::StyleContext> boxInfo = boxInfoError->get_style_context();
boxInfo->add_class("boxInfoOK");
Glib::RefPtr<Gtk::StyleContext> btnWarngingCloseCss = btnWarngingClose->get_style_context();
btnWarngingCloseCss->add_class("boxInfoOK");
}
void MainWindow::info_status_app(string style){
Glib::RefPtr<Gtk::CssProvider> cssProvider = Gtk::CssProvider::create();
cssProvider->load_from_path(path_css);
Glib::RefPtr<Gtk::StyleContext> styleContext = Gtk::StyleContext::create();
Glib::RefPtr<Gdk::Screen> 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<Gtk::StyleContext> boxInfo = boxInfoError->get_style_context();
boxInfo->add_class(style);
Glib::RefPtr<Gtk::StyleContext> btnWarngingCloseCss = btnWarngingClose->get_style_context();
btnWarngingCloseCss->add_class(style);
}
void MainWindow::get_builder(){
@ -242,12 +248,6 @@ void MainWindow::get_builder(){
builder->get_widget("mess_sudo",mess_sudo);
builder->get_widget("lblMessageSudo",lblMessageSudo);
builder->get_widget("btnMessCloseSudo",btnMessCloseSudo);
builder->get_widget("windowsNnpClose",windowsNnpClose);
builder->get_widget("btnNtpStop",btnNtpStop);
builder->get_widget("btnNtpWinClose",btnNtpWinClose);
builder->get_widget("lblNtpStop",lblNtpStop);
builder->get_widget("lblNtpClose",lblNtpClose);
builder->get_widget("lblBanerStopNtp",lblBanerStopNtp);
builder->get_widget("btnSaveLocal",btnSaveLocal);
builder->get_widget("btnSaveGlobl",btnSaveGlobl);
builder->get_widget("lblSave",lblSave);
@ -255,12 +255,17 @@ void MainWindow::get_builder(){
builder->get_widget("btnDownload",btnDownload);
builder->get_widget("lblDownload",lblDownload);
builder->get_widget("btnDownloadGlobal", btnDownloadGlobal);
builder->get_widget("btnDownloadlocal", btnDownloadlocal);
builder->get_widget("btnSettings", btnSettings);
builder->get_widget("aboutWindows", aboutWindows);
builder->get_widget("btnBoxAboutDialog", btnBoxAboutDialog);
builder->get_widget("btnSynopsis", btnSynopsis);
builder->get_widget("aboutProgram", aboutProgram);
builder->get_widget("boxInfoError", boxInfoError);
builder->get_widget("orevrlayInfo", orevrlayInfo);
builder->get_widget("btnWarngingClose", btnWarngingClose);
builder->get_widget("lblWarning", lblWarning);
builder->get_widget("imgInfo", imgInfo);
builder->get_widget("imageCloseInfo", imageCloseInfo);
this->add_CSS();
}
void MainWindow::gui_exit(){
@ -284,26 +289,37 @@ void MainWindow::event(){
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));
btnNtpWinClose->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::wind_close_ntp));
btnNtpStop->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::stop_ntp));
btnDownloadGlobal->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::download_globl_cfg));
btnSaveLocal->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::save_local_cfg));
btnSaveGlobl->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::save_global_cfg));
btnDownloadlocal->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::download_local_cfg));
btnSettings->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::about_Dialog_show));
signal_configure_event().connect(sigc::mem_fun(*this, &MainWindow::gui_set_orientation), false);
aboutProgram->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::about_Dialog_show));
btnDownload->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::download_local_cfg));
btnSynopsis->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::synopsis_show));
btnWarngingClose->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::close_banner_info));
Glib::signal_timeout().connect(sigc::mem_fun(*this, &MainWindow::close_banner_info_timer), 10000);
}
void MainWindow::about_Dialog_show(){
aboutWindows->show();
bool MainWindow::close_banner_info_timer(){
if (bool_close_banner_info==true){
boxInfoError->hide();
}
return false;
}
void MainWindow::close_banner_info(){
boxInfoError->hide();
}
void MainWindow::download_globl_cfg(){
this->entry_dhcp_mess();
string cmd = "/usr/bin/ubconfig --default --source global get clock ZONE";
this->fill_in_reg_zone(cmd);
btnSaveGlobl->set_sensitive(true);
void MainWindow::synopsis_show(){
//wrapper_system("xdg-open https://wiki.ublinux.ru/ru/home");
error_info=0;
warning_info=0;
}
void MainWindow::about_Dialog_show(){
aboutWindows->show();
}
void MainWindow::download_local_cfg(){
@ -311,45 +327,120 @@ void MainWindow::download_local_cfg(){
this->fill_in_reg_zone(cmd);
this->update_hour_minute();
this->update_calendar();
info_warning_error(0);
}
void MainWindow::download_globl_cfg(){
this->entry_dhcp_mess();
string cmd = "/usr/bin/ubconfig --default --source global get clock ZONE";
this->fill_in_reg_zone(cmd);
info_warning_error(1);
}
void MainWindow::save_local_cfg(){
string cmd = "ubconfig --target system set clock ZONE=";
this->enter_zone(cmd);
info_warning_error(2);
}
void MainWindow::save_global_cfg(){
string cmd = "/usr/bin/ubconfig --target global set clock ZONE=";
this->enter_zone(cmd);
this->save_Dhcp();
info_warning_error(3);
}
void MainWindow::wind_close_ntp(){
windowsNnpClose->hide();
void MainWindow::info_warning_error(int mess){
boxInfoError->show();
if (error_info!=0){
imgInfo->set("/usr/share/ubl-settings-datetime/images/alert.svg");
bool_close_banner_info=false;
info_status_app("boxInfoError");
error_info=0;
warning_info=0;
if (mess == 0){
lblWarning->set_text(_("Local configuration reading error"));
}
else if (mess == 1){
lblWarning->set_text(_("Global configuration read error"));
}
else if (mess == 2){
lblWarning->set_text(_("Local configuration write error"));
}
else if (mess == 3){
lblWarning->set_text(_("Global configuration write error"));
}
}
else if (warning_info!=0){
imgInfo->set("/usr/share/ubl-settings-datetime/images/warning.svg");
bool_close_banner_info=false;
info_status_app("boxInfoWarning");
error_info=0;
warning_info=0;
if (mess == 0){
lblWarning->set_text(_("Local configuration reading error"));
}
else if (mess == 1){
lblWarning->set_text(_("Global configuration read error"));
}
else if (mess == 2){
lblWarning->set_text(_("Local configuration write error"));
}
else if (mess == 3){
lblWarning->set_text(_("Global configuration write error"));
}
}
else{
imgInfo->set("/usr/share/ubl-settings-datetime/images/checked.svg");
bool_close_banner_info=true;
info_status_app("boxInfoOK");
if (mess == 0){
lblWarning->set_text(_("Local configuration downloaded successfully"));
}
else if (mess == 1){
lblWarning->set_text(_("Global configuration downloaded successfully"));
}
else if (mess == 2){
lblWarning->set_text(_("Local configuration successfully written"));
}
else if (mess == 3){
lblWarning->set_text(_("Global configuration successfully written"));
}
}
}
void MainWindow::stop_ntp(){
string cmd = "SEL_SERVICE=\"systemd-timesyncd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service; ";
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
cmd ="SEL_SERVICE=\"ntpd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; ";
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
cmd ="SEL_SERVICE=\"ntpdate\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; ";
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
cmd = "SEL_SERVICE=\"chronyd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; ";
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
cmd ="SEL_SERVICE=\"openntpd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ntpd; ";
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
cmd ="SEL_SERVICE=\"ptp4l\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; ";
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
cmd ="SEL_SERVICE=\"phc2sys\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE} ";
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
}
void MainWindow::wrapper_system(string cmd){
int response_cmd = system(cmd.c_str());
if (response_cmd!=0){
error_info+=1;
}
}
void MainWindow::hardware_clock(){
string cmd = "hwclock --systohc";
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
}
void MainWindow::gui_mess_close(){
@ -380,7 +471,7 @@ bool MainWindow::focus_ntp(){
}
if ((flag_error==false) && (flag_error_check_ntp==false)){
cmd = "/usr/bin/ubconfig set network NTPSERVERS=\"" + str_ntp + "\"";
response_cmd = system(cmd.c_str());
wrapper_system(cmd);
}
else{
if (flag_error==true){
@ -437,7 +528,6 @@ bool MainWindow::check_ntp(string &str_ntp){
for (size_t i = 0; i < str_ntp.size(); i++){
flag_error=false;
char_ntp[0] = str_ntp[i];
cout << char_ntp << endl;
for (int index=0;index<11;index++){
if (index==10){
@ -446,8 +536,6 @@ bool MainWindow::check_ntp(string &str_ntp){
else{
simvol = to_string(index);
}
cout << (simvol==char_ntp) << endl;
cout << simvol << " " << char_ntp << endl;
if (simvol==char_ntp){
flag_error=false;
@ -487,16 +575,19 @@ struct MainWindow::Result<string> MainWindow::wrapper_call(string cmd){
else{
obj_result.response = response;
obj_result.error = 1;
warning_info+=1;
}
}
else{
obj_result.response = response;
obj_result.error = 2;
warning_info+=1;
}
}
else{
obj_result.response = response;
obj_result.error = 3;
warning_info+=1;
}
return obj_result;
}
@ -569,18 +660,18 @@ void MainWindow::save_Dhcp(){
}
else if (activ_index==0){
string cmd = "/usr/bin/ubconfig set network NTPSERVERS=default";
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
}
else if (activ_index==1){
string cmd = "/usr/bin/ubconfig set network NTPSERVERS=dhcp";
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
}
else if (activ_index==2){
this->focus_ntp();
}
else if (activ_index==3){
string cmd = "/usr/bin/ubconfig remove network NTPSERVERS";
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
}
}
@ -747,7 +838,7 @@ void MainWindow::enter_zone(string &cmd){
str_zone=zone_text;
str_region=reg_text;
cmd = cmd + str_region + "/" + str_zone;
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
}
else{
str_zone="";
@ -771,7 +862,6 @@ void MainWindow::parse_text_date(){
void MainWindow::append_region_zone(string region, string zone, Gtk::ComboBoxText *tmpCbReg, Gtk::ComboBoxText *tmpCbZone){
str_region=region;
str_region_glob=region;
int index = 0;
Glib::ustring reg_local = "";
int size_vec = array_region_local.size();
@ -892,7 +982,7 @@ void MainWindow::update_time_date(){
if (str_data==str_data_entry){
cmd = "date +%Y%m%d -s \"" + to_string(year)+
str_month+str_day+"\"";
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
txtDate->set_text(str_data);
year=0;
month=0;
@ -912,7 +1002,7 @@ void MainWindow::update_time_date(){
cmd = "date +%T -s \""+
to_string(hour) + ":" + to_string(minute)
+ ":" + to_string(ltm->tm_sec) +"\"";
response_cmd=system(cmd.c_str());
wrapper_system(cmd);
}
void MainWindow::post_entry_data(){

@ -75,42 +75,37 @@ class MainWindow : public Gtk::ApplicationWindow {
Gtk::Label *lblTimeBios;
Gtk::Label *lblSave;
Gtk::Label *lblDownload;
Gtk::Label *lblBanerStopNtp;
Gtk::Button *btnHardwareTime;
Gtk::CheckButton *cbxSynchronizeNtp;
Gtk::Window *windowsNnpClose;
Gtk::Button *btnNtpStop;
Gtk::Button *btnNtpWinClose;
Gtk::Label *lblNtpStop;
Gtk::Label *lblNtpClose;
Gtk::Entry *txtNtpServer;
Gtk::Entry *txtDate;
Gtk::Widget *btnDownload;
Gtk::MenuButton *btnDownload;
Gtk::MenuItem *btnSaveLocal;
Gtk::MenuItem *btnSaveGlobl;
Gtk::MenuItem *btnDownloadGlobal;
Gtk::MenuItem *btnDownloadlocal;
Gtk::AboutDialog *aboutWindows;
Gtk::ButtonBox *btnBoxAboutDialog;
//Gtk::MenuButton *btnSave;
//Gtk::MenuButton *btnDownload;
Gtk::Button *btnSettings;
Gtk::MenuButton *btnSettings;
Gtk::MenuItem *btnSynopsis;
Gtk::MenuItem *aboutProgram;
Gtk::Widget *boxInfoError;
Gtk::Overlay *orevrlayInfo;
Gtk::Button *btnWarngingClose;
Gtk::Label *lblWarning;
Gtk::Image *imgInfo;
Gtk::Image *imageCloseInfo;
std::map <string, vector<string>> time_reg_map;
std::map <string, vector<string>> time_reg_map_local;
unsigned int year=0;
unsigned int month=0;
unsigned int day=0;
int error_info = 0;
int warning_info = 0;
int hour;
int minute;
string str_region="";
string str_region_glob="";
string str_txtDate;
string strtxtNtpServer;
string str_zone="";
string str_zoneGlob;
int response_cmd;
bool bool_close_banner_info=true;
template<typename Type>
struct Result{
Type response;
@ -123,6 +118,10 @@ class MainWindow : public Gtk::ApplicationWindow {
MainWindow(BaseObjectType* obj, Glib::RefPtr<Gtk::Builder> const& builder);
MainWindow(Glib::RefPtr<Gtk::Builder> const& builder);
virtual ~MainWindow() = default;
void info_warning_error(int mess);
bool close_banner_info_timer();
void close_banner_info();
void synopsis_show();
void fill_in_reg_zone(string &cmd);
void download_globl_cfg();
void about_Dialog_show();
@ -162,8 +161,9 @@ class MainWindow : public Gtk::ApplicationWindow {
bool gui_exit_2(GdkEventAny* event);
void stop_ntp();
void wind_close_ntp();
void wrapper_system(string cmd);
void info_status_app(string style);
void wrapper_update_time_date();
bool gui_set_orientation(GdkEventConfigure* event);
string zone_file_read(string zone);
void sort_zone(vector<string> *time_reg_map_local,vector<string> *time_reg_map);
array<string, 2> split_region_zone(string read_reg_zon_cfg);

@ -4,3 +4,14 @@
.textHead{
text-shadow: 1px 1px #ffffff;
}
.boxInfoOK{
background-color:#6edf64;
}
.boxInfoWarning{
background-color: rgba(242, 255, 0, 1);
}
.boxInfoError{
background-color: rgba(255, 0, 0, 1);
}

@ -2,16 +2,6 @@
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">start</property>
<property name="hexpand">True</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<object class="GtkAboutDialog" id="aboutWindows">
<property name="can-focus">False</property>
<property name="title" translatable="yes">О Программе</property>
@ -20,7 +10,7 @@
<property name="program-name">ubl-settings-datetime</property>
<property name="version">1.4</property>
<property name="copyright" translatable="yes">Copyright © 2021 - the ublinux team</property>
<property name="comments" translatable="yes">Настройка даты времени</property>
<property name="comments" translatable="yes">Setting the date and time</property>
<property name="website">https://ublinux.ru/</property>
<property name="website-label" translatable="yes">www.ublinux.ru</property>
<property name="authors">UBGroup</property>
@ -50,6 +40,87 @@
</object>
</child>
</object>
<object class="GtkBox" id="boxInfoError">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">start</property>
<property name="hexpand">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage" id="imgInfo">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="stock">gtk-dialog-warning</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblWarning">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="margin-left">6</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes">Warning!</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="foreground" value="#000000000000"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnWarngingClose">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<child>
<object class="GtkImage" id="imageCloseInfo">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="stock">gtk-remove</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<object class="GtkMenu" id="menu1">
<property name="visible">True</property>
<property name="can-focus">False</property>
@ -74,18 +145,30 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkMenuItem" id="btnDownloadlocal">
<object class="GtkMenuItem" id="btnDownloadGlobal">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Download Global</property>
<property name="use-underline">True</property>
</object>
</child>
</object>
<object class="GtkMenu" id="menu3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkMenuItem" id="btnSynopsis">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Download Local</property>
<property name="label" translatable="yes">Synopsis</property>
<property name="use-underline">True</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="btnDownloadGlobal">
<object class="GtkMenuItem" id="aboutProgram">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Download Global</property>
<property name="label" translatable="yes">About the program</property>
<property name="use-underline">True</property>
</object>
</child>
@ -93,7 +176,7 @@
<object class="GtkWindow" id="window">
<property name="can-focus">False</property>
<child>
<object class="GtkOverlay">
<object class="GtkOverlay" id="orevrlayInfo">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
@ -335,7 +418,7 @@
</child>
<child>
<object class="GtkEntry" id="txtDate">
<property name="width-request">191</property>
<property name="width-request">-1</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tooltip-text" translatable="yes" context="Date of&#10;Format: DD.MM.YYYY" comments="Date of&#10;Format: DD.MM.YYYY">Date
@ -348,7 +431,7 @@ Format: DD.MM.YYYY</property>
<property name="margin-bottom">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
@ -362,7 +445,7 @@ Format: DD.MM.YYYY</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-end">7</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<child>
@ -397,7 +480,7 @@ Format: DD.MM.YYYY</property>
<property name="receives-default">True</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-start">7</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
@ -476,7 +559,7 @@ Format: DD.MM.YYYY</property>
<property name="margin-left">5</property>
<property name="margin-right">10</property>
<property name="margin-start">5</property>
<property name="margin-end">10</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<child>
@ -561,7 +644,7 @@ Format: DD.MM.YYYY</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">5</property>
<property name="margin-bottom">6</property>
</object>
<packing>
<property name="expand">False</property>
@ -581,7 +664,7 @@ Format: DD.MM.YYYY</property>
<property name="margin-start">5</property>
<property name="margin-end">10</property>
<property name="margin-top">6</property>
<property name="margin-bottom">5</property>
<property name="margin-bottom">6</property>
</object>
<packing>
<property name="expand">True</property>
@ -627,7 +710,7 @@ Format: DD.MM.YYYY</property>
<property name="margin-right">10</property>
<property name="margin-start">5</property>
<property name="margin-end">10</property>
<property name="margin-bottom">6</property>
<property name="margin-bottom">5</property>
<property name="label-xalign">0.019999999552965164</property>
<property name="shadow-type">in</property>
<child>
@ -673,7 +756,7 @@ Format: DD.MM.YYYY</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">13</property>
<property name="margin-bottom">6</property>
<property name="hexpand">False</property>
<property name="vexpand">False</property>
</object>
@ -711,7 +794,7 @@ Format: DD.MM.YYYY</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">13</property>
<property name="margin-bottom">6</property>
<property name="hexpand">False</property>
<property name="vexpand">False</property>
</object>
@ -793,16 +876,16 @@ Format: DD.MM.YYYY</property>
</object>
</child>
<child>
<object class="GtkBox" id="boxSave">
<object class="GtkBox" id="boxButton">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkMenuButton" id="btnSave">
<object class="GtkMenuButton" id="btnDownload">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="popup">menu1</property>
<property name="popup">menu2</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@ -817,7 +900,7 @@ Format: DD.MM.YYYY</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="icon-name">go-bottom</property>
<property name="icon-name">media-floppy</property>
</object>
<packing>
<property name="expand">False</property>
@ -826,7 +909,7 @@ Format: DD.MM.YYYY</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblSave">
<object class="GtkLabel" id="lblDownload">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
@ -835,7 +918,7 @@ Format: DD.MM.YYYY</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes">Save</property>
<property name="label" translatable="yes">Download</property>
</object>
<packing>
<property name="expand">False</property>
@ -864,16 +947,16 @@ Format: DD.MM.YYYY</property>
</packing>
</child>
<child>
<object class="GtkBox" id="boxButton">
<object class="GtkBox" id="boxSave">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkMenuButton" id="btnDownload">
<object class="GtkMenuButton" id="btnSave">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="popup">menu2</property>
<property name="popup">menu1</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@ -888,7 +971,7 @@ Format: DD.MM.YYYY</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="icon-name">media-floppy</property>
<property name="icon-name">go-bottom</property>
</object>
<packing>
<property name="expand">False</property>
@ -897,7 +980,7 @@ Format: DD.MM.YYYY</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblDownload">
<object class="GtkLabel" id="lblSave">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
@ -906,10 +989,7 @@ Format: DD.MM.YYYY</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes">Download</property>
<style>
<class name="primary-toolbar"/>
</style>
<property name="label" translatable="yes">Save</property>
</object>
<packing>
<property name="expand">False</property>
@ -919,6 +999,9 @@ Format: DD.MM.YYYY</property>
</child>
</object>
</child>
<style>
<class name="toolbar"/>
</style>
</object>
<packing>
<property name="expand">False</property>
@ -927,16 +1010,23 @@ Format: DD.MM.YYYY</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnSettings">
<object class="GtkMenuButton" id="btnSettings">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="popup">menu3</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="stock">gtk-execute</property>
<property name="pixel-size">25</property>
</object>
</child>
</object>
@ -952,7 +1042,7 @@ Format: DD.MM.YYYY</property>
</object>
<packing>
<property name="pack-type">end</property>
<property name="position">2</property>
<property name="position">3</property>
</packing>
</child>
</object>
@ -1148,178 +1238,4 @@ Format: DD.MM.YYYY</property>
</object>
</child>
</object>
<object class="GtkWindow" id="windowsNnpClose">
<property name="can-focus">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="pixel-size">50</property>
<property name="icon-name">emblem-important</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblBanerStopNtp">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes">Active service detected
Automatic time and date synchronization service detected</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButton" id="btnNtpStop">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="icon-name">media-playback-stop</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblNtpStop">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Stop the synchronization service</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnNtpWinClose">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">6</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="icon-name">window-close</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblNtpClose">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Close</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

@ -49,6 +49,9 @@ msgstr "Введите DHCP!"
msgid "OK"
msgstr "OK"
msgid "Setting the date and time"
msgstr "Настройка даты времени"
msgid "Settings the date and time"
msgstr "Настройки даты и времени"
@ -1640,10 +1643,10 @@ msgid "Save"
msgstr "Сохранить"
msgid "Save global"
msgstr "Сохранить глобально"
msgstr "Сохранить в глобальную конфигурацию"
msgid "Save local"
msgstr "Сохранить локально"
msgstr "Сохранить в локальную конфигурацию"
msgid "Download global"
msgstr "Загрузить глобально"
@ -1725,3 +1728,34 @@ msgstr "Остров Пасхи"
msgid "Andorra"
msgstr "Андорра"
msgid "About the program"
msgstr "О программе"
msgid "Synopsis"
msgstr "Справка"
msgid "Local configuration reading error"
msgstr "Ошибка чтения локальной конфигурации"
msgid "Local configuration write error"
msgstr "Ошибка записи локальной конфигурации"
msgid "Global configuration read error"
msgstr "Ошибка чтения глобальной конфигурации"
msgid "Global configuration write error"
msgstr "Ошибка записи глобальной конфигурации"
msgid "Local configuration downloaded successfully"
msgstr "Успешно загружена локальная конфигурация"
msgid "Global configuration downloaded successfully"
msgstr "Успешно загружена глобальная конфигурация"
msgid "Global configuration successfully written"
msgstr "Успешно записана глобальная конфигурация"
msgid "Local configuration successfully written"
msgstr "Успешно записана локальная конфигурация"

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 24 24"
id="svg2"
version="1.1"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
sodipodi:docname="warning.svg"
width="24"
height="24"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata
id="metadata12">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs10" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1027"
id="namedview8"
showgrid="false"
inkscape:zoom="18.96875"
inkscape:cx="5.4827018"
inkscape:cy="9.3047776"
inkscape:current-layer="svg2"
inkscape:pagecheckerboard="0"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<path
id="path4136-2"
style="opacity:1;fill:#ffffff;fill-opacity:1"
d="M 11.292969 1.0234375 A 11 11.000002 86.311656 0 0 1.0234375 12.707031 A 11 11.000002 86.311656 0 0 12.707031 22.976562 A 11 11.000002 86.311656 0 0 22.976562 11.292969 A 11 11.000002 86.311656 0 0 11.292969 1.0234375 z M 11.996094 6 L 12.003906 6 C 12.556173 6 13 6.4439 13 6.9960938 L 13 14.003906 C 13 14.556325 12.556173 15 12.003906 15 L 11.996094 15 C 11.443827 15 11 14.556325 11 14.003906 L 11 6.9960938 C 11 6.4439 11.443827 6 11.996094 6 z M 12 17 C 12.554 17 13 17.446 13 18 C 13 18.554 12.554 19 12 19 C 11.446 19 11 18.554 11 18 C 11 17.446 11.446 17 12 17 z " />
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

Loading…
Cancel
Save