# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1301150211 0 # Node ID 8a2e3138e1e4483d5e393c6812b7005e56c4ef38 # Parent c6040726eb9213864e19b5d8015481e29aba1212 Implemented DW_DIRECTORY_OPEN on the Mac. diff -r c6040726eb92 -r 8a2e3138e1e4 mac/dw.m --- a/mac/dw.m Sat Mar 26 14:22:44 2011 +0000 +++ b/mac/dw.m Sat Mar 26 14:36:51 2011 +0000 @@ -2348,14 +2348,22 @@ */ char * API dw_file_browse(char *title, char *defpath, char *ext, int flags) { - if(flags == DW_FILE_OPEN) + if(flags == DW_FILE_OPEN || flags == DW_DIRECTORY_OPEN) { /* Create the File Open Dialog class. */ NSOpenPanel* openDlg = [NSOpenPanel openPanel]; /* Enable the selection of files in the dialog. */ - [openDlg setCanChooseFiles:YES]; - [openDlg setCanChooseDirectories:NO]; + if(flags == DW_FILE_OPEN) + { + [openDlg setCanChooseFiles:YES]; + [openDlg setCanChooseDirectories:NO]; + } + else + { + [openDlg setCanChooseFiles:NO]; + [openDlg setCanChooseDirectories:YES]; + } /* Disable multiple selection */ [openDlg setAllowsMultipleSelection:NO];