Changeset 672 for trunk/dll/draglist.c
- Timestamp:
- May 13, 2007, 7:57:48 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.