Ignore:
Timestamp:
Mar 24, 2000, 6:17:30 PM (25 years ago)
Author:
cbratschi
Message:

bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/shlview.cpp

    r3193 r3217  
    1 /* $Id: shlview.cpp,v 1.7 2000-03-22 16:55:52 cbratschi Exp $ */
     1/* $Id: shlview.cpp,v 1.8 2000-03-24 17:17:28 cbratschi Exp $ */
    22/*
    33 * ShellView
     
    1414 * appearing in the view. To fix this it should use the IShellFolder2
    1515 * interface when possible to get the informations dynamically
    16  * this will take a lot of work to implemet and wont likely not
     16 * this will take a lot of work to implement and wont likely not
    1717 * be done in near future
    1818 * Please considder this when code new features. Mail me if you
     
    105105#define LISTVIEW_COLUMN_TIME 3
    106106#define LISTVIEW_COLUMN_ATTRIB 4
     107//CB: todo: drive view!
    107108
    108109/*menu items */
     
    328329        lvColumn.fmt = sd.fmt;
    329330        lvColumn.cx = sd.cxChar*8; /* chars->pixel */
    330          StrRetToStrNA( szTemp, 50, &sd.str, NULL);
     331        StrRetToStrNA( szTemp, 50, &sd.str, NULL);
    331332        ListView_InsertColumnA(This->hWndList, i, &lvColumn);
    332333      }
     
    475476   UINT     i;
    476477   LVITEMA  lvItem;
    477    HRESULT     hRes;
     478   HRESULT  hRes;
    478479   HDPA     hdpa;
    479480
     481//CB: really slow, even without debug information
     482   //DecreaseLogCount();
    480483   TRACE("%p\n",This);
    481484
     485//CB: FindFirstFileA, many calls to FindNextFileA in this block
     486//    OS/2's APIs can read more than one file per call -> much faster
     487//    -> add a new API for faster handling
    482488   /* get the itemlist from the shfolder*/
    483489   hRes = IShellFolder_EnumObjects(This->pSFParent,This->hWnd, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS, &pEnumIDList);
     
    489495   }
    490496
     497//CB: ILClone calls
    491498   /* create a pointer array */
    492    hdpa = pDPA_Create(16);
     499   hdpa = pDPA_Create(64);
    493500   if (!hdpa)
    494501   {
     
    505512   }
    506513
     514//CB: only Get* calls
    507515   /*sort the array*/
    508516   pDPA_Sort(hdpa, (PFNDPACOMPARE)ShellView_CompareItems, (LPARAM)This->pSFParent);
     
    511519   SendMessageA(This->hWndList, WM_SETREDRAW, FALSE, 0);
    512520
    513    for (i=0; i < DPA_GetPtrCount(hdpa); ++i)   /* DPA_GetPtrCount is a macro*/
     521   ZeroMemory(&lvItem, sizeof(lvItem));                   /* create the listviewitem*/
     522   lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;     /*set the mask*/
     523   lvItem.pszText = LPSTR_TEXTCALLBACKA;                  /*get text on a callback basis*/
     524   lvItem.iImage = I_IMAGECALLBACK;                       /*get the image on a callback basis*/
     525
     526   for (i = 0; i < DPA_GetPtrCount(hdpa); ++i)   /* DPA_GetPtrCount is a macro*/
    514527   {
    515528     pidl = (LPITEMIDLIST)DPA_GetPtr(hdpa, i);
     529
    516530     if (IncludeObject(This, pidl) == S_OK) /* in a commdlg This works as a filemask*/
    517531     {
    518        ZeroMemory(&lvItem, sizeof(lvItem)); /* create the listviewitem*/
    519        lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;     /*set the mask*/
    520        lvItem.iItem = i;  /*add the item to the end of the list*/
    521        lvItem.lParam = (LPARAM) pidl;             /*set the item's data*/
    522        lvItem.pszText = LPSTR_TEXTCALLBACKA;         /*get text on a callback basis*/
    523        lvItem.iImage = I_IMAGECALLBACK;           /*get the image on a callback basis*/
     532       lvItem.iItem = i;                                      /*add the item to the end of the list*/
     533       lvItem.lParam = (LPARAM)pidl;                         /*set the item's data*/
    524534       ListView_InsertItemA(This->hWndList, &lvItem);
    525535     }
     
    535545   IEnumIDList_Release(pEnumIDList); /* destroy the list*/
    536546   pDPA_Destroy(hdpa);
     547   //IncreaseLogCount();
    537548
    538549   return S_OK;
     
    10781089              {
    10791090                SHELLDETAILS sd;
     1091
    10801092                IShellFolder2_GetDetailsOf(This->pSF2Parent, pidl, lpdi->item.iSubItem, &sd);
    10811093                StrRetToStrNA( lpdi->item.pszText, lpdi->item.cchTextMax, &sd.str, NULL);
Note: See TracChangeset for help on using the changeset viewer.