Changeset 1251 for trunk/dll/treecnr.c


Ignore:
Timestamp:
Oct 19, 2008, 6:34:56 PM (17 years ago)
Author:
Gregg Young
Message:

Fix issues with drives context menu (Tickets 279, 290)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/treecnr.c

    r1227 r1251  
    4747  19 Jul 08 GKY Replace save_dir2(dir) with pFM2SaveDirectory
    4848  02 Aug 08 GKY Always pass temp variable point to UM_SHOWME to avoid freeing pci->pszFileName early
     49  19 Oct 08 GKY Fixed logic for greying menu items (Format etc) on remote and virtual drives (it was reversed)
     50  19 Oct 08 GKY Fixed context menu to be "drives" menu on unformatted drives
    4951
    5052***********************************************************************/
     
    5860#define INCL_WIN
    5961#define INCL_LONGLONG
     62#define INCL_DOSERRORS
    6063
    6164#include "fm3dll.h"
     
    11081111      PCNRITEM pci;
    11091112      HWND menuHwnd = (HWND) 0;
     1113      FSALLOCATE fsa;
    11101114
    11111115      pci = (PCNRITEM) CurrentRecord(hwnd);
    11121116      if (pci && (INT) pci != -1) {
    1113         if (IsRoot(pci->pszFileName))
     1117        if (IsRoot(pci->pszFileName) || !DosQueryFSInfo(toupper(*pci->pszFileName) - '@',
     1118                                                       FSIL_ALLOC, &fsa,
     1119                                                       sizeof(FSALLOCATE)))
    11141120          menuHwnd = CheckMenu(hwndMainMenu, &TreeMenu, TREE_POPUP);
    11151121        else {
     
    21502156            writeable = rdy
    21512157              && !(driveflags[chDrvU - 'A'] & DRIVE_NOTWRITEABLE);
    2152             remote = rdy && (driveflags[chDrvU - 'A'] & (DRIVE_REMOTE || DRIVE_VIRTUAL)) != 0;
     2158            remote = rdy && (driveflags[chDrvU - 'A'] & (DRIVE_REMOTE || DRIVE_VIRTUAL)) == 0;
    21532159            underenv = (pci->flags & RECFLAGS_UNDERENV) != 0;
    21542160
Note: See TracChangeset for help on using the changeset viewer.