|
|
|
|
@ -65,8 +65,6 @@ void MainWindow::settings(){
|
|
|
|
|
builder->get_widget("window",window);
|
|
|
|
|
builder->get_widget("boxButton",boxButton);
|
|
|
|
|
builder->get_widget("boxSave",boxSave);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ubl_make_plugs(boxSave,boxButton, socket_ext_id_I, socket_trd_id_I);
|
|
|
|
|
year=0, month=0, day=0;
|
|
|
|
|
this->get_builder();
|
|
|
|
|
@ -444,7 +442,8 @@ void MainWindow::hardware_clock_global(string &local, string &etc){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MainWindow::entry_hardware_clock(string &cmd, string &cmd_default){
|
|
|
|
|
struct Result<string> obj_result = this->wrapper_call(cmd);
|
|
|
|
|
int error = warning_info;
|
|
|
|
|
struct Result<string> obj_result = this->wrapper_call(cmd);
|
|
|
|
|
if (obj_result.error == 0){
|
|
|
|
|
if (obj_result.response.find("localtime")!=string::npos){
|
|
|
|
|
cbHw->set_active(0);
|
|
|
|
|
@ -454,10 +453,13 @@ void MainWindow::entry_hardware_clock(string &cmd, string &cmd_default){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (obj_result.error == 3){
|
|
|
|
|
warning_info-=1;
|
|
|
|
|
if (error!=warning_info){
|
|
|
|
|
warning_info=error;
|
|
|
|
|
}
|
|
|
|
|
cbHw->set_active(-1);
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
int error_1 = warning_info;
|
|
|
|
|
struct Result<string> obj_result_default = this->wrapper_call(cmd_default);
|
|
|
|
|
if (obj_result_default.error == 0){
|
|
|
|
|
if (obj_result_default.response.find("localtime")!=string::npos){
|
|
|
|
|
@ -468,11 +470,16 @@ void MainWindow::entry_hardware_clock(string &cmd, string &cmd_default){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (obj_result_default.error != 0){
|
|
|
|
|
warning_info-=1;
|
|
|
|
|
if (error_1!=warning_info){
|
|
|
|
|
warning_info=error;
|
|
|
|
|
}
|
|
|
|
|
cbHw->set_active(-1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MainWindow::hardware_clock(){
|
|
|
|
|
@ -793,7 +800,7 @@ void MainWindow::calendar_show(){
|
|
|
|
|
popCalendar->show();
|
|
|
|
|
}
|
|
|
|
|
void MainWindow::fill_in_reg_zone(string &cmd){
|
|
|
|
|
|
|
|
|
|
int error = warning_info;
|
|
|
|
|
struct Result<string> obj_result_1 = this->wrapper_call(cmd);
|
|
|
|
|
if (obj_result_1.error==0){
|
|
|
|
|
auto arr_reg_zone = this->split_region_zone(obj_result_1.response);
|
|
|
|
|
@ -807,6 +814,11 @@ void MainWindow::fill_in_reg_zone(string &cmd){
|
|
|
|
|
else {
|
|
|
|
|
this->append_region_zone("","",cbRegion,cbZone);
|
|
|
|
|
}
|
|
|
|
|
if (obj_result_1.error==3){
|
|
|
|
|
if (error!=warning_info){
|
|
|
|
|
warning_info=error;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|