Changeset 1635 for trunk/dll/mainwnd.c
- Timestamp:
- Oct 4, 2011, 4:05:05 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/mainwnd.c
r1582 r1635 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 201 0Steven H. Levine9 Copyright (c) 2001, 2011 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 103 104 105 102 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 107 CHAR CONSTANT * as CHAR *. 108 108 11 Apr 10 GKY Fix drive tree rescan failure and program hang caused by event sem 109 109 never being posted 110 110 23 Oct 10 GKY Changes to populate and utilize a HELPTABLE for context specific help 111 03 Oct 11 SHL Add needTile to ensure containers opened on command line render correctly 112 03 Oct 11 SHL Minor code cleanup 111 113 112 114 ***********************************************************************/ … … 115 117 #include <string.h> 116 118 #include <ctype.h> 117 // #include <process.h> // _beginthread118 119 119 120 #define INCL_DOS … … 310 311 CommaFmtULL(szQty, sizeof(szQty), ullFreeQty, ' '); 311 312 sprintf(s, "%s %s (%lu%%) %s", dv, szQty, ulPctFree, GetPString(IDS_FREETEXT)); 312 313 314 313 } 314 else 315 sprintf(s, "%s ", dv); 315 316 } 316 317 } … … 1943 1944 } 1944 1945 else 1945 1946 helpid = 0; 1946 1947 } 1947 1948 break; … … 2029 2030 (!hwndBubble || 2030 2031 WinQueryWindowULong(hwndBubble, QWL_USER) != hwnd) && 2031 2032 2033 2032 !WinQueryCapture(HWND_DESKTOP)) { 2033 2034 RECTL rcl; 2034 2035 POINTL ptl; 2035 2036 … … 2037 2038 WinMapWindowPoints(HWND_DESKTOP, hwnd, &ptl, 1); 2038 2039 WinQueryWindowRect(hwnd, &rcl); 2039 2040 2041 2040 if (WinPtInRect(WinQueryAnchorBlock(hwnd), &rcl, &ptl)) { 2041 BubbleHelp(hwnd, FALSE, TRUE, FALSE, (char *)mp1); 2042 } 2042 2043 } 2043 2044 } … … 3316 3317 strcpy(eos, "Dir"); ; 3317 3318 size = sizeof(szDir); 3318 3319 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) szDir, &size)) { 3319 3320 // If restoring shutdown state and drive marked no prescan 3320 3321 // bypass window restore … … 3324 3325 RemoveOldCnrSwitches(szPrefix, x); 3325 3326 continue; 3326 3327 3328 3327 } 3328 if (x == 0 && fSwitchTree) 3329 pszFocusDir = xstrdup(szDir, pszSrcFile, __LINE__); 3329 3330 LoadDetailsSwitches(szKeyBase, &localdcd.ds, TRUE); 3330 3331 hwndDir = (HWND) WinSendMsg(hwndClient, … … 3565 3566 RECTL Rectl; 3566 3567 HWND hwndChild; 3568 SWP swp; 3567 3569 3568 3570 if (fNoTileUpdate || hwndClient == HWND_DESKTOP) 3569 3571 return; 3570 { 3571 SWP swp; 3572 3573 WinQueryWindowPos(hwndClient, &swp); 3574 if (swp.fl & (SWP_HIDE | SWP_MINIMIZE)) 3575 return; 3576 } 3572 3573 WinQueryWindowPos(hwndClient, &swp); 3574 if (swp.fl & (SWP_HIDE | SWP_MINIMIZE)) 3575 return; 3576 3577 3577 ulChildCnt = CountChildren(hwndClient, &ulNumMinChildren); 3578 3578 ulChildCnt -= ulNumMinChildren; … … 3598 3598 3599 3599 if (!fFreeTree) { 3600 3601 SWP swp;3602 3603 3600 WinQueryWindowPos(hwndTree, &swp); 3604 3601 if (!(swp.fl & (SWP_MAXIMIZE | SWP_HIDE | SWP_MINIMIZE))) { … … 3666 3663 WinSetWindowUShort(hwndChild, 3667 3664 QWS_XRESTORE, 3668 3669 3665 (USHORT) ((USHORT) ulWidth * (USHORT) ulCurCol) 3666 + (USHORT) Rectl.xLeft); 3670 3667 WinSetWindowUShort(hwndChild, 3671 3668 QWS_YRESTORE, … … 5436 5433 MENUITEM mi, mit; 5437 5434 ULONG size; 5438 BOOL temp = FALSE; 5435 BOOL temp; 5436 5437 static BOOL needTile; 5439 5438 5440 5439 switch (msg) { … … 5713 5712 size = sizeof(BOOL); 5714 5713 if (PrfQueryProfileData(fmprof, FM3Str, "MenuInvisible", &temp, &size) && 5715 5714 size && temp) 5716 5715 WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_HIDEMENU, 0), MPVOID); 5717 5716 size = sizeof(BOOL); 5718 5717 if (PrfQueryProfileData(fmprof, FM3Str, "FreeTree", &temp, &size) && 5719 5718 size && temp) 5720 5719 WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_FREETREE, 0), MPVOID); 5721 5720 size = sizeof(BOOL); 5722 5721 if (PrfQueryProfileData(fmprof, FM3Str, "AutoTile", &temp, &size) && 5723 5722 size && !temp) 5724 5723 WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_AUTOTILE, 0), MPVOID); 5725 5724 size = sizeof(BOOL); … … 5785 5784 SWP_ZORDER | SWP_ACTIVATE); 5786 5785 } 5787 // ResizeTools(WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), 5788 // MAIN_TOOLS)); 5786 # if 0 5787 ResizeTools(WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), 5788 MAIN_TOOLS)); 5789 # endif 5789 5790 } 5790 5791 PostMsg(MainObjectHwnd, UM_SETUP3, mp1, mp2); … … 5814 5815 if (*argv[x] == '/' || *argv[x] == ';') 5815 5816 continue; 5816 if ( !IsFile(argv[x])&& !FindDirCnrByName(argv[x], FALSE)) {5817 if (IsFile(argv[x]) == 0 && !FindDirCnrByName(argv[x], FALSE)) { 5817 5818 OpenDirCnr((HWND) 0, hwndMain, hwndTree, TRUE, argv[x]); 5819 needTile = TRUE; // 2011-10-03 SHL 5818 5820 } 5819 5821 } … … 5823 5825 5824 5826 case UM_SETUP5: 5825 // if (fAutoTile) 5826 // TileChildren(hwnd, TRUE); 5827 # if 0 5828 if (fAutoTile) 5829 TileChildren(hwnd, TRUE); 5830 # endif 5827 5831 PostMsg(hwnd, UM_FILLUSERLIST, MPVOID, MPVOID); 5828 5832 PostMsg(hwnd, UM_FILLSETUPLIST, MPVOID, MPVOID); … … 5840 5844 else if (fStartMaximized) 5841 5845 PostMsg(hwndTree, UM_MAXIMIZE, MPVOID, MPVOID); 5842 fRunning = TRUE; 5846 else if (needTile) 5847 WinSendMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); // 2011-10-03 SHL 5848 5849 fRunning = TRUE; // Allow status window PRESPARM updates 5850 5843 5851 if (fWantFirstTimeInit) { 5844 5852 fWantFirstTimeInit = FALSE; … … 5846 5854 } 5847 5855 return 0; 5848 } 5856 } // switch 5849 5857 5850 5858 return WinDefWindowProc(hwnd, msg, mp1, mp2); … … 6015 6023 case UM_ADDTOMENU: 6016 6024 AddToMenu(( 6017 6025 CHAR *)mp1, WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), 6018 6026 FID_MENU)); 6019 6027 return 0; … … 6351 6359 6352 6360 SHORT sSelect = (SHORT) WinSendMsg(hwndCmdlist, 6353 6361 LM_QUERYSELECTION, 6354 6362 MPFROMSHORT(LIT_FIRST), MPVOID); 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6363 if (sSelect >= 0) { 6364 CHAR s[CCHMAXPATH]; 6365 CHAR *p; 6366 6367 WinSendMsg(hwndCmdlist, LM_QUERYITEMTEXT, 6368 MPFROM2SHORT(sSelect, CCHMAXPATH), MPFROMP(s)); 6369 p = strrchr(s, '}'); 6370 p = 0; 6371 p = strrchr(s, '{'); 6372 p++; 6365 6373 WinPostMsg(hwnd, 6366 6374 WM_COMMAND, 6367 6375 MPFROM2SHORT(atol(p), 0), //IDM_COMMANDSTART + sSelect, 0), 6368 6369 6370 6376 MPVOID); 6377 } 6378 WinSetWindowText(hwndCmdlist, (CHAR *) GetPString(IDS_COMMANDSTEXT)); 6371 6379 } 6372 6380 }
Note:
See TracChangeset
for help on using the changeset viewer.