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
bfc39c83
Commit
bfc39c83
authored
Jan 11, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Get rid of menu enabling helper.
parent
dff08c97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
shlview_cmenu.c
dlls/shell32/shlview_cmenu.c
+16
-15
No files found.
dlls/shell32/shlview_cmenu.c
View file @
bfc39c83
...
...
@@ -66,20 +66,6 @@ static inline ContextMenu *impl_from_IContextMenu2(IContextMenu2 *iface)
return
CONTAINING_RECORD
(
iface
,
ContextMenu
,
IContextMenu2_iface
);
}
static
BOOL
ItemMenu_CanRenameItems
(
ContextMenu
*
This
)
{
DWORD
attr
;
TRACE
(
"(%p)
\n
"
,
This
);
/* can't rename more than one item at a time*/
if
(
!
This
->
apidl
||
This
->
cidl
>
1
)
return
FALSE
;
attr
=
SFGAO_CANRENAME
;
IShellFolder_GetAttributesOf
(
This
->
parent
,
1
,
(
LPCITEMIDLIST
*
)
This
->
apidl
,
&
attr
);
return
attr
&
SFGAO_CANRENAME
;
}
static
HRESULT
WINAPI
ItemMenu_QueryInterface
(
IContextMenu2
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
ContextMenu
*
This
=
impl_from_IContextMenu2
(
iface
);
...
...
@@ -189,7 +175,22 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
if
(
uFlags
&
~
CMF_CANRENAME
)
RemoveMenu
(
hmenu
,
FCIDM_SHVIEW_RENAME
,
MF_BYCOMMAND
);
else
EnableMenuItem
(
hmenu
,
FCIDM_SHVIEW_RENAME
,
MF_BYCOMMAND
|
ItemMenu_CanRenameItems
(
This
)
?
MFS_ENABLED
:
MFS_DISABLED
);
{
UINT
enable
=
MF_BYCOMMAND
;
/* can't rename more than one item at a time*/
if
(
!
This
->
apidl
||
This
->
cidl
>
1
)
enable
|=
MFS_DISABLED
;
else
{
DWORD
attr
=
SFGAO_CANRENAME
;
IShellFolder_GetAttributesOf
(
This
->
parent
,
1
,
(
LPCITEMIDLIST
*
)
This
->
apidl
,
&
attr
);
enable
|=
(
attr
&
SFGAO_CANRENAME
)
?
MFS_ENABLED
:
MFS_DISABLED
;
}
EnableMenuItem
(
hmenu
,
FCIDM_SHVIEW_RENAME
,
enable
);
}
return
MAKE_HRESULT
(
SEVERITY_SUCCESS
,
0
,
uIDMax
-
idCmdFirst
);
}
...
...
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