Changeset 864


Ignore:
Timestamp:
Nov 11, 2007, 8:25:05 PM (13 years ago)
Author:
Gregg Young
Message:

Cancel in walk directory dialog now directly closes dialog even if directory path text has changed (Ticket 85)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/walkem.c

    r847 r864  
    2222  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
    2323  25 Aug 07 SHL Correct #pragma alloc_text typos
     24  11 Nov 07 GKY Cancel now directly closes dialog even if directory path text has changed
    2425
    2526***********************************************************************/
     
    10801081      szBuff[strlen(szBuff) - 1] = 0;
    10811082    MakeFullName(szBuff);
    1082     if (*szBuff && stricmp(szBuff, wa->szCurrentPath)) {
     1083    if (*szBuff && stricmp(szBuff, wa->szCurrentPath) && SHORT1FROMMP(mp1) != DID_CANCEL) {
    10831084      if (!SetDir(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT),
    10841085                                 QW_OWNER), hwnd, szBuff, 0))
    10851086        strcpy(wa->szCurrentPath, szBuff);
    1086       else if (SHORT1FROMMP(mp1) != DID_CANCEL)
     1087      else //if (SHORT1FROMMP(mp1) != DID_CANCEL)
    10871088        return 0;
    10881089    }
     
    11571158    case DID_CANCEL:
    11581159      if (wa->changed)
    1159         WinSendMsg(hwnd, UM_SETUP3, MPVOID, MPVOID);
     1160        WinSendMsg(hwnd, UM_SETUP3, MPVOID, MPVOID);
    11601161      free(wa);
    11611162      WinDismissDlg(hwnd, 0);
     
    15021503      szBuff[strlen(szBuff) - 1] = 0;
    15031504    MakeFullName(szBuff);
    1504     if (*szBuff && stricmp(szBuff, wa->szCurrentPath1)) {
     1505    if (*szBuff && stricmp(szBuff, wa->szCurrentPath1) && SHORT1FROMMP(mp1) != DID_CANCEL) {
    15051506      if (!SetDir(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT),
    15061507                                 QW_OWNER), hwnd, szBuff, 0))
    15071508        strcpy(wa->szCurrentPath1, szBuff);
    1508       else if (SHORT1FROMMP(mp1) != DID_CANCEL)
     1509      else //if (SHORT1FROMMP(mp1) != DID_CANCEL)
    15091510        return 0;
    15101511    }
     
    15181519      szBuff[strlen(szBuff) - 1] = 0;
    15191520    MakeFullName(szBuff);
    1520     if (*szBuff && stricmp(szBuff, wa->szCurrentPath2)) {
     1521    if (*szBuff && stricmp(szBuff, wa->szCurrentPath2) && SHORT1FROMMP(mp1) != DID_CANCEL) {
    15211522      if (!SetDir(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT),
    15221523                                 QW_OWNER), hwnd, szBuff, 0))
    15231524        strcpy(wa->szCurrentPath2, szBuff);
    1524       else if (SHORT1FROMMP(mp1) != DID_CANCEL)
     1525      else // if (SHORT1FROMMP(mp1) != DID_CANCEL)
    15251526        return 0;
    15261527    }
Note: See TracChangeset for help on using the changeset viewer.