Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
72a7c341
Commit
72a7c341
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: Avoid casts when creating item menu.
parent
3efda60e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
26 deletions
+23
-26
cpanelfolder.c
dlls/shell32/cpanelfolder.c
+1
-2
shell32_main.h
dlls/shell32/shell32_main.h
+1
-1
shfldr_desktop.c
dlls/shell32/shfldr_desktop.c
+1
-4
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+1
-3
shfldr_mycomp.c
dlls/shell32/shfldr_mycomp.c
+1
-3
shfldr_netplaces.c
dlls/shell32/shfldr_netplaces.c
+1
-2
shfldr_unixfs.c
dlls/shell32/shfldr_unixfs.c
+2
-3
shlmenu.c
dlls/shell32/shlmenu.c
+4
-2
shlview_cmenu.c
dlls/shell32/shlview_cmenu.c
+11
-6
No files found.
dlls/shell32/cpanelfolder.c
View file @
72a7c341
...
...
@@ -600,8 +600,7 @@ static HRESULT WINAPI ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 *iface, HWN
*
ppvOut
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IContextMenu
)
&&
(
cidl
>=
1
))
{
pObj
=
(
LPUNKNOWN
)
ItemMenu_Constructor
((
IShellFolder
*
)
iface
,
This
->
pidlRoot
,
apidl
,
cidl
);
hr
=
S_OK
;
return
ItemMenu_Constructor
((
IShellFolder
*
)
iface
,
This
->
pidlRoot
,
apidl
,
cidl
,
riid
,
ppvOut
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDataObject
)
&&
(
cidl
>=
1
))
{
pObj
=
(
LPUNKNOWN
)
IDataObject_Constructor
(
hwndOwner
,
This
->
pidlRoot
,
apidl
,
cidl
);
hr
=
S_OK
;
...
...
dlls/shell32/shell32_main.h
View file @
72a7c341
...
...
@@ -78,7 +78,7 @@ LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST myPidl, LPCIT
LPENUMFORMATETC
IEnumFORMATETC_Constructor
(
UINT
,
const
FORMATETC
[])
DECLSPEC_HIDDEN
;
LPCLASSFACTORY
IClassFactory_Constructor
(
REFCLSID
)
DECLSPEC_HIDDEN
;
IContextMenu2
*
ItemMenu_Constructor
(
IShellFolder
*
,
LPCITEMIDLIST
,
const
LPCITEMIDLIST
*
,
UINT
)
DECLSPEC_HIDDEN
;
HRESULT
ItemMenu_Constructor
(
IShellFolder
*
,
LPCITEMIDLIST
,
const
LPCITEMIDLIST
*
,
UINT
,
REFIID
,
void
**
)
DECLSPEC_HIDDEN
;
HRESULT
BackgroundMenu_Constructor
(
IShellFolder
*
,
BOOL
,
REFIID
,
void
**
)
DECLSPEC_HIDDEN
;
LPSHELLVIEW
IShellView_Constructor
(
LPSHELLFOLDER
)
DECLSPEC_HIDDEN
;
...
...
dlls/shell32/shfldr_desktop.c
View file @
72a7c341
...
...
@@ -530,10 +530,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface,
if
(
IsEqualIID
(
riid
,
&
IID_IContextMenu
))
{
if
(
cidl
>
0
)
{
pObj
=
(
LPUNKNOWN
)
ItemMenu_Constructor
(
(
IShellFolder
*
)
iface
,
This
->
pidlRoot
,
apidl
,
cidl
);
hr
=
S_OK
;
}
return
ItemMenu_Constructor
((
IShellFolder
*
)
iface
,
This
->
pidlRoot
,
apidl
,
cidl
,
riid
,
ppvOut
);
else
return
BackgroundMenu_Constructor
((
IShellFolder
*
)
iface
,
TRUE
,
riid
,
ppvOut
);
}
...
...
dlls/shell32/shfldr_fs.c
View file @
72a7c341
...
...
@@ -744,9 +744,7 @@ IShellFolder_fnGetUIObjectOf (IShellFolder2 * iface,
}
if
(
IsEqualIID
(
riid
,
&
IID_IContextMenu
)
&&
(
cidl
>=
1
))
{
pObj
=
(
LPUNKNOWN
)
ItemMenu_Constructor
((
IShellFolder
*
)
iface
,
This
->
pidlRoot
,
apidl
,
cidl
);
hr
=
S_OK
;
return
ItemMenu_Constructor
((
IShellFolder
*
)
iface
,
This
->
pidlRoot
,
apidl
,
cidl
,
riid
,
ppvOut
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDataObject
)
&&
(
cidl
>=
1
))
{
pObj
=
(
LPUNKNOWN
)
IDataObject_Constructor
(
hwndOwner
,
This
->
pidlRoot
,
apidl
,
cidl
);
...
...
dlls/shell32/shfldr_mycomp.c
View file @
72a7c341
...
...
@@ -532,9 +532,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetUIObjectOf (IShellFolder2 * iface,
if
(
IsEqualIID
(
riid
,
&
IID_IContextMenu
)
&&
(
cidl
>=
1
))
{
pObj
=
(
LPUNKNOWN
)
ItemMenu_Constructor
((
IShellFolder
*
)
iface
,
This
->
pidlRoot
,
apidl
,
cidl
);
hr
=
S_OK
;
return
ItemMenu_Constructor
((
IShellFolder
*
)
iface
,
This
->
pidlRoot
,
apidl
,
cidl
,
riid
,
ppvOut
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDataObject
)
&&
(
cidl
>=
1
))
{
...
...
dlls/shell32/shfldr_netplaces.c
View file @
72a7c341
...
...
@@ -426,8 +426,7 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnGetUIObjectOf (IShellFolder2 * iface,
if
(
IsEqualIID
(
riid
,
&
IID_IContextMenu
)
&&
(
cidl
>=
1
))
{
pObj
=
(
LPUNKNOWN
)
ItemMenu_Constructor
((
IShellFolder
*
)
iface
,
This
->
pidlRoot
,
apidl
,
cidl
);
hr
=
S_OK
;
return
ItemMenu_Constructor
((
IShellFolder
*
)
iface
,
This
->
pidlRoot
,
apidl
,
cidl
,
riid
,
ppvOut
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDataObject
)
&&
(
cidl
>=
1
))
{
...
...
dlls/shell32/shfldr_unixfs.c
View file @
72a7c341
...
...
@@ -1165,10 +1165,9 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetUIObjectOf(IShellFolder2* ifac
if
(
hr
!=
S_FALSE
)
return
hr
;
}
if
(
IsEqualIID
(
&
IID_IContextMenu
,
riid
))
{
*
ppvOut
=
ItemMenu_Constructor
((
IShellFolder
*
)
iface
,
This
->
m_pidlLocation
,
apidl
,
cidl
);
return
S_OK
;
return
ItemMenu_Constructor
((
IShellFolder
*
)
iface
,
This
->
m_pidlLocation
,
apidl
,
cidl
,
riid
,
ppvOut
);
}
else
if
(
IsEqualIID
(
&
IID_IDataObject
,
riid
))
{
*
ppvOut
=
IDataObject_Constructor
(
hwndOwner
,
This
->
m_pidlLocation
,
apidl
,
cidl
);
return
S_OK
;
...
...
dlls/shell32/shlmenu.c
View file @
72a7c341
...
...
@@ -1275,7 +1275,8 @@ HRESULT WINAPI CDefFolderMenu_Create2(LPCITEMIDLIST pidlFolder, HWND hwnd, UINT
}
else
folder_pidl
=
ILClone
(
pidlFolder
);
system_menu
=
(
IContextMenu
*
)
ItemMenu_Constructor
(
psf
,
folder_pidl
,(
const
LPCITEMIDLIST
*
)
apidl
,
cidl
);
ItemMenu_Constructor
(
psf
,
folder_pidl
,
(
const
LPCITEMIDLIST
*
)
apidl
,
cidl
,
&
IID_IContextMenu
,
(
void
**
)
&
system_menu
);
hres
=
SHELL_CreateContextMenu
(
hwnd
,
system_menu
,
psf
,
folder_pidl
,
apidl
,
cidl
,
ahkeys
,
nKeys
,
&
IID_IContextMenu
,(
void
**
)
ppcm
);
IContextMenu_Release
(
system_menu
);
ILFree
(
folder_pidl
);
...
...
@@ -1300,7 +1301,8 @@ HRESULT WINAPI SHCreateDefaultContextMenu(const DEFCONTEXTMENU *pdcm, REFIID rii
folder_pidl
=
ILClone
(
pdcm
->
pidlFolder
);
if
(
pdcm
->
cKeys
==
0
)
FIXME
(
"Loading shell extensions using IQueryAssociations not yet supported
\n
"
);
system_menu
=
(
IContextMenu
*
)
ItemMenu_Constructor
(
folder
,
folder_pidl
,(
const
LPCITEMIDLIST
*
)
pdcm
->
apidl
,
pdcm
->
cidl
);
ItemMenu_Constructor
(
folder
,
folder_pidl
,
(
const
LPCITEMIDLIST
*
)
pdcm
->
apidl
,
pdcm
->
cidl
,
&
IID_IContextMenu
,
(
void
**
)
&
system_menu
);
ret
=
SHELL_CreateContextMenu
(
pdcm
->
hwnd
,
system_menu
,
folder
,
folder_pidl
,(
LPCITEMIDLIST
*
)
pdcm
->
apidl
,
pdcm
->
cidl
,
pdcm
->
aKeys
,
pdcm
->
cKeys
,
riid
,
ppv
);
IContextMenu_Release
(
system_menu
);
ILFree
(
folder_pidl
);
...
...
dlls/shell32/shlview_cmenu.c
View file @
72a7c341
...
...
@@ -569,12 +569,16 @@ static const IContextMenu3Vtbl ItemContextMenuVtbl =
ContextMenu_HandleMenuMsg2
};
IContextMenu2
*
ItemMenu_Constructor
(
IShellFolder
*
parent
,
LPCITEMIDLIST
pidl
,
const
LPCITEMIDLIST
*
apidl
,
UINT
cidl
)
HRESULT
ItemMenu_Constructor
(
IShellFolder
*
parent
,
LPCITEMIDLIST
pidl
,
const
LPCITEMIDLIST
*
apidl
,
UINT
cidl
,
REFIID
riid
,
void
**
pObj
)
{
ContextMenu
*
This
;
UINT
u
;
HRESULT
hr
;
int
i
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IContextMenu3_iface
.
lpVtbl
=
&
ItemContextMenuVtbl
;
This
->
ref
=
1
;
This
->
verb_offset
=
0
;
...
...
@@ -588,12 +592,13 @@ IContextMenu2 *ItemMenu_Constructor(IShellFolder *parent, LPCITEMIDLIST pidl, co
This
->
desktop
=
FALSE
;
for
(
u
=
0
;
u
<
cidl
;
u
++
)
This
->
allvalues
&=
(
_ILIsValue
(
apidl
[
u
])
?
1
:
0
);
for
(
i
=
0
;
i
<
cidl
;
i
++
)
This
->
allvalues
&=
(
_ILIsValue
(
apidl
[
i
])
?
1
:
0
);
TRACE
(
"(%p)
\n
"
,
This
);
hr
=
IContextMenu3_QueryInterface
(
&
This
->
IContextMenu3_iface
,
riid
,
pObj
);
IContextMenu3_Release
(
&
This
->
IContextMenu3_iface
);
return
(
IContextMenu2
*
)
&
This
->
IContextMenu3_iface
;
return
hr
;
}
/* Background menu implementation */
...
...
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