|
|
|
|
@ -445,10 +445,10 @@ 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);
|
|
|
|
|
if (obj_result.error == 0){
|
|
|
|
|
if (obj_result.response == "localtime"){
|
|
|
|
|
if (obj_result.response.find("localtime")!=string::npos){
|
|
|
|
|
cbHw->set_active(0);
|
|
|
|
|
}
|
|
|
|
|
else if (obj_result.response == "etc"){
|
|
|
|
|
else if (obj_result.response.find("utc")!=string::npos){
|
|
|
|
|
cbHw->set_active(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -457,19 +457,20 @@ void MainWindow::entry_hardware_clock(string &cmd, string &cmd_default){
|
|
|
|
|
cbHw->set_active(-1);
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
struct Result<string> obj_result = this->wrapper_call(cmd_default);
|
|
|
|
|
if (obj_result.error == 0){
|
|
|
|
|
if (obj_result.response == "localtime"){
|
|
|
|
|
cbHw->set_active(0);
|
|
|
|
|
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){
|
|
|
|
|
cbHw->set_active(0);
|
|
|
|
|
}
|
|
|
|
|
else if (obj_result_default.response.find("utc")!=string::npos){
|
|
|
|
|
cbHw->set_active(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (obj_result.response == "etc"){
|
|
|
|
|
cbHw->set_active(1);
|
|
|
|
|
else if (obj_result_default.error == 3){
|
|
|
|
|
warning_info-=1;
|
|
|
|
|
cbHw->set_active(-1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (obj_result.error == 3){
|
|
|
|
|
warning_info-=1;
|
|
|
|
|
cbHw->set_active(-1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|