Changeset 1664
- Timestamp:
- Aug 5, 2012, 2:11:07 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/collect.c
r1615 r1664 79 79 08 Aug 11 SHL Rework UM_COLLECT to avoid spurious container items free 80 80 13 Aug 11 GKY Have file count and KIBs update at the same time 81 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu and as part of copy, move and 82 delete operations 81 83 82 84 ***********************************************************************/ … … 2346 2348 case IDM_MCIPLAY: 2347 2349 case IDM_UUDECODE: 2350 case IDM_UNLOCKFILE: 2348 2351 case IDM_MERGE: 2349 2352 { -
trunk/dll/copyf.c
r1628 r1664 29 29 26 Aug 11 GKY Add a low mem version of xDosAlloc* wrappers; move error checking into all the 30 30 xDosAlloc* wrappers. 31 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of copy, move and 32 delete operations 33 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog for delete of 34 readonly files 31 35 32 36 ***********************************************************************/ … … 60 64 #include "fortify.h" 61 65 #include "pathutil.h" // AddBackslashToPath 66 #include "worker.h" 67 #include "systemf.h" 62 68 63 69 static PSZ pszSrcFile = __FILE__; … … 525 531 DosError(FERR_DISABLEHARDERR); 526 532 if (DosDeleteDir(dir)) { 527 make_deleteable(dir );533 make_deleteable(dir, 0); 528 534 DosDeleteDir(dir); 529 535 } 530 536 } 531 else if (IsFile(dir) > 0) { 532 DosError(FERR_DISABLEHARDERR); 533 if (DosForceDelete(dir)) { 534 make_deleteable(dir); 537 else if (IsFile(dir) > 0) { 538 APIRET error; 539 540 DosError(FERR_DISABLEHARDERR); 541 error = DosForceDelete(dir); 542 if (error) { 543 make_deleteable(dir, error); 535 544 DosForceDelete(dir); 536 545 } … … 609 618 DosError(FERR_DISABLEHARDERR); 610 619 if (DosDeleteDir(oldname)) { 611 make_deleteable(oldname );620 make_deleteable(oldname, 0); 612 621 DosDeleteDir(oldname); 613 622 } … … 666 675 } 667 676 668 INT make_deleteable(CHAR * filename) 669 { 677 INT make_deleteable(CHAR * filename, INT error) 678 { 679 APIRET rc; 670 680 INT ret = -1; 681 INT retrn; 671 682 FILESTATUS3 fsi; 672 683 684 if (error == ERROR_SHARING_VIOLATION && fUnlock) { 685 retrn = saymsg(MB_YESNO | MB_DEFBUTTON2, 686 HWND_DESKTOP, 687 GetPString(IDS_LOCKEDFILEWARNINGTITLE), 688 GetPString(IDS_LOCKEDFILEWARNING), 689 filename); 690 if (retrn == MBID_YES) { 691 runemf2(SEPARATE | INVISIBLE | BACKGROUND | WAIT, 692 HWND_DESKTOP, pszSrcFile, __LINE__, 693 NULL, NULL, "%s %s", PCSZ_UNLOCKEXE, filename); 694 } 695 } 673 696 DosError(FERR_DISABLEHARDERR); 674 if (!DosQueryPathInfo(filename, FIL_STANDARD, &fsi, sizeof(fsi))) { 675 fsi.attrFile = 0; 676 DosError(FERR_DISABLEHARDERR); 677 if (!xDosSetPathInfo(filename, FIL_STANDARD, &fsi, sizeof(fsi), 0)) 678 ret = 0; 679 } 697 rc = DosQueryPathInfo(filename, FIL_STANDARD, &fsi, sizeof(fsi)); 698 if (!rc) { 699 if (fsi.attrFile & 0x00000001) { 700 if (fWarnReadOnly && error != -1) { 701 retrn = saymsg(MB_YESNO | MB_DEFBUTTON2, 702 HWND_DESKTOP, 703 GetPString(IDS_READONLYFILEWARNINGTITLE), 704 GetPString(IDS_READONLYFILEWARNING), 705 filename); 706 if (retrn == MBID_YES) { 707 fsi.attrFile = 0; 708 DosError(FERR_DISABLEHARDERR); 709 if (!xDosSetPathInfo(filename, FIL_STANDARD, &fsi, sizeof(fsi), 0)) 710 ret = 0; 711 } 712 else 713 ret = 0; 714 } 715 else 716 fsi.attrFile = 0; 717 DosError(FERR_DISABLEHARDERR); 718 if (!xDosSetPathInfo(filename, FIL_STANDARD, &fsi, sizeof(fsi), 0)) 719 ret = 0; 720 } 721 } 722 680 723 return ret; 681 724 } … … 772 815 // remove directory 773 816 if (DosDeleteDir(ss)) { 774 make_deleteable(ss ); // Try harder817 make_deleteable(ss, 0); // Try harder 775 818 DosError(FERR_DISABLEHARDERR); 776 819 DosDeleteDir(ss); … … 779 822 } 780 823 else { 781 DosError(FERR_DISABLEHARDERR); 782 if (DosForceDelete(ss)) { 783 make_deleteable(ss); 824 APIRET error; 825 826 DosError(FERR_DISABLEHARDERR); 827 error = DosForceDelete(ss); 828 if (error) { 829 make_deleteable(ss, error); 784 830 DosError(FERR_DISABLEHARDERR); 785 831 rc = (INT) DosForceDelete(ss); … … 884 930 DosError(FERR_DISABLEHARDERR); 885 931 if (DosDelete(string)) { 886 make_deleteable(string );932 make_deleteable(string, -1); 887 933 DosError(FERR_DISABLEHARDERR); 888 934 return DosDelete(string); … … 890 936 } 891 937 else { 938 APIRET error; 939 892 940 DosError(FERR_DISABLEHARDERR); 893 if (DosForceDelete(string)) { 894 make_deleteable(string); 941 error = DosForceDelete(string); 942 if (error) { 943 make_deleteable(string, error); 895 944 DosError(FERR_DISABLEHARDERR); 896 945 return DosForceDelete(string); -
trunk/dll/copyf.h
r1402 r1664 11 11 05 Sep 08 JBS Ticket 187: Refactor FM3DLL.H 12 12 08 Mar 09 GKY Removed variable aurguments from docopyf and unlinkf (not used) 13 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 14 copy, move and delete operations 15 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 16 for delete of readonly files 13 17 14 18 ***********************************************************************/ … … 22 26 BOOL WriteLongName(CHAR * filename, CHAR * longname); 23 27 APIRET docopyf(INT type, CHAR * oldname, CHAR * newname); 24 INT make_deleteable(CHAR * filename );28 INT make_deleteable(CHAR * filename, INT error); 25 29 INT unlinkf(CHAR * string); 26 30 INT wipeallf(CHAR * string, ...); -
trunk/dll/dircnrs.c
r1571 r1664 81 81 entries in the tree container, fix related semaphore performance using 82 82 combination of event and mutex semaphores 83 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 84 copy, move and delete operations 83 85 84 86 ***********************************************************************/ … … 1722 1724 WinEnableMenuItem((HWND) mp2, IDM_ATTRS, TRUE); 1723 1725 } 1726 WinEnableMenuItem((HWND) mp2, IDM_UNLOCKFILE, fUnlock); 1724 1727 } 1725 1728 break; … … 1738 1741 WinEnableMenuItem((HWND) mp2, 1739 1742 IDM_SELECTCOMPAREMENU, 1740 1743 (CountDirCnrs(dcd->hwndParent) > 1)); 1741 1744 break; 1742 1745 … … 2620 2623 case IDM_COLLECTFROMFILE: 2621 2624 case IDM_UUDECODE: 2625 case IDM_UNLOCKFILE: 2622 2626 case IDM_MERGE: 2623 2627 { -
trunk/dll/fm3dlg.h
r1546 r1664 7 7 8 8 Copyright (c) 1993-02 M. Kimes 9 Copyright (c) 2002 , 2008Steven H.Levine9 Copyright (c) 2002-2012 Steven H.Levine 10 10 11 11 15 Oct 02 MK Baseline … … 38 38 27 Dec 09 GKY Made command hotkeys user selectable. 39 39 23 Oct 10 GKY Added button to allow opening of a new file's eas from the EA dialog. 40 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 41 copy, move and delete operations 42 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 43 for delete of readonly files 40 44 41 45 ***********************************************************************/ … … 430 434 #define REN_OVERNEW 22310 431 435 #define REN_RENEXIST 22311 436 #define REN_NOROWARN 22312 432 437 433 438 #define FLE_FRAME 22400 … … 665 670 #define CFGG_ALERTBEEPOFF 25218 666 671 #define CFGG_ERRORBEEPOFF 25219 672 #define CFGG_WARNREADONLY 25220 667 673 668 674 #define CFGB_FRAME 25250 -
trunk/dll/fm3dll2.h
r1547 r1664 33 33 21 Dec 09 GKY Added 20 new hot keys for commands. 34 34 23 Oct 10 GKY Changes to populate and utilize a HELPTABLE for context specific help 35 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 36 copy, move and delete operations 35 37 36 38 Align with spaces only - no tabs please … … 401 403 #define IDM_OPENDIRTREE 1168 402 404 #define IDM_OPENDIRWINDOW 1169 405 #define IDM_UNLOCKFILE 1170 403 406 404 407 #define IDM_UTILITIESMENU 2000 -
trunk/dll/fm3res.dlg
r1637 r1664 52 52 23 Oct 10 GKY Added button to allow opening of a new file's eas from the EA dialog. 53 53 09 Oct 11 GKY Eliminate overlap of check box names; improve readability 54 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 55 for delete of readonly files 54 56 55 57 ***********************************************************************/ … … 623 625 PUSHBUTTON "~Rename existing", REN_RENEXIST, 260, 110, 88, 12 624 626 AUTOCHECKBOX "Overwrite if target ~older or same", REN_OVEROLD, 625 30, 20, 158, 10 626 AUTOCHECKBOX "Overwrite if target ~newer", REN_OVERNEW, 194, 20, 627 152, 10, WS_GROUP 627 4, 20, 100, 10 628 AUTOCHECKBOX "Overwrite if target ~newer", REN_OVERNEW, 110, 20, 629 80, 10, WS_GROUP 630 AUTOCHECKBOX "Overwrite if target is readonly (no warning)", REN_NOROWARN, 200, 20, 631 140, 10, WS_GROUP 628 632 DEFPUSHBUTTON "Okay", DID_OK, 4, 4, 40, 14, BS_NOPOINTERFOCUS | 629 633 WS_GROUP … … 2779 2783 LTEXT "Target directory:", -1, 4, 34, 102, 8 2780 2784 ENTRYFIELD "", CFGG_TARGETDIR, 6, 22, 246, 8, ES_MARGIN 2785 AUTOCHECKBOX "~Warn if file is readonly", CFGG_WARNREADONLY, 122, 140, 106, 2786 10 2781 2787 AUTOCHECKBOX "~Link drag sets icon", CFGG_LINKSETSICON, 122, 128, 106, 2782 2788 10 -
trunk/dll/fm3res.rc
r1604 r1664 59 59 23 Oct 10 GKY Changes to populate and utilize a HELPTABLE for context specific help. 60 60 21 Nov 10 GKY Check if archiver.bb2 has been changed on disk before editing 61 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 62 copy, move and delete operations 61 63 62 64 ***********************************************************************/ … … 1270 1272 } 1271 1273 MENUITEM "", -1, MIS_SEPARATOR 1274 MENUITEM "Make ~directory...\tCtrl + M",IDM_MKDIR 1275 MENUITEM "", -1, MIS_SEPARATOR 1272 1276 MENUITEM "Archive...\tCtrl + A",IDM_ARCHIVE 1273 MENUITEM "Make ~directory...\tCtrl + M",IDM_MKDIR1274 1277 MENUITEM "Extract...\tCtrl + x",IDM_EXTRACT 1275 1278 MENUITEM "UUDecode...\tCtrl + U", IDM_UUDECODE 1279 MENUITEM "UnLock file", IDM_UNLOCKFILE 1276 1280 MENUITEM "", -1, MIS_SEPARATOR 1277 1281 SUBMENU "~Delete", IDM_DELETESUBMENU … … 1563 1567 MENUITEM "Extract...\tCtrl + x", IDM_EXTRACT 1564 1568 MENUITEM "UUDecode...\tCtrl + U", IDM_UUDECODE 1569 MENUITEM "UnLock file", IDM_UNLOCKFILE 1565 1570 MENUITEM "", -1, MIS_SEPARATOR 1566 1571 SUBMENU "~Delete", IDM_DELETESUBMENU … … 2157 2162 MENUITEM "Extract from selected...\tCtrl + x",IDM_EXTRACT 2158 2163 MENUITEM "UUDecode selected...\tCtrl + U",IDM_UUDECODE 2164 MENUITEM "UnLock file", IDM_UNLOCKFILE 2159 2165 MENUITEM "Co~llect selected\tCtrl + C", IDM_COLLECT 2160 2166 MENUITEM "Save full path(s) to ~clipboard\tCtrl + [",IDM_SAVETOCLIP … … 2237 2243 MENUITEM "Extract from selected...\tCtrl + x",IDM_EXTRACT 2238 2244 MENUITEM "UUDecode selected...\tCtrl + U",IDM_UUDECODE 2245 MENUITEM "UnLock file", IDM_UNLOCKFILE 2239 2246 MENUITEM "Co~llect selected\tCtrl + C", IDM_COLLECT 2240 2247 MENUITEM "Save full path(s) to ~clipboard\tCtrl + [",IDM_SAVETOCLIP … … 3358 3365 IDS_DOSQAPPTYPEFAILEDTEXT2 "The program %s was not found on the PATH or is not an executible file type." 3359 3366 IDS_DOSQAPPTYPEFAILEDTEXT3 "The drive specified in %s is locked or invalid." 3360 3367 IDS_LOCKEDFILEWARNING "The file %s is locked! Do you wish to unlock it and complete the requested operation" 3368 IDS_LOCKEDFILEWARNINGTITLE "Locked file!" 3369 IDS_READONLYFILEWARNING "The file %s is Read Only! Do you wish continue the requested operation" 3370 IDS_READONLYFILEWARNINGTITLE "Read Only file!" 3371 3361 3372 // Add strings that need to be combined by GetPString here 3362 3373 IDS_SUGGEST1TEXT1 "Based on this scan of your drives, I would like to suggest the following parameters for your FM/2 program object (each letter following the '/' character is a drive that probably should be excluded from viewing by FM/2 (see README), and the '%%*' on the" -
trunk/dll/fm3str.h
r1604 r1664 42 42 27 Dec 09 GKY Added IDS_DUPLICATEHOTKEYTEXT for command.c changes 43 43 21 Nov 10 GKY Check if archiver.bb2 has been changed on disk before editing 44 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 45 copy, move and delete operations 46 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 47 for delete of readonly files 44 48 45 49 ***********************************************************************/ … … 1024 1028 #define IDS_DOSQAPPTYPEFAILEDTEXT2 1018 1025 1029 #define IDS_DOSQAPPTYPEFAILEDTEXT3 1019 1030 #define IDS_LOCKEDFILEWARNING 1020 1031 #define IDS_LOCKEDFILEWARNINGTITLE 1021 1032 #define IDS_READONLYFILEWARNING 1022 1033 #define IDS_READONLYFILEWARNINGTITLE 1023 1026 1034 1027 1035 //The following strings were cut up form the string of the root name (ie IDS_SUGGEST1TEXT) -
trunk/dll/init.c
r1654 r1664 109 109 22 Oct 11 GKY Thread notes dialog now reopens on startup if it was open on shutdown. 110 110 08 Jan 12 GKY Add support for changing PresParams in the notify status window 111 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 112 copy, move and delete operations 113 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 114 for delete of readonly files 111 115 112 116 ***********************************************************************/ … … 267 271 PCSZ PCSZ_FDISKPMEXE = "FDISKPM.EXE"; 268 272 PCSZ PCSZ_LVMEXE = "LVM.EXE"; 273 PCSZ PCSZ_UNLOCKEXE = "UNLOCK.EXE"; 269 274 PCSZ PCSZ_ARCCNR = "ArcCnr"; 270 275 PCSZ PCSZ_COLLECTOR = "Collector"; … … 1163 1168 fAutoAddDirs = fUseNewViewer = fDataToFore = fDataShowDrives = fDataMin = 1164 1169 fSplitStatus = fDragndropDlg = fQuickArcFind = fKeepCmdLine = 1165 fMoreButtons = fDrivebar = fCollapseFirst = fSwitchTree = 1170 fMoreButtons = fDrivebar = fCollapseFirst = fSwitchTree = fWarnReadOnly = 1166 1171 fSwitchTreeExpand = fNoSearch = fCustomFileDlg = fOtherHelp = 1167 1172 fSaveMiniCmds = fUserComboBox = fFM2Deletes = fConfirmTarget = … … 1221 1226 if (!xDosQueryAppType(PCSZ_LVMEXE, &ulAppType)) 1222 1227 fLVM = TRUE; 1228 1229 //Check for unlock.exe 1230 if (!xDosQueryAppType(PCSZ_UNLOCKEXE, &ulAppType)) 1231 fUnlock = TRUE; 1223 1232 1224 1233 // Check to see if we are running protect only … … 1493 1502 size = sizeof(BOOL); 1494 1503 PrfQueryProfileData(fmprof, appname, "LinkSetsIcon", &fLinkSetsIcon, &size); 1504 size = sizeof(BOOL); 1505 PrfQueryProfileData(fmprof, appname, "WarnReadOnly", &fWarnReadOnly, &size); 1495 1506 size = sizeof(INT); 1496 1507 PrfQueryProfileData(fmprof, appname, "Sort", &sortFlags, &size); -
trunk/dll/init.h
r1654 r1664 29 29 combination of event and mutex semaphores 30 30 08 Jan 12 GKY Add support for changing PresParams in the notify status window 31 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 32 copy, move and delete operations 33 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 34 for delete of readonly files 31 35 32 36 ***********************************************************************/ … … 59 63 extern PCSZ PCSZ_IMAGEEXE; 60 64 extern PCSZ PCSZ_LVMEXE; 65 extern PCSZ PCSZ_UNLOCKEXE; 61 66 extern PCSZ PCSZ_ARCCNR; 62 67 extern PCSZ PCSZ_COLLECTOR; -
trunk/dll/ipf/fm3.ipf
r1518 r1664 12 12 .* 01 Sep 08 GKY Change User-defined bmp (renamed) checkbox info to better describe what it does 13 13 .* 29 Apr 09 SHL Start usinging nameits to ensure standard formatting 14 .* 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 15 .* copy, move and delete operations 14 16 .* 15 17 .*********************************************************************** … … 683 685 1153 WPS Copy Files/Directories Y 684 686 1154 Set Target Directory N 687 1170 Unlock Files Y 685 688 2001 View INI Files Y 686 689 2003 Kill Process N -
trunk/dll/ipf/notebook.ipf
r1493 r1664 20 20 .* 13 Dec 09 GKY Updated Quick page "Default" to match current defaults; added Gregg's way 21 21 .* option to Quick page. 22 .* 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 23 .* for delete of readonly files 22 24 .* 23 25 .*********************************************************************** … … 656 658 from one dialog, so it has minimal impact and provides a safety net. 657 659 :p. 660 :hp6.Warn if file is readonly:ehp6. If selected a warning dialog will 661 appear when you attempt to delete a readonly file or copy/move a file 662 over a readony file. Otherwise the file will be deleted/overwritten which 663 is what FM/2 always did for delete but not for copy/move which failed with 664 an error message. 665 :p. 658 666 The :hp6.Verify disk writes:ehp6. toggle turns system-level write 659 667 verification on and off. This is like typing :link reftype=launch -
trunk/dll/ipf/rename.ipf
r1419 r1664 1 .*********************************************************************** 2 .* 3 .* $Id$ 4 .* 5 .* fm/2 help - Configuration dialogs usage 6 .* 7 .* Copyright (c) 1993-98 M. Kimes 8 .* Copyright (c) 2002-2012 Steven H.Levine 9 .* 10 .* 11 .* 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 12 .* for delete of readonly files 13 .* 14 .*********************************************************************** 15 .* 1 16 :h2 res=91400 name=PANEL_RENAME.Renaming 2 17 :i1 id=aboutRenaming.Renaming … … 42 57 :p. 43 58 The :hp1.Overwrite if target older or same:ehp1., :hp1. Overwrite if 44 target newer:ehp1. and :hp1.Don't ask again:ehp1. checkboxes can be used 45 in combination to avoid seeing this screen again for naming conflicts. 59 target newer:ehp1. :hp1.Overwrite if target is readonly (no warning):ehp1. and 60 :hp1.Don't ask again:ehp1. checkboxes can be used in combination to avoid seeing 61 this screen again for naming conflicts and to supress to readonly warning dialog 62 (it just overwrites the readonly files). 46 63 Files which have existing targets that do not match an overwrite 47 64 characteristic will be automatically skipped. For example, if you don't -
trunk/dll/notebook.c
r1574 r1664 62 62 24 OCT 10 GKY Fixed spurious error message when labels in tree are changed with a 63 63 "not ready" drive selected 64 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 65 for delete of readonly files 64 66 65 67 ***********************************************************************/ … … 188 190 BOOL fVerify; 189 191 BOOL fViewChild; 192 BOOL fWarnReadOnly; 190 193 HINI fmprof; 191 194 ULONG fwsAnimate; … … 1551 1554 WinCheckButton(hwnd, CFGG_ERRORBEEPOFF, fErrorBeepOff); 1552 1555 WinCheckButton(hwnd, CFGG_ALERTBEEPOFF, fAlertBeepOff); 1556 WinCheckButton(hwnd, CFGG_WARNREADONLY, fWarnReadOnly); 1553 1557 { 1554 1558 long th = fNoFinger ? 2 : (fNoDead ? 1 : 0); … … 1675 1679 fErrorBeepOff = WinQueryButtonCheckstate(hwnd, CFGG_ERRORBEEPOFF); 1676 1680 PrfWriteProfileData(fmprof, appname, "ErrorBeepOff", 1677 &fErrorBeepOff, sizeof(BOOL)); 1681 &fErrorBeepOff, sizeof(BOOL)); 1682 fWarnReadOnly = WinQueryButtonCheckstate(hwnd, CFGG_WARNREADONLY); 1683 PrfWriteProfileData(fmprof, appname, "WarnReadOnly", 1684 &fWarnReadOnly, sizeof(BOOL)); 1678 1685 { 1679 1686 WinSendDlgItemMsg(hwnd, CFGG_CMDLNLNGTH, SPBM_QUERYVALUE, -
trunk/dll/notebook.h
r1434 r1664 16 16 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 17 17 06 Jun 09 GKY Add option to show file system type or drive label in tree 18 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 19 for delete of readonly files 18 20 19 21 ***********************************************************************/ … … 110 112 extern BOOL fVerify; 111 113 extern BOOL fViewChild; 114 extern BOOL fWarnReadOnly; 112 115 extern HINI fmprof; 113 116 extern ULONG fwsAnimate; -
trunk/dll/rename.c
r1545 r1664 20 20 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 21 21 23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code 22 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 23 for delete of readonly files 22 24 23 25 ***********************************************************************/ … … 87 89 WinShowWindow(WinWindowFromID(hwnd, REN_OVEROLD), FALSE); 88 90 WinShowWindow(WinWindowFromID(hwnd, REN_OVERNEW), FALSE); 91 WinShowWindow(WinWindowFromID(hwnd, REN_NOROWARN), FALSE); 89 92 } 90 93 break; … … 310 313 mv->overold = TRUE; 311 314 if (WinQueryButtonCheckstate(hwnd, REN_OVERNEW)) 312 mv->overnew = TRUE; 315 mv->overnew = TRUE; 316 if (WinQueryButtonCheckstate(hwnd,REN_NOROWARN)) 317 mv->noreadonlywarn = TRUE; 313 318 *mv->target = 0; 314 319 WinQueryDlgItemText(hwnd, REN_TARGET, CCHMAXPATH, mv->target); -
trunk/dll/seeall.c
r1559 r1664 51 51 17 Jan 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 52 52 01 Dec 10 SHL Ensure FindAllThread thread quits fast when requested 53 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 54 copy, move and delete operations 55 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 56 for delete of readonly files 53 57 54 58 ***********************************************************************/ … … 870 874 for (x = 0; list[x]; x++) 871 875 UUD(list[x], NULL); 872 break; 876 break; 877 878 case IDM_UNLOCKFILE: 879 for (x = 0; list[x]; x++) { 880 if (IsFile(list[x]) > 0 && fUnlock) { 881 runemf2(SEPARATE | INVISIBLE | BACKGROUND | WAIT, 882 HWND_DESKTOP, pszSrcFile, __LINE__, 883 NULL, NULL, "%s %s", PCSZ_UNLOCKEXE, list[x]); 884 } 885 } 886 break; 873 887 874 888 case IDM_EXTRACT: … … 1077 1091 if (error) { 1078 1092 DosError(FERR_DISABLEHARDERR); 1079 make_deleteable(list[x] );1093 make_deleteable(list[x], error); 1080 1094 if (SHORT1FROMMP(mp1) == IDM_DELETE) 1081 1095 error = DosDelete(list[x]); … … 3387 3401 pAD->selected != 0)); 3388 3402 WinEnableMenuItem(pAD->hwndPopup, IDM_UUDECODE, (rc == 0 && 3403 pAD->selected != 0)); 3404 WinEnableMenuItem(pAD->hwndPopup, IDM_UNLOCKFILE, (rc == 0 && fUnlock && 3389 3405 pAD->selected != 0)); 3390 3406 WinEnableMenuItem(pAD->hwndPopup, IDM_EXTRACT, (rc == 0 && … … 3862 3878 (rc == 0 && pAD->selected != 0)); 3863 3879 WinEnableMenuItem((HWND) mp2, IDM_UUDECODE, 3864 (rc == 0 && pAD->selected != 0)); 3880 (rc == 0 && pAD->selected != 0)); 3881 WinEnableMenuItem((HWND) mp2, IDM_UNLOCKFILE, 3882 (rc == 0 && fUnlock && pAD->selected != 0)); 3865 3883 WinEnableMenuItem((HWND) mp2, IDM_EXTRACT, 3866 3884 (rc == 0 && pAD->selected != 0)); … … 4216 4234 case IDM_EXTRACT: 4217 4235 case IDM_UUDECODE: 4236 case IDM_UNLOCKFILE: 4218 4237 case IDM_SHADOW: 4219 4238 case IDM_OBJECT: … … 4275 4294 case IDM_OPENSETTINGS: 4276 4295 case IDM_OPENDEFAULT: 4277 case IDM_UUDECODE: 4296 case IDM_UUDECODE: 4297 case IDM_UNLOCKFILE: 4278 4298 { 4279 4299 CHAR **list = BuildAList(hwnd); … … 4307 4327 case IDM_ARCHIVE: 4308 4328 case IDM_EXTRACT: 4309 case IDM_UUDECODE: 4329 case IDM_UUDECODE: 4330 case IDM_UNLOCKFILE: 4310 4331 case IDM_OBJECT: 4311 4332 case IDM_SHADOW: -
trunk/dll/worker.c
r1646 r1664 49 49 by temp file creation failures. 50 50 12 Nov 11 GKY Fixed extract failure caused by spaces in the arc file name. 51 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 52 copy, move and delete operations 53 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 54 for delete of readonly files 51 55 52 56 ***********************************************************************/ … … 118 122 #pragma data_seg(GLOBAL2) 119 123 FILE *LogFileHandle; 124 BOOL fUnlock; 120 125 121 126 #pragma data_seg(DATA2) … … 222 227 UINT x; 223 228 BOOL dontask = FALSE, wildcarding = FALSE, overold = 224 FALSE, overnew = FALSE, usedtarget;229 FALSE, overnew = FALSE, noreadonlywarn = FALSE, usedtarget; 225 230 226 231 WinCancelShutdown(hmq2, TRUE); … … 455 460 } 456 461 } 457 break; 462 break; 463 464 case IDM_UNLOCKFILE: 465 runemf2(SEPARATE | KEEP | WINDOWED//| INVISIBLE | BACKGROUND 466 | WAIT, 467 HWND_DESKTOP, pszSrcFile, __LINE__, 468 NULL, NULL, "%s %s", PCSZ_UNLOCKEXE, wk->li->list[x]); 469 break; 458 470 459 471 case IDM_VIEWARCHIVE: … … 707 719 // Target OK so far 708 720 CHAR newname[CCHMAXPATH]; 709 APIRET rc; 721 APIRET rc; 722 INT ret; 710 723 FILESTATUS4L fs4; 711 724 BOOL isnewer; … … 793 806 overold = TRUE; 794 807 if (mv.overnew) 795 overnew = TRUE; 808 overnew = TRUE; 809 if (mv.noreadonlywarn) 810 noreadonlywarn = TRUE; 796 811 if (wildcarding || wk->li->type == IDM_RENAME) { 797 812 p = strrchr(mv.target, '\\'); … … 856 871 priority_idle(); 857 872 858 rc = docopyf(type, wk->li->list[x], newname); 873 rc = docopyf(type, wk->li->list[x], newname); 874 if (rc == ERROR_ACCESS_DENIED || rc == ERROR_SHARING_VIOLATION) { 875 if (rc == ERROR_ACCESS_DENIED && noreadonlywarn) 876 rc = -1; 877 ret = make_deleteable(newname, rc); 878 rc = docopyf(type, wk->li->list[x], newname); 879 } 880 if (!ret && (rc == ERROR_ACCESS_DENIED || (rc == ERROR_SHARING_VIOLATION && fUnlock))) 881 rc = NO_ERROR; 882 //if (fTurnOffReadOnly) 883 // make_deleteable(newname, rc); 859 884 if (fResetVerify) { 860 885 DosSetVerify(fVerify); 861 886 fResetVerify = FALSE; 862 887 } 863 888 priority_normal(); 864 889 if (rc) { 865 890 if ((rc == ERROR_DISK_FULL || … … 1715 1740 if (error) { 1716 1741 DosError(FERR_DISABLEHARDERR); 1717 make_deleteable(wk->li->list[x] );1742 make_deleteable(wk->li->list[x], error); 1718 1743 if (wk->li->type == IDM_DELETE){ 1719 1744 hObjectdest = WinQueryObject("<XWP_TRASHCAN>"); -
trunk/dll/worker.h
r1455 r1664 11 11 05 Sep 08 JBS Ticket 187: Refactor FM3DLL.H 12 12 14 Sep 09 SHL Drop experimental code 13 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 14 copy, move and delete operations 15 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 16 for delete of readonly files 13 17 14 18 ***********************************************************************/ … … 30 34 BOOL overnew; 31 35 BOOL overwrite; 36 BOOL noreadonlywarn; 32 37 } 33 38 MOVEIT; … … 48 53 // Data declarations 49 54 extern FILE *LogFileHandle; 55 extern BOOL fUnlock; 50 56 51 57 VOID Action(VOID * args); -
trunk/fm3.rc
r1444 r1664 21 21 and rescans drive in tree container depending on container focus, greyed out 22 22 inappropriate menu context choices 23 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 24 copy, move and delete operations 23 25 24 26 ***********************************************************************/ … … 138 140 BITMAP IDM_WPSMOVE bitmaps\WPSMOVEB.BMP 139 141 BITMAP IDM_UUDECODE bitmaps\UDECODE.BMP 142 BITMAP IDM_UNLOCKFILE bitmaps\UNLOCK.BMP 140 143 141 144 #define AUTHOR_PICTURE 26102 /* fm3dlg.h */ -
trunk/fm4.rc
r1444 r1664 19 19 and rescans drive in tree container depending on container focus, greyed out 20 20 inappropriate menu context choices 21 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 22 copy, move and delete operations 21 23 22 24 ***********************************************************************/ … … 136 138 BITMAP IDM_WPSMOVE bitmaps\WPSMOVEB.BMP 137 139 BITMAP IDM_UUDECODE bitmaps\UDECODE.BMP 140 BITMAP IDM_UNLOCKFILE bitmaps\UNLOCK.BMP 138 141 139 142 #define AUTHOR_PICTURE 26102 /* fm3dlg.h */
Note:
See TracChangeset
for help on using the changeset viewer.