Changeset 1455 for trunk/dll/dircnrs.c


Ignore:
Timestamp:
Sep 15, 2009, 4:43:55 AM (16 years ago)
Author:
Steven Levine
Message:

Blink thread LEDs while worker threads are working
Drop expermental code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dircnrs.c

    r1451 r1455  
    6767  22 Jul 09 GKY Code changes to use semaphores to serialize drive scanning
    6868  22 Jul 09 SHL Cleanup of SETFOCUS code
     69  14 Sep 09 SHL Drop experimental code
    6970
    7071***********************************************************************/
     
    144145#include "fortify.h"
    145146#include "excputil.h"                   // 06 May 08 SHL added
    146 #include "pathutil.h"                   // AddBackslashToPath
     147#include "pathutil.h"                   // AddBackslashToPath
    147148
    148149// Data definitions
     
    368369
    369370      if (WinQueryWindowUShort(hwnd, QWS_ID) != DIR_FOLDERICON) {
    370         memset(&nr, 0, sizeof(NOTIFYRECORDENTER));
    371         nr.hwndCnr = WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), DIR_CNR);
    372         WinSendMsg(WinQueryWindow(hwnd, QW_PARENT),
    373                    WM_CONTROL, MPFROM2SHORT(DIR_CNR, CN_ENTER), MPFROMP(&nr));
     371        memset(&nr, 0, sizeof(NOTIFYRECORDENTER));
     372        nr.hwndCnr = WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), DIR_CNR);
     373        WinSendMsg(WinQueryWindow(hwnd, QW_PARENT),
     374                   WM_CONTROL, MPFROM2SHORT(DIR_CNR, CN_ENTER), MPFROMP(&nr));
    374375      }
    375376    }
     
    808809                            MPFROMP(pci),
    809810                            MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER));
    810           if (!pciC) {
    811             Stubby(dcd->hwndCnr, pci);
     811          if (!pciC) {
     812            Stubby(dcd->hwndCnr, pci);
    812813          }
    813814        }
     
    11511152          wk->li = (LISTINFO *) mp1;
    11521153          strcpy(wk->directory, dcd->directory);
     1154
    11531155          if (xbeginthread(Action,
    11541156                           122880,
     
    13511353      if (dcd && hwndStatus) {
    13521354        /* put name of our window (directory name) on status line */
    1353       PCNRITEM pci = NULL;
    1354       if (fAutoView && hwndMain) {
    1355         pci = WinSendMsg(hwnd, CM_QUERYRECORDEMPHASIS, MPFROMLONG(CMA_FIRST),
    1356                          MPFROMSHORT(CRA_CURSORED));
    1357         if (pci && (INT) pci != -1 &&
    1358             (!(driveflags[toupper(*pci->pszFileName) - 'A'] & DRIVE_SLOW)))
    1359           WinSendMsg(hwndMain, UM_LOADFILE, MPFROMP(pci->pszFileName), MPVOID);
    1360         else
    1361           WinSendMsg(hwndMain, UM_LOADFILE, MPVOID, MPVOID);
    1362       }
    1363       if (*dcd->directory) {
    1364         if (hwndMain)
    1365           WinSendMsg(hwndMain,
    1366                      UM_SETUSERLISTNAME, MPFROMP(dcd->directory), MPVOID);
    1367         else
    1368           add_udir(FALSE, dcd->directory);
    1369       }
     1355        PCNRITEM pci = NULL;
     1356        if (fAutoView && hwndMain) {
     1357          pci = WinSendMsg(hwnd, CM_QUERYRECORDEMPHASIS, MPFROMLONG(CMA_FIRST),
     1358                           MPFROMSHORT(CRA_CURSORED));
     1359          if (pci && (INT) pci != -1 &&
     1360              (!(driveflags[toupper(*pci->pszFileName) - 'A'] & DRIVE_SLOW)))
     1361            WinSendMsg(hwndMain, UM_LOADFILE, MPFROMP(pci->pszFileName), MPVOID);
     1362          else
     1363            WinSendMsg(hwndMain, UM_LOADFILE, MPVOID, MPVOID);
     1364        }
     1365        if (*dcd->directory) {
     1366          if (hwndMain)
     1367            WinSendMsg(hwndMain,
     1368                       UM_SETUSERLISTNAME, MPFROMP(dcd->directory), MPVOID);
     1369          else
     1370            add_udir(FALSE, dcd->directory);
     1371        }
     1372
    13701373      if (hwndMain)
    13711374        PostMsg(hwndMain, UM_ADVISEFOCUS, MPFROMLONG(dcd->hwndFrame), MPVOID);
     
    14481451                           CM_QUERYRECORDEMPHASIS,
    14491452                           MPFROMLONG(CMA_FIRST), MPFROMSHORT(CRA_CURSORED));
    1450           if (pci && (INT) pci != -1) {
     1453          if (pci && (INT) pci != -1) {
    14511454            if (fSplitStatus && hwndStatus2) {
    14521455              CommaFmtULL(tb, sizeof(tb), pci->cbFile + pci->easize, ' ');
     
    15991602      }
    16001603      if (!fInitialDriveScan)
    1601         PostMsg(hwnd, UM_SETUP2, MPVOID, MPVOID);
     1604        PostMsg(hwnd, UM_SETUP2, MPVOID, MPVOID);
    16021605    }
    16031606    else {
     
    16151618              DIR_SORT), dcd->sortFlags, FALSE);
    16161619      SayView(WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT),
    1617                               DIR_VIEW), dcd->flWindowAttr);
     1620                              DIR_VIEW), dcd->flWindowAttr);
    16181621    } else
    16191622      PostMsg(hwnd, WM_CLOSE, MPVOID, MPVOID);
     
    18211824              PCNRITEM pci;
    18221825
    1823               strcpy(newfile, dcd->directory);
    1824               AddBackslashToPath(newfile);
     1826              strcpy(newfile, dcd->directory);
     1827              AddBackslashToPath(newfile);
    18251828              //if (newfile[strlen(newfile) - 1] != '\\')
    18261829              //  strcat(newfile, "\\");
     
    24212424
    24222425      case IDM_SWITCH:
    2423         if (mp2) {
     2426        if (mp2) {
    24242427          strcpy(dcd->previous, dcd->directory);
    2425           strcpy(dcd->directory, (CHAR *)mp2);
     2428          strcpy(dcd->directory, (CHAR *)mp2);
    24262429          //DosEnterCritSec(); // GKY 11-27-08
    24272430          dcd->stopflag++;
    2428           //DosExitCritSec();
     2431          //DosExitCritSec();
    24292432          if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) {
    24302433            strcpy(dcd->directory, dcd->previous);
     
    24472450          CHAR tempname1[CCHMAXPATH], tempname2[CCHMAXPATH];
    24482451
    2449           strcpy(tempname1, dcd->directory);
    2450           AddBackslashToPath(tempname1);
     2452          strcpy(tempname1, dcd->directory);
     2453          AddBackslashToPath(tempname1);
    24512454          //if (tempname1[strlen(tempname1) - 1] != '\\')
    24522455          //  strcat(tempname1, "\\");
     
    28012804                  if (Flesh(hwnd, pci) &&
    28022805                      SHORT2FROMMP(mp1) == CN_EXPANDTREE &&
    2803                       !dcd->suspendview && fTopDir) {
    2804                     PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID);
    2805                     //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
    2806                   }
     2806                      !dcd->suspendview && fTopDir) {
     2807                    PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID);
     2808                    //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
     2809                  }
    28072810                }
    28082811                driveserial[toupper(*pci->pszFileName) - 'A'] = volser.serial;
     
    28102813            }
    28112814            else if (SHORT2FROMMP(mp1) == CN_EXPANDTREE) {
    2812               if (Flesh(hwnd, pci) && !dcd->suspendview && fTopDir) {
     2815              if (Flesh(hwnd, pci) && !dcd->suspendview && fTopDir) {
    28132816                PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID);
    2814                 //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
    2815               }
    2816             }
    2817             if (SHORT2FROMMP(mp1) == CN_EXPANDTREE && !dcd->suspendview) {
     2817                //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
     2818              }
     2819            }
     2820            if (SHORT2FROMMP(mp1) == CN_EXPANDTREE && !dcd->suspendview) {
    28182821              WinSendMsg(hwnd, UM_FILTER, MPVOID, MPVOID);
    2819               //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
    2820             }
     2822              //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci);
     2823            }
    28212824          }
    28222825        }
     
    34813484    break;
    34823485
    3483   case WM_TIMER:
    3484     return ActionWMTimer(hwnd, mp1, mp2);
    3485 
    34863486  case WM_CLOSE:
    34873487    WinSendMsg(hwnd, WM_SAVEAPPLICATION, MPVOID, MPVOID);
Note: See TracChangeset for help on using the changeset viewer.