Commit bcd05e99 authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

Moved existing path - functions to shellpatch.c.

New: PathRemoveBlanks32A|W, PathMatchSpec32A|W, PathSetDlgItemPath32A|W.
parent 71097995
......@@ -15,8 +15,10 @@ C_SRCS = \
iconcache.c \
pidl.c \
shell32_main.c \
shelllink.c \
shellole.c \
shellord.c \
shellpath.c \
shlfolder.c \
shlview.c
......
......@@ -977,8 +977,9 @@ BOOL32 WINAPI _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize)
default:
return FALSE;
}
sprintf(stemp,"%lu", pdata->u.file.dwFileSize);
return GetNumberFormat32A(LOCALE_USER_DEFAULT, 0, stemp, NULL, pOut, uOutSize);
StrFormatByteSize32A(pdata->u.file.dwFileSize, stemp, 20);
strncpy( pOut, stemp, 20);
return TRUE;
}
BOOL32 WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT32 uOutSize)
......
......@@ -909,11 +909,13 @@ DWORD WINAPI SHGetPathFromIDList32A (LPCITEMIDLIST pidl,LPSTR pszPath)
DWORD WINAPI SHGetPathFromIDList32W (LPCITEMIDLIST pidl,LPWSTR pszPath)
{ char sTemp[MAX_PATH];
FIXME (shell,"(pidl=%p)\n", pidl);
TRACE (shell,"(pidl=%p)\n", pidl);
SHGetPathFromIDList32A (pidl, sTemp);
lstrcpyAtoW(pszPath, sTemp);
TRACE(shell,"-- (%s)\n",debugstr_w(pszPath));
return NOERROR;
}
......
......@@ -206,13 +206,13 @@ static void MergeToolBar(LPSHELLVIEW this)
IShellBrowser_SendControlMsg(this->pShellBrowser,FCW_TOOLBAR,
TB_ADDBITMAP, 8, (LPARAM)&ab, &iStdBMOffset);
TRACE(shell,"TB_ADDBITMAP returns %x\n", iStdBMOffset);
TRACE(shell,"TB_ADDBITMAP returns %lx\n", iStdBMOffset);
ab.nID = IDB_VIEW_SMALL_COLOR; // std view bitmaps
IShellBrowser_SendControlMsg(this->pShellBrowser,FCW_TOOLBAR,
TB_ADDBITMAP, 8, (LPARAM)&ab, &iViewBMOffset);
TRACE(shell,"TB_ADDBITMAP returns %x\n", iViewBMOffset);
TRACE(shell,"TB_ADDBITMAP returns %lx\n", iViewBMOffset);
for (i=0; i<6; ++i)
{ tbActual[i] = c_tbDefault[i];
......@@ -279,7 +279,7 @@ BOOL32 ShellView_CreateList (LPSHELLVIEW this)
* internal
*/
int nColumn1=120; /* width of column */
int nColumn2=50;
int nColumn2=80;
int nColumn3=170;
int nColumn4=60;
......@@ -883,7 +883,7 @@ void ShellView_DoContextMenu(LPSHELLVIEW this, WORD x, WORD y, BOOL32 fDefault)
}
}
else
{ TRACE(shell,"-- invoke command\n", this->aSelectedItems[0]);
{ TRACE(shell,"-- invoke command\n");
ZeroMemory(&cmi, sizeof(cmi));
cmi.cbSize = sizeof(cmi);
cmi.hwnd = this->hWndParent;
......@@ -1011,20 +1011,24 @@ LRESULT ShellView_OnNotify(LPSHELLVIEW this, UINT32 CtlID, LPNMHDR lpnmh)
{ if(lpdi->item.mask & LVIF_TEXT) /*is the text being requested?*/
{ if(_ILIsValue(pidl)) /*is this a value or a folder?*/
{ switch (lpdi->item.iSubItem)
{ case 1:
{ case 1: /* size */
_ILGetFileSize (pidl, lpdi->item.pszText, lpdi->item.cchTextMax);
break;
case 2:
case 2: /* extension */
{ char sTemp[64];
if (!( _ILGetExtension (pidl, sTemp, 64)
&& HCR_MapTypeToValue(sTemp, sTemp, 64)
&& HCR_MapTypeToValue(sTemp, lpdi->item.pszText, lpdi->item.cchTextMax )))
{ strncpy (lpdi->item.pszText, sTemp, lpdi->item.cchTextMax);
strncat (lpdi->item.pszText, "-file", lpdi->item.cchTextMax);
}
if (_ILGetExtension (pidl, sTemp, 64))
{ if (!( HCR_MapTypeToValue(sTemp, sTemp, 64)
&& HCR_MapTypeToValue(sTemp, lpdi->item.pszText, lpdi->item.cchTextMax )))
{ strncpy (lpdi->item.pszText, sTemp, lpdi->item.cchTextMax);
strncat (lpdi->item.pszText, "-file", lpdi->item.cchTextMax);
}
}
else /* no extension found */
{ lpdi->item.pszText[0]=0x00;
}
}
break;
case 3:
case 3: /* date */
_ILGetFileDate (pidl, lpdi->item.pszText, lpdi->item.cchTextMax);
break;
}
......
......@@ -283,7 +283,20 @@ LPCWSTR WINAPI PathFindFilename32W(LPCWSTR path);
#define PathFindFilename WINELIB_NAME_AW(PathFindFilename)
LPCVOID WINAPI PathFindFilename32AW(LPCVOID path);
LPSTR WINAPI PathRemoveBlanks(LPSTR str);
BOOL32 WINAPI PathMatchSpec32A(LPCSTR x, LPCSTR y);
BOOL32 WINAPI PathMatchSpec32W(LPCWSTR x, LPCWSTR y);
#define PathMatchSpec WINELIB_NAME_AW(PathMatchSpec)
BOOL32 WINAPI PathMatchSpec32AW(LPVOID x, LPVOID y);
LPSTR WINAPI PathRemoveBlanks32A(LPSTR str);
LPWSTR WINAPI PathRemoveBlanks32W(LPWSTR str);
#define PathRemoveBlanks WINELIB_NAME_AW(PathRemoveBlanks)
LPVOID WINAPI PathRemoveBlanks32AW(LPVOID str);
LPSTR WINAPI StrFormatByteSize32A ( DWORD dw, LPSTR pszBuf, UINT32 cchBuf );
LPWSTR WINAPI StrFormatByteSize32W ( DWORD dw, LPWSTR pszBuf, UINT32 cchBuf );
#define StrFormatByteSize WINELIB_NAME_AW(StrFormatByteSize)
/****************************************************************************
* other functions
*/
......
......@@ -38,7 +38,7 @@ init Shell32LibMain
30 stdcall PathBuildRoot(ptr long) PathBuildRoot
31 stdcall PathFindExtension(ptr) PathFindExtension32AW
32 stdcall PathAddBackslash(ptr) PathAddBackslash32AW
33 stdcall PathRemoveBlanks(str) PathRemoveBlanks
33 stdcall PathRemoveBlanks(str) PathRemoveBlanks32AW
34 stdcall PathFindFilename(ptr) PathFindFilename32AW
35 stdcall PathRemoveFileSpec(str) PathRemoveFileSpec
36 stdcall PathAppend(str str) PathAppend
......@@ -51,9 +51,9 @@ init Shell32LibMain
43 stdcall PathIsExe (ptr) PathIsExe
44 stub DoEnvironmentSubstA@8
45 stdcall PathFileExists(str) PathFileExists
46 stdcall PathMatchSpec (str str) PathMatchSpec
46 stdcall PathMatchSpec (str str) PathMatchSpec32AW
47 stub PathMakeUniqueName@20
48 stub PathSetDlgItemPath@12
48 stdcall PathSetDlgItemPath (long long ptr) PathSetDlgItemPath32AW
49 stub PathQualify@4
50 stub PathStripToRoot@4
51 stdcall PathResolve(str long long) PathResolve
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment