Author: gadamopoulos Date: Wed Aug 30 12:29:43 2017 New Revision: 75712
URL: http://svn.reactos.org/svn/reactos?rev=75712&view=rev Log: [SHELL32][BROWSEUI] -Demote some uselass error prints and promote some others that make sense to have. Avoid a case that would logically hit an error as initialization of the shell browser is still under way,
Modified: trunk/reactos/dll/win32/browseui/shellbrowser.cpp trunk/reactos/dll/win32/browseui/travellog.cpp trunk/reactos/dll/win32/shell32/wine/changenotify.c trunk/reactos/dll/win32/shell32/wine/shellord.c
Modified: trunk/reactos/dll/win32/browseui/shellbrowser.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/shellbro... ============================================================================== --- trunk/reactos/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] Wed Aug 30 12:29:43 2017 @@ -1379,18 +1379,22 @@ previousMessage = pThis->m_pCurrentMsg; pThis->m_pCurrentMsg = &msg;
- CComPtr<IMenuBand> menuBand; - hResult = pThis->GetMenuBand(IID_PPV_ARG(IMenuBand, &menuBand)); - if (SUCCEEDED(hResult) && menuBand.p != NULL) - { - hResult = menuBand->TranslateMenuMessage(&msg, &lResult); - if (hResult == S_OK) - return lResult; - uMsg = msg.message; - wParam = msg.wParam; - lParam = msg.lParam; - } - menuBand.Release(); + /* If the shell browser is initialized, let the menu band preprocess the messages */ + if (pThis->fCurrentDirectoryPIDL) + { + CComPtr<IMenuBand> menuBand; + hResult = pThis->GetMenuBand(IID_PPV_ARG(IMenuBand, &menuBand)); + if (SUCCEEDED(hResult) && menuBand.p != NULL) + { + hResult = menuBand->TranslateMenuMessage(&msg, &lResult); + if (hResult == S_OK) + return lResult; + uMsg = msg.message; + wParam = msg.wParam; + lParam = msg.lParam; + } + menuBand.Release(); + }
handled = pThis->ProcessWindowMessage(hWnd, uMsg, wParam, lParam, lResult, 0); ATLASSERT(pThis->m_pCurrentMsg == &msg);
Modified: trunk/reactos/dll/win32/browseui/travellog.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/travello... ============================================================================== --- trunk/reactos/dll/win32/browseui/travellog.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/travellog.cpp [iso-8859-1] Wed Aug 30 12:29:43 2017 @@ -400,7 +400,7 @@ HRESULT hResult;
hResult = FindRelativeEntry(iOffset, &destinationEntry); - if (FAILED_UNEXPECTEDLY(hResult)) + if (FAILED(hResult)) return hResult; hResult = destinationEntry->QueryInterface(IID_PPV_ARG(ITravelEntry, ppte)); if (FAILED_UNEXPECTEDLY(hResult))
Modified: trunk/reactos/dll/win32/shell32/wine/changenotify.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/chan... ============================================================================== --- trunk/reactos/dll/win32/shell32/wine/changenotify.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/wine/changenotify.c [iso-8859-1] Wed Aug 30 12:29:43 2017 @@ -34,6 +34,7 @@ #include <wine/debug.h> #include <wine/list.h> #include <process.h> +#include <shellutils.h>
#include "pidl.h"
@@ -170,7 +171,7 @@ queued = InterlockedCompareExchange(&item->wQueuedCount, 0, 0); if (queued != 0) { - TRACE("Not freeing, still %d queued events\n", queued); + ERR("Not freeing, still %d queued events\n", queued); return; } TRACE("Freeing for real! %p (%d) \n", item, item->cidl); @@ -275,13 +276,6 @@ { InterlockedIncrement(&item->wQueuedCount); QueueUserAPC( _AddDirectoryProc, m_hThread, (ULONG_PTR) &item->apidl[i] ); - } - else - { - CHAR buffer[MAX_PATH]; - if (!SHGetPathFromIDListA( item->apidl[i].pidl, buffer )) - strcpy( buffer, "<unknown>" ); - ERR("_OpenDirectory failed for %s\n", buffer); } } #endif @@ -661,16 +655,16 @@ return TRUE;
hr = SHGetDesktopFolder(&psfDesktop); - if (!SUCCEEDED(hr)) + if (FAILED_UNEXPECTEDLY(hr)) return FALSE;
hr = IShellFolder_GetDisplayNameOf(psfDesktop, item->pidl, SHGDN_FORPARSING, &strFile); IShellFolder_Release(psfDesktop); - if (!SUCCEEDED(hr)) + if (FAILED_UNEXPECTEDLY(hr)) return FALSE;
hr = StrRetToBufW(&strFile, NULL, item->wstrDirectory, _countof(item->wstrDirectory)); - if (!SUCCEEDED(hr)) + if (FAILED_UNEXPECTEDLY(hr)) return FALSE;
TRACE("_OpenDirectory %s\n", debugstr_w(item->wstrDirectory)); @@ -685,6 +679,7 @@
if (item->hDirectory == INVALID_HANDLE_VALUE) { + ERR("_OpenDirectory failed for %s\n", debugstr_w(item->wstrDirectory)); return FALSE; } return TRUE;
Modified: trunk/reactos/dll/win32/shell32/wine/shellord.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/shel... ============================================================================== --- trunk/reactos/dll/win32/shell32/wine/shellord.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/wine/shellord.c [iso-8859-1] Wed Aug 30 12:29:43 2017 @@ -1245,7 +1245,7 @@ if ( (r != ERROR_SUCCESS) || (cs->cLength < sizeof(*cs)) || (cs->cLength != length) ) { - ERR("Initializing shell cabinet settings\n"); + TRACE("Initializing shell cabinet settings\n"); memset(cs, 0, sizeof(*cs)); cs->cLength = sizeof(*cs); cs->nVersion = 2;