mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-09-02 21:27:49 -04:00
Crated messagebox for no devices
This commit is contained in:
parent
9b1f6d7b6d
commit
daeb2d5a18
@ -306,7 +306,6 @@ AppFrame::AppFrame() :
|
||||
}
|
||||
|
||||
AppFrame::~AppFrame() {
|
||||
|
||||
}
|
||||
|
||||
void AppFrame::OnMenu(wxCommandEvent& event) {
|
||||
@ -688,3 +687,8 @@ bool AppFrame::loadSession(std::string fileName) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void AppFrame::OnMessage(std::string text, std::string title) {
|
||||
wxMessageDialog *message = new wxMessageDialog(NULL, wxString::Format(text.c_str()), wxString::Format(title.c_str()), wxOK | wxICON_ERROR );
|
||||
message->ShowModal();
|
||||
}
|
||||
|
@ -51,12 +51,15 @@ public:
|
||||
void saveSession(std::string fileName);
|
||||
bool loadSession(std::string fileName);
|
||||
|
||||
void OnMessage(std::string message, std::string title);
|
||||
|
||||
private:
|
||||
void OnMenu(wxCommandEvent& event);
|
||||
void OnClose(wxCommandEvent& event);
|
||||
void OnNewWindow(wxCommandEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
|
||||
|
||||
ScopeCanvas *scopeCanvas;
|
||||
SpectrumCanvas *spectrumCanvas;
|
||||
WaterfallCanvas *waterfallCanvas;
|
||||
|
@ -87,13 +87,19 @@ bool CubicSDR::OnInit() {
|
||||
|
||||
std::cout << "Chosen: " << devId << std::endl;
|
||||
sdrThread->setDeviceId(devId);
|
||||
}
|
||||
}
|
||||
|
||||
t_PostSDR = new std::thread(&SDRPostThread::threadMain, sdrPostThread);
|
||||
t_SDR = new std::thread(&SDRThread::threadMain, sdrThread);
|
||||
|
||||
appframe = new AppFrame();
|
||||
|
||||
if(devs.size() == 0) {
|
||||
// appframe->OnMessage("no devices found!", "warning");
|
||||
wxMessageDialog *message = new wxMessageDialog(NULL, wxT("no devices found"), wxT("warning"), wxOK | wxICON_ERROR );
|
||||
message->ShowModal();
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
int main_policy;
|
||||
struct sched_param main_param;
|
||||
|
Loading…
x
Reference in New Issue
Block a user