Changeset 1856 for trunk/dll/mainwnd.c


Ignore:
Timestamp:
Aug 18, 2015, 7:12:52 PM (10 years ago)
Author:
Steven Levine
Message:

Rework Flesh/Stubby etc. to avoid running on thread 1
Should be ready for release after spurious traps resolved
DbgMsg calls retained - delete/disable before release

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/mainwnd.c

    r1844 r1856  
    117117  02 Aug 15 GKY Remove unneed SubbyScan code and improve suppression of blank lines and
    118118                duplicate subdirectory name caused by running Stubby in worker threads.
     119                duplicate subdirectory name caused by running Stubby in worker threads.
    119120  09 Aug 15 SHL Use RESTORE_STATE_...
     121  13 Aug 15 SHL Sync with Flesh/Stubby mods
    120122
    121123***********************************************************************/
     
    239241USHORT shiftstate;
    240242
     243UINT cDirectoriesRestored;              // 2015-08-12 SHL Incremented by RestoreDirCnrState
     244
    241245#pragma data_seg(GLOBAL2)
    242246HMODULE FM3ModHandle;
     
    18201824MRESULT EXPENTRY DriveBackProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    18211825{
     1826#if 0 // 2015-08-04 SHL FIXME to be gone
    18221827  APIRET rc;
     1828#endif // 2015-08-04 SHL FIXME to be gone
    18231829
    18241830  static BOOL emphasized;
     
    20952101
    20962102  case WM_COMMAND:
     2103#if 0 // 2015-08-04 SHL FIXME to be gone
    20972104    rc = DosWaitEventSem(hevTreeCnrScanComplete, SEM_INDEFINITE_WAIT);
    20982105    if (rc)
    20992106      Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosWaitEventSem");
     2107#endif // 2015-08-04 SHL FIXME to be gone
    21002108
    21012109    switch(SHORT1FROMMP(mp1)) {
     
    21362144          HWND hwndActive = TopWindow(hwnd, (HWND) 0);
    21372145          if (hwndActive)
     2146            DbgMsg(pszSrcFile, __LINE__, "WinSendMsg UM_DRIVECMD %c", *dv); // 2015-08-04 SHL FIXME debug
    21382147            WinSendMsg(WinWindowFromID(hwndActive, FID_CLIENT),
    21392148                       UM_DRIVECMD, MPFROMP(dv), MPVOID);
     
    34463455  HWND hwndDir, hwndC, hwndPPSave = NULLHANDLE;
    34473456  SWP swp, swpO, swpN;
    3448   ULONG size, numsaves = 0;
     3457  ULONG size;
     3458  ULONG numsaves = 0;
    34493459  LONG x;
    34503460  double xtrans, ytrans;
     
    34643474
    34653475  sprintf(szPrefix, "%s.", pszStateName);
     3476
     3477  DbgMsg(pszSrcFile, __LINE__, "RestoreDirCnrState %s", pszStateName);  // 2015-08-13 SHL FIXME debug
    34663478
    34673479  // If restoring shutdown state bypass no-prescan drives
     
    35333545  size = sizeof(ULONG);
    35343546  if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &numsaves, &size)) {
     3547    // 2015-08-13 SHL TreeCnrWndProc UM_RESCAN has already requested a UM_RESCAN2 which
     3548    // will result in an extra UM_SHOWME
     3549    // RestoreDirCnrState can be called before pending UM_SHOWMEs complete - oh well
     3550    if (fSwitchTreeOnFocus && numsaves)
     3551      cDirectoriesRestored = 1;
     3552    else
     3553      cDirectoriesRestored = 0;
    35353554    if (fDeleteState)
    35363555      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
     
    36313650                  }
    36323651                }
     3652                // 2015-08-12 SHL Suppress drive tree updates if not last container to restore
     3653                if (fSwitchTreeOnFocus)
     3654                  cDirectoriesRestored++;       // 2015-08-12 SHL
     3655
    36333656                if (!PostMsg(hwndCnr, UM_SETUP2, NULL, NULL))
    36343657                  WinSendMsg(hwndCnr, UM_SETUP2, NULL, NULL);
     
    36603683        }
    36613684      }
    3662     } // for
     3685    } // for numsaves
    36633686    if (hwndPPSave) {
    36643687      SavePresParams(hwndPPSave, PCSZ_DIRCNR);
    36653688      WinDestroyWindow(hwndPPSave);
    36663689    }
     3690    DbgMsg(pszSrcFile, __LINE__, "RestoreDirCnrState returning fRestored %u", fRestored);       // 2015-08-13 SHL FIXME debug
    36673691  }
     3692
    36683693  return fRestored;
    36693694}
     
    65336558            }
    65346559            else if (SHORT1FROMMP(mp1) == MAIN_DRIVELIST) {
     6560              DbgMsg(pszSrcFile, __LINE__, "MainWndProc CBN_ENTER ShowTreeRec(\"%s\")", path); // 2015-08-04 SHL FIXME debug
    65356561              ShowTreeRec(WinWindowFromID(WinWindowFromID(hwndTree,
    65366562                                                          FID_CLIENT),
     
    66636689    }
    66646690    DosSleep(1);
    6665     DbgMsg(pszSrcFile, __LINE__, "MainWndProc WM_CLOSE returning");
     6691    DbgMsg(pszSrcFile, __LINE__, "MainWndProc WM_CLOSE returning with fAmClosing %u", fAmClosing); // 2015-08-16 SHL
    66666692
    66676693    return 0;           // Suppress WinDefWindowProc WM_QUIT message generation
     
    66936719
    66946720  case WM_DESTROY:
     6721    DbgMsg(pszSrcFile, __LINE__, "MainWndProc WM_DESTROY hwnd %p TID %u", hwnd, GetTidForThread());     // 2015-08-09 SHL FIXME debug
    66956722    hwndMain = (HWND)0;
    66966723    if (!PostMsg((HWND)0, WM_QUIT, MPVOID, MPVOID))
    66976724      WinSendMsg((HWND)0, WM_QUIT, MPVOID, MPVOID);
    66986725#   ifdef FORTIFY
     6726    DbgMsg(pszSrcFile, __LINE__, "MainWndProc WM_DESTROY hwnd %p TID %u", hwnd, GetTidForThread());     // 2015-08-09 SHL FIXME debug
    66996727    free_commands();
    67006728    free_associations();
Note: See TracChangeset for help on using the changeset viewer.