Changeset 1844 for trunk/dll/notebook.c
- Timestamp:
- Aug 12, 2015, 7:37:37 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 55 56 57 54 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 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 61 CONSTANT * as CHAR *. 62 62 24 Oct 10 GKY Fixed spurious error message when labels in tree are changed with a 63 63 "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 65 for delete of readonly files 66 66 09 Feb 14 GKY Fix separate parameters. Moved to general page renamed separate settings 67 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 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 375 &fQuickArcFind, sizeof(BOOL)); 375 376 fArcStuffVisible = WinQueryButtonCheckstate(hwnd, CFGA_ARCSTUFFVISIBLE); 376 377 PrfWriteProfileData(fmprof, appname, "ArcStuffVisible", 377 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 1438 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 1445 &fShowFSTypeInTree, sizeof(BOOL)); 1445 1446 PrfWriteProfileData(fmprof, appname, "ShowDriveLabelInTree", 1446 1447 &fShowDriveLabelInTree, sizeof(BOOL)); 1447 1448 fVTreeOpensWPS = WinQueryButtonCheckstate(hwnd, CFGT_VTREEOPENSWPS); 1448 1449 PrfWriteProfileData(fmprof, (CHAR *) FM3Str, "VTreeOpensWPS", &fVTreeOpensWPS, 1449 1450 sizeof(BOOL)); 1450 1451 fCollapseFirst = WinQueryButtonCheckstate(hwnd, CFGT_COLLAPSEFIRST); 1451 1452 PrfWriteProfileData(fmprof, appname, "CollapseFirst", &fCollapseFirst, 1452 1453 sizeof(BOOL)); 1453 1454 fSwitchTreeOnFocus = WinQueryButtonCheckstate(hwnd, 1454 1455 CFGT_SWITCHTREEONFOCUS); 1455 1456 PrfWriteProfileData(fmprof, appname, "SwitchTreeOnFocus", 1456 1457 &fSwitchTreeOnFocus, sizeof(BOOL)); 1457 1458 fSwitchTreeExpand = WinQueryButtonCheckstate(hwnd, CFGT_SWITCHTREEEXPAND); 1458 1459 PrfWriteProfileData(fmprof, appname, "SwitchTreeExpand", 1459 1460 &fSwitchTreeExpand, sizeof(BOOL)); 1460 1461 fSwitchTreeOnDirChg = WinQueryButtonCheckstate(hwnd, CFGT_SWITCHTREEONDIRCHG); 1461 1462 PrfWriteProfileData(fmprof, appname, "SwitchTree", &fSwitchTreeOnDirChg, 1462 1463 sizeof(BOOL)); 1463 1464 fFollowTree = WinQueryButtonCheckstate(hwnd, CFGT_FOLLOWTREE); 1464 1465 PrfWriteProfileData(fmprof, appname, "FollowTree", &fFollowTree, 1465 1466 sizeof(BOOL)); 1466 1467 fTopDir = WinQueryButtonCheckstate(hwnd, CFGT_TOPDIR); 1467 1468 PrfWriteProfileData(fmprof, appname, "TopDir", (PVOID) & fTopDir, 1468 1469 sizeof(BOOL)); 1469 1470 fDCOpens = WinQueryButtonCheckstate(hwnd, CFGT_DCOPENS); 1470 1471 PrfWriteProfileData(fmprof, appname, "DoubleClickOpens", &fDCOpens, 1471 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 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 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 1627 1627 fAppSeparateSettings = dummy; 1628 PrfWriteProfileData(fmprof, realappname, "SeparateParms", 1628 1629 &fAppSeparateSettings, sizeof(BOOL)); 1629 1630 WinSendMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), 1630 1631 1632 1633 1634 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 1694 &fConfirmTarget, sizeof(BOOL)); 1694 1695 fAlertBeepOff = WinQueryButtonCheckstate(hwnd, CFGG_ALERTBEEPOFF); 1695 1696 PrfWriteProfileData(fmprof, appname, "AlertBeepOff", 1696 1697 &fAlertBeepOff, sizeof(BOOL)); 1697 1698 fErrorBeepOff = WinQueryButtonCheckstate(hwnd, CFGG_ERRORBEEPOFF); 1698 1699 PrfWriteProfileData(fmprof, appname, "ErrorBeepOff", 1699 1700 &fErrorBeepOff, sizeof(BOOL)); 1700 1701 fWarnReadOnly = WinQueryButtonCheckstate(hwnd, CFGG_WARNREADONLY); 1701 1702 PrfWriteProfileData(fmprof, appname, "WarnReadOnly", 1702 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 3080 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 3407 } 3408 if (!fToolbar) { 3408 3409 WinSendMsg(hwndMain, WM_COMMAND, 3409 3410 3411 3412 3410 MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID); 3411 fToolbar = TRUE; 3412 } 3413 if (!fDrivebar) { 3413 3414 WinSendMsg(hwndMain, WM_COMMAND, 3414 3415 3416 3417 3415 MPFROM2SHORT(IDM_DRIVEBAR, 0), MPVOID); 3416 fDrivebar = TRUE; 3417 } 3418 if (!fMoreButtons) { 3418 3419 WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_MOREBUTTONS, 0), 3419 3420 3421 3422 3420 MPVOID); 3421 fMoreButtons = TRUE; 3422 } 3423 if (!fUserComboBox) { 3423 3424 WinSendMsg(hwndMain, WM_COMMAND, 3424 3425 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 3723 } 3724 if (!fToolbar) { 3724 3725 WinSendMsg(hwndMain, WM_COMMAND, 3725 3726 3727 3728 3726 MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID); 3727 fToolbar = TRUE; 3728 } 3729 if (!fDrivebar) { 3729 3730 WinSendMsg(hwndMain, WM_COMMAND, 3730 3731 3732 3733 3731 MPFROM2SHORT(IDM_DRIVEBAR, 0), MPVOID); 3732 fDrivebar = TRUE; 3733 } 3734 if (!fMoreButtons) { 3734 3735 WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_MOREBUTTONS, 0), 3735 3736 3737 3738 3736 MPVOID); 3737 fMoreButtons = TRUE; 3738 } 3739 if (!fUserComboBox) { 3739 3740 WinSendMsg(hwndMain, WM_COMMAND, 3740 3741 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 3954 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.