@ -6,7 +6,8 @@ const string path_app = "/usr/bin/";
const string path_glade = " /usr/share/ubl-settings-datetime/ui/ " ;
const string app_name = " ubl-settings-datetime " ;
const string path_locale = " /usr/share/locale/ " ;
const string path_css = " /usr/share/ubl-settings-datetime/css/style.css " ;
const string path_css = " /usr/share/ubl-settings-datetime/css/ubl-settings-datetime.css " ;
const string path_img_head_background = " /usr/share/ubl-settings-datetime/images/logo-background.png " ;
bool flag_datetime = false ;
bool flag_timezone = false ;
bool flag_ntp_mode = false ;
@ -54,36 +55,40 @@ MainWindow::MainWindow(Glib::RefPtr<Gtk::Builder> const& builder) {
}
void MainWindow : : settings ( ) {
map_error [ " xdg-open https://wiki.ublinux.ru/ru/home " ] = string ( _ ( " : \" xdg-open \" " ) ) ;
map_error [ " ubconfig --default --source system get clock ZONE " ] = string ( _ ( " : \" Time Zone \" " ) ) ;
map_error [ " hwclock --systohc " ] = string ( _ ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --default --source system get network NTPSERVERS " ] = string ( _ ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --source=default get NTPSERVERS_DEFAULT " ] = string ( _ ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --default --source system get clock HWCLOCK_SYNC " ] = string ( _ ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --default --source global get network NTPSERVERS " ] = string ( _ ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --default --source global get clock ZONE " ] = string ( _ ( " : \" Time Zone \" " ) ) ;
map_error [ " ubconfig --default --source global get clock HWCLOCK_SYNC " ] = string ( _ ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --source global get clock HWCLOCK_SYNC " ] = string ( _ ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --target system set clock ZONE= " ] = string ( _ ( " : \" Time Zone \" " ) ) ;
map_error [ " ubconfig --target system set network NTPSERVERS=default " ] = string ( _ ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target system set network NTPSERVERS=dhcp " ] = string ( _ ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target system set network NTPSERVERS= \" " ] = string ( _ ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target system remove network NTPSERVERS " ] = string ( _ ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target system set clock HWCLOCK_SYNC=localtime " ] = string ( _ ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --target system set clock HWCLOCK_SYNC=utc " ] = string ( _ ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --target global set clock ZONE= " ] = string ( _ ( " : \" Time Zone \" " ) ) ;
map_error [ " ubconfig --target global set network NTPSERVERS=default " ] = string ( _ ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target global set network NTPSERVERS=dhcp " ] = string ( _ ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target global set network NTPSERVERS= \" " ] = string ( _ ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target global remove network NTPSERVERS " ] = string ( _ ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target global set clock HWCLOCK_SYNC=localtime " ] = string ( _ ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --target global set clock HWCLOCK_SYNC=utc " ] = string ( _ ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --source default get [] NTPSERVERS_DEFAULT " ] = string ( _ ( " : \" NTP \" " ) ) ;
map_error [ " date +%Y%m%d -s \" " ] = string ( _ ( " : \" Date \" " ) ) ;
map_error [ " date +%T -s \" " ] = string ( _ ( " : \" Date \" " ) ) ;
map_error [ " ubconfig --source default get clock HWCLOCK_SYNC " ] = string ( _ ( " : \" Hardware time \" " ) ) ;
map_error [ " xdg-open https://wiki.ublinux.ru/ru/home " ] = string ( gettext ( " : \" xdg-open \" " ) ) ;
map_error [ " ubconfig --default --source system get clock ZONE " ] = string ( gettext ( " : \" Time Zone \" " ) ) ;
map_error [ " hwclock --systohc " ] = string ( gettext ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --default --source system get network NTPSERVERS " ] = string ( gettext ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --source=default get NTPSERVERS_DEFAULT " ] = string ( gettext ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --default --source system get clock HWCLOCK_SYNC " ] = string ( gettext ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --default --source global get network NTPSERVERS " ] = string ( gettext ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --default --source global get clock ZONE " ] = string ( gettext ( " : \" Time Zone \" " ) ) ;
map_error [ " ubconfig --default --source global get clock HWCLOCK_SYNC " ] = string ( gettext ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --source global get clock HWCLOCK_SYNC " ] = string ( gettext ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --target system set clock ZONE= " ] = string ( gettext ( " : \" Time Zone \" " ) ) ;
map_error [ " ubconfig --target system set network NTPSERVERS=default " ] = string ( gettext ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target system set network NTPSERVERS=dhcp " ] = string ( gettext ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target system set network NTPSERVERS= \" " ] = string ( gettext ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target system remove network NTPSERVERS " ] = string ( gettext ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target system set clock HWCLOCK_SYNC=localtime " ] = string ( gettext ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --target system set clock HWCLOCK_SYNC=utc " ] = string ( gettext ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --target global set clock ZONE= " ] = string ( gettext ( " : \" Time Zone \" " ) ) ;
map_error [ " ubconfig --target global set network NTPSERVERS=default " ] = string ( gettext ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target global set network NTPSERVERS=dhcp " ] = string ( gettext ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target global set network NTPSERVERS= \" " ] = string ( gettext ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target global remove network NTPSERVERS " ] = string ( gettext ( " : \" NTP \" " ) ) ;
map_error [ " ubconfig --target global set clock HWCLOCK_SYNC=localtime " ] = string ( gettext ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --target global set clock HWCLOCK_SYNC=utc " ] = string ( gettext ( " : \" Hardware time \" " ) ) ;
map_error [ " ubconfig --source default get [] NTPSERVERS_DEFAULT " ] = string ( gettext ( " : \" NTP \" " ) ) ;
map_error [ " date +%Y%m%d -s \" " ] = string ( gettext ( " : \" Date \" " ) ) ;
map_error [ " date +%T -s \" " ] = string ( gettext ( " : \" Date \" " ) ) ;
map_error [ " ubconfig --source default get clock HWCLOCK_SYNC " ] = string ( gettext ( " : \" Hardware time \" " ) ) ;
this - > get_builder ( ) ;
this - > add_CSS ( ) ;
Gtk : : Widget * boxWidget ;
builder - > get_widget ( " boxColor " , boxWidget ) ;
overHead - > add_overlay ( * boxWidget ) ;
ubl_make_plugs ( boxSave , boxButton , socket_ext_id_I , socket_trd_id_I ) ;
year = 0 ;
month = 0 ;
@ -110,9 +115,9 @@ void MainWindow::settings() {
boxButton - > set_sensitive ( false ) ;
btnSave - > set_sensitive ( false ) ;
this - > event ( ) ;
imgInfo - > set_from_icon_name ( " ru .ublinux.ubl-settings-datetime.warning" , Gtk : : ICON_SIZE_MENU ) ;
imgInfo - > set_from_icon_name ( " com .ublinux.ubl-settings-datetime.warning" , Gtk : : ICON_SIZE_MENU ) ;
info_status_app ( " boxInfoMessError " ) ;
lblWarning - > set_text ( _ ( " The program must be run as root " ) ) ;
lblWarning - > set_text ( gettext ( " The program must be run as root " ) ) ;
}
}
@ -120,35 +125,35 @@ void MainWindow::lacalization() {
time_t now = time ( 0 ) ;
tm * ltm = localtime ( & now ) ;
unsigned int year = 1900 + ltm - > tm_year ;
string str_authors = string ( _ ( " Copyright © UBSoft LLC, 2022 - " ) ) + to_string ( year ) ;
string str_authors = string ( gettext ( " Copyright © UBSoft LLC, 2022 - " ) ) + to_string ( year ) ;
aboutWindows - > set_copyright ( str_authors ) ;
aboutWindows - > set_comments ( _ ( " Date and Time " ) ) ;
aboutWindows - > set_website ( _ ( " https://wiki.ublinux.com " ) ) ;
aboutWindows - > set_version ( _ ( version_application . c_str ( ) ) ) ;
aboutWindows - > set_website_label ( _ ( " Project Home Page " ) ) ;
lblSave - > set_label ( _ ( " Save " ) ) ;
lblLoad - > set_label ( _ ( " Load " ) ) ;
txtDate - > set_tooltip_text ( _ ( " Date of \n Format: DD.MM.YYYY " ) ) ;
txtNtpServer - > set_tooltip_text ( _ ( " Enter the name of the ntp-server or its ip-address. \n When entering multiple addresses, separate them with commas. " ) ) ;
lblSynchronizebChkGLob - > set_text ( _ ( " Synchronize via NTP " ) ) ;
cbDhcp - > append ( _ ( " Default " ) ) ;
cbDhcp - > append ( _ ( " DHCP " ) ) ;
cbDhcp - > append ( _ ( " Manual " ) ) ;
cbDhcp - > append ( _ ( " Disabled " ) ) ;
lblDateTimeSetting - > set_text ( _ ( " Current date and time " ) ) ;
lblHead - > set_text ( _ ( " Setting the date and time " ) ) ;
lblTime - > set_text ( _ ( " Time: " ) ) ;
lblData - > set_text ( _ ( " Date: " ) ) ;
lblTimeZone - > set_text ( _ ( " Time zone " ) ) ;
lblReg - > set_text ( _ ( " Region: " ) ) ;
lblZone - > set_text ( _ ( " Zone: " ) ) ;
lblSynchronizeBtn - > set_text ( _ ( " Sync by " ) ) ;
lblHeader - > set_text ( _ ( " ubl-settings-datetime " ) ) ;
windowMessDchp - > set_title ( _ ( " Warning! " ) ) ;
lblTimeBios - > set_text ( _ ( " Synchronize hardware time " ) ) ;
lblHW - > set_text ( _ ( " Synchronize hardware time: " ) ) ;
array_hw_local [ 0 ] = _ ( " UTC time " ) ;
array_hw_local [ 1 ] = _ ( " Local time " ) ;
aboutWindows - > set_comments ( gettext ( " Date and Time " ) ) ;
aboutWindows - > set_website ( gettext ( " https://wiki.ublinux.com " ) ) ;
aboutWindows - > set_version ( gettext ( version_application . c_str ( ) ) ) ;
aboutWindows - > set_website_label ( gettext ( " Project Home Page " ) ) ;
lblSave - > set_label ( gettext ( " Save " ) ) ;
lblLoad - > set_label ( gettext ( " Load " ) ) ;
txtDate - > set_tooltip_text ( gettext ( " Date of \n Format: DD.MM.YYYY " ) ) ;
txtNtpServer - > set_tooltip_text ( gettext ( " Enter the name of the ntp-server or its ip-address. \n When entering multiple addresses, separate them with commas. " ) ) ;
lblSynchronizebChkGLob - > set_text ( gettext ( " Synchronize via NTP " ) ) ;
cbDhcp - > append ( gettext ( " Default " ) ) ;
cbDhcp - > append ( gettext ( " DHCP " ) ) ;
cbDhcp - > append ( gettext ( " Manual " ) ) ;
cbDhcp - > append ( gettext ( " Disabled " ) ) ;
lblDateTimeSetting - > set_text ( gettext ( " Current date and time " ) ) ;
lblHead - > set_text ( gettext ( " Setting the date and time " ) ) ;
lblTime - > set_text ( gettext ( " Time: " ) ) ;
lblData - > set_text ( gettext ( " Date: " ) ) ;
lblTimeZone - > set_text ( gettext ( " Time zone " ) ) ;
lblReg - > set_text ( gettext ( " Region: " ) ) ;
lblZone - > set_text ( gettext ( " Zone: " ) ) ;
lblSynchronizeBtn - > set_text ( gettext ( " Sync by " ) ) ;
lblHeader - > set_text ( gettext ( " ubl-settings-datetime " ) ) ;
windowMessDchp - > set_title ( gettext ( " Warning! " ) ) ;
lblTimeBios - > set_text ( gettext ( " Synchronize hardware time " ) ) ;
lblHW - > set_text ( gettext ( " Synchronize hardware time: " ) ) ;
array_hw_local [ 0 ] = gettext ( " UTC time " ) ;
array_hw_local [ 1 ] = gettext ( " Local time " ) ;
array_hw [ 0 ] = " utc " ;
array_hw [ 1 ] = " localtime " ;
this - > bubble_sort ( array_hw , array_hw_local , 2 ) ;
@ -224,8 +229,7 @@ void MainWindow::add_CSS() {
Glib : : RefPtr < Gtk : : StyleContext > styleContext = Gtk : : StyleContext : : create ( ) ;
Glib : : RefPtr < Gdk : : Screen > screen = Gdk : : Screen : : get_default ( ) ; //get default screen
styleContext - > add_provider_for_screen ( screen , cssProvider , GTK_STYLE_PROVIDER_PRIORITY_APPLICATION ) ; //add provider for screen in all application
Glib : : RefPtr < Gtk : : StyleContext > boxColor_css = boxColor - > get_style_context ( ) ;
boxColor_css - > add_class ( " cssboxColor1 " ) ;
imgHeadBackground - > set ( path_img_head_background ) ;
Glib : : RefPtr < Gtk : : StyleContext > lblHead_css = lblHead - > get_style_context ( ) ;
Glib : : RefPtr < Gtk : : StyleContext > boxButton_css = boxButton - > get_style_context ( ) ;
Glib : : RefPtr < Gtk : : StyleContext > boxSave_css = boxSave - > get_style_context ( ) ;
@ -308,6 +312,9 @@ void MainWindow::get_builder() {
builder - > get_widget ( " imgSettings " , imgSettings ) ;
builder - > get_widget ( " imgSave " , imgSave ) ;
builder - > get_widget ( " boxWidgetFunc " , boxWidgetFunc ) ;
builder - > get_widget ( " overHead " , overHead ) ;
builder - > get_widget ( " imgHeadBackground " , imgHeadBackground ) ;
}
void MainWindow : : gui_exit ( ) {
@ -384,7 +391,7 @@ void MainWindow::event_zone() {
void MainWindow : : synopsis_show ( ) {
int start_error = error_info ;
string cmd = " xdg-open " + string ( _ ( " https://wiki.ublinux.com/ru/Пр о г р а ммно е _о б е с пе че ние /Пр о г р а ммы_и_у тилиты/В с е / " ) ) + app_name ;
string cmd = " xdg-open " + string ( gettext ( " https://wiki.ublinux.com/ru/Пр о г р а ммно е _о б е с пе че ние /Пр о г р а ммы_и_у тилиты/В с е / " ) ) + app_name ;
if ( geteuid ( ) = = 0 ) {
string response_user = getlogin ( ) ;
cmd = " su -l " + response_user + " -c \" DISPLAY=$DISPLAY " + cmd + " \" " ;
@ -430,7 +437,7 @@ void MainWindow::load_globl_cfg() {
void MainWindow : : save_local_cfg ( ) {
if ( ( this - > check_config ( " region " , 0 ) & & this - > check_config ( " zone " , 0 ) & &
this - > check_config ( " dhcp " , 0 ) & & this - > check_config ( " hw " , 0 ) ) ) {
lblWarning - > set_text ( _ ( " Nothing to save! " ) ) ;
lblWarning - > set_text ( gettext ( " Nothing to save! " ) ) ;
}
else {
string cmd_zone = " ubconfig --target system set clock ZONE= " ;
@ -461,7 +468,7 @@ void MainWindow::save_local_cfg() {
void MainWindow : : save_global_cfg ( ) {
if ( ( this - > check_config ( " region " , 1 ) & & this - > check_config ( " zone " , 1 ) & &
this - > check_config ( " dhcp " , 1 ) & & this - > check_config ( " hw " , 1 ) ) ) {
lblWarning - > set_text ( _ ( " Nothing to save! " ) ) ;
lblWarning - > set_text ( gettext ( " Nothing to save! " ) ) ;
}
else {
string cmd = " ubconfig --target global set clock ZONE= " ;
@ -491,7 +498,7 @@ void MainWindow::save_global_cfg() {
void MainWindow : : save_global_local_cfg ( ) {
if ( ( this - > check_config ( " region " , 2 ) & & this - > check_config ( " zone " , 2 ) & &
this - > check_config ( " dhcp " , 2 ) & & this - > check_config ( " hw " , 2 ) ) ) {
lblWarning - > set_text ( _ ( " Nothing to save! " ) ) ;
lblWarning - > set_text ( gettext ( " Nothing to save! " ) ) ;
}
else {
string cmd = " " ;
@ -654,49 +661,49 @@ string MainWindow::get_ubconfig_value(string &cmd){
void MainWindow : : info_warning_error ( int mess ) {
if ( error_info > 0 | | warning_info > 0 ) {
info_status_app ( " boxInfoMessError " ) ;
imgInfo - > set_from_icon_name ( " ru .ublinux.ubl-settings-datetime.warning" , Gtk : : ICON_SIZE_MENU ) ;
imgInfo - > set_from_icon_name ( " com .ublinux.ubl-settings-datetime.warning" , Gtk : : ICON_SIZE_MENU ) ;
error_info = 0 ;
warning_info = 0 ;
string mess_error = " " ;
if ( mess = = 0 ) {
mess_error = string ( _ ( " Local configuration reading error " ) ) + cmd_error ;
mess_error = string ( gettext ( " Local configuration reading error " ) ) + cmd_error ;
lblWarning - > set_text ( mess_error ) ;
}
else if ( mess = = 1 ) {
mess_error = string ( _ ( " Global configuration read error " ) ) + cmd_error ;
mess_error = string ( gettext ( " Global configuration read error " ) ) + cmd_error ;
lblWarning - > set_text ( mess_error ) ;
}
else if ( mess = = 2 ) {
mess_error = string ( _ ( " Local configuration write error " ) ) + cmd_error ;
mess_error = string ( gettext ( " Local configuration write error " ) ) + cmd_error ;
lblWarning - > set_text ( mess_error ) ;
}
else if ( mess = = 3 ) {
mess_error = string ( _ ( " Global configuration write error " ) ) + cmd_error ;
mess_error = string ( gettext ( " Global configuration write error " ) ) + cmd_error ;
lblWarning - > set_text ( mess_error ) ;
}
else if ( mess = = 4 ) {
mess_error = string ( _ ( " Error saved local and global configuration " ) ) + cmd_error ;
mess_error = string ( gettext ( " Error saved local and global configuration " ) ) + cmd_error ;
lblWarning - > set_text ( mess_error ) ;
}
cmd_error = " " ;
}
else {
info_status_app ( " boxInfoMessOK " ) ;
imgInfo - > set_from_icon_name ( " ru .ublinux.ubl-settings-datetime.checked" , Gtk : : ICON_SIZE_MENU ) ; //Gtk::IconSize::INHERIT);
imgInfo - > set_from_icon_name ( " com .ublinux.ubl-settings-datetime.checked" , Gtk : : ICON_SIZE_MENU ) ; //Gtk::IconSize::INHERIT);
if ( mess = = 0 ) {
lblWarning - > set_text ( _ ( " Local configuration downloaded successfully " ) ) ;
lblWarning - > set_text ( gettext ( " Local configuration downloaded successfully " ) ) ;
}
else if ( mess = = 1 ) {
lblWarning - > set_text ( _ ( " Global configuration downloaded successfully " ) ) ;
lblWarning - > set_text ( gettext ( " Global configuration downloaded successfully " ) ) ;
}
else if ( mess = = 2 ) {
lblWarning - > set_text ( _ ( " Local configuration successfully written " ) ) ;
lblWarning - > set_text ( gettext ( " Local configuration successfully written " ) ) ;
}
else if ( mess = = 3 ) {
lblWarning - > set_text ( _ ( " Global configuration successfully written " ) ) ;
lblWarning - > set_text ( gettext ( " Global configuration successfully written " ) ) ;
}
else if ( mess = = 4 ) {
lblWarning - > set_text ( _ ( " Successfully saved local and global configuration " ) ) ;
lblWarning - > set_text ( gettext ( " Successfully saved local and global configuration " ) ) ;
}
}
}
@ -788,7 +795,7 @@ void MainWindow::gui_mess_close() {
bool MainWindow : : focus_ntp_text ( ) {
if ( txtNtpServer - > get_text ( ) = = " " | | txtNtpServer - > get_text ( ) = = " " ) {
lblMessage - > set_text ( _ ( " Enter DHCP! " ) ) ;
lblMessage - > set_text ( gettext ( " Enter DHCP! " ) ) ;
windowMessDchp - > show ( ) ;
}
else {
@ -814,11 +821,11 @@ bool MainWindow::focus_ntp_text() {
}
else {
if ( flag_error = = true ) {
lblMessage - > set_text ( _ ( " An invalid character is entered " ) ) ;
lblMessage - > set_text ( gettext ( " An invalid character is entered " ) ) ;
windowMessDchp - > show ( ) ;
}
else if ( flag_error_check_ntp = = true ) {
lblMessage - > set_text ( _ ( " Error in the ntp name " ) ) ;
lblMessage - > set_text ( gettext ( " Error in the ntp name " ) ) ;
windowMessDchp - > show ( ) ;
}
return false ;
@ -1051,7 +1058,7 @@ void MainWindow::entry_dhcp_mess(string cmd_get_dhcp, string cmd_default_get_dhc
// btnUpdateDateTime->set_sensitive(false);
if ( str_dhcp = = " " ) {
this - > write_config ( " " , " dhcp " ) ;
lblMessage - > set_text ( _ ( " Enter DHCP! " ) ) ;
lblMessage - > set_text ( gettext ( " Enter DHCP! " ) ) ;
windowMessDchp - > show ( ) ;
}
else if ( str_dhcp = = " (null) " ) {
@ -1230,7 +1237,7 @@ void MainWindow::append_region_zone(string region, string zone, Gtk::ComboBoxTex
int size_vec = array_region_local . size ( ) ;
if ( size_vec = = 0 ) {
for ( auto & [ key , value ] : time_reg_map ) {
array_region_local . push_back ( string ( _ ( key . c_str ( ) ) ) ) ;
array_region_local . push_back ( string ( gettext ( key . c_str ( ) ) ) ) ;
array_region . push_back ( key ) ;
index + = 1 ;
}
@ -1256,7 +1263,7 @@ void MainWindow::append_region_zone(string region, string zone, Gtk::ComboBoxTex
if ( size_vec = = 0 ) {
tmpCbReg - > append ( Glib : : ustring ( reg ) ) ;
}
if ( reg = = string ( _ ( region . c_str ( ) ) ) ) {
if ( reg = = string ( gettext ( region . c_str ( ) ) ) ) {
tmpCbReg - > set_active_text ( reg ) ;
}
}
@ -1266,7 +1273,7 @@ void MainWindow::append_region_zone(string region, string zone, Gtk::ComboBoxTex
string path_reg_zone = " " ;
string zone_offest = " " ;
path_reg_zone = region + " / " + zone ;
zone_offest = this - > zone_file_read ( path_reg_zone ) + _ ( zone . c_str ( ) ) ;
zone_offest = this - > zone_file_read ( path_reg_zone ) + gettext ( zone . c_str ( ) ) ;
if ( region = = " " ) {
tmpCbZone - > append ( " " ) ;
tmpCbZone - > set_active ( 0 ) ;
@ -1399,12 +1406,12 @@ void MainWindow::post_entry_data() {
string str_error_clock = this - > call ( cmd ) ;
size_t index = str_error_clock . find ( " date: " ) ;
if ( index ! = std : : string : : npos ) {
lblMessage - > set_text ( _ ( " Incorrect date format " ) ) ;
lblMessage - > set_text ( gettext ( " Incorrect date format " ) ) ;
windowMessDchp - > show ( ) ;
}
}
else {
lblMessage - > set_text ( _ ( " Incorrect date format " ) ) ;
lblMessage - > set_text ( gettext ( " Incorrect date format " ) ) ;
windowMessDchp - > show ( ) ;
}
}
@ -1469,7 +1476,7 @@ void MainWindow::read_file() {
string reg_reg_zone = entry_reg_reg_zone . path ( ) . filename ( ) . string ( ) ;
zone . push_back ( reg_reg_zone ) ;
path_reg_zone = key_reg + " / " + reg_reg_zone ;
key_zone_local = this - > zone_file_read ( path_reg_zone ) + _ ( reg_reg_zone . c_str ( ) ) ;
key_zone_local = this - > zone_file_read ( path_reg_zone ) + gettext ( reg_reg_zone . c_str ( ) ) ;
zone_local . push_back ( key_zone_local ) ;
}
in2 . close ( ) ;
@ -1478,7 +1485,7 @@ void MainWindow::read_file() {
else if ( key_zone . length ( ) ! = 0 | | key_zone ! = " " ) {
zone . push_back ( key_zone ) ;
path_reg_zone = key_reg + " / " + key_zone ;
key_zone_local = this - > zone_file_read ( path_reg_zone ) + _ ( key_zone . c_str ( ) ) ;
key_zone_local = this - > zone_file_read ( path_reg_zone ) + gettext ( key_zone . c_str ( ) ) ;
zone_local . push_back ( key_zone_local ) ;
}
}