Changeset 1066

Show
Ignore:
Timestamp:
07/12/08 15:20:00 (3 months ago)
Author:
jbs
Message:

Ticket 246: Allow saved directory container states to have no directory containers
(i.e. just a directory tree container).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/dll/mainwnd.c

    r1065 r1066  
    6262                all the details view settings (both the global variables and those in the 
    6363                DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS. 
     64  12 Jul 08 JBS Ticket 246: Allow saved directory container states to have no directory containers 
     65                (i.e. just a directory tree container). 
    6466 
    6567***********************************************************************/ 
     
    30973099  sprintf(szKey, "%sNumDirsLastTime", szPrefix); 
    30983100  if (PrfQueryProfileData(fmprof, 
    3099                           FM3Str, szKey, (PVOID) & numsaves, &size) && numsaves) { 
     3101                          FM3Str, szKey, (PVOID) & numsaves, &size)) { 
    31003102    if (fDeleteState) 
    31013103      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 
     
    46544656            // Save 
    46554657            INT nSaved = SaveDirCnrState(hwnd, szStateName); 
    4656             if (nSaved > 0) { 
     4658            if (nSaved >= 0) { 
    46574659              INT ret = add_setup(szStateName); 
    46584660              if (ret == 0) { 
     
    46724674                     hwnd, 
    46734675                     GetPString(IDS_WARNINGTEXT), 
    4674                      nSaved == 0 ? 
    4675                      "Nothing to save" : 
    46764676                     "State data save failed"); 
    46774677              WinSetWindowText(hwndStatelist, GetPString(IDS_STATETEXT)); 
     
    62846284                } 
    62856285              } 
    6286               else if (!numsaves) 
    6287                 Runtime_Error2(pszSrcFile, __LINE__, IDS_NODATATEXT); 
    62886286              else { 
    62896287                char *pszStateName;