- Timestamp:
- Mar 29, 2000, 5:24:08 PM (25 years ago)
- Location:
- trunk/src/shell32
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/enumidlist.cpp
r3250 r3271 1 /* $Id: enumidlist.cpp,v 1. 3 2000-03-27 15:09:19cbratschi Exp $ */1 /* $Id: enumidlist.cpp,v 1.4 2000-03-29 15:24:03 cbratschi Exp $ */ 2 2 3 3 /* … … 187 187 ICOM_THIS(IEnumIDListImpl,iface); 188 188 189 const MULTICOUNT = 64; 189 190 LPITEMIDLIST pidl=NULL; 190 WIN32_FIND_DATAA stffile; 191 WIN32_FIND_DATAA *stffile = NULL; 192 DWORD count; 191 193 HANDLE hFile; 192 194 CHAR szPath[MAX_PATH]; … … 204 206 { 205 207 TRACE("-- (%p)-> enumerate SHCONTF_FOLDERS of %s\n",This,debugstr_a(szPath)); 206 hFile = FindFirstFileA(szPath,&stffile); 207 if ( hFile != INVALID_HANDLE_VALUE ) 208 count = MULTICOUNT; 209 stffile = (WIN32_FIND_DATAA*)malloc(count*sizeof(WIN32_FIND_DATAA)); 210 hFile = FindFirstFileMultiA(szPath,stffile,&count); 211 if (hFile != INVALID_HANDLE_VALUE) 208 212 { 209 213 do 210 214 { 211 if (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) 212 { //directory 213 if (strcmp (stffile.cFileName, ".") && strcmp (stffile.cFileName, "..")) 214 { 215 pidl = _ILCreateFolder (&stffile); 216 if(pidl && AddToEnumList((IEnumIDList*)This, pidl)) 215 for (int x = 0;x < count;x++) 216 { 217 if (stffile[x].dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) 218 { //directory 219 if (strcmp (stffile[x].cFileName, ".") && strcmp (stffile[x].cFileName, "..")) 217 220 { 221 pidl = _ILCreateFolder (&stffile[x]); 222 if (pidl && AddToEnumList((IEnumIDList*)This, pidl)) 223 continue; 224 free(stffile); 225 FindClose(hFile); 226 return FALSE; 227 } 228 } else if (dwFlags & SHCONTF_NONFOLDERS) 229 { //file 230 pidl = _ILCreateValue(&stffile[x]); 231 if (pidl && AddToEnumList2((IEnumIDList*)This, pidl)) 218 232 continue; 219 } 233 free(stffile); 234 FindClose(hFile); 220 235 return FALSE; 221 236 } 222 } else if (dwFlags & SHCONTF_NONFOLDERS)223 { //file224 pidl = _ILCreateValue(&stffile);225 if(pidl && AddToEnumList2((IEnumIDList*)This, pidl))226 {227 continue;228 }229 return FALSE;230 237 } 231 } while( FindNextFileA(hFile,&stffile));232 FindClose 238 } while(FindNextFileMultiA(hFile,stffile,&(count = MULTICOUNT))); 239 FindClose(hFile); 233 240 UniteEnumLists((IEnumIDList*)This); 234 241 } … … 239 246 { 240 247 TRACE("-- (%p)-> enumerate SHCONTF_NONFOLDERS of %s\n",This,debugstr_a(szPath)); 241 hFile = FindFirstFileA(szPath,&stffile); 242 if ( hFile != INVALID_HANDLE_VALUE ) 248 count = MULTICOUNT; 249 if (!stffile) stffile = (WIN32_FIND_DATAA*)malloc(count*sizeof(WIN32_FIND_DATAA)); 250 hFile = FindFirstFileMultiA(szPath,stffile,&count); 251 if (hFile != INVALID_HANDLE_VALUE) 243 252 { 244 253 do 245 254 { 246 if (! (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))255 for (int x = 0;x < count;x++) 247 256 { 248 pidl = _ILCreateValue(&stffile); 249 if(pidl && AddToEnumList((IEnumIDList*)This, pidl)) 257 if (! (stffile[x].dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) 250 258 { 251 continue; 259 pidl = _ILCreateValue(&stffile[x]); 260 if (pidl && AddToEnumList((IEnumIDList*)This, pidl)) 261 continue; 262 free(stffile); 263 FindClose(hFile); 264 return FALSE; 252 265 } 253 return FALSE;254 266 } 255 } while( FindNextFileA(hFile,&stffile));267 } while(FindNextFileMultiA(hFile,stffile,&(count = MULTICOUNT))); 256 268 FindClose (hFile); 257 269 } 258 270 } 271 if (stffile) free(stffile); 272 259 273 return TRUE; 260 274 } -
trunk/src/shell32/folders.cpp
r3243 r3271 1 /* $Id: folders.cpp,v 1. 2 2000-03-26 16:34:41cbratschi Exp $ */1 /* $Id: folders.cpp,v 1.3 2000-03-29 15:24:03 cbratschi Exp $ */ 2 2 3 3 /* … … 217 217 else /* object is file */ 218 218 { 219 if (_ILGetExtension (pSimplePidl, sTemp, MAX_PATH) 220 && HCR_MapTypeToValue(sTemp, sTemp, MAX_PATH, TRUE) 219 if (_ILGetExtension (pSimplePidl, sTemp, MAX_PATH)) 220 { 221 if (HCR_MapTypeToValue(sTemp, sTemp, MAX_PATH, TRUE) 221 222 && HCR_GetDefaultIcon(sTemp, sTemp, MAX_PATH, &dwNr)) 222 {223 if (!strcmp("%1",sTemp)) /* icon is in the file */224 223 { 225 SHGetPathFromIDListA(This->pidl, sTemp); 226 dwNr = 0; 224 if (!strcmp("%1",sTemp)) /* icon is in the file */ 225 { 226 SHGetPathFromIDListA(This->pidl, sTemp); 227 dwNr = 0; 228 } 229 lstrcpynA(szIconFile, sTemp, cchMax); 230 *piIndex = dwNr; 231 } else 232 { 233 //icon is in the file/file is icon 234 if (stricmp(sTemp,"EXE") == 0) //CB: add more 235 { 236 SHGetPathFromIDListA(This->pidl, sTemp); 237 dwNr = 0; 238 lstrcpynA(szIconFile, sTemp, cchMax); 239 *piIndex = dwNr; 240 } else //default icon 241 { 242 lstrcpynA(szIconFile, "shell32.dll", cchMax); 243 *piIndex = 0; 244 } 227 245 } 228 lstrcpynA(szIconFile, sTemp, cchMax); 229 *piIndex = dwNr; 230 } 231 else /* default icon */ 246 } else /* default icon */ 232 247 { 233 248 lstrcpynA(szIconFile, "shell32.dll", cchMax); -
trunk/src/shell32/iconcache.cpp
r3250 r3271 1 /* $Id: iconcache.cpp,v 1. 5 2000-03-27 15:09:20cbratschi Exp $ */1 /* $Id: iconcache.cpp,v 1.6 2000-03-29 15:24:04 cbratschi Exp $ */ 2 2 3 3 /* … … 251 251 HGLOBAL WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON * RetPtr, UINT nIconIndex, UINT n, UINT cxDesired, UINT cyDesired ) 252 252 { HGLOBAL hRet = 0; 253 LPBYTE 253 LPBYTE pData; 254 254 OFSTRUCT ofs; 255 255 DWORD sig; 256 256 HFILE hFile = OpenFile( lpszExeFileName, &ofs, OF_READ ); 257 UINT 258 LPBYTE 259 HANDLE 257 UINT iconDirCount = 0,iconCount = 0; 258 LPBYTE peimage; 259 HANDLE fmapping; 260 260 ULONG uSize; 261 261 … … 619 619 if ( INVALID_INDEX == index ) 620 620 { 621 ret = SIC_LoadIcon (sSourceFile, dwSourceIndex); 621 if (strcmp(sSourceFile,"shell32.dll") == 0) 622 ret = -1; //icon not in cache -> set to default 623 else 624 ret = SIC_LoadIcon (sSourceFile, dwSourceIndex); 622 625 } 623 626 else -
trunk/src/shell32/shellord.cpp
r3243 r3271 1 /* $Id: shellord.cpp,v 1. 6 2000-03-26 16:34:51cbratschi Exp $ */1 /* $Id: shellord.cpp,v 1.7 2000-03-29 15:24:05 cbratschi Exp $ */ 2 2 /* 3 3 * The parameters of many functions changes between different OS versions … … 614 614 { 615 615 TRACE("(0x%08x)\n", hWndOwner); 616 if (MessageBoxA( hWndOwner, "Do you want to exit WINE?", "Shutdown", MB_YESNO|MB_ICONQUESTION) == IDOK)616 if (MessageBoxA( hWndOwner, "Do you want to exit Odin?", "Shutdown", MB_YESNO|MB_ICONQUESTION) == IDYES) 617 617 { SendMessageA ( hWndOwner, WM_QUIT, 0, 0); 618 618 } -
trunk/src/shell32/shlfolder.cpp
r3257 r3271 1 /* $Id: shlfolder.cpp,v 1.1 1 2000-03-28 15:28:53cbratschi Exp $ */1 /* $Id: shlfolder.cpp,v 1.12 2000-03-29 15:24:06 cbratschi Exp $ */ 2 2 /* 3 3 * Shell Folder stuff … … 1721 1721 psd->cxChar = DesktopSFHeader[iColumn].cxChar; 1722 1722 psd->str.uType = STRRET_CSTRA; 1723 psd->str.u.cStr[0] = 0; 1723 1724 LoadStringA(shell32_hInstance, DesktopSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); 1724 1725 return S_OK; … … 1726 1727 else 1727 1728 { 1729 psd->str.u.cStr[0] = 0; 1728 1730 /* the data from the pidl */ 1729 1731 switch(iColumn) -
trunk/src/shell32/shlview.cpp
r3257 r3271 1 /* $Id: shlview.cpp,v 1.1 1 2000-03-28 15:28:54cbratschi Exp $ */1 /* $Id: shlview.cpp,v 1.12 2000-03-29 15:24:08 cbratschi Exp $ */ 2 2 /* 3 3 * ShellView … … 1200 1200 SHELLDETAILS sd; 1201 1201 1202 IShellFolder2_GetDetailsOf(This->pSF2Parent, pidl, lpdi->item.iSubItem, &sd); 1203 StrRetToStrNA( lpdi->item.pszText, lpdi->item.cchTextMax, &sd.str, NULL); 1204 TRACE("-- text=%s\n",lpdi->item.pszText); 1202 if(IShellFolder2_GetDetailsOf(This->pSF2Parent, pidl, lpdi->item.iSubItem, &sd) == S_OK) 1203 { 1204 StrRetToStrNA( lpdi->item.pszText, lpdi->item.cchTextMax, &sd.str, NULL); 1205 TRACE("-- text=%s\n",lpdi->item.pszText); 1206 } else lpdi->item.pszText[0] = 0; 1205 1207 } 1206 1208 else … … 1210 1212 } 1211 1213 if(lpdi->item.mask & LVIF_IMAGE) /* image requested */ 1212 { 1213 lpdi->item.iImage = SHMapPIDLToSystemImageListIndex(This->pSFParent, pidl, 0); 1214 } 1214 { 1215 lpdi->item.iImage = SHMapPIDLToSystemImageListIndex(This->pSFParent, pidl, 0); 1216 } 1217 #if 0 //CB: experimental (local cache would be better) 1218 lpdi->item.mask |= LVIF_DI_SETITEM; 1219 #endif 1215 1220 break; 1216 1221
Note:
See TracChangeset
for help on using the changeset viewer.