Changeset 1777
- Timestamp:
- Jun 13, 2014, 3:51:31 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
HISTORY (modified) (1 diff)
-
dll/common.c (modified) (1 diff)
-
dll/dircnrs.c (modified) (11 diffs)
-
dll/fm3res.rc (modified) (10 diffs)
-
dll/fm3str.h (modified) (7 diffs)
-
dll/init.c (modified) (3 diffs)
-
dll/mainwnd.c (modified) (4 diffs)
-
dll/mainwnd2.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/HISTORY
r1774 r1777 1 1 New stuff at the top. This list is not necessarily complete. 2 3 3.23 (beta) 4 o Rework FM/2 Lite Config menu. Add drag&drop dialog toggle. (Steven) 5 o Rework FM/2 Lite Config menu. Add confirm delete toggle. (Steven) 6 o Correct View, Sort and Filter button initialization. (Steven) 7 o Rework FM/2 Config menu. Add confirm delete toggle. (Steven) 2 8 3 9 3.22 -
trunk/dll/common.c
r1655 r1777 180 180 181 181 rc = PFNWPStatic(hwnd, msg, mp1, mp2); 182 switch (WinQueryWindowUShort(hwnd, QWS_ID)) 183 case DIR_SORT: 184 case DIR_VIEW: 185 case DIR_FILTER: 182 // 2014-06-11 SHL 183 switch (WinQueryWindowUShort(hwnd, QWS_ID)) { 184 case DIR_SORT: 185 case DIR_VIEW: 186 case DIR_FILTER: 186 187 //fixme to allow user to change presparams 1-10-09 GKY 187 188 SetPresParams(hwnd, &RGBGREY, &RGBBLACK, &RGBBLACK, FNT_8HELVETICA); 188 return rc; 189 } 190 } 189 return rc; 190 } 191 } 192 } // switch msg 191 193 return PFNWPStatic(hwnd, msg, mp1, mp2); 192 194 } -
trunk/dll/dircnrs.c
r1756 r1777 747 747 case UM_SETUP: 748 748 # ifdef FORTIFY 749 // DbgMsg(pszSrcFile, __LINE__, "UM_SETUP hwnd %p TID %u", hwnd, GetTidForThread()); // 18 Jul 08 SHL fixme749 // DbgMsg(pszSrcFile, __LINE__, "UM_SETUP hwnd %p TID %u", hwnd, GetTidForThread()); // 18 Jul 08 SHL fixme 750 750 Fortify_EnterScope(); 751 751 # endif … … 878 878 WinSendMsg(hwndMain, UM_LOADFILE, MPVOID, MPVOID); 879 879 } 880 while (fInitialDriveScan) 881 DosSleep(100); 880 while (fInitialDriveScan) { 881 DosSleep(100); // Allow to complete 882 } 882 883 if (fSwitchTree && hwndTree) { 883 884 // Keep drive tree in sync with directory container … … 1414 1415 strcpy(dcd->previous, dcd->directory); 1415 1416 strcpy(dcd->directory, fullname); 1416 // DosEnterCritSec(); //GKY 11-27-081417 // DosEnterCritSec(); // GKY 11-27-08 1417 1418 dcd->stopflag++; 1418 // DosExitCritSec();1419 // DbgMsg(pszSrcFile, __LINE__, "WM_RESCAN");1419 // DosExitCritSec(); 1420 // DbgMsg(pszSrcFile, __LINE__, "WM_RESCAN"); 1420 1421 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 1421 1422 strcpy(dcd->directory, dcd->previous); 1422 // DosEnterCritSec(); //GKY 11-27-081423 // DosEnterCritSec(); // GKY 11-27-08 1423 1424 dcd->stopflag--; 1424 // DosExitCritSec();1425 // DosExitCritSec(); 1425 1426 } 1426 1427 else if (*dcd->directory) { … … 1620 1621 } 1621 1622 else 1622 DosSleep(32); // 05 Aug 07 GKY 641623 DosSleep(32); // 05 Aug 07 GKY 64 1623 1624 WinEnableMenuItem(DirCnrMenu, IDM_FINDINTREE, (hwndTree != (HWND) 0)); 1624 1625 } 1626 // 2014-06-11 SHL fm/2 lite can get here before drive scan completes 1625 1627 if (!fInitialDriveScan) 1626 1628 PostMsg(hwnd, UM_SETUP2, MPVOID, MPVOID); … … 1634 1636 case UM_SETUP2: 1635 1637 if (dcd) { 1638 // DbgMsg(pszSrcFile, __LINE__, "DirCnrWndProc UM_SETUP2 %x", hwnd); 1636 1639 AdjustCnrColsForPref(hwnd, NULL, &dcd->ds, FALSE); 1637 1640 SayFilter(WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), … … 1847 1850 strcpy(newfile, dcd->directory); 1848 1851 AddBackslashToPath(newfile); 1849 //if (newfile[strlen(newfile) - 1] != '\\') 1850 // strcat(newfile, "\\"); 1852 # if 0 1853 if (newfile[strlen(newfile) - 1] != '\\') 1854 strcat(newfile, "\\"); 1855 # endif 1851 1856 strcat(newfile, sip.ret); 1852 1857 test = IsFile(newfile); … … 2124 2129 TileChildren(dcd->hwndParent, TRUE); 2125 2130 WinSetWindowPos(hwndC, HWND_TOP, 0, 0, 0, 0, SWP_ACTIVATE); 2126 DosSleep(100); // 05 Aug 07 GKY 2502131 DosSleep(100); // 05 Aug 07 GKY 250 2127 2132 } 2128 2133 } … … 2147 2152 2148 2153 case IDM_COLLECTOR: 2149 DosSleep(32); // 05 Aug 07 GKY 642154 DosSleep(32); // 05 Aug 07 GKY 64 2150 2155 { 2151 2156 CHAR **list; … … 2212 2217 2213 2218 case IDM_RESORT: 2214 // WinSendMsg(hwnd, 2215 // CM_SORTRECORD, 2216 // MPFROMP(SortDirCnr), 2217 // MPFROMLONG((fSyncUpdates) ? sortFlags : dcd->sortFlags)); 2219 # if 0 2220 WinSendMsg(hwnd, 2221 CM_SORTRECORD, 2222 MPFROMP(SortDirCnr), 2223 MPFROMLONG((fSyncUpdates) ? sortFlags : dcd->sortFlags)); 2224 #endif 2218 2225 WinSendMsg(hwnd, 2219 2226 CM_SORTRECORD, … … 2315 2322 //DosEnterCritSec(); //GKY 11-27-08 2316 2323 dcd->stopflag++; 2317 // DosExitCritSec();2318 // DbgMsg(pszSrcFile, __LINE__, "WM_RESCAN");2324 // DosExitCritSec(); 2325 // DbgMsg(pszSrcFile, __LINE__, "WM_RESCAN"); 2319 2326 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPVOID)) { 2320 2327 //DosEnterCritSec(); //GKY 11-27-08 … … 2769 2776 if (pci->attrFile & FILE_DIRECTORY) { 2770 2777 menuHwnd = CheckMenu(hwndMainMenu, &DirMenu, DIR_POPUP); 2771 //WinEnableMenuItem(DirMenu,IDM_TREE,TRUE);2778 // WinEnableMenuItem(DirMenu,IDM_TREE,TRUE); 2772 2779 } 2773 2780 else -
trunk/dll/fm3res.rc
r1769 r1777 75 75 Use the test archive string from the first working archive description. 76 76 Enhance the error message. Ticket 502 77 77 78 78 ***********************************************************************/ 79 79 … … 324 324 MENUITEM "Toggle ~bottom buttons\tCtrl + F8",IDM_MOREBUTTONS 325 325 MENUITEM "Toggle dri~vebar\tCtrl + Shift + F8",IDM_DRIVEBAR 326 MENUITEM "Toggle ~confirm deletes",IDM_CONFIRMDELETE // 2014-05-17 SHL 326 327 MENUITEM "Toggle ~drag&drop prompting",IDM_TOGGLEDRAGDIALOG // 12 Jan 08 SHL 327 328 MENUITEM "Toggle ~immediate updates",IDM_SYNCUPDATES // 16 Jan 08 SHL … … 538 539 MENUITEM "Toolbar t~itles", IDM_TOOLTITLES 539 540 } 541 MENUITEM "Toggle ~confirm deletes",IDM_CONFIRMDELETE // 2014-05-17 SHL 542 MENUITEM "Toggle ~drag&drop prompting",IDM_TOGGLEDRAGDIALOG // 2014-05-15 SHL 540 543 MENUITEM "Toggle ~autoview window\tF4",IDM_AUTOVIEW 541 544 MENUITEM "", -1, MIS_SEPARATOR … … 1559 1562 MENUITEM "WPS directory ~Tree", IDM_OPENDIRTREE 1560 1563 } 1561 SUBMENU "Create objects", IDM_OBJECTSUBMENU 1564 SUBMENU "Create objects", IDM_OBJECTSUBMENU 1562 1565 { 1563 1566 MENUITEM "~Shadows...", IDM_SHADOW … … 2886 2889 IDS_ADSTARTLISTTEXT "The string that comes before files in a listing." 2887 2890 IDS_ADENDLISTTEXT "The string that comes after files in a listing." 2888 IDS_ADCHANGESONDISKTEXT "Archiverbb2 has changed on disk" 2891 IDS_ADCHANGESONDISKTEXT "Archiverbb2 has changed on disk" 2889 2892 IDS_ADRELOADMEMTEXT "Do you wish to reload it" 2890 2893 IDS_ADCHANGESINMEMTEXT "Changes recorded in memory." … … 3104 3107 IDS_ALLTEXTTEXT ", all text" 3105 3108 IDS_MIXEDTYPESTEXT ", mixed types" 3106 IDS_BINARYBYTESTEXT " Binary data (%u bytes)"3109 IDS_BINARYBYTESTEXT "%sBinary data (%u bytes)" 3107 3110 IDS_BITMAPBYTESTEXT "Bitmap data (%u bytes)" 3108 3111 IDS_METAFILEBYTESTEXT "Metafile data (%u bytes)" … … 3110 3113 IDS_ASN1BYTESTEXT "ASN1 data (%u bytes)" 3111 3114 IDS_UNKNOWNBYTESTEXT "Unknown datatype 0x%04x (%u bytes)" 3115 IDS_CRITICALEA "Critical EA - " // 2014-02-10 SHL 3112 3116 IDS_DATABARTITLETEXT "FM/2 Databar" 3113 3117 IDS_NTFSDRIVERFAILSTEXT "The NTFS.IFS fails with a NO_MORE_FILES_ERROR on each subdirectory. We have not found a work around as yet." … … 3392 3396 IDS_NOTARGETSET "A target directory has not been set" 3393 3397 IDS_LEFTRIGHTOUTOFSYNC "pcil and pcir out of sync" 3394 IDS_CONFIRMDELETE "Confirm Delete" 3398 IDS_CONFIRMDELETE "Confirm Delete" 3395 3399 IDS_DOYOUWISHTODELETE "Do you wish to delete %s" 3396 3400 IDS_DROPSETSTARGET "Do you wish to use this directory as the new target directory? \nYes sets target\nNo proceeds with drag/drop operation to current target" 3397 IDS_MB2DYES "~Yes" 3401 IDS_MB2DYES "~Yes" 3398 3402 IDS_MB2DYESDONTASK "Yes ~don't ask again" 3399 IDS_MB2DNO "~No" 3400 IDS_MB2DCANCELOP "~Cancel operation" 3403 IDS_MB2DNO "~No" 3404 IDS_MB2DCANCELOP "~Cancel operation" 3401 3405 IDS_SNAPSHOTFILEBADFORMAT "The snapshot file lists no files or is not formatted correctly" 3402 3406 IDS_SNAPSHOTFILELOADFAILED "The snapshot file %s failed to load" 3403 3407 IDS_LZIPLIMITATION "Lzip Limitation" 3404 3408 IDS_LZIPNOLIST "Lzip doesn't have a list files option" 3405 3406 3407 3409 3410 3408 3411 // Add strings that need to be combined by GetPString here 3409 3412 IDS_SUGGEST1TEXT1 "Based on this scan of your drives, I would like to suggest the following parameters for your FM/2 program object (each letter following the '/' character is a drive that probably should be excluded from viewing by FM/2 (see README), and the '%%*' on the" … … 3445 3448 HELPITEM ASEL_FRAME, ID_HELPSUBTABLEB, HELP_ARCHIVERS 3446 3449 HELPITEM ASEL_EDIT_FRAME, ID_HELPSUBTABLEA, HELP_EDITARC 3447 HELPITEM FLE_FRAME, ID_HELPSUBTABLEA, HELP_INFO 3448 HELPITEM CMD_FRAME, ID_HELPSUBTABLEA, HELP_COMMAND 3450 HELPITEM FLE_FRAME, ID_HELPSUBTABLEA, HELP_INFO 3451 HELPITEM CMD_FRAME, ID_HELPSUBTABLEA, HELP_COMMAND 3449 3452 HELPITEM EA_FRAME, ID_HELPSUBTABLEB, HELP_EAS 3450 3453 } … … 3458 3461 HELPSUBITEM MAIN_CMDLIST, HELP_USERLISTS 3459 3462 HELPSUBITEM MAIN_BUTTONLIST, HELP_USERLISTS 3460 3463 3461 3464 } 3462 3465 -
trunk/dll/fm3str.h
r1769 r1777 751 751 #define IDS_DATABARTITLETEXT 723 752 752 #define IDS_NTFSDRIVERFAILSTEXT 724 753 // Must be ordered & sequential753 // Must be ordered & sequential 754 754 #define IDS_SUNDAY 725 755 755 #define IDS_MONDAY 726 … … 759 759 #define IDS_FRIDAY 730 760 760 #define IDS_SATURDAY 731 761 // End O & S761 // End of must be order & sequential 762 762 #define IDS_SWAPTITLETEXT 732 763 763 #define IDS_MEMTITLETEXT 733 … … 870 870 #define IDS_FLWRITEVERIFYOFFTEXT 839 871 871 #define IDS_FLRECURSESCANDONETEXT 840 872 // End drive flag strings872 // End of drive flag strings 873 873 #define IDS_CANTQUERYVOLTEXT 841 874 874 #define IDS_CANTQUERYALLOCTEXT 842 … … 889 889 #define IDS_PLEASEWAITSCANNINGTEXT 858 890 890 #define IDS_PLEASEWAITCOUNTINGTEXT 859 891 #define IDS_ SPARE_860 860891 #define IDS_CRITICALEA 860 // 2014-02-10 SHL 892 892 #define IDS_CONFIRMDELETE 861 893 893 #define IDS_DOYOUWISHTODELETE 862 … … 913 913 #define IDS_LZIPLIMITATION 881 914 914 #define IDS_LZIPNOLIST 882 915 #define IDS_ DECRYPT1TEXT 883 //Not used916 #define IDS_ DECRYPT2TEXT 884 //Not used917 #define IDS_ DECRYPT3TEXT 885 //Not used915 #define IDS_SPARE_883 883 916 #define IDS_SPARE_884 884 917 #define IDS_SPARE_885 885 918 918 #define IDS_SOURCEISATEXT 886 919 919 #define IDS_DIRECTORYTEXT 887 … … 1057 1057 #define IDS_ARCMISSINGEXEVERBOSE 1026 1058 1058 1059 // The following strings were cut up form the string of the root name (ie IDS_SUGGEST1TEXT)1060 // This was done as part of the conversion to a StringTable where strings are limited to 2551059 // The following strings were cut up form the string of the root name (ie IDS_SUGGEST1TEXT) 1060 // This was done as part of the conversion to a StringTable where strings are limited to 255 1061 1061 #define IDS_SUGGEST1TEXT1 10000 1062 1062 #define IDS_SUGGEST1TEXT2 10001 … … 1087 1087 #define IDS_FM2CMDHELPTEXT2 10101 1088 1088 #define IDS_FM2CMDHELPTEXT3 10102 1089 // End of cut stringthat existed when we converted to a StringTable 11 Jan 09 GKY1089 // End of cut up strings that existed when we converted to a StringTable 11 Jan 09 GKY -
trunk/dll/init.c
r1753 r1777 803 803 if (p) { 804 804 p++; 805 ul = strtoul(p, NULL, 16);805 ul = strtoul(p, NULL, 16); 806 806 GetDosPgmName(ul, temp); 807 807 if (!strstr(temp, "FM/2") && … … 1199 1199 //Get default Country info 1200 1200 { 1201 COUNTRYCODE Country = {0}; 1202 ULONG ulInfoLen = 0; 1203 COUNTRYINFO CtryInfo = {0}; 1204 1205 if (!DosQueryCtryInfo(sizeof(CtryInfo), &Country, &CtryInfo, &ulInfoLen)) { 1206 *ThousandsSeparator = CtryInfo.szThousandsSeparator[0]; 1207 strcpy(DateSeparator, CtryInfo.szDateSeparator); 1208 strcpy(TimeSeparator, CtryInfo.szTimeSeparator); 1209 ulDateFmt = CtryInfo.fsDateFmt; 1210 ulTimeFmt = CtryInfo.fsTimeFmt; 1211 //DbgMsg(pszSrcFile, __LINE__, "Date Fmt %x", ulDateFmt); 1212 } 1213 else { 1214 strcpy(ThousandsSeparator, ","); 1215 strcpy(DateSeparator, "/"); 1216 strcpy(TimeSeparator, ":"); 1217 ulDateFmt = 0; 1218 ulTimeFmt = 0; 1219 } 1220 } 1221 { // Check for the existance of various partitioning tools to set up menu items 1201 COUNTRYCODE Country = {0}; 1202 ULONG ulInfoLen = 0; 1203 COUNTRYINFO CtryInfo = {0}; 1204 1205 if (!DosQueryCtryInfo(sizeof(CtryInfo), &Country, &CtryInfo, &ulInfoLen)) { 1206 *ThousandsSeparator = CtryInfo.szThousandsSeparator[0]; 1207 strcpy(DateSeparator, CtryInfo.szDateSeparator); 1208 strcpy(TimeSeparator, CtryInfo.szTimeSeparator); 1209 ulDateFmt = CtryInfo.fsDateFmt; 1210 ulTimeFmt = CtryInfo.fsTimeFmt; 1211 //DbgMsg(pszSrcFile, __LINE__, "Date Fmt %x", ulDateFmt); 1212 } 1213 else { 1214 strcpy(ThousandsSeparator, ","); 1215 strcpy(DateSeparator, "/"); 1216 strcpy(TimeSeparator, ":"); 1217 ulDateFmt = 0; 1218 ulTimeFmt = 0; 1219 } 1220 } 1221 { 1222 // Check for the existance of various partitioning tools to set up menu items 1222 1223 ULONG ulAppType; 1223 1224 … … 1416 1417 PrfQueryProfileData(fmprof, appname, "ShowEnv", &fShowEnv, &size); 1417 1418 PrfQueryProfileString(fmprof, appname, "TreeEnvVarList", "PATH;DPATH;LIBPATH;HELP;BOOKSHELF;", 1418 pszTreeEnvVarList, MaxComLineStrg);1419 pszTreeEnvVarList, MaxComLineStrg); 1419 1420 size = sizeof(BOOL); 1420 1421 PrfQueryProfileData(fmprof, appname, "ShowDriveOnly", &fShowDriveOnly, &size); -
trunk/dll/mainwnd.c
r1704 r1777 565 565 } 566 566 567 /** 568 * Sync menu item checkmarks to match globals 569 * Called before submenu or context menu opened 570 * Does more work than really needed, but makes code easier to maintain 571 */ 572 567 573 static VOID SetToggleChecks(HWND hwndMenu) 568 574 { … … 578 584 WinCheckMenuItem(hwndMenu, IDM_AUTOTILE, fAutoTile); 579 585 WinCheckMenuItem(hwndMenu, IDM_TILEBACKWARDS, fTileBackwards); 586 WinCheckMenuItem(hwndMenu, IDM_CONFIRMDELETE, fConfirmDelete); // 2014-05-17 SHL 580 587 WinCheckMenuItem(hwndMenu, IDM_TOGGLEDRAGDIALOG, fDragndropDlg); 581 588 WinCheckMenuItem(hwndMenu, IDM_SYNCUPDATES, fSyncUpdates); … … 5475 5482 break; 5476 5483 5484 // 2014-05-17 SHL 5485 case IDM_CONFIRMDELETE: 5486 SetMenuCheck(WinQueryWindowULong(hwnd, QWL_USER), 5487 IDM_CONFIRMDELETE, 5488 &fConfirmDelete, 5489 TRUE, 5490 "ConfirmDelete"); 5491 break; 5492 5477 5493 case IDM_TOGGLEDRAGDIALOG: 5478 5494 SetMenuCheck(WinQueryWindowULong(hwnd, QWL_USER), … … 6641 6657 } 6642 6658 DosSleep(1); 6643 return 0; // Suppress WinDefWindowProc WM_QUIT message generation6659 return 0; // Suppress WinDefWindowProc WM_QUIT message generation 6644 6660 6645 6661 case UM_CLOSE: -
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.
