shell32: fix OnDefaultCommand handling

Huw D M Davies h.davies1 at physics.ox.ac.uk
Mon Apr 11 15:12:40 CDT 2005


        Huw Davies <huw at codeweavers.com>
        If ICommDlgBrowser_OnDefaultCommand returns anything other
        than S_OK then we should call the default handler.

Index: dlls/shell32/shlview.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlview.c,v
retrieving revision 1.113
diff -u -p -r1.113 shlview.c
--- dlls/shell32/shlview.c	21 Mar 2005 11:25:13 -0000	1.113
+++ dlls/shell32/shlview.c	11 Apr 2005 20:07:43 -0000
@@ -217,7 +217,7 @@ static HRESULT OnDefaultCommand(IShellVi
 	{
 	  TRACE("ICommDlgBrowser::OnDefaultCommand\n");
 	  ret = ICommDlgBrowser_OnDefaultCommand(This->pCommDlgBrowser, (IShellView*)This);
-	  TRACE("--\n");
+	  TRACE("-- returns %08lx\n", ret);
 	}
 	return ret;
 }
@@ -962,7 +962,7 @@ static void ShellView_DoContextMenu(IShe
 		  if (uCommand==FCIDM_SHVIEW_OPEN && IsInCommDlg(This))
 		  {
 		    TRACE("-- dlg: OnDefaultCommand\n");
-		    if (FAILED(OnDefaultCommand(This)))
+		    if (OnDefaultCommand(This) != S_OK)
 		    {
 		      ShellView_OpenSelectedItems(This);
 		    }



More information about the wine-patches mailing list