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
1d17d8d4
Commit
1d17d8d4
authored
Oct 03, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorerframe: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
32e07a38
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
20 deletions
+9
-20
nstc.c
dlls/explorerframe/nstc.c
+4
-8
nstc.c
dlls/explorerframe/tests/nstc.c
+5
-12
No files found.
dlls/explorerframe/nstc.c
View file @
1d17d8d4
...
...
@@ -75,8 +75,6 @@ static const DWORD unsupported_styles2 =
NSTCS2_INTERRUPTNOTIFICATIONS
|
NSTCS2_SHOWNULLSPACEMENU
|
NSTCS2_DISPLAYPADDING
|
NSTCS2_DISPLAYPINNEDONLY
|
NTSCS2_NOSINGLETONAUTOEXPAND
|
NTSCS2_NEVERINSERTNONENUMERATED
;
static
const
WCHAR
thispropW
[]
=
{
'P'
,
'R'
,
'O'
,
'P'
,
'_'
,
'T'
,
'H'
,
'I'
,
'S'
,
0
};
static
inline
NSTC2Impl
*
impl_from_INameSpaceTreeControl2
(
INameSpaceTreeControl2
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
NSTC2Impl
,
INameSpaceTreeControl2_iface
);
...
...
@@ -510,7 +508,7 @@ static LRESULT create_namespacetree(HWND hWnd, CREATESTRUCTW *crs)
This
->
tv_oldwndproc
=
(
WNDPROC
)
SetWindowLongPtrW
(
This
->
hwnd_tv
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
tv_wndproc
);
if
(
This
->
tv_oldwndproc
)
SetPropW
(
This
->
hwnd_tv
,
thispropW
,
This
);
SetPropW
(
This
->
hwnd_tv
,
L"PROP_THIS"
,
This
);
return
TRUE
;
}
...
...
@@ -534,7 +532,7 @@ static LRESULT destroy_namespacetree(NSTC2Impl *This)
if
(
This
->
tv_oldwndproc
)
{
SetWindowLongPtrW
(
This
->
hwnd_tv
,
GWLP_WNDPROC
,
(
ULONG_PTR
)
This
->
tv_oldwndproc
);
RemovePropW
(
This
->
hwnd_tv
,
thispropW
);
RemovePropW
(
This
->
hwnd_tv
,
L"PROP_THIS"
);
}
INameSpaceTreeControl2_RemoveAllRoots
(
&
This
->
INameSpaceTreeControl2_iface
);
...
...
@@ -762,7 +760,7 @@ static LRESULT on_kbd_event(NSTC2Impl *This, UINT uMsg, WPARAM wParam, LPARAM lP
static
LRESULT
CALLBACK
tv_wndproc
(
HWND
hWnd
,
UINT
uMessage
,
WPARAM
wParam
,
LPARAM
lParam
)
{
NSTC2Impl
*
This
=
(
NSTC2Impl
*
)
GetPropW
(
hWnd
,
thispropW
);
NSTC2Impl
*
This
=
(
NSTC2Impl
*
)
GetPropW
(
hWnd
,
L"PROP_THIS"
);
switch
(
uMessage
)
{
case
WM_KEYDOWN
:
...
...
@@ -879,9 +877,7 @@ static HRESULT WINAPI NSTC2_fnInitialize(INameSpaceTreeControl2* iface,
DWORD
window_style
,
window_ex_style
;
INITCOMMONCONTROLSEX
icex
;
RECT
rc
;
static
const
WCHAR
NSTC2_CLASS_NAME
[]
=
{
'N'
,
'a'
,
'm'
,
'e'
,
's'
,
'p'
,
'a'
,
'c'
,
'e'
,
'T'
,
'r'
,
'e'
,
'e'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
0
};
static
const
WCHAR
NSTC2_CLASS_NAME
[]
=
L"NamespaceTreeControl"
;
TRACE
(
"%p (%p, %p, %x)
\n
"
,
This
,
hwndParent
,
prc
,
nstcsFlags
);
...
...
dlls/explorerframe/tests/nstc.c
View file @
1d17d8d4
...
...
@@ -781,13 +781,6 @@ static void test_basics(void)
int
cbstate
;
WCHAR
curdirW
[
MAX_PATH
];
WCHAR
buf
[
MAX_PATH
];
static
const
WCHAR
testdirW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'd'
,
'i'
,
'r'
,
0
};
static
const
WCHAR
testdir2W
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'd'
,
'i'
,
'r'
,
'\\'
,
't'
,
'e'
,
's'
,
't'
,
'd'
,
'i'
,
'r'
,
'2'
,
0
};
static
const
WCHAR
test1W
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'd'
,
'i'
,
'r'
,
'\\'
,
't'
,
'e'
,
's'
,
't'
,
'1'
,
'.'
,
't'
,
'x'
,
't'
,
0
};
static
const
WCHAR
explorerW
[]
=
{
'E'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
randomW
[]
=
{
'_'
,
'_'
,
'h'
,
'e'
,
'l'
,
'l'
,
'o'
,
0
};
/* These should exist on platforms supporting the NSTC */
ok
(
pSHCreateShellItem
!=
NULL
,
"No SHCreateShellItem.
\n
"
);
...
...
@@ -827,19 +820,19 @@ static void test_basics(void)
lstrcpyW
(
buf
,
curdirW
);
myPathAddBackslashW
(
buf
);
lstrcatW
(
buf
,
testdirW
);
lstrcatW
(
buf
,
L"testdir"
);
hr
=
pSHCreateItemFromParsingName
(
buf
,
NULL
,
&
IID_IShellItem
,
(
void
**
)
&
psitestdir
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
lstrcpyW
(
buf
,
curdirW
);
myPathAddBackslashW
(
buf
);
lstrcatW
(
buf
,
testdir2W
);
lstrcatW
(
buf
,
L"testdir
\\
testdir2"
);
hr
=
pSHCreateItemFromParsingName
(
buf
,
NULL
,
&
IID_IShellItem
,
(
void
**
)
&
psitestdir2
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
lstrcpyW
(
buf
,
curdirW
);
myPathAddBackslashW
(
buf
);
lstrcatW
(
buf
,
test1W
);
lstrcatW
(
buf
,
L"testdir
\\
test1.txt"
);
hr
=
pSHCreateItemFromParsingName
(
buf
,
NULL
,
&
IID_IShellItem
,
(
void
**
)
&
psitest1
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
...
...
@@ -1725,9 +1718,9 @@ static void test_basics(void)
{
hr
=
INameSpaceTreeControl_SetTheme
(
pnstc
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_SetTheme
(
pnstc
,
explorerW
);
hr
=
INameSpaceTreeControl_SetTheme
(
pnstc
,
L"Explorer"
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_SetTheme
(
pnstc
,
randomW
);
hr
=
INameSpaceTreeControl_SetTheme
(
pnstc
,
L"__hello"
);
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