Changeset 1844
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/fm3dll.h
r1444 r1844 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 20 08Steven H. Levine9 Copyright (c) 2001, 2015 Steven H. Levine 10 10 11 11 12 Feb 03 SHL Add CBLIST_TO_EASIZE … … 94 94 and rescans drive in tree container depending on container focus, greyed out 95 95 inappropriate menu context choices 96 09 Aug 15 SHL Add RESTORE_STATE_... 96 97 97 98 ***********************************************************************/ … … 198 199 #define SysVal(value) WinQuerySysValue(HWND_DESKTOP, (value)) 199 200 201 // 2015-08-09 SHL See MainObjectWndProc UM_RESTORE 202 #define RESTORE_STATE_RESTORE 0 203 #define RESTORE_STATE_TILE_CHILDREN 1 204 #define RESTORE_STATE_CLOSE_CHILDREN 2 205 206 200 207 201 208 #endif // FM3DLL_H -
trunk/dll/mainwnd.c
r1838 r1844 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 201 3Steven H. Levine9 Copyright (c) 2001, 2015 Steven H. Levine 10 10 11 11 11 Jun 02 SHL Drop obsolete xor code … … 100 100 14 Sep 09 SHL Blink thread LEDs when workers busy 101 101 13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in 102 profile calls for user settings that work and are setable in more than one103 miniapp; FM3Str should be used for setting only relavent to FM/2 or that104 aren't user settable; realappname should be used for setting applicable to105 one or more miniapp but not to FM/2102 profile calls for user settings that work and are setable in more than one 103 miniapp; FM3Str should be used for setting only relavent to FM/2 or that 104 aren't user settable; realappname should be used for setting applicable to 105 one or more miniapp but not to FM/2 106 106 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast 107 CHAR CONSTANT * as CHAR *.107 CHAR CONSTANT * as CHAR *. 108 108 11 Apr 10 GKY Fix drive tree rescan failure and program hang caused by event sem 109 never being posted109 never being posted 110 110 23 Oct 10 GKY Changes to populate and utilize a HELPTABLE for context specific help 111 111 03 Oct 11 SHL Add needTile to ensure containers opened on command line render correctly … … 114 114 12 Aug 12 GKY Allow for selection of include subdirectories or a list file on initial startup of compare dirs 115 115 30 Dec 12 GKY Enhance traget directory drop to give the option of changing the directory or carrying out an 116 operation to the current target; Added an error message for target = None;116 operation to the current target; Added an error message for target = None; 117 117 02 Aug 15 GKY Remove unneed SubbyScan code and improve suppression of blank lines and 118 duplicate subdirectory name caused by running Stubby in worker threads. 118 duplicate subdirectory name caused by running Stubby in worker threads. 119 09 Aug 15 SHL Use RESTORE_STATE_... 119 120 120 121 ***********************************************************************/ … … 340 341 WinSendMsg(hwndMain, UM_SETDIR, MPFROMP(s), MPVOID); 341 342 } 342 PostMsg(MainObjectHwnd, UM_RESTORE, MPFROMLONG(1), MPFROMLONG( 1));343 PostMsg(MainObjectHwnd, UM_RESTORE, MPFROMLONG(1), MPFROMLONG(RESTORE_STATE_TILE_CHILDREN)); 343 344 } 344 345 return 0; … … 346 347 case UM_RESTORE: 347 348 switch ((ULONG)mp2) { 348 case 1:349 case RESTORE_STATE_TILE_CHILDREN: 349 350 TileChildren(hwndMain, TRUE); 350 351 break; 351 case 2:352 case RESTORE_STATE_CLOSE_CHILDREN: 352 353 CloseDirCnrChildren(hwndMain); 353 354 break; 354 case 0:355 case RESTORE_STATE_RESTORE: 355 356 fNoTileUpdate = TRUE; 356 357 WinEnableWindow(WinQueryWindow(hwndMain, QW_PARENT), FALSE); 357 RestoreDirCnrState(hwndMain, ( char*)mp1, FALSE);358 RestoreDirCnrState(hwndMain, (CHAR *)mp1, FALSE); 358 359 WinEnableWindow(WinQueryWindow(hwndMain, QW_PARENT), TRUE); 359 360 fNoTileUpdate = FALSE; ; … … 1819 1820 MRESULT EXPENTRY DriveBackProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 1820 1821 { 1821 static BOOL emphasized = FALSE; 1822 APIRET rc; 1823 1824 static BOOL emphasized; 1822 1825 1823 1826 switch (msg) { … … 1883 1886 cnd.pDragInfo = (PDRAGINFO) mp1; 1884 1887 if (!DrgAccessDraginfo((PDRAGINFO) cnd.pDragInfo)) { 1885 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__,1886 PCSZ_DRGACCESSDRAGINFO);1887 return 0;1888 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 1889 PCSZ_DRGACCESSDRAGINFO); 1890 return 0; 1888 1891 } 1889 1892 numitems = DrgQueryDragitemCount((PDRAGINFO) cnd.pDragInfo); 1890 1893 usOperation = cnd.pDragInfo->usOperation; 1891 1894 if (usOperation == DO_DEFAULT) 1892 usOperation = fCopyDefault ? DO_COPY : DO_MOVE;1895 usOperation = fCopyDefault ? DO_COPY : DO_MOVE; 1893 1896 saymsg(MB_ENTER | MB_ICONASTERISK, 1894 hwnd,1895 GetPString(IDS_DROPHELPHDRTEXT),1896 GetPString(IDS_DROPHELPTEXT),1897 numitems,1898 &"s"[numitems == 1L],1899 NullStr,1900 NullStr,1901 targetdir,1902 " ",1903 GetPString((usOperation == DO_MOVE) ?1904 IDS_MOVETEXT :1905 (usOperation == DO_LINK) ?1906 IDS_LINKTEXT : IDS_COPYTEXT));1897 hwnd, 1898 GetPString(IDS_DROPHELPHDRTEXT), 1899 GetPString(IDS_DROPHELPTEXT), 1900 numitems, 1901 &"s"[numitems == 1L], 1902 NullStr, 1903 NullStr, 1904 targetdir, 1905 " ", 1906 GetPString((usOperation == DO_MOVE) ? 1907 IDS_MOVETEXT : 1908 (usOperation == DO_LINK) ? 1909 IDS_LINKTEXT : IDS_COPYTEXT)); 1907 1910 } 1908 1911 return 0; … … 1927 1930 CheckPmDrgLimit(cnd.pDragInfo); 1928 1931 if (li) { 1929 if (!li->list[1] && !IsFile(li->list[0])) {1930 ret = saymsg(MB_YESNO,1932 if (!li->list[1] && !IsFile(li->list[0])) { 1933 ret = saymsg(MB_YESNO, 1931 1934 HWND_DESKTOP, 1932 NullStr,1933 GetPString(IDS_DROPSETSTARGET));1934 if (ret == MBID_YES) {1935 SetTargetDir(hwnd, TRUE, li->list[0]);1936 break;1937 }1938 }1935 NullStr, 1936 GetPString(IDS_DROPSETSTARGET)); 1937 if (ret == MBID_YES) { 1938 SetTargetDir(hwnd, TRUE, li->list[0]); 1939 break; 1940 } 1941 } 1939 1942 strcpy(li->targetpath, targetdir); 1940 1943 strcat(li->targetpath, PCSZ_BACKSLASH); … … 2054 2057 FreeListInfo(li); 2055 2058 else 2056 WinSendMsg(hwndTree, UM_ACTION, MPFROMP(li), MPFROMLONG(action));2059 WinSendMsg(hwndTree, UM_ACTION, MPFROMP(li), MPFROMLONG(action)); 2057 2060 } 2058 2061 else { … … 2072 2075 CheckPmDrgLimit(cnd.pDragInfo); 2073 2076 if (li && !li->list[1] && !IsFile(li->list[0])) 2074 SetTargetDir(hwnd, TRUE, li->list[0]);2077 SetTargetDir(hwnd, TRUE, li->list[0]); 2075 2078 else 2076 saymsg(MB_ENTER | MB_ICONASTERISK, hwnd,2079 saymsg(MB_ENTER | MB_ICONASTERISK, hwnd, 2077 2080 GetPString(IDS_WARNINGTEXT), 2078 2081 GetPString(IDS_NOTARGETSET)); … … 2092 2095 2093 2096 case WM_COMMAND: 2094 DosWaitEventSem(hevTreeCnrScanComplete, SEM_INDEFINITE_WAIT); 2097 rc = DosWaitEventSem(hevTreeCnrScanComplete, SEM_INDEFINITE_WAIT); 2098 if (rc) 2099 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosWaitEventSem"); 2100 2095 2101 switch(SHORT1FROMMP(mp1)) { 2096 2102 case IDM_RESCAN: … … 2123 2129 { 2124 2130 CHAR dv[4]; 2125 2126 2131 *dv = SHORT1FROMMP(mp1) - IDM_DRIVEA + 'A'; 2127 strcpy(dv + 1, ":\\"); 2132 dv[1] = ':'; 2133 dv[2] = '\\'; 2134 dv[3] = 0; 2128 2135 if (isalpha(*dv)) { 2129 2130 HWND hwndActive; 2131 2132 dv[1] = ':'; 2133 dv[2] = '\\'; 2134 dv[3] = 0; 2135 hwndActive = TopWindow(hwnd, (HWND) 0); 2136 HWND hwndActive = TopWindow(hwnd, (HWND) 0); 2136 2137 if (hwndActive) 2137 2138 WinSendMsg(WinWindowFromID(hwndActive, FID_CLIENT), … … 3890 3891 WinSetWindowUShort(hwndChild, 3891 3892 QWS_XRESTORE, 3892 (USHORT) ((USHORT) ulWidth * (USHORT) ulCurCol)3893 + (USHORT) Rectl.xLeft);3893 (USHORT) ((USHORT) ulWidth * (USHORT) ulCurCol) 3894 + (USHORT) Rectl.xLeft); 3894 3895 WinSetWindowUShort(hwndChild, 3895 3896 QWS_YRESTORE, … … 4819 4820 cmp->size = sizeof(COMPARE); 4820 4821 strcpy(cmp->leftdir, wa.szCurrentPath1); 4821 strcpy(cmp->rightdir, wa.szCurrentPath2);4822 cmp->listfile = wa.listfile;4823 cmp->includesubdirs = wa.includesubdirs;4822 strcpy(cmp->rightdir, wa.szCurrentPath2); 4823 cmp->listfile = wa.listfile; 4824 cmp->includesubdirs = wa.includesubdirs; 4824 4825 cmp->hwndParent = hwnd; 4825 4826 cmp->dcd.hwndParent = hwnd; … … 6030 6031 if (!fNoSaveState && fSaveState) { 6031 6032 PCSZ pszStatename = PCSZ_SHUTDOWNSTATE; 6032 PostMsg(MainObjectHwnd, UM_RESTORE, MPFROMP(pszStatename), MP VOID);6033 PostMsg(MainObjectHwnd, UM_RESTORE, MPFROMP(pszStatename), MPFROMLONG(RESTORE_STATE_RESTORE)); 6033 6034 if (!add_setup(pszStatename)) 6034 6035 save_setups(); … … 6272 6273 info = cmdhead; 6273 6274 while (info) { 6274 sprintf(s, "%s {%i}", info->title, info->ID);6275 sprintf(s, "%s {%i}", info->title, info->ID); 6275 6276 WinSendMsg(hwndCmdlist, LM_INSERTITEM, 6276 6277 MPFROM2SHORT(LIT_END, 0), MPFROMP(s)); … … 6546 6547 } 6547 6548 else if (SHORT1FROMMP(mp1) == MAIN_SETUPLIST) { 6549 // State name list 6548 6550 CHAR szKey[80]; 6549 6551 ULONG numsaves = 0; 6550 6552 ULONG size = sizeof(ULONG); 6551 // 06 Oct 09 SHLCtrl-select selects, but suppresses open6553 // Ctrl-select selects, but suppresses open 6552 6554 if ((shiftstate & (KC_CTRL | KC_SHIFT | KC_ALT)) == KC_CTRL) 6553 6555 break; … … 6559 6561 &size)) 6560 6562 { 6563 // Name not found 6561 6564 if ((WinGetLastError(WinQueryAnchorBlock(hwnd)) & 0xffff) == PMERR_NOT_IN_IDX) { 6562 6565 saymsg(MB_ENTER | MB_ICONASTERISK, hwnd, … … 6570 6573 } 6571 6574 else { 6575 // Name exists 6572 6576 char *pszStateName; 6577 // If shift key, add state to existing state - FIXME to doc better 6573 6578 if ((shiftstate & KC_SHIFT) == 0) 6574 PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG( 2));6579 PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG(RESTORE_STATE_CLOSE_CHILDREN)); 6575 6580 pszStateName = xstrdup(path, pszSrcFile, __LINE__); 6576 6581 if (!pszStateName) { … … 6584 6589 } 6585 6590 } 6591 // Request restore 6586 6592 else if (!PostMsg(MainObjectHwnd, 6587 6593 UM_RESTORE, … … 6591 6597 } 6592 6598 } 6593 } 6599 } // if MAIN_SETUPLIST 6594 6600 else if (SHORT1FROMMP(mp1) == MAIN_CMDLIST) { 6595 6601 … … 6602 6608 6603 6609 WinSendMsg(hwndCmdlist, LM_QUERYITEMTEXT, 6604 MPFROM2SHORT(sSelect, CCHMAXPATH), MPFROMP(s));6610 MPFROM2SHORT(sSelect, CCHMAXPATH), MPFROMP(s)); 6605 6611 p = strrchr(s, '}'); 6606 6612 p = 0; … … 6609 6615 WinPostMsg(hwnd, 6610 6616 WM_COMMAND, 6611 MPFROM2SHORT(atol(p), 0), //fixme GKY this traps in atol the {} probably don't exist6612 //IDM_COMMANDSTART + sSelect, 0),6617 MPFROM2SHORT(atol(p), 0), //fixme GKY this traps in atol the {} probably don't exist 6618 //IDM_COMMANDSTART + sSelect, 0), 6613 6619 MPVOID); 6614 6620 } … … 6657 6663 } 6658 6664 DosSleep(1); 6659 return 0; // Suppress WinDefWindowProc WM_QUIT message generation 6665 DbgMsg(pszSrcFile, __LINE__, "MainWndProc WM_CLOSE returning"); 6666 6667 return 0; // Suppress WinDefWindowProc WM_QUIT message generation 6660 6668 6661 6669 case UM_CLOSE: … … 6669 6677 char *pszDefaultStateName = xstrdup(PCSZ_SHUTDOWNSTATE, pszSrcFile, __LINE__); 6670 6678 if (pszDefaultStateName) { 6671 if (!PostMsg(MainObjectHwnd, UM_RESTORE, MPFROMP(pszDefaultStateName), MP VOID))6679 if (!PostMsg(MainObjectHwnd, UM_RESTORE, MPFROMP(pszDefaultStateName), MPFROMLONG(RESTORE_STATE_RESTORE))) 6672 6680 // 05 Feb 08 SHL fixme to complain? 6673 6681 free(pszDefaultStateName); … … 6685 6693 6686 6694 case WM_DESTROY: 6687 # ifdef FORTIFY 6688 DbgMsg(pszSrcFile, __LINE__, "WM_DESTROY hwnd %p TID %u", hwnd, GetTidForThread()); // 22 Jul 08 SHL fixme 6689 # endif 6690 hwndMain = (HWND) 0; 6691 if (!PostMsg((HWND) 0, WM_QUIT, MPVOID, MPVOID)) 6692 WinSendMsg((HWND) 0, WM_QUIT, MPVOID, MPVOID); 6695 hwndMain = (HWND)0; 6696 if (!PostMsg((HWND)0, WM_QUIT, MPVOID, MPVOID)) 6697 WinSendMsg((HWND)0, WM_QUIT, MPVOID, MPVOID); 6693 6698 # ifdef FORTIFY 6694 6699 free_commands(); -
trunk/dll/notebook.c
r1806 r1844 52 52 15 Nov 09 GKY Change rescan following label/type change to WinSendMsg to avoid trap on SMP 53 53 13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in 54 profile calls for user settings that work and are setable in more than one55 miniapp; FM3Str should be used for setting only relavent to FM/2 or that56 aren't user settable; realappname should be used for setting applicable to57 one or more miniapp but not to FM/254 profile calls for user settings that work and are setable in more than one 55 miniapp; FM3Str should be used for setting only relavent to FM/2 or that 56 aren't user settable; realappname should be used for setting applicable to 57 one or more miniapp but not to FM/2 58 58 13 Dec 09 GKY Updated Quick page "Default" to match current defaults; added Gregg's way 59 option to Quick page.59 option to Quick page. 60 60 17 Jan 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR 61 CONSTANT * as CHAR *.61 CONSTANT * as CHAR *. 62 62 24 Oct 10 GKY Fixed spurious error message when labels in tree are changed with a 63 "not ready" drive selected63 "not ready" drive selected 64 64 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 65 for delete of readonly files65 for delete of readonly files 66 66 09 Feb 14 GKY Fix separate parameters. Moved to general page renamed separate settings 67 for apps.67 for apps. 68 68 25 May 15 GKY Auto open help only on first access of quick setting page during a session. 69 09 Aug 15 SHL Use RESTORE_STATE_... 69 70 70 71 ***********************************************************************/ … … 297 298 SBoxDlgProc, FM3ModHandle, ASEL_FRAME, 298 299 (PVOID) & pat) || !pat || !pat->id || !*pat->id) { 299 if (!fAlertBeepOff)300 if (!fAlertBeepOff) 300 301 DosBeep(250, 100); // Complain 301 302 WinCheckButton(hwnd, CFGA_DEFARC, FALSE); … … 372 373 fQuickArcFind = WinQueryButtonCheckstate(hwnd, CFGA_QUICKARCFIND); 373 374 PrfWriteProfileData(fmprof, appname, "QuickArcFind", 374 &fQuickArcFind, sizeof(BOOL));375 &fQuickArcFind, sizeof(BOOL)); 375 376 fArcStuffVisible = WinQueryButtonCheckstate(hwnd, CFGA_ARCSTUFFVISIBLE); 376 377 PrfWriteProfileData(fmprof, appname, "ArcStuffVisible", 377 &fArcStuffVisible, sizeof(BOOL));378 &fArcStuffVisible, sizeof(BOOL)); 378 379 fFileNameCnrPath = WinQueryButtonCheckstate(hwnd, CFGA_FILENAMEPATH); 379 380 PrfWriteProfileData(fmprof, appname, "FileNamePathCnr", &fFileNameCnrPath, sizeof(BOOL)); … … 1435 1436 1436 1437 if ((fShowFSTypeInTree != WinQueryButtonCheckstate(hwnd, CFGT_SYSTYPE)) || 1437 (fShowDriveLabelInTree != WinQueryButtonCheckstate(hwnd, CFGT_LABEL)))1438 fShowSysTypeLabelChanged = TRUE;1438 (fShowDriveLabelInTree != WinQueryButtonCheckstate(hwnd, CFGT_LABEL))) 1439 fShowSysTypeLabelChanged = TRUE; 1439 1440 fShowFSTypeInTree = WinQueryButtonCheckstate(hwnd, CFGT_SYSTYPE); 1440 1441 fShowDriveLabelInTree = WinQueryButtonCheckstate(hwnd, CFGT_LABEL); … … 1442 1443 PrfWriteProfileData(fmprof, appname, "ShowDriveOnly", &fShowDriveOnly, sizeof(BOOL)); 1443 1444 PrfWriteProfileData(fmprof, appname, "ShowFSTypeInTree", 1444 &fShowFSTypeInTree, sizeof(BOOL));1445 &fShowFSTypeInTree, sizeof(BOOL)); 1445 1446 PrfWriteProfileData(fmprof, appname, "ShowDriveLabelInTree", 1446 &fShowDriveLabelInTree, sizeof(BOOL));1447 &fShowDriveLabelInTree, sizeof(BOOL)); 1447 1448 fVTreeOpensWPS = WinQueryButtonCheckstate(hwnd, CFGT_VTREEOPENSWPS); 1448 1449 PrfWriteProfileData(fmprof, (CHAR *) FM3Str, "VTreeOpensWPS", &fVTreeOpensWPS, 1449 sizeof(BOOL));1450 sizeof(BOOL)); 1450 1451 fCollapseFirst = WinQueryButtonCheckstate(hwnd, CFGT_COLLAPSEFIRST); 1451 1452 PrfWriteProfileData(fmprof, appname, "CollapseFirst", &fCollapseFirst, 1452 sizeof(BOOL));1453 sizeof(BOOL)); 1453 1454 fSwitchTreeOnFocus = WinQueryButtonCheckstate(hwnd, 1454 CFGT_SWITCHTREEONFOCUS);1455 CFGT_SWITCHTREEONFOCUS); 1455 1456 PrfWriteProfileData(fmprof, appname, "SwitchTreeOnFocus", 1456 &fSwitchTreeOnFocus, sizeof(BOOL));1457 &fSwitchTreeOnFocus, sizeof(BOOL)); 1457 1458 fSwitchTreeExpand = WinQueryButtonCheckstate(hwnd, CFGT_SWITCHTREEEXPAND); 1458 1459 PrfWriteProfileData(fmprof, appname, "SwitchTreeExpand", 1459 &fSwitchTreeExpand, sizeof(BOOL));1460 &fSwitchTreeExpand, sizeof(BOOL)); 1460 1461 fSwitchTreeOnDirChg = WinQueryButtonCheckstate(hwnd, CFGT_SWITCHTREEONDIRCHG); 1461 1462 PrfWriteProfileData(fmprof, appname, "SwitchTree", &fSwitchTreeOnDirChg, 1462 sizeof(BOOL));1463 sizeof(BOOL)); 1463 1464 fFollowTree = WinQueryButtonCheckstate(hwnd, CFGT_FOLLOWTREE); 1464 1465 PrfWriteProfileData(fmprof, appname, "FollowTree", &fFollowTree, 1465 sizeof(BOOL));1466 sizeof(BOOL)); 1466 1467 fTopDir = WinQueryButtonCheckstate(hwnd, CFGT_TOPDIR); 1467 1468 PrfWriteProfileData(fmprof, appname, "TopDir", (PVOID) & fTopDir, 1468 sizeof(BOOL));1469 sizeof(BOOL)); 1469 1470 fDCOpens = WinQueryButtonCheckstate(hwnd, CFGT_DCOPENS); 1470 1471 PrfWriteProfileData(fmprof, appname, "DoubleClickOpens", &fDCOpens, 1471 sizeof(BOOL));1472 sizeof(BOOL)); 1472 1473 fShowEnvChanged = (fShowEnv != WinQueryButtonCheckstate(hwnd, CFGT_SHOWENV)); 1473 1474 fShowEnv = WinQueryButtonCheckstate(hwnd, CFGT_SHOWENV); 1474 1475 PrfWriteProfileData(fmprof, appname, "ShowEnv", &fShowEnv, sizeof(BOOL)); 1475 1476 { 1476 char * pszTemp = xmalloc(WinQueryDlgItemTextLength(hwnd, CFGT_ENVVARLIST) + 1,1477 pszSrcFile, __LINE__);1478 if (pszTemp) {1479 WinQueryDlgItemText(hwnd, CFGT_ENVVARLIST, MaxComLineStrg, pszTemp);1480 strupr(pszTemp);1481 if (strcmp(pszTemp, pszTreeEnvVarList)) {1482 fTreeEnvVarListChanged = TRUE;1483 strcpy(pszTreeEnvVarList, pszTemp);1484 PrfWriteProfileString(fmprof, appname, "TreeEnvVarList", pszTreeEnvVarList);1485 }1486 free(pszTemp);1487 }1488 if (hwndTree && (fShowEnvChanged || (fShowEnv && fTreeEnvVarListChanged) ||1489 fShowSysTypeLabelChanged)) {1490 PCNRITEM pci = WinSendMsg(WinWindowFromID1491 (WinWindowFromID(hwndTree, FID_CLIENT),1492 TREE_CNR), CM_QUERYRECORDEMPHASIS,1493 MPFROMLONG(CMA_FIRST),1494 MPFROMSHORT(CRA_SELECTED));1495 WinSendMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID);1496 if (strlen(pci->pszFileName) > 3 && fSwitchTreeExpand) {1497 pszTemp = xstrdup(pci->pszFileName, pszSrcFile, __LINE__);1498 if (pszTemp) {1499 if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszTemp), MPVOID))1500 free(pszTemp);1501 //pszTemp is freed in the UM_SHOWME code1502 }1503 }1504 }1477 char * pszTemp = xmalloc(WinQueryDlgItemTextLength(hwnd, CFGT_ENVVARLIST) + 1, 1478 pszSrcFile, __LINE__); 1479 if (pszTemp) { 1480 WinQueryDlgItemText(hwnd, CFGT_ENVVARLIST, MaxComLineStrg, pszTemp); 1481 strupr(pszTemp); 1482 if (strcmp(pszTemp, pszTreeEnvVarList)) { 1483 fTreeEnvVarListChanged = TRUE; 1484 strcpy(pszTreeEnvVarList, pszTemp); 1485 PrfWriteProfileString(fmprof, appname, "TreeEnvVarList", pszTreeEnvVarList); 1486 } 1487 free(pszTemp); 1488 } 1489 if (hwndTree && (fShowEnvChanged || (fShowEnv && fTreeEnvVarListChanged) || 1490 fShowSysTypeLabelChanged)) { 1491 PCNRITEM pci = WinSendMsg(WinWindowFromID 1492 (WinWindowFromID(hwndTree, FID_CLIENT), 1493 TREE_CNR), CM_QUERYRECORDEMPHASIS, 1494 MPFROMLONG(CMA_FIRST), 1495 MPFROMSHORT(CRA_SELECTED)); 1496 WinSendMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 1497 if (strlen(pci->pszFileName) > 3 && fSwitchTreeExpand) { 1498 pszTemp = xstrdup(pci->pszFileName, pszSrcFile, __LINE__); 1499 if (pszTemp) { 1500 if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszTemp), MPVOID)) 1501 free(pszTemp); 1502 //pszTemp is freed in the UM_SHOWME code 1503 } 1504 } 1505 } 1505 1506 } 1506 1507 break; … … 1624 1625 dummy = WinQueryButtonCheckstate(hwnd, CFGG_APPSEPARATESETTINGS); 1625 1626 if (dummy != fAppSeparateSettings) { 1626 fAppSeparateSettings = dummy;1627 PrfWriteProfileData(fmprof, realappname, "SeparateParms",1627 fAppSeparateSettings = dummy; 1628 PrfWriteProfileData(fmprof, realappname, "SeparateParms", 1628 1629 &fAppSeparateSettings, sizeof(BOOL)); 1629 1630 WinSendMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), 1630 UM_UNDO, MPVOID, MPVOID);1631 if (fAppSeparateSettings)1632 strcpy(appname, realappname);1633 else1634 strcpy(appname, FM3Str);1631 UM_UNDO, MPVOID, MPVOID); 1632 if (fAppSeparateSettings) 1633 strcpy(appname, realappname); 1634 else 1635 strcpy(appname, FM3Str); 1635 1636 } 1636 1637 … … 1691 1692 fConfirmTarget = WinQueryButtonCheckstate(hwnd, CFGG_CONFIRMTARGET); 1692 1693 PrfWriteProfileData(fmprof, appname, "ConfirmTarget", 1693 &fConfirmTarget, sizeof(BOOL));1694 &fConfirmTarget, sizeof(BOOL)); 1694 1695 fAlertBeepOff = WinQueryButtonCheckstate(hwnd, CFGG_ALERTBEEPOFF); 1695 1696 PrfWriteProfileData(fmprof, appname, "AlertBeepOff", 1696 &fAlertBeepOff, sizeof(BOOL));1697 &fAlertBeepOff, sizeof(BOOL)); 1697 1698 fErrorBeepOff = WinQueryButtonCheckstate(hwnd, CFGG_ERRORBEEPOFF); 1698 1699 PrfWriteProfileData(fmprof, appname, "ErrorBeepOff", 1699 &fErrorBeepOff, sizeof(BOOL));1700 &fErrorBeepOff, sizeof(BOOL)); 1700 1701 fWarnReadOnly = WinQueryButtonCheckstate(hwnd, CFGG_WARNREADONLY); 1701 1702 PrfWriteProfileData(fmprof, appname, "WarnReadOnly", 1702 &fWarnReadOnly, sizeof(BOOL));1703 &fWarnReadOnly, sizeof(BOOL)); 1703 1704 { 1704 1705 WinSendDlgItemMsg(hwnd, CFGG_CMDLNLNGTH, SPBM_QUERYVALUE, … … 1976 1977 // Save state and restore to refresh windows with new settings 1977 1978 if (SaveDirCnrState(hwndMain, PCSZ_FM2TEMPTEXT) > 0) { 1978 PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG( 2));1979 PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG(RESTORE_STATE_CLOSE_CHILDREN)); 1979 1980 // PostMsg(hwndMain, UM_RESTORE, MPVOID, MPVOID); 1980 PostMsg(MainObjectHwnd, UM_RESTORE, (PSZ) PCSZ_FM2TEMPTEXT, MP VOID);1981 PostMsg(MainObjectHwnd, UM_RESTORE, (PSZ) PCSZ_FM2TEMPTEXT, MPFROMLONG(RESTORE_STATE_RESTORE)); 1981 1982 } 1982 1983 } … … 3077 3078 "CollectorflWindowAttr", 3078 3079 &flWindowAttr, sizeof(ULONG)); 3079 //This is set to maximize the info seen in the container GKY3080 PrfWriteProfileData(fmprof,3080 //This is set to maximize the info seen in the container GKY 3081 PrfWriteProfileData(fmprof, 3081 3082 appname, 3082 3083 "Collector.Fontnamesize", … … 3404 3405 (WinQuerySysValue(HWND_DESKTOP, SV_CYICON) * 2), 3405 3406 SWP_MOVE | SWP_SIZE); 3406 }3407 if (!fToolbar) {3407 } 3408 if (!fToolbar) { 3408 3409 WinSendMsg(hwndMain, WM_COMMAND, 3409 MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID);3410 fToolbar = TRUE;3411 }3412 if (!fDrivebar) {3410 MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID); 3411 fToolbar = TRUE; 3412 } 3413 if (!fDrivebar) { 3413 3414 WinSendMsg(hwndMain, WM_COMMAND, 3414 MPFROM2SHORT(IDM_DRIVEBAR, 0), MPVOID);3415 fDrivebar = TRUE;3416 }3417 if (!fMoreButtons) {3415 MPFROM2SHORT(IDM_DRIVEBAR, 0), MPVOID); 3416 fDrivebar = TRUE; 3417 } 3418 if (!fMoreButtons) { 3418 3419 WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_MOREBUTTONS, 0), 3419 MPVOID);3420 fMoreButtons = TRUE;3421 }3422 if (!fUserComboBox) {3420 MPVOID); 3421 fMoreButtons = TRUE; 3422 } 3423 if (!fUserComboBox) { 3423 3424 WinSendMsg(hwndMain, WM_COMMAND, 3424 MPFROM2SHORT(IDM_USERLIST, 0), MPVOID);3425 fUserComboBox = TRUE;3426 }3425 MPFROM2SHORT(IDM_USERLIST, 0), MPVOID); 3426 fUserComboBox = TRUE; 3427 } 3427 3428 } 3428 3429 if (hwndTree) { … … 3506 3507 } 3507 3508 } 3508 PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG( 2L));3509 PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG(RESTORE_STATE_CLOSE_CHILDREN)); 3509 3510 PostMsg(MainObjectHwnd, UM_SETDIR, MPFROMLONG(1L), MPVOID); 3510 3511 } … … 3606 3607 } 3607 3608 } 3608 PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG( 2L));3609 PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG(RESTORE_STATE_CLOSE_CHILDREN)); 3609 3610 PostMsg(MainObjectHwnd, UM_SETDIR, MPVOID, MPVOID); 3610 3611 } … … 3720 3721 (WinQuerySysValue(HWND_DESKTOP, SV_CYICON) * 2), 3721 3722 SWP_MOVE | SWP_SIZE); 3722 }3723 if (!fToolbar) {3723 } 3724 if (!fToolbar) { 3724 3725 WinSendMsg(hwndMain, WM_COMMAND, 3725 MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID);3726 fToolbar = TRUE;3727 }3728 if (!fDrivebar) {3726 MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID); 3727 fToolbar = TRUE; 3728 } 3729 if (!fDrivebar) { 3729 3730 WinSendMsg(hwndMain, WM_COMMAND, 3730 MPFROM2SHORT(IDM_DRIVEBAR, 0), MPVOID);3731 fDrivebar = TRUE;3732 }3733 if (!fMoreButtons) {3731 MPFROM2SHORT(IDM_DRIVEBAR, 0), MPVOID); 3732 fDrivebar = TRUE; 3733 } 3734 if (!fMoreButtons) { 3734 3735 WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_MOREBUTTONS, 0), 3735 MPVOID);3736 fMoreButtons = TRUE;3737 }3738 if (!fUserComboBox) {3736 MPVOID); 3737 fMoreButtons = TRUE; 3738 } 3739 if (!fUserComboBox) { 3739 3740 WinSendMsg(hwndMain, WM_COMMAND, 3740 MPFROM2SHORT(IDM_USERLIST, 0), MPVOID);3741 fUserComboBox = TRUE;3742 }3741 MPFROM2SHORT(IDM_USERLIST, 0), MPVOID); 3742 fUserComboBox = TRUE; 3743 } 3743 3744 } 3744 3745 if (hwndTree) { … … 3777 3778 if (SaveDirCnrState(hwndMain, PCSZ_FM2TEMPTEXT) > 0) { 3778 3779 // Tell window procedure to close container windows 3779 PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG( 2));3780 PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG(RESTORE_STATE_CLOSE_CHILDREN)); 3780 3781 // Restore saved state 3781 PostMsg(MainObjectHwnd, UM_RESTORE, (PSZ) PCSZ_FM2TEMPTEXT, MP VOID);3782 PostMsg(MainObjectHwnd, UM_RESTORE, (PSZ) PCSZ_FM2TEMPTEXT, MPFROMLONG(RESTORE_STATE_RESTORE)); 3782 3783 } 3783 3784 } … … 3951 3952 PostMsg(hwnd, UM_FOCUSME, MPFROMLONG(np[x].hwnd), MPVOID); 3952 3953 if (!fShowedHelpThisSession) { 3953 PostMsg(np[x].hwnd, WM_COMMAND, MPFROM2SHORT(IDM_HELP, 0), MPVOID);3954 fShowedHelpThisSession = TRUE;3954 PostMsg(np[x].hwnd, WM_COMMAND, MPFROM2SHORT(IDM_HELP, 0), MPVOID); 3955 fShowedHelpThisSession = TRUE; 3955 3956 } 3956 3957 }
Note:
See TracChangeset
for help on using the changeset viewer.
