| 13 | __thread int dflags = 0; |
| 14 | |
| 15 | void FileDialogOnFileOpened(const char* path, __attribute__((unused)) FileView* fv){ |
| 16 | if(!(dflags & FILE_DIALOG_CREATE) || access(path, W_OK) || DisplayMessageBox("Open...", "File already exists! Overwrite?", MsgButtonsOKCancel)) { // Only open if create flag not specified OR user responds ok to message |
| 17 | if(selectedPth){ |
| 18 | free(selectedPth); |
| 19 | } |
| 20 | |
| 21 | selectedPth = strdup(path); |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | void FileDialogOnFileSelected(std::string& path, __attribute__((unused)) FileView* fv){ |
| 26 | dialogFileBox->contents.front() = path; |
no test coverage detected