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
1b31b377
Commit
1b31b377
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: Load shell folder column names as A/W strings depending on 9x/NT selector.
parent
c51b248b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
16 deletions
+40
-16
shlfolder.c
dlls/shell32/shlfolder.c
+13
-1
shlview.c
dlls/shell32/shlview.c
+14
-14
shfldr_special.c
dlls/shell32/tests/shfldr_special.c
+13
-1
No files found.
dlls/shell32/shlfolder.c
View file @
1b31b377
...
...
@@ -548,8 +548,20 @@ HRESULT SHELL32_GetColumnDetails(const shvheader *data, int column, SHELLDETAILS
{
details
->
fmt
=
data
[
column
].
fmt
;
details
->
cxChar
=
data
[
column
].
cxChar
;
if
(
SHELL_OsIsUnicode
())
{
details
->
str
.
u
.
pOleStr
=
CoTaskMemAlloc
(
MAX_PATH
*
sizeof
(
WCHAR
));
if
(
!
details
->
str
.
u
.
pOleStr
)
return
E_OUTOFMEMORY
;
details
->
str
.
uType
=
STRRET_WSTR
;
LoadStringW
(
shell32_hInstance
,
data
[
column
].
colnameid
,
details
->
str
.
u
.
pOleStr
,
MAX_PATH
);
}
else
{
details
->
str
.
uType
=
STRRET_CSTR
;
LoadStringA
(
shell32_hInstance
,
data
[
column
].
colnameid
,
details
->
str
.
u
.
cStr
,
MAX_PATH
);
LoadStringA
(
shell32_hInstance
,
data
[
column
].
colnameid
,
details
->
str
.
u
.
cStr
,
MAX_PATH
);
}
return
S_OK
;
}
...
...
dlls/shell32/shlview.c
View file @
1b31b377
...
...
@@ -387,29 +387,32 @@ static BOOL ShellView_CreateList (IShellViewImpl * This)
*
* - adds all needed columns to the shellview
*/
static
BOOL
ShellView_InitList
(
IShellViewImpl
*
This
)
static
void
ShellView_InitList
(
IShellViewImpl
*
This
)
{
LVCOLUMNW
lvColumn
;
SHELLDETAILS
sd
;
int
i
;
WCHAR
szTemp
[
50
];
WCHAR
nameW
[
50
];
TRACE
(
"%p
\n
"
,
This
);
TRACE
(
"(%p)
\n
"
,
This
);
SendMessageW
(
This
->
hWndList
,
LVM_DELETEALLITEMS
,
0
,
0
);
lvColumn
.
mask
=
LVCF_FMT
|
LVCF_WIDTH
|
LVCF_TEXT
;
lvColumn
.
pszText
=
szTemp
;
lvColumn
.
pszText
=
nameW
;
if
(
This
->
pSF2Parent
)
{
for
(
i
=
0
;
1
;
i
++
)
HRESULT
hr
;
INT
i
;
for
(
i
=
0
;
1
;
i
++
)
{
if
(
FAILED
(
IShellFolder2_GetDetailsOf
(
This
->
pSF2Parent
,
NULL
,
i
,
&
sd
)))
break
;
hr
=
IShellFolder2_GetDetailsOf
(
This
->
pSF2Parent
,
NULL
,
i
,
&
sd
);
if
(
FAILED
(
hr
))
break
;
lvColumn
.
fmt
=
sd
.
fmt
;
lvColumn
.
cx
=
sd
.
cxChar
*
8
;
/* chars->pixel */
StrRetToStrNW
(
szTemp
,
50
,
&
sd
.
str
,
NULL
);
StrRetToStrNW
(
nameW
,
sizeof
(
nameW
)
/
sizeof
(
WCHAR
)
,
&
sd
.
str
,
NULL
);
SendMessageW
(
This
->
hWndList
,
LVM_INSERTCOLUMNW
,
i
,
(
LPARAM
)
&
lvColumn
);
}
}
...
...
@@ -420,9 +423,8 @@ static BOOL ShellView_InitList(IShellViewImpl * This)
SendMessageW
(
This
->
hWndList
,
LVM_SETIMAGELIST
,
LVSIL_SMALL
,
(
LPARAM
)
ShellSmallIconList
);
SendMessageW
(
This
->
hWndList
,
LVM_SETIMAGELIST
,
LVSIL_NORMAL
,
(
LPARAM
)
ShellBigIconList
);
return
TRUE
;
}
/**********************************************************
* ShellView_CompareItems()
*
...
...
@@ -688,11 +690,9 @@ static LRESULT ShellView_OnCreate(IShellViewImpl *This)
if
(
ShellView_CreateList
(
This
))
{
if
(
ShellView_InitList
(
This
))
{
ShellView_InitList
(
This
);
ShellView_FillList
(
This
);
}
}
hr
=
IShellView2_QueryInterface
(
iface
,
&
IID_IDropTarget
,
(
LPVOID
*
)
&
pdt
);
if
(
hr
==
S_OK
)
...
...
dlls/shell32/tests/shfldr_special.c
View file @
1b31b377
...
...
@@ -33,6 +33,11 @@
#include "wine/test.h"
static
inline
BOOL
SHELL_OsIsUnicode
(
void
)
{
return
!
(
GetVersion
()
&
0x80000000
);
}
/* Tests for My Network Places */
static
void
test_parse_for_entire_network
(
void
)
{
...
...
@@ -129,8 +134,8 @@ static void test_printers_folder(void)
SHELLDETAILS
details
;
SHCOLSTATEF
state
;
LPITEMIDLIST
pidl1
,
pidl2
;
INT
i
;
HRESULT
hr
;
INT
i
;
CoInitialize
(
NULL
);
...
...
@@ -166,6 +171,9 @@ if (0)
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
/* all columns are left-aligned */
ok
(
details
.
fmt
==
LVCFMT_LEFT
,
"got 0x%x
\n
"
,
details
.
fmt
);
/* can't be on w9x at this point, IShellFolder2 unsupported there,
check present for running Wine with w9x setup */
if
(
SHELL_OsIsUnicode
())
SHFree
(
details
.
str
.
u
.
pOleStr
);
hr
=
IShellFolder2_GetDefaultColumnState
(
folder
,
i
,
&
state
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -176,6 +184,10 @@ if (0)
ok
(
state
==
(
SHCOLSTATE_TYPE_STR
|
SHCOLSTATE_ONBYDEFAULT
),
"got 0x%x
\n
"
,
state
);
}
hr
=
IShellFolder2_GetDetailsOf
(
folder
,
NULL
,
0
,
&
details
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
details
.
str
.
uType
==
STRRET_WSTR
,
"got %d
\n
"
,
details
.
str
.
uType
);
/* default pidl */
hr
=
IShellFolder2_QueryInterface
(
folder
,
&
IID_IPersistFolder2
,
(
void
**
)
&
pf
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
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