mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
- Add a small hack for executing shortcuts to cpl files
- Remove unneeded CLSID_UnixFolder registration - Fix Bitbucket, Nethood shell folder registration attributes svn path=/trunk/; revision=35659
This commit is contained in:
parent
0c9b7b6aa0
commit
4cd1c282bd
|
@ -626,8 +626,8 @@ static struct regsvr_coclass const coclass_list[] = {
|
|||
NULL,
|
||||
"shell32.dll",
|
||||
"Apartment",
|
||||
SHELLFOLDER_ATTRIBUTES,
|
||||
SFGAO_FOLDER,
|
||||
SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES,
|
||||
SFGAO_FOLDER|SFGAO_HASPROPSHEET,
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -674,24 +674,6 @@ static struct regsvr_coclass const coclass_list[] = {
|
|||
"shell32.dll",
|
||||
"Apartment",
|
||||
},
|
||||
{ &CLSID_UnixFolder,
|
||||
"/",
|
||||
0,
|
||||
NULL,
|
||||
"shell32.dll",
|
||||
"Apartment",
|
||||
SHELLFOLDER_WANTSFORPARSING
|
||||
},
|
||||
{ &CLSID_UnixDosFolder,
|
||||
"/",
|
||||
0,
|
||||
NULL,
|
||||
"shell32.dll",
|
||||
"Apartment",
|
||||
SHELLFOLDER_WANTSFORPARSING|SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES,
|
||||
SFGAO_FILESYSANCESTOR|SFGAO_FOLDER|SFGAO_HASSUBFOLDER,
|
||||
SFGAO_FILESYSTEM
|
||||
},
|
||||
{ &CLSID_FolderShortcut,
|
||||
"Foldershortcut",
|
||||
0,
|
||||
|
@ -718,7 +700,7 @@ static struct regsvr_coclass const coclass_list[] = {
|
|||
NULL,
|
||||
"shell32.dll",
|
||||
"Apartment",
|
||||
SHELLFOLDER_ATTRIBUTES,
|
||||
SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES,
|
||||
SFGAO_FOLDER|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET,
|
||||
0,
|
||||
NULL,
|
||||
|
|
|
@ -2512,7 +2512,7 @@ ShellLink_QueryContextMenu( IContextMenu* iface, HMENU hmenu, UINT indexMenu,
|
|||
mii.fType = MFT_STRING;
|
||||
if (!InsertMenuItemW( hmenu, indexMenu, TRUE, &mii ))
|
||||
return E_FAIL;
|
||||
This->iIdOpen = 0;
|
||||
This->iIdOpen = 1;
|
||||
|
||||
return MAKE_HRESULT( SEVERITY_SUCCESS, 0, id );
|
||||
}
|
||||
|
@ -2788,7 +2788,8 @@ static HRESULT WINAPI
|
|||
ShellLink_InvokeCommand( IContextMenu* iface, LPCMINVOKECOMMANDINFO lpici )
|
||||
{
|
||||
IShellLinkImpl *This = impl_from_IContextMenu(iface);
|
||||
static const WCHAR szOpen[] = { 'O','p','e','n',0 };
|
||||
static const WCHAR szOpen[] = { 'o','p','e','n',0 };
|
||||
static const WCHAR szCplOpen[] = { 'c','p','l','o','p','e','n',0 };
|
||||
SHELLEXECUTEINFOW sei;
|
||||
HWND hwnd = NULL; /* FIXME: get using interface set from IObjectWithSite */
|
||||
LPWSTR args = NULL;
|
||||
|
@ -2800,16 +2801,12 @@ ShellLink_InvokeCommand( IContextMenu* iface, LPCMINVOKECOMMANDINFO lpici )
|
|||
if ( lpici->cbSize < sizeof (CMINVOKECOMMANDINFO) )
|
||||
return E_INVALIDARG;
|
||||
|
||||
if ( lpici->lpVerb != MAKEINTRESOURCEA(This->iIdOpen) )
|
||||
{
|
||||
ERR("Unknown id %d != %d\n", (INT)lpici->lpVerb, This->iIdOpen );
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
r = IShellLinkW_Resolve( (IShellLinkW*)&(This->lpvtblw), hwnd, 0 );
|
||||
if ( FAILED( r ) )
|
||||
{
|
||||
TRACE("failed to resolve component with error 0x%08x", r);
|
||||
return r;
|
||||
|
||||
}
|
||||
if ( This->sComponent )
|
||||
{
|
||||
path = shelllink_get_msi_component_path( This->sComponent );
|
||||
|
@ -2847,11 +2844,16 @@ ShellLink_InvokeCommand( IContextMenu* iface, LPCMINVOKECOMMANDINFO lpici )
|
|||
sei.fMask = SEE_MASK_UNICODE | (lpici->fMask & (SEE_MASK_NOASYNC|SEE_MASK_ASYNCOK|SEE_MASK_FLAG_NO_UI));
|
||||
sei.lpFile = path;
|
||||
sei.nShow = This->iShowCmd;
|
||||
sei.lpIDList = This->pPidl;
|
||||
sei.lpDirectory = This->sWorkDir;
|
||||
sei.lpParameters = args;
|
||||
sei.lpVerb = szOpen;
|
||||
|
||||
// HACK for ShellExecuteExW
|
||||
if (!wcsstr(This->sPath, L".cpl"))
|
||||
sei.lpVerb = szOpen;
|
||||
else
|
||||
sei.lpVerb = szCplOpen;
|
||||
|
||||
if( ShellExecuteExW( &sei ) )
|
||||
r = S_OK;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue