Добавлена кнопки, исправлен баг с блокировкой ntp

pull/55/head
Igor Belitskiy 3 years ago
parent 2735f1a730
commit 8e90dd950d

4
.gitignore vendored

@ -7,4 +7,6 @@ compile/
source/**/ubl_settings_datetime source/**/ubl_settings_datetime
source/**/main.o source/**/main.o
source/**/ubl_settings_datetime.o source/**/ubl_settings_datetime.o
reg/ reg/
ubl-util-standard.h
ubl-util-standard.c

@ -21,6 +21,12 @@ all: init build
init: init:
@echo "Initialize ..."; \ @echo "Initialize ..."; \
if [ ! -f source/ubl-util-standard.h ]; then \
ln -s /usr/share/ubl-util-standard/ubl-util-standard.h source/ubl-util-standard.h; \
fi; \
if [ ! -f source/ubl-util-standard.c ]; then \
ln -s /usr/share/ubl-util-standard/ubl-util-standard.c source/ubl-util-standard.c; \
fi; \
echo "-- Build path: ${CMAKE_BUILD_DIR}" echo "-- Build path: ${CMAKE_BUILD_DIR}"
depend: depend:

@ -13,9 +13,11 @@ find_package(ICU REQUIRED COMPONENTS uc dt in io)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \
-O2 -pipe -fno-plt -fexceptions \ -O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection ") -fstack-clash-protection -fcf-protection -g")
set(SOURCE_FILES set(SOURCE_FILES
ubl-util-standard.h
ubl-util-standard.c
main.cc main.cc
ubl-settings-datetime.cc ubl-settings-datetime.cc
ubl-settings-datetime.h) ubl-settings-datetime.h)

@ -1,9 +1,3 @@
#include <gtkmm/window.h>
#include <gtkmm.h>
#include <string>
#include <iostream>
#include <libintl.h>
#include <locale.h>
#include "ubl-settings-datetime.h" #include "ubl-settings-datetime.h"
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
string str_argv=""; string str_argv="";
@ -22,6 +16,22 @@ int main(int argc, char* argv[]) {
if ((str_argv.find("-s")!=std::string::npos) || (str_argv.find("--socket-id")!=std::string::npos)){ if ((str_argv.find("-s")!=std::string::npos) || (str_argv.find("--socket-id")!=std::string::npos)){
for (int i=3; i<argc; i++){
str_argv = argv[i];
if (str_argv=="--lock-datetime"){
flag_datetime=true;
}
else if (str_argv=="--lock-timezone"){
flag_timezone=true;
}
else if (str_argv=="--lock-ntp"){
flag_ntp=true;
}
else if (str_argv=="--lock-update"){
flag_update=true;
}
}
auto app = Gtk::Application::create(argc, argv, "org.gtkmm.example.plug"); auto app = Gtk::Application::create(argc, argv, "org.gtkmm.example.plug");
auto builder = Gtk::Builder::create_from_file(path_glade + "ubl-settings-datetime.glade"); auto builder = Gtk::Builder::create_from_file(path_glade + "ubl-settings-datetime.glade");
Glib::init(); Glib::init();

@ -1,18 +1,4 @@
#include <gtkmm/window.h>
#include <glibmm/i18n.h>
#include <gtkmm/plug.h>
#include <gtkmm/stock.h>
#include <gtkmm.h>
#include <iostream>
#include <map>
#include <string>
#include <array>
#include <vector>
#include <fstream>
#include <filesystem>
#include <stdio.h>
#include <unicode/timezone.h>
#include <unicode/calendar.h>
#include "ubl-settings-datetime.h" #include "ubl-settings-datetime.h"
using namespace std; using namespace std;
@ -25,6 +11,7 @@ bool flag_datetime = false;
bool flag_timezone = false; bool flag_timezone = false;
bool flag_ntp = false; bool flag_ntp = false;
bool flag_update = false; bool flag_update = false;
int socket_ext_id_I=0;
CmdArgParser::CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help) 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} {
@ -33,7 +20,14 @@ CmdArgParser::CmdArgParser(const std::string& p_name, const std::string& p_descr
socketIDArg.set_short_name('s'); socketIDArg.set_short_name('s');
socketIDArg.set_flags(Glib::OptionEntry::FLAG_IN_MAIN); socketIDArg.set_flags(Glib::OptionEntry::FLAG_IN_MAIN);
socketIDArg.set_description("Settings manager socket"); socketIDArg.set_description("Settings manager socket");
Glib::OptionEntry socketExtId;
socketExtId.set_long_name("socket-ext-id");
socketExtId.set_flags(Glib::OptionEntry::FLAG_IN_MAIN);
socketExtId.set_description("Settings manager secondary socket");
add_entry(socketIDArg, m_socketID); add_entry(socketIDArg, m_socketID);
add_entry(socketExtId, socket_ext_id_I);
} }
::Window CmdArgParser::GetSocketID() const{ ::Window CmdArgParser::GetSocketID() const{
return m_socketID; return m_socketID;
@ -51,6 +45,17 @@ MainWindow::MainWindow(Glib::RefPtr<Gtk::Builder> const& builder) {
} }
void MainWindow::settings(){ void MainWindow::settings(){
Gtk::Widget *standartHead;
Gtk::Widget *plugBox;
Gtk::Window *window;
Gtk::Widget *boxButton;
builder->get_widget("standartHead",standartHead);
builder->get_widget("plugBox",plugBox);
builder->get_widget("window",window);
builder->get_widget("boxButton",boxButton);
ubl_get_standard_ui(standartHead,plugBox,boxButton,window,"ubl-settings-datetime.svg",_("Settings the date and time"),_("ubl-settings-datetime"),0,socket_ext_id_I);
year=0, month=0, day=0; year=0, month=0, day=0;
this->get_builder(); this->get_builder();
this->lacalization(); this->lacalization();
@ -63,8 +68,6 @@ void MainWindow::settings(){
this->flag_block_gui(); this->flag_block_gui();
this->event(); this->event();
this->parse_text_date(); this->parse_text_date();
} }
else{ else{
numTimeHrs->set_sensitive(false); numTimeHrs->set_sensitive(false);
@ -102,6 +105,12 @@ int MainWindow::check_root(){
return 0; return 0;
} }
void MainWindow::lacalization(){ void MainWindow::lacalization(){
lblSave->set_label(_("Save"));
lblDownload->set_label(_("Download"));
btnDownloadGlobal->set_label(_("Download global"));
btnSaveLocal->set_label(_("Save global"));
btnSaveGlobl->set_label(_("Save local"));
txtDate->set_tooltip_text(_("Date of\nFormat: DD.MM.YYYY")); 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.")); 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:"));
@ -230,6 +239,12 @@ void MainWindow::get_builder(){
builder->get_widget("lblNtpStop",lblNtpStop); builder->get_widget("lblNtpStop",lblNtpStop);
builder->get_widget("lblNtpClose",lblNtpClose); builder->get_widget("lblNtpClose",lblNtpClose);
builder->get_widget("lblBanerStopNtp",lblBanerStopNtp); builder->get_widget("lblBanerStopNtp",lblBanerStopNtp);
builder->get_widget("btnSaveLocal",btnSaveLocal);
builder->get_widget("btnSaveGlobl",btnSaveGlobl);
builder->get_widget("lblSave",lblSave);
builder->get_widget("btnDownload",btnDownload);
builder->get_widget("lblDownload",lblDownload);
builder->get_widget("btnDownloadGlobal", btnDownloadGlobal);
//builder->get_widget("cbxSynchronizeNtp",cbxSynchronizeNtp); //builder->get_widget("cbxSynchronizeNtp",cbxSynchronizeNtp);
@ -307,7 +322,9 @@ bool MainWindow::focus_ntp(GdkEventFocus* event){
"@","[","]","\\","{","}","|","~", " " "@","[","]","\\","{","}","|","~", " "
}; };
bool flag_error = false; bool flag_error = false;
bool flag_error_check_ntp = false;
string str_ntp = txtNtpServer->get_text(); string str_ntp = txtNtpServer->get_text();
flag_error_check_ntp = this->check_ntp(str_ntp);
for (const auto &simvol: array_simvol){ for (const auto &simvol: array_simvol){
if (str_ntp.find(simvol)!=std::string::npos){ if (str_ntp.find(simvol)!=std::string::npos){
flag_error=true; flag_error=true;
@ -315,19 +332,102 @@ bool MainWindow::focus_ntp(GdkEventFocus* event){
} }
} }
if (flag_error==false){ if ((flag_error==false) && (flag_error_check_ntp==false)){
cmd = "/usr/bin/ubconfig set network NTPSERVERS=\"" + str_ntp + "\""; cmd = "/usr/bin/ubconfig set network NTPSERVERS=\"" + str_ntp + "\"";
response_cmd = system(cmd.c_str()); response_cmd = system(cmd.c_str());
} }
else{ else{
lblMessage->set_text(_("An invalid character is entered")); if (flag_error==true){
mess_dchp->show(); lblMessage->set_text(_("An invalid character is entered"));
} mess_dchp->show();
}
else if (flag_error_check_ntp==true){
lblMessage->set_text(_("Error in the ntp name"));
mess_dchp->show();
}
} }
}
return true; return true;
} }
vector<int> MainWindow::find_all(string &str_ntp, string substr){
size_t index = 0;
vector<int> sub_index;
while ((index = str_ntp.find(substr, index)) != std::string::npos) {
index += substr.length();
sub_index.push_back(index);
}
return sub_index;
}
bool MainWindow::check_ntp(string &str_ntp){
vector<int> sub_index = this->find_all(str_ntp,".");
if (sub_index.size()==1){
int index_point = sub_index[0];
int len_str_ntp = str_ntp.length();
if (((len_str_ntp-index_point)>=2) && (index_point>2)){
return false;
}
else{
return true;
}
}
else if (sub_index.size()==3){
int index_str_ntp = sub_index[0];
int index_str_ntp_1 = sub_index[1];
int index_str_ntp_2 = sub_index[2];
if (((index_str_ntp>0) && (index_str_ntp<=4)) &&
(index_str_ntp_1>(index_str_ntp+1)) &&
((index_str_ntp_1-index_str_ntp)<=4) &&
(index_str_ntp_2>(index_str_ntp_1+1)) &&
((index_str_ntp_2-index_str_ntp_1)<=4) &&
((str_ntp.length()-index_str_ntp_2)<=3)) {
string simvol;
bool flag_error=false;
char char_ntp;
for (size_t i = 0; i < str_ntp.size(); i++){
flag_error=false;
cout << str_ntp[i] << endl;
char_ntp = char(str_ntp[i]);
cout << char_ntp << endl;
for (int index=0;index<11;index++){
if (index==10){
simvol=".";
}
else{
simvol = to_string(index);
}
cout << (simvol==to_string(char_ntp)) << endl;
cout << simvol << " " << to_string(char_ntp) << endl;
if (simvol==to_string(char_ntp)){
flag_error=false;
break;
}
else{
flag_error=true;
}
}
if (flag_error==true){
return true;
}
}
}
else{
return true;
}
}
else{
return true;
}
return false;
}
struct MainWindow::Result<string> MainWindow::wrapper_call(string cmd){ struct MainWindow::Result<string> MainWindow::wrapper_call(string cmd){
struct Result<string> obj_result; struct Result<string> obj_result;
string response=this->call(cmd); string response=this->call(cmd);

@ -1,14 +1,21 @@
#ifndef UBL_SETTINGS_DATETIME_H #ifndef UBL_SETTINGS_DATETIME_H
#define UBL_SETTINGS_DATETIME_H #define UBL_SETTINGS_DATETIME_H
#include <gtkmm/window.h> #include <gtkmm/window.h>
#include <iostream>
#include <gtkmm.h>
#include <string>
#include <vector>
#include <map>
#include <glibmm/i18n.h> #include <glibmm/i18n.h>
#include <gtkmm/plug.h> #include <gtkmm/plug.h>
#include <gtkmm/stock.h> #include <gtkmm/stock.h>
#include <gtkmm.h>
#include <iostream>
#include <map>
#include <string>
#include <array>
#include <vector>
#include <fstream>
#include <filesystem>
#include <stdio.h>
#include <unicode/timezone.h>
#include <unicode/calendar.h>
#include "ubl-util-standard.c"
using namespace std; using namespace std;
@ -22,7 +29,7 @@ extern bool flag_datetime;
extern bool flag_timezone; extern bool flag_timezone;
extern bool flag_ntp; extern bool flag_ntp;
extern bool flag_update; extern bool flag_update;
extern int socket_ext_id_I;
class CmdArgParser : public Glib::OptionGroup class CmdArgParser : public Glib::OptionGroup
{ {
public: public:
@ -70,6 +77,8 @@ class MainWindow : public Gtk::ApplicationWindow {
Gtk::Label *lblSynchronizeBtn; Gtk::Label *lblSynchronizeBtn;
Gtk::Label *lblDateTimeSettingGlob; Gtk::Label *lblDateTimeSettingGlob;
Gtk::Label *lblTimeBios; Gtk::Label *lblTimeBios;
Gtk::Label *lblSave;
Gtk::Label *lblDownload;
Gtk::Label *lblBanerStopNtp; Gtk::Label *lblBanerStopNtp;
Gtk::Button *btnHardwareTime; Gtk::Button *btnHardwareTime;
Gtk::CheckButton *cbxSynchronizeNtp; Gtk::CheckButton *cbxSynchronizeNtp;
@ -80,6 +89,11 @@ class MainWindow : public Gtk::ApplicationWindow {
Gtk::Label *lblNtpClose; Gtk::Label *lblNtpClose;
Gtk::Entry *txtNtpServer; Gtk::Entry *txtNtpServer;
Gtk::Entry *txtDate; Gtk::Entry *txtDate;
Gtk::Widget *btnSave;
Gtk::Widget *btnDownload;
Gtk::MenuItem *btnSaveLocal;
Gtk::MenuItem *btnSaveGlobl;
Gtk::MenuItem *btnDownloadGlobal;
std::map <string, vector<string>> time_reg_map; std::map <string, vector<string>> time_reg_map;
std::map <string, vector<string>> time_reg_map_local; std::map <string, vector<string>> time_reg_map_local;
unsigned int year=0; unsigned int year=0;
@ -101,6 +115,7 @@ class MainWindow : public Gtk::ApplicationWindow {
}; };
vector<string> array_region_local; vector<string> array_region_local;
vector<string> array_region; vector<string> array_region;
public: public:
MainWindow(BaseObjectType* obj, Glib::RefPtr<Gtk::Builder> const& builder); MainWindow(BaseObjectType* obj, Glib::RefPtr<Gtk::Builder> const& builder);
MainWindow(Glib::RefPtr<Gtk::Builder> const& builder); MainWindow(Glib::RefPtr<Gtk::Builder> const& builder);
@ -145,6 +160,8 @@ class MainWindow : public Gtk::ApplicationWindow {
string str_remove(std::string& source, const std::string to_remove); string str_remove(std::string& source, const std::string to_remove);
vector<std::string> split(const std::string &s, char delim); vector<std::string> split(const std::string &s, char delim);
struct Result<string> wrapper_call(string cmd); struct Result<string> wrapper_call(string cmd);
bool check_ntp(string &str_ntp);
vector<int> find_all(string &str_ntp, string substr);
}; };

@ -7,8 +7,9 @@ GenericName[ru]=Настройка даты и времени
Comment=Date time settings Comment=Date time settings
Comment[ru]=Приложение для настройки даты и времени Comment[ru]=Приложение для настройки даты и времени
Type=Application Type=Application
Exec=pkexec ubl-settings-datetime Exec=pkexec ubl-settings-datetime --lock-datetime
Icon=ubl-settings-datetime Icon=ubl-settings-datetime
Terminal=false Terminal=false
X-XfcePluggable=true X-XfcePluggable=true
X-UBLPluggable=true
Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;X-UBL-SettingsManager;X-UBL-SystemSettings; Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;X-UBL-SettingsManager;X-UBL-SystemSettings;

@ -2,183 +2,47 @@
<!-- Generated with glade 3.38.2 --> <!-- Generated with glade 3.38.2 -->
<interface> <interface>
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<object class="GtkWindow" id="mess_dchp"> <object class="GtkMenu" id="menu1">
<property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="title" translatable="yes">Внимание!</property>
<property name="type-hint">dialog</property>
<child> <child>
<object class="GtkBox"> <object class="GtkMenuItem" id="btnSaveLocal">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="label" translatable="yes">Save Local</property>
<child> <property name="use-underline">True</property>
<object class="GtkBox"> </object>
<property name="visible">True</property> </child>
<property name="can-focus">False</property> <child>
<property name="margin-left">5</property> <object class="GtkMenuItem" id="btnSaveGlobl">
<property name="margin-right">5</property> <property name="visible">True</property>
<property name="margin-start">5</property> <property name="can-focus">False</property>
<property name="margin-end">5</property> <property name="label" translatable="yes">Save Global</property>
<child> <property name="use-underline">True</property>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</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">gtk-dialog-warning</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblMessage">
<property name="width-request">160</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes">Enter DHCP !</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">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnMessClose">
<property name="label" translatable="yes">OK</property>
<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">3</property>
<property name="margin-bottom">3</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object> </object>
</child> </child>
</object> </object>
<object class="GtkWindow" id="mess_sudo"> <object class="GtkMenu" id="menu2">
<property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="title" translatable="yes">Внимание!</property>
<property name="window-position">center</property>
<property name="type-hint">dialog</property>
<child> <child>
<object class="GtkBox"> <object class="GtkMenuItem" id="btnDownloadGlobal">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="label" translatable="yes">Download Global</property>
<child> <property name="use-underline">True</property>
<object class="GtkBox">
<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>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</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">gtk-dialog-warning</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblMessageSudo">
<property name="width-request">160</property>
<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">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">Enter DHCP !</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">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnMessCloseSudo">
<property name="label" translatable="yes">OK</property>
<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">3</property>
<property name="margin-bottom">3</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object> </object>
</child> </child>
</object> </object>
<object class="GtkWindow" id="window"> <object class="GtkWindow" id="window">
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="title" translatable="yes" context="Settings the date and time" comments="Date and Time Settings">Настройки даты и времени</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkBox" id="plugBox"> <object class="GtkBox" id="standartHead">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
@ -277,6 +141,18 @@
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="plugBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
@ -460,7 +336,7 @@ Format: DD.MM.YYYY</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
<property name="margin-left">5</property> <property name="margin-left">5</property>
<property name="margin-right">8</property> <property name="margin-right">5</property>
<property name="margin-start">5</property> <property name="margin-start">5</property>
<property name="margin-end">5</property> <property name="margin-end">5</property>
<property name="margin-top">6</property> <property name="margin-top">6</property>
@ -538,7 +414,7 @@ Format: DD.MM.YYYY</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
<property name="margin-left">5</property> <property name="margin-left">5</property>
<property name="margin-right">8</property> <property name="margin-right">10</property>
<property name="margin-start">5</property> <property name="margin-start">5</property>
<property name="margin-end">10</property> <property name="margin-end">10</property>
<property name="margin-top">6</property> <property name="margin-top">6</property>
@ -938,7 +814,7 @@ Format: DD.MM.YYYY</property>
<object class="GtkLabel" id="lblTimeZoneGlob"> <object class="GtkLabel" id="lblTimeZoneGlob">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Часовой пояс</property> <property name="label" translatable="yes">Time Zone</property>
</object> </object>
</child> </child>
</object> </object>
@ -975,7 +851,90 @@ Format: DD.MM.YYYY</property>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">0</property> <property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="show-close-button">True</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="icon-name">ubl-settings-datetime</property>
</object>
</child>
<child>
<object class="GtkBox" id="boxButton">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<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">menu1</property>
<child>
<object class="GtkLabel" id="lblSave">
<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">Save</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<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">menu2</property>
<child>
<object class="GtkLabel" id="lblDownload">
<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">Download</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
</packing> </packing>
</child> </child>
</object> </object>
@ -1004,6 +963,173 @@ Format: DD.MM.YYYY</property>
</object> </object>
</child> </child>
</object> </object>
<object class="GtkWindow" id="mess_dchp">
<property name="can-focus">False</property>
<property name="title" translatable="yes">Внимание!</property>
<property name="type-hint">dialog</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>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</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">gtk-dialog-warning</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblMessage">
<property name="width-request">160</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes">Enter DHCP !</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">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnMessClose">
<property name="label" translatable="yes">OK</property>
<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">3</property>
<property name="margin-bottom">3</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkWindow" id="mess_sudo">
<property name="can-focus">False</property>
<property name="title" translatable="yes">Внимание!</property>
<property name="window-position">center</property>
<property name="type-hint">dialog</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>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</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">gtk-dialog-warning</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblMessageSudo">
<property name="width-request">160</property>
<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">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">Enter DHCP !</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">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnMessCloseSudo">
<property name="label" translatable="yes">OK</property>
<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">3</property>
<property name="margin-bottom">3</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkWindow" id="windowsNnpClose"> <object class="GtkWindow" id="windowsNnpClose">
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>

@ -22,6 +22,9 @@ msgstr "Введён недопустимый символ"
msgid "Longyearbyen" msgid "Longyearbyen"
msgstr "Лонгйир" msgstr "Лонгйир"
msgid "Error in the ntp name"
msgstr "Ошибка в имени ntp"
msgid "Stop the synchronization service" msgid "Stop the synchronization service"
msgstr "Остановить сервис синхронизации" msgstr "Остановить сервис синхронизации"
@ -1633,9 +1636,24 @@ msgstr " --lock-update Отключить сохранение измене
msgid "Options:\n" msgid "Options:\n"
msgstr "Опции:\n" msgstr "Опции:\n"
msgid "Save"
msgstr "Сохранить"
msgid "Save global"
msgstr "Сохранить глобально"
msgid "Save local"
msgstr "Сохранить локально"
msgid "Download global"
msgstr "Загрузить глобально"
msgid "Disabled" msgid "Disabled"
msgstr "Отключено" msgstr "Отключено"
msgid "Download"
msgstr "Загрузить"
msgid "Argument not recognized\n" msgid "Argument not recognized\n"
msgstr "Не распознанный аргумент\n" msgstr "Нepacпoзнaнный аргумент\n"

Loading…
Cancel
Save