Changeset 1335 for trunk/dll/treecnr.c
- Timestamp:
- Dec 13, 2008, 12:49:02 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/treecnr.c
r1326 r1335 1 1 2 /*********************************************************************** 2 3 … … 50 51 19 Oct 08 GKY Fixed context menu to be "drives" menu on unformatted drives 51 52 28 Nov 08 GKY Remove unneeded DosEnterCriSec calls 53 10 Dec 08 SHL Integrate exception handler support 52 54 53 55 ***********************************************************************/ … … 56 58 #include <string.h> 57 59 #include <ctype.h> 58 #include <process.h> // _beginthread60 // #include <process.h> // _beginthread 59 61 60 62 #define INCL_DOS … … 79 81 #include "notebook.h" // CfgDlgProc 80 82 #include "command.h" // RunCommand 81 #include "worker.h" 83 #include "worker.h" // Action, MassAction 82 84 #include "mainwnd.h" // BubbleHelp, FindDirCnrByName, GetNextWindowPos 83 85 #include "misc.h" // CnrDirectEdit, EmphasizeButton, FindDirCnr 84 85 86 86 // FindDirCnr, FixSwitchList, OpenEdit, QuickPopup 87 // SetSortChecks, SwitchCommand, CheckMenu 88 // CurrentRecord, IsFm2Window 87 89 #include "common.h" // CommonCnrProc, CommonDriveCmd, CommonFrameWndProc 88 90 // CommonTextProc 89 91 #include "valid.h" // CheckDrive, DriveFlagsOne, IsValidDrive 90 92 #include "chklist.h" // DropListProc … … 116 118 #include "fortify.h" 117 119 #include "init.h" // GetTidForWindow 120 #include "excputil.h" // xbeginthread 118 121 119 122 // Data definitions … … 614 617 // DbgMsg(pszSrcFile, __LINE__, "UM_SHOWME mp1 %p mp2 %p", mp1, mp2); // 14 Aug 07 SHL fixme 615 618 if (mp1) { 619 # ifdef FORTIFY 620 Fortify_BecomeOwner(mp1); 621 # endif 616 622 dcd = INSTDATA(hwnd); 617 623 // DbgMsg(pszSrcFile, __LINE__, "UM_SHOWME dcd %p", dcd); // 14 Aug 07 SHL fixme … … 809 815 WinSendMsg(dcd->hwndCnr, 810 816 CM_SCROLLWINDOW, 811 817 MPFROMSHORT(CMA_HORIZONTAL), MPFROMLONG(-1)); 812 818 //if (!fInitialDriveScan) { 813 814 815 816 817 818 819 820 819 //DosWaitEventSem(DriveScanStart, 20000); 820 while (StubbyScanCount != 0) 821 DosSleep(50); 822 /*pulPostCt = xmallocz(sizeof(ULONG), pszSrcFile, __LINE__); 823 if (pulPostCt) { 824 DosResetEventSem(DriveScanStart, pulPostCt); 825 free(pulPostCt); 826 } */ 821 827 //} 822 828 //else … … 884 890 wk->li = (LISTINFO *) mp1; 885 891 strcpy(wk->directory, dcd->directory); 886 if (_beginthread(MassAction, NULL, 122880, (PVOID) wk) == -1) { 887 Runtime_Error(pszSrcFile, __LINE__, 888 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 892 if (xbeginthread(MassAction, 893 122880, 894 wk, 895 pszSrcFile, 896 __LINE__) == -1) 897 { 889 898 free(wk); 890 899 FreeListInfo((LISTINFO *) mp1); … … 922 931 wk->li = (LISTINFO *) mp1; 923 932 strcpy(wk->directory, dcd->directory); 924 if (_beginthread(Action, NULL, 122880, (PVOID) wk) == -1) { 925 Runtime_Error(pszSrcFile, __LINE__, 926 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 933 if (xbeginthread(Action, 934 122880, 935 wk, 936 pszSrcFile, 937 __LINE__) == -1) 938 { 927 939 free(wk); 928 940 FreeListInfo((LISTINFO *) mp1); … … 1130 1142 pci = (PCNRITEM) CurrentRecord(hwnd); 1131 1143 if (pci && (INT) pci != -1) { 1132 1133 1134 1144 if (IsRoot(pci->pszFileName) || !DosQueryFSInfo(toupper(*pci->pszFileName) - '@', 1145 FSIL_ALLOC, &fsa, 1146 sizeof(FSALLOCATE))) 1135 1147 menuHwnd = CheckMenu(hwndMainMenu, &TreeMenu, TREE_POPUP); 1136 1148 else { … … 1256 1268 1257 1269 case UM_SETUP: 1270 # ifdef FORTIFY 1271 // Balance WM_DESTROY 1272 Fortify_EnterScope(); 1273 # endif 1274 1258 1275 if (!dcd) { 1259 1276 Runtime_Error2(pszSrcFile, __LINE__, IDS_NODATATEXT); … … 1314 1331 MPFROMLONG(CMA_FLWINDOWATTR | CMA_LINESPACING | 1315 1332 CMA_CXTREEINDENT | CMA_PSORTRECORD)); 1316 if (_beginthread(MakeObjWin, NULL, 327680, (PVOID) dcd) == -1) { 1317 Runtime_Error(pszSrcFile, __LINE__, 1318 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 1333 if (xbeginthread(MakeObjWin, 1334 327680, 1335 dcd, 1336 pszSrcFile, 1337 __LINE__) == -1) 1338 { 1319 1339 PostMsg(hwnd, WM_CLOSE, MPVOID, MPVOID); 1320 // return 0;1321 1340 } 1322 1341 else … … 2440 2459 pci = (PCNRITEM) CurrentRecord(hwnd); 2441 2460 if (pci && (INT) pci != -1) { 2442 2443 2461 pszTempDir = xstrdup(pci->pszFileName, pszSrcFile, __LINE__); 2462 if (pszTempDir) 2444 2463 MakeValidDir(pszTempDir); 2445 2464 } 2446 2465 else 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2466 pszTempDir = xstrdup(pFM2SaveDirectory, pszSrcFile, __LINE__); 2467 if (pszTempDir) { 2468 if (WinDlgBox(HWND_DESKTOP, dcd->hwndParent, 2469 WalkAllDlgProc, 2470 FM3ModHandle, WALK_FRAME, MPFROMP(pszTempDir))) { 2471 if (!WinSendMsg(hwnd, UM_SHOWME, MPFROMP(pszTempDir), MPFROMLONG(1))) 2472 free(pszTempDir); 2473 } 2474 else 2475 free(pszTempDir); 2476 } 2458 2477 } 2459 2478 break; … … 3031 3050 3032 3051 case WM_DESTROY: 3052 # ifdef FORTIFY 3053 DbgMsg(pszSrcFile, __LINE__, "WM_DESTROY hwnd %p TID %u", hwnd, GetTidForThread()); // 18 Jul 08 SHL fixme 3054 # endif 3033 3055 if (TreeCnrMenu) 3034 3056 WinDestroyWindow(TreeCnrMenu); … … 3050 3072 } 3051 3073 # ifdef FORTIFY 3052 // if (dcd)3053 // Fortify_ChangeScope(dcd, -1);3054 3074 Fortify_LeaveScope(); 3055 // if (dcd)3056 // Fortify_ChangeScope(dcd, -1);3057 3075 # endif 3058 3076 break; // WM_DESTROY … … 3121 3139 if (!WinCreateWindow(hwndFrame, 3122 3140 WC_TREEOPENBUTTON, 3123 3141 "#303", 3124 3142 WS_VISIBLE | BS_PUSHBUTTON | BS_NOPOINTERFOCUS | BS_BITMAP, 3125 3143 ((swp.cx -
Note:
See TracChangeset
for help on using the changeset viewer.