diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5161b99 --- /dev/null +++ b/Makefile @@ -0,0 +1,61 @@ +#!/usr/bin/make -f + +pkgname="ubconfig" + +all: uninstall build check install clean + +uninstall: + pkgname="ubconfig" + for size in 16 32 48; do + rm -f "/usr/share/icons/hicolor/${size}x${size}/apps/ublinux-${pkgname}.svg" + rm -f "/usr/share/icons/hicolor/${size}x${size}/apps/hide_pass_icon.svg" + rm -f "/usr/share/icons/hicolor/${size}x${size}/apps/show_pass_icon.svg" + done + for file_po in *.po; do + lang=${file_po##*_};lang=${lang%.*} + file_mo=${file_po##*/}; file_mo="${file_mo%_*.po}.mo" + path_file_mo="/usr/share/locale/${lang}/LC_MESSAGES/${file_mo}" + rm -f "/usr/share/locale/${lang}/LC_MESSAGES/${file_mo}" + done + rm -f /usr/bin/"${pkgname}" + rm -f /usr/bin/"${pkgname}".gtk + rm -f /usr/share/"${pkgname}"/ui/"${pkgname}".glade + rm -f /usr/share/applications/"${pkgname}".desktop + rm -f /usr/share/"${pkgname}"/css/style.css + rm -f /usr/share/"${pkgname}"/images/side_img_ubc_v_dark.png + rm -f /usr/share/"${pkgname}"/images/side_img_ubc_v_light.png + rm -f /usr/share/polkit-1/actions/org.freedesktop.policykit."${pkgname}".pkexec.policy + +build: + echo "Build" + +check: + echo "Check" + +install: + for size in 16 32 48; do + install -dm755 /usr/share/icons/hicolor/${size}x${size}/apps + rsvg-convert -w ${size} -h ${size} -f svg --keep-image-data "ublinux-${pkgname}.svg" -o "/usr/share/icons/hicolor/${size}x${size}/apps/ublinux-${pkgname}.svg" + rsvg-convert -w ${size} -h ${size} -f svg --keep-image-data "hide_pass_icon.svg" -o "/usr/share/icons/hicolor/${size}x${size}/apps/hide_pass_icon.svg" + rsvg-convert -w ${size} -h ${size} -f svg --keep-image-data "show_pass_icon.svg" -o "/usr/share/icons/hicolor/${size}x${size}/apps/show_pass_icon.svg" + done + for file_po in *.po; do + lang=${file_po##*_};lang=${lang%.*} + install -dm755 /usr/share/locale/${lang}/LC_MESSAGES + file_mo=${file_po##*/}; file_mo="${file_mo%_*.po}.mo" + path_file_mo="/usr/share/locale/${lang}/LC_MESSAGES/${file_mo}" + msgfmt "${file_po}" -v -f -o "${path_file_mo}" + done + install -vDm0755 "${pkgname}" -t /usr/bin/ + install -vDm0755 "${pkgname}".gtk -t /usr/bin/ + install -vDm0644 "${pkgname}".glade -t /usr/share/"${pkgname}"/ui/ + install -vDm0644 "${pkgname}".desktop -t /usr/share/applications/ + install -vDm0644 style.css -t /usr/share/"${pkgname}"/css/ + install -vDm0644 side_img_ubc_v_dark.png -t /usr/share/"${pkgname}"/images/ + install -vDm0644 side_img_ubc_v_light.png -t /usr/share/"${pkgname}"/images/ + install -vDm0644 org.freedesktop.policykit."${pkgname}".pkexec.policy -t /usr/share/polkit-1/actions/ + + +clean: + echo "Clean" + diff --git a/UBTime.cpp b/UBTime.cpp new file mode 100644 index 0000000..90f2abe --- /dev/null +++ b/UBTime.cpp @@ -0,0 +1,599 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; + +string path_app= "/home/superadmin/Документы/Проект/ubconfig_new/Ubconfig_date_time/"; +string app_name = "UBTime"; +bool flag_datetime = false; +bool flag_timezone = false; +bool flag_ntp = false; +bool flag_update = false; + +class MainWindow : public Gtk::ApplicationWindow { +public: + MainWindow(BaseObjectType* obj, Glib::RefPtr const& builder) + : Gtk::ApplicationWindow(obj) + , builder{builder} + { + path_file+="reg/"; + this->get_builder(); + _numTimeHrs->set_range(0,23); + _numTimeMin->set_range(0,59); + _numTimeHrs->set_increments(1.0,1.0); + _numTimeMin->set_increments(1.0,1.0); + _txtDate->set_sensitive(false); + this->get_config(); + this->flag_block_gui(); + this->event(); + + } + + virtual ~MainWindow() = default; + + void flag_block_gui(){ + if (flag_datetime==true){ + _numTimeHrs->set_sensitive(false); + _numTimeMin->set_sensitive(false); + } + else if (flag_timezone==true){ + _cbRegion->set_sensitive(false); + _cbZone->set_sensitive(false); + _cbRegionGlob->set_sensitive(false); + _cbZoneGlob->set_sensitive(false); + _btnChooseDate->set_sensitive(false); + } + else if (flag_ntp==true){ + _cbxSynchronizeNtp->set_sensitive(false); + _cbDhcp->set_sensitive(false); + _txtNtpServer->set_sensitive(false); + } + else if (flag_update==true){ + _btnUpdateDateTime->set_sensitive(false); + } + } + void add_CSS(){ + Glib::RefPtr cssProvider = Gtk::CssProvider::create(); + cssProvider->load_from_path("style.css"); + Glib::RefPtr styleContext = Gtk::StyleContext::create(); + Glib::RefPtr screen = Gdk::Screen::get_default();//get default screen + styleContext->add_provider_for_screen(screen, cssProvider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);//add provider for screen in all application + Glib::RefPtr context = _btnUpdateDateTime->get_style_context(); + context->add_class("myButton"); + } + + void get_builder(){ + builder->set_translation_domain(app_name); + + builder->get_widget("btnUpdateDateTime", _btnUpdateDateTime); + builder->get_widget("btnChooseDate", _btnChooseDate); + builder->get_widget("btnMessClose", _btnMessClose); + builder->get_widget("cbxSynchronizeNtp", _cbxSynchronizeNtp); + builder->get_widget("popCalendar", _popCalendar); + builder->get_widget("numTimeHrs", _numTimeHrs); + builder->get_widget("numTimeMin", _numTimeMin); + builder->get_widget("cbDhcp", _cbDhcp); + builder->get_widget("txtDate", _txtDate); + builder->get_widget("cbRegion", _cbRegion); + builder->get_widget("cbRegionGlob", _cbRegionGlob); + builder->get_widget("cbZone", _cbZone); + builder->get_widget("cbZoneGlob", _cbZoneGlob); + builder->get_widget("txtNtpServer", _txtNtpServer); + builder->get_widget("cldrDate", _cldrDate); + builder->get_widget("mess_dchp", _mess_dchp); + //this->add_CSS(); + } + void event(){ + _btnMessClose->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::gui_mess_close)); + _cldrDate->signal_day_selected().connect(sigc::mem_fun(*this, &MainWindow::get_calendar)); + _cbxSynchronizeNtp->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_ntp_toggle)); + _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)); + _cbRegionGlob->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::append_zone_glob)); + _cbZone->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::enter_zone)); + _cbZoneGlob->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::enter_zone_glob)); + _txtNtpServer->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_ntp)); + //_txtNtpServer->grab_focus(); + } + + void gui_mess_close(){ + _mess_dchp->hide(); + } + + bool focus_ntp(GdkEventFocus* event){ + if (_txtNtpServer->get_text()=="" || _txtNtpServer->get_text()==" "){ + _mess_dchp->show(); + } + else{ + string cmd = ""; + cmd = "sudo /usr/bin/ubconfig set network NTPSERVERS=" + _txtNtpServer->get_text(); + this->call(cmd.c_str()); + } + + return true; + } + + + + + void event_entry_cbDhcp(){ + Glib::ustring str_dhcp = _cbDhcp->get_active_text(); + if (str_dhcp.length()!=0){ + if (str_dhcp=="DHCP"){ + string cmd = "sudo /usr/bin/ubconfig set network NTPSERVERS=dhcp"; + system(cmd.c_str()); + _txtNtpServer->set_sensitive(false); + _cbDhcp->set_active(0); + _txtNtpServer->set_text(""); + } + else{ + string str_dhcp = this->call("sudo /usr/bin/ubconfig get network NTPSERVERS"); + + if ((str_dhcp!="") && (str_dhcp!="(null)") ){ + 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"){ + + + _txtNtpServer->set_text(str_dhcp); + } + _txtNtpServer->set_sensitive(true); + _cbDhcp->set_active(1); + } + } + } + else{ + string cmd = "sudo /usr/bin/ubconfig set network NTPSERVERS=dhcp"; + system(cmd.c_str()); + //_txtNtpServer->set_sensitive(false); + _cbDhcp->set_active(0); + } + } + + void get_calendar(){ + _cldrDate->get_date(year, month, day); + string str_month = ""; + string str_day = ""; + month=month+1; + if (month <10){ + str_month = "0"+to_string(month); + } + else{ + str_month = to_string(month); + } + if (day <10){ + str_day = "0"+to_string(day); + } + else{ + str_day = to_string(day); + } + string date = str_day + '.' + str_month + '.' + to_string(year); + _txtDate->set_text(date); + } + + + void calendar_show(){ + time_t now = time(0); + tm *ltm = localtime(&now); + unsigned int y=1900+ ltm->tm_year; + unsigned int m=ltm->tm_mon; + unsigned int d=ltm->tm_mday; + + + _cldrDate->select_month(m,y); + _cldrDate->select_day(d); + _popCalendar->show(); + } + + void enry_dhcp_mess(){ + string str_dhcp = this->call("sudo /usr/bin/ubconfig get network NTPSERVERS"); + if ((str_dhcp!="") && (str_dhcp!="(null)")){ + _cbxSynchronizeNtp->set_active(1); + 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(0); + _txtNtpServer->set_sensitive(false); + //_cbxSynchronizeNtp->set_sensitive(true); + } + else{ + if (str_dhcp==""){ + _mess_dchp->show(); + } + else{ + _cbDhcp->set_active(1); + //_txtNtpServer->set_sensitive(true); + //_cbxSynchronizeNtp->set_sensitive(false); + _txtNtpServer->set_text(str_dhcp); + } + } + + + //_cbxDhcp->set_active(true); + this->set_ntp_toggle(); + } + else{ + _cbxSynchronizeNtp->set_active(0); + _cbDhcp->set_sensitive(0); + _txtNtpServer->set_sensitive(0); + + } + } + void get_config(){ + this->read_file(); + this->update_hour_minute(); + this->update_calendar(); + //this->event_entry_cbDhcp(); + this->enry_dhcp_mess(); + + string str_ntp = this->call("sudo systemctl status ntpd.service systemd-timesyncd.service | grep \"Active: active\""); + if (str_ntp.length()<50) { + _cbxSynchronizeNtp->set_active(false); + } + else{ + _cbxSynchronizeNtp->set_active(true); + } + + string read_reg_zon_cfg = this->call("sudo /usr/bin/ubconfig get clock ZONE"); + if ((read_reg_zon_cfg != "") && (read_reg_zon_cfg !="(null)")){ + read_reg_zon_cfg = read_reg_zon_cfg.substr(read_reg_zon_cfg.find("=")+1,read_reg_zon_cfg.length()); + read_reg_zon_cfg = read_reg_zon_cfg.substr(0,read_reg_zon_cfg.find("\n")); + string str_filling_reg = read_reg_zon_cfg.substr(0,read_reg_zon_cfg.find("/")); + string str_filling_zon = read_reg_zon_cfg.substr(read_reg_zon_cfg.find("/")+1,read_reg_zon_cfg.length()); + str_filling_zon = str_filling_zon.substr(0,str_filling_zon.find("\n")); + string str_zone_check = ""; + this->append_region_zone(str_filling_reg,str_filling_zon); + } + else { + this->append_region_zone("Asia","Omsk"); + + } + + } + + void enter_zone(){ + Glib::ustring zone_text = _cbZone->get_active_text(); + Glib::ustring reg_text = _cbRegion->get_active_text(); + if(!(zone_text.empty()) && !(reg_text.empty())){ + str_zone=zone_text.substr(zone_text.find(") ")+2,zone_text.length()); + str_region=reg_text; + string cmd = "sudo timedatectl set-timezone '" + str_region +"/" + str_zone+"'"; + system(cmd.c_str()); + } + else{ + str_zone=""; + str_region=""; + } + } + + void enter_zone_glob(){ + Glib::ustring zone_text = _cbZoneGlob->get_active_text(); + Glib::ustring reg_text = _cbRegionGlob->get_active_text(); + if(!(zone_text.empty()) && !(reg_text.empty())){ + str_zoneGlob = zone_text.substr(zone_text.find(") ")+2,zone_text.length()); + str_region_glob = reg_text; + string cmd = "sudo /usr/bin/ubconfig set clock ZONE=" +str_region_glob +"/" + str_zoneGlob; + system(cmd.c_str()); + } + else{ + str_zoneGlob=""; + str_region_glob=""; + } + } + + void set_ntp_toggle(){ + bool flag = _cbxSynchronizeNtp->get_active(); + if (flag_datetime==true){ + + } + else { + _numTimeHrs->set_sensitive(!flag); + _numTimeMin->set_sensitive(!flag); + _btnChooseDate->set_sensitive(!flag); + } + + //_txtDate->set_sensitive(!flag); + + //_btnUpdateDateTime->set_sensitive(!flag); + if (flag==false){ + system("sudo systemctl --now disable systemd-timesyncd.service ntpd.service"); + } + else { + system("sudo systemctl --now enable systemd-timesyncd.service"); + } + + } + + void append_region_zone(string region, string zone){ + int index = 0; + for ( const auto &text : time_reg_map ) { + _cbRegion->append(text.first); + _cbRegionGlob->append(text.first); + if (text.first == region){ + _cbRegionGlob->set_active(index); + _cbRegion->set_active(index); + + } + index+=1; + } + index = 0; + string cheek_zone = ""; + for (const auto &_str_zone : time_reg_map.at(region)){ + _cbZone->append(_str_zone); + _cbZoneGlob->append(_str_zone); + if (_str_zone!=""){ + cheek_zone = _str_zone.substr(_str_zone.find(") ")+2,_str_zone.length()); + if (cheek_zone == zone){ + _cbZone->set_active(index); + _cbZoneGlob->set_active(index); + } + } + index+=1; + } + } + string call(string cmd){ + FILE *fp; + int status; + char path[PATH_MAX]; + fp = popen(cmd.c_str(), "r"); + if (fp == NULL){ + //return ""; + } + + while (fgets(path, PATH_MAX, fp) != NULL){ + printf("%s", path); + break; + + } + + status = pclose(fp); + if (status == -1) { + //return ""; + } + else { + //return ""; + } + return path; + } + + void append_zone(){ + Glib::ustring text = _cbRegion->get_active_text(); + _cbZone->remove_all(); + + if(!(text.empty())){ + str_region = text; + for (const auto &_str_zone : time_reg_map.at(str_region)){ + _cbZone->append(_str_zone); + } + } + + } + + void append_zone_glob(){ + Glib::ustring text = _cbRegionGlob->get_active_text(); + _cbZoneGlob->remove_all(); + if(!(text.empty())){ + str_region_glob = text; + for (const auto &_str_zone : time_reg_map.at(str_region_glob)){ + _cbZoneGlob->append(_str_zone); + } + } + + } + void update_time_date(){ + this->enter_zone(); + bool flag = _cbxSynchronizeNtp->get_active(); + if (flag==false){ + hour = _numTimeHrs->get_value_as_int(); + minute = _numTimeMin->get_value_as_int(); + time_t now = time(0); + tm *ltm = localtime(&now); + string cmd = "sudo timedatectl set-time \""+ + to_string(hour) + ":" + to_string(minute) + + ":" + to_string(ltm->tm_sec) +"\""; + system(cmd.c_str()); + if ((year==0) && (month == 0) && (day == 0)){ + time_t now = time(0); + tm *ltm = localtime(&now); + year=1900+ ltm->tm_year; + month=ltm->tm_mon+1; + day=ltm->tm_mday; + } + string str_month = ""; + string str_day = ""; + if (month <10){ + str_month = "0"+to_string(month+1); + } + else{ + str_month = to_string(month+1); + } + if (day <10){ + str_day = "0"+to_string(day); + } + else{ + str_day = to_string(day); + } + string cmd1 = "sudo date --set=\"" +to_string(year)+ + str_month+str_day + " " +to_string(hour) + ":" + + to_string(minute)+"\""; + system(cmd1.c_str()); + } + + + } + void update_hour_minute(){ + time_t now = time(0); + tm *ltm = localtime(&now); + _numTimeHrs->set_value(ltm->tm_hour); + _numTimeMin->set_value(ltm->tm_min); + } + + void update_calendar(){ + time_t now = time(0); + tm *ltm = localtime(&now); + int year = 1900 + (int)ltm->tm_year; + string str_month = ""; + string str_day = ""; + unsigned int month, day; + month=ltm->tm_mon+1; + day=ltm->tm_mday; + if (month <=10){ + str_month = "0"+to_string(month); + } + else{ + str_month = to_string(month); + } + if (day <10){ + str_day = "0"+to_string(day); + } + else{ + str_day = to_string(day); + } + string date = str_day + '.' + str_month + '.' + to_string(year); + _txtDate->set_text(date); + } + void read_file(){ + std::string line; + namespace fs = std::filesystem; + for (const auto & entry : fs::directory_iterator(path_file)){ + std::ifstream in(entry.path()); // окрываем файл для чтения + if (in.is_open()) + { + vector zone; + zone.push_back(""); + while (getline(in, line)) + { + zone.push_back(string(gettext(line.c_str()))); + } + string key_reg = entry.path().filename().string(); + key_reg = string(gettext(key_reg.c_str())); + time_reg_map.insert({key_reg, zone}); + } + in.close(); + } + } + +private: + string path_file=path_app; + Glib::RefPtr builder; + Gtk::Button *_btnUpdateDateTime; + Gtk::Button *_btnChooseDate; + Gtk::Button *_btnMessClose; + Gtk::ComboBoxText *_cbDhcp; + Gtk::SpinButton *_numTimeHrs; + Gtk::SpinButton *_numTimeMin; + Gtk::CheckButton *_cbxSynchronizeNtp; + + Gtk::Entry *_txtDate; + Gtk::ComboBoxText *_cbRegion; + Gtk::ComboBoxText *_cbRegionGlob; + Gtk::ComboBoxText *_cbZone; + Gtk::ComboBoxText *_cbZoneGlob; + Gtk::Entry *_txtNtpServer; + Gtk::MessageDialog *_mess_dchp; + Gtk::Popover *_popCalendar; + Gtk::Calendar *_cldrDate; + unsigned int year, month, day; + int hour; + int minute; + string str_region=""; + string str_region_glob=""; + string str_txtDate; + string str_txtNtpServer; + string str_zone=""; + string str_zoneGlob; + std::map > time_reg_map; + +}; + +void help(){ + cout << "Параметры командной строки --lock-datetime\n --lock-timezone\n --lock-ntp\n --lock-update\n" << endl; +} + + +int main(int argc, char* argv[]) { + //path_app=filesystem::current_path(); + //path_app+="/"; + //cout << *argv[0] << endl; + //app_name=to_string(*argv[0]); + //app_name=app_name.substr(1, app_name.length()); + string str_cmd_argv = ""; + for (int i=1; iget_widget_derived("window", wnd); + auto r = app->run(*wnd); + + delete wnd; + + return r; +} \ No newline at end of file diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..4b06858 --- /dev/null +++ b/main.cpp @@ -0,0 +1,477 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; +class MainWindow; + +class MainWindow { +public: + MainWindow(Glib::RefPtr const& builder) + { + this->builder = builder; + this->get_builder(); + _numTimeHrs->set_range(0,23); + _numTimeMin->set_range(0,59); + _numTimeHrs->set_increments(1.0,1.0); + _numTimeMin->set_increments(1.0,1.0); + _txtDate->set_sensitive(false); + this->get_config(); + this->event(); + + + } + + virtual ~MainWindow() = default; + // Функция вызывается btnUpdateDate для обновления времени + void get_builder(){ + builder->get_widget("btnUpdateDateTime", _btnUpdateDateTime); + builder->get_widget("btnChooseDate", _btnChooseDate); + builder->get_widget("cbxSynchronizeNtp", _cbxSynchronizeNtp); + builder->get_widget("popCalendar", _popCalendar); + builder->get_widget("numTimeHrs", _numTimeHrs); + builder->get_widget("numTimeMin", _numTimeMin); + builder->get_widget("cbDhcp", _cbDhcp); + builder->get_widget("txtDate", _txtDate); + builder->get_widget("cbRegion", _cbRegion); + builder->get_widget("cbRegionGlob", _cbRegionGlob); + builder->get_widget("cbZone", _cbZone); + builder->get_widget("cbZoneGlob", _cbZoneGlob); + builder->get_widget("txtNtpServer", _txtNtpServer); + builder->get_widget("cldrDate", _cldrDate); + builder->get_widget("mess_dchp", _mess_dchp); + + } + void event(){ + _cldrDate->signal_day_selected().connect(sigc::mem_fun(*this, &MainWindow::get_calendar)); + _cbxSynchronizeNtp->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_ntp_toggle)); + _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::get_ghcp)); + _cbRegion->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::append_zone)); + _cbRegionGlob->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::append_zone_glob)); + _cbZone->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::enter_zone)); + _cbZoneGlob->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::enter_zone_glob)); + _txtNtpServer->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::A));; + } + + void focus_ntp(){ + + } + void A(){ + cout << "A" << endl; + //_txtNtpServer->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_ntp)); + } + + + + + void enry_dhcp_mess(){} + + void get_ghcp(){ + Glib::ustring str_dhcp = _cbDhcp->get_active_text(); + if (str_dhcp.length()!=0){ + if (str_dhcp=="DHCP"){ + string cmd = "sudo /usr/bin/ubconfig set network NTPSERVERS=dhcp"; + system(cmd.c_str()); + //_txtNtpServer->set_active(false); + _cbDhcp->set_active(0); + } + else{ + string cmd = "sudo /usr/bin/ubconfig set network NTPSERVERS=" + _txtNtpServer->get_text(); + //_txtNtpServer->set_active(true); + system(cmd.c_str()); + _cbDhcp->set_active(1); + } + } + else{ + string cmd = "sudo /usr/bin/ubconfig set network NTPSERVERS=dhcp"; + system(cmd.c_str()); + //_txtNtpServer->set_sensitive(false); + _cbDhcp->set_active(0); + } + } + + void get_calendar(){ + _cldrDate->get_date(year, month, day); + string date = to_string(day) + ':' + to_string(month+1) + ':' + to_string(year); + _txtDate->set_text(date); + } + + + void calendar_show(){ + time_t now = time(0); + tm *ltm = localtime(&now); + unsigned int y=1900+ ltm->tm_year; + unsigned int m=ltm->tm_mon; + unsigned int d=ltm->tm_mday; + + + _cldrDate->select_month(m,y); + _cldrDate->select_day(d); + _popCalendar->show(); + } + + void get_config(){ + this->read_file(); + this->update_hour_minute(); + this->update_calendar(); + this->get_ghcp(); + string str_dhcp = this->call("sudo /usr/bin/ubconfig get network NTPSERVERS"); + cout << str_dhcp << endl; + if ((str_dhcp!="") && (str_dhcp!="(null)")){ + 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(0); + //_txtNtpServer->set_sensitive(false); + //_cbxSynchronizeNtp->set_sensitive(true); + } + else{ + if (str_dhcp==""){ + _mess_dchp->show(); + } + else{ + _cbDhcp->set_active(1); + //_txtNtpServer->set_sensitive(true); + //_cbxSynchronizeNtp->set_sensitive(false); + _txtNtpServer->set_text(str_dhcp); + } + } + + + //_cbxDhcp->set_active(true); + this->set_ntp_toggle(); + } + string str_ntp = this->call("sudo systemctl status ntpd.service systemd-timesyncd.service | grep \"Active: active\""); + if (str_ntp.length()<50) { + _cbxSynchronizeNtp->set_active(false); + } + else{ + _cbxSynchronizeNtp->set_active(true); + } + + string read_reg_zon_cfg = this->call("sudo /usr/bin/ubconfig get clock ZONE"); + if ((read_reg_zon_cfg != "") && (read_reg_zon_cfg !="(null)")){ + read_reg_zon_cfg = read_reg_zon_cfg.substr(read_reg_zon_cfg.find("=")+1,read_reg_zon_cfg.length()); + read_reg_zon_cfg = read_reg_zon_cfg.substr(0,read_reg_zon_cfg.find("\n")); + string str_filling_reg = read_reg_zon_cfg.substr(0,read_reg_zon_cfg.find("/")); + string str_filling_zon = read_reg_zon_cfg.substr(read_reg_zon_cfg.find("/")+1,read_reg_zon_cfg.length()); + str_filling_zon = str_filling_zon.substr(0,str_filling_zon.find("\n")); + string str_zone_check = ""; + this->append_region_zone(str_filling_reg,str_filling_zon); + } + else { + this->append_region_zone("Asia","Omsk"); + + } + + } + + void enter_zone(){ + Glib::ustring zone_text = _cbZone->get_active_text(); + Glib::ustring reg_text = _cbRegion->get_active_text(); + if(!(zone_text.empty()) && !(reg_text.empty())){ + str_zone=zone_text.substr(zone_text.find(") ")+2,zone_text.length()); + str_region=reg_text; + string cmd = "sudo timedatectl set-timezone '" + str_region +"/" + str_zone+"'"; + system(cmd.c_str()); + } + else{ + str_zone=""; + str_region=""; + } + } + + void enter_zone_glob(){ + Glib::ustring zone_text = _cbZoneGlob->get_active_text(); + Glib::ustring reg_text = _cbRegionGlob->get_active_text(); + if(!(zone_text.empty()) && !(reg_text.empty())){ + str_zoneGlob = zone_text.substr(zone_text.find(") ")+2,zone_text.length()); + str_region_glob = reg_text; + string cmd = "sudo /usr/bin/ubconfig set clock ZONE=" +str_region_glob +"/" + str_zoneGlob; + system(cmd.c_str()); + } + else{ + str_zoneGlob=""; + str_region_glob=""; + } + } + + void set_ntp_toggle(){ + bool flag = _cbxSynchronizeNtp->get_active(); + _numTimeHrs->set_sensitive(!flag); + _numTimeMin->set_sensitive(!flag); + //_txtDate->set_sensitive(!flag); + _btnChooseDate->set_sensitive(!flag); + //_btnUpdateDateTime->set_sensitive(!flag); + if (flag==false){ + system("sudo systemctl --now disable systemd-timesyncd.service ntpd.service"); + } + else { + system("sudo systemctl --now enable systemd-timesyncd.service"); + } + + } + + void append_region_zone(string region, string zone){ + int index = 0; + for ( const auto &text : time_reg_map ) { + _cbRegion->append(text.first); + _cbRegionGlob->append(text.first); + if (text.first == region){ + _cbRegionGlob->set_active(index); + _cbRegion->set_active(index); + + } + index+=1; + } + index = 0; + string cheek_zone = ""; + for (const auto &_str_zone : time_reg_map.at(region)){ + _cbZone->append(_str_zone); + _cbZoneGlob->append(_str_zone); + if (_str_zone!=""){ + cheek_zone = _str_zone.substr(_str_zone.find(") ")+2,_str_zone.length()); + if (cheek_zone == zone){ + _cbZone->set_active(index); + _cbZoneGlob->set_active(index); + } + } + index+=1; + } + } + string call(string cmd){ + FILE *fp; + int status; + char path[PATH_MAX]; + fp = popen(cmd.c_str(), "r"); + if (fp == NULL){ + //return ""; + } + + while (fgets(path, PATH_MAX, fp) != NULL){ + printf("%s", path); + break; + + } + + status = pclose(fp); + if (status == -1) { + //return ""; + } + else { + //return ""; + } + return path; + } + + void append_zone(){ + Glib::ustring text = _cbRegion->get_active_text(); + _cbZone->remove_all(); + + if(!(text.empty())){ + str_region = text; + for (const auto &_str_zone : time_reg_map.at(str_region)){ + _cbZone->append(_str_zone); + } + } + + } + + void append_zone_glob(){ + Glib::ustring text = _cbRegionGlob->get_active_text(); + _cbZoneGlob->remove_all(); + if(!(text.empty())){ + str_region_glob = text; + for (const auto &_str_zone : time_reg_map.at(str_region_glob)){ + _cbZoneGlob->append(_str_zone); + } + } + + } + void update_time_date(){ + this->enter_zone(); + bool flag = _cbxSynchronizeNtp->get_active(); + if (flag==false){ + hour = _numTimeHrs->get_value_as_int(); + minute = _numTimeMin->get_value_as_int(); + time_t now = time(0); + tm *ltm = localtime(&now); + string cmd = "sudo timedatectl set-time \""+ + to_string(hour) + ":" + to_string(minute) + + ":" + to_string(ltm->tm_sec) +"\""; + system(cmd.c_str()); + if ((year==0) && (month == 0) && (day == 0)){ + time_t now = time(0); + tm *ltm = localtime(&now); + year=1900+ ltm->tm_year; + month=ltm->tm_mon+1; + day=ltm->tm_mday; + } + string str_mount = ""; + string str_day = ""; + if (month <10){ + str_mount = "0"+to_string(month+1); + } + else{ + str_mount = to_string(month+1); + } + if (day <10){ + str_day = "0"+to_string(day); + } + else{ + str_day = to_string(day); + } + string cmd1 = "sudo date --set=\"" +to_string(year)+ + str_mount+str_day + " " +to_string(hour) + ":" + + to_string(minute)+"\""; + system(cmd1.c_str()); + } + + + } + void update_hour_minute(){ + time_t now = time(0); + tm *ltm = localtime(&now); + _numTimeHrs->set_value(ltm->tm_hour); + _numTimeMin->set_value(ltm->tm_min); + } + + void update_calendar(){ + time_t now = time(0); + tm *ltm = localtime(&now); + int year = 1900 + (int)ltm->tm_year; + string date = to_string(ltm->tm_mday) + ':' + to_string(ltm->tm_mon+1) + ':' + to_string(year); + _txtDate->set_text(date); + } + void read_file(){ + std::string line; + namespace fs = std::filesystem; + for (const auto & entry : fs::directory_iterator(path_file)){ + std::ifstream in(entry.path()); // окрываем файл для чтения + if (in.is_open()) + { + vector zone; + zone.push_back(""); + while (getline(in, line)) + { + zone.push_back(string(gettext(line.c_str()))); + } + string key_reg = entry.path().filename().string(); + key_reg = string(gettext(key_reg.c_str())); + time_reg_map.insert({key_reg, zone}); + } + in.close(); + } + } + +private: + string path_file="reg/"; + Glib::RefPtr builder; + Gtk::Button *_btnUpdateDateTime; + Gtk::Button *_btnChooseDate; + Gtk::ComboBoxText *_cbDhcp; + Gtk::SpinButton *_numTimeHrs; + Gtk::SpinButton *_numTimeMin; + Gtk::CheckButton *_cbxSynchronizeNtp; + + Gtk::Entry *_txtDate; + Gtk::ComboBoxText *_cbRegion; + Gtk::ComboBoxText *_cbRegionGlob; + Gtk::ComboBoxText *_cbZone; + Gtk::ComboBoxText *_cbZoneGlob; + Gtk::Entry *_txtNtpServer; + Gtk::MessageDialog *_mess_dchp; + Gtk::Popover *_popCalendar; + Gtk::Calendar *_cldrDate; + unsigned int year, month, day; + int hour; + int minute; + string str_region=""; + string str_region_glob=""; + string str_txtDate; + string str_txtNtpServer; + string str_zone=""; + string str_zoneGlob; + std::map > time_reg_map; + +}; + +class WrapperMainWindow : public Gtk::ApplicationWindow { + public: + WrapperMainWindow(BaseObjectType* obj, Glib::RefPtr const& builder) + : Gtk::ApplicationWindow(obj) + , builder{builder} + { + MainWindow MainWindow(builder); + } + virtual ~WrapperMainWindow() = default; + + private: + Glib::RefPtr builder; +}; +/* +class PlugMainWindow : public Gtk::Plug +{ + +public: + + SettingsPlug(::Window p_socketID) + : Gtk::Plug{p_socketID} + { + + } + void get_builder(Glib::RefPtr const& builder) + { + this->builder = builder; + } + private: + Glib::RefPtr builder; +} +*/ +int main(int argc, char* argv[]) { + string app_name = "main"; + //setlocale(LC_ALL, ""); + //bindtextdomain(app_name, "/usr/share/locale"); + //textdomain(app_name); + auto app = Gtk::Application::create(argc, argv, "de.engelmarkus.example"); + auto builder = Gtk::Builder::create_from_file("ubconfig_date_time.glade"); + + 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}; + //plug.show(); + + WrapperMainWindow * wnd = nullptr; + + builder->get_widget_derived("window", wnd); + + auto r = app->run(*wnd); + + delete wnd; + + return r; +} \ No newline at end of file diff --git a/messages.pot b/messages.pot new file mode 100644 index 0000000..5aac87c --- /dev/null +++ b/messages.pot @@ -0,0 +1,1552 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-01-14 18:29+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Ok +#: ubconfig_date_time.glade:26 +msgctxt "Ok" +msgid "Oк" +msgstr "" + +#. Enter DHCP +#: ubconfig_date_time.glade:68 +msgctxt "Enter DHCP" +msgid "Введите DHCP" +msgstr "" + +#. UBconfig - Дата и время +#: ubconfig_date_time.glade:88 +msgctxt "UBconfig - Дата и время" +msgid "UBconfig - Дата и время" +msgstr "" + +#: ubconfig_date_time.glade:123 +msgid "Изменить параметр NTPSERVERS" +msgstr "" + +#. Setting the date and time +#: ubconfig_date_time.glade:130 ubconfig_date_time.glade:553 +msgctxt "Setting the date and time" +msgid "Настройка даты и времени" +msgstr "" + +#. Time +#: ubconfig_date_time.glade:204 +msgctxt "Time" +msgid "Время" +msgstr "" + +#. Clock +#: ubconfig_date_time.glade:218 +msgctxt "Clock" +msgid "Часы" +msgstr "" + +#: ubconfig_date_time.glade:239 +msgid ":" +msgstr "" + +#. Minutes +#: ubconfig_date_time.glade:251 +msgctxt "Minutes" +msgid "Минуты" +msgstr "" + +#. Date +#: ubconfig_date_time.glade:289 +msgctxt "Date" +msgid "Дата" +msgstr "" + +#. Date of +#. Format: DD.MM.YYYY +#: ubconfig_date_time.glade:304 +msgctxt "" +"Date of\n" +"Format: DD.MM.YYYY" +msgid "" +"Дата\n" +"Формат: ДД.ММ.ГГГГ" +msgstr "" + +#. Interactive date picker +#: ubconfig_date_time.glade:323 +msgctxt "Interactive date picker" +msgid "Интерактивный выбор даты" +msgstr "" + +#. Change zone setting +#: ubconfig_date_time.glade:360 ubconfig_date_time.glade:679 +msgctxt "Change zone setting" +msgid "Изменить параметр зоны" +msgstr "" + +#. time zone +#: ubconfig_date_time.glade:367 +msgctxt "time zone" +msgid "Временная зона" +msgstr "" + +#. Region +#: ubconfig_date_time.glade:393 ubconfig_date_time.glade:400 +#: ubconfig_date_time.glade:712 ubconfig_date_time.glade:719 +msgctxt "Region" +msgid "Регион" +msgstr "" + +#. Zone +#: ubconfig_date_time.glade:430 ubconfig_date_time.glade:437 +#: ubconfig_date_time.glade:749 ubconfig_date_time.glade:756 +msgctxt "Zone" +msgid "Зона" +msgstr "" + +#. Update date and time +#: ubconfig_date_time.glade:516 ubconfig_date_time.glade:523 +msgctxt "Update date and time" +msgid "Обновить дату и время" +msgstr "" + +#. Synchronize via NTP +#: ubconfig_date_time.glade:601 +msgctxt "Synchronize via NTP" +msgid "Синхронизировать через NTP" +msgstr "" + +#. Automatic time synchronization +#: ubconfig_date_time.glade:605 +msgctxt "Automatic time synchronization" +msgid "Автоматическая синхронизация времени" +msgstr "" + +#. Synchronization method +#: ubconfig_date_time.glade:625 +msgctxt "Synchronization method" +msgid "Способ синхронизации" +msgstr "" + +#. DHCP +#: ubconfig_date_time.glade:633 +msgctxt "DHCP" +msgid "DHCP" +msgstr "" + +#. Manually +#: ubconfig_date_time.glade:634 +msgctxt "Manually" +msgid "Вручную" +msgstr "" + +#. Server input for date and time synchronization: +#. Local (DHCP) or arbitrary +#: ubconfig_date_time.glade:647 +msgctxt "" +"Server input for date and time synchronization:\n" +"Local (DHCP) or arbitrary" +msgid "" +"Ввод сервера для синхронизации даты и времени:\n" +"Локальный (DHCP) или произвольный" +msgstr "" + +#. Time zone +#: ubconfig_date_time.glade:686 +msgctxt "Time zone" +msgid "Временная зона" +msgstr "" + +#. Setting date and time in global configuration +#: ubconfig_date_time.glade:811 +msgctxt "Setting date and time in global configuration" +msgid "Настройка даты и времени в глобальной конфигурации" +msgstr "" + +msgid "Mexico" +msgstr "Мексика" + +msgid "BajaNorte" +msgstr "" + +msgid "BajaSur" +msgstr "Южная Нижняя Калифорния" + +msgid "General" +msgstr "" + +msgid "Arctic" +msgstr "" + +msgid "Longyearbyen" +msgstr "" + +msgid "Indian" +msgstr "" + +msgid "Comoro" +msgstr "" + +msgid "Antananarivo" +msgstr "" + +msgid "Mayotte" +msgstr "" + +msgid "Mauritius" +msgstr "" + +msgid "Reunion" +msgstr "" + +msgid "Mahe" +msgstr "" + +msgid "Maldives" +msgstr "" + +msgid "Kerguelen" +msgstr "" + +msgid "Chagos" +msgstr "" + +msgid "Cocos" +msgstr "" + +msgid "Christmas" +msgstr "" + +msgid "Europe" +msgstr "" + +msgid "Jersey" +msgstr "" + +msgid "Dublin" +msgstr "" + +msgid "Belfast" +msgstr "" + +msgid "Guernsey" +msgstr "" + +msgid "London" +msgstr "" + +msgid "Lisbon" +msgstr "" + +msgid "Isle_of_Man" +msgstr "" + +msgid "Ljubljana" +msgstr "" + +msgid "Stockholm" +msgstr "" + +msgid "Skopje" +msgstr "" + +msgid "Oslo" +msgstr "" + +msgid "Sarajevo" +msgstr "" + +msgid "Tirane" +msgstr "" + +msgid "Zagreb" +msgstr "" + +msgid "Vienna" +msgstr "" + +msgid "Andorra" +msgstr "" + +msgid "Madrid" +msgstr "" + +msgid "Podgorica" +msgstr "" + +msgid "Copenhagen" +msgstr "" + +msgid "Monaco" +msgstr "" + +msgid "Belgrade" +msgstr "" + +msgid "Budapest" +msgstr "" + +msgid "Brussels" +msgstr "" + +msgid "Amsterdam" +msgstr "" + +msgid "Berlin" +msgstr "" + +msgid "Zurich" +msgstr "" + +msgid "Bratislava" +msgstr "" + +msgid "Prague" +msgstr "" + +msgid "Malta" +msgstr "" + +msgid "Rome" +msgstr "" + +msgid "Luxembourg" +msgstr "" + +msgid "Vaduz" +msgstr "" + +msgid "Paris" +msgstr "" + +msgid "Warsaw" +msgstr "" + +msgid "Vatican" +msgstr "" + +msgid "Busingen" +msgstr "" + +msgid "Gibraltar" +msgstr "" + +msgid "San_Marino" +msgstr "" + +msgid "Sofia" +msgstr "" + +msgid "Vilnius" +msgstr "" + +msgid "Helsinki" +msgstr "" + +msgid "Mariehamn" +msgstr "" + +msgid "Riga" +msgstr "" + +msgid "Bucharest" +msgstr "" + +msgid "Kyiv" +msgstr "" + +msgid "Kiev" +msgstr "" + +msgid "Athens" +msgstr "" + +msgid "Zaporozhye" +msgstr "" + +msgid "Tallinn" +msgstr "" + +msgid "Kaliningrad" +msgstr "" + +msgid "Uzhgorod" +msgstr "" + +msgid "Chisinau" +msgstr "" + +msgid "Nicosia" +msgstr "" + +msgid "Tiraspol" +msgstr "" + +msgid "Simferopol" +msgstr "" + +msgid "Istanbul" +msgstr "" + +msgid "Moscow" +msgstr "" + +msgid "Kirov" +msgstr "" + +msgid "Minsk" +msgstr "" + +msgid "Volgograd" +msgstr "" + +msgid "Ulyanovsk" +msgstr "" + +msgid "Samara" +msgstr "" + +msgid "Astrakhan" +msgstr "" + +msgid "Saratov" +msgstr "" + +msgid "Africa" +msgstr "" + +msgid "Lome" +msgstr "" + +msgid "Bissau" +msgstr "" + +msgid "Sao_Tome" +msgstr "" + +msgid "Abidjan" +msgstr "" + +msgid "Accra" +msgstr "" + +msgid "Banjul" +msgstr "" + +msgid "Conakry" +msgstr "" + +msgid "Ouagadougou" +msgstr "" + +msgid "Nouakchott" +msgstr "" + +msgid "Timbuktu" +msgstr "" + +msgid "Dakar" +msgstr "" + +msgid "Monrovia" +msgstr "" + +msgid "Freetown" +msgstr "" + +msgid "Bamako" +msgstr "" + +msgid "El_Aaiun" +msgstr "" + +msgid "Lagos" +msgstr "" + +msgid "Porto-Novo" +msgstr "" + +msgid "Algiers" +msgstr "" + +msgid "Douala" +msgstr "" + +msgid "Brazzaville" +msgstr "" + +msgid "Libreville" +msgstr "" + +msgid "Casablanca" +msgstr "" + +msgid "Niamey" +msgstr "" + +msgid "Tunis" +msgstr "" + +msgid "Luanda" +msgstr "" + +msgid "Malabo" +msgstr "" + +msgid "Ceuta" +msgstr "" + +msgid "Kinshasa" +msgstr "" + +msgid "Bangui" +msgstr "" + +msgid "Ndjamena" +msgstr "" + +msgid "Juba" +msgstr "" + +msgid "Maseru" +msgstr "" + +msgid "Khartoum" +msgstr "" + +msgid "Lubumbashi" +msgstr "" + +msgid "Tripoli" +msgstr "" + +msgid "Mbabane" +msgstr "" + +msgid "Kigali" +msgstr "" + +msgid "Gaborone" +msgstr "" + +msgid "Windhoek" +msgstr "" + +msgid "Maputo" +msgstr "" + +msgid "Cairo" +msgstr "" + +msgid "Johannesburg" +msgstr "" + +msgid "Bujumbura" +msgstr "" + +msgid "Lusaka" +msgstr "" + +msgid "Harare" +msgstr "" + +msgid "Blantyre" +msgstr "" + +msgid "Djibouti" +msgstr "" + +msgid "Dar_es_Salaam" +msgstr "" + +msgid "Kampala" +msgstr "" + +msgid "Addis_Ababa" +msgstr "" + +msgid "Mogadishu" +msgstr "" + +msgid "Asmera" +msgstr "" + +msgid "Asmara" +msgstr "" + +msgid "Nairobi" +msgstr "" + +msgid "Antarctica" +msgstr "" + +msgid "Rothera" +msgstr "" + +msgid "Palmer" +msgstr "" + +msgid "Troll" +msgstr "" + +msgid "Syowa" +msgstr "" + +msgid "Mawson" +msgstr "" + +msgid "Vostok" +msgstr "" + +msgid "Davis" +msgstr "" + +msgid "DumontDUrville" +msgstr "" + +msgid "Casey" +msgstr "" + +msgid "Macquarie" +msgstr "" + +msgid "McMurdo" +msgstr "" + +msgid "South_Pole" +msgstr "" + +msgid "locali" +msgstr "" + +msgid "America" +msgstr "" + +msgid "Atka" +msgstr "" + +msgid "Adak" +msgstr "" + +msgid "Anchorage" +msgstr "" + +msgid "Metlakatla" +msgstr "" + +msgid "Juneau" +msgstr "" + +msgid "Sitka" +msgstr "" + +msgid "Nome" +msgstr "" + +msgid "Yakutat" +msgstr "" + +msgid "Tijuana" +msgstr "" + +msgid "Santa_Isabel" +msgstr "" + +msgid "Vancouver" +msgstr "" + +msgid "Ensenada" +msgstr "" + +msgid "Los_Angeles" +msgstr "" + +msgid "Ciudad_Juarez" +msgstr "" + +msgid "Dawson" +msgstr "" + +msgid "Hermosillo" +msgstr "" + +msgid "Phoenix" +msgstr "" + +msgid "Whitehorse" +msgstr "" + +msgid "Edmonton" +msgstr "" + +msgid "Creston" +msgstr "" + +msgid "Inuvik" +msgstr "" + +msgid "Mazatlan" +msgstr "" + +msgid "Shiprock" +msgstr "" + +msgid "Yellowknife" +msgstr "" + +msgid "Fort_Nelson" +msgstr "" + +msgid "Denver" +msgstr "" + +msgid "Boise" +msgstr "" + +msgid "Dawson_Creek" +msgstr "" + +msgid "Cambridge_Bay" +msgstr "" + +msgid "North_Dakota" +msgstr "" + +msgid "Knox_IN" +msgstr "" + +msgid "Costa_Rica" +msgstr "" + +msgid "Menominee" +msgstr "" + +msgid "El_Salvador" +msgstr "" + +msgid "Regina" +msgstr "" + +msgid "Guatemala" +msgstr "" + +msgid "Resolute" +msgstr "" + +msgid "Monterrey" +msgstr "" + +msgid "Chicago" +msgstr "" + +msgid "Winnipeg" +msgstr "" + +msgid "Indiana" +msgstr "" + +msgid "Rankin_Inlet" +msgstr "" + +msgid "Merida" +msgstr "" + +msgid "Tegucigalpa" +msgstr "" + +msgid "Managua" +msgstr "" + +msgid "Belize" +msgstr "" + +msgid "Rainy_River" +msgstr "" + +msgid "Bahia_Banderas" +msgstr "" + +msgid "Ojinaga" +msgstr "" + +msgid "Chihuahua" +msgstr "" + +msgid "Swift_Current" +msgstr "" + +msgid "Mexico_City" +msgstr "" + +msgid "Matamoros" +msgstr "" + +msgid "Jamaica" +msgstr "" + +msgid "Montreal" +msgstr "" + +msgid "Havana" +msgstr "" + +msgid "Grand_Turk" +msgstr "" + +msgid "Iqaluit" +msgstr "" + +msgid "Louisville" +msgstr "" + +msgid "Guayaquil" +msgstr "" + +msgid "Lima" +msgstr "" + +msgid "Coral_Harbour" +msgstr "" + +msgid "Detroit" +msgstr "" + +msgid "Port-au-Prince" +msgstr "" + +msgid "Fort_Wayne" +msgstr "" + +msgid "Eirunepe" +msgstr "" + +msgid "Indianapolis" +msgstr "" + +msgid "Rio_Branco" +msgstr "" + +msgid "Cancun" +msgstr "" + +msgid "Nipigon" +msgstr "" + +msgid "Toronto" +msgstr "" + +msgid "Panama" +msgstr "" + +msgid "Indiana" +msgstr "" + +msgid "New_York" +msgstr "" + +msgid "Kentucky" +msgstr "" + +msgid "Pangnirtung" +msgstr "" + +msgid "Thunder_Bay" +msgstr "" + +msgid "Bogota" +msgstr "" + +msgid "Cayman" +msgstr "" + +msgid "Atikokan" +msgstr "" + +msgid "Porto_Acre" +msgstr "" + +msgid "Nassau" +msgstr "" + +msgid "Anguilla" +msgstr "" + +msgid "Guadeloupe" +msgstr "" + +msgid "Puerto_Rico" +msgstr "" + +msgid "Porto_Velho" +msgstr "" + +msgid "Guyana" +msgstr "" + +msgid "Lower_Princes" +msgstr "" + +msgid "St_Lucia" +msgstr "" + +msgid "Port_of_Spain" +msgstr "" + +msgid "Dominica" +msgstr "" + +msgid "Manaus" +msgstr "" + +msgid "Thule" +msgstr "" + +msgid "St_Vincent" +msgstr "" + +msgid "St_Barthelemy" +msgstr "" + +msgid "Grenada" +msgstr "" + +msgid "Marigot" +msgstr "" + +msgid "Goose_Bay" +msgstr "" + +msgid "Martinique" +msgstr "" + +msgid "La_Paz" +msgstr "" + +msgid "Cuiaba" +msgstr "" + +msgid "Tortola" +msgstr "" + +msgid "Virgin" +msgstr "" + +msgid "Santo_Domingo" +msgstr "" + +msgid "Antigua" +msgstr "" + +msgid "Curacao" +msgstr "" + +msgid "Barbados" +msgstr "" + +msgid "Blanc-Sablon" +msgstr "" + +msgid "Aruba" +msgstr "" + +msgid "Kralendijk" +msgstr "" + +msgid "Montserrat" +msgstr "" + +msgid "Campo_Grande" +msgstr "" + +msgid "Caracas" +msgstr "" + +msgid "St_Thomas" +msgstr "" + +msgid "Glace_Bay" +msgstr "" + +msgid "St_Kitts" +msgstr "" + +msgid "Moncton" +msgstr "" + +msgid "Boa_Vista" +msgstr "" + +msgid "Halifax" +msgstr "" + +msgid "Buenos_Aires" +msgstr "" + +msgid "Santarem" +msgstr "" + +msgid "Araguaina" +msgstr "" + +msgid "Belem" +msgstr "" + +msgid "St_Johns" +msgstr "" + +msgid "Nuuk" +msgstr "" + +msgid "Cordoba" +msgstr "" + +msgid "Catamarca" +msgstr "" + +msgid "Rosario" +msgstr "" + +msgid "Jujuy" +msgstr "" + +msgid "Montevideo" +msgstr "" + +msgid "Punta_Arenas" +msgstr "" + +msgid "Cayenne" +msgstr "" + +msgid "Sao_Paulo" +msgstr "" + +msgid "Santiago" +msgstr "" + +msgid "Paramaribo" +msgstr "" + +msgid "Miquelon" +msgstr "" + +msgid "Godthab" +msgstr "" + +msgid "Maceio" +msgstr "" + +msgid "Fortaleza" +msgstr "" + +msgid "Argentina" +msgstr "" + +msgid "Mendoza" +msgstr "" + +msgid "Recife" +msgstr "" + +msgid "Bahia" +msgstr "" + +msgid "Asuncion" +msgstr "" + +msgid "Noronha" +msgstr "" + +msgid "Scoresbysund" +msgstr "" + +msgid "Danmarkshavn" +msgstr "" + +msgid "Chile" +msgstr "" + +msgid "EasterIsland" +msgstr "" + +msgid "Continental" +msgstr "" + +msgid "Australia" +msgstr "" + +msgid "Perth" +msgstr "" + +msgid "Eucla" +msgstr "" + +msgid "West" +msgstr "" + +msgid "Darwin" +msgstr "" + +msgid "North" +msgstr "" + +msgid "Yancowinna" +msgstr "" + +msgid "South" +msgstr "" + +msgid "Lindeman" +msgstr "" + +msgid "Broken_Hill" +msgstr "" + +msgid "Adelaide" +msgstr "" + +msgid "Queensland" +msgstr "" + +msgid "Brisbane" +msgstr "" + +msgid "Victoria" +msgstr "" + +msgid "Hobart" +msgstr "" + +msgid "ACT" +msgstr "" + +msgid "Tasmania" +msgstr "" + +msgid "LHI" +msgstr "" + +msgid "Currie" +msgstr "" + +msgid "Canberra" +msgstr "" + +msgid "Sydney" +msgstr "" + +msgid "Melbourne" +msgstr "" + +msgid "Lord_Howe" +msgstr "" + +msgid "NSW" +msgstr "" + +msgid "Asia" +msgstr "" + +msgid "Beirut" +msgstr "" + +msgid "Famagusta" +msgstr "" + +msgid "Nicosia" +msgstr "" + +msgid "Hebron" +msgstr "" + +msgid "Tel_Aviv" +msgstr "" + +msgid "Jerusalem" +msgstr "" + +msgid "Gaza" +msgstr "" + +msgid "Amman" +msgstr "" + +msgid "Bahrain" +msgstr "" + +msgid "Tehran" +msgstr "" + +msgid "Baghdad" +msgstr "" + +msgid "Istanbul" +msgstr "" + +msgid "Kuwait" +msgstr "" + +msgid "Riyadh" +msgstr "" + +msgid "Qatar" +msgstr "" + +msgid "Damascus" +msgstr "" + +msgid "Aden" +msgstr "" + +msgid "Yerevan" +msgstr "" + +msgid "Baku" +msgstr "" + +msgid "Dubai" +msgstr "" + +msgid "Kabul" +msgstr "" + +msgid "Muscat" +msgstr "" + +msgid "Tbilisi" +msgstr "" + +msgid "Kathmandu" +msgstr "" + +msgid "Samarkand" +msgstr "" + +msgid "Ashgabat" +msgstr "" + +msgid "Karachi" +msgstr "" + +msgid "Katmandu" +msgstr "" + +msgid "Calcutta" +msgstr "" + +msgid "Tashkent" +msgstr "" + +msgid "Yekaterinburg" +msgstr "" + +msgid "Oral" +msgstr "" + +msgid "Dushanbe" +msgstr "" + +msgid "Atyrau" +msgstr "" + +msgid "Aqtobe" +msgstr "" + +msgid "Aqtau" +msgstr "" + +msgid "Qyzylorda" +msgstr "" + +msgid "Ashkhabad" +msgstr "" + +msgid "Colombo" +msgstr "" + +msgid "Kolkata" +msgstr "" + +msgid "Dhaka" +msgstr "" + +msgid "Thimphu" +msgstr "" + +msgid "Rangoon" +msgstr "" + +msgid "Kashgar" +msgstr "" + +msgid "Qostanay" +msgstr "" + +msgid "Almaty" +msgstr "" + +msgid "Urumqi" +msgstr "" + +msgid "Yangon" +msgstr "" + +msgid "Dacca" +msgstr "" + +msgid "Thimbu" +msgstr "" + +msgid "Omsk" +msgstr "" + +msgid "Bishkek" +msgstr "" + +msgid "Ho_Chi_Minh" +msgstr "" + +msgid "Phnom_Penh" +msgstr "" + +msgid "Vientiane" +msgstr "" + +msgid "Bangkok" +msgstr "" + +msgid "Krasnoyarsk" +msgstr "" + +msgid "Novokuznetsk" +msgstr "" + +msgid "Barnaul" +msgstr "" + +msgid "Jakarta" +msgstr "" + +msgid "Saigon" +msgstr "" + +msgid "Hovd" +msgstr "" + +msgid "Novosibirsk" +msgstr "" + +msgid "Tomsk" +msgstr "" + +msgid "Pontianak" +msgstr "" + +msgid "Harbin" +msgstr "" + +msgid "Chungking" +msgstr "" + +msgid "Ulan_Bator" +msgstr "" + +msgid "Brunei" +msgstr "" + +msgid "Singapore" +msgstr "" + +msgid "Choibalsan" +msgstr "" + +msgid "Chongqing" +msgstr "" + +msgid "Macau" +msgstr "" + +msgid "Ujung_Pandang" +msgstr "" + +msgid "Manila" +msgstr "" + +msgid "Kuala_Lumpur" +msgstr "" + +msgid "Makassar" +msgstr "" + +msgid "Kuching" +msgstr "" + +msgid "Macao" +msgstr "" + +msgid "Shanghai" +msgstr "" + +msgid "Taipei" +msgstr "" + +msgid "Ulaanbaatar" +msgstr "" + +msgid "Irkutsk" +msgstr "" + +msgid "Hong_Kong" +msgstr "" + +msgid "Khandyga" +msgstr "" + +msgid "Seoul" +msgstr "" + +msgid "Jayapura" +msgstr "" + +msgid "Chita" +msgstr "" + +msgid "Pyongyang" +msgstr "" + +msgid "Yakutsk" +msgstr "" + +msgid "Tokyo" +msgstr "" + +msgid "Dili" +msgstr "" + +msgid "Vladivostok" +msgstr "" + +msgid "Ust-Nera" +msgstr "" + +msgid "Srednekolymsk" +msgstr "" + +msgid "Sakhalin" +msgstr "" + +msgid "Magadan" +msgstr "" + +msgid "Anadyr" +msgstr "" + +msgid "Kamchatka" +msgstr "" + +msgid "US" +msgstr "" + +msgid "Samoa" +msgstr "" + +msgid "Aleutian" +msgstr "" + +msgid "Hawaii" +msgstr "" + +msgid "Alaska" +msgstr "" + +msgid "Pacific" +msgstr "" + +msgid "Mountain" +msgstr "" + +msgid "Arizona" +msgstr "" + +msgid "Indiana-Starke" +msgstr "" + +msgid "Central" +msgstr "" + +msgid "East-Indiana" +msgstr "" + +msgid "Michigan" +msgstr "" + +msgid "Eastern" +msgstr "" + +msgid "Atlantic" +msgstr "" + +msgid "Bermuda" +msgstr "" + +msgid "Stanley" +msgstr "" + +msgid "South_Georgia" +msgstr "" + +msgid "Cape_Verde" +msgstr "" + +msgid "Azores" +msgstr "" + +msgid "Faeroe" +msgstr "" + +msgid "Faroe" +msgstr "" + +msgid "St_Helena" +msgstr "" + +msgid "Reykjavik" +msgstr "" + +msgid "Canary" +msgstr "" + +msgid "Madeira" +msgstr "" + +msgid "Jan_Mayen" +msgstr "" + +msgid "Brazil" +msgstr "" + +msgid "Acre" +msgstr "" + +msgid "West" +msgstr "" + +msgid "East" +msgstr "" + +msgid "DeNoronha" +msgstr "" + + diff --git a/org.freedesktop.policykit.UBTime.pkexec.policy b/org.freedesktop.policykit.UBTime.pkexec.policy new file mode 100644 index 0000000..7c1f2be --- /dev/null +++ b/org.freedesktop.policykit.UBTime.pkexec.policy @@ -0,0 +1,24 @@ + + + + + UBSoft + https://ublinux.ru + + + Run UBConfig as root + Запуск UBTime с правами root + Authentication is required to run the UBConfig + Требуется авторизация для запуска UBTime с правами root + + auth_admin + auth_admin + auth_admin + + /usr/bin/UBTime + true + + + diff --git a/reg/Africa b/reg/Africa new file mode 100644 index 0000000..6afdb1c --- /dev/null +++ b/reg/Africa @@ -0,0 +1,54 @@ +(UTC +00) Lome +(UTC +00) Bissau +(UTC +00) Sao_Tome +(UTC +00) Abidjan +(UTC +00) Accra +(UTC +00) Banjul +(UTC +00) Conakry +(UTC +00) Ouagadougou +(UTC +00) Nouakchott +(UTC +00) Timbuktu +(UTC +00) Dakar +(UTC +00) Monrovia +(UTC +00) Freetown +(UTC +00) Bamako +(UTC +01) El_Aaiun +(UTC +01) Lagos +(UTC +01) Porto-Novo +(UTC +01) Algiers +(UTC +01) Douala +(UTC +01) Brazzaville +(UTC +01) Libreville +(UTC +01) Casablanca +(UTC +01) Niamey +(UTC +01) Tunis +(UTC +01) Luanda +(UTC +01) Malabo +(UTC +01) Ceuta +(UTC +01) Kinshasa +(UTC +01) Bangui +(UTC +01) Ndjamena +(UTC +02) Juba +(UTC +02) Maseru +(UTC +02) Khartoum +(UTC +02) Lubumbashi +(UTC +02) Tripoli +(UTC +02) Mbabane +(UTC +02) Kigali +(UTC +02) Gaborone +(UTC +02) Windhoek +(UTC +02) Maputo +(UTC +02) Cairo +(UTC +02) Johannesburg +(UTC +02) Bujumbura +(UTC +02) Lusaka +(UTC +02) Harare +(UTC +02) Blantyre +(UTC +03) Djibouti +(UTC +03) Dar_es_Salaam +(UTC +03) Kampala +(UTC +03) Addis_Ababa +(UTC +03) Mogadishu +(UTC +03) Asmera +(UTC +03) Asmara +(UTC +03) Nairobi diff --git a/reg/America b/reg/America new file mode 100644 index 0000000..4eac7b5 --- /dev/null +++ b/reg/America @@ -0,0 +1,147 @@ +(UTC -10) Atka +(UTC -10) Adak +(UTC -09) Anchorage +(UTC -09) Metlakatla +(UTC -09) Juneau +(UTC -09) Sitka +(UTC -09) Nome +(UTC -09) Yakutat +(UTC -08) Tijuana +(UTC -08) Santa_Isabel +(UTC -08) Vancouver +(UTC -08) Ensenada +(UTC -08) Los_Angeles +(UTC -07) Ciudad_Juarez +(UTC -07) Dawson +(UTC -07) Hermosillo +(UTC -07) Phoenix +(UTC -07) Whitehorse +(UTC -07) Edmonton +(UTC -07) Creston +(UTC -07) Inuvik +(UTC -07) Mazatlan +(UTC -07) Shiprock +(UTC -07) Yellowknife +(UTC -07) Fort_Nelson +(UTC -07) Denver +(UTC -07) Boise +(UTC -07) Dawson_Creek +(UTC -07) Cambridge_Bay +(UTC -06) North_Dakota +(UTC -06) Knox_IN +(UTC -06) Costa_Rica +(UTC -06) Menominee +(UTC -06) El_Salvador +(UTC -06) Regina +(UTC -06) Guatemala +(UTC -06) Resolute +(UTC -06) Monterrey +(UTC -06) Chicago +(UTC -06) Winnipeg +(UTC -06) Indiana +(UTC -06) Rankin_Inlet +(UTC -06) Merida +(UTC -06) Tegucigalpa +(UTC -06) Managua +(UTC -06) Belize +(UTC -06) Rainy_River +(UTC -06) Bahia_Banderas +(UTC -06) Ojinaga +(UTC -06) Chihuahua +(UTC -06) Swift_Current +(UTC -06) Mexico_City +(UTC -06) Matamoros +(UTC -05) Jamaica +(UTC -05) Montreal +(UTC -05) Havana +(UTC -05) Grand_Turk +(UTC -05) Iqaluit +(UTC -05) Louisville +(UTC -05) Guayaquil +(UTC -05) Lima +(UTC -05) Coral_Harbour +(UTC -05) Detroit +(UTC -05) Port-au-Prince +(UTC -05) Fort_Wayne +(UTC -05) Eirunepe +(UTC -05) Indianapolis +(UTC -05) Rio_Branco +(UTC -05) Cancun +(UTC -05) Nipigon +(UTC -05) Toronto +(UTC -05) Panama +(UTC -05) Indiana +(UTC -05) New_York +(UTC -05) Kentucky +(UTC -05) Pangnirtung +(UTC -05) Thunder_Bay +(UTC -05) Bogota +(UTC -05) Cayman +(UTC -05) Atikokan +(UTC -05) Porto_Acre +(UTC -05) Nassau +(UTC -04) Anguilla +(UTC -04) Guadeloupe +(UTC -04) Puerto_Rico +(UTC -04) Porto_Velho +(UTC -04) Guyana +(UTC -04) Lower_Princes +(UTC -04) St_Lucia +(UTC -04) Port_of_Spain +(UTC -04) Dominica +(UTC -04) Manaus +(UTC -04) Thule +(UTC -04) St_Vincent +(UTC -04) St_Barthelemy +(UTC -04) Grenada +(UTC -04) Marigot +(UTC -04) Goose_Bay +(UTC -04) Martinique +(UTC -04) La_Paz +(UTC -04) Cuiaba +(UTC -04) Tortola +(UTC -04) Virgin +(UTC -04) Santo_Domingo +(UTC -04) Antigua +(UTC -04) Curacao +(UTC -04) Barbados +(UTC -04) Blanc-Sablon +(UTC -04) Aruba +(UTC -04) Kralendijk +(UTC -04) Montserrat +(UTC -04) Campo_Grande +(UTC -04) Caracas +(UTC -04) St_Thomas +(UTC -04) Glace_Bay +(UTC -04) St_Kitts +(UTC -04) Moncton +(UTC -04) Boa_Vista +(UTC -04) Halifax +(UTC -03) Buenos_Aires +(UTC -03) Santarem +(UTC -03) Araguaina +(UTC -03) Belem +(UTC -03) St_Johns +(UTC -03) Nuuk +(UTC -03) Cordoba +(UTC -03) Catamarca +(UTC -03) Rosario +(UTC -03) Jujuy +(UTC -03) Montevideo +(UTC -03) Punta_Arenas +(UTC -03) Cayenne +(UTC -03) Sao_Paulo +(UTC -03) Santiago +(UTC -03) Paramaribo +(UTC -03) Miquelon +(UTC -03) Godthab +(UTC -03) Maceio +(UTC -03) Fortaleza +(UTC -03) Argentina +(UTC -03) Mendoza +(UTC -03) Recife +(UTC -03) Bahia +(UTC -03) Asuncion +(UTC -02) Noronha +(UTC -01) Scoresbysund +(UTC +00) Danmarkshavn diff --git a/reg/Antarctica b/reg/Antarctica new file mode 100644 index 0000000..2f99849 --- /dev/null +++ b/reg/Antarctica @@ -0,0 +1,12 @@ +(UTC -03) Rothera +(UTC -03) Palmer +(UTC +00) Troll +(UTC +03) Syowa +(UTC +05) Mawson +(UTC +06) Vostok +(UTC +07) Davis +(UTC +10) DumontDUrville +(UTC +11) Casey +(UTC +11) Macquarie +(UTC +13) McMurdo +(UTC +13) South_Pole diff --git a/reg/Arctic b/reg/Arctic new file mode 100644 index 0000000..feba77b --- /dev/null +++ b/reg/Arctic @@ -0,0 +1 @@ +(UTC +01) Longyearbyen diff --git a/reg/Asia b/reg/Asia new file mode 100644 index 0000000..57ce91b --- /dev/null +++ b/reg/Asia @@ -0,0 +1,99 @@ +(UTC +02) Beirut +(UTC +02) Famagusta +(UTC +02) Nicosia +(UTC +02) Hebron +(UTC +02) Tel_Aviv +(UTC +02) Jerusalem +(UTC +02) Gaza +(UTC +03) Amman +(UTC +03) Bahrain +(UTC +03) Tehran +(UTC +03) Baghdad +(UTC +03) Istanbul +(UTC +03) Kuwait +(UTC +03) Riyadh +(UTC +03) Qatar +(UTC +03) Damascus +(UTC +03) Aden +(UTC +04) Yerevan +(UTC +04) Baku +(UTC +04) Dubai +(UTC +04) Kabul +(UTC +04) Muscat +(UTC +04) Tbilisi +(UTC +05) Kathmandu +(UTC +05) Samarkand +(UTC +05) Ashgabat +(UTC +05) Karachi +(UTC +05) Katmandu +(UTC +05) Calcutta +(UTC +05) Tashkent +(UTC +05) Yekaterinburg +(UTC +05) Oral +(UTC +05) Dushanbe +(UTC +05) Atyrau +(UTC +05) Aqtobe +(UTC +05) Aqtau +(UTC +05) Qyzylorda +(UTC +05) Ashkhabad +(UTC +05) Colombo +(UTC +05) Kolkata +(UTC +06) Dhaka +(UTC +06) Thimphu +(UTC +06) Rangoon +(UTC +06) Kashgar +(UTC +06) Qostanay +(UTC +06) Almaty +(UTC +06) Urumqi +(UTC +06) Yangon +(UTC +06) Dacca +(UTC +06) Thimbu +(UTC +06) Omsk +(UTC +06) Bishkek +(UTC +07) Ho_Chi_Minh +(UTC +07) Phnom_Penh +(UTC +07) Vientiane +(UTC +07) Bangkok +(UTC +07) Krasnoyarsk +(UTC +07) Novokuznetsk +(UTC +07) Barnaul +(UTC +07) Jakarta +(UTC +07) Saigon +(UTC +07) Hovd +(UTC +07) Novosibirsk +(UTC +07) Tomsk +(UTC +07) Pontianak +(UTC +08) Harbin +(UTC +08) Chungking +(UTC +08) Ulan_Bator +(UTC +08) Brunei +(UTC +08) Singapore +(UTC +08) Choibalsan +(UTC +08) Chongqing +(UTC +08) Macau +(UTC +08) Ujung_Pandang +(UTC +08) Manila +(UTC +08) Kuala_Lumpur +(UTC +08) Makassar +(UTC +08) Kuching +(UTC +08) Macao +(UTC +08) Shanghai +(UTC +08) Taipei +(UTC +08) Ulaanbaatar +(UTC +08) Irkutsk +(UTC +08) Hong_Kong +(UTC +09) Khandyga +(UTC +09) Seoul +(UTC +09) Jayapura +(UTC +09) Chita +(UTC +09) Pyongyang +(UTC +09) Yakutsk +(UTC +09) Tokyo +(UTC +09) Dili +(UTC +10) Vladivostok +(UTC +10) Ust-Nera +(UTC +11) Srednekolymsk +(UTC +11) Sakhalin +(UTC +11) Magadan +(UTC +12) Anadyr +(UTC +12) Kamchatka diff --git a/reg/Atlantic b/reg/Atlantic new file mode 100644 index 0000000..57a99bf --- /dev/null +++ b/reg/Atlantic @@ -0,0 +1,12 @@ +(UTC -04) Bermuda +(UTC -03) Stanley +(UTC -02) South_Georgia +(UTC -01) Cape_Verde +(UTC -01) Azores +(UTC +00) Faeroe +(UTC +00) Faroe +(UTC +00) St_Helena +(UTC +00) Reykjavik +(UTC +00) Canary +(UTC +00) Madeira +(UTC +01) Jan_Mayen diff --git a/reg/Australia b/reg/Australia new file mode 100644 index 0000000..d762891 --- /dev/null +++ b/reg/Australia @@ -0,0 +1,23 @@ +(UTC +08) Perth +(UTC +08) Eucla +(UTC +08) West +(UTC +09) Darwin +(UTC +09) North +(UTC +10) Yancowinna +(UTC +10) South +(UTC +10) Lindeman +(UTC +10) Broken_Hill +(UTC +10) Adelaide +(UTC +10) Queensland +(UTC +10) Brisbane +(UTC +11) Victoria +(UTC +11) Hobart +(UTC +11) ACT +(UTC +11) Tasmania +(UTC +11) LHI +(UTC +11) Currie +(UTC +11) Canberra +(UTC +11) Sydney +(UTC +11) Melbourne +(UTC +11) Lord_Howe +(UTC +11) NSW diff --git a/reg/Brazil b/reg/Brazil new file mode 100644 index 0000000..79213f9 --- /dev/null +++ b/reg/Brazil @@ -0,0 +1,4 @@ +(UTC -05) Acre +(UTC -04) West +(UTC -03) East +(UTC -02) DeNoronha diff --git a/reg/Chile b/reg/Chile new file mode 100644 index 0000000..c72cae0 --- /dev/null +++ b/reg/Chile @@ -0,0 +1,2 @@ +(UTC -05) EasterIsland +(UTC -03) Continental diff --git a/reg/Europe b/reg/Europe new file mode 100644 index 0000000..a6a7a52 --- /dev/null +++ b/reg/Europe @@ -0,0 +1,64 @@ +(UTC +00) Jersey +(UTC +00) Dublin +(UTC +00) Belfast +(UTC +00) Guernsey +(UTC +00) London +(UTC +00) Lisbon +(UTC +00) Isle_of_Man +(UTC +01) Ljubljana +(UTC +01) Stockholm +(UTC +01) Skopje +(UTC +01) Oslo +(UTC +01) Sarajevo +(UTC +01) Tirane +(UTC +01) Zagreb +(UTC +01) Vienna +(UTC +01) Andorra +(UTC +01) Madrid +(UTC +01) Podgorica +(UTC +01) Copenhagen +(UTC +01) Monaco +(UTC +01) Belgrade +(UTC +01) Budapest +(UTC +01) Brussels +(UTC +01) Amsterdam +(UTC +01) Berlin +(UTC +01) Zurich +(UTC +01) Bratislava +(UTC +01) Prague +(UTC +01) Malta +(UTC +01) Rome +(UTC +01) Luxembourg +(UTC +01) Vaduz +(UTC +01) Paris +(UTC +01) Warsaw +(UTC +01) Vatican +(UTC +01) Busingen +(UTC +01) Gibraltar +(UTC +01) San_Marino +(UTC +02) Sofia +(UTC +02) Vilnius +(UTC +02) Helsinki +(UTC +02) Mariehamn +(UTC +02) Riga +(UTC +02) Bucharest +(UTC +02) Kyiv +(UTC +02) Kiev +(UTC +02) Athens +(UTC +02) Zaporozhye +(UTC +02) Tallinn +(UTC +02) Kaliningrad +(UTC +02) Uzhgorod +(UTC +02) Chisinau +(UTC +02) Nicosia +(UTC +02) Tiraspol +(UTC +03) Simferopol +(UTC +03) Istanbul +(UTC +03) Moscow +(UTC +03) Kirov +(UTC +03) Minsk +(UTC +03) Volgograd +(UTC +04) Ulyanovsk +(UTC +04) Samara +(UTC +04) Astrakhan +(UTC +04) Saratov diff --git a/reg/Indian b/reg/Indian new file mode 100644 index 0000000..cbb5827 --- /dev/null +++ b/reg/Indian @@ -0,0 +1,11 @@ +(UTC +03) Comoro +(UTC +03) Antananarivo +(UTC +03) Mayotte +(UTC +04) Mauritius +(UTC +04) Reunion +(UTC +04) Mahe +(UTC +05) Maldives +(UTC +05) Kerguelen +(UTC +06) Chagos +(UTC +06) Cocos +(UTC +07) Christmas diff --git a/reg/Mexico b/reg/Mexico new file mode 100644 index 0000000..af4773f --- /dev/null +++ b/reg/Mexico @@ -0,0 +1,3 @@ +(UTC -08) BajaNorte +(UTC -07) BajaSur +(UTC -06) General diff --git a/reg/US b/reg/US new file mode 100644 index 0000000..7c1cbd3 --- /dev/null +++ b/reg/US @@ -0,0 +1,12 @@ +(UTC -11) Samoa +(UTC -10) Aleutian +(UTC -10) Hawaii +(UTC -09) Alaska +(UTC -08) Pacific +(UTC -07) Mountain +(UTC -07) Arizona +(UTC -06) Indiana-Starke +(UTC -06) Central +(UTC -05) East-Indiana +(UTC -05) Michigan +(UTC -05) Eastern diff --git a/reg/locali111 b/reg/locali111 new file mode 100644 index 0000000..f14d13c --- /dev/null +++ b/reg/locali111 @@ -0,0 +1,69 @@ +msgid "Ok" +msgstr "Oк" + +msgid "Enter DHCP" +msgstr "Введите DHCP" + +msgid "UBconfig - Дата и время" +msgstr "UBconfig - Дата и время" + +msgid "Setting the date and time" +msgstr "Настройка даты и времени" + +msgid "Time" +msgstr "Время" + +msgid "Clock" +msgstr "Часы" + +msgid "Minutes" +msgstr "Минуты" + +msgid "Date" +msgstr "Дата" + +msgid "" +msgstr "" + +msgid "Interactive date picker" +msgstr "Интерактивный выбор даты" + +msgid "Change zone setting" +msgstr "Изменить параметр зоны" + +msgid "time zone" +msgstr "Временная зона" + +msgid "Region" +msgstr "Регион" + +msgid "Zone" +msgstr "Зона" + +msgid "Update date and time" +msgstr "Обновить дату и время" + +msgid "Synchronize via NTP" +msgstr "Синхронизировать через NTP" + +msgid "Automatic time synchronization" +msgstr "Автоматическая синхронизация времени" + +msgid "Synchronization method" +msgstr "Способ синхронизации" + +msgid "DHCP" +msgstr "DHCP" + +msgid "Manually" +msgstr "Вручную" + +msgid "" +msgstr "" + +msgid "Time zone" +msgstr "Временная зона" + +msgid "Setting date and time in global configuration" +msgstr "Настройка даты и времени в глобальной конфигурации" + diff --git a/ubconfig_date_time.glade b/ubconfig_date_time.glade new file mode 100644 index 0000000..796c316 --- /dev/null +++ b/ubconfig_date_time.glade @@ -0,0 +1,826 @@ + + + + + + False + + + + + + False + dialog + + + False + vertical + 2 + + + False + True + end + + + + btnMessClose + True + True + True + + + True + True + 0 + + + + + + + + False + False + 0 + + + + + True + False + + + True + False + 50 + gtk-dialog-warning + + + False + True + 0 + + + + + True + False + Введите DHCP + + + False + True + 1 + + + + + False + True + 2 + + + + + + + False + UBconfig - Дата и время + ublinux-logo.png + + + True + False + vertical + + + True + False + + + 90 + True + False + 5 + 5 + 5 + 5 + 6 + 6 + ublinux-logo.png + + + False + True + 0 + + + + + 145 + True + False + Изменить параметр NTPSERVERS + 5 + 5 + 5 + 5 + 3 + 6 + Настройка даты и времени + True + 28 + 0 + + + False + True + 1 + + + + + 100 + True + False + 15 + 5 + 15 + 5 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + 10 + vertical + + + True + False + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + vertical + + + True + False + + + 145 + True + False + 5 + 5 + 5 + 5 + 6 + 6 + Время + True + 0 + + + False + True + 0 + + + + + True + True + Часы + 5 + 5 + 5 + 5 + 6 + 6 + 2 + 0.099999999776482579 + True + + + False + True + 1 + + + + + True + False + : + + + False + True + 2 + + + + + True + True + Минуты + 5 + 5 + 5 + 5 + 6 + 6 + 2 + True + + + False + True + 3 + + + + + False + True + 1 + + + + + True + False + + + 145 + True + False + 5 + 5 + 5 + 5 + 6 + 6 + Дата + True + 0 + + + False + True + 0 + + + + + 221 + True + True + Дата +Формат: ДД.ММ.ГГГГ + 5 + 5 + 5 + 6 + 6 + + + False + True + 1 + + + + + True + True + True + Интерактивный выбор даты + 5 + 5 + 5 + 5 + 6 + 6 + + + True + False + x-office-calendar + + + + + False + True + 2 + + + + + False + True + 2 + + + + + True + False + + + 145 + True + False + Изменить параметр зоны + 5 + 5 + 5 + 5 + 6 + 6 + Временная зона + True + 0 + + + False + True + 0 + + + + + True + False + + + False + True + 1 + + + + + True + False + Регион + 5 + 5 + 5 + 5 + 6 + 6 + Регион + 0 + + + False + True + 2 + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 6 + + + False + True + 3 + + + + + True + False + Зона + 5 + 5 + 5 + 5 + 6 + 6 + Зона + 0 + + + False + True + 4 + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 6 + + + False + True + 5 + + + + + 5 + True + False + + + False + True + 6 + + + + + True + True + True + end + 5 + 5 + 6 + 6 + + + True + False + + + True + False + media-playlist-repeat + + + False + True + 0 + + + + + True + False + Синхронизировать + + + False + True + 1 + + + + + + + False + True + 7 + + + + + True + True + 3 + + + + + + + True + False + Настройка даты и времени + + + + + False + True + 0 + + + + + False + True + 1 + + + + + True + False + 10 + vertical + + + True + False + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + vertical + + + True + False + + + Синхронизировать через NTP + True + True + False + Автоматическая синхронизация времени + 5 + 5 + 5 + 5 + 6 + 6 + True + + + False + True + 0 + + + + + True + False + Способ синхронизации + 6 + 6 + + DHCP + Вручную + + + + False + True + 1 + + + + + -1 + True + True + Ввод сервера для синхронизации даты и времени: +Локальный (DHCP) или произвольный + center + 5 + 5 + 5 + 5 + 6 + 6 + + + True + True + 3 + + + + + False + True + 0 + + + + + True + False + + + 145 + True + False + Изменить параметр зоны + 5 + 5 + 5 + 5 + 6 + 6 + Временная зона + True + 28 + 0 + + + False + True + 0 + + + + + True + False + + + False + True + 1 + + + + + True + False + Регион + 5 + 5 + 5 + 5 + 6 + 6 + Регион + 0 + + + False + True + 2 + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 6 + + + False + True + 3 + + + + + True + False + Зона + 5 + 5 + 5 + 5 + Зона + 0 + + + False + True + 4 + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 6 + + + False + True + 5 + + + + + 5 + True + False + 15 + 5 + 15 + 5 + + + False + True + 6 + + + + + True + True + 1 + + + + + + + True + False + Настройка даты и времени в глобальной конфигурации + + + + + False + True + 0 + + + + + False + True + 2 + + + + + + + 240 + 185 + False + btnChooseDate + bottom + none + + + True + True + 10 + 10 + 10 + 10 + 10 + 10 + 2023 + 1 + 10 + + + + diff --git a/ublinux-datetime-settings.svg b/ublinux-datetime-settings.svg new file mode 100644 index 0000000..f866fb9 --- /dev/null +++ b/ublinux-datetime-settings.svg @@ -0,0 +1,5593 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ublinux-logo.png b/ublinux-logo.png new file mode 100644 index 0000000..a77b93f Binary files /dev/null and b/ublinux-logo.png differ