mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-09-05 14:47:52 -04:00
Crated messagebox for no devices
This commit is contained in:
parent
9b1f6d7b6d
commit
daeb2d5a18
@ -306,7 +306,6 @@ AppFrame::AppFrame() :
|
|||||||
}
|
}
|
||||||
|
|
||||||
AppFrame::~AppFrame() {
|
AppFrame::~AppFrame() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppFrame::OnMenu(wxCommandEvent& event) {
|
void AppFrame::OnMenu(wxCommandEvent& event) {
|
||||||
@ -688,3 +687,8 @@ bool AppFrame::loadSession(std::string fileName) {
|
|||||||
|
|
||||||
return true;
|
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);
|
void saveSession(std::string fileName);
|
||||||
bool loadSession(std::string fileName);
|
bool loadSession(std::string fileName);
|
||||||
|
|
||||||
|
void OnMessage(std::string message, std::string title);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OnMenu(wxCommandEvent& event);
|
void OnMenu(wxCommandEvent& event);
|
||||||
void OnClose(wxCommandEvent& event);
|
void OnClose(wxCommandEvent& event);
|
||||||
void OnNewWindow(wxCommandEvent& event);
|
void OnNewWindow(wxCommandEvent& event);
|
||||||
void OnIdle(wxIdleEvent& event);
|
void OnIdle(wxIdleEvent& event);
|
||||||
|
|
||||||
|
|
||||||
ScopeCanvas *scopeCanvas;
|
ScopeCanvas *scopeCanvas;
|
||||||
SpectrumCanvas *spectrumCanvas;
|
SpectrumCanvas *spectrumCanvas;
|
||||||
WaterfallCanvas *waterfallCanvas;
|
WaterfallCanvas *waterfallCanvas;
|
||||||
|
@ -94,6 +94,12 @@ bool CubicSDR::OnInit() {
|
|||||||
|
|
||||||
appframe = new AppFrame();
|
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__
|
#ifdef __APPLE__
|
||||||
int main_policy;
|
int main_policy;
|
||||||
struct sched_param main_param;
|
struct sched_param main_param;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user