| 130 | // ----------------------------------------------------------------------------------------------- |
| 131 | |
| 132 | bool 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 | |