Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
566454b9
Commit
566454b9
authored
May 03, 2021
by
Damjan Jovanovic
Committed by
Alexandre Julliard
May 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Implement some of the missing shellview IContextMenu command verbs.
Signed-off-by:
Damjan Jovanovic
<
damjan.jov@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ad412b11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
19 deletions
+65
-19
shlview_cmenu.c
dlls/shell32/shlview_cmenu.c
+65
-18
shlfolder.c
dlls/shell32/tests/shlfolder.c
+0
-1
No files found.
dlls/shell32/shlview_cmenu.c
View file @
566454b9
...
...
@@ -828,6 +828,10 @@ static HRESULT WINAPI ItemMenu_InvokeCommand(
TRACE
(
"Verb is %s
\n
"
,
debugstr_a
(
lpcmi
->
lpVerb
));
if
(
strcmp
(
lpcmi
->
lpVerb
,
"delete"
)
==
0
)
DoDelete
(
This
);
else
if
(
strcmp
(
lpcmi
->
lpVerb
,
"copy"
)
==
0
)
DoCopyOrCut
(
This
,
lpcmi
->
hwnd
,
FALSE
);
else
if
(
strcmp
(
lpcmi
->
lpVerb
,
"cut"
)
==
0
)
DoCopyOrCut
(
This
,
lpcmi
->
hwnd
,
TRUE
);
else
if
(
strcmp
(
lpcmi
->
lpVerb
,
"properties"
)
==
0
)
DoOpenProperties
(
This
,
lpcmi
->
hwnd
);
else
{
...
...
@@ -1256,6 +1260,10 @@ static HRESULT WINAPI BackgroundMenu_InvokeCommand(
{
if
(
hWnd
)
SendMessageA
(
hWnd
,
WM_COMMAND
,
MAKEWPARAM
(
FCIDM_SHVIEW_REPORTVIEW
,
0
),
0
);
}
else
if
(
!
strcmp
(
lpcmi
->
lpVerb
,
"paste"
))
{
DoPaste
(
This
);
}
else
{
FIXME
(
"please report: unknown verb %s
\n
"
,
debugstr_a
(
lpcmi
->
lpVerb
));
...
...
@@ -1306,27 +1314,66 @@ static HRESULT WINAPI BackgroundMenu_GetCommandString(
LPSTR
lpszName
,
UINT
uMaxNameLen
)
{
ContextMenu
*
This
=
impl_from_IContextMenu3
(
iface
);
static
const
WCHAR
pasteW
[]
=
{
'p'
,
'a'
,
's'
,
't'
,
'e'
,
0
};
static
const
WCHAR
propertiesW
[]
=
{
'p'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'i'
,
'e'
,
's'
,
0
};
ContextMenu
*
This
=
impl_from_IContextMenu3
(
iface
);
const
WCHAR
*
cmdW
=
NULL
;
HRESULT
hr
=
E_FAIL
;
TRACE
(
"(%p)->(idcom=%lx flags=%x %p name=%p len=%x)
\n
"
,
This
,
idCommand
,
uFlags
,
lpReserved
,
lpszName
,
uMaxNameLen
);
TRACE
(
"(%p)->(idcom=%lx flags=%x %p name=%p len=%x)
\n
"
,
This
,
idCommand
,
uFlags
,
lpReserved
,
lpszName
,
uMaxNameLen
);
/* test the existence of the menu items, the file dialog enables
the buttons according to this */
if
(
uFlags
==
GCS_VALIDATEA
)
{
if
(
HIWORD
(
idCommand
))
{
if
(
!
strcmp
((
LPSTR
)
idCommand
,
CMDSTR_VIEWLISTA
)
||
!
strcmp
((
LPSTR
)
idCommand
,
CMDSTR_VIEWDETAILSA
)
||
!
strcmp
((
LPSTR
)
idCommand
,
CMDSTR_NEWFOLDERA
))
{
return
S_OK
;
}
}
}
switch
(
uFlags
)
{
case
GCS_HELPTEXTA
:
case
GCS_HELPTEXTW
:
hr
=
E_NOTIMPL
;
break
;
case
GCS_VERBA
:
case
GCS_VERBW
:
switch
(
idCommand
+
FCIDM_BASE
)
{
case
FCIDM_SHVIEW_INSERT
:
cmdW
=
pasteW
;
break
;
case
FCIDM_SHVIEW_PROPERTIES
:
cmdW
=
propertiesW
;
break
;
}
if
(
!
cmdW
)
{
hr
=
E_INVALIDARG
;
break
;
}
FIXME
(
"unknown command string
\n
"
);
return
E_FAIL
;
if
(
uFlags
==
GCS_VERBA
)
WideCharToMultiByte
(
CP_ACP
,
0
,
cmdW
,
-
1
,
lpszName
,
uMaxNameLen
,
NULL
,
NULL
);
else
lstrcpynW
((
WCHAR
*
)
lpszName
,
cmdW
,
uMaxNameLen
);
TRACE
(
"name %s
\n
"
,
uFlags
==
GCS_VERBA
?
debugstr_a
(
lpszName
)
:
debugstr_w
((
WCHAR
*
)
lpszName
));
hr
=
S_OK
;
break
;
case
GCS_VALIDATEA
:
case
GCS_VALIDATEW
:
/* test the existence of the menu items, the file dialog enables
the buttons according to this */
if
(
HIWORD
(
idCommand
))
{
if
(
!
strcmp
((
LPSTR
)
idCommand
,
CMDSTR_VIEWLISTA
)
||
!
strcmp
((
LPSTR
)
idCommand
,
CMDSTR_VIEWDETAILSA
)
||
!
strcmp
((
LPSTR
)
idCommand
,
CMDSTR_NEWFOLDERA
))
hr
=
S_OK
;
else
{
FIXME
(
"unknown command string %s
\n
"
,
uFlags
==
GCS_VALIDATEA
?
debugstr_a
((
LPSTR
)
idCommand
)
:
debugstr_w
((
WCHAR
*
)
idCommand
));
hr
=
E_FAIL
;
}
}
break
;
}
return
hr
;
}
static
const
IContextMenu3Vtbl
BackgroundContextMenuVtbl
=
...
...
dlls/shell32/tests/shlfolder.c
View file @
566454b9
...
...
@@ -4381,7 +4381,6 @@ static void test_contextmenu(IContextMenu *menu, BOOL background)
ok
(
mii
.
wID
>=
64
&&
mii
.
wID
<=
64
+
max_id
,
"Expected between 64 and %d, got %d.
\n
"
,
64
+
max_id
,
mii
.
wID
);
hr
=
IContextMenu_GetCommandString
(
menu
,
mii
.
wID
-
64
,
GCS_VERBA
,
0
,
buf
,
sizeof
(
buf
));
todo_wine_if
(
background
)
ok
(
hr
==
S_OK
||
hr
==
E_NOTIMPL
||
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x for ID %d, string %s.
\n
"
,
hr
,
mii
.
wID
,
debugstr_a
(
mii
.
dwTypeData
));
if
(
hr
==
S_OK
)
...
...
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