Ignore:
Timestamp:
Mar 22, 2000, 5:55:52 PM (25 years ago)
Author:
cbratschi
Message:

* empty log message *

File:
1 edited

Legend:

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

    r2354 r3193  
    1 /* $Id: shlview.cpp,v 1.6 2000-01-08 02:24:13 phaller Exp $ */
     1/* $Id: shlview.cpp,v 1.7 2000-03-22 16:55:52 cbratschi Exp $ */
    22/*
    33 * ShellView
     
    309309{
    310310   LVCOLUMNA lvColumn;
    311    SHELLDETAILS sd;
    312    int  i;
    313    char szTemp[50];
     311   SHELLDETAILS sd;
     312   int  i;
     313   char szTemp[50];
    314314
    315315   TRACE("%p\n",This);
     
    323323   {
    324324      for (i=0; 1; i++)
    325       { 
     325      {
    326326        if (!SUCCEEDED(IShellFolder2_GetDetailsOf(This->pSF2Parent, NULL, i, &sd)))
    327           break;
    328         lvColumn.fmt = sd.fmt;
    329         lvColumn.cx = sd.cxChar*8; /* chars->pixel */
    330         StrRetToStrNA( szTemp, 50, &sd.str, NULL);
    331         ListView_InsertColumnA(This->hWndList, i, &lvColumn);
     327          break;
     328        lvColumn.fmt = sd.fmt;
     329        lvColumn.cx = sd.cxChar*8; /* chars->pixel */
     330        StrRetToStrNA( szTemp, 50, &sd.str, NULL);
     331        ListView_InsertColumnA(This->hWndList, i, &lvColumn);
    332332      }
    333333   }
     
    518518       ZeroMemory(&lvItem, sizeof(lvItem)); /* create the listviewitem*/
    519519       lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;     /*set the mask*/
    520        lvItem.iItem = ListView_GetItemCount(This->hWndList);  /*add the item to the end of the list*/
     520       lvItem.iItem = i;  /*add the item to the end of the list*/
    521521       lvItem.lParam = (LPARAM) pidl;             /*set the item's data*/
    522522       lvItem.pszText = LPSTR_TEXTCALLBACKA;         /*get text on a callback basis*/
     
    10731073       pidl = (LPITEMIDLIST)lpdi->item.lParam;
    10741074
    1075             if(lpdi->item.mask & LVIF_TEXT)     /* text requested */
    1076             {
    1077               if (This->pSF2Parent)
    1078               {
    1079                 SHELLDETAILS sd;
    1080                 IShellFolder2_GetDetailsOf(This->pSF2Parent, pidl, lpdi->item.iSubItem, &sd);
    1081                 StrRetToStrNA( lpdi->item.pszText, lpdi->item.cchTextMax, &sd.str, NULL);
    1082                 TRACE("-- text=%s\n",lpdi->item.pszText);               
    1083               }
    1084               else
    1085               {
    1086                 FIXME("no SF2\n");
    1087               }
    1088             }
    1089             if(lpdi->item.mask & LVIF_IMAGE)    /* image requested */
     1075            if(lpdi->item.mask & LVIF_TEXT)     /* text requested */
     1076            {
     1077              if (This->pSF2Parent)
     1078              {
     1079                SHELLDETAILS sd;
     1080                IShellFolder2_GetDetailsOf(This->pSF2Parent, pidl, lpdi->item.iSubItem, &sd);
     1081                StrRetToStrNA( lpdi->item.pszText, lpdi->item.cchTextMax, &sd.str, NULL);
     1082                TRACE("-- text=%s\n",lpdi->item.pszText);
     1083              }
     1084              else
     1085              {
     1086                FIXME("no SF2\n");
     1087              }
     1088            }
     1089            if(lpdi->item.mask & LVIF_IMAGE)    /* image requested */
    10901090         {
    10911091           lpdi->item.iImage = SHMapPIDLToSystemImageListIndex(This->pSFParent, pidl, 0);
    1092          }       
     1092         }
    10931093       break;
    10941094
Note: See TracChangeset for help on using the changeset viewer.