Changeset 1778 for trunk/dll/mainwnd2.c


Ignore:
Timestamp:
Jun 27, 2014, 12:30:54 AM (11 years ago)
Author:
Steven Levine
Message:

Rework dircnrs.c DirObjWndProc UM_RESCAN to avoid hanging FM/2 Lite when
drive tree hidden. Also speeds up startup if Switch Tree on directory change
not enabled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/mainwnd2.c

    r1777 r1778  
    436436{
    437437  PERSON1DATA *pd;
     438  BOOL yes;
    438439
    439440  SetShiftState();
     
    584585    WinSendMsg(hwnd, UM_SETUP2, MPFROMLONG(1), MPVOID);
    585586    if (hwndTree) {
     587      // Hide
    586588      WinShowWindow(hwndTree, FALSE);
    587589      PostMsg(hwndTree, WM_CLOSE, MPVOID, MPVOID);
    588       hwndTree = (HWND) 0;
     590      hwndTree = NULLHANDLE;
    589591    }
    590592    else {
    591 
     593      // Create tree window if needed and make visible
    592594      ULONG size = sizeof(ULONG);
    593 
    594595      hwndTree = StartTreeCnr(hwnd, 3);
    595       PrfQueryProfileData(fmprof,
    596                           realappname,
    597                           "FM/4 TreeWidth", (PVOID) & TreeWidth, &size);
     596      PrfQueryProfileData(fmprof, realappname,
     597                          "FM/4 TreeWidth", (PVOID)&TreeWidth, &size);
    598598      TreeWidth = max(TreeWidth, 80);
    599599    }
    600     {
    601       BOOL dummy = (hwndTree != (HWND) 0);
    602 
    603       PrfWriteProfileData(fmprof,
    604                           realappname,
    605                           "FM/4 TreeUp", (PVOID) & dummy, sizeof(dummy));
    606     }
     600    yes = hwndTree != NULLHANDLE;
     601    PrfWriteProfileData(fmprof, realappname,
     602                        "FM/4 TreeUp", (PVOID)&yes, sizeof(yes));
    607603    PostMsg(hwnd, UM_SIZE, MPVOID, MPVOID);
    608604    break;
     
    793789  ULONG which;
    794790  ULONG size;
     791  BOOL yes;
    795792
    796793  switch (msg) {
     
    861858    if (pd) {
    862859      CHAR s[CCHMAXPATH];
    863       BOOL dummy = TRUE;
    864 
     860      yes = TRUE;
    865861      size = sizeof(BOOL);
    866       PrfQueryProfileData(fmprof, realappname, "FM/4 TreeUp",
    867                           (PVOID) &dummy, &size);
    868       if (dummy) {
    869         size = sizeof(ULONG);
     862      PrfQueryProfileData(fmprof, realappname,
     863                          "FM/4 TreeUp", (PVOID)&yes, &size);
     864      if (yes) {
    870865        hwndTree = StartTreeCnr(hwnd, 3);
     866        size = sizeof(TreeWidth);
    871867        PrfQueryProfileData(fmprof, realappname, "FM/4 TreeWidth",
    872                             (PVOID) &TreeWidth, &size);
     868                            (PVOID)&TreeWidth, &size);
    873869        TreeWidth = max(TreeWidth, 80);
    874870      }
    875871      size = sizeof(BOOL);
    876       if (PrfQueryProfileData(fmprof, appname, "Toolbar", &dummy, &size) &&
    877           size && !dummy)
     872      if (PrfQueryProfileData(fmprof, appname, "Toolbar", &yes, &size) &&
     873          size &&
     874          !yes)
     875      {
    878876        WinSendMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID);
     877      }
    879878
    880879      size = sizeof(s);
Note: See TracChangeset for help on using the changeset viewer.