Исправлены с баги с запросами к бэку

pull/39/head^2
Igor Belitskiy 3 years ago
parent c713651ea6
commit 6d4750ec7e

@ -73,7 +73,6 @@ MainWindow::MainWindow(Glib::RefPtr<Gtk::Builder> const& builder) {
void MainWindow::settings(){
year=0, month=0, day=0;
this->get_builder();
this->event();
this->lacalization();
if (this->check_root()==0){
numTimeHrs->set_range(0,23);
@ -82,7 +81,10 @@ void MainWindow::settings(){
numTimeMin->set_increments(1.0,1.0);
this->get_config();
this->flag_block_gui();
this->event();
this->parse_text_date();
}
else{
numTimeHrs->set_sensitive(false);
@ -107,6 +109,7 @@ void MainWindow::settings(){
lblRegGlob->set_sensitive(false);
lblZone1Glob->set_sensitive(false);
lblDateTimeSetting->set_sensitive(false);
this->event();
}
}
@ -383,7 +386,7 @@ void MainWindow::event_entry_cbDhcp(){
str_dhcp = str_dhcp.substr(str_dhcp.find("=")+1,str_dhcp.length());
str_dhcp = str_dhcp.substr(0,str_dhcp.find("\n"));
if (str_dhcp!="dhcp" && str_dhcp!="(null)"){
txtNtpServer->set_text("");
txtNtpServer->set_text(str_dhcp);
}
cbDhcp->set_active(activ_index);
}
@ -447,8 +450,8 @@ void MainWindow::calendar_show(){
void MainWindow::enry_dhcp_mess(){
string str_dhcp = this->call("/usr/bin/ubconfig get network NTPSERVERS");
if ((str_dhcp!="") && (str_dhcp!="(null)")){
this->set_ntp_toggle_glob();
cbxSynchronizeNtpGlob->set_active(1);
this->set_ntp_toggle_glob();
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"){
@ -497,8 +500,7 @@ void MainWindow::get_config(){
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);
//this->append_region_zone("Africa","Abidjan");
this->append_region_zone(str_filling_reg,str_filling_zon);
}
else {
this->append_region_zone("Africa","Abidjan");
@ -584,7 +586,10 @@ void MainWindow::set_ntp_toggle_glob(){
}
else{
cbDhcp->set_sensitive(true);
txtNtpServer->set_sensitive(true);
int activ_index = cbDhcp->get_active_row_number();
if (activ_index==2){
txtNtpServer->set_sensitive(true);
}
}
}
@ -613,8 +618,8 @@ void MainWindow::append_region_zone(string region, string zone){
path_reg_zone=region+"/"+zone;
zone_offest = this->zone_file_read(path_reg_zone) + _(zone.c_str());
for (string &_str_zone : time_reg_map_local.at(region)){
cbZone->append(zone_mixing);
cbZoneGlob->append(zone_mixing);
cbZone->append(_str_zone);
cbZoneGlob->append(_str_zone);
if (_str_zone!=""){
if (zone_offest == _str_zone){
cbZone->set_active(index);

Loading…
Cancel
Save