Michael Stefaniuc : comdlg32: Pass an object instead of an iface to a helper function.
Alexandre Julliard
julliard at winehq.org
Fri Dec 31 11:01:06 CST 2010
Module: wine
Branch: master
Commit: 8e999df0c1e6b887399987c39a15024f32782ff1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8e999df0c1e6b887399987c39a15024f32782ff1
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Fri Dec 31 11:12:19 2010 +0100
comdlg32: Pass an object instead of an iface to a helper function.
---
dlls/comdlg32/filedlgbrowser.c | 62 +++++++++++++++++----------------------
1 files changed, 27 insertions(+), 35 deletions(-)
diff --git a/dlls/comdlg32/filedlgbrowser.c b/dlls/comdlg32/filedlgbrowser.c
index 078001e..439d2a9 100644
--- a/dlls/comdlg32/filedlgbrowser.c
+++ b/dlls/comdlg32/filedlgbrowser.c
@@ -72,12 +72,6 @@ static const IShellBrowserVtbl IShellBrowserImpl_Vtbl;
static const ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl;
static const IServiceProviderVtbl IShellBrowserImpl_IServiceProvider_Vtbl;
-/**************************************************************************
-* Local Prototypes
-*/
-
-static HRESULT IShellBrowserImpl_ICommDlgBrowser_OnSelChange(ICommDlgBrowser *iface, const IShellView *ppshv);
-
/*
* Helper functions
*/
@@ -805,6 +799,32 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDl
}
/**************************************************************************
+* IShellBrowserImpl_OnSelChange
+*/
+static HRESULT IShellBrowserImpl_OnSelChange(IShellBrowserImpl *This, const IShellView *ppshv)
+{
+ FileOpenDlgInfos *fodInfos;
+
+ fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
+ TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView);
+
+ /* release old selections */
+ if (fodInfos->Shell.FOIDataObject)
+ IDataObject_Release(fodInfos->Shell.FOIDataObject);
+
+ /* get a new DataObject from the ShellView */
+ if(FAILED(IShellView_GetItemObject(fodInfos->Shell.FOIShellView, SVGIO_SELECTION,
+ &IID_IDataObject, (void**)&fodInfos->Shell.FOIDataObject)))
+ return E_FAIL;
+
+ FILEDLG95_FILENAME_FillFromSelection(This->hwndOwner);
+
+ if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
+ SendCustomDlgNotificationMessage(This->hwndOwner, CDN_SELCHANGE);
+ return S_OK;
+}
+
+/**************************************************************************
* IShellBrowserImpl_ICommDlgBrowser_OnStateChange
*/
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBrowser *iface,
@@ -838,7 +858,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBr
}
break;
case CDBOSC_SELCHANGE:
- return IShellBrowserImpl_ICommDlgBrowser_OnSelChange(iface,ppshv);
+ return IShellBrowserImpl_OnSelChange(This, ppshv);
case CDBOSC_RENAME:
/* nothing to do */
break;
@@ -938,34 +958,6 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBr
}
-/**************************************************************************
-* IShellBrowserImpl_ICommDlgBrowser_OnSelChange
-*/
-static HRESULT IShellBrowserImpl_ICommDlgBrowser_OnSelChange(ICommDlgBrowser *iface, const IShellView *ppshv)
-{
- FileOpenDlgInfos *fodInfos;
-
- IShellBrowserImpl *This = impl_from_ICommDlgBrowser(iface);
-
- fodInfos = GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
- TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView);
-
- /* release old selections */
- if (fodInfos->Shell.FOIDataObject)
- IDataObject_Release(fodInfos->Shell.FOIDataObject);
-
- /* get a new DataObject from the ShellView */
- if(FAILED(IShellView_GetItemObject(fodInfos->Shell.FOIShellView, SVGIO_SELECTION,
- &IID_IDataObject, (LPVOID*)&fodInfos->Shell.FOIDataObject)))
- return E_FAIL;
-
- FILEDLG95_FILENAME_FillFromSelection(This->hwndOwner);
-
- if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
- SendCustomDlgNotificationMessage(This->hwndOwner, CDN_SELCHANGE);
- return S_OK;
-}
-
static const ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl =
{
/* IUnknown */
More information about the wine-cvs
mailing list