- Timestamp:
- Mar 28, 2000, 5:28:54 PM (25 years ago)
- Location:
- trunk/src/shell32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/pidl.cpp
r3243 r3257 1 /* $Id: pidl.cpp,v 1. 6 2000-03-26 16:34:42cbratschi Exp $ */1 /* $Id: pidl.cpp,v 1.7 2000-03-28 15:28:43 cbratschi Exp $ */ 2 2 3 3 /* … … 50 50 ODINDEBUGCHANNEL(SHELL32-PIDL) 51 51 52 #ifdef DEBUG 52 53 void pdump (LPCITEMIDLIST pidl) 53 54 { DWORD type; … … 100 101 101 102 } 103 #endif 104 102 105 #define BYTES_PRINTED 32 103 106 BOOL pcheck (LPCITEMIDLIST pidl) -
trunk/src/shell32/pidl.h
r3243 r3257 1 /* $Id: pidl.h,v 1. 3 2000-03-26 16:34:43cbratschi Exp $ */1 /* $Id: pidl.h,v 1.4 2000-03-28 15:28:45 cbratschi Exp $ */ 2 2 3 3 /* … … 137 137 BOOL WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); 138 138 void WINAPI _ILGetFileType (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); 139 DWORD WINAPI _ILGetFileAttributes(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);139 DWORD WINAPI _ILGetFileAttributes (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); 140 140 DWORD WINAPI _ILGetFileSizeKB (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); 141 141 … … 182 182 * debug helper 183 183 */ 184 #ifdef DEBUG 184 185 void pdump (LPCITEMIDLIST pidl); 186 #else 187 #define pdump(pidl) 188 #endif 189 //CB: needed in release build 185 190 BOOL pcheck (LPCITEMIDLIST pidl); 186 191 -
trunk/src/shell32/shell32_En.orc
r3243 r3257 1 /* $Id: shell32_En.orc,v 1. 2 2000-03-26 16:34:45cbratschi Exp $ */1 /* $Id: shell32_En.orc,v 1.3 2000-03-28 15:28:46 cbratschi Exp $ */ 2 2 LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT 3 3 … … 63 63 IDS_LOCALHARDRIVES "Local Hard Drives" 64 64 IDS_FILENOTFOUND "File not found" 65 IDS_35FLOPPY "3.5 disk" 66 IDS_525FLOPPY "5.25 disk" 65 67 } 66 68 -
trunk/src/shell32/shellpath.cpp
r3243 r3257 1 /* $Id: shellpath.cpp,v 1. 7 2000-03-26 16:34:52 cbratschi Exp $ */1 /* $Id: shellpath.cpp,v 1.8 2000-03-28 15:28:52 cbratschi Exp $ */ 2 2 3 3 /* … … 555 555 return 0; 556 556 } 557 557 558 static BOOL PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask) 558 559 { 559 while (*name && *mask && *mask!=';') { 560 if (*mask=='*') { 561 do { 562 if (PathMatchSingleMaskW(name,mask+1)) return 1; /* try substrings */ 560 while (*name && *mask && (*mask != ';')) 561 { 562 if (*mask == '*') 563 { 564 do 565 { 566 if (PathMatchSingleMaskW(name,mask+1)) return 1; /* try substrings */ 563 567 } while (*name++); 564 return 0;568 return FALSE; 565 569 } 566 if ( towupper(*mask)!=towupper(*name) && *mask!='?') return 0;570 if ((towupper(*mask) != towupper(*name)) && (*mask != '?')) return 0; 567 571 name++; 568 572 mask++; 569 573 } 570 if (!*name) { 571 while (*mask=='*') mask++; 572 if (!*mask || *mask==';') return 1; 574 if (!*name) 575 { 576 while (*mask == '*') mask++; 577 if (!*mask || (*mask == ';')) return TRUE; 573 578 } 574 return 0; 579 580 return FALSE; 575 581 } 576 582 /************************************************************************* … … 586 592 TRACE("%s %s\n",name,mask); 587 593 588 if (!lstrcmpA( mask, "*.*" )) return 1; /* we don't require a period */ 589 590 while (*mask) { 591 if (PathMatchSingleMaskA(name,mask)) return 1; /* helper function */ 594 if (!lstrcmpA( mask, "*.*" )) return TRUE; /* we don't require a period */ 595 596 while (*mask) 597 { 598 if (PathMatchSingleMaskA(name,mask)) return TRUE; /* helper function */ 592 599 while (*mask && *mask!=';') mask++; 593 if (*mask==';') { 600 if (*mask==';') 601 { 594 602 mask++; 595 603 while (*mask==' ') mask++; /* masks may be separated by "; " */ 596 } 597 } 598 return 0; 599 } 604 } 605 } 606 607 return FALSE; 608 } 609 600 610 ODINFUNCTION2(BOOL, PathMatchSpecW, 601 611 LPCWSTR, name, 602 612 LPCWSTR, mask) 603 { WCHAR stemp[4];613 { 604 614 TRACE("%ls %ls\n",name,mask); 605 lstrcpyAtoW(stemp,"*.*"); 606 if (!lstrcmpW( mask, stemp )) return 1; /* we don't require a period */ 607 608 while (*mask) { 609 if (PathMatchSingleMaskW(name,mask)) return 1; /* helper function */ 610 while (*mask && *mask!=';') mask++; 611 if (*mask==';') { 615 616 if (!lstrcmpW( mask, (WCHAR*)L"*.*" )) return TRUE; /* we don't require a period */ 617 618 while (*mask) 619 { 620 if (PathMatchSingleMaskW(name,mask)) return TRUE; /* helper function */ 621 while (*mask && (*mask != ';')) mask++; 622 if (*mask == ';') 623 { 612 624 mask++; 613 625 while (*mask==' ') mask++; /* masks may be separated by "; " */ 614 } 615 } 616 return 0; 626 } 627 } 628 629 return FALSE; 617 630 } 618 631 ODINFUNCTION2(BOOL, PathMatchSpecAW, 619 632 LPVOID, name, 620 633 LPVOID, mask) 621 { if (VERSION_OsIsUnicode()) 634 { 635 if (VERSION_OsIsUnicode()) 622 636 return PathMatchSpecW( (LPWSTR)name, (LPWSTR)mask ); 623 637 return PathMatchSpecA( (LPSTR)name, (LPSTR)mask ); … … 1295 1309 FIXME("(%p),stub!\n", pSubKey); 1296 1310 1297 1311 return ERROR_SUCCESS; /* return success */ 1298 1312 } 1299 1313 … … 1309 1323 FIXME("(%p),stub!\n", pSubKey); 1310 1324 1311 1325 return ERROR_SUCCESS; /* return success */ 1312 1326 } 1313 1327 … … 1327 1341 FIXME("(%p),stub!\n", pSubKey); 1328 1342 1329 1343 return ERROR_SUCCESS; /* return success */ 1330 1344 } 1331 1345 … … 1343 1357 FIXME("(%p),stub!\n", pSubKey); 1344 1358 1345 1346 } 1347 1359 return ERROR_SUCCESS; /* return success */ 1360 } 1361 -
trunk/src/shell32/shlfolder.cpp
r3250 r3257 1 /* $Id: shlfolder.cpp,v 1.1 0 2000-03-27 15:09:21cbratschi Exp $ */1 /* $Id: shlfolder.cpp,v 1.11 2000-03-28 15:28:53 cbratschi Exp $ */ 2 2 /* 3 3 * Shell Folder stuff … … 114 114 /* get the shellfolder for the child pidl and let it analyse further */ 115 115 hr = IShellFolder_BindToObject(psf, *pidlInOut, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); 116 dprintf(("C 1")); 116 117 117 if (psfChild) 118 118 { dprintf(("C 1a %d",psfChild/*,(psfChild)->fnParseDisplayName()*/)); 119 119 hr = IShellFolder_ParseDisplayName(psfChild, hwndOwner, NULL, szNext, pEaten, &pidlOut, pdwAttributes); 120 dprintf(("C 1b")); 120 121 121 IShellFolder_Release(psfChild); 122 dprintf(("C 2"));123 122 pidlTemp = ILCombine(*pidlInOut, pidlOut); 124 dprintf(("C 3"));125 123 if (pidlOut) 126 124 ILFree(pidlOut); 127 125 } 128 dprintf(("C 4")); 126 129 127 ILFree(*pidlInOut); 130 128 *pidlInOut = pidlTemp; … … 798 796 { 799 797 LPPIDLDATA pd1, pd2; 798 800 799 pd1 = _ILGetDataPointer(pidl1); 801 800 pd2 = _ILGetDataPointer(pidl2); … … 2099 2098 if ((szPath[0] == 'A') || (szPath[0] == 'a') || (szPath[0] == 'B') || (szPath[0] == 'b')) 2100 2099 { 2101 //CB: todo: move to resource, German name is "3,5-Diskette" -> English "3.5-Disk"? 2102 strcpy(szDrive,"Floppy drive"); 2100 //floppy 2101 strncpy(szDrive,szPath,2); 2102 //3.5 floppy 2103 LoadStringA(shell32_hInstance,IDS_35FLOPPY,szPath,sizeof(szPath)-10); 2104 //CB: todo: 5.25 floppy check 2105 strcat(szPath," ("); 2106 strncat(szPath,szDrive,2); 2107 strcat(szPath,")"); 2103 2108 } else 2104 2109 { 2105 2110 GetVolumeInformationA(szPath,szDrive,12,&dwVolumeSerialNumber,&dwMaximumComponetLength,&dwFileSystemFlags,NULL,0); 2111 strcat (szDrive," ("); 2112 strncat (szDrive, szPath, 2); 2113 strcat (szDrive,")"); 2114 strcpy (szPath, szDrive); 2106 2115 } 2107 strcat (szDrive," (");2108 strncat (szDrive, szPath, 2);2109 strcat (szDrive,")");2110 strcpy (szPath, szDrive);2111 2116 } 2112 2117 } -
trunk/src/shell32/shlview.cpp
r3250 r3257 1 /* $Id: shlview.cpp,v 1.1 0 2000-03-27 15:09:22cbratschi Exp $ */1 /* $Id: shlview.cpp,v 1.11 2000-03-28 15:28:54 cbratschi Exp $ */ 2 2 /* 3 3 * ShellView … … 115 115 #define FILEDIALOG_COLUMN_TIME 3 116 116 #define FILEDIALOG_COLUMN_ATTRIB 4 117 //CB: todo: drive view!118 117 119 118 /*menu items */ … … 184 183 */ 185 184 static BOOL IsInCommDlg(IShellViewImpl * This) 186 { return(This->pCommDlgBrowser != NULL); 185 { 186 return(This->pCommDlgBrowser != NULL); 187 187 } 188 188 … … 502 502 503 503 //CB: really slow, even without debug information 504 // too much transfers 504 505 TRACE("%p\n",This); 505 506 … … 507 508 // OS/2's APIs can read more than one file per call -> much faster 508 509 // -> add a new API for faster handling 510 509 511 /* get the itemlist from the shfolder*/ 510 512 hRes = IShellFolder_EnumObjects(This->pSFParent,This->hWnd, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS, &pEnumIDList); … … 526 528 while((S_OK == IEnumIDList_Next(pEnumIDList,1,(LPITEMIDLIST*)&pidl,&dwFetched)) && dwFetched) 527 529 { 528 if ( pDPA_InsertPtr(hdpa, 0x7fff, pidl) == -1)530 if (IncludeObject(This,pidl) == S_OK) /* in a commdlg This works as a filemask*/ 529 531 { 530 SHFree(pidl); 531 } 532 if (pDPA_InsertPtr(hdpa, 0x7fff, pidl) == -1) 533 { 534 SHFree(pidl); 535 } 536 } else SHFree(pidl); 532 537 } 533 538 … … 548 553 pidl = (LPITEMIDLIST)DPA_GetPtr(hdpa, i); 549 554 550 if (IncludeObject(This, pidl) == S_OK) /* in a commdlg This works as a filemask*/ 551 { 552 lvItem.iItem = iPos; /*add the item to the end of the list*/ 553 lvItem.lParam = (LPARAM)pidl; /*set the item's data*/ 554 ListView_InsertItemA(This->hWndList, &lvItem); 555 iPos++; 556 } 557 else 558 SHFree(pidl); /* the listview has the COPY*/ 555 lvItem.iItem = iPos; /*add the item to the end of the list*/ 556 lvItem.lParam = (LPARAM)pidl; /*set the item's data*/ 557 ListView_InsertItemA(This->hWndList, &lvItem); 558 iPos++; 559 559 } 560 560 -
trunk/src/shell32/shresdef.h
r3243 r3257 1 /* $Id: shresdef.h,v 1. 4 2000-03-26 16:34:56cbratschi Exp $ */1 /* $Id: shresdef.h,v 1.5 2000-03-28 15:28:54 cbratschi Exp $ */ 2 2 3 3 /* … … 42 42 #define IDS_SHV_INVALID_MOVE 31 43 43 44 #define ID_LISTVIEW 44 #define ID_LISTVIEW 2000 45 45 #define ID_NEWFOLDER 0x7053 46 46 … … 57 57 #define IDS_LOCALHARDRIVES 113 58 58 #define IDS_FILENOTFOUND 114 59 #define IDS_35FLOPPY 115 60 #define IDS_525FLOPPY 116 59 61 60 62 #endif /* __WINE_SHELL_RES_H */
Note:
See TracChangeset
for help on using the changeset viewer.