Changeset 1459 for trunk/dll/dircnrs.c
- Timestamp:
- Sep 16, 2009, 7:58:59 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/dll/dircnrs.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/dircnrs.c
r1455 r1459 68 68 22 Jul 09 SHL Cleanup of SETFOCUS code 69 69 14 Sep 09 SHL Drop experimental code 70 15 Sep 09 SHL Show rescan progress while filling container 70 71 71 72 ***********************************************************************/ … … 101 102 #include "notebook.h" // CfgDlgProc 102 103 #include "command.h" // RunCommand 103 #include "worker.h" // Action, MassAction104 #include "worker.h" // Action, MassAction 104 105 #include "misc.h" // GetTidForThread, AdjustCnrColsForFSType, AdjustCnrColsForPref 105 106 // AdjustDetailsSwitches, CnrDirectEdit, OpenEdit, QuickPopup 106 107 // SayFilter, SaySort, SayView, SetCnrCols, SetDetailsSwitches 107 // SetSortChecks, SetViewMenu, SwitchCommand, CheckMenu108 // CurrentRecord, DrawTargetEmphasis, IsFm2Window108 // SetSortChecks, SetViewMenu, SwitchCommand, CheckMenu 109 // CurrentRecord, DrawTargetEmphasis, IsFm2Window 109 110 #include "chklist.h" // CenterOverWindow, DropListProc 110 111 #include "common.h" // CommonCnrProc, CommonCreateTextChildren, CommonFrameWndProc 111 // CommonTextPaint, CommonTextButton, CommonTextProc112 // CommonTextPaint, CommonTextButton, CommonTextProc 112 113 #include "mainwnd.h" // CountDirCnrs, GetNextWindowPos, MakeBubble, TopWindow 113 114 #include "select.h" // DeselectAll, HideAll, InvertAll, SelectAll, SelectList 114 // SpecialSelect2115 // SpecialSelect2 115 116 #include "dirsize.h" // DirSizeProc 116 117 #include "flesh.h" // Flesh, Stubby, UnFlesh … … 680 681 { 681 682 DIRCNRDATA *dcd; 683 CHAR tf[64]; 684 CHAR tb[64]; 685 CHAR s[CCHMAXPATH * 2]; 682 686 683 687 switch (msg) { … … 754 758 dcd = WinQueryWindowPtr(hwnd, QWL_USER); 755 759 if (dcd && dcd->hwndFrame == WinQueryActiveWindow(dcd->hwndParent)) { 756 757 760 FSALLOCATE fsa; 758 CHAR s[CCHMAXPATH * 2];759 CHAR tf[64];760 CHAR tb[64];761 761 CHAR szFree[64]; 762 763 762 DosError(FERR_DISABLEHARDERR); 764 763 if (!DosQueryFSInfo(toupper(*dcd->directory) - '@', … … 844 843 MakeValidDir(dcd->directory); 845 844 { 846 CHAR s[CCHMAXPATH + 8];847 848 845 sprintf(s, 849 846 "%s%s%s", … … 865 862 if (hwndStatus && 866 863 dcd->hwndFrame == WinQueryActiveWindow(dcd->hwndParent)) { 867 WinSetWindowText(hwndStatus, GetPString(IDS_ SCANNINGTEXT));864 WinSetWindowText(hwndStatus, GetPString(IDS_PLEASEWAITSCANNINGTEXT)); 868 865 if (hwndMain) 869 866 WinSendMsg(hwndMain, UM_LOADFILE, MPVOID, MPVOID); 870 867 } 871 868 if (fSwitchTree && hwndTree) { 869 // Keep drive tree in sync with directory container 872 870 PSZ pszTempDir = xstrdup(dcd->directory, pszSrcFile, __LINE__); 873 874 871 if (hwndMain) { 875 872 if (TopWindow(hwndMain, (HWND) 0) == dcd->hwndFrame && pszTempDir) … … 884 881 } 885 882 dcd->firsttree = FALSE; 883 WinStartTimer(WinQueryAnchorBlock(hwnd), dcd->hwndCnr, ID_DIRCNR_TIMER, 500); 886 884 // fixme to check errors 887 885 FillDirCnr(dcd->hwndCnr, dcd->directory, dcd, &dcd->ullTotalBytes); 886 WinStopTimer(WinQueryAnchorBlock(hwnd), dcd->hwndCnr, ID_DIRCNR_TIMER); 888 887 PostMsg(dcd->hwndCnr, UM_RESCAN, MPVOID, MPVOID); 889 888 if (mp2 && !fLeaveTree && (dcd->flWindowAttr & CV_TREE)) { 890 891 889 ULONG flWindowAttr = dcd->flWindowAttr; 892 890 CNRINFO cnri; 893 894 flWindowAttr &= 895 (~(CV_NAME | CV_TREE | CV_ICON | CV_DETAIL | CV_TEXT)); 891 flWindowAttr &= ~(CV_NAME | CV_TREE | CV_ICON | CV_DETAIL | CV_TEXT); 896 892 if (dcd->lastattr) { 897 893 if (dcd->lastattr & CV_TEXT) … … 1211 1207 { 1212 1208 DIRCNRDATA *dcd = INSTDATA(hwnd); 1209 CHAR tf[64]; 1210 CHAR tb[64]; 1211 CHAR s[CCHMAXPATH]; 1213 1212 1214 1213 switch (msg) { … … 1251 1250 case VK_HOME: 1252 1251 if ((shiftstate & KC_CTRL) == KC_CTRL && dcd) { 1253 CHAR s[CCHMAXPATH], *p;1252 PSZ p; 1254 1253 strcpy(s, dcd->directory); 1255 1254 p = strchr(s, '\\'); … … 1420 1419 break; 1421 1420 1421 case WM_TIMER: 1422 // Started/stopped by DirObjWndPro 1423 // dcd = WinQueryWindowPtr(hwnd, QWL_USER); 1424 if (dcd) { 1425 commafmt(tb, sizeof(tb), dcd->totalfiles); 1426 CommaFmtULL(tf, sizeof(tf), dcd->ullTotalBytes, 'K'); 1427 sprintf(s, "%s / %s", tb, tf); 1428 // DbgMsg(pszSrcFile, __LINE__, "WM_TIMER %s", s); // 15 Sep 09 SHL fixme debug 1429 WinSetDlgItemText(dcd->hwndClient, DIR_TOTALS, s); 1430 } 1431 break; // WM_TIMER 1432 1422 1433 case UM_RESCAN: 1423 1434 if (dcd) { 1424 1435 1425 1436 CNRINFO cnri; 1426 CHAR s [CCHMAXPATH * 2], tf[81], tb[81], szDate[DATE_BUF_BYTES];1437 CHAR szDate[DATE_BUF_BYTES]; 1427 1438 PCNRITEM pci; 1428 1439 … … 3205 3216 PCNRITEM pci = (PCNRITEM) ((PCNREDITDATA) mp2)->pRecord; 3206 3217 HWND hwndMLE; 3207 static CHAR szData[CCHMAXPATH];3208 3218 CHAR testname[CCHMAXPATH]; 3209 3219 3210 3220 if (!pci && !pfi) { 3211 3221 hwndMLE = WinWindowFromID(hwnd, CID_MLE); 3212 WinQueryWindowText(hwndMLE, sizeof(s zData), szData);3213 chop_at_crnl(s zData);3214 bstrip(s zData);3215 if (*s zData) {3216 if (!DosQueryPathInfo(s zData,3222 WinQueryWindowText(hwndMLE, sizeof(s), s); 3223 chop_at_crnl(s); 3224 bstrip(s); 3225 if (*s) { 3226 if (!DosQueryPathInfo(s, 3217 3227 FIL_QUERYFULLNAME, 3218 3228 testname, sizeof(testname))) { … … 3240 3250 PNOTIFYRECORDEMPHASIS pre = mp2; 3241 3251 PCNRITEM pci; 3242 CHAR s[CCHMAXPATHCOMP + 91] , tb[81], tf[81];3252 CHAR s[CCHMAXPATHCOMP + 91]; 3243 3253 3244 3254 pci = (PCNRITEM) (pre ? pre->pRecord : NULL);
Note:
See TracChangeset
for help on using the changeset viewer.
