Merge pull request 'develop' (#47) from develop into master

Reviewed-on: #47
pull/59/head
Dmitry Razumov 3 years ago
commit bbbeacc763

@ -2,6 +2,8 @@
#include <gtkmm.h>
#include <string>
#include <iostream>
#include <libintl.h>
#include <locale.h>
#include "ubl-settings-datetime.h"
int main(int argc, char* argv[]) {
string str_argv="";
@ -17,13 +19,40 @@ int main(int argc, char* argv[]) {
if (argc>1){
str_argv = argv[1];
}
if ((str_argv.find("--lock")!=std::string::npos || argc==1)){
if ((str_argv.find("-s")!=std::string::npos) || (str_argv.find("--socket-id")!=std::string::npos)){
auto app = Gtk::Application::create(argc, argv, "org.gtkmm.example.plug");
auto builder = Gtk::Builder::create_from_file(path_glade + "ubl-settings-datetime.glade");
Glib::init();
setlocale(LC_ALL, "");
Glib::OptionContext context;
CmdArgParser parser{
"Socket ID",
"Command line argument for socket ID communication.",
"No help available, sorry"
};
context.set_main_group(parser);
context.parse(argc, argv);
::Window socketID = parser.GetSocketID();
// Handle plug:
SettingsPlug plug{socketID, builder};
plug.show();
app->run(plug);
return 0;
}
else if (str_argv.find("-")!=std::string::npos || argc==1){
int len_argv = 1;
auto app = Gtk::Application::create(len_argv, argv, "org.gtkmm.example.plug");
auto builder = Gtk::Builder::create_from_file(path_glade + "ubl-settings-datetime.glade");
for (int i=0; i<argc; i++){
for (int i=1; i<argc; i++){
str_argv = argv[i];
if (str_argv=="--help"){
if (str_argv=="--help" || str_argv=="-h"){
help();
return 1;
}
@ -39,6 +68,9 @@ int main(int argc, char* argv[]) {
else if (str_argv=="--lock-update"){
flag_update=true;
}
else{
g_print(gettext("Argument not recognized\n"));
}
}
MainWindow* wnd = nullptr;
@ -48,21 +80,7 @@ int main(int argc, char* argv[]) {
return r;
}
else{
auto app = Gtk::Application::create(argc, argv, "org.gtkmm.example.plug");
auto builder = Gtk::Builder::create_from_file(path_glade + "ubl-settings-datetime.glade");
Glib::init();
Glib::OptionContext context;
CmdArgParser parser{
"Socket ID",
"Command line argument for socket ID communication.",
"No help available, sorry"
};
context.set_main_group(parser);
context.parse(argc, argv);
::Window socketID = parser.GetSocketID();
SettingsPlug plug{socketID, builder};
plug.show();
app->run(plug);
cout << gettext("Argument not recognized");
return 0;
}
}

@ -46,8 +46,7 @@ bool flag_ntp = false;
bool flag_update = false;
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}
{
: Glib::OptionGroup{p_name, p_description, p_help} {
Glib::OptionEntry socketIDArg;
socketIDArg.set_long_name("socket-id");
socketIDArg.set_short_name('s');
@ -55,14 +54,13 @@ CmdArgParser::CmdArgParser(const std::string& p_name, const std::string& p_descr
socketIDArg.set_description("Settings manager socket");
add_entry(socketIDArg, m_socketID);
}
::Window CmdArgParser::GetSocketID() const{
return m_socketID;
}
MainWindow::MainWindow(BaseObjectType* obj, Glib::RefPtr<Gtk::Builder> const& builder)
: Gtk::ApplicationWindow(obj)
, builder{builder} {
: Gtk::ApplicationWindow(obj), builder{builder} {
this->builder = builder;
this->settings();
}
@ -102,7 +100,6 @@ void MainWindow::settings(){
lblZone->set_sensitive(false);
lblTimeZone->set_sensitive(false);
lblDateTimeSettingGlob->set_sensitive(false);
cbxSynchronizeNtpGlob->set_sensitive(false);
lblSynchronizebChkGLob->set_sensitive(false);
cbDhcp->set_sensitive(false);
txtNtpServer->set_sensitive(false);
@ -126,10 +123,11 @@ int MainWindow::check_root(){
void MainWindow::lacalization(){
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"));
lblSynchronizebChkGLob->set_text(_("Synchronize via NTP:"));
cbDhcp->append(_("Default"));
cbDhcp->append(_("DHCP"));
cbDhcp->append(_("Manual"));
cbDhcp->append(_("Disabled"));
lblDateTimeSetting->set_text(_("Local Configuration"));
lblHead->set_text(_("Settings the date and time"));
lblTime->set_text(_("Time"));
@ -167,7 +165,6 @@ void MainWindow::flag_block_gui(){
btnHardwareTime->set_sensitive(false);
lblTime->set_sensitive(false);
lblData->set_sensitive(false);
//cbxSynchronizeNtpGlob->set_sensitive(false);
}
if (flag_timezone==true){
cbRegion->set_sensitive(false);
@ -178,14 +175,12 @@ void MainWindow::flag_block_gui(){
cbDhcp->set_sensitive(false);
}
if (flag_ntp==true){
cbxSynchronizeNtpGlob->set_sensitive(false);
cbDhcp->set_sensitive(false);
txtNtpServer->set_sensitive(false);
}
if (flag_update==true){
lblDateTimeSettingGlob->set_sensitive(false);
//lblSynchronizebChkGLob->set_sensitive(false);
cbxSynchronizeNtpGlob->set_sensitive(false);
lblTimeZoneGlob->set_sensitive(false);
lblRegGlob->set_sensitive(false);
cbRegionGlob->set_sensitive(false);
@ -204,8 +199,10 @@ void MainWindow::add_CSS(){
styleContext->add_provider_for_screen(screen, cssProvider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);//add provider for screen in all application
Glib::RefPtr<Gtk::StyleContext> context = boxColor->get_style_context();
Glib::RefPtr<Gtk::StyleContext> context_lbl_head = lblHead->get_style_context();
//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");
}
void MainWindow::get_builder(){
@ -214,7 +211,6 @@ void MainWindow::get_builder(){
builder->get_widget("btnUpdateDateTime", btnUpdateDateTime);
builder->get_widget("btnChooseDate", btnChooseDate);
builder->get_widget("btnMessClose", btnMessClose);
builder->get_widget("cbxSynchronizeNtpGlob", cbxSynchronizeNtpGlob);
builder->get_widget("popCalendar", popCalendar);
builder->get_widget("numTimeHrs", numTimeHrs);
builder->get_widget("numTimeMin", numTimeMin);
@ -269,13 +265,11 @@ bool MainWindow::gui_exit_2(GdkEventAny* event){
}
void MainWindow::event(){
//cbxSynchronizeNtpGlob->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_ntp_toggle));
btnHardwareTime->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::hardware_clock));
btnMessClose->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::gui_mess_close));
btnMessCloseSudo->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::gui_exit));
//cldrDate->signal_day_selected().connect(sigc::mem_fun(*this, &MainWindow::get_calendar));
cbxSynchronizeNtpGlob->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_ntp_toggle_glob));
btnUpdateDateTime->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::wrapper_update_time_date));
btnUpdateDateTime->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::update_time_date));
btnChooseDate->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::calendar_show));
cbDhcp->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::event_entry_cbDhcp));
cbRegion->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::append_zone));
@ -293,29 +287,26 @@ void MainWindow::wind_close_ntp(){
}
void MainWindow::stop_ntp(){
windowsNnpClose->hide();
string cmd = "SEL_SERVICE=\"systemd-timesyncd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service; ";
system(cmd.c_str());
response_cmd=system(cmd.c_str());
cmd ="SEL_SERVICE=\"ntpd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; ";
system(cmd.c_str());
response_cmd=system(cmd.c_str());
cmd ="SEL_SERVICE=\"ntpdate\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; ";
system(cmd.c_str());
response_cmd=system(cmd.c_str());
cmd = "SEL_SERVICE=\"chronyd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; ";
system(cmd.c_str());
response_cmd=system(cmd.c_str());
cmd ="SEL_SERVICE=\"openntpd\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ntpd; ";
system(cmd.c_str());
response_cmd=system(cmd.c_str());
cmd ="SEL_SERVICE=\"ptp4l\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE}; ";
system(cmd.c_str());
response_cmd=system(cmd.c_str());
cmd ="SEL_SERVICE=\"phc2sys\"; systemctl --quiet is-active ${SEL_SERVICE}.service &>/dev/null && systemctl stop ${SEL_SERVICE}.service || pkill -9 ${SEL_SERVICE} ";
system(cmd.c_str());
this->update_time_date();
response_cmd=system(cmd.c_str());
}
void MainWindow::hardware_clock(){
string cmd = "hwclock --systohc";
system(cmd.c_str());
response_cmd=system(cmd.c_str());
}
void MainWindow::gui_mess_close(){
@ -338,7 +329,6 @@ bool MainWindow::focus_ntp(GdkEventFocus* event){
string str_ntp = txtNtpServer->get_text();
for (const auto &simvol: array_simvol){
if (str_ntp.find(simvol)!=std::string::npos){
cout << simvol << 2222 << endl;
flag_error=true;
break;
@ -362,8 +352,9 @@ void MainWindow::event_entry_cbDhcp(){
int activ_index = cbDhcp->get_active_row_number();
if (str_dhcp.length()!=0){
if (activ_index==0){
btnUpdateDateTime->set_sensitive(false);
string cmd = "/usr/bin/ubconfig set network NTPSERVERS=default";
system(cmd.c_str());
response_cmd=system(cmd.c_str());
txtNtpServer->set_sensitive(false);
cbDhcp->set_active(activ_index);
string response = this->call("/usr/bin/ubconfig --source=default get NTPSERVERS_DEFAULT");
@ -371,19 +362,21 @@ void MainWindow::event_entry_cbDhcp(){
txtNtpServer->set_text(response);
}
else if (activ_index==1){
btnUpdateDateTime->set_sensitive(false);
string cmd = "/usr/bin/ubconfig set network NTPSERVERS=dhcp";
system(cmd.c_str());
response_cmd=system(cmd.c_str());
txtNtpServer->set_sensitive(false);
cbDhcp->set_active(activ_index);
txtNtpServer->set_text("");
}
else if (activ_index==2){
btnUpdateDateTime->set_sensitive(false);
txtNtpServer->set_sensitive(true);
if (txtNtpServer->get_text().find("default")!=std::string::npos){
txtNtpServer->set_text("");
}
string str_dhcp = this->call("/usr/bin/ubconfig get network NTPSERVERS");
if ((str_dhcp!="") && (str_dhcp!="(null)") && (str_dhcp.find("default")==std::string::npos)){
if ((str_dhcp.find("(null)")==std::string::npos) && (str_dhcp.find("default")==std::string::npos)){
str_dhcp = str_dhcp.substr(str_dhcp.find("=")+1,str_dhcp.length());
str_dhcp = str_dhcp.substr(0,str_dhcp.find("\n"));
if (str_dhcp!="dhcp" && str_dhcp!="(null)"){
@ -392,10 +385,19 @@ void MainWindow::event_entry_cbDhcp(){
cbDhcp->set_active(activ_index);
}
}
else if (activ_index==3){
string cmd = "/usr/bin/ubconfig remove network NTPSERVERS";
response_cmd=system(cmd.c_str());
txtNtpServer->set_text("");
txtNtpServer->set_sensitive(false);
btnUpdateDateTime->set_sensitive(true);
this->stop_ntp();
}
}
else{
string cmd = "/usr/bin/ubconfig set network NTPSERVERS=dhcp";
system(cmd.c_str());
response_cmd=system(cmd.c_str());
cbDhcp->set_active(0);
}
}
@ -450,22 +452,26 @@ void MainWindow::calendar_show(){
void MainWindow::enry_dhcp_mess(){
string str_dhcp = this->call("/usr/bin/ubconfig get network NTPSERVERS");
if ((str_dhcp!="") && (str_dhcp!="(null)")){
cbxSynchronizeNtpGlob->set_active(1);
this->set_ntp_toggle_glob();
if (str_dhcp.find("(null)")==std::string::npos){
btnUpdateDateTime->set_sensitive(false);
str_dhcp = str_dhcp.substr(str_dhcp.find("=")+1,str_dhcp.length());
str_dhcp = str_dhcp.substr(0,str_dhcp.find("\n"));
if (str_dhcp=="dhcp"){
cbDhcp->set_active(1);
txtNtpServer->set_text("");
txtNtpServer->set_sensitive(false);
}
else if (str_dhcp=="default"){
btnUpdateDateTime->set_sensitive(false);
cbDhcp->set_active(0);
txtNtpServer->set_text("");
string response = this->call("/usr/bin/ubconfig --source=default get NTPSERVERS_DEFAULT");
this->str_remove(response, "\n");
txtNtpServer->set_text(response);
txtNtpServer->set_sensitive(false);
}
else{
btnUpdateDateTime->set_sensitive(false);
if (str_dhcp==""){
lblMessage->set_text(_("Enter DHCP!"));
mess_dchp->show();
@ -482,9 +488,10 @@ void MainWindow::enry_dhcp_mess(){
}
}
else{
cbxSynchronizeNtpGlob->set_active(0);
cbDhcp->set_sensitive(0);
txtNtpServer->set_sensitive(0);
cbDhcp->set_active(3);
txtNtpServer->set_text("");
txtNtpServer->set_sensitive(false);
btnUpdateDateTime->set_sensitive(true);
}
}
@ -546,7 +553,7 @@ void MainWindow::enter_zone(){
str_region=reg_text;
string cmd = "";
cmd = " ubconfig --target system set clock ZONE=" + str_region + "/" + str_zone;
system(cmd.c_str());
response_cmd=system(cmd.c_str());
}
else{
str_zone="";
@ -584,7 +591,7 @@ void MainWindow::enter_zone_glob(){
if (!(zone_text.empty())){
//str_zoneGlob = zone_text.substr(zone_text.find(") ")+2,zone_text.length());
string cmd = "/usr/bin/ubconfig --target global set clock ZONE=" +reg_text +"/" + zone_text;
system(cmd.c_str());
response_cmd=system(cmd.c_str());
}
else{
str_zoneGlob="";
@ -597,22 +604,6 @@ void MainWindow::enter_zone_glob(){
}
}
void MainWindow::set_ntp_toggle_glob(){
bool flag = cbxSynchronizeNtpGlob->get_active();
if (flag==false){
system("/usr/bin/ubconfig remove network NTPSERVERS");
cbDhcp->set_sensitive(false);
txtNtpServer->set_sensitive(false);
}
else{
cbDhcp->set_sensitive(true);
int activ_index = cbDhcp->get_active_row_number();
if (activ_index==2){
txtNtpServer->set_sensitive(true);
}
}
}
void MainWindow::append_region_zone(string region, string zone, Gtk::ComboBoxText *tmpCbReg, Gtk::ComboBoxText *tmpCbZone){
str_region=region;
@ -628,7 +619,6 @@ void MainWindow::append_region_zone(string region, string zone, Gtk::ComboBoxTex
}
index+=1;
}
index = 0;
string zone_mixing = "";
string path_reg_zone = "";
@ -695,17 +685,6 @@ void MainWindow::append_zone_glob(){
}
cbZoneGlob->set_active(0);
}
void MainWindow::wrapper_update_time_date(){
string cmd = "pidof systemd-timesyncd ntpd chronyd ntpdate openntpd ptp4l phc2sys";
string response = this->call(cmd);
if (response.length()==0){
this->update_time_date();
}
else{
windowsNnpClose->show();
}
}
void MainWindow::update_time_date(){
//this->enter_zone();
@ -732,7 +711,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+"\"";
system(cmd.c_str());
response_cmd=system(cmd.c_str());
txtDate->set_text(str_data);
year=0;
month=0;
@ -752,7 +731,7 @@ void MainWindow::update_time_date(){
cmd = "date +%T -s \""+
to_string(hour) + ":" + to_string(minute)
+ ":" + to_string(ltm->tm_sec) +"\"";
system(cmd.c_str());
response_cmd=system(cmd.c_str());
}
void MainWindow::post_entry_data(){
@ -838,6 +817,7 @@ void MainWindow::read_file(){
}
in1.close();
}
this->sort_zone(&zone_local, &zone);
time_reg_map.insert({key_reg, zone});
time_reg_map_local.insert({key_reg, zone_local});
}}}}
@ -847,6 +827,56 @@ void MainWindow::read_file(){
}
}
void MainWindow::sort_zone(vector<string> *time_reg_map_local,vector<string> *time_reg_map){
string str_j = "";
int j_i;
string str_j_1 = "";
int j_i_1;
int size_vec = time_reg_map_local->size();
for (int i = 0; i < size_vec; i++) {
for (int j = 0; j < size_vec-1; j++) {
str_j=(*time_reg_map_local)[j];
str_j = str_j.substr(5,str_j.find(")")-5);
if (str_j[1]=='0'){
str_j.replace(1,1,"0");
}
if (str_j.find("+") != std::string::npos){
str_j.replace(0,1,"+");
j_i = stoi(str_j);
}
else{
str_j.replace(0,1,"-");
j_i = stoi(str_j);
j_i=-j_i;
}
str_j_1=(*time_reg_map_local)[j+1];
str_j_1 = str_j_1.substr(5,str_j_1.find(")")-5);
if (str_j_1[1]=='0'){
str_j_1.replace(1,1,"0");
}
if (str_j_1.find("+") != std::string::npos){
str_j_1.replace(0,1,"+");
j_i_1 = stoi(str_j_1);
}
else{
str_j_1.replace(0,1,"-");
j_i_1 = stoi(str_j_1);
j_i_1 = -j_i_1;
}
if (j_i > j_i_1) {
string b = (*time_reg_map_local)[j];
(*time_reg_map_local)[j] = (*time_reg_map_local)[j + 1];
(*time_reg_map_local)[j + 1] = b;
b = (*time_reg_map)[j];
(*time_reg_map)[j] = (*time_reg_map)[j + 1];
(*time_reg_map)[j + 1] = b;
}
}
}
}
string MainWindow::zone_file_read(string zone){
if (zone.length()==1){
return "";
@ -894,8 +924,9 @@ vector<std::string> MainWindow::split(const std::string &s, char delim){
}
SettingsPlug::SettingsPlug(::Window p_socketID, Glib::RefPtr<Gtk::Builder> builder)
: Gtk::Plug{p_socketID}
{
: Gtk::Plug{p_socketID} {
MainWindow* wnd = nullptr;
builder->get_widget_derived("window", wnd);
builder->get_widget("plugBox", plugBox);
plugBox->get_parent()->remove(*plugBox);
add(*plugBox);
@ -903,11 +934,11 @@ SettingsPlug::SettingsPlug(::Window p_socketID, Glib::RefPtr<Gtk::Builder> build
}
void help(){
g_print("Usage: ubl-settings-datetime [--lock-timezone] [--lock-ntp] [--lock-datetime] [--lock-update]\n");
g_print("Options:\n");
g_print(" --lock-timezone Disable timezone field editing\n");
g_print(" --lock-ntp Disable ntp field editing\n");
g_print(" --lock-datetime Disable datetime field editing\n");
g_print(" --lock-update Disable save changes\n");
g_print(gettext("Usage: ubl-settings-datetime [--lock-timezone] [--lock-ntp] [--lock-datetime] [--lock-update]\n"));
g_print(gettext("Options:\n"));
g_print(gettext(" --lock-timezone Disable timezone field editing\n"));
g_print(gettext(" --lock-ntp Disable ntp field editing\n"));
g_print(gettext(" --lock-datetime Disable datetime field editing\n"));
g_print(gettext(" --lock-update Disable save changes\n"));
}

@ -30,6 +30,7 @@ public:
::Window GetSocketID() const;
private:
int m_socketID = 0;
};
class MainWindow : public Gtk::ApplicationWindow {
@ -72,6 +73,7 @@ class MainWindow : public Gtk::ApplicationWindow {
void wind_close_ntp();
void wrapper_update_time_date();
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);
string str_remove(std::string& source, const std::string to_remove);
vector<std::string> split(const std::string &s, char delim);
@ -134,6 +136,7 @@ class MainWindow : public Gtk::ApplicationWindow {
string strtxtNtpServer;
string str_zone="";
string str_zoneGlob;
int response_cmd;
string array_region[14]={
"Africa",
"America",
@ -151,11 +154,11 @@ class MainWindow : public Gtk::ApplicationWindow {
"US"};
};
class SettingsPlug : public Gtk::Plug
{
class SettingsPlug : public Gtk::Plug{
public:
Gtk::Window *window;
SettingsPlug(::Window p_socketID, Glib::RefPtr<Gtk::Builder> builder);
private:
Gtk::Widget *plugBox;
Gtk::Widget *parent;

@ -10,4 +10,5 @@ Type=Application
Exec=pkexec ubl-settings-datetime
Icon=ubl-settings-datetime
Terminal=false
Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;
X-XfcePluggable=true
Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;X-UBL-SettingsManager;X-UBL-SystemSettings;

@ -169,11 +169,38 @@
</object>
</child>
</object>
<object class="GtkPopover" id="popCalendar">
<property name="width-request">240</property>
<property name="height-request">185</property>
<property name="can-focus">False</property>
<property name="position">bottom</property>
<property name="constrain-to">none</property>
<child>
<object class="GtkCalendar" id="cldrDate">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="margin-left">10</property>
<property name="margin-right">10</property>
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="year">2023</property>
<property name="month">1</property>
<property name="day">10</property>
</object>
</child>
</object>
<object class="GtkWindow" id="window">
<property name="can-focus">False</property>
<property name="title" translatable="yes" context="Settings the date and time" comments="Date and Time Settings">Настройки даты и времени</property>
<child>
<object class="GtkBox" id="id_plug">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="plugBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
@ -281,7 +308,7 @@
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">6</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>
@ -291,7 +318,7 @@
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">6</property>
<property name="margin-left">5</property>
<property name="margin-start">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
@ -301,7 +328,7 @@
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="lblTime">
<property name="width-request">160</property>
<property name="width-request">0</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
@ -371,20 +398,9 @@
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="lblData">
<property name="width-request">160</property>
<property name="width-request">20</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
@ -400,7 +416,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="position">4</property>
</packing>
</child>
<child>
@ -420,7 +436,7 @@ Format: DD.MM.YYYY</property>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="position">5</property>
</packing>
</child>
<child>
@ -446,14 +462,14 @@ Format: DD.MM.YYYY</property>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
<property name="position">6</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
<property name="position">1</property>
</packing>
</child>
<child>
@ -466,7 +482,7 @@ Format: DD.MM.YYYY</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-right">8</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
@ -544,7 +560,7 @@ Format: DD.MM.YYYY</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-right">8</property>
<property name="margin-start">5</property>
<property name="margin-end">10</property>
<property name="margin-top">6</property>
@ -577,7 +593,7 @@ Format: DD.MM.YYYY</property>
<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-right">10</property>
<property name="margin-start">5</property>
<property name="margin-end">10</property>
<property name="margin-bottom">6</property>
@ -602,7 +618,7 @@ Format: DD.MM.YYYY</property>
<object class="GtkLabel" id="lblReg">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-left">8</property>
<property name="margin-right">5</property>
<property name="margin-start">8</property>
<property name="margin-end">5</property>
@ -638,7 +654,7 @@ Format: DD.MM.YYYY</property>
<object class="GtkLabel" id="lblZone">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-left">10</property>
<property name="margin-right">5</property>
<property name="margin-start">10</property>
<property name="margin-end">5</property>
@ -751,35 +767,22 @@ Format: DD.MM.YYYY</property>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">6</property>
<property name="margin-left">5</property>
<property name="margin-start">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkCheckButton" id="cbxSynchronizeNtpGlob">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="tooltip-text" translatable="yes" context="Automatic time synchronization" comments="Automatic time synchronization">Автоматическая синхронизация времени</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="draw-indicator">True</property>
<child>
<object class="GtkLabel" id="lblSynchronizebChkGLob">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</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" context="Synchronize via NTP" comments="Synchronize via NTP">Synchronize via NTP</property>
</object>
</child>
<property name="label" translatable="yes" context="Synchronize via NTP" comments="Synchronize via NTP">Synchronize via NTP:</property>
</object>
<packing>
<property name="expand">False</property>
@ -816,7 +819,7 @@ Format: DD.MM.YYYY</property>
<property name="tooltip-text" translatable="yes">Enter the name of the ntp server or its ip address. When entering multiple addresses, separate them with spaces.</property>
<property name="valign">center</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-right">10</property>
<property name="margin-start">5</property>
<property name="margin-end">10</property>
<property name="margin-top">6</property>
@ -840,7 +843,7 @@ Format: DD.MM.YYYY</property>
<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-right">10</property>
<property name="margin-start">5</property>
<property name="margin-end">10</property>
<property name="margin-bottom">6</property>
@ -991,29 +994,13 @@ Format: DD.MM.YYYY</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<object class="GtkPopover" id="popCalendar">
<property name="width-request">240</property>
<property name="height-request">185</property>
<property name="can-focus">False</property>
<property name="relative-to">btnChooseDate</property>
<property name="position">bottom</property>
<property name="constrain-to">none</property>
<child>
<object class="GtkCalendar" id="cldrDate">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="margin-left">10</property>
<property name="margin-right">10</property>
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="year">2023</property>
<property name="month">1</property>
<property name="day">10</property>
</object>
</child>
</object>
<object class="GtkWindow" id="windowsNnpClose">

@ -97,8 +97,8 @@ msgstr "Синхронизировать"
msgid "Automatic time synchronization"
msgstr "Автоматическая синхронизация времени"
msgid "Synchronize via NTP"
msgstr "Синхронизировать через NTP"
msgid "Synchronize via NTP:"
msgstr "Синхронизировать через NTP:"
msgid "Time zone"
msgstr "Часовой пояс"
@ -1609,3 +1609,30 @@ msgstr "Южная Нижняя Калифорния"
msgid "Enter the name of the ntp-server or its ip-address.\nWhen entering multiple addresses, separate them with commas."
msgstr "Введите имя ntp-сервера или его ip-адрес.\nПри вводе нескольких адресов, разделяйте их запятыми."
msgid "Cape_Verde"
msgstr "Кабо-Верде"
msgid "Usage: ubl-settings-datetime [--lock-timezone] [--lock-ntp] [--lock-datetime] [--lock-update]\n"
msgstr "Использование: ubl-settings-datetime [--lock-timezone] [--lock-ntp] [--lock-datetime] [--lock-update]\n"
msgid " --lock-timezone Disable timezone field editing\n"
msgstr " --lock-timezone Отключить редактирование поля часового пояса\n"
msgid " --lock-ntp Disable ntp field editing\n"
msgstr " --lock-ntp Отключить редактирование полей ntp\n"
msgid " --lock-datetime Disable datetime field editing\n"
msgstr " --lock-datetime Отключить редактирование полей даты и времени\n"
msgid " --lock-update Disable save changes\n"
msgstr " --lock-update Отключить сохранение изменений\n"
msgid "Options:\n"
msgstr "Опции:\n"
msgid "Disabled"
msgstr "Отключено"
msgid "Argument not recognized\n"
msgstr "Не распознанный аргумент\n"

Loading…
Cancel
Save