Fix bad 'SoapySDR missing' modal dialog thread call

This commit is contained in:
Charles J. Cliffe
2016-01-13 21:59:47 -05:00
parent 416cb54fb9
commit 8d738aed25
4 changed files with 23 additions and 7 deletions
+12 -1
View File
@@ -7,6 +7,7 @@
SDRDevicesDialog::SDRDevicesDialog( wxWindow* parent ): devFrame( parent ) {
refresh = true;
failed = false;
m_addRemoteButton->Disable();
m_useSelectedButton->Disable();
m_deviceTimer.Start(250);
@@ -229,6 +230,16 @@ void SDRDevicesDialog::OnTreeDoubleClick( wxMouseEvent& event ) {
void SDRDevicesDialog::OnDeviceTimer( wxTimerEvent& event ) {
if (refresh) {
if (wxGetApp().areModulesMissing()) {
if (!failed) {
wxMessageDialog *info;
info = new wxMessageDialog(NULL, wxT("\nNo SoapySDR modules were found.\n\nCubicSDR requires at least one SoapySDR device support module to be installed.\n\nPlease visit https://github.com/cjcliffe/CubicSDR/wiki and in the build instructions for your platform read the 'Support Modules' section for more information."), wxT("\x28\u256F\xB0\u25A1\xB0\uFF09\u256F\uFE35\x20\u253B\u2501\u253B"), wxOK | wxICON_ERROR);
info->ShowModal();
failed = true;
}
return;
}
if (wxGetApp().areDevicesEnumerating() || !wxGetApp().areDevicesReady()) {
std::string msg = wxGetApp().getNotification();
devStatusBar->SetStatusText(msg);
@@ -237,7 +248,7 @@ void SDRDevicesDialog::OnDeviceTimer( wxTimerEvent& event ) {
event.Skip();
return;
}
devTree->DeleteAllItems();
wxTreeItemId devRoot = devTree->AddRoot("Devices");
+1 -1
View File
@@ -23,7 +23,7 @@ private:
SDRDeviceInfo *getSelectedDevice(wxTreeItemId selId);
wxPGProperty *addArgInfoProperty(wxPropertyGrid *pg, SoapySDR::ArgInfo arg);
bool refresh;
bool refresh, failed;
std::map<std::string, std::vector<SDRDeviceInfo *>* > devs;
std::vector<SDRDeviceInfo *>::iterator devs_i;
std::map<wxTreeItemId, SDRDeviceInfo *> devItems;