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
2e5e7dbe
Commit
2e5e7dbe
authored
Aug 01, 2011
by
Jay Yang
Committed by
Alexandre Julliard
Aug 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Have the system context menus respect idCmdFirst.
parent
b56dc9a6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
shv_bg_cmenu.c
dlls/shell32/shv_bg_cmenu.c
+4
-2
shv_item_cmenu.c
dlls/shell32/shv_item_cmenu.c
+9
-8
No files found.
dlls/shell32/shv_bg_cmenu.c
View file @
2e5e7dbe
...
...
@@ -46,6 +46,7 @@ typedef struct
IShellFolder
*
pSFParent
;
LONG
ref
;
BOOL
bDesktop
;
UINT
verb_offset
;
}
BgCmImpl
;
...
...
@@ -157,6 +158,7 @@ static HRESULT WINAPI ISVBgCm_fnQueryContextMenu(
TRACE
(
"(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )
\n
"
,
This
,
hMenu
,
indexMenu
,
idCmdFirst
,
idCmdLast
,
uFlags
);
This
->
verb_offset
=
idCmdFirst
;
hMyMenu
=
LoadMenuA
(
shell32_hInstance
,
"MENU_002"
);
if
(
uFlags
&
CMF_DEFAULTONLY
)
...
...
@@ -175,7 +177,7 @@ static HRESULT WINAPI ISVBgCm_fnQueryContextMenu(
{
idMax
=
Shell_MergeMenus
(
hMenu
,
GetSubMenu
(
hMyMenu
,
0
),
indexMenu
,
idCmdFirst
,
idCmdLast
,
MM_SUBMENUSHAVEIDS
);
hr
=
MAKE_HRESULT
(
SEVERITY_SUCCESS
,
FACILITY_NULL
,
idMax
-
idCmdFirst
+
1
);
hr
=
MAKE_HRESULT
(
SEVERITY_SUCCESS
,
FACILITY_NULL
,
idMax
-
idCmdFirst
);
}
DestroyMenu
(
hMyMenu
);
...
...
@@ -358,7 +360,7 @@ static HRESULT WINAPI ISVBgCm_fnInvokeCommand(
}
else
{
switch
(
LOWORD
(
lpcmi
->
lpVerb
))
switch
(
LOWORD
(
lpcmi
->
lpVerb
)
-
This
->
verb_offset
)
{
case
FCIDM_SHVIEW_REFRESH
:
if
(
lpSV
)
IShellView_Refresh
(
lpSV
);
...
...
dlls/shell32/shv_item_cmenu.c
View file @
2e5e7dbe
...
...
@@ -54,6 +54,7 @@ typedef struct
LPITEMIDLIST
*
apidl
;
/* array of child pidls */
UINT
cidl
;
BOOL
bAllValues
;
UINT
verb_offset
;
}
ItemCmImpl
;
static
inline
ItemCmImpl
*
impl_from_IContextMenu2
(
IContextMenu2
*
iface
)
...
...
@@ -228,8 +229,7 @@ static HRESULT WINAPI ISvItemCm_fnQueryContextMenu(
TRACE
(
"(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )
\n
"
,
This
,
hmenu
,
indexMenu
,
idCmdFirst
,
idCmdLast
,
uFlags
);
if
(
idCmdFirst
!=
0
)
FIXME
(
"We should use idCmdFirst=%d and idCmdLast=%d for command ids
\n
"
,
idCmdFirst
,
idCmdLast
);
This
->
verb_offset
=
idCmdFirst
;
if
(
!
(
CMF_DEFAULTONLY
&
uFlags
)
&&
This
->
cidl
>
0
)
{
...
...
@@ -262,7 +262,7 @@ static HRESULT WINAPI ISvItemCm_fnQueryContextMenu(
else
EnableMenuItem
(
hmenu
,
FCIDM_SHVIEW_RENAME
,
MF_BYCOMMAND
|
ISvItemCm_CanRenameItems
(
This
)
?
MFS_ENABLED
:
MFS_DISABLED
);
return
MAKE_HRESULT
(
SEVERITY_SUCCESS
,
0
,
uIDMax
);
return
MAKE_HRESULT
(
SEVERITY_SUCCESS
,
0
,
uIDMax
-
idCmdFirst
);
}
return
MAKE_HRESULT
(
SEVERITY_SUCCESS
,
0
,
0
);
}
...
...
@@ -520,7 +520,7 @@ static HRESULT WINAPI ISvItemCm_fnInvokeCommand(
if
(
HIWORD
(
lpcmi
->
lpVerb
)
==
0
)
{
switch
(
LOWORD
(
lpcmi
->
lpVerb
))
switch
(
LOWORD
(
lpcmi
->
lpVerb
-
This
->
verb_offset
))
{
case
FCIDM_SHVIEW_EXPLORE
:
TRACE
(
"Verb FCIDM_SHVIEW_EXPLORE
\n
"
);
...
...
@@ -551,7 +551,7 @@ static HRESULT WINAPI ISvItemCm_fnInvokeCommand(
DoOpenProperties
(
This
,
lpcmi
->
hwnd
);
break
;
default:
FIXME
(
"Unhandled Verb %xl
\n
"
,
LOWORD
(
lpcmi
->
lpVerb
));
FIXME
(
"Unhandled Verb %xl
\n
"
,
LOWORD
(
lpcmi
->
lpVerb
)
-
This
->
verb_offset
);
return
E_INVALIDARG
;
}
}
...
...
@@ -595,7 +595,7 @@ static HRESULT WINAPI ISvItemCm_fnGetCommandString(
break
;
case
GCS_VERBA
:
switch
(
idCommand
)
switch
(
idCommand
-
This
->
verb_offset
)
{
case
FCIDM_SHVIEW_RENAME
:
strcpy
(
lpszName
,
"rename"
);
...
...
@@ -607,8 +607,9 @@ static HRESULT WINAPI ISvItemCm_fnGetCommandString(
/* NT 4.0 with IE 3.0x or no IE will always call This with GCS_VERBW. In This
case, you need to do the lstrcpyW to the pointer passed.*/
case
GCS_VERBW
:
switch
(
idCommand
)
{
case
FCIDM_SHVIEW_RENAME
:
switch
(
idCommand
-
This
->
verb_offset
)
{
case
FCIDM_SHVIEW_RENAME
:
MultiByteToWideChar
(
CP_ACP
,
0
,
"rename"
,
-
1
,
(
LPWSTR
)
lpszName
,
uMaxNameLen
);
hr
=
NOERROR
;
break
;
...
...
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