FIX:fixed that macOS will hang up as direct connected device
jira:[STUDIO-8630] Change-Id: I96562bd11de807435fc6a2d81501800b0cf110b1
This commit is contained in:
parent
3f6ded0a85
commit
c8a8d9f197
|
@ -1874,7 +1874,6 @@ void InputIpAddressDialog::on_ok(wxMouseEvent& evt)
|
||||||
Refresh();
|
Refresh();
|
||||||
Layout();
|
Layout();
|
||||||
Fit();
|
Fit();
|
||||||
|
|
||||||
m_thread = new boost::thread(boost::bind(&InputIpAddressDialog::workerThreadFunc, this, str_ip, str_access_code, str_sn, str_model_id));
|
m_thread = new boost::thread(boost::bind(&InputIpAddressDialog::workerThreadFunc, this, str_ip, str_access_code, str_sn, str_model_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1903,7 +1902,13 @@ void InputIpAddressDialog::workerThreadFunc(std::string str_ip, std::string str_
|
||||||
detectResult detectData;
|
detectResult detectData;
|
||||||
auto result = -1;
|
auto result = -1;
|
||||||
if (current_input_index == 0) {
|
if (current_input_index == 0) {
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
result = -3;
|
||||||
|
#else
|
||||||
result = wxGetApp().getAgent()->bind_detect(str_ip, "secure", detectData);
|
result = wxGetApp().getAgent()->bind_detect(str_ip, "secure", detectData);
|
||||||
|
#endif
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
result = 0;
|
result = 0;
|
||||||
detectData.dev_name = sn;
|
detectData.dev_name = sn;
|
||||||
|
@ -1956,7 +1961,12 @@ void InputIpAddressDialog::workerThreadFunc(std::string str_ip, std::string str_
|
||||||
post_update_test_msg(wxEmptyString, true);
|
post_update_test_msg(wxEmptyString, true);
|
||||||
post_update_test_msg(wxString::Format(_L("Connecting to printer... The dialog will close later"), closeCount), true);
|
post_update_test_msg(wxString::Format(_L("Connecting to printer... The dialog will close later"), closeCount), true);
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
wxCommandEvent event(EVT_CLOSE_IPADDRESS_DLG);
|
||||||
|
wxPostEvent(this, event);
|
||||||
|
#else
|
||||||
closeTimer->Start(1000);
|
closeTimer->Start(1000);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputIpAddressDialog::OnTimer(wxTimerEvent& event) {
|
void InputIpAddressDialog::OnTimer(wxTimerEvent& event) {
|
||||||
|
|
Loading…
Reference in New Issue