Changeset 1722
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/copyf.c
r1712 r1722 36 36 09 Feb 14 GKY Modified wipeallf to allow suppression of the readonly warning on delete 37 37 of temporary files 38 16 Feb 14 GKY Rework readonly check on delete code so it actually works in a logical way 39 and so it works with move to trashcan inabled. 38 40 39 41 ***********************************************************************/ … … 544 546 error = DosForceDelete(dir); 545 547 if (error) { 546 make_deleteable(dir, error, FALSE);548 make_deleteable(dir, error, TRUE); 547 549 DosForceDelete(dir); 548 550 } … … 691 693 if (fsi.attrFile & 0x00000001) { 692 694 if (fWarnReadOnly && !Dontcheckreadonly) { 693 retrn = saymsg2(NULL, 0, 694 HWND_DESKTOP, 695 GetPString(IDS_READONLYFILEWARNINGTITLE), 696 GetPString(IDS_READONLYFILEWARNING), 697 filename); 698 if (retrn == 3) 699 ret = 3; 700 else if (retrn == 4) 701 ret = 2; 702 else { 703 fsi.attrFile = 0; 704 DosError(FERR_DISABLEHARDERR); 705 if (!xDosSetPathInfo(filename, FIL_STANDARD, &fsi, sizeof(fsi), 0)) 706 if (retrn == 1) 707 ret = 0; 708 else 709 ret = 1; 710 } 711 } 712 else 695 retrn = saymsg2(NULL, 3, 696 HWND_DESKTOP, 697 GetPString(IDS_READONLYFILEWARNINGTITLE), 698 GetPString(IDS_READONLYFILEWARNING), 699 filename); 700 //DbgMsg(pszSrcFile, __LINE__, "retrn %x ", retrn); 701 ret = retrn; 702 if (retrn == SM2_YES || retrn == SM2_DONTASK) 703 fsi.attrFile = 0; 704 DosError(FERR_DISABLEHARDERR); 705 if (xDosSetPathInfo(filename, FIL_STANDARD, &fsi, sizeof(fsi), 0)) 706 ret = -1; // failed 707 } 708 else { 713 709 fsi.attrFile = 0; 714 710 DosError(FERR_DISABLEHARDERR); 715 711 if (!xDosSetPathInfo(filename, FIL_STANDARD, &fsi, sizeof(fsi), 0)) 716 712 ret = 0; 713 } 717 714 } 718 715 } … … 729 726 } 730 727 } 731 728 //DbgMsg(pszSrcFile, __LINE__, "retrn %x ", ret); 732 729 return ret; 733 730 } … … 839 836 840 837 retrn = make_deleteable(ss, error, ignorereadonly); 841 if (retrn == 3)838 if (retrn == SM2_NO) 842 839 continue; 843 else if (retrn == 1)840 else if (retrn == SM2_DONTASK) 844 841 ignorereadonly = TRUE; 842 else if (retrn == SM2_CANCEL) 843 break; 845 844 DosError(FERR_DISABLEHARDERR); 846 845 rc = (INT) DosForceDelete(ss); … … 953 952 else { 954 953 APIRET error; 954 INT ret; 955 955 956 956 DosError(FERR_DISABLEHARDERR); 957 957 error = DosForceDelete(string); 958 958 if (error) { 959 make_deleteable(string, error, FALSE); 959 ret = make_deleteable(string, error, FALSE); 960 if (ret == SM2_CANCEL || ret == SM2_NO) 961 return 0; 960 962 DosError(FERR_DISABLEHARDERR); 961 963 return DosForceDelete(string); -
trunk/dll/errutil.c
r1718 r1722 40 40 07 Nov 13 SHL Update comments 41 41 15 Feb 14 GKY Improvements to saymsg2 some code cleanup 42 16 Feb 14 GKY Rework readonly check on delete code so it actually works in a logical way 43 and so it works with move to trashcan inabled. 42 44 43 45 ***********************************************************************/ … … 60 62 #include "init.h" // Data declares 61 63 #include "wrappers.h" // xmallocz 64 #include "fm3dll2.h" 62 65 63 66 #pragma data_seg(DATA1) … … 398 401 strcpy(mb2dBut[2].achText,GetPString(IDS_MB2DNO)); 399 402 strcpy(mb2dBut[3].achText,GetPString(IDS_MB2DCANCELOP)); 400 mb2dBut[0].idButton = 1;401 mb2dBut[1].idButton = 2;402 mb2dBut[2].idButton = 3;403 mb2dBut[3].idButton = 4;403 mb2dBut[0].idButton = SM2_YES; 404 mb2dBut[1].idButton = SM2_DONTASK; 405 mb2dBut[2].idButton = SM2_NO; 406 mb2dBut[3].idButton = SM2_CANCEL; 404 407 if (DefaultButton) 405 408 mb2dBut[DefaultButton - 1].flStyle = BS_DEFAULT; … … 409 412 pmbInfo->hIcon = 0; 410 413 pmbInfo->cButtons = 4; 411 pmbInfo->flStyle = MB_MOVEABLE | MB_ SYSTEMMODAL | MB_ICONQUESTION ;414 pmbInfo->flStyle = MB_MOVEABLE | MB_ICONQUESTION ; 412 415 pmbInfo->hwndNotify = NULLHANDLE; 413 416 for (i = 0; i < 4; i++) { … … 415 418 } 416 419 rc = WinMessageBox2(HWND_DESKTOP, hwnd, 417 szMsg, pszTitle, 1234,420 szMsg, pszTitle, SM2_DIALOG, 418 421 pmbInfo); 422 WinSetFocus(HWND_DESKTOP, SM2_DIALOG); 419 423 free(pmbInfo); 420 424 return rc; -
trunk/dll/fm3dll2.h
r1682 r1722 36 36 copy, move and delete operations 37 37 06 Jan 13 GKY Added EA compare option to compare dir Ticket 80 38 15 Feb 14 GKY Improvements to saymsg2 some code cleanup 39 16 Feb 14 GKY Rework readonly check on delete code so it actually works in a logical way 40 and so it works with move to trashcan inabled. 38 41 39 42 Align with spaces only - no tabs please … … 406 409 #define IDM_UNLOCKFILE 1170 407 410 411 #define SM2_DIALOG 1234 412 #define SM2_YES 1 413 #define SM2_CANCEL 2 414 #define SM2_NO 3 415 #define SM2_DONTASK 4 416 408 417 #define IDM_UTILITIESMENU 2000 409 418 #define IDM_INIVIEWER 2001 -
trunk/dll/seeall.c
r1712 r1722 59 59 09 Feb 14 GKY Modified wipeallf to allow suppression of the readonly warning on delete 60 60 of temporary files 61 16 Feb 14 GKY Rework readonly check on delete code so it actually works in a logical way 62 and so it works with move to trashcan inabled. 61 63 62 64 ***********************************************************************/ … … 1098 1100 DosError(FERR_DISABLEHARDERR); 1099 1101 retrn = make_deleteable(list[x], error, ignorereadonly); 1100 if (retrn == 2)1102 if (retrn == SM2_CANCEL) 1101 1103 break; 1102 if (retrn == 1)1104 if (retrn == SM2_DONTASK) 1103 1105 ignorereadonly = TRUE; 1104 if (retrn == 3)1106 if (retrn == SM2_NO) 1105 1107 continue; 1106 1108 if (SHORT1FROMMP(mp1) == IDM_DELETE)
Note:
See TracChangeset
for help on using the changeset viewer.