Changeset 1550
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/filldir.c
r1549 r1550 135 135 static PSZ pszSrcFile = __FILE__; 136 136 static BOOL fFirstTime; 137 INT FixedVolume = 0; 137 138 138 139 #pragma data_seg(GLOBAL1) … … 215 216 HAB thab; 216 217 HMQ hmq = (HMQ) 0; 217 BOOL ok; 218 //BOOL ok; 219 static INT ProcessDirCount = 0; 218 220 219 221 DosError(FERR_DISABLEHARDERR); … … 231 233 IncrThreadUsage(); 232 234 priority_normal(); 233 ok = Stubby(StubbyScan->hwndCnr, StubbyScan->pci); 234 if (ok) { 235 if (WinIsWindow((HAB)0, StubbyScan->hwndCnr)) { 236 ULONG flags = driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A']; 237 238 if ((fRScanLocal && ~flags & DRIVE_REMOTE && ~flags & DRIVE_VIRTUAL) || 239 (fRScanRemote && flags & DRIVE_REMOTE) || 240 (fRScanVirtual && flags & DRIVE_VIRTUAL)) { 241 if (!(flags & ((fRScanNoWrite ? 0 : DRIVE_NOTWRITEABLE) || 242 (fRScanSlow ? 0 : DRIVE_SLOW)))) { 243 UnFlesh(StubbyScan->hwndCnr, StubbyScan->pci); 244 Flesh(StubbyScan->hwndCnr, StubbyScan->pci); 245 } 246 } 247 } 248 } 235 if (WinIsWindow((HAB)0, StubbyScan->hwndCnr)) { 236 ULONG flags = driveflags[toupper(*StubbyScan->pci->pszFileName) - 'A']; 237 238 if ((fRScanLocal && ~flags & DRIVE_REMOTE && ~flags & DRIVE_VIRTUAL) || 239 (fRScanRemote && flags & DRIVE_REMOTE) || 240 (fRScanVirtual && flags & DRIVE_VIRTUAL)) { 241 if (!(flags & ((fRScanNoWrite ? 0 : DRIVE_NOTWRITEABLE) || 242 (fRScanSlow ? 0 : DRIVE_SLOW)))) { 243 UnFlesh(StubbyScan->hwndCnr, StubbyScan->pci); 244 Flesh(StubbyScan->hwndCnr, StubbyScan->pci); 245 } 246 } 247 else { 248 Stubby(StubbyScan->hwndCnr, StubbyScan->pci); 249 //if (!ok) 250 // FixedVolume--; 251 } 252 } 249 253 WinDestroyMsgQueue(hmq); 250 254 } … … 254 258 free(StubbyScan); 255 259 } // if StubbyScan 260 ProcessDirCount++; 261 DbgMsg(pszSrcFile, __LINE__, "ProcessDirCount %i FixedVolume %i", 262 ProcessDirCount, FixedVolume); 263 if (fInitialDriveScan && ProcessDirCount >= FixedVolume) { 264 fInitialDriveScan = FALSE; 265 DosPostEventSem(hevInitialCnrScanComplete); 266 DosCloseEventSem(hevInitialCnrScanComplete); 267 if (fSwitchTree && hwndTree && fSaveState && pszFocusDir) { 268 // Keep drive tree in sync with directory container 269 if (hwndMain) { 270 //if (TopWindow(hwndMain, (HWND) 0) == dcd->hwndFrame) 271 if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszFocusDir), MPVOID)) 272 free(pszFocusDir); 273 } 274 else { 275 if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszFocusDir), MPVOID)) 276 free(pszFocusDir); 277 } 278 } 279 } 256 280 # ifdef FORTIFY 257 281 Fortify_LeaveScope(); … … 260 284 } 261 285 286 #if 0 262 287 VOID ProcessDirectoryThread(VOID * arg) 263 288 { … … 265 290 HAB thab; 266 291 HMQ hmq = (HMQ) 0; 292 267 293 268 294 DosError(FERR_DISABLEHARDERR); … … 273 299 274 300 ProcessDir = (PROCESSDIR *)arg; 275 if (ProcessDir && ProcessDir->pciParent && ProcessDir->pciParent->pszFileName && ProcessDir->hwndCnr) { 301 if (ProcessDir && ProcessDir->pciParent && ProcessDir->pciParent->pszFileName && 302 ProcessDir->hwndCnr) { 276 303 thab = WinInitialize(0); 277 304 if (thab) { … … 297 324 free(ProcessDir); 298 325 } // if ProcessDir 299 if (fInitialDriveScan) {300 fInitialDriveScan = FALSE;301 DosPostEventSem(hevInitialCnrScanComplete);302 DosCloseEventSem(hevInitialCnrScanComplete);303 }304 326 # ifdef FORTIFY 305 327 Fortify_LeaveScope(); … … 307 329 308 330 } 331 # endif 309 332 310 333 static HPOINTER IDFile(PSZ p) … … 1369 1392 1370 1393 if (~driveflags[iDrvNum] & DRIVE_REMOVABLE) { 1371 // Fixed volume 1394 // Fixed volume 1395 if (~flags & DRIVE_INVALID && ~flags & DRIVE_NOPRESCAN) 1396 FixedVolume++; 1372 1397 pci->attrFile |= FILE_DIRECTORY; 1373 1398 DosError(FERR_DISABLEHARDERR); -
trunk/dll/filldir.h
r1444 r1550 62 62 extern HPOINTER hptrReadonly; 63 63 extern HPOINTER hptrSystem; 64 extern INT FixedVolume; 64 65 65 66 typedef struct { -
trunk/dll/findrec.c
r1549 r1550 124 124 qrecrct.fsExtent = (CMA_ICON | CMA_TEXT | CMA_TREEICON); 125 125 if (!WinSendMsg(hwndCnr, 126 126 CM_QUERYRECORDRECT, MPFROMP(&rcl), MPFROMP(&qrecrct))) { 127 127 qrecrct.fsExtent = CMA_TEXT | CMA_TREEICON; 128 128 WinSendMsg(hwndCnr, CM_QUERYRECORDRECT, MPFROMP(&rcl), MPFROMP(&qrecrct)); … … 134 134 WinSendMsg(hwndCnr, 135 135 CM_SCROLLWINDOW, 136 MPFROMSHORT(CMA_VERTICAL), 137 MPFROMLONG((rclViewport.yTop - (rcl.yTop) - 4))); 136 MPFROMSHORT(CMA_HORIZONTAL), MPFROMLONG(rcl.xRight - rclViewport.xRight)); 138 137 WinSendMsg(hwndCnr, 139 138 CM_SCROLLWINDOW, 140 MPFROMSHORT(CMA_HORIZONTAL), MPFROMLONG(rcl.xRight - rclViewport.xRight)); 139 MPFROMSHORT(CMA_VERTICAL), 140 MPFROMLONG((rclViewport.yTop - (rcl.yTop) - 4))); 141 141 } 142 142 -
trunk/dll/flesh.c
r1505 r1550 201 201 DRIVE_INCLUDEFILES) 202 202 includefiles = TRUE; 203 #if 0 203 204 if (fInitialDriveScan) { 204 205 PROCESSDIR *ProcessDir; … … 228 229 } 229 230 else { 231 # endif 230 232 ProcessDirectory(hwndCnr, 231 233 pciParent, … … 238 240 NULL, // total files 239 241 NULL); // total bytes 240 }242 //} 241 243 } 242 244 driveflags[*pciParent->pszFileName - 'A'] |= DRIVE_RSCANNED; -
trunk/dll/mainwnd.c
r1549 r1550 235 235 PCSZ FM3Str = "FM/3"; 236 236 RGB2 RGBGREY; 237 PSZ pszFocusDir; 237 238 238 239 #pragma data_seg(DATA1) … … 3324 3325 RemoveOldCnrSwitches(szPrefix, x); 3325 3326 continue; 3326 } 3327 } 3328 if (x == 0 && fSwitchTree) 3329 pszFocusDir = xstrdup(szDir, pszSrcFile, __LINE__); 3327 3330 LoadDetailsSwitches(szKeyBase, &localdcd.ds, TRUE); 3328 3331 hwndDir = (HWND) WinSendMsg(hwndClient, -
trunk/dll/mainwnd.h
r1438 r1550 89 89 extern HWND hwndTree; 90 90 extern USHORT shiftstate; 91 extern PSZ pszFocusDir; 91 92 92 93 #define STATE_NAME_MAX_BYTES 256 -
trunk/dll/treecnr.c
r1549 r1550 359 359 if (pciToSelect && (INT) pciToSelect != -1) { 360 360 //DbgMsg(pszSrcFile, __LINE__, "TOP %i %i", fTopDir, maketop); 361 if (fSwitchTreeExpand && ~pciToSelect->rc.flRecordAttr & CRA_EXPANDED) 362 WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciToSelect), MPVOID); 361 363 if (fTopDir || maketop) { 362 364 ShowCnrRecord(hwndCnr, (PMINIRECORDCORE) pciToSelect); 363 365 } 364 if (fSwitchTreeExpand && ~pciToSelect->rc.flRecordAttr & CRA_EXPANDED)365 WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciToSelect), MPVOID);366 366 if (!quickbail) { 367 367 WinSendMsg(hwndCnr, … … 654 654 fTopDir = TRUE; 655 655 } 656 if (fInitialDriveScan)657 DosWaitEventSem(hevInitialCnrScanComplete, SEM_INDEFINITE_WAIT);658 656 ShowTreeRec(dcd->hwndCnr, (CHAR *)mp1, fCollapseFirst, TRUE); 657 // fixme Is this PostMsg needed if recursive scan has already been done? 659 658 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_UPDATE, 0), MPVOID); 660 659 dcd->suspendview = (USHORT) tempsusp;
Note:
See TracChangeset
for help on using the changeset viewer.