Changeset 468


Ignore:
Timestamp:
Sep 1, 2006, 3:02:19 AM (19 years ago)
Author:
root
Message:

disable_menuitem: rework args to match name - sheesh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/dll/misc.c

    r451 r468  
    2020  29 Jul 06 SHL Use xfgets_bstripcr
    2121  16 Aug 06 SHL Comments
     22  31 Aug 06 SHL disable_menuitem: rework args to match name - sheesh
    2223
    2324***********************************************************************/
     
    806807  WinSendMsg(hwndMenu, MM_SETITEMATTR,
    807808             MPFROM2SHORT(id, 1),
    808              MPFROM2SHORT(MIA_CHECKED, MIA_CHECKED * (*bool != 0)));
     809             MPFROM2SHORT(MIA_CHECKED, (*bool ? MIA_CHECKED : 0)));
    809810  return *bool;
    810811}
    811812
    812 VOID disable_menuitem(HWND hwndMenu, USHORT id, BOOL enable)
     813//== disable_menuitem() disable or enable_menuitem ==
     814
     815VOID disable_menuitem(HWND hwndMenu, USHORT id, BOOL disable)
    813816{
    814817  WinSendMsg(hwndMenu, MM_SETITEMATTR,
    815818             MPFROM2SHORT(id, TRUE),
    816              MPFROM2SHORT(MIA_DISABLED, ((enable == FALSE) * MIA_DISABLED)));
     819             MPFROM2SHORT(MIA_DISABLED, (disable ? MIA_DISABLED : 0)));
    817820}
    818821
     
    16371640                   MPFROM2SHORT(IDM_OPENSUBMENU, TRUE), MPVOID);
    16381641    }
    1639     else if (hwndMenu == &TreeCnrMenu)
     1642    else if (hwndMenu == &TreeCnrMenu){
    16401643      WinSetWindowUShort(TreeCnrMenu, QWS_ID, IDM_VIEWSMENU);
     1644      SetConditionalCascade(TreeCnrMenu, IDM_PARTITIONSMENU, IDM_PARTITION);
     1645         if (fWorkPlace)
     1646      WinSendMsg(TreeCnrMenu, MM_DELETEITEM,
     1647            MPFROM2SHORT(IDM_PARTITIONSMENU, TRUE), MPVOID);
     1648    }
    16411649    else if (hwndMenu == &ArcCnrMenu) {
    16421650      WinSetWindowUShort(ArcCnrMenu, QWS_ID, IDM_VIEWSMENU);
Note: See TracChangeset for help on using the changeset viewer.