Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e51fe8e0
Commit
e51fe8e0
authored
Apr 18, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Use shared code to return column details from IShellFolder2::GetDetailsOf().
parent
506264be
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
104 additions
and
112 deletions
+104
-112
shfldr.h
dlls/shell32/shfldr.h
+2
-1
shfldr_desktop.c
dlls/shell32/shfldr_desktop.c
+4
-11
shfldr_mycomp.c
dlls/shell32/shfldr_mycomp.c
+17
-25
shfldr_netplaces.c
dlls/shell32/shfldr_netplaces.c
+16
-13
shfldr_printers.c
dlls/shell32/shfldr_printers.c
+1
-8
shfldr_unixfs.c
dlls/shell32/shfldr_unixfs.c
+52
-54
shlfolder.c
dlls/shell32/shlfolder.c
+12
-0
No files found.
dlls/shell32/shfldr.h
View file @
e51fe8e0
/*
/*
* Virtual Folder
* Virtual Folder
* common definitions
* common definitions
...
@@ -30,6 +29,8 @@ typedef struct {
...
@@ -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)
...
...
dlls/shell32/shfldr_desktop.c
View file @
e51fe8e0
...
@@ -81,7 +81,7 @@ static inline IDesktopFolderImpl *impl_from_IPersist( IPersist *iface )
...
@@ -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
DesktopSFH
eader
[]
=
{
static
const
shvheader
desktop_h
eader
[]
=
{
{
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[] = {
...
@@ -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 (
...
@@ -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
=
DesktopSFH
eader
[
iColumn
].
pcsFlags
;
*
pcsFlags
=
desktop_h
eader
[
iColumn
].
pcsFlags
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -801,14 +801,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetDetailsOf (IShellFolder2 * iface,
...
@@ -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
;
...
...
dlls/shell32/shfldr_mycomp.c
View file @
e51fe8e0
...
@@ -86,14 +86,14 @@ static inline IMyComputerFolderImpl *impl_from_IPersistFolder2( IPersistFolder2
...
@@ -86,14 +86,14 @@ static inline IMyComputerFolderImpl *impl_from_IPersistFolder2( IPersistFolder2
* IShellFolder [MyComputer] implementation
* IShellFolder [MyComputer] implementation
*/
*/
static
const
shvheader
MyComputerSFH
eader
[]
=
{
static
const
shvheader
mycomputer_h
eader
[]
=
{
{
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 (
...
@@ -809,11 +809,13 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumnState (
{
{
IMyComputerFolderImpl
*
This
=
(
IMyComputerFolderImpl
*
)
iface
;
IMyComputerFolderImpl
*
This
=
(
IMyComputerFolderImpl
*
)
iface
;
TRACE
(
"(%p)
\n
"
,
Thi
s
);
TRACE
(
"(%p)
->(%d %p)
\n
"
,
This
,
iColumn
,
pcsFlag
s
);
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
;
}
}
...
@@ -826,11 +828,13 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsEx (IShellFolder2 * iface,
...
@@ -826,11 +828,13 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsEx (IShellFolder2 * iface,
}
}
/* FIXME: drive size >4GB is rolling over */
/* FIXME: drive size >4GB is rolling over */
static
HRESULT
WINAPI
ISF_MyComputer_fnGetDetailsOf
(
IShellFolder2
*
iface
,
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,23 +842,13 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 * iface,
...
@@ -838,23 +842,13 @@ 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 */
hr
=
IShellFolder_GetDisplayNameOf
(
iface
,
pidl
,
hr
=
IShellFolder_GetDisplayNameOf
(
iface
,
pidl
,
SHGDN_NORMAL
|
SHGDN_INFOLDER
,
&
psd
->
str
);
SHGDN_NORMAL
|
SHGDN_INFOLDER
,
&
psd
->
str
);
...
@@ -878,8 +872,6 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 * iface,
...
@@ -878,8 +872,6 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 * iface,
StrFormatByteSizeA
(
ulBytes
.
u
.
LowPart
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
StrFormatByteSizeA
(
ulBytes
.
u
.
LowPart
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
}
}
break
;
break
;
}
hr
=
S_OK
;
}
}
return
hr
;
return
hr
;
...
...
dlls/shell32/shfldr_netplaces.c
View file @
e51fe8e0
...
@@ -65,20 +65,21 @@ typedef struct {
...
@@ -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
NetworkPlacesSFH
eader
[]
=
{
static
const
shvheader
networkplaces_h
eader
[]
=
{
{
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 (
...
@@ -534,11 +535,13 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnGetDefaultColumnState (
{
{
IGenericSFImpl
*
This
=
(
IGenericSFImpl
*
)
iface
;
IGenericSFImpl
*
This
=
(
IGenericSFImpl
*
)
iface
;
TRACE
(
"(%p)
\n
"
,
Thi
s
);
TRACE
(
"(%p)
->(%d %p)
\n
"
,
This
,
iColumn
,
pcsFlag
s
);
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 = {
...
@@ -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
...
@@ -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)
...
@@ -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)
...
@@ -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 (
...
@@ -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 (
...
@@ -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
);
...
...
dlls/shell32/shfldr_printers.c
View file @
e51fe8e0
...
@@ -303,14 +303,7 @@ static HRESULT WINAPI IShellFolder_Printers_fnGetDetailsOf (IShellFolder2 *iface
...
@@ -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
"
);
...
...
dlls/shell32/shfldr_unixfs.c
View file @
e51fe8e0
...
@@ -1315,7 +1315,9 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetDetailsOf(IShellFolder2* iface
...
@@ -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,59 +1332,55 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetDetailsOf(IShellFolder2* iface
...
@@ -1330,59 +1332,55 @@ 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
;
if
(
iColumn
==
4
||
iColumn
==
5
||
iColumn
==
6
)
{
LoadStringA
(
shell32_hInstance
,
SFHeader
[
iColumn
].
colnameid
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
char
szPath
[
FILENAME_MAX
];
return
S_OK
;
strcpy
(
szPath
,
This
->
m_pszPath
);
}
else
{
if
(
!
UNIXFS_filename_from_shitemid
(
pidl
,
szPath
+
strlen
(
szPath
)))
struct
stat
statItem
;
return
E_INVALIDARG
;
if
(
iColumn
==
4
||
iColumn
==
5
||
iColumn
==
6
)
{
if
(
stat
(
szPath
,
&
statItem
))
char
szPath
[
FILENAME_MAX
];
return
E_INVALIDARG
;
strcpy
(
szPath
,
This
->
m_pszPath
);
}
if
(
!
UNIXFS_filename_from_shitemid
(
pidl
,
szPath
+
strlen
(
szPath
)))
return
E_INVALIDARG
;
psd
->
str
.
u
.
cStr
[
0
]
=
'\0'
;
if
(
stat
(
szPath
,
&
statItem
))
psd
->
str
.
uType
=
STRRET_CSTR
;
return
E_INVALIDARG
;
}
switch
(
iColumn
)
{
psd
->
str
.
u
.
cStr
[
0
]
=
'\0'
;
case
0
:
psd
->
str
.
uType
=
STRRET_CSTR
;
hr
=
IShellFolder2_GetDisplayNameOf
(
iface
,
pidl
,
SHGDN_NORMAL
|
SHGDN_INFOLDER
,
&
psd
->
str
);
switch
(
iColumn
)
{
break
;
case
0
:
case
1
:
hr
=
IShellFolder2_GetDisplayNameOf
(
iface
,
pidl
,
SHGDN_NORMAL
|
SHGDN_INFOLDER
,
&
psd
->
str
);
_ILGetFileSize
(
pidl
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
break
;
break
;
case
1
:
case
2
:
_ILGetFileSize
(
pidl
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
_ILGetFileType
(
pidl
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
break
;
break
;
case
2
:
case
3
:
_ILGetFileType
(
pidl
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
_ILGetFileDate
(
pidl
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
break
;
break
;
case
3
:
case
4
:
_ILGetFileDate
(
pidl
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
psd
->
str
.
u
.
cStr
[
0
]
=
S_ISDIR
(
statItem
.
st_mode
)
?
'd'
:
'-'
;
break
;
psd
->
str
.
u
.
cStr
[
1
]
=
(
statItem
.
st_mode
&
S_IRUSR
)
?
'r'
:
'-'
;
case
4
:
psd
->
str
.
u
.
cStr
[
2
]
=
(
statItem
.
st_mode
&
S_IWUSR
)
?
'w'
:
'-'
;
psd
->
str
.
u
.
cStr
[
0
]
=
S_ISDIR
(
statItem
.
st_mode
)
?
'd'
:
'-'
;
psd
->
str
.
u
.
cStr
[
3
]
=
(
statItem
.
st_mode
&
S_IXUSR
)
?
'x'
:
'-'
;
psd
->
str
.
u
.
cStr
[
1
]
=
(
statItem
.
st_mode
&
S_IRUSR
)
?
'r'
:
'-'
;
psd
->
str
.
u
.
cStr
[
4
]
=
(
statItem
.
st_mode
&
S_IRGRP
)
?
'r'
:
'-'
;
psd
->
str
.
u
.
cStr
[
2
]
=
(
statItem
.
st_mode
&
S_IWUSR
)
?
'w'
:
'-'
;
psd
->
str
.
u
.
cStr
[
5
]
=
(
statItem
.
st_mode
&
S_IWGRP
)
?
'w'
:
'-'
;
psd
->
str
.
u
.
cStr
[
3
]
=
(
statItem
.
st_mode
&
S_IXUSR
)
?
'x'
:
'-'
;
psd
->
str
.
u
.
cStr
[
6
]
=
(
statItem
.
st_mode
&
S_IXGRP
)
?
'x'
:
'-'
;
psd
->
str
.
u
.
cStr
[
4
]
=
(
statItem
.
st_mode
&
S_IRGRP
)
?
'r'
:
'-'
;
psd
->
str
.
u
.
cStr
[
7
]
=
(
statItem
.
st_mode
&
S_IROTH
)
?
'r'
:
'-'
;
psd
->
str
.
u
.
cStr
[
5
]
=
(
statItem
.
st_mode
&
S_IWGRP
)
?
'w'
:
'-'
;
psd
->
str
.
u
.
cStr
[
8
]
=
(
statItem
.
st_mode
&
S_IWOTH
)
?
'w'
:
'-'
;
psd
->
str
.
u
.
cStr
[
6
]
=
(
statItem
.
st_mode
&
S_IXGRP
)
?
'x'
:
'-'
;
psd
->
str
.
u
.
cStr
[
9
]
=
(
statItem
.
st_mode
&
S_IXOTH
)
?
'x'
:
'-'
;
psd
->
str
.
u
.
cStr
[
7
]
=
(
statItem
.
st_mode
&
S_IROTH
)
?
'r'
:
'-'
;
psd
->
str
.
u
.
cStr
[
10
]
=
'\0'
;
psd
->
str
.
u
.
cStr
[
8
]
=
(
statItem
.
st_mode
&
S_IWOTH
)
?
'w'
:
'-'
;
break
;
psd
->
str
.
u
.
cStr
[
9
]
=
(
statItem
.
st_mode
&
S_IXOTH
)
?
'x'
:
'-'
;
case
5
:
psd
->
str
.
u
.
cStr
[
10
]
=
'\0'
;
pPasswd
=
getpwuid
(
statItem
.
st_uid
);
break
;
if
(
pPasswd
)
strcpy
(
psd
->
str
.
u
.
cStr
,
pPasswd
->
pw_name
);
case
5
:
break
;
pPasswd
=
getpwuid
(
statItem
.
st_uid
);
case
6
:
if
(
pPasswd
)
strcpy
(
psd
->
str
.
u
.
cStr
,
pPasswd
->
pw_name
);
pGroup
=
getgrgid
(
statItem
.
st_gid
);
break
;
if
(
pGroup
)
strcpy
(
psd
->
str
.
u
.
cStr
,
pGroup
->
gr_name
);
case
6
:
break
;
pGroup
=
getgrgid
(
statItem
.
st_gid
);
if
(
pGroup
)
strcpy
(
psd
->
str
.
u
.
cStr
,
pGroup
->
gr_name
);
break
;
}
}
}
return
hr
;
return
hr
;
...
...
dlls/shell32/shlfolder.c
View file @
e51fe8e0
...
@@ -30,6 +30,8 @@
...
@@ -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
...
@@ -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
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment