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

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

2
.gitignore vendored

@ -8,3 +8,5 @@ source/**/ubl_settings_datetime
source/**/main.o
source/**/ubl_settings_datetime.o
reg/
ubl-util-standard.h
ubl-util-standard.c

@ -21,6 +21,12 @@ all: init build
init:
@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}"
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 \
-O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection ")
-fstack-clash-protection -fcf-protection -g")
set(SOURCE_FILES
ubl-util-standard.h
ubl-util-standard.c
main.cc
ubl-settings-datetime.cc
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"
int main(int argc, char* 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)){
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 builder = Gtk::Builder::create_from_file(path_glade + "ubl-settings-datetime.glade");
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"
using namespace std;
@ -25,6 +11,7 @@ bool flag_datetime = false;
bool flag_timezone = false;
bool flag_ntp = 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)
: 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_flags(Glib::OptionEntry::FLAG_IN_MAIN);
socketIDArg.set_description("Settings manager socket");
Glib::OptionEntry socketExtId;
socketExtId.set_long_name("socket-ext-id");
socketExtId.set_flags(Glib::OptionEntry::FLAG_IN_MAIN);
socketExtId.set_description("Settings manager secondary socket");
add_entry(socketIDArg, m_socketID);
add_entry(socketExtId, socket_ext_id_I);
}
::Window CmdArgParser::GetSocketID() const{
return m_socketID;
@ -51,6 +45,17 @@ MainWindow::MainWindow(Glib::RefPtr<Gtk::Builder> const& builder) {
}
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;
this->get_builder();
this->lacalization();
@ -63,8 +68,6 @@ void MainWindow::settings(){
this->flag_block_gui();
this->event();
this->parse_text_date();
}
else{
numTimeHrs->set_sensitive(false);
@ -102,6 +105,12 @@ int MainWindow::check_root(){
return 0;
}
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"));
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:"));
@ -230,6 +239,12 @@ void MainWindow::get_builder(){
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);
builder->get_widget("btnDownload",btnDownload);
builder->get_widget("lblDownload",lblDownload);
builder->get_widget("btnDownloadGlobal", btnDownloadGlobal);
//builder->get_widget("cbxSynchronizeNtp",cbxSynchronizeNtp);
@ -307,7 +322,9 @@ bool MainWindow::focus_ntp(GdkEventFocus* event){
"@","[","]","\\","{","}","|","~", " "
};
bool flag_error = false;
bool flag_error_check_ntp = false;
string str_ntp = txtNtpServer->get_text();
flag_error_check_ntp = this->check_ntp(str_ntp);
for (const auto &simvol: array_simvol){
if (str_ntp.find(simvol)!=std::string::npos){
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 + "\"";
response_cmd = system(cmd.c_str());
}
else{
if (flag_error==true){
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;
}
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 Result<string> obj_result;
string response=this->call(cmd);

@ -1,14 +1,21 @@
#ifndef UBL_SETTINGS_DATETIME_H
#define UBL_SETTINGS_DATETIME_H
#include <gtkmm/window.h>
#include <iostream>
#include <gtkmm.h>
#include <string>
#include <vector>
#include <map>
#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-util-standard.c"
using namespace std;
@ -22,7 +29,7 @@ extern bool flag_datetime;
extern bool flag_timezone;
extern bool flag_ntp;
extern bool flag_update;
extern int socket_ext_id_I;
class CmdArgParser : public Glib::OptionGroup
{
public:
@ -70,6 +77,8 @@ class MainWindow : public Gtk::ApplicationWindow {
Gtk::Label *lblSynchronizeBtn;
Gtk::Label *lblDateTimeSettingGlob;
Gtk::Label *lblTimeBios;
Gtk::Label *lblSave;
Gtk::Label *lblDownload;
Gtk::Label *lblBanerStopNtp;
Gtk::Button *btnHardwareTime;
Gtk::CheckButton *cbxSynchronizeNtp;
@ -80,6 +89,11 @@ class MainWindow : public Gtk::ApplicationWindow {
Gtk::Label *lblNtpClose;
Gtk::Entry *txtNtpServer;
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_local;
unsigned int year=0;
@ -101,6 +115,7 @@ class MainWindow : public Gtk::ApplicationWindow {
};
vector<string> array_region_local;
vector<string> array_region;
public:
MainWindow(BaseObjectType* obj, 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);
vector<std::string> split(const std::string &s, char delim);
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[ru]=Приложение для настройки даты и времени
Type=Application
Exec=pkexec ubl-settings-datetime
Exec=pkexec ubl-settings-datetime --lock-datetime
Icon=ubl-settings-datetime
Terminal=false
X-XfcePluggable=true
X-UBLPluggable=true
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 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<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">
<object class="GtkMenu" id="menu1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<object class="GtkMenuItem" id="btnSaveLocal">
<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>
<property name="label" translatable="yes">Save Local</property>
<property name="use-underline">True</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>
<object class="GtkMenuItem" id="btnSaveGlobl">
<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>
<property name="label" translatable="yes">Save Global</property>
<property name="use-underline">True</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">
<object class="GtkMenu" id="menu2">
<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>
<object class="GtkMenuItem" id="btnDownloadGlobal">
<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>
<property name="label" translatable="yes">Download Global</property>
<property name="use-underline">True</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">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="plugBox">
<object class="GtkBox" id="standartHead">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
@ -277,6 +141,18 @@
<property name="position">0</property>
</packing>
</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>
<object class="GtkBox">
<property name="visible">True</property>
@ -460,7 +336,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">8</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>
@ -538,7 +414,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">8</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>
@ -938,7 +814,7 @@ Format: DD.MM.YYYY</property>
<object class="GtkLabel" id="lblTimeZoneGlob">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Часовой пояс</property>
<property name="label" translatable="yes">Time Zone</property>
</object>
</child>
</object>
@ -975,7 +851,90 @@ Format: DD.MM.YYYY</property>
<packing>
<property name="expand">False</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>
</child>
</object>
@ -1004,6 +963,173 @@ Format: DD.MM.YYYY</property>
</object>
</child>
</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">
<property name="can-focus">False</property>
<child>

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

Loading…
Cancel
Save