Changeset 672
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r630 r672 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 6Steven H. Levine9 Copyright (c) 2001, 2007 Steven H. Levine 10 10 11 11 11 Jun 02 SHL Ensure archive name not garbage … … 37 37 20 Apr 07 SHL Sync with NumItemsToUnhilite mods 38 38 21 Apr 07 GKY Find FM2Utils by path or utils directory 39 12 May 07 SHL Use dcd->ulItemsToUnHilite; sync with UnHilite arg mods 39 40 40 41 ***********************************************************************/ … … 1118 1119 { 1119 1120 DIRCNRDATA *dcd; 1121 DIRCNRDATA *dcdsrc; 1120 1122 PSZ psz; 1121 1123 … … 1133 1135 li = DoFileDrop(dcd->hwndCnr, 1134 1136 dcd->directory, FALSE, MPVOID, MPFROMP(&cni)); 1135 if (NumItemsToUnhilite) 1136 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 1137 hwnd, 1138 GetPString(IDS_ERRORTEXT), 1139 GetPString(IDS_EXCEEDPMDRGLMT)); 1137 dcdsrc = INSTDATA(cni.pDragInfo->hwndSource); 1138 if (dcdsrc->ulItemsToUnHilite) { 1139 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 1140 hwnd, 1141 GetPString(IDS_ERRORTEXT), 1142 GetPString(IDS_EXCEEDPMDRGLMT)); 1143 } 1144 1140 1145 if (li) { 1141 1146 li->type = (msg == DM_DISCARDOBJECT) ? IDM_DELETE : IDM_PRINT; … … 1936 1941 MPARAM mp2) 1937 1942 { 1938 DIRCNRDATA *dcd = WinQueryWindowPtr(hwnd, QWL_USER); 1943 DIRCNRDATA *dcd = INSTDATA(hwnd); 1944 DIRCNRDATA *dcdsrc; 1939 1945 1940 1946 switch (msg) { … … 2374 2380 DefaultViewKeys(hwnd, dcd->hwndFrame, dcd->hwndParent, &swp, filename); 2375 2381 if (fUnHilite) 2376 UnHilite(hwnd, FALSE, &dcd->lastselection );2382 UnHilite(hwnd, FALSE, &dcd->lastselection, 0); 2377 2383 } 2378 2384 return 0; … … 2895 2901 } 2896 2902 else if (fUnHilite && SHORT1FROMMP(mp1) != IDM_EDIT) 2897 UnHilite(hwnd, TRUE, &dcd->lastselection );2903 UnHilite(hwnd, TRUE, &dcd->lastselection, 0); 2898 2904 } 2899 2905 else … … 3007 3013 dcd->hwndObject, 3008 3014 mp2, dcd->arcname, NULL, TRUE)) { 3009 if ((fUnHilite && wasemphasized) || NumItemsToUnhilite)3010 UnHilite(hwnd, TRUE, &dcd->lastselection );3015 if ((fUnHilite && wasemphasized) || dcd->ulItemsToUnHilite) 3016 UnHilite(hwnd, TRUE, &dcd->lastselection, dcd->ulItemsToUnHilite); 3011 3017 } 3012 3018 if (!ParentIsDesktop(hwnd, dcd->hwndParent) && … … 3037 3043 li = DoFileDrop(hwnd, dcd->arcname, FALSE, mp1, mp2); 3038 3044 DosBeep(50, 100); // fixme to know why beep? 3039 if (NumItemsToUnhilite) 3045 dcdsrc = INSTDATA(((PCNRDRAGINFO)mp2)->pDragInfo->hwndSource); 3046 if (dcdsrc->ulItemsToUnHilite) { 3040 3047 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 3041 hwnd, 3042 GetPString(IDS_ERRORTEXT), 3043 GetPString(IDS_EXCEEDPMDRGLMT)); 3048 hwnd, 3049 GetPString(IDS_ERRORTEXT), 3050 GetPString(IDS_EXCEEDPMDRGLMT)); 3051 } 3044 3052 if (li) { 3045 3053 li->type = li->type == DO_MOVE ? IDM_ARCHIVEM : IDM_ARCHIVE; -
trunk/dll/collect.c
r618 r672 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2003, 200 6Steven H. Levine9 Copyright (c) 2003, 2007 Steven H. Levine 10 10 11 11 15 Oct 02 MK Baseline … … 34 34 06 Apr 07 GKY Add some error checking in drag/drop 35 35 19 Apr 07 SHL Use FreeDragInfoData. Add more drag/drop error checks. 36 12 May 07 SHL Use dcd->ulItemsToUnHilite 36 37 37 38 ***********************************************************************/ … … 443 444 ULONG size; 444 445 DIRCNRDATA *dcd; 446 DIRCNRDATA *dcdsrc; 445 447 446 448 switch (msg) { … … 460 462 cni.pDragInfo = (PDRAGINFO) mp1; 461 463 li = DoFileDrop(dcd->hwndCnr, NULL, FALSE, MPVOID, MPFROMP(&cni)); 462 if (NumItemsToUnhilite) 464 dcdsrc = INSTDATA(cni.pDragInfo->hwndSource); 465 if (dcdsrc->ulItemsToUnHilite) { 463 466 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 464 hwnd, 465 GetPString(IDS_ERRORTEXT), 466 GetPString(IDS_EXCEEDPMDRGLMT)); 467 hwnd, 468 GetPString(IDS_ERRORTEXT), 469 GetPString(IDS_EXCEEDPMDRGLMT)); 470 } 467 471 if (li) { 468 li->type = (fDefaultDeletePerm)? IDM_PERMDELETE : IDM_DELETE;472 li->type = fDefaultDeletePerm ? IDM_PERMDELETE : IDM_DELETE; 469 473 if (!PostMsg(hwnd, UM_MASSACTION, MPFROMP(li), MPVOID)) 470 474 FreeListInfo(li); … … 912 916 MPARAM mp2) 913 917 { 914 DIRCNRDATA *dcd = WinQueryWindowPtr(hwnd, QWL_USER); 918 DIRCNRDATA *dcd = INSTDATA(hwnd); 919 DIRCNRDATA *dcdsrc; 915 920 ULONG size; 916 921 … … 2011 2016 } 2012 2017 else if (fUnHilite) 2013 UnHilite(hwnd, TRUE, &dcd->lastselection );2018 UnHilite(hwnd, TRUE, &dcd->lastselection, dcd->ulItemsToUnHilite); 2014 2019 } 2015 2020 else … … 2031 2036 RunCommand(hwnd, x); 2032 2037 if (fUnHilite) 2033 UnHilite(hwnd, TRUE, &dcd->lastselection );2038 UnHilite(hwnd, TRUE, &dcd->lastselection, dcd->ulItemsToUnHilite); 2034 2039 } 2035 2040 } … … 2243 2248 GetPString(IDS_DRAGFILEOBJTEXT)); 2244 2249 if (DoFileDrag(hwnd, dcd->hwndObject, mp2, NULL, NULL, TRUE)) { 2245 if ((fUnHilite && wasemphasized) || NumItemsToUnhilite)2246 UnHilite(hwnd, TRUE, &dcd->lastselection );2250 if ((fUnHilite && wasemphasized) || dcd->ulItemsToUnHilite) 2251 UnHilite(hwnd, TRUE, &dcd->lastselection, dcd->ulItemsToUnHilite); 2247 2252 } 2248 2253 if (hwndStatus2) … … 2259 2264 2260 2265 li = DoFileDrop(hwnd, NULL, TRUE, mp1, mp2); 2261 if (NumItemsToUnhilite) 2266 dcdsrc = INSTDATA(((PCNRDRAGINFO)mp2)->pDragInfo->hwndSource); 2267 if (dcdsrc->ulItemsToUnHilite) { 2262 2268 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 2263 hwnd, 2264 GetPString(IDS_ERRORTEXT), 2265 GetPString(IDS_EXCEEDPMDRGLMT)); 2269 hwnd, 2270 GetPString(IDS_ERRORTEXT), 2271 GetPString(IDS_EXCEEDPMDRGLMT)); 2272 } 2266 2273 if (li) { 2267 2274 if (!*li->targetpath) { -
trunk/dll/dircnrs.c
r618 r672 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 6Steven H. Levine9 Copyright (c) 2001, 2007 Steven H. Levine 10 10 11 11 16 Oct 02 SHL Handle large partitions … … 25 25 06 Apr 07 GKY Add some error checking in drag/drop 26 26 19 Apr 07 SHL Use FreeDragInfoData. Add more drag/drop error checking. 27 12 May 07 SHL Use dcd->ulItemsToUnHilite; sync with UnHilite arg mods 27 28 28 29 ***********************************************************************/ … … 570 571 { 571 572 DIRCNRDATA *dcd; 573 DIRCNRDATA *dcdsrc; 572 574 573 575 switch (msg) { … … 587 589 cni.pRecord = NULL; 588 590 cni.pDragInfo = (PDRAGINFO) mp1; 591 DbgMsg(pszSrcFile, __LINE__, "calling DoFileDrop"); 589 592 li = 590 593 DoFileDrop(dcd->hwndCnr, dcd->directory, FALSE, MPVOID, 591 594 MPFROMP(&cni)); 592 if (NumItemsToUnhilite) 595 dcdsrc = INSTDATA(cni.pDragInfo->hwndSource); 596 if (dcdsrc->ulItemsToUnHilite) { 593 597 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 594 hwnd, 595 GetPString(IDS_ERRORTEXT), 596 GetPString(IDS_EXCEEDPMDRGLMT)); 598 hwnd, 599 GetPString(IDS_ERRORTEXT), 600 GetPString(IDS_EXCEEDPMDRGLMT)); 601 } 597 602 if (li) { 598 603 li->type = (fDefaultDeletePerm) ? IDM_PERMDELETE : IDM_DELETE; … … 1057 1062 MRESULT EXPENTRY DirCnrWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 1058 1063 { 1059 DIRCNRDATA *dcd = WinQueryWindowPtr(hwnd, QWL_USER); 1060 APIRET rc; 1064 DIRCNRDATA *dcd = INSTDATA(hwnd); 1065 DIRCNRDATA *dcdsrc; 1066 APIRET rc; 1061 1067 1062 1068 switch (msg) { … … 1985 1991 FreeList(list); 1986 1992 else if (fUnHilite) 1987 UnHilite(hwnd, TRUE, &dcd->lastselection );1993 UnHilite(hwnd, TRUE, &dcd->lastselection, 0); 1988 1994 } 1989 1995 else … … 2513 2519 } 2514 2520 else if (fUnHilite) 2515 UnHilite(hwnd, TRUE, &dcd->lastselection );2521 UnHilite(hwnd, TRUE, &dcd->lastselection, 0); 2516 2522 } 2517 2523 else … … 2542 2548 RunCommand(hwnd, x); 2543 2549 if (fUnHilite) 2544 UnHilite(hwnd, TRUE, &dcd->lastselection );2550 UnHilite(hwnd, TRUE, &dcd->lastselection, 0); 2545 2551 } 2546 2552 } … … 2834 2840 pci ? NULL : dcd->directory, 2835 2841 pci ? TRUE : FALSE)) { 2836 if ((pci && fUnHilite && wasemphasized) || NumItemsToUnhilite) {2837 UnHilite(hwnd, TRUE, &dcd->lastselection );2842 if ((pci && fUnHilite && wasemphasized) || dcd->ulItemsToUnHilite) { 2843 UnHilite(hwnd, TRUE, &dcd->lastselection, dcd->ulItemsToUnHilite); 2838 2844 } 2839 2845 } … … 2852 2858 ULONG action = UM_ACTION; 2853 2859 2860 DbgMsg(pszSrcFile, __LINE__, "calling DoFileDrop"); 2854 2861 li = DoFileDrop(hwnd, dcd->directory, TRUE, mp1, mp2); 2855 if (NumItemsToUnhilite) { 2862 dcdsrc = INSTDATA(((PCNRDRAGINFO)mp2)->pDragInfo->hwndSource); 2863 2864 if (dcdsrc->ulItemsToUnHilite) { 2856 2865 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 2857 hwnd, 2858 GetPString(IDS_ERRORTEXT), 2859 GetPString(IDS_EXCEEDPMDRGLMT)); 2860 } 2866 hwnd, 2867 GetPString(IDS_ERRORTEXT), 2868 GetPString(IDS_EXCEEDPMDRGLMT)); 2869 } 2870 2861 2871 if (li) { 2862 2872 if (li->list && li->list[0] && IsRoot(li->list[0])) -
trunk/dll/draglist.c
r628 r672 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 2Steven H.Levine9 Copyright (c) 2001, 2007 Steven H.Levine 10 10 11 11 16 Oct 02 SHL DoFileDrag: don't free stack … … 18 18 19 Apr 07 SHL Optimize DRAGITEM DRAGIMAGE array access 19 19 21 Apr 07 SHL Avoid odd first time drag failure 20 12 May 07 SHL Use dcd->ulItemsToUnHilite 20 21 21 22 ***********************************************************************/ … … 97 98 # endif 98 99 if (!DrgFreeDraginfo(pDInfo)) { 99 // fixme to find callers responsible for PMERR_SOURCE_SAME_AS_TARGET100 if ((WinGetLastError(WinQueryAnchorBlock(hwnd)) & 0xffff) != PMERR_SOURCE_SAME_AS_TARGET) {101 Win_Error (hwnd, hwnd, pszSrcFile, __LINE__,102 "DrgFreeDraginfo");100 if ((WinGetLastError(WinQueryAnchorBlock(hwnd)) & 0xffff) == PMERR_SOURCE_SAME_AS_TARGET) { 101 // fixme to find caller responsible for PMERR_SOURCE_SAME_AS_TARGET 102 Win_Error_NoMsgBox(HWND_DESKTOP, HWND_DESKTOP, pszSrcFile, __LINE__, 103 "DrgFreeDraginfo failed with PMERR_SOURCE_SAME_AS_TARGET"); 103 104 } 104 105 else 105 DbgMsg(pszSrcFile, __LINE__, "DrgFreeDraginfo PMERR_SOURCE_SAME_AS_TARGET");106 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, "DrgFreeDraginfo"); 106 107 } 107 108 } … … 220 221 BOOL ok; 221 222 UINT c; 223 DIRCNRDATA *dcd; 222 224 223 225 static BOOL first_drag = TRUE; 224 226 225 // fixme to be multi-drag safe - count needs to be in DCD etc. and passed to UnHilite 226 NumItemsToUnhilite = 0; 227 // Count items to unhilite, pass to UnHilite when partial unhilite required 228 dcd = INSTDATA(hwndCnr); 229 dcd->ulItemsToUnHilite = 0; 227 230 if (!pciRec && directory && *directory) 228 231 return DragOne(hwndCnr, hwndObj, directory, moveok); … … 362 365 } 363 366 // Set count to actual count + 1 to ensure count non-zero on any failure 364 NumItemsToUnhilite = ulNumfiles + 1;367 dcd->ulItemsToUnHilite = ulNumfiles + 1; 365 368 break; 366 369 } … … 424 427 DrgDeleteStrHandle(pDItem->hstrTargetName); 425 428 xfree(pDItem); 426 NumItemsToUnhilite = ulNumfiles + 1; // +1 to ensure non-zero429 dcd->ulItemsToUnHilite = ulNumfiles + 1; // +1 to ensure non-zero 427 430 break; 428 431 } … … 480 483 // Set count to actual count + 1 to ensure count non-zero on any failure 481 484 // Unhilite code will adjust this when unhighliting 482 NumItemsToUnhilite = ulNumfiles + 1;485 dcd->ulItemsToUnHilite = ulNumfiles + 1; 483 486 break; 484 487 } … … 558 561 559 562 if (hDrop == NULLHANDLE ) { 560 NumItemsToUnhilite = 0;563 dcd->ulItemsToUnHilite = 0; 561 564 if (pDInfo) 562 565 FreeDragInfoData(hwndCnr, pDInfo); … … 587 590 FILESTATUS3 fs3; 588 591 BOOL ok; 592 DIRCNRDATA *dcd; 589 593 590 594 if (!list || !list[0]) 591 595 return hDrop; 596 597 dcd = INSTDATA(hwnd); 598 592 599 for (ulSelect = 0; list[ulSelect]; ulSelect++) { 593 600 if ((!IsRoot(list[ulSelect]) || !IsValidDrive(*list[ulSelect])) && … … 677 684 xfree(pDItem); 678 685 // pDItem = NULL; // Why bother, we can count - fixme to be gone 679 NumItemsToUnhilite = ulNumfiles + 1;686 dcd->ulItemsToUnHilite = ulNumfiles + 1; 680 687 break; 681 688 } … … 731 738 (PVOID) NULL); 732 739 if (hDrop == NULLHANDLE) { 733 NumItemsToUnhilite = 0;740 dcd->ulItemsToUnHilite = 0; 734 741 FreeDragInfoData(hwnd, pDInfo); 735 742 } -
trunk/dll/fm3dll.h
r636 r672 46 46 21 Apr 07 GKY Find FM2Utils by path or utils directory eliminate fAddUtils global 47 47 23 Apr 07 SHL Add Win_Error_NoMsgBox 48 12 May 07 SHL Add ulItemsToUnHilite to DIRCNRDATA, pass to Unhilite as arg 48 49 49 50 ***********************************************************************/ … … 140 141 #define LINES_PER_ARCSIG 21 // Lines in each archiver.bb2 definition 141 142 #define CON_COLS 6 142 #define INSTDATA(h) WinQueryWindowPtr( h,QWL_USER)143 #define INSTDATA(h) WinQueryWindowPtr((h),QWL_USER) 143 144 #define DIR_SPLITBAR_OFFSET 18 * 12 /* Pixel offset of details splitbar */ 144 145 #define CONTAINER_COLUMNS 13 /* Number of columns in details view */ … … 556 557 BOOL firsttree; 557 558 ULONG lastattr; 559 ULONG ulItemsToUnHilite; 558 560 } 559 561 DIRCNRDATA; … … 950 952 951 953 /* select.c */ 952 VOID UnHilite(HWND hwndCnr, BOOL all, CHAR *** list );954 VOID UnHilite(HWND hwndCnr, BOOL all, CHAR *** list, ULONG ulItemsToUnHilite); 953 955 VOID SelectList(HWND hwndCnr, BOOL partial, BOOL deselect, BOOL clearfirst, 954 956 PCNRITEM pciParent, CHAR * filename, CHAR ** list); … … 1358 1360 DATADEF PID mypid; 1359 1361 DATADEF INT driveflags[26], driveserial[26]; 1360 DATADEF ULONG NoBrokenNotify, fwsAnimate, OS2ver[2], DriveLines , NumItemsToUnhilite;1362 DATADEF ULONG NoBrokenNotify, fwsAnimate, OS2ver[2], DriveLines; 1361 1363 DATADEF HINI fmprof; 1362 1364 DATADEF HELPINIT hini; -
trunk/dll/mainwnd.c
r618 r672 33 33 19 Apr 07 SHL Sync with AcceptOneDrop GetOneDrop mods 34 34 20 Apr 07 SHL Avoid spurious add_udir error reports 35 12 May 07 SHL Use dcd->ulItemsToUnHilite 35 36 36 37 ***********************************************************************/ … … 1022 1023 { 1023 1024 USHORT id; 1024 register TOOL *tool; 1025 TOOL *tool; 1026 DIRCNRDATA *dcd; 1027 1025 1028 static HWND hwndMenu = (HWND) 0; 1026 1029 … … 1238 1241 cdi.pDragInfo = mp1; 1239 1242 li = DoFileDrop(hwnd, NULL, FALSE, mp1, MPFROMP(&cdi)); 1240 if (NumItemsToUnhilite) 1241 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 1242 hwnd, 1243 GetPString(IDS_ERRORTEXT), 1244 GetPString(IDS_EXCEEDPMDRGLMT)); 1243 dcd = INSTDATA(cdi.pDragInfo->hwndSource); 1244 if (dcd->ulItemsToUnHilite) { 1245 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 1246 hwnd, 1247 GetPString(IDS_ERRORTEXT), 1248 GetPString(IDS_EXCEEDPMDRGLMT)); 1249 } 1245 1250 if (li) { 1246 1251 li->type = id; … … 1615 1620 USHORT id; 1616 1621 CHAR szDrv[CCHMAXPATH]; 1622 DIRCNRDATA *dcd; 1617 1623 1618 1624 static BOOL emphasized = FALSE; … … 1811 1817 NULL, 1812 1818 TRUE, MPFROM2SHORT(TREE_CNR, CN_DROP), MPFROMP(&cnd)); 1813 if (NumItemsToUnhilite) 1814 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 1815 hwnd, 1816 GetPString(IDS_ERRORTEXT), 1817 GetPString(IDS_EXCEEDPMDRGLMT)); 1819 dcd = INSTDATA(cnd.pDragInfo->hwndSource); 1820 if (dcd && dcd->ulItemsToUnHilite) { 1821 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 1822 hwnd, 1823 GetPString(IDS_ERRORTEXT), 1824 GetPString(IDS_EXCEEDPMDRGLMT)); 1825 } 1818 1826 if (li) { 1819 1827 strcpy(li->targetpath, szDrv); … … 1834 1842 hwndMain, 1835 1843 DropListProc, 1836 1837 1838 1839 1840 1844 FM3ModHandle, DND_FRAME, MPFROMP(&cl)); 1845 if (li->type == DID_ERROR) 1846 Win_Error(DND_FRAME, HWND_DESKTOP, pszSrcFile, __LINE__, 1847 "Drag & Drop Dialog"); 1848 if (!li->type) { 1841 1849 FreeListInfo(li); 1842 1850 return 0; 1843 1851 } 1844 1852 li->list = cl.list; 1845 1853 if (!li->list || !li->list[0]) { 1846 1854 FreeListInfo(li); 1847 1855 return 0; … … 4822 4830 DIRCNRDATA *dcd = NULL; 4823 4831 4832 // 12 May 07 SHL fixme to understand? backwards maybe? looking for DIR_CNR? 4824 4833 if (WinQueryWindowUShort(hwndCnr, QWS_ID) != TREE_CNR) 4825 4834 dcd = INSTDATA(hwndCnr); … … 4830 4839 if (pci && (INT) pci != -1 && 4831 4840 (pci->rc.flRecordAttr & CRA_SELECTED)) 4832 UnHilite(hwnd, TRUE, ((dcd) ? &dcd->lastselection : NULL)); 4841 { 4842 UnHilite(hwnd, 4843 TRUE, 4844 dcd ? &dcd->lastselection : NULL, 4845 dcd ? dcd ->ulItemsToUnHilite : 0); 4846 } 4833 4847 } 4834 4848 } … … 5721 5735 { 5722 5736 if ((WinGetLastError(WinQueryAnchorBlock(hwnd)) & 0xffff) == PMERR_NOT_IN_IDX) { 5723 5724 5725 5737 saymsg(MB_ENTER | MB_ICONASTERISK, hwnd, 5738 GetPString(IDS_WARNINGTEXT), 5739 GetPString(IDS_DOESNTEXISTTEXT), path); 5726 5740 } 5727 5741 else { -
trunk/dll/mainwnd2.c
r593 r672 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2005, 200 6Steven H. Levine9 Copyright (c) 2005, 2007 Steven H. Levine 10 10 11 11 23 May 05 SHL Use datamin.h … … 16 16 17 Jul 06 SHL Use Runtime_Error 17 17 30 Mar 07 GKY Remove GetPString for window class names 18 12 May 07 SHL Pass ulItemsToUnHilite to UnHilite 19 18 20 ***********************************************************************/ 19 21 … … 657 659 MPFROMLONG(CMA_FIRST), 658 660 MPFROMSHORT(CRA_CURSORED)); 659 if (pci && (INT) pci != -1 && (pci->rc.flRecordAttr & CRA_SELECTED)) 660 UnHilite(hwnd, TRUE, ((dcd) ? &dcd->lastselection : NULL)); 661 if (pci && (INT) pci != -1 && (pci->rc.flRecordAttr & CRA_SELECTED)) { 662 UnHilite(hwnd, 663 TRUE, 664 dcd ? &dcd->lastselection : NULL, 665 dcd ? dcd->ulItemsToUnHilite : 0); 666 } 661 667 } 662 668 } -
trunk/dll/select.c
r618 r672 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2004, 200 6Steven H. Levine9 Copyright (c) 2004, 2007 Steven H. Levine 10 10 11 11 01 Aug 04 SHL Rework lstrip/rstrip usage … … 18 18 06 Apr 07 GKY Work around PM DragInfo and DrgFreeDISH limits 19 19 19 Apr 07 SHL Sync with NumItemsToUnhilite mods 20 12 May 07 SHL Use dcd->ulItemsToUnHilite 20 21 21 22 ***********************************************************************/ … … 41 42 static PSZ pszSrcFile = __FILE__; 42 43 43 VOID UnHilite(HWND hwndCnr, BOOL all, CHAR *** list )44 VOID UnHilite(HWND hwndCnr, BOOL all, CHAR *** list, ULONG ulItemsToUnHilite) 44 45 { 45 46 PCNRITEM pci; … … 64 65 break; 65 66 // Count is one extra to ensure non-zero elsewhere 66 if (NumItemsToUnhilite && x + 2 == NumItemsToUnhilite){67 NumItemsToUnhilite = 0;67 // x is 0 based index 68 if (x + 2 == ulItemsToUnHilite) 68 69 break; 69 }70 70 if (list) 71 71 AddToList(pci->szFileName, list, &numfiles, &numalloc); … … 87 87 88 88 if (clearfirst && !deselect) 89 UnHilite(hwndCnr, TRUE, NULL );89 UnHilite(hwndCnr, TRUE, NULL, 0); 90 90 if (list && list[0]) { 91 91 for (x = 0; list[x]; x++) { -
trunk/dll/treecnr.c
r618 r672 30 30 19 Apr 07 SHL Sync with AcceptOneDrop GetOneDrop mods 31 31 19 Apr 07 SHL Add more drag/drop error checking 32 12 May 07 SHL Use dcd->ulItemsToUnHilite; sync with UnHilite arg mods 32 33 33 34 ***********************************************************************/ … … 504 505 { 505 506 DIRCNRDATA *dcd; 507 DIRCNRDATA *dcdsrc; 506 508 507 509 switch (msg) { … … 547 549 li = DoFileDrop(dcd->hwndCnr, 548 550 dcd->directory, FALSE, MPVOID, MPFROMP(&cni)); 549 if (NumItemsToUnhilite) 551 dcdsrc = INSTDATA(cni.pDragInfo->hwndSource); 552 if (dcdsrc->ulItemsToUnHilite) { 550 553 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 551 hwnd, 552 GetPString(IDS_ERRORTEXT), 553 GetPString(IDS_EXCEEDPMDRGLMT)); 554 hwnd, 555 GetPString(IDS_ERRORTEXT), 556 GetPString(IDS_EXCEEDPMDRGLMT)); 557 } 554 558 if (li) { 555 559 li->type = ((fDefaultDeletePerm) ? IDM_PERMDELETE : IDM_DELETE); … … 830 834 { 831 835 static APPNOTIFY *apphead = NULL, *apptail = NULL; 832 DIRCNRDATA *dcd = WinQueryWindowPtr(hwnd, QWL_USER); 836 DIRCNRDATA *dcd = INSTDATA(hwnd); 837 DIRCNRDATA *dcdsrc; 833 838 834 839 switch (msg) { … … 1378 1383 1379 1384 li = DoFileDrop(hwnd, NULL, TRUE, mp1, mp2); 1380 if (NumItemsToUnhilite) 1385 dcdsrc = INSTDATA(((PCNRDRAGINFO)mp2)->pDragInfo->hwndSource); 1386 if (dcdsrc->ulItemsToUnHilite) { 1381 1387 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, 1382 hwnd, 1383 GetPString(IDS_ERRORTEXT), 1384 GetPString(IDS_EXCEEDPMDRGLMT)); 1388 hwnd, 1389 GetPString(IDS_ERRORTEXT), 1390 GetPString(IDS_EXCEEDPMDRGLMT)); 1391 } 1385 1392 if (li) { 1386 1393 if (!*li->targetpath) { … … 2784 2791 RunCommand(hwnd, x); 2785 2792 if (fUnHilite) 2786 UnHilite(hwnd, TRUE, &dcd->lastselection );2793 UnHilite(hwnd, TRUE, &dcd->lastselection, 0); 2787 2794 } 2788 2795 }
Note:
See TracChangeset
for help on using the changeset viewer.