mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-08-10 01:22:26 -04:00
made OnMessage a bit cleaner, problably shoudl move to /visual
This commit is contained in:
parent
daeb2d5a18
commit
06da0a913c
@ -81,25 +81,20 @@ bool CubicSDR::OnInit() {
|
||||
devName.append(" (In Use?)");
|
||||
}
|
||||
choices.Add(devName);
|
||||
}
|
||||
|
||||
}
|
||||
int devId = wxGetSingleChoiceIndex(wxT("Devices"), wxT("Choose Input Device"), choices);
|
||||
|
||||
std::cout << "Chosen: " << devId << std::endl;
|
||||
sdrThread->setDeviceId(devId);
|
||||
}
|
||||
} else {
|
||||
OnMessage("no devices found!", "warning");
|
||||
}
|
||||
|
||||
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;
|
||||
@ -293,3 +288,8 @@ void CubicSDR::setFrequencySnap(int snap) {
|
||||
int CubicSDR::getFrequencySnap() {
|
||||
return snap;
|
||||
}
|
||||
|
||||
void CubicSDR::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();
|
||||
}
|
@ -62,6 +62,8 @@ public:
|
||||
|
||||
void showFrequencyInput();
|
||||
|
||||
void OnMessage(std::string message, std::string title);
|
||||
|
||||
private:
|
||||
AppFrame *appframe;
|
||||
AppConfig config;
|
||||
|
Loading…
x
Reference in New Issue
Block a user