Author: janderwald
Date: Mon Nov 5 13:50:03 2007
New Revision: 30159
URL:
http://svn.reactos.org/svn/reactos?rev=30159&view=rev
Log:
- fix identation
- refresh shellview after success
Modified:
trunk/reactos/dll/win32/shell32/recyclebin.c
Modified: trunk/reactos/dll/win32/shell32/recyclebin.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/recycleb…
==============================================================================
--- trunk/reactos/dll/win32/shell32/recyclebin.c (original)
+++ trunk/reactos/dll/win32/shell32/recyclebin.c Mon Nov 5 13:50:03 2007
@@ -722,19 +722,36 @@
static HRESULT WINAPI
RecycleBin_IContextMenu_InvokeCommand( IContextMenu* iface, LPCMINVOKECOMMANDINFO lpici
)
{
+ HRESULT hr;
+ LPSHELLBROWSER lpSB;
+ LPSHELLVIEW lpSV = NULL;
+
RecycleBin * This = impl_from_IContextMenu(iface);
TRACE("%p %p verb %p\n", This, lpici, lpici->lpVerb);
- if ( LOWORD(lpici->lpVerb) == MAKEINTRESOURCEA(This->iIdEmpty))
- {
- // FIXME
- // path & flags
- return SHEmptyRecycleBinW(lpici->hwnd, L"C:\\", 0);
- }
-
-
- if ( LOWORD(lpici->lpVerb) == MAKEINTRESOURCEA(This->iIdProperties))
+ if ( LOWORD(lpici->lpVerb) == This->iIdEmpty)
+ {
+ // FIXME
+ // path & flags
+ hr = SHEmptyRecycleBinW(lpici->hwnd, L"C:\\", 0);
+ TRACE("result %x\n", hr);
+ if (hr != S_OK)
+ {
+ return hr;
+ }
+
+ if((lpSB = (LPSHELLBROWSER)SendMessageA(lpici->hwnd,
CWM_GETISHELLBROWSER,0,0)))
+ {
+ if(SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV)))
+ {
+ IShellView_Refresh(lpSV);
+ }
+ }
+ }
+
+
+ if ( LOWORD(lpici->lpVerb) == This->iIdProperties)
{
WCHAR szDrive = 'C';
SH_ShowRecycleBinProperties(szDrive);