Changeset 1854
- Timestamp:
- Aug 18, 2015, 6:55:46 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/dll/findrec.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/findrec.c
r1673 r1854 5 5 6 6 Copyright (c) 1993-98 M. Kimes 7 Copyright (c) 2003, 20 08Steven H.Levine7 Copyright (c) 2003, 2015 Steven H.Levine 8 8 9 9 Find records … … 11 11 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 12 12 28 Dec 08 GKY Containers will only scroll to the right if needed to show end of selected 13 item and will scroll left to eliminate space after a selected item. Ticket 204 13 item and will scroll left to eliminate space after a selected item. Ticket 204 14 06 Aug 15 SHL Clean up and comment 14 15 15 16 ***********************************************************************/ … … 56 57 srch.fsPrefix = FALSE; 57 58 srch.fsCaseSensitive = FALSE; 58 srch.usView = CV_TREE; 59 srch.usView = CV_TREE; 59 60 if (!pciParent) 60 61 pciParent = (PCNRITEM) CMA_FIRST; … … 63 64 while (pci && (INT) pci != -1) { 64 65 if (!noenv || (pci->flags & (RECFLAGS_ENV | RECFLAGS_UNDERENV)) == 0) { 65 if (!partmatch) { // full name must match full name 66 // CNRITEM for file/directory 67 if (!partmatch) { // file name must match full name 66 68 if (!stricmp(pci->pszFileName, filename)) 67 return pci; // success69 return pci; // got full match 68 70 } 69 71 else { // only root name must match 70 if (strlen(pci->pszFileName) > 3) { 72 // partial match 73 if (strlen(pci->pszFileName) <= 3) 74 p = pci->pszFileName; // Root 75 else { 71 76 p = strrchr(pci->pszFileName, '\\'); 72 if (!p) { 77 if (p) 78 p++; // After slash 79 else { 73 80 p = strrchr(pci->pszFileName, ':'); 74 81 if (p) 75 p++; 82 p++; // After colon 76 83 else 77 p = pci->pszFileName; 84 p = pci->pszFileName; // Must be bare file name 78 85 } 79 else80 p++;81 86 } 82 else83 p = pci->pszFileName;84 87 if (!stricmp(p, file)) 85 return pci; // success88 return pci; // got partial match 86 89 } 87 90 } … … 124 127 qrecrct.fsExtent = (CMA_ICON | CMA_TEXT | CMA_TREEICON); 125 128 if (!WinSendMsg(hwndCnr, 126 CM_QUERYRECORDRECT, MPFROMP(&rcl), MPFROMP(&qrecrct))) {129 CM_QUERYRECORDRECT, MPFROMP(&rcl), MPFROMP(&qrecrct))) { 127 130 qrecrct.fsExtent = CMA_TEXT | CMA_TREEICON; 128 131 WinSendMsg(hwndCnr, CM_QUERYRECORDRECT, MPFROMP(&rcl), MPFROMP(&qrecrct)); … … 130 133 WinSendMsg(hwndCnr, 131 134 CM_QUERYVIEWPORTRECT, 132 MPFROMP(&rclViewport), MPFROM2SHORT(CMA_WINDOW, TRUE));135 MPFROMP(&rclViewport), MPFROM2SHORT(CMA_WINDOW, TRUE)); 133 136 //DbgMsg(pszSrcFile, __LINE__, "TOPPORT %i TOPRCL %i", rclViewport.yTop , rcl.yTop); 134 137 WinSendMsg(hwndCnr, 135 138 CM_SCROLLWINDOW, 136 MPFROMSHORT(CMA_HORIZONTAL), MPFROMLONG(rcl.xRight - rclViewport.xRight));139 MPFROMSHORT(CMA_HORIZONTAL), MPFROMLONG(rcl.xRight - rclViewport.xRight)); 137 140 WinSendMsg(hwndCnr, 138 141 CM_SCROLLWINDOW, 139 142 MPFROMSHORT(CMA_VERTICAL), 140 MPFROMLONG((rclViewport.yTop - (rcl.yTop) - 4)));143 MPFROMLONG((rclViewport.yTop - (rcl.yTop) - 4))); 141 144 } 142 145
Note:
See TracChangeset
for help on using the changeset viewer.
