Changeset 1777 for trunk/dll/mainwnd2.c
- Timestamp:
- Jun 13, 2014, 3:51:31 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/dll/mainwnd2.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/mainwnd2.c
r1700 r1777 28 28 10 Dec 08 SHL Integrate exception handler support 29 29 03 Jan 09 GKY Check for system that is protectonly to gray out Dos/Win command lines and prevent 30 Dos/Win programs from being inserted into the execute dialog with message why.30 Dos/Win programs from being inserted into the execute dialog with message why. 31 31 21 Jun 09 GKY Added drive letter to bitmap buttons in drive bar; Eliminate static drive 32 letter windows; Use button ID to identify drive letter for processing.32 letter windows; Use button ID to identify drive letter for processing. 33 33 22 Jul 09 GKY Code changes to use semaphores to serialize drive scanning 34 34 12 Sep 09 GKY Add FM3.INI User ini and system ini to submenu for view ini 35 35 13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in 36 profile calls for user settings that work and are setable in more than one37 miniapp; FM3Str should be used for setting only relavent to FM/2 or that38 aren't user settable; realappname should be used for setting applicable to39 one or more miniapp but not to FM/236 profile calls for user settings that work and are setable in more than one 37 miniapp; FM3Str should be used for setting only relavent to FM/2 or that 38 aren't user settable; realappname should be used for setting applicable to 39 one or more miniapp but not to FM/2 40 40 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 41 41 11 Apr 10 GKY Fix drive tree rescan failure and program hang caused by event sem 42 never being posted42 never being posted 43 43 12 Aug 12 GKY Allow for selection of include subdirectories or a list file on initial startup of compare dirs 44 44 … … 76 76 // SetSysMenu 77 77 #include "mainwnd.h" // CloseChildren, MainWMCommand, MakeMainObjWin, ResizeDrives 78 // TopWindow78 // TopWindow 79 79 #include "common.h" // CommonCreateMainChildren, CommonMainWndProc 80 80 #include "notify.h" // HideNote … … 459 459 case IDM_AUTOVIEWFILE: 460 460 case IDM_AUTOVIEW: 461 case IDM_CONFIRMDELETE: // 2014-05-17 SHL 462 case IDM_TOGGLEDRAGDIALOG: // 2014-05-15 SHL 461 463 // case IDM_SYSINFO: 462 464 case IDM_HIDENOTEWND: … … 555 557 strcpy(cmp->leftdir, wa.szCurrentPath1); 556 558 strcpy(cmp->rightdir, wa.szCurrentPath2); 557 cmp->listfile = wa.listfile;558 cmp->includesubdirs = wa.includesubdirs;559 cmp->listfile = wa.listfile; 560 cmp->includesubdirs = wa.includesubdirs; 559 561 cmp->hwndParent = hwnd; 560 562 cmp->dcd.hwndParent = hwnd; … … 783 785 { 784 786 PERSON1DATA *pd; 787 TID tid; 788 SWP swp; 789 PFNWP oldproc; 790 HWND hwndMenu; 791 DIRCNRDATA *dcd; 792 HWND hwndC; 793 ULONG which; 794 ULONG size; 785 795 786 796 switch (msg) { 787 797 case WM_CREATE: 788 { 789 TID tid; 790 791 WinQueryWindowProcess(hwnd, &mypid, &tid); 792 } 798 WinQueryWindowProcess(hwnd, &mypid, &tid); 793 799 hwndMain = hwnd; 800 794 801 WinSetWindowUShort(hwnd, QWL_USER + 8, 0); 795 802 WinSetWindowUShort(hwnd, QWL_USER + 10, 0); … … 815 822 WinSetWindowPtr(hwnd, QWL_USER + 4, (PVOID) pd); 816 823 } 817 { 818 SWP swp;819 PFNWP oldproc;820 821 // create frame children (not client children, frame children)822 DosSleep(1);823 WinQueryWindowPos(WinQueryWindow(hwnd, QW_PARENT), &swp);824 oldproc = WinSubclassWindow(WinQueryWindow(hwnd, QW_PARENT),825 (PFNWP) MainFrameWndProc2); 826 if (oldproc)827 WinSetWindowPtr(WinQueryWindow(hwnd, QW_PARENT), QWL_USER, (PVOID) oldproc); 828 CommonCreateMainChildren(hwnd, &swp);829 830 { 831 HWND hwndMenu; 832 833 hwndMenu = WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), FID_MENU); 834 WinSetWindowULong(hwnd, QWL_USER, hwndMenu); 835 CfgMenuInit(hwndMenu, FALSE); // 14 Feb 08 SHL 836 SetConditionalCascade(hwndMenu, IDM_COMMANDLINESUBMENU, IDM_COMMANDLINE); 837 if (fProtectOnly) {838 WinEnableMenuItem(hwndMenu, IDM_DOSCOMMANDLINE, FALSE);839 WinEnableMenuItem(hwndMenu, IDM_WINFULLSCREEN, FALSE);840 }841 SetConditionalCascade(hwndMenu, IDM_COMMANDSMENU, IDM_DOITYOURSELF); 842 SetConditionalCascade(hwndMenu, IDM_TOOLSUBMENU, IDM_TOOLBAR);843 }844 } 824 825 // create frame children (not client children, frame children) 826 DosSleep(1); 827 WinQueryWindowPos(WinQueryWindow(hwnd, QW_PARENT), &swp); 828 oldproc = WinSubclassWindow(WinQueryWindow(hwnd, QW_PARENT), 829 (PFNWP) MainFrameWndProc2); 830 if (oldproc) 831 WinSetWindowPtr(WinQueryWindow(hwnd, QW_PARENT), QWL_USER, (PVOID) oldproc); 832 833 CommonCreateMainChildren(hwnd, &swp); 834 835 hwndMenu = WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), FID_MENU); 836 WinSetWindowULong(hwnd, QWL_USER, hwndMenu); 837 838 // 2014-05-15 SHL FIXME to be sure needed 839 // WinCheckMenuItem(hwndMenu, IDM_TOGGLEDRAGDIALOG, fDragndropDlg); // 2014-05-15 SHL 840 841 CfgMenuInit(hwndMenu, FALSE); // 14 Feb 08 SHL 842 SetConditionalCascade(hwndMenu, IDM_COMMANDLINESUBMENU, IDM_COMMANDLINE); 843 844 if (fProtectOnly) { 845 WinEnableMenuItem(hwndMenu, IDM_DOSCOMMANDLINE, FALSE); 846 WinEnableMenuItem(hwndMenu, IDM_WINFULLSCREEN, FALSE); 847 } 848 849 SetConditionalCascade(hwndMenu, IDM_COMMANDSMENU, IDM_DOITYOURSELF); 850 SetConditionalCascade(hwndMenu, IDM_TOOLSUBMENU, IDM_TOOLBAR); 851 845 852 WinSetWindowText(WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), 846 853 FID_TITLEBAR), "FM/2 Lite"); 854 847 855 FixSwitchList(WinQueryWindow(hwnd, QW_PARENT), NULL); 848 856 SetSysMenu(WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), FID_SYSMENU)); … … 852 860 pd = WinQueryWindowPtr(hwnd, QWL_USER + 4); 853 861 if (pd) { 854 855 862 CHAR s[CCHMAXPATH]; 856 ULONG size;857 DIRCNRDATA *dcd;858 HWND hwndC;859 863 BOOL dummy = TRUE; 860 864 861 865 size = sizeof(BOOL); 862 866 PrfQueryProfileData(fmprof, realappname, "FM/4 TreeUp", 863 (PVOID) &dummy, &size);867 (PVOID) &dummy, &size); 864 868 if (dummy) { 865 869 size = sizeof(ULONG); 866 870 hwndTree = StartTreeCnr(hwnd, 3); 867 PrfQueryProfileData(fmprof, realappname, "FM/4 TreeWidth",868 (PVOID) &TreeWidth, &size);871 PrfQueryProfileData(fmprof, realappname, "FM/4 TreeWidth", 872 (PVOID) &TreeWidth, &size); 869 873 TreeWidth = max(TreeWidth, 80); 870 874 } 871 875 size = sizeof(BOOL); 872 876 if (PrfQueryProfileData(fmprof, appname, "Toolbar", &dummy, &size) && 873 size && !dummy)877 size && !dummy) 874 878 WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID); 875 879 … … 971 975 } 972 976 } 977 // 2014-06-11 SHL Initialize view, sort and filter button text 978 if (pd->hwndDir1) { 979 hwndC = WinWindowFromID(pd->hwndDir1, FID_CLIENT); 980 if (hwndC) { 981 dcd = WinQueryWindowPtr(WinWindowFromID(hwndC, DIR_CNR), QWL_USER); 982 if (dcd && dcd->hwndCnr) 983 PostMsg(dcd->hwndCnr, UM_SETUP2, MPVOID, MPVOID); 984 } 985 } 986 if (pd->hwndDir2) { 987 hwndC = WinWindowFromID(pd->hwndDir2, FID_CLIENT); 988 if (hwndC) { 989 dcd = WinQueryWindowPtr(WinWindowFromID(hwndC, DIR_CNR), QWL_USER); 990 if (dcd && dcd->hwndCnr) 991 PostMsg(dcd->hwndCnr, UM_SETUP2, MPVOID, MPVOID); 992 } 993 } 994 995 which = 0; 996 size = sizeof(ULONG); 997 if (PrfQueryProfileData(fmprof, 998 realappname, 999 "FM/4 Max", 1000 (PVOID)&which, 1001 &size) && 1002 size == sizeof(ULONG) && 1003 which) 973 1004 { 974 ULONG which = 0, size = sizeof(ULONG); 975 976 if (PrfQueryProfileData(fmprof, realappname, "FM/4 Max", 977 (PVOID) & which, 978 &size) && size == sizeof(ULONG) && which) { 979 PostMsg(hwnd, 980 UM_MAXIMIZE, 981 MPFROMLONG(((which == 1) ? 982 pd->hwndDir1 : pd->hwndDir2)), MPVOID); 983 } 1005 PostMsg(hwnd, 1006 UM_MAXIMIZE, 1007 MPFROMLONG(((which == 1) ? 1008 pd->hwndDir1 : pd->hwndDir2)), MPVOID); 984 1009 } 985 1010 PostMsg(hwnd, UM_SIZE, MPVOID, MPVOID); … … 1239 1264 break; 1240 1265 case IDM_CONFIGMENU: 1266 // 2014-05-17 SHL FIXME to use SetToggleChecks maybe 1241 1267 WinCheckMenuItem((HWND) mp2, IDM_TOOLSUBMENU, fToolbar); 1242 1268 WinCheckMenuItem((HWND) mp2, IDM_AUTOVIEW, fAutoView); 1269 WinCheckMenuItem((HWND) mp2, IDM_CONFIRMDELETE, fConfirmDelete); // 2014-05-17 SHL 1270 WinCheckMenuItem((HWND) mp2, IDM_TOGGLEDRAGDIALOG, fDragndropDlg); // 2014-05-15 SHL 1243 1271 break; 1244 1272 case IDM_TOOLSUBMENU: 1273 // 2014-05-17 SHL FIXME to use SetToggleChecks maybe 1245 1274 WinCheckMenuItem((HWND) mp2, IDM_TOOLBAR, fToolbar); 1246 1275 WinCheckMenuItem((HWND) mp2, IDM_TEXTTOOLS, fTextTools); … … 1248 1277 break; 1249 1278 case IDM_WINDOWSMENU: 1279 // 2014-05-17 SHL FIXME to use SetToggleChecks maybe 1250 1280 WinCheckMenuItem((HWND) mp2, IDM_VTREE, (hwndTree != (HWND) 0)); 1251 1281 WinCheckMenuItem((HWND) mp2, IDM_TILEBACKWARDS, fTileBackwards);
Note:
See TracChangeset
for help on using the changeset viewer.
