ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
July 2014
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
9 participants
111 discussions
Start a n
N
ew thread
[dquintana] 63711: [RSHELL] * the Programs menu is localized. Obtain it the right way.
by dquintana@svn.reactos.org
Author: dquintana Date: Sat Jul 12 12:40:50 2014 New Revision: 63711 URL:
http://svn.reactos.org/svn/reactos?rev=63711&view=rev
Log: [RSHELL] * the Programs menu is localized. Obtain it the right way. Modified: branches/shell-experiments/base/shell/rshell/CStartMenu.cpp Modified: branches/shell-experiments/base/shell/rshell/CStartMenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] Sat Jul 12 12:40:50 2014 @@ -380,6 +380,7 @@ HRESULT hr; IShellFolder * psf; + LPITEMIDLIST pidlProgramsAbsolute; LPITEMIDLIST pidlPrograms; CComPtr<IShellFolder> psfPrograms; @@ -410,10 +411,10 @@ if (FAILED_UNEXPECTEDLY(hr)) return hr; - WCHAR name[] = L"Programs"; - hr = psf->ParseDisplayName(NULL, NULL, name, NULL, &pidlPrograms, NULL); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; + hr = SHGetSpecialFolderLocation(NULL, CSIDL_PROGRAMS, &pidlProgramsAbsolute); + + pidlPrograms = ILClone(ILFindLastID(pidlProgramsAbsolute)); + ILFree(pidlProgramsAbsolute); hr = psf->BindToObject(pidlPrograms, NULL, IID_PPV_ARG(IShellFolder, &psfPrograms)); if (FAILED_UNEXPECTEDLY(hr))
10 years, 5 months
1
0
0
0
[dquintana] 63710: [RSHELL] * Notify the parent menu popup when the deskbar is closing. [EXPLORER-NEW] * Set the button pressed when the start menu gets displayed. * Set the button released when th...
by dquintana@svn.reactos.org
Author: dquintana Date: Sat Jul 12 02:43:06 2014 New Revision: 63710 URL:
http://svn.reactos.org/svn/reactos?rev=63710&view=rev
Log: [RSHELL] * Notify the parent menu popup when the deskbar is closing. [EXPLORER-NEW] * Set the button pressed when the start menu gets displayed. * Set the button released when the start menu notifies it was closed. Modified: branches/shell-experiments/base/shell/explorer-new/precomp.h branches/shell-experiments/base/shell/explorer-new/startmnu.c branches/shell-experiments/base/shell/explorer-new/traywnd.c branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp Modified: branches/shell-experiments/base/shell/explorer-new/precomp.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
============================================================================== --- branches/shell-experiments/base/shell/explorer-new/precomp.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/explorer-new/precomp.h [iso-8859-1] Sat Jul 12 02:43:06 2014 @@ -455,4 +455,7 @@ CreateTaskSwitchWnd(IN HWND hWndParent, IN OUT ITrayWindow *Tray); +HRESULT +Tray_OnStartMenuDismissed(); + #endif /* _EXPLORER_PRECOMP__H_ */ Modified: branches/shell-experiments/base/shell/explorer-new/startmnu.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
============================================================================== --- branches/shell-experiments/base/shell/explorer-new/startmnu.c [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/explorer-new/startmnu.c [iso-8859-1] Sat Jul 12 02:43:06 2014 @@ -291,6 +291,7 @@ static const IServiceProviderVtbl IServiceProviderImpl_Vtbl; static const ITrayPrivVtbl ITrayPrivImpl_Vtbl; static const IOleCommandTargetVtbl IOleCommandTargetImpl_Vtbl; +static const IMenuPopupVtbl IMenuPopupImpl_Vtbl; typedef struct { @@ -298,9 +299,12 @@ const IServiceProviderVtbl *lpServiceProviderVtbl; const ITrayPrivVtbl *lpStartMenuCallbackVtbl; const IOleCommandTargetVtbl *lpOleCommandTargetVtbl; + const IMenuPopupVtbl *lpMenuPopupVtbl; LONG Ref; ITrayWindow *Tray; + + IMenuPopup * StartMenuPopup; } IStartMenuSiteImpl; static IUnknown * @@ -313,6 +317,8 @@ IMPL_CASTS(IServiceProvider, IStartMenuSite, lpServiceProviderVtbl) IMPL_CASTS(ITrayPriv, IStartMenuSite, lpStartMenuCallbackVtbl) IMPL_CASTS(IOleCommandTarget, IStartMenuSite, lpOleCommandTargetVtbl) +IMPL_CASTS(IDeskBar, IStartMenuSite, lpMenuPopupVtbl) +IMPL_CASTS(IMenuPopup, IStartMenuSite, lpMenuPopupVtbl) /*******************************************************************/ @@ -379,6 +385,16 @@ &IID_IOleCommandTarget)) { *ppvObj = IOleCommandTarget_from_IStartMenuSiteImpl(This); + } + else if (IsEqualIID(riid, + &IID_IDeskBar)) + { + *ppvObj = IDeskBar_from_IStartMenuSiteImpl(This); + } + else if (IsEqualIID(riid, + &IID_IMenuPopup)) + { + *ppvObj = IMenuPopup_from_IStartMenuSiteImpl(This); } else { @@ -776,6 +792,89 @@ /*******************************************************************/ +METHOD_IUNKNOWN_INHERITED_ADDREF(IMenuPopup, IStartMenuSite) +METHOD_IUNKNOWN_INHERITED_RELEASE(IMenuPopup, IStartMenuSite) +METHOD_IUNKNOWN_INHERITED_QUERYINTERFACE(IMenuPopup, IStartMenuSite) + +static HRESULT STDMETHODCALLTYPE +IStartMenuSiteImpl_IMenuPopup_GetWindow(IN OUT IMenuPopup *iface, OUT HWND *phwnd) +{ + IStartMenuSiteImpl * This = IStartMenuSiteImpl_from_IMenuPopup(iface); + ITrayPriv * tp = ITrayPriv_from_IStartMenuSiteImpl(This); + return IStartMenuSiteImpl_GetWindow(tp, phwnd); +} + +static HRESULT STDMETHODCALLTYPE +IStartMenuSiteImpl_IMenuPopup_ContextSensitiveHelp(IN OUT IMenuPopup *iface, IN BOOL fEnterMode) +{ + IStartMenuSiteImpl * This = IStartMenuSiteImpl_from_IMenuPopup(iface); + ITrayPriv * tp = ITrayPriv_from_IStartMenuSiteImpl(This); + return IStartMenuSiteImpl_ContextSensitiveHelp(tp, fEnterMode); +} + +static HRESULT STDMETHODCALLTYPE +IStartMenuSiteImpl_SetClient(IN OUT IMenuPopup *iface, IUnknown *punkClient) +{ + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE +IStartMenuSiteImpl_GetClient(IN OUT IMenuPopup *iface, IUnknown ** ppunkClient) +{ + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE +IStartMenuSiteImpl_OnPosRectChangeDB(IN OUT IMenuPopup *iface, RECT *prc) +{ + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE +IStartMenuSiteImpl_Popup(IN OUT IMenuPopup *iface, POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags) +{ + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE +IStartMenuSiteImpl_OnSelect(IN OUT IMenuPopup *iface, DWORD dwSelectType) +{ + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE +IStartMenuSiteImpl_SetSubMenu(IN OUT IMenuPopup *iface, IMenuPopup *pmp, BOOL fSet) +{ + if (!fSet) + { + return Tray_OnStartMenuDismissed(); + } + + return S_OK; +} + +static const IMenuPopupVtbl IMenuPopupImpl_Vtbl = +{ + /*** IUnknown methods ***/ + METHOD_IUNKNOWN_INHERITED_QUERYINTERFACE_NAME(IMenuPopup, IStartMenuSite), + METHOD_IUNKNOWN_INHERITED_ADDREF_NAME(IMenuPopup, IStartMenuSite), + METHOD_IUNKNOWN_INHERITED_RELEASE_NAME(IMenuPopup, IStartMenuSite), + /*** IOleWindow methods ***/ + IStartMenuSiteImpl_IMenuPopup_GetWindow, + IStartMenuSiteImpl_IMenuPopup_ContextSensitiveHelp, + /*** IDeskBar methods ***/ + IStartMenuSiteImpl_SetClient, + IStartMenuSiteImpl_GetClient, + IStartMenuSiteImpl_OnPosRectChangeDB, + /*** IMenuPopup ***/ + IStartMenuSiteImpl_Popup, + IStartMenuSiteImpl_OnSelect, + IStartMenuSiteImpl_SetSubMenu +}; + + +/*******************************************************************/ + static IStartMenuSiteImpl* IStartMenuSiteImpl_Construct(IN ITrayWindow *Tray) { @@ -791,6 +890,7 @@ This->lpServiceProviderVtbl = &IServiceProviderImpl_Vtbl; This->lpStartMenuCallbackVtbl = &ITrayPrivImpl_Vtbl; This->lpOleCommandTargetVtbl = &IOleCommandTargetImpl_Vtbl; + This->lpMenuPopupVtbl = &IMenuPopupImpl_Vtbl; This->Ref = 1; This->Tray = Tray; Modified: branches/shell-experiments/base/shell/explorer-new/traywnd.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
============================================================================== --- branches/shell-experiments/base/shell/explorer-new/traywnd.c [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/explorer-new/traywnd.c [iso-8859-1] Sat Jul 12 02:43:06 2014 @@ -101,6 +101,8 @@ HDPA hdpaShellServices; } ITrayWindowImpl; +static ITrayWindowImpl * g_TrayWindow; + BOOL LaunchCPanel(HWND hwnd, LPCTSTR applet) { TCHAR szParams[MAX_PATH]; @@ -2122,6 +2124,8 @@ &pt, &rcExclude, dwFlags); + + SendMessageW(This->hwndStart, BM_SETSTATE, TRUE, 0); } } } @@ -2870,6 +2874,8 @@ ITrayWindowImpl_Open(TrayWindow); + g_TrayWindow = This; + return TrayWindow; } @@ -3040,3 +3046,16 @@ ITrayWindowImpl_IShellDesktopTray_RegisterDesktopWindow, ITrayWindowImpl_IShellDesktopTray_Unknown }; + +HRESULT +ITrayWindowImpl_RaiseStartButton(ITrayWindowImpl * This) +{ + SendMessageW(This->hwndStart, BM_SETSTATE, FALSE, 0); + return S_OK; +} + +HRESULT +Tray_OnStartMenuDismissed() +{ + return ITrayWindowImpl_RaiseStartButton(g_TrayWindow); +} Modified: branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp [iso-8859-1] Sat Jul 12 02:43:06 2014 @@ -495,6 +495,11 @@ m_Shown = false; + if (m_SubMenuParent) + { + m_SubMenuParent->SetSubMenu(this, FALSE); + } + if (m_SubMenuChild) { hr = m_SubMenuChild->OnSelect(MPOS_CANCELLEVEL);
10 years, 5 months
1
0
0
0
[dquintana] 63709: [RSHELL] * Really fix GCC build.
by dquintana@svn.reactos.org
Author: dquintana Date: Thu Jul 10 19:16:21 2014 New Revision: 63709 URL:
http://svn.reactos.org/svn/reactos?rev=63709&view=rev
Log: [RSHELL] * Really fix GCC build. Modified: branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp branches/shell-experiments/base/shell/rshell/CMergedFolder.h branches/shell-experiments/base/shell/rshell/CStartMenu.cpp branches/shell-experiments/base/shell/rshell/rshell.spec Modified: branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp [iso-8859-1] Thu Jul 10 19:16:21 2014 @@ -111,7 +111,7 @@ m_UserLocalFolder = userLocal; m_AllUSersFolder = allUSers; - TRACE("SetSources %p %p\n", m_UserLocalFolder, m_AllUSersFolder); + TRACE("SetSources %p %p\n", userLocal, allUSers); return S_OK; } @@ -397,7 +397,7 @@ return E_NOTIMPL; } - TRACE("AddNameSpace %p %p\n", m_UserLocal, m_AllUSers); + TRACE("AddNameSpace %p %p\n", m_UserLocal.p, m_AllUSers.p); // FIXME: Use a DSA to store the list of merged namespaces, together with their related info (psf, pidl, ...) // For now, assume only 2 will ever be used, and ignore all the other data. Modified: branches/shell-experiments/base/shell/rshell/CMergedFolder.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMergedFolder.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMergedFolder.h [iso-8859-1] Thu Jul 10 19:16:21 2014 @@ -19,9 +19,9 @@ */ #pragma once -static IID IID_IAugmentedShellFolder = { 0x91EA3F8C, 0xC99B, 0x11D0, { 0x98, 0x15, 0x00, 0xC0, 0x4F, 0xD9, 0x19, 0x72 } }; -static IID IID_IAugmentedShellFolder2 = { 0x8DB3B3F4, 0x6CFE, 0x11D1, { 0x8A, 0xE9, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0 } }; -static CLSID CLSID_MergedFolder = { 0x26FDC864, 0xBE88, 0x46E7, { 0x92, 0x35, 0x03, 0x2D, 0x8E, 0xA5, 0x16, 0x2E } }; +extern IID IID_IAugmentedShellFolder; +extern IID IID_IAugmentedShellFolder2; +extern CLSID CLSID_MergedFolder; interface IAugmentedShellFolder : public IShellFolder { Modified: branches/shell-experiments/base/shell/rshell/CStartMenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] Thu Jul 10 19:16:21 2014 @@ -20,6 +20,10 @@ #include "precomp.h" #include "CMergedFolder.h" + +IID IID_IAugmentedShellFolder = { 0x91EA3F8C, 0xC99B, 0x11D0, { 0x98, 0x15, 0x00, 0xC0, 0x4F, 0xD9, 0x19, 0x72 } }; +IID IID_IAugmentedShellFolder2 = { 0x8DB3B3F4, 0x6CFE, 0x11D1, { 0x8A, 0xE9, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0 } }; +CLSID CLSID_MergedFolder = { 0x26FDC864, 0xBE88, 0x46E7, { 0x92, 0x35, 0x03, 0x2D, 0x8E, 0xA5, 0x16, 0x2E } }; //#define TEST_TRACKPOPUPMENU_SUBMENUS @@ -406,7 +410,8 @@ if (FAILED_UNEXPECTEDLY(hr)) return hr; - hr = psf->ParseDisplayName(NULL, NULL, L"Programs", NULL, &pidlPrograms, NULL); + WCHAR name[] = L"Programs"; + hr = psf->ParseDisplayName(NULL, NULL, name, NULL, &pidlPrograms, NULL); if (FAILED_UNEXPECTEDLY(hr)) return hr; Modified: branches/shell-experiments/base/shell/rshell/rshell.spec URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/rshell.spec [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/rshell.spec [iso-8859-1] Thu Jul 10 19:16:21 2014 @@ -2,4 +2,4 @@ @ stdcall CMenuDeskBar_Constructor(ptr ptr); @ stdcall CMenuSite_Constructor(ptr ptr); @ stdcall CMenuBand_Constructor(ptr ptr); -@ stdcall CMergedFolder_Constructor(ptr ptr ptr ptr) +@ stdcall CMergedFolder_Constructor(ptr ptr);
10 years, 5 months
1
0
0
0
[dquintana] 63708: [RSHELL] * Use the IAugmentedShellFolder methods instead of the old constructor. [SHELL32] * Fix gcc compilation.
by dquintana@svn.reactos.org
Author: dquintana Date: Thu Jul 10 17:17:36 2014 New Revision: 63708 URL:
http://svn.reactos.org/svn/reactos?rev=63708&view=rev
Log: [RSHELL] * Use the IAugmentedShellFolder methods instead of the old constructor. [SHELL32] * Fix gcc compilation. Modified: branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp branches/shell-experiments/base/shell/rshell/CMergedFolder.h branches/shell-experiments/base/shell/rshell/CStartMenu.cpp branches/shell-experiments/base/shell/rshell/precomp.h branches/shell-experiments/dll/win32/shell32/defcontextmenu.cpp Modified: branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp [iso-8859-1] Thu Jul 10 17:17:36 2014 @@ -30,7 +30,6 @@ BOOL shared; IShellFolder * parent; LPITEMIDLIST pidl; - LPITEMIDLIST pidlCommon; }; class CEnumMergedFolder : @@ -41,8 +40,6 @@ private: CComPtr<IShellFolder> m_UserLocalFolder; CComPtr<IShellFolder> m_AllUSersFolder; - CComPtr<IEnumIDList> m_UserLocal; - CComPtr<IEnumIDList> m_AllUSers; HWND m_HwndOwner; SHCONTF m_Flags; @@ -83,8 +80,6 @@ CEnumMergedFolder::CEnumMergedFolder() : m_UserLocalFolder(NULL), m_AllUSersFolder(NULL), - m_UserLocal(NULL), - m_AllUSers(NULL), m_HwndOwner(NULL), m_Flags(0), m_hDsa(NULL), @@ -115,6 +110,8 @@ { m_UserLocalFolder = userLocal; m_AllUSersFolder = allUSers; + + TRACE("SetSources %p %p\n", m_UserLocalFolder, m_AllUSersFolder); return S_OK; } @@ -129,13 +126,15 @@ TRACE("Search conditions changed, recreating list...\n"); - hr = m_UserLocalFolder->EnumObjects(hwndOwner, flags, &m_UserLocal); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; - hr = m_AllUSersFolder->EnumObjects(hwndOwner, flags, &m_AllUSers); - if (FAILED_UNEXPECTEDLY(hr)) - { - m_UserLocal = NULL; + CComPtr<IEnumIDList> userLocal; + CComPtr<IEnumIDList> allUSers; + hr = m_UserLocalFolder->EnumObjects(hwndOwner, flags, &userLocal); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + hr = m_AllUSersFolder->EnumObjects(hwndOwner, flags, &allUSers); + if (FAILED_UNEXPECTEDLY(hr)) + { + userLocal = NULL; return hr; } @@ -159,7 +158,7 @@ { if (hr1 == S_OK) { - hr1 = m_UserLocal->Next(1, &pidl1, NULL); + hr1 = userLocal->Next(1, &pidl1, NULL); if (FAILED_UNEXPECTEDLY(hr1)) return hr1; } @@ -172,7 +171,7 @@ { if (hr2 == S_OK) { - hr2 = m_AllUSers->Next(1, &pidl2, NULL); + hr2 = allUSers->Next(1, &pidl2, NULL); if (FAILED_UNEXPECTEDLY(hr2)) return hr2; } @@ -197,19 +196,27 @@ StrRetToStrW(&str1, pidl1, &name1); StrRetToStrW(&str2, pidl2, &name2); order = StrCmpW(name1, name2); + + TRACE("Both sources are S_OK, comparison between %S and %S returns %d\n", name1, name2, order); + CoTaskMemFree(name1); CoTaskMemFree(name2); } else if (hr1 == S_OK) { order = -1; + + TRACE("Both sources are S_OK, forcing %d\n", order); } else if (hr2 == S_OK) { order = 1; + + TRACE("Both sources are S_OK, forcing %d\n", order); } else { + TRACE("None of the sources\n"); break; } @@ -347,7 +354,7 @@ // CMergedFolder extern "C" -HRESULT WINAPI CMergedFolder_Constructor(IShellFolder* userLocal, IShellFolder* allUsers, REFIID riid, LPVOID *ppv) +HRESULT WINAPI CMergedFolder_Constructor(REFIID riid, LPVOID *ppv) { *ppv = NULL; @@ -357,8 +364,6 @@ return E_OUTOFMEMORY; HRESULT hr; - - hr = fld->_SetSources(userLocal, allUsers); hr = fld->QueryInterface(riid, ppv); if (FAILED_UNEXPECTEDLY(hr)) @@ -371,27 +376,46 @@ m_UserLocal(NULL), m_AllUSers(NULL), m_EnumSource(NULL), + m_UserLocalPidl(NULL), + m_AllUsersPidl(NULL), m_shellPidl(NULL) { } CMergedFolder::~CMergedFolder() { -} - -HRESULT CMergedFolder::_SetSources(IShellFolder* userLocal, IShellFolder* allUsers) -{ - m_UserLocal = userLocal; - m_AllUSers = allUsers; + if (m_UserLocalPidl) ILFree(m_UserLocalPidl); + if (m_AllUsersPidl) ILFree(m_AllUsersPidl); +} + +// IAugmentedShellFolder2 +HRESULT STDMETHODCALLTYPE CMergedFolder::AddNameSpace(LPGUID lpGuid, IShellFolder * psf, LPCITEMIDLIST pcidl, ULONG dwUnknown) +{ + if (lpGuid) + { + TRACE("FIXME: No idea how to handle the GUID\n"); + return E_NOTIMPL; + } + + TRACE("AddNameSpace %p %p\n", m_UserLocal, m_AllUSers); + + // FIXME: Use a DSA to store the list of merged namespaces, together with their related info (psf, pidl, ...) + // For now, assume only 2 will ever be used, and ignore all the other data. + if (!m_UserLocal) + { + m_UserLocal = psf; + m_UserLocalPidl = ILClone(pcidl); + return S_OK; + } + + if (m_AllUSers) + return E_FAIL; + + m_AllUSers = psf; + m_AllUsersPidl = ILClone(pcidl); + m_EnumSource = new CComObject<CEnumMergedFolder>(); return m_EnumSource->SetSources(m_UserLocal, m_AllUSers); -} - -// IAugmentedShellFolder2 -HRESULT STDMETHODCALLTYPE CMergedFolder::AddNameSpace(LPGUID lpGuid, IShellFolder * psf, LPCITEMIDLIST pcidl, ULONG dwUnknown) -{ - UNIMPLEMENTED; - return E_NOTIMPL; } HRESULT STDMETHODCALLTYPE CMergedFolder::GetNameSpaceID(LPCITEMIDLIST pcidl, LPGUID lpGuid) @@ -429,26 +453,39 @@ { HRESULT hr; LocalPidlInfo info; + LPITEMIDLIST pidl; if (!ppidl) return E_FAIL; if (pchEaten) *pchEaten = 0; if (pdwAttributes) *pdwAttributes = 0; - hr = m_UserLocal->ParseDisplayName(hwndOwner, pbcReserved, lpszDisplayName, pchEaten, ppidl, pdwAttributes); + TRACE("ParseDisplayName name=%S\n", lpszDisplayName); + + hr = m_UserLocal->ParseDisplayName(hwndOwner, pbcReserved, lpszDisplayName, pchEaten, &pidl, pdwAttributes); if (SUCCEEDED(hr)) { - hr = m_EnumSource->FindPidlInList(hwndOwner, *ppidl, &info); + TRACE("ParseDisplayName result local\n"); + hr = m_EnumSource->FindPidlInList(hwndOwner, pidl, &info); if (SUCCEEDED(hr)) + { + ILFree(pidl); + *ppidl = ILClone(info.pidl); return hr; - } - - hr = m_AllUSers->ParseDisplayName(hwndOwner, pbcReserved, lpszDisplayName, pchEaten, ppidl, pdwAttributes); + } + } + + hr = m_AllUSers->ParseDisplayName(hwndOwner, pbcReserved, lpszDisplayName, pchEaten, &pidl, pdwAttributes); if (SUCCEEDED(hr)) { - hr = m_EnumSource->FindPidlInList(hwndOwner, *ppidl, &info); + TRACE("ParseDisplayName result common\n"); + hr = m_EnumSource->FindPidlInList(hwndOwner, pidl, &info); if (SUCCEEDED(hr)) + { + ILFree(pidl); + *ppidl = ILClone(info.pidl); return hr; + } } if (ppidl) *ppidl = NULL; @@ -477,12 +514,12 @@ { LocalPidlInfo info; HRESULT hr; - - TRACE("BindToObject\n"); - + hr = m_EnumSource->FindPidlInList(NULL, pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; + + TRACE("BindToObject shared = %d\n", info.shared); if (!info.shared) return info.parent->BindToObject(info.pidl, pbcReserved, riid, ppvOut); @@ -501,7 +538,24 @@ if (FAILED_UNEXPECTEDLY(hr)) return hr; - return CMergedFolder_Constructor(fld1, fld2, riid, ppvOut); + CComPtr<IAugmentedShellFolder> pasf; + hr = CMergedFolder_Constructor(IID_PPV_ARG(IAugmentedShellFolder, &pasf)); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = pasf->QueryInterface(riid, ppvOut); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = pasf->AddNameSpace(NULL, fld1, info.pidl, 0xFF00); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = pasf->AddNameSpace(NULL, fld2, info.pidl, 0x0000); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + return hr; } HRESULT STDMETHODCALLTYPE CMergedFolder::BindToStorage( Modified: branches/shell-experiments/base/shell/rshell/CMergedFolder.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMergedFolder.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMergedFolder.h [iso-8859-1] Thu Jul 10 17:17:36 2014 @@ -65,6 +65,8 @@ CComPtr<IShellFolder> m_AllUSers; CComPtr<CEnumMergedFolder> m_EnumSource; + LPITEMIDLIST m_UserLocalPidl; + LPITEMIDLIST m_AllUsersPidl; LPITEMIDLIST m_shellPidl; public: Modified: branches/shell-experiments/base/shell/rshell/CStartMenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] Thu Jul 10 17:17:36 2014 @@ -310,6 +310,9 @@ HRESULT hr; LPITEMIDLIST pidlUserStartMenu; LPITEMIDLIST pidlCommonStartMenu; + CComPtr<IShellFolder> psfUserStartMenu; + CComPtr<IShellFolder> psfCommonStartMenu; + CComPtr<IAugmentedShellFolder> pasf; *ppsfStartMenu = NULL; @@ -324,27 +327,22 @@ return hr; } - CComPtr<IShellFolder> psfUserStartMenu; hr = BindToDesktop(pidlUserStartMenu, &psfUserStartMenu); if (FAILED_UNEXPECTEDLY(hr)) return hr; - CComPtr<IShellFolder> psfCommonStartMenu; hr = BindToDesktop(pidlCommonStartMenu, &psfCommonStartMenu); if (FAILED_UNEXPECTEDLY(hr)) return hr; -#if CUSTOM_MERGE_FOLDERS - IShellFolder * psfMerged; - hr = CMergedFolder_Constructor(psfUserStartMenu, psfCommonStartMenu, IID_PPV_ARG(IShellFolder, &psfMerged)); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; +#if 1 + hr = CMergedFolder_Constructor(IID_PPV_ARG(IAugmentedShellFolder, &pasf)); #else - CComPtr<IAugmentedShellFolder> pasf; hr = CoCreateInstance(CLSID_MergedFolder, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IAugmentedShellFolder, &pasf)); - if (FAILED_UNEXPECTEDLY(hr)) - { - hr = BindToDesktop(pidlUserStartMenu, ppsfStartMenu); +#endif + if (FAILED_UNEXPECTEDLY(hr)) + { + *ppsfStartMenu = psfUserStartMenu.Detach(); ILFree(pidlCommonStartMenu); ILFree(pidlUserStartMenu); return hr; @@ -360,7 +358,6 @@ hr = pasf->QueryInterface(IID_PPV_ARG(IShellFolder, ppsfStartMenu)); pasf.Release(); -#endif ILFree(pidlCommonStartMenu); ILFree(pidlUserStartMenu); Modified: branches/shell-experiments/base/shell/rshell/precomp.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/precomp.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/precomp.h [iso-8859-1] Thu Jul 10 17:17:36 2014 @@ -71,7 +71,7 @@ extern "C" HRESULT WINAPI CMenuDeskBar_Wrapper(IDeskBar * db, REFIID riid, LPVOID *ppv); extern "C" HRESULT WINAPI CMenuSite_Wrapper(IBandSite * bs, REFIID riid, LPVOID *ppv); extern "C" HRESULT WINAPI CMenuBand_Wrapper(IShellMenu * sm, REFIID riid, LPVOID *ppv); -extern "C" HRESULT WINAPI CMergedFolder_Constructor(IShellFolder* userLocal, IShellFolder* allUsers, REFIID riid, LPVOID *ppv); +extern "C" HRESULT WINAPI CMergedFolder_Constructor(REFIID riid, LPVOID *ppv); extern "C" HRESULT WINAPI CStartMenuSite_Wrapper(ITrayPriv * trayPriv, REFIID riid, LPVOID *ppv); static __inline ULONG Modified: branches/shell-experiments/dll/win32/shell32/defcontextmenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
============================================================================== --- branches/shell-experiments/dll/win32/shell32/defcontextmenu.cpp [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/shell32/defcontextmenu.cpp [iso-8859-1] Thu Jul 10 17:17:36 2014 @@ -1675,7 +1675,7 @@ // FIXME: This needs to be freed somewhere (like in the destructor of the context menu) LPCITEMIDLIST *apidl2 = (LPCITEMIDLIST *) SHAlloc(sizeof(LPCITEMIDLIST) * cidl); - for (int i = 0; i < cidl; i++) + for (int i = 0; i < (int)cidl; i++) { apidl2[i] = apidl[i]; }
10 years, 5 months
1
0
0
0
[jgardou] 63707: [NTOS/CM] - Fix overzealous check
by jgardou@svn.reactos.org
Author: jgardou Date: Thu Jul 10 09:43:30 2014 New Revision: 63707 URL:
http://svn.reactos.org/svn/reactos?rev=63707&view=rev
Log: [NTOS/CM] - Fix overzealous check Modified: trunk/reactos/ntoskrnl/config/ntapi.c Modified: trunk/reactos/ntoskrnl/config/ntapi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/ntapi.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/config/ntapi.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/ntapi.c [iso-8859-1] Thu Jul 10 09:43:30 2014 @@ -625,8 +625,8 @@ PreviousMode = ExGetPreviousMode(); - if (Data && !DataSize) - return STATUS_INVALID_PARAMETER; + if (!DataSize) + Data = NULL; /* Probe and copy the data */ if ((PreviousMode != KernelMode) && Data)
10 years, 5 months
1
0
0
0
[jgardou] 63706: [APPWIZ] - Expand the registry entry when installing gecko package from disk. Now unattended setup can really be unattended.
by jgardou@svn.reactos.org
Author: jgardou Date: Thu Jul 10 09:05:43 2014 New Revision: 63706 URL:
http://svn.reactos.org/svn/reactos?rev=63706&view=rev
Log: [APPWIZ] - Expand the registry entry when installing gecko package from disk. Now unattended setup can really be unattended. Modified: trunk/reactos/dll/cpl/appwiz/addons.c Modified: trunk/reactos/dll/cpl/appwiz/addons.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/appwiz/addons.c?re…
============================================================================== --- trunk/reactos/dll/cpl/appwiz/addons.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/appwiz/addons.c [iso-8859-1] Thu Jul 10 09:05:43 2014 @@ -214,6 +214,18 @@ return INSTALL_FAILED; } + if (type == REG_EXPAND_SZ) + { + size = ExpandEnvironmentStringsA(package_dir, NULL, 0); + if (size) + { + char* buf = heap_alloc(size + sizeof(addon->file_name)); + ExpandEnvironmentStringsA(package_dir, buf, size); + heap_free(package_dir); + package_dir = buf; + } + } + TRACE("Trying %s/%s\n", debugstr_a(package_dir), debugstr_a(addon->file_name)); ret = install_from_unix_file(package_dir, "", addon->file_name);
10 years, 5 months
1
0
0
0
[jgardou] 63705: [NTOSKRNL] - Partial revert of r63700 on Alex's request - This cancels the "Use ZwSetValueKey" instead of NtSetValueKey" part Oddly enough, it doesn't cause a problem anymore. I mu...
by jgardou@svn.reactos.org
Author: jgardou Date: Thu Jul 10 09:05:37 2014 New Revision: 63705 URL:
http://svn.reactos.org/svn/reactos?rev=63705&view=rev
Log: [NTOSKRNL] - Partial revert of r63700 on Alex's request - This cancels the "Use ZwSetValueKey" instead of NtSetValueKey" part Oddly enough, it doesn't cause a problem anymore. I must have messed up in my initial testings Modified: trunk/reactos/ntoskrnl/config/cmconfig.c trunk/reactos/ntoskrnl/config/cmsysini.c trunk/reactos/ntoskrnl/config/i386/cmhardwr.c trunk/reactos/ntoskrnl/config/powerpc/cmhardwr.c trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/io/iomgr/bootlog.c Modified: trunk/reactos/ntoskrnl/config/cmconfig.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmconfig.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmconfig.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmconfig.c [iso-8859-1] Thu Jul 10 09:05:37 2014 @@ -97,7 +97,7 @@ /* Setup the component information key */ RtlInitUnicodeString(&ValueName, L"Component Information"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_BINARY, @@ -124,7 +124,7 @@ if (NT_SUCCESS(Status)) { /* Save the identifier in the registry */ - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_SZ, @@ -178,7 +178,7 @@ CmpConfigurationData->BusNumber = BusNumber; /* Save the actual data */ - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_FULL_RESOURCE_DESCRIPTOR, Modified: trunk/reactos/ntoskrnl/config/cmsysini.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] Thu Jul 10 09:05:37 2014 @@ -416,7 +416,7 @@ /* Key opened, now write to the key */ RtlInitUnicodeString(&KeyName, L"SystemStartOptions"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &KeyName, 0, REG_SZ, @@ -427,7 +427,7 @@ /* Setup value name for system boot device in ARC format */ RtlInitUnicodeString(&KeyName, L"SystemBootDevice"); RtlCreateUnicodeStringFromAsciiz(&ValueName, LoaderBlock->ArcBootDeviceName); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &KeyName, 0, REG_SZ, @@ -474,7 +474,7 @@ OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = ZwOpenKey(&SelectHandle, KEY_READ, &ObjectAttributes); + Status = NtOpenKey(&SelectHandle, KEY_READ, &ObjectAttributes); if (!NT_SUCCESS(Status)) { /* ReactOS Hack: Hard-code current to 001 for SetupLdr */ @@ -488,17 +488,16 @@ OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = ZwCreateKey(&KeyHandle, + Status = NtCreateKey(&KeyHandle, KEY_ALL_ACCESS, &ObjectAttributes, 0, NULL, 0, &Disposition); - if (!NT_SUCCESS(Status)) - return Status; - - /* We don't need the handle */ + if (!NT_SUCCESS(Status)) return Status; + + /* Don't need the handle */ ZwClose(KeyHandle); /* Use hard-coded setting */ @@ -534,7 +533,7 @@ OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = ZwCreateKey(&KeyHandle, + Status = NtCreateKey(&KeyHandle, KEY_CREATE_LINK, &ObjectAttributes, 0, @@ -558,7 +557,7 @@ Status = RtlAnsiStringToUnicodeString(&KeyName, &TempString, FALSE); /* Set the value */ - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &CmSymbolicLinkValueName, 0, REG_LINK, @@ -573,7 +572,7 @@ KeyHandle, NULL); Status = NtOpenKey(&ConfigHandle, KEY_READ, &ObjectAttributes); - ZwClose(KeyHandle); + NtClose(KeyHandle); /* Check if we don't have one */ if (!NT_SUCCESS(Status)) @@ -690,7 +689,7 @@ ASSERT(STATUS_SUCCESS == Status); /* Set it */ - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &CmSymbolicLinkValueName, 0, REG_LINK, @@ -2181,7 +2180,7 @@ RtlInitUnicodeString(&ValueData, Buffer); - ZwSetValueKey(CurrentVersionKeyHandle, + NtSetValueKey(CurrentVersionKeyHandle, &ValueName, 0, REG_SZ, Modified: trunk/reactos/ntoskrnl/config/i386/cmhardwr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/i386/cmhar…
============================================================================== --- trunk/reactos/ntoskrnl/config/i386/cmhardwr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/i386/cmhardwr.c [iso-8859-1] Thu Jul 10 09:05:37 2014 @@ -268,7 +268,7 @@ /* Set the value */ RtlInitUnicodeString(&ValueName, L"PhysicalAddressExtension"); - ZwSetValueKey(KeyHandle, + NtSetValueKey(KeyHandle, &ValueName, 0, REG_DWORD, @@ -463,7 +463,7 @@ /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"ProcessorNameString"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_SZ, @@ -486,7 +486,7 @@ /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"VendorIdentifier"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_SZ, @@ -502,7 +502,7 @@ { /* Add them to the registry */ RtlInitUnicodeString(&ValueName, L"FeatureSet"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_DWORD, @@ -515,7 +515,7 @@ { /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"~MHz"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_DWORD, @@ -528,7 +528,7 @@ { /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"Update Signature"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_BINARY, @@ -621,7 +621,7 @@ /* Write the date into the registry */ RtlInitUnicodeString(&ValueName, L"SystemBiosDate"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_SZ, @@ -643,7 +643,7 @@ if (NT_SUCCESS(Status)) { /* Save it to the registry */ - Status = ZwSetValueKey(BiosHandle, + Status = NtSetValueKey(BiosHandle, &ValueName, 0, REG_SZ, @@ -703,7 +703,7 @@ /* Write the BIOS Version to the registry */ RtlInitUnicodeString(&ValueName, L"SystemBiosVersion"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_MULTI_SZ, @@ -746,7 +746,7 @@ /* Write the date into the registry */ RtlInitUnicodeString(&ValueName, L"VideoBiosDate"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_SZ, @@ -801,7 +801,7 @@ /* Write the BIOS Version to the registry */ RtlInitUnicodeString(&ValueName, L"VideoBiosVersion"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_MULTI_SZ, Modified: trunk/reactos/ntoskrnl/config/powerpc/cmhardwr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/powerpc/cm…
============================================================================== --- trunk/reactos/ntoskrnl/config/powerpc/cmhardwr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/powerpc/cmhardwr.c [iso-8859-1] Thu Jul 10 09:05:37 2014 @@ -267,7 +267,7 @@ /* Set the value */ RtlInitUnicodeString(&ValueName, L"PhysicalAddressExtension"); - ZwSetValueKey(KeyHandle, + NtSetValueKey(KeyHandle, &ValueName, 0, REG_DWORD, @@ -465,7 +465,7 @@ /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"ProcessorNameString"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_SZ, @@ -488,7 +488,7 @@ /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"VendorIdentifier"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_SZ, @@ -504,7 +504,7 @@ { /* Add them to the registry */ RtlInitUnicodeString(&ValueName, L"FeatureSet"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_DWORD, @@ -517,7 +517,7 @@ { /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"~MHz"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_DWORD, @@ -530,7 +530,7 @@ { /* Add it to the registry */ RtlInitUnicodeString(&ValueName, L"Update Signature"); - Status = ZwSetValueKey(KeyHandle, + Status = NtSetValueKey(KeyHandle, &ValueName, 0, REG_BINARY, @@ -623,7 +623,7 @@ /* Write the date into the registry */ RtlInitUnicodeString(&ValueName, L"SystemBiosDate"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_SZ, @@ -645,7 +645,7 @@ if (NT_SUCCESS(Status)) { /* Save it to the registry */ - Status = ZwSetValueKey(BiosHandle, + Status = NtSetValueKey(BiosHandle, &ValueName, 0, REG_SZ, @@ -705,7 +705,7 @@ /* Write the BIOS Version to the registry */ RtlInitUnicodeString(&ValueName, L"SystemBiosVersion"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_MULTI_SZ, @@ -749,7 +749,7 @@ /* Write the date into the registry */ RtlInitUnicodeString(&ValueName, L"VideoBiosDate"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_SZ, @@ -804,7 +804,7 @@ /* Write the BIOS Version to the registry */ RtlInitUnicodeString(&ValueName, L"VideoBiosVersion"); - Status = ZwSetValueKey(SystemHandle, + Status = NtSetValueKey(SystemHandle, &ValueName, 0, REG_MULTI_SZ, Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=637…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] Thu Jul 10 09:05:37 2014 @@ -1853,7 +1853,7 @@ { /* Write the safe boot type */ RtlInitUnicodeString(&KeyName, L"OptionValue"); - ZwSetValueKey(OptionHandle, + NtSetValueKey(OptionHandle, &KeyName, 0, REG_DWORD, @@ -1866,7 +1866,7 @@ /* Remember this for later */ Disposition = TRUE; RtlInitUnicodeString(&KeyName, L"UseAlternateShell"); - ZwSetValueKey(OptionHandle, + NtSetValueKey(OptionHandle, &KeyName, 0, REG_DWORD, Modified: trunk/reactos/ntoskrnl/io/iomgr/bootlog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/bootlog.…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/bootlog.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/bootlog.c [iso-8859-1] Thu Jul 10 09:05:37 2014 @@ -135,7 +135,7 @@ if (!NT_SUCCESS(Status)) { - DPRINT1("ZwSetValueKey() failed (Status %lx)\n", Status); + DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status); } else {
10 years, 5 months
1
0
0
0
[dquintana] 63704: [RSHELL] * Filter out the Programs item from the top list.
by dquintana@svn.reactos.org
Author: dquintana Date: Wed Jul 9 23:37:02 2014 New Revision: 63704 URL:
http://svn.reactos.org/svn/reactos?rev=63704&view=rev
Log: [RSHELL] * Filter out the Programs item from the top list. Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp branches/shell-experiments/base/shell/rshell/CStartMenu.cpp Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] Wed Jul 9 23:37:02 2014 @@ -1285,29 +1285,37 @@ INT index = 0; INT indexOpen = 0; - STRRET sr = { STRRET_CSTR, { 0 } }; - - hr = m_shellFolder->GetDisplayNameOf(item, SIGDN_NORMALDISPLAY, &sr); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; - - StrRetToStr(&sr, NULL, &MenuString); - - index = SHMapPIDLToSystemImageListIndex(m_shellFolder, item, &indexOpen); - - LPCITEMIDLIST itemc = item; - - SFGAOF attrs = SFGAO_FOLDER; - hr = m_shellFolder->GetAttributesOf(1, &itemc, &attrs); - - DWORD_PTR dwData = reinterpret_cast<DWORD_PTR>(ILClone(item)); - - // Fetch next item already, so we know if the current one is the last - hr = eidl->Next(1, &item, NULL); - - AddButton(++i, MenuString, attrs & SFGAO_FOLDER, index, dwData, hr != S_OK); - - CoTaskMemFree(MenuString); + if (m_menuBand->_CallCBWithItemPidl(item, 0x10000000, 0, 0) == S_OK) + { + STRRET sr = { STRRET_CSTR, { 0 } }; + + hr = m_shellFolder->GetDisplayNameOf(item, SIGDN_NORMALDISPLAY, &sr); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + StrRetToStr(&sr, NULL, &MenuString); + + index = SHMapPIDLToSystemImageListIndex(m_shellFolder, item, &indexOpen); + + LPCITEMIDLIST itemc = item; + + SFGAOF attrs = SFGAO_FOLDER; + hr = m_shellFolder->GetAttributesOf(1, &itemc, &attrs); + + DWORD_PTR dwData = reinterpret_cast<DWORD_PTR>(ILClone(item)); + + // Fetch next item already, so we know if the current one is the last + hr = eidl->Next(1, &item, NULL); + + AddButton(++i, MenuString, attrs & SFGAO_FOLDER, index, dwData, hr != S_OK); + + CoTaskMemFree(MenuString); + } + else + { + // Fetch next item here also + hr = eidl->Next(1, &item, NULL); + } } ILFree(item); Modified: branches/shell-experiments/base/shell/rshell/CStartMenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] Wed Jul 9 23:37:02 2014 @@ -65,7 +65,9 @@ CComPtr<IBandSite> m_pBandSite; CComPtr<IDeskBar> m_pDeskBar; CComPtr<ITrayPriv> m_pTrayPriv; - CComPtr<IShellFolder> m_programsFolder; + CComPtr<IShellFolder> m_psfPrograms; + + LPITEMIDLIST m_pidlPrograms; HRESULT OnInitMenu() { @@ -161,9 +163,9 @@ { IShellFolder *psfStartMenu; - if (csidl == CSIDL_PROGRAMS && m_programsFolder) + if (csidl == CSIDL_PROGRAMS && m_psfPrograms) { - psfStartMenu = m_programsFolder; + psfStartMenu = m_psfPrograms; } else { @@ -251,9 +253,10 @@ m_pDeskBar.Release(); } - HRESULT _SetProgramsFolder(IShellFolder * programs) - { - m_programsFolder = programs; + HRESULT _SetProgramsFolder(IShellFolder * psf, LPITEMIDLIST pidl) + { + m_psfPrograms = psf; + m_pidlPrograms = pidl; return S_OK; } @@ -276,6 +279,10 @@ case SMC_SFEXEC: m_pTrayPriv->Execute(psmd->psf, psmd->pidlItem); break; + case 0x10000000: // _FilterPIDL from CMenuSFToolbar + if (psmd->psf->CompareIDs(0, psmd->pidlItem, m_pidlPrograms) == 0) + return S_FALSE; + return S_OK; } return S_FALSE; @@ -312,9 +319,9 @@ if (FAILED(SHGetSpecialFolderLocation(NULL, CSIDL_COMMON_STARTMENU, &pidlCommonStartMenu))) { - BindToDesktop(pidlUserStartMenu, ppsfStartMenu); + hr = BindToDesktop(pidlUserStartMenu, ppsfStartMenu); ILFree(pidlUserStartMenu); - return S_OK; + return hr; } CComPtr<IShellFolder> psfUserStartMenu; @@ -337,10 +344,10 @@ hr = CoCreateInstance(CLSID_MergedFolder, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IAugmentedShellFolder, &pasf)); if (FAILED_UNEXPECTEDLY(hr)) { - BindToDesktop(pidlUserStartMenu, ppsfStartMenu); + hr = BindToDesktop(pidlUserStartMenu, ppsfStartMenu); ILFree(pidlCommonStartMenu); ILFree(pidlUserStartMenu); - return S_OK; + return hr; } hr = pasf->AddNameSpace(NULL, psfUserStartMenu, pidlUserStartMenu, 0xFF00); @@ -410,7 +417,7 @@ if (FAILED_UNEXPECTEDLY(hr)) return hr; - hr = pCallback->_SetProgramsFolder(psfPrograms); + hr = pCallback->_SetProgramsFolder(psfPrograms, pidlPrograms); if (FAILED_UNEXPECTEDLY(hr)) return hr;
10 years, 5 months
1
0
0
0
[dquintana] 63703: [RSHELL] * Now that CMergedFolder works, try to make it more like windows. * CMergedFolder: Declare and expose the undocumented IAugmentedShellFolder2 (all methods unimplemented ...
by dquintana@svn.reactos.org
Author: dquintana Date: Wed Jul 9 23:05:37 2014 New Revision: 63703 URL:
http://svn.reactos.org/svn/reactos?rev=63703&view=rev
Log: [RSHELL] * Now that CMergedFolder works, try to make it more like windows. * CMergedFolder: Declare and expose the undocumented IAugmentedShellFolder2 (all methods unimplemented yet). It will require major changes to the way I implemented it, but it will be for the best. * CStartMenu: Make use of the real CMergedFolder in Windows 2003 (does not exist in win7). Modified: branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp branches/shell-experiments/base/shell/rshell/CMergedFolder.h branches/shell-experiments/base/shell/rshell/CStartMenu.cpp Modified: branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp [iso-8859-1] Wed Jul 9 23:05:37 2014 @@ -30,6 +30,7 @@ BOOL shared; IShellFolder * parent; LPITEMIDLIST pidl; + LPITEMIDLIST pidlCommon; }; class CEnumMergedFolder : @@ -67,7 +68,7 @@ HRESULT SetSources(IShellFolder * userLocal, IShellFolder * allUSers); HRESULT Begin(HWND hwndOwner, SHCONTF flags); - HRESULT FindPidlInList(LPCITEMIDLIST pcidl, LocalPidlInfo * pinfo); + HRESULT FindPidlInList(HWND hwndOwner, LPCITEMIDLIST pcidl, LocalPidlInfo * pinfo); virtual HRESULT STDMETHODCALLTYPE Next( ULONG celt, @@ -86,9 +87,10 @@ m_AllUSers(NULL), m_HwndOwner(NULL), m_Flags(0), - m_hDsaIndex(0) -{ - m_hDsa = DSA_Create(sizeof(LocalPidlInfo), 10); + m_hDsa(NULL), + m_hDsaIndex(0), + m_hDsaCount(0) +{ } CEnumMergedFolder::~CEnumMergedFolder() @@ -119,8 +121,8 @@ HRESULT CEnumMergedFolder::Begin(HWND hwndOwner, SHCONTF flags) { HRESULT hr; - - if (m_HwndOwner == hwndOwner && m_Flags == flags) + + if (m_hDsa && m_HwndOwner == hwndOwner && m_Flags == flags) { return Reset(); } @@ -135,6 +137,11 @@ { m_UserLocal = NULL; return hr; + } + + if (!m_hDsa) + { + m_hDsa = DSA_Create(sizeof(LocalPidlInfo), 10); } DSA_EnumCallback(m_hDsa, s_DsaDeleteCallback, this); @@ -242,9 +249,14 @@ return Reset(); } -HRESULT CEnumMergedFolder::FindPidlInList(LPCITEMIDLIST pcidl, LocalPidlInfo * pinfo) -{ - HRESULT hr; +HRESULT CEnumMergedFolder::FindPidlInList(HWND hwndOwner, LPCITEMIDLIST pcidl, LocalPidlInfo * pinfo) +{ + HRESULT hr; + + if (!m_hDsa) + { + Begin(hwndOwner, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS); + } TRACE("Searching for pidl { cb=%d } in a list of %d items\n", pcidl->mkid.cb, m_hDsaCount); @@ -299,10 +311,9 @@ // FIXME: ILClone shouldn't be needed here! This should be causing leaks if (rgelt) rgelt[i] = ILClone(info.pidl); + i++; m_hDsaIndex++; - i++; - if (m_hDsaIndex == m_hDsaCount) { if (pceltFetched) *pceltFetched = i; @@ -374,6 +385,37 @@ m_AllUSers = allUsers; m_EnumSource = new CComObject<CEnumMergedFolder>(); return m_EnumSource->SetSources(m_UserLocal, m_AllUSers); +} + +// IAugmentedShellFolder2 +HRESULT STDMETHODCALLTYPE CMergedFolder::AddNameSpace(LPGUID lpGuid, IShellFolder * psf, LPCITEMIDLIST pcidl, ULONG dwUnknown) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::GetNameSpaceID(LPCITEMIDLIST pcidl, LPGUID lpGuid) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::QueryNameSpace(ULONG dwUnknown, LPGUID lpGuid, IShellFolder ** ppsf) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::EnumNameSpace(ULONG dwUnknown, PULONG lpUnknown) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::UnWrapIDList(LPCITEMIDLIST pcidl, LONG lUnknown, IShellFolder ** ppsf, LPITEMIDLIST * ppidl1, LPITEMIDLIST *ppidl2, LONG * lpUnknown) +{ + UNIMPLEMENTED; + return E_NOTIMPL; } // IShellFolder @@ -385,8 +427,34 @@ LPITEMIDLIST *ppidl, ULONG *pdwAttributes) { - UNIMPLEMENTED; - return E_NOTIMPL; + HRESULT hr; + LocalPidlInfo info; + + if (!ppidl) return E_FAIL; + + if (pchEaten) *pchEaten = 0; + if (pdwAttributes) *pdwAttributes = 0; + + hr = m_UserLocal->ParseDisplayName(hwndOwner, pbcReserved, lpszDisplayName, pchEaten, ppidl, pdwAttributes); + if (SUCCEEDED(hr)) + { + hr = m_EnumSource->FindPidlInList(hwndOwner, *ppidl, &info); + if (SUCCEEDED(hr)) + return hr; + } + + hr = m_AllUSers->ParseDisplayName(hwndOwner, pbcReserved, lpszDisplayName, pchEaten, ppidl, pdwAttributes); + if (SUCCEEDED(hr)) + { + hr = m_EnumSource->FindPidlInList(hwndOwner, *ppidl, &info); + if (SUCCEEDED(hr)) + return hr; + } + + if (ppidl) *ppidl = NULL; + if (pchEaten) *pchEaten = 0; + if (pdwAttributes) *pdwAttributes = 0; + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); } HRESULT STDMETHODCALLTYPE CMergedFolder::EnumObjects( @@ -412,7 +480,7 @@ TRACE("BindToObject\n"); - hr = m_EnumSource->FindPidlInList(pidl, &info); + hr = m_EnumSource->FindPidlInList(NULL, pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -478,7 +546,7 @@ { LPCITEMIDLIST pidl = apidl[i]; - hr = m_EnumSource->FindPidlInList(pidl, &info); + hr = m_EnumSource->FindPidlInList(NULL, pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -514,7 +582,7 @@ TRACE("Processing GetUIObjectOf item %d of %u...\n", i, cidl); - hr = m_EnumSource->FindPidlInList(pidl, &info); + hr = m_EnumSource->FindPidlInList(hwndOwner, pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -544,7 +612,7 @@ TRACE("GetDisplayNameOf\n"); - hr = m_EnumSource->FindPidlInList(pidl, &info); + hr = m_EnumSource->FindPidlInList(NULL, pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -630,7 +698,7 @@ TRACE("GetDetailsEx\n"); - hr = m_EnumSource->FindPidlInList(pidl, &info); + hr = m_EnumSource->FindPidlInList(NULL, pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -655,7 +723,7 @@ TRACE("GetDetailsOf\n"); - hr = m_EnumSource->FindPidlInList(pidl, &info); + hr = m_EnumSource->FindPidlInList(NULL, pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; Modified: branches/shell-experiments/base/shell/rshell/CMergedFolder.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMergedFolder.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMergedFolder.h [iso-8859-1] Wed Jul 9 23:05:37 2014 @@ -19,12 +19,37 @@ */ #pragma once +static IID IID_IAugmentedShellFolder = { 0x91EA3F8C, 0xC99B, 0x11D0, { 0x98, 0x15, 0x00, 0xC0, 0x4F, 0xD9, 0x19, 0x72 } }; +static IID IID_IAugmentedShellFolder2 = { 0x8DB3B3F4, 0x6CFE, 0x11D1, { 0x8A, 0xE9, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0 } }; +static CLSID CLSID_MergedFolder = { 0x26FDC864, 0xBE88, 0x46E7, { 0x92, 0x35, 0x03, 0x2D, 0x8E, 0xA5, 0x16, 0x2E } }; + +interface IAugmentedShellFolder : public IShellFolder +{ + virtual HRESULT STDMETHODCALLTYPE AddNameSpace(LPGUID, IShellFolder *, LPCITEMIDLIST, ULONG) = 0; + virtual HRESULT STDMETHODCALLTYPE GetNameSpaceID(LPCITEMIDLIST, LPGUID) = 0; + virtual HRESULT STDMETHODCALLTYPE QueryNameSpace(ULONG, LPGUID, IShellFolder **) = 0; + virtual HRESULT STDMETHODCALLTYPE EnumNameSpace(ULONG, PULONG) = 0; +}; + +interface IAugmentedShellFolder2 : public IAugmentedShellFolder +{ + virtual HRESULT STDMETHODCALLTYPE UnWrapIDList(LPCITEMIDLIST, LONG, IShellFolder **, LPITEMIDLIST *, LPITEMIDLIST *, LONG *) = 0; +}; + +/* No idea what QUERYNAMESPACEINFO struct contains -- the prototype comes from the PDB info +interface IAugmentedShellFolder3 : public IAugmentedShellFolder2 +{ + virtual HRESULT STDMETHODCALLTYPE QueryNameSpace2(ULONG, QUERYNAMESPACEINFO *) = 0; +}; +*/ + class CEnumMergedFolder; class CMergedFolder : public CComObjectRootEx<CComMultiThreadModelNoCS>, public IShellFolder2, //public IStorage, + public IAugmentedShellFolder2, // -- undocumented //public IAugmentedShellFolder3, // -- undocumented //public IShellService, // -- undocumented //public ITranslateShellChangeNotify,// -- undocumented @@ -52,13 +77,15 @@ DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CMergedFolder) - COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) + COM_INTERFACE_ENTRY2_IID(IID_IShellFolder, IShellFolder, IShellFolder2) COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) + COM_INTERFACE_ENTRY_IID(IID_IAugmentedShellFolder, IAugmentedShellFolder) + COM_INTERFACE_ENTRY_IID(IID_IAugmentedShellFolder2, IAugmentedShellFolder2) + //COM_INTERFACE_ENTRY_IID(IID_IAugmentedShellFolder3, IAugmentedShellFolder3) //COM_INTERFACE_ENTRY_IID(IID_IStorage, IStorage) - //COM_INTERFACE_ENTRY_IID(IID_IAugmentedShellFolder3, IAugmentedShellFolder3) //COM_INTERFACE_ENTRY_IID(IID_IShellService, IShellService) //COM_INTERFACE_ENTRY_IID(IID_ITranslateShellChangeNotify,ITranslateShellChangeNotify) //COM_INTERFACE_ENTRY_IID(IID_IPersistPropertyBag,IPersistPropertyBag) @@ -166,4 +193,11 @@ // IPersistFolder2 virtual HRESULT STDMETHODCALLTYPE GetCurFolder(LPITEMIDLIST * pidl); -}; + + // IAugmentedShellFolder2 + virtual HRESULT STDMETHODCALLTYPE AddNameSpace(LPGUID lpGuid, IShellFolder * psf, LPCITEMIDLIST pcidl, ULONG dwUnknown); + virtual HRESULT STDMETHODCALLTYPE GetNameSpaceID(LPCITEMIDLIST pcidl, LPGUID lpGuid); + virtual HRESULT STDMETHODCALLTYPE QueryNameSpace(ULONG dwUnknown, LPGUID lpGuid, IShellFolder ** ppsf); + virtual HRESULT STDMETHODCALLTYPE EnumNameSpace(ULONG dwUnknown, PULONG lpUnknown); + virtual HRESULT STDMETHODCALLTYPE UnWrapIDList(LPCITEMIDLIST pcidl, LONG lUnknown, IShellFolder ** ppsf, LPITEMIDLIST * ppidl1, LPITEMIDLIST *ppidl2, LONG * lpUnknown); +}; Modified: branches/shell-experiments/base/shell/rshell/CStartMenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] Wed Jul 9 23:05:37 2014 @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "precomp.h" + +#include "CMergedFolder.h" //#define TEST_TRACKPOPUPMENU_SUBMENUS @@ -63,6 +65,7 @@ CComPtr<IBandSite> m_pBandSite; CComPtr<IDeskBar> m_pDeskBar; CComPtr<ITrayPriv> m_pTrayPriv; + CComPtr<IShellFolder> m_programsFolder; HRESULT OnInitMenu() { @@ -141,6 +144,12 @@ int csidl = 0; IShellMenu *pShellMenu; + hr = CMenuBand_Constructor(IID_PPV_ARG(IShellMenu, &pShellMenu)); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = pShellMenu->Initialize(this, 0, ANCESTORDEFAULT, SMINIT_VERTICAL); + switch (psmd->uId) { case IDM_PROGRAMS: csidl = CSIDL_PROGRAMS; break; @@ -148,20 +157,22 @@ case IDM_DOCUMENTS: csidl = CSIDL_RECENT; break; } - hr = CMenuBand_Constructor(IID_PPV_ARG(IShellMenu, &pShellMenu)); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; - - hr = pShellMenu->Initialize(this, 0, ANCESTORDEFAULT, SMINIT_VERTICAL); - if (csidl) { - LPITEMIDLIST pidlStartMenu; - IShellFolder *psfDestop, *psfStartMenu; - - hr = SHGetFolderLocation(NULL, csidl, 0, 0, &pidlStartMenu); - hr = SHGetDesktopFolder(&psfDestop); - hr = psfDestop->BindToObject(pidlStartMenu, NULL, IID_PPV_ARG(IShellFolder, &psfStartMenu)); + IShellFolder *psfStartMenu; + + if (csidl == CSIDL_PROGRAMS && m_programsFolder) + { + psfStartMenu = m_programsFolder; + } + else + { + LPITEMIDLIST pidlStartMenu; + IShellFolder *psfDestop; + hr = SHGetFolderLocation(NULL, csidl, 0, 0, &pidlStartMenu); + hr = SHGetDesktopFolder(&psfDestop); + hr = psfDestop->BindToObject(pidlStartMenu, NULL, IID_PPV_ARG(IShellFolder, &psfStartMenu)); + } hr = pShellMenu->SetShellFolder(psfStartMenu, NULL, NULL, 0); } @@ -238,6 +249,12 @@ m_pShellMenu.Release(); m_pBandSite.Release(); m_pDeskBar.Release(); + } + + HRESULT _SetProgramsFolder(IShellFolder * programs) + { + m_programsFolder = programs; + return S_OK; } HRESULT STDMETHODCALLTYPE CallbackSM( @@ -265,6 +282,85 @@ } }; +HRESULT BindToDesktop(LPCITEMIDLIST pidl, IShellFolder ** ppsfResult) +{ + HRESULT hr; + CComPtr<IShellFolder> psfDesktop; + + *ppsfResult = NULL; + + hr = SHGetDesktopFolder(&psfDesktop); + if (FAILED(hr)) + return hr; + + hr = psfDesktop->BindToObject(pidl, NULL, IID_PPV_ARG(IShellFolder, ppsfResult)); + + return hr; +} + +HRESULT GetStartMenuFolder(IShellFolder ** ppsfStartMenu) +{ + HRESULT hr; + LPITEMIDLIST pidlUserStartMenu; + LPITEMIDLIST pidlCommonStartMenu; + + *ppsfStartMenu = NULL; + + hr = SHGetSpecialFolderLocation(NULL, CSIDL_STARTMENU, &pidlUserStartMenu); + if (FAILED(hr)) + return hr; + + if (FAILED(SHGetSpecialFolderLocation(NULL, CSIDL_COMMON_STARTMENU, &pidlCommonStartMenu))) + { + BindToDesktop(pidlUserStartMenu, ppsfStartMenu); + ILFree(pidlUserStartMenu); + return S_OK; + } + + CComPtr<IShellFolder> psfUserStartMenu; + hr = BindToDesktop(pidlUserStartMenu, &psfUserStartMenu); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + CComPtr<IShellFolder> psfCommonStartMenu; + hr = BindToDesktop(pidlCommonStartMenu, &psfCommonStartMenu); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + +#if CUSTOM_MERGE_FOLDERS + IShellFolder * psfMerged; + hr = CMergedFolder_Constructor(psfUserStartMenu, psfCommonStartMenu, IID_PPV_ARG(IShellFolder, &psfMerged)); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; +#else + CComPtr<IAugmentedShellFolder> pasf; + hr = CoCreateInstance(CLSID_MergedFolder, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IAugmentedShellFolder, &pasf)); + if (FAILED_UNEXPECTEDLY(hr)) + { + BindToDesktop(pidlUserStartMenu, ppsfStartMenu); + ILFree(pidlCommonStartMenu); + ILFree(pidlUserStartMenu); + return S_OK; + } + + hr = pasf->AddNameSpace(NULL, psfUserStartMenu, pidlUserStartMenu, 0xFF00); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = pasf->AddNameSpace(NULL, psfCommonStartMenu, pidlCommonStartMenu, 0); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = pasf->QueryInterface(IID_PPV_ARG(IShellFolder, ppsfStartMenu)); + pasf.Release(); +#endif + + ILFree(pidlCommonStartMenu); + ILFree(pidlUserStartMenu); + + return hr; +} + extern "C" HRESULT WINAPI CStartMenu_Constructor(REFIID riid, void **ppv) @@ -274,15 +370,10 @@ IDeskBar* pDeskBar; HRESULT hr; - IShellFolder *shellFolder; - - LPITEMIDLIST pidlStartMenuUser; - IShellFolder *psfStartMenuUser; - -#if MERGE_FOLDERS - LPITEMIDLIST pidlStartMenuAll; - IShellFolder *psfStartMenuAll; -#endif + IShellFolder * psf; + + LPITEMIDLIST pidlPrograms; + CComPtr<IShellFolder> psfPrograms; hr = CMenuBand_Constructor(IID_PPV_ARG(IShellMenu, &pShellMenu)); if (FAILED_UNEXPECTEDLY(hr)) @@ -306,32 +397,26 @@ pShellMenu->Initialize(pCallback, (UINT) -1, 0, SMINIT_TOPLEVEL | SMINIT_VERTICAL); if (FAILED_UNEXPECTEDLY(hr)) return hr; - - hr = SHGetDesktopFolder(&shellFolder); - - /* FIXME: Use CLSID_MergedFolder class and IID_IAugmentedShellFolder2 interface here */ - /* CLSID_MergedFolder 26fdc864-be88-46e7-9235-032d8ea5162e */ - /* IID_IAugmentedShellFolder2 8db3b3f4-6cfe-11d1-8ae9-00c04fd918d0 */ - hr = SHGetFolderLocation(NULL, CSIDL_STARTMENU, 0, 0, &pidlStartMenuUser); - hr = shellFolder->BindToObject(pidlStartMenuUser, NULL, IID_PPV_ARG(IShellFolder, &psfStartMenuUser)); - -#if MERGE_FOLDERS - hr = SHGetFolderLocation(NULL, CSIDL_COMMON_STARTMENU, 0, 0, &pidlStartMenuAll); - hr = shellFolder->BindToObject(pidlStartMenuAll, NULL, IID_PPV_ARG(IShellFolder, &psfStartMenuAll)); - - IShellFolder * psfMerged; - hr = CMergedFolder_Constructor(psfStartMenuUser, psfStartMenuAll, IID_PPV_ARG(IShellFolder, &psfMerged)); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; - - hr = pShellMenu->SetShellFolder(psfMerged, NULL, NULL, 0); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; -#else - hr = pShellMenu->SetShellFolder(psfStartMenuUser, NULL, NULL, 0); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; -#endif + + hr = GetStartMenuFolder(&psf); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = psf->ParseDisplayName(NULL, NULL, L"Programs", NULL, &pidlPrograms, NULL); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = psf->BindToObject(pidlPrograms, NULL, IID_PPV_ARG(IShellFolder, &psfPrograms)); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = pCallback->_SetProgramsFolder(psfPrograms); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = pShellMenu->SetShellFolder(psf, NULL, NULL, 0); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; hr = pDeskBar->SetClient(pBandSite); if (FAILED_UNEXPECTEDLY(hr))
10 years, 5 months
1
0
0
0
[dquintana] 63702: [RSHELL] * CFocusManager: Try to fix some weird behaviour. * CMergedFolder: Downgrade some prints to TRACEs, and implement a couple methods needed by some debugging code. * Activ...
by dquintana@svn.reactos.org
Author: dquintana Date: Wed Jul 9 00:42:05 2014 New Revision: 63702 URL:
http://svn.reactos.org/svn/reactos?rev=63702&view=rev
Log: [RSHELL] * CFocusManager: Try to fix some weird behaviour. * CMergedFolder: Downgrade some prints to TRACEs, and implement a couple methods needed by some debugging code. * Activate merged folders by default. TODO: implement the filtering of the "Programs" submenu, and use it for the real Programs menu item. [SHELL32] * defcontextmenu.cpp: Make a copy of the apidl array before storing it for later, since it may be a pointer to the stack which may not be available later. Fixes the merged folders not working on clicks and context menu. * shlmenu.cpp: While debugging, I made Shell_MergeMenus closer to WINE's. Modified: branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp branches/shell-experiments/base/shell/rshell/CMenuToolbars.h branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp branches/shell-experiments/base/shell/rshell/precomp.h branches/shell-experiments/dll/win32/browseui/shellbrowser.cpp branches/shell-experiments/dll/win32/shell32/defcontextmenu.cpp branches/shell-experiments/dll/win32/shell32/shlmenu.cpp Modified: branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp [iso-8859-1] Wed Jul 9 00:42:05 2014 @@ -319,7 +319,7 @@ } BOOL isTracking = FALSE; - if (entry) + if (entry && (entry->type == MenuBarEntry || m_current->type != TrackedMenuEntry)) { ScreenToClient(child, &pt); iHitTestResult = SendMessageW(child, TB_HITTEST, 0, (LPARAM) &pt); @@ -485,7 +485,21 @@ if (hoveringMenuBar) { m_menuBar->mb->_DisableMouseTrack(TRUE); + if (m_current->type == TrackedMenuEntry) + { + SendMessage(m_parent->hwnd, WM_CANCELMODE, 0, 0); + msg->message = WM_NULL; + } } + } + break; + case WM_NCLBUTTONUP: + case WM_LBUTTONUP: + case WM_NCRBUTTONUP: + case WM_RBUTTONUP: + if (m_current && m_current->type != TrackedMenuEntry) + { + msg->message = WM_NULL; } break; case WM_MOUSEMOVE: Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] Wed Jul 9 00:42:05 2014 @@ -63,7 +63,7 @@ return OnPagerCalcSize(reinterpret_cast<LPNMPGCALCSIZE>(hdr)); case TBN_DROPDOWN: - return OnCommand(reinterpret_cast<LPNMTOOLBAR>(hdr)->iItem, 0, theResult); + return ProcessClick(reinterpret_cast<LPNMTOOLBAR>(hdr)->iItem); case TBN_HOTITEMCHANGE: //return OnHotItemChange(reinterpret_cast<LPNMTBHOTITEM>(hdr), theResult); @@ -798,11 +798,10 @@ return m_menuBand->_TrackContextMenu(contextMenu, pt.x, pt.y); } -HRESULT CMenuToolbarBase::OnCommand(WPARAM wParam, LPARAM lParam, LRESULT *theResult) +HRESULT CMenuToolbarBase::ProcessClick(INT iItem) { if (m_disableMouseTrack) { - *theResult = 1; TRACE("Item click prevented by DisableMouseTrack\n"); return S_OK; } @@ -814,10 +813,6 @@ return S_FALSE; } - *theResult = 0; - - INT iItem = (INT)wParam; - if (PopupItem(iItem, FALSE) == S_OK) { TRACE("PopupItem returned S_OK\n"); @@ -829,28 +824,26 @@ return m_menuBand->_MenuItemHotTrack(MPOS_EXECUTE); } -HRESULT CMenuToolbarBase::MenuBarMouseDown(INT item) -{ - LRESULT theResult; +HRESULT CMenuToolbarBase::MenuBarMouseDown(INT iIndex) +{ TBBUTTON btn; if (m_initFlags & SMINIT_VERTICAL) return S_OK; - SendMessage(m_hwndToolbar, TB_GETBUTTON, item, reinterpret_cast<LPARAM>(&btn)); - return OnCommand(btn.idCommand, 0, &theResult); -} - -HRESULT CMenuToolbarBase::MenuBarMouseUp(INT item) -{ - LRESULT theResult; + ::SendMessageW(m_hwndToolbar, TB_GETBUTTON, iIndex, reinterpret_cast<LPARAM>(&btn)); + return ProcessClick(btn.idCommand); +} + +HRESULT CMenuToolbarBase::MenuBarMouseUp(INT iIndex) +{ TBBUTTON btn; if (!(m_initFlags & SMINIT_VERTICAL)) return S_OK; - SendMessage(m_hwndToolbar, TB_GETBUTTON, item, reinterpret_cast<LPARAM>(&btn)); - return OnCommand(btn.idCommand, 0, &theResult); + ::SendMessageW(m_hwndToolbar, TB_GETBUTTON, iIndex, reinterpret_cast<LPARAM>(&btn)); + return ProcessClick(btn.idCommand); } HRESULT CMenuToolbarBase::ExecuteItem(INT iItem) Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuToolbars.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuToolbars.h [iso-8859-1] Wed Jul 9 00:42:05 2014 @@ -97,8 +97,9 @@ HRESULT KillPopupTimer(); - HRESULT MenuBarMouseDown(INT item); - HRESULT MenuBarMouseUp(INT item); + HRESULT MenuBarMouseDown(INT iIndex); + HRESULT MenuBarMouseUp(INT iIndex); + HRESULT ProcessClick(INT iItem); protected: virtual HRESULT OnDeletingButton(const NMTOOLBAR * tb) = 0; @@ -119,7 +120,6 @@ private: HRESULT UpdateImageLists(); - HRESULT OnCommand(WPARAM wParam, LPARAM lParam, LRESULT *theResult); HRESULT OnPagerCalcSize(LPNMPGCALCSIZE csize); HRESULT OnPopupTimer(DWORD timerId); HRESULT OnContextMenu(NMMOUSE * rclick); Modified: branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp [iso-8859-1] Wed Jul 9 00:42:05 2014 @@ -394,7 +394,7 @@ SHCONTF grfFlags, IEnumIDList **ppenumIDList) { - DbgPrint("EnumObjects\n"); + TRACE("EnumObjects\n"); HRESULT hr = m_EnumSource->QueryInterface(IID_PPV_ARG(IEnumIDList, ppenumIDList)); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -410,7 +410,7 @@ LocalPidlInfo info; HRESULT hr; - DbgPrint("BindToObject\n"); + TRACE("BindToObject\n"); hr = m_EnumSource->FindPidlInList(pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) @@ -451,7 +451,7 @@ LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) { - DbgPrint("CompareIDs\n"); + TRACE("CompareIDs\n"); return m_UserLocal->CompareIDs(lParam, pidl1, pidl2); } @@ -472,7 +472,7 @@ LocalPidlInfo info; HRESULT hr; - DbgPrint("GetAttributesOf\n"); + TRACE("GetAttributesOf\n"); for (int i = 0; i < (int)cidl; i++) { @@ -506,7 +506,7 @@ LocalPidlInfo info; HRESULT hr; - DbgPrint("GetUIObjectOf\n"); + TRACE("GetUIObjectOf\n"); for (int i = 0; i < (int)cidl; i++) { @@ -542,7 +542,7 @@ LocalPidlInfo info; HRESULT hr; - DbgPrint("GetDisplayNameOf\n"); + TRACE("GetDisplayNameOf\n"); hr = m_EnumSource->FindPidlInList(pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) @@ -625,8 +625,24 @@ const SHCOLUMNID *pscid, VARIANT *pv) { - UNIMPLEMENTED; - return E_NOTIMPL; + LocalPidlInfo info; + HRESULT hr; + + TRACE("GetDetailsEx\n"); + + hr = m_EnumSource->FindPidlInList(pidl, &info); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + CComPtr<IShellFolder2> parent2; + hr = info.parent->QueryInterface(IID_PPV_ARG(IShellFolder2, &parent2)); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = parent2->GetDetailsEx(info.pidl, pscid, pv); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + return S_OK; } HRESULT STDMETHODCALLTYPE CMergedFolder::GetDetailsOf( @@ -634,8 +650,25 @@ UINT iColumn, SHELLDETAILS *psd) { - UNIMPLEMENTED; - return E_NOTIMPL; + LocalPidlInfo info; + HRESULT hr; + + TRACE("GetDetailsOf\n"); + + hr = m_EnumSource->FindPidlInList(pidl, &info); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + CComPtr<IShellFolder2> parent2; + hr = info.parent->QueryInterface(IID_PPV_ARG(IShellFolder2, &parent2)); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = parent2->GetDetailsOf(info.pidl, iColumn, psd); + + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + return S_OK; } HRESULT STDMETHODCALLTYPE CMergedFolder::MapColumnToSCID( Modified: branches/shell-experiments/base/shell/rshell/precomp.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/precomp.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/precomp.h [iso-8859-1] Wed Jul 9 00:42:05 2014 @@ -26,7 +26,7 @@ #define WRAP_MENUBAND 0 #define WRAP_TRAYPRIV 0 -#define MERGE_FOLDERS 0 +#define MERGE_FOLDERS 1 #include <stdio.h> #include <tchar.h> Modified: branches/shell-experiments/dll/win32/browseui/shellbrowser.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
============================================================================== --- branches/shell-experiments/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] Wed Jul 9 00:42:05 2014 @@ -3425,8 +3425,14 @@ { HRESULT hr; IEThreadParamBlock * parameters = (IEThreadParamBlock *) lpThreadParameter; + INITCOMMONCONTROLSEX iccex = + { + sizeof(iccex), + 0xFFFF /* everything! */ + }; OleInitialize(NULL); + InitCommonControlsEx(&iccex); ATLTRY(hr = ExplorerMessageLoop(parameters)); Modified: branches/shell-experiments/dll/win32/shell32/defcontextmenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
============================================================================== --- branches/shell-experiments/dll/win32/shell32/defcontextmenu.cpp [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/shell32/defcontextmenu.cpp [iso-8859-1] Wed Jul 9 00:42:05 2014 @@ -1672,13 +1672,21 @@ const HKEY *ahkeyClsKeys, IContextMenu **ppcm) { + // FIXME: This needs to be freed somewhere (like in the destructor of the context menu) + LPCITEMIDLIST *apidl2 = (LPCITEMIDLIST *) SHAlloc(sizeof(LPCITEMIDLIST) * cidl); + + for (int i = 0; i < cidl; i++) + { + apidl2[i] = apidl[i]; + } + DEFCONTEXTMENU pdcm; pdcm.hwnd = hwnd; pdcm.pcmcb = NULL; pdcm.pidlFolder = pidlFolder; pdcm.psf = psf; pdcm.cidl = cidl; - pdcm.apidl = apidl; + pdcm.apidl = apidl2; pdcm.punkAssociationInfo = NULL; pdcm.cKeys = nKeys; pdcm.aKeys = ahkeyClsKeys; Modified: branches/shell-experiments/dll/win32/shell32/shlmenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
============================================================================== --- branches/shell-experiments/dll/win32/shell32/shlmenu.cpp [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/shell32/shlmenu.cpp [iso-8859-1] Wed Jul 9 00:42:05 2014 @@ -19,6 +19,8 @@ */ #include "precomp.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shellmenu); #ifdef FM_SEPARATOR #undef FM_SEPARATOR @@ -55,8 +57,6 @@ static BOOL bAbortInit; #define CCH_MAXITEMTEXT 256 - -WINE_DEFAULT_DEBUG_CHANNEL(shell); static LPFMINFO FM_GetMenuInfo(HMENU hmenu) { @@ -857,6 +857,8 @@ return uIDMax; nItem = GetMenuItemCount(hmDst); + if (nItem == -1) + return uIDMax; if (uInsert >= (UINT)nItem) /* insert position inside menu? */ { @@ -900,16 +902,18 @@ /* This is a separator; don't put two of them in a row */ if (bAlreadySeparated) continue; + bAlreadySeparated = TRUE; } else if (miiSrc.hSubMenu) { - if ((uFlags & MM_SUBMENUSHAVEIDS) != 0 && miiSrc.wID != (UINT)miiSrc.hSubMenu) + if (uFlags & MM_SUBMENUSHAVEIDS) { miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */ - if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */ + if (miiSrc.wID > uIDAdjustMax) /* skip IDs higher than uIDAdjustMax */ continue; + if (uIDMax <= miiSrc.wID) /* remember the highest ID */ uIDMax = miiSrc.wID + 1; } @@ -934,9 +938,9 @@ { miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */ - if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */{ + if (miiSrc.wID > uIDAdjustMax) /* skip IDs higher than uIDAdjustMax */ continue; - } + if (uIDMax <= miiSrc.wID) /* remember the highest ID */ uIDMax = miiSrc.wID + 1;
10 years, 5 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
Results per page:
10
25
50
100
200