Changeset 954


Ignore:
Timestamp:
Feb 16, 2008, 4:58:43 AM (17 years ago)
Author:
Steven Levine
Message:

Rework ResizeChildren to resize drive tree correctly
Avoid trap in TreeCnrWndProc WM_SAVEAPPLICATION

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/HISTORY

    r953 r954  
    44 o Removed the close buttton and menu item from the tree container which closed FM/2 (Gregg)
    55 o Implement bubble help for bitmap menu items in collector and arc container (Gregg)
    6  o Correct/enhance settings notebook navigation, ticket #188  (Steven)
     6 o Correct/enhance settings notebook navigation, ticket #188 (Steven)
    77 o Reopen settings notebook to last selected page unless overridden, ticket #188 (Steven)
    88 o Correct Compare Directories select count regression (Steven)
     
    2626   This reverts to orginal behavior for named states
    2727 o Rework collector progress reporting and improve performance (ticket #79)
    28  o Compile OpenWatcom version into binary
    29  o Add conditional cascade to main menu settings menu item
     28 o Compile OpenWatcom version into binary (Steven)
     29 o Add conditional cascade to main menu settings menu item (Steven)
     30 o Rework ResizeChildren to resize drive tree correctly (Steven)
     31 o Avoid trap in TreeCnrWndProc WM_SAVEAPPLICATION (Steven)
    3032
    31333.09
     
    4345 o Internal editor now handles readonly files (Gregg)
    4446 o Correct hex edit buffer sizing to avoid data loss (Steven)
    45  o Use CopyPresParams to fix presparam inconsistencies in menus  (Gregg)
     47 o Use CopyPresParams to fix presparam inconsistencies in menus (Gregg)
    4648 o Correct variable cast to fix hex code display problem (Gregg)
    4749 o Correct variable cast to fix hex code display problem (Gregg)
  • trunk/dll/mainwnd.c

    r953 r954  
    5151  05 Feb 08 SHL Restore no-prescan drives if restoring named state
    5252  14 Feb 08 SHL Rework to support settings menu conditional cascade
     53  15 Feb 08 SHL Rework ResizeChildren to honor fNoTreeGap and resize drive tree better
    5354
    5455***********************************************************************/
     
    36623663    WinQueryWindowPos(hwndTree, &swp);
    36633664    if (!(swp.fl & (SWP_MAXIMIZE | SWP_HIDE | SWP_MINIMIZE))) {
    3664       if (swp.y + swp.cy < Rectl.yTop - Rectl.yBottom)
    3665         swp.cy = (Rectl.yTop - Rectl.yBottom) - swp.y;
     3665
     3666      if (!fNoTreeGap) {
     3667        INT height = WinQuerySysValue(HWND_DESKTOP, SV_CYICON) * 2;
     3668        if (swp.y < height)
     3669          swp.y = height;       // Force bottom to position
     3670      }
     3671      else
     3672        swp.y = 0;              // Force bottom to position
     3673
     3674      swp.cy = (Rectl.yTop - Rectl.yBottom) - swp.y;
     3675      if (swp.cy < 0)
     3676        swp.cy = 0;
     3677
    36663678      if (swp.x != 0)
    3667         swp.x = 0;
    3668       if (swp.y < 0)
    3669         swp.y = 0;
    3670       if (swp.x + swp.cx > abs(Rectl.xRight - Rectl.xLeft))
    3671         swp.cx = abs(Rectl.xRight - Rectl.xLeft);
     3679        swp.x = 0;              // Left align
     3680
     3681      // AdjustSizeOfClient can return bogus xRight values - fixme someday
     3682      if (Rectl.xRight >= Rectl.xLeft) {
     3683        if (swp.x + swp.cx > Rectl.xRight - Rectl.xLeft)
     3684          swp.cx = Rectl.xRight - Rectl.xLeft;
     3685      }
    36723686      WinSetWindowPos(hwndTree, HWND_TOP, swp.x, swp.y, swp.cx, swp.cy,
    36733687                      SWP_MOVE | SWP_SIZE | SWP_SHOW | SWP_RESTORE);
  • trunk/dll/treecnr.c

    r953 r954  
    4545  10 Jan 08 SHL Sync with CfgDlgProc mods
    4646  15 Feb 08 SHL Sync with settings menu rework
     47  15 Feb 08 SHL Avoid death if tree container 0 width
    4748
    4849***********************************************************************/
     
    28282829      if (!(swp.fl & (SWP_MINIMIZE | SWP_MAXIMIZE | SWP_HIDE))) {
    28292830        WinQueryWindowPos(dcd->hwndParent, &swpP);
    2830         ratio = (swpP.cx * 100) / swp.cx;
    2831         if (ratio > 0)
    2832           PrfWriteProfileData(fmprof, appname, "TreeWindowRatio",
    2833                               &ratio, sizeof(INT));
     2831        if (swp.cx) {
     2832          ratio = (swpP.cx * 100) / swp.cx;
     2833          if (ratio > 0)
     2834            PrfWriteProfileData(fmprof, appname, "TreeWindowRatio",
     2835                                &ratio, sizeof(INT));
     2836        }
    28342837      }
    28352838    }
Note: See TracChangeset for help on using the changeset viewer.