Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | TIP 382: Existence and argument validation for -confirmoverwrite on Cocoa. Option is ignored for now. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
80eaa00747af81c1a7b9209fd975e183 |
User & Date: | dgp 2011-10-24 20:19:53 |
Context
2011-10-25
| ||
20:47 | Fix for bug 3410609; confirmed to work on UK keyboard. check-in: 63902eff user: dkf tags: trunk | |
2011-10-24
| ||
20:19 | TIP 382: Existence and argument validation for -confirmoverwrite on Cocoa. Option is ignored for now. check-in: 80eaa007 user: dgp tags: trunk | |
19:50 | Merge Carbon TIP 382 implementation to Tk trunk. check-in: 4b430be3 user: dgp tags: trunk | |
Changes
Changes to macosx/tkMacOSXDialog.c.
︙ | ︙ | |||
29 30 31 32 33 34 35 | enum openOptions { OPEN_DEFAULT, OPEN_FILETYPES, OPEN_INITDIR, OPEN_INITFILE, OPEN_MESSAGE, OPEN_MULTIPLE, OPEN_PARENT, OPEN_TITLE, OPEN_TYPEVARIABLE, OPEN_COMMAND, }; static const char *const saveOptionStrings[] = { "-defaultextension", "-filetypes", "-initialdir", "-initialfile", | | > > | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | enum openOptions { OPEN_DEFAULT, OPEN_FILETYPES, OPEN_INITDIR, OPEN_INITFILE, OPEN_MESSAGE, OPEN_MULTIPLE, OPEN_PARENT, OPEN_TITLE, OPEN_TYPEVARIABLE, OPEN_COMMAND, }; static const char *const saveOptionStrings[] = { "-defaultextension", "-filetypes", "-initialdir", "-initialfile", "-message", "-parent", "-title", "-typevariable", "-command", "-confirmoverwrite", NULL }; enum saveOptions { SAVE_DEFAULT, SAVE_FILETYPES, SAVE_INITDIR, SAVE_INITFILE, SAVE_MESSAGE, SAVE_PARENT, SAVE_TITLE, SAVE_TYPEVARIABLE, SAVE_COMMAND, SAVE_CONFIRMOW }; static const char *const chooseOptionStrings[] = { "-initialdir", "-message", "-mustexist", "-parent", "-title", "-command", NULL }; enum chooseOptions { CHOOSE_INITDIR, CHOOSE_MESSAGE, CHOOSE_MUSTEXIST, CHOOSE_PARENT, |
︙ | ︙ | |||
530 531 532 533 534 535 536 537 538 539 540 541 542 543 | Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = clientData; char *str; int i, result = TCL_ERROR, haveParentOption = 0; int index, len; FileFilterList fl; Tcl_Obj *cmdObj = NULL; FilePanelCallbackInfo callbackInfoStruct; FilePanelCallbackInfo *callbackInfo = &callbackInfoStruct; NSString *directory = nil, *filename = nil, *defaultType = nil; NSString *message, *title, *type; | > | 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 | Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = clientData; char *str; int i, result = TCL_ERROR, haveParentOption = 0; int confirmOverwrite = 1; int index, len; FileFilterList fl; Tcl_Obj *cmdObj = NULL; FilePanelCallbackInfo callbackInfoStruct; FilePanelCallbackInfo *callbackInfo = &callbackInfoStruct; NSString *directory = nil, *filename = nil, *defaultType = nil; NSString *message, *title, *type; |
︙ | ︙ | |||
608 609 610 611 612 613 614 615 616 617 618 619 620 621 | [panel setTitle:title]; [title release]; break; case SAVE_TYPEVARIABLE: break; case SAVE_COMMAND: cmdObj = objv[i+1]; break; } } if (fl.filters || defaultType) { fileTypes = [NSMutableArray array]; [fileTypes addObject:defaultType ? defaultType : (id)kUTTypeContent]; for (FileFilter *filterPtr = fl.filters; filterPtr; | > > > > > > | 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 | [panel setTitle:title]; [title release]; break; case SAVE_TYPEVARIABLE: break; case SAVE_COMMAND: cmdObj = objv[i+1]; break; case SAVE_CONFIRMOW: if (Tcl_GetBooleanFromObj(interp, objv[i + 1], &confirmOverwrite) != TCL_OK) { goto end; } break; } } if (fl.filters || defaultType) { fileTypes = [NSMutableArray array]; [fileTypes addObject:defaultType ? defaultType : (id)kUTTypeContent]; for (FileFilter *filterPtr = fl.filters; filterPtr; |
︙ | ︙ |