MCPcopy Create free account
hub / github.com/GollyGang/ready / Validate

Method Validate

src/gui/RecordingDialog.cpp:132–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130// -----------------------------------------------------------------------------------------------
131
132bool RecordingDialog::Validate()
133{
134 if( !wxDirExists(this->folder_edit->GetValue()) )
135 {
136 int answer = wxMessageBox("Folder doesn't exist. Create?","Confirm",wxOK|wxCANCEL);
137 if( answer == wxOK )
138 {
139 bool ret = wxFileName::Mkdir(this->folder_edit->GetValue(),wxS_DIR_DEFAULT,wxPATH_MKDIR_FULL);
140 if( !ret )
141 {
142 wxMessageBox("Unable to create folder.","Error",wxOK|wxICON_ERROR);
143 return false;
144 }
145 }
146 else
147 {
148 return false;
149 }
150 }
151 if (!this->target_reduction_edit->GetValue().ToDouble(&this->target_reduction))
152 return false;
153 return wxDialog::Validate();
154}
155
156// -----------------------------------------------------------------------------------------------
157

Callers

nothing calls this directly

Calls 1

GetValueMethod · 0.45

Tested by

no test coverage detected