shell32: Use shared code to return column details from IShellFolder2::GetDetailsOf().
This commit is contained in:
parent
506264becd
commit
e51fe8e070
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Virtual Folder
|
* Virtual Folder
|
||||||
* common definitions
|
* common definitions
|
||||||
|
@ -30,6 +29,8 @@ typedef struct {
|
||||||
int cxChar;
|
int cxChar;
|
||||||
} shvheader;
|
} shvheader;
|
||||||
|
|
||||||
|
HRESULT SHELL32_GetColumnDetails(const shvheader *data, int column, SHELLDETAILS *details);
|
||||||
|
|
||||||
#define GET_SHGDN_FOR(dwFlags) ((DWORD)dwFlags & (DWORD)0x0000FF00)
|
#define GET_SHGDN_FOR(dwFlags) ((DWORD)dwFlags & (DWORD)0x0000FF00)
|
||||||
#define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF)
|
#define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF)
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ static inline IDesktopFolderImpl *impl_from_IPersist( IPersist *iface )
|
||||||
return (IDesktopFolderImpl *)((char*)iface - FIELD_OFFSET(IDesktopFolderImpl, lpVtblIPersist));
|
return (IDesktopFolderImpl *)((char*)iface - FIELD_OFFSET(IDesktopFolderImpl, lpVtblIPersist));
|
||||||
}
|
}
|
||||||
|
|
||||||
static const shvheader DesktopSFHeader[] = {
|
static const shvheader desktop_header[] = {
|
||||||
{IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
|
{IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
|
||||||
{IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
{IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
||||||
{IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
{IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
||||||
|
@ -89,7 +89,7 @@ static const shvheader DesktopSFHeader[] = {
|
||||||
{IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5}
|
{IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5}
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DESKTOPSHELLVIEWCOLUMNS 5
|
#define DESKTOPSHELLVIEWCOLUMNS sizeof(desktop_header)/sizeof(shvheader)
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* ISF_Desktop_fnQueryInterface
|
* ISF_Desktop_fnQueryInterface
|
||||||
|
@ -775,7 +775,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetDefaultColumnState (
|
||||||
if (!pcsFlags || iColumn >= DESKTOPSHELLVIEWCOLUMNS)
|
if (!pcsFlags || iColumn >= DESKTOPSHELLVIEWCOLUMNS)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
*pcsFlags = DesktopSFHeader[iColumn].pcsFlags;
|
*pcsFlags = desktop_header[iColumn].pcsFlags;
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -801,14 +801,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetDetailsOf (IShellFolder2 * iface,
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
if (!pidl)
|
if (!pidl)
|
||||||
{
|
return SHELL32_GetColumnDetails(desktop_header, iColumn, psd);
|
||||||
psd->fmt = DesktopSFHeader[iColumn].fmt;
|
|
||||||
psd->cxChar = DesktopSFHeader[iColumn].cxChar;
|
|
||||||
psd->str.uType = STRRET_CSTR;
|
|
||||||
LoadStringA (shell32_hInstance, DesktopSFHeader[iColumn].colnameid,
|
|
||||||
psd->str.u.cStr, MAX_PATH);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* the data from the pidl */
|
/* the data from the pidl */
|
||||||
psd->str.uType = STRRET_CSTR;
|
psd->str.uType = STRRET_CSTR;
|
||||||
|
|
|
@ -86,14 +86,14 @@ static inline IMyComputerFolderImpl *impl_from_IPersistFolder2( IPersistFolder2
|
||||||
* IShellFolder [MyComputer] implementation
|
* IShellFolder [MyComputer] implementation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const shvheader MyComputerSFHeader[] = {
|
static const shvheader mycomputer_header[] = {
|
||||||
{IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
|
{IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
|
||||||
{IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
{IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
||||||
{IDS_SHV_COLUMN6, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
{IDS_SHV_COLUMN6, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
||||||
{IDS_SHV_COLUMN7, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
{IDS_SHV_COLUMN7, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MYCOMPUTERSHELLVIEWCOLUMNS 4
|
#define MYCOMPUTERSHELLVIEWCOLUMNS sizeof(mycomputer_header)/sizeof(shvheader)
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* ISF_MyComputer_Constructor
|
* ISF_MyComputer_Constructor
|
||||||
|
@ -809,11 +809,13 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumnState (
|
||||||
{
|
{
|
||||||
IMyComputerFolderImpl *This = (IMyComputerFolderImpl *)iface;
|
IMyComputerFolderImpl *This = (IMyComputerFolderImpl *)iface;
|
||||||
|
|
||||||
TRACE ("(%p)\n", This);
|
TRACE ("(%p)->(%d %p)\n", This, iColumn, pcsFlags);
|
||||||
|
|
||||||
if (!pcsFlags || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS)
|
if (!pcsFlags || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
*pcsFlags = MyComputerSFHeader[iColumn].pcsFlags;
|
|
||||||
|
*pcsFlags = mycomputer_header[iColumn].pcsFlags;
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -830,7 +832,9 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 * iface,
|
||||||
LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd)
|
LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd)
|
||||||
{
|
{
|
||||||
IMyComputerFolderImpl *This = (IMyComputerFolderImpl *)iface;
|
IMyComputerFolderImpl *This = (IMyComputerFolderImpl *)iface;
|
||||||
HRESULT hr;
|
char szPath[MAX_PATH];
|
||||||
|
ULARGE_INTEGER ulBytes;
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
|
||||||
TRACE ("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd);
|
TRACE ("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd);
|
||||||
|
|
||||||
|
@ -838,21 +842,11 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 * iface,
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
if (!pidl)
|
if (!pidl)
|
||||||
{
|
return SHELL32_GetColumnDetails(mycomputer_header, iColumn, psd);
|
||||||
psd->fmt = MyComputerSFHeader[iColumn].fmt;
|
|
||||||
psd->cxChar = MyComputerSFHeader[iColumn].cxChar;
|
|
||||||
psd->str.uType = STRRET_CSTR;
|
|
||||||
LoadStringA (shell32_hInstance, MyComputerSFHeader[iColumn].colnameid,
|
|
||||||
psd->str.u.cStr, MAX_PATH);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
char szPath[MAX_PATH];
|
|
||||||
ULARGE_INTEGER ulBytes;
|
|
||||||
|
|
||||||
psd->str.u.cStr[0] = 0x00;
|
psd->str.u.cStr[0] = 0;
|
||||||
psd->str.uType = STRRET_CSTR;
|
psd->str.uType = STRRET_CSTR;
|
||||||
|
|
||||||
switch (iColumn)
|
switch (iColumn)
|
||||||
{
|
{
|
||||||
case 0: /* name */
|
case 0: /* name */
|
||||||
|
@ -879,8 +873,6 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 * iface,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
hr = S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,20 +65,21 @@ typedef struct {
|
||||||
static const IShellFolder2Vtbl vt_ShellFolder2;
|
static const IShellFolder2Vtbl vt_ShellFolder2;
|
||||||
static const IPersistFolder2Vtbl vt_NP_PersistFolder2;
|
static const IPersistFolder2Vtbl vt_NP_PersistFolder2;
|
||||||
|
|
||||||
|
static inline IGenericSFImpl *impl_from_IPersistFolder2(IPersistFolder2 *iface)
|
||||||
#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = \
|
{
|
||||||
(class*)(((char*)name) - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2))
|
return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2));
|
||||||
|
}
|
||||||
|
|
||||||
#define _IUnknown_(This) ((IUnknown*)&(This)->lpVtbl)
|
#define _IUnknown_(This) ((IUnknown*)&(This)->lpVtbl)
|
||||||
#define _IShellFolder_(This) ((IShellFolder*)&(This)->lpVtbl)
|
#define _IShellFolder_(This) ((IShellFolder*)&(This)->lpVtbl)
|
||||||
#define _IPersistFolder2_(This) (&(This)->lpVtblPersistFolder2)
|
#define _IPersistFolder2_(This) (&(This)->lpVtblPersistFolder2)
|
||||||
|
|
||||||
static const shvheader NetworkPlacesSFHeader[] = {
|
static const shvheader networkplaces_header[] = {
|
||||||
{IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
|
{IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
|
||||||
{IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}
|
{IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NETWORKPLACESSHELLVIEWCOLUMNS 2
|
#define NETWORKPLACESSHELLVIEWCOLUMNS sizeof(networkplaces_header)/sizeof(shvheader)
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* ISF_NetworkPlaces_Constructor
|
* ISF_NetworkPlaces_Constructor
|
||||||
|
@ -534,11 +535,13 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnGetDefaultColumnState (
|
||||||
{
|
{
|
||||||
IGenericSFImpl *This = (IGenericSFImpl *)iface;
|
IGenericSFImpl *This = (IGenericSFImpl *)iface;
|
||||||
|
|
||||||
TRACE ("(%p)\n", This);
|
TRACE ("(%p)->(%d %p)\n", This, iColumn, pcsFlags);
|
||||||
|
|
||||||
if (!pcsFlags || iColumn >= NETWORKPLACESSHELLVIEWCOLUMNS)
|
if (!pcsFlags || iColumn >= NETWORKPLACESSHELLVIEWCOLUMNS)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
*pcsFlags = NetworkPlacesSFHeader[iColumn].pcsFlags;
|
|
||||||
|
*pcsFlags = networkplaces_header[iColumn].pcsFlags;
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -600,7 +603,7 @@ static const IShellFolder2Vtbl vt_ShellFolder2 = {
|
||||||
static HRESULT WINAPI INPFldr_PersistFolder2_QueryInterface (IPersistFolder2 * iface,
|
static HRESULT WINAPI INPFldr_PersistFolder2_QueryInterface (IPersistFolder2 * iface,
|
||||||
REFIID iid, LPVOID * ppvObj)
|
REFIID iid, LPVOID * ppvObj)
|
||||||
{
|
{
|
||||||
_ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface);
|
IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
|
||||||
|
|
||||||
TRACE ("(%p)\n", This);
|
TRACE ("(%p)\n", This);
|
||||||
|
|
||||||
|
@ -612,7 +615,7 @@ static HRESULT WINAPI INPFldr_PersistFolder2_QueryInterface (IPersistFolder2 * i
|
||||||
*/
|
*/
|
||||||
static ULONG WINAPI INPFldr_PersistFolder2_AddRef (IPersistFolder2 * iface)
|
static ULONG WINAPI INPFldr_PersistFolder2_AddRef (IPersistFolder2 * iface)
|
||||||
{
|
{
|
||||||
_ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface);
|
IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
|
||||||
|
|
||||||
TRACE ("(%p)->(count=%u)\n", This, This->ref);
|
TRACE ("(%p)->(count=%u)\n", This, This->ref);
|
||||||
|
|
||||||
|
@ -624,7 +627,7 @@ static ULONG WINAPI INPFldr_PersistFolder2_AddRef (IPersistFolder2 * iface)
|
||||||
*/
|
*/
|
||||||
static ULONG WINAPI INPFldr_PersistFolder2_Release (IPersistFolder2 * iface)
|
static ULONG WINAPI INPFldr_PersistFolder2_Release (IPersistFolder2 * iface)
|
||||||
{
|
{
|
||||||
_ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface);
|
IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
|
||||||
|
|
||||||
TRACE ("(%p)->(count=%u)\n", This, This->ref);
|
TRACE ("(%p)->(count=%u)\n", This, This->ref);
|
||||||
|
|
||||||
|
@ -637,7 +640,7 @@ static ULONG WINAPI INPFldr_PersistFolder2_Release (IPersistFolder2 * iface)
|
||||||
static HRESULT WINAPI INPFldr_PersistFolder2_GetClassID (
|
static HRESULT WINAPI INPFldr_PersistFolder2_GetClassID (
|
||||||
IPersistFolder2 * iface, CLSID * lpClassId)
|
IPersistFolder2 * iface, CLSID * lpClassId)
|
||||||
{
|
{
|
||||||
_ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface);
|
IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
|
||||||
|
|
||||||
TRACE ("(%p)\n", This);
|
TRACE ("(%p)\n", This);
|
||||||
|
|
||||||
|
@ -657,7 +660,7 @@ static HRESULT WINAPI INPFldr_PersistFolder2_GetClassID (
|
||||||
static HRESULT WINAPI INPFldr_PersistFolder2_Initialize (
|
static HRESULT WINAPI INPFldr_PersistFolder2_Initialize (
|
||||||
IPersistFolder2 * iface, LPCITEMIDLIST pidl)
|
IPersistFolder2 * iface, LPCITEMIDLIST pidl)
|
||||||
{
|
{
|
||||||
_ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface);
|
IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
|
||||||
|
|
||||||
TRACE ("(%p)->(%p)\n", This, pidl);
|
TRACE ("(%p)->(%p)\n", This, pidl);
|
||||||
|
|
||||||
|
@ -670,7 +673,7 @@ static HRESULT WINAPI INPFldr_PersistFolder2_Initialize (
|
||||||
static HRESULT WINAPI INPFldr_PersistFolder2_GetCurFolder (
|
static HRESULT WINAPI INPFldr_PersistFolder2_GetCurFolder (
|
||||||
IPersistFolder2 * iface, LPITEMIDLIST * pidl)
|
IPersistFolder2 * iface, LPITEMIDLIST * pidl)
|
||||||
{
|
{
|
||||||
_ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface);
|
IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
|
||||||
|
|
||||||
TRACE ("(%p)->(%p)\n", This, pidl);
|
TRACE ("(%p)->(%p)\n", This, pidl);
|
||||||
|
|
||||||
|
|
|
@ -303,14 +303,7 @@ static HRESULT WINAPI IShellFolder_Printers_fnGetDetailsOf (IShellFolder2 *iface
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
|
|
||||||
if (!pidl)
|
if (!pidl)
|
||||||
{
|
return SHELL32_GetColumnDetails(printers_header, iColumn, psd);
|
||||||
psd->fmt = printers_header[iColumn].fmt;
|
|
||||||
psd->cxChar = printers_header[iColumn].cxChar;
|
|
||||||
psd->str.uType = STRRET_CSTR;
|
|
||||||
LoadStringA (shell32_hInstance, printers_header[iColumn].colnameid,
|
|
||||||
psd->str.u.cStr, MAX_PATH);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
FIXME("unimplemented for supplied pidl\n");
|
FIXME("unimplemented for supplied pidl\n");
|
||||||
|
|
||||||
|
|
|
@ -1315,7 +1315,9 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetDetailsOf(IShellFolder2* iface
|
||||||
HRESULT hr = E_FAIL;
|
HRESULT hr = E_FAIL;
|
||||||
struct passwd *pPasswd;
|
struct passwd *pPasswd;
|
||||||
struct group *pGroup;
|
struct group *pGroup;
|
||||||
static const shvheader SFHeader[SHELLVIEWCOLUMNS] = {
|
struct stat statItem;
|
||||||
|
|
||||||
|
static const shvheader unixfs_header[SHELLVIEWCOLUMNS] = {
|
||||||
{IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
|
{IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
|
||||||
{IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
{IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
||||||
{IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
{IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
|
||||||
|
@ -1330,14 +1332,9 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetDetailsOf(IShellFolder2* iface
|
||||||
if (!psd || iColumn >= SHELLVIEWCOLUMNS)
|
if (!psd || iColumn >= SHELLVIEWCOLUMNS)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
if (!pidl) {
|
if (!pidl)
|
||||||
psd->fmt = SFHeader[iColumn].fmt;
|
return SHELL32_GetColumnDetails(unixfs_header, iColumn, psd);
|
||||||
psd->cxChar = SFHeader[iColumn].cxChar;
|
|
||||||
psd->str.uType = STRRET_CSTR;
|
|
||||||
LoadStringA(shell32_hInstance, SFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH);
|
|
||||||
return S_OK;
|
|
||||||
} else {
|
|
||||||
struct stat statItem;
|
|
||||||
if (iColumn == 4 || iColumn == 5 || iColumn == 6) {
|
if (iColumn == 4 || iColumn == 5 || iColumn == 6) {
|
||||||
char szPath[FILENAME_MAX];
|
char szPath[FILENAME_MAX];
|
||||||
strcpy(szPath, This->m_pszPath);
|
strcpy(szPath, This->m_pszPath);
|
||||||
|
@ -1346,8 +1343,10 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetDetailsOf(IShellFolder2* iface
|
||||||
if (stat(szPath, &statItem))
|
if (stat(szPath, &statItem))
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
psd->str.u.cStr[0] = '\0';
|
psd->str.u.cStr[0] = '\0';
|
||||||
psd->str.uType = STRRET_CSTR;
|
psd->str.uType = STRRET_CSTR;
|
||||||
|
|
||||||
switch (iColumn) {
|
switch (iColumn) {
|
||||||
case 0:
|
case 0:
|
||||||
hr = IShellFolder2_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL|SHGDN_INFOLDER, &psd->str);
|
hr = IShellFolder2_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL|SHGDN_INFOLDER, &psd->str);
|
||||||
|
@ -1383,7 +1382,6 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetDetailsOf(IShellFolder2* iface
|
||||||
if (pGroup) strcpy(psd->str.u.cStr, pGroup->gr_name);
|
if (pGroup) strcpy(psd->str.u.cStr, pGroup->gr_name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
|
#define NONAMELESSUNION
|
||||||
|
#define NONAMELESSSTRUCT
|
||||||
|
|
||||||
#include "winerror.h"
|
#include "winerror.h"
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
|
@ -542,6 +544,16 @@ HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST p
|
||||||
return nReturn;
|
return nReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT SHELL32_GetColumnDetails(const shvheader *data, int column, SHELLDETAILS *details)
|
||||||
|
{
|
||||||
|
details->fmt = data[column].fmt;
|
||||||
|
details->cxChar = data[column].cxChar;
|
||||||
|
details->str.uType = STRRET_CSTR;
|
||||||
|
LoadStringA (shell32_hInstance, data[column].colnameid, details->str.u.cStr, MAX_PATH);
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SHCreateLinks
|
* SHCreateLinks
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue