[COMDLG32] Sync with Wine Staging 1.7.47. CORE-9924

svn path=/trunk/; revision=68555
This commit is contained in:
Amine Khaldi 2015-07-22 19:35:34 +00:00
parent 44aca5e627
commit 8d686fb686
6 changed files with 50 additions and 34 deletions

View file

@ -62,7 +62,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
#include "resource.h" #include "resource.h"
/* Common dialogs implementation globals */ /* Common dialogs implementation globals */
#define COMDLG32_Atom ((ATOM)0xa000) /* MS uses this one to identify props */ #define COMDLG32_Atom MAKEINTATOM(0xa000) /* MS uses this one to identify props */
extern HINSTANCE COMDLG32_hInstance DECLSPEC_HIDDEN; extern HINSTANCE COMDLG32_hInstance DECLSPEC_HIDDEN;

View file

@ -268,7 +268,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
*/ */
HRESULT WINAPI DllRegisterServer(void) HRESULT WINAPI DllRegisterServer(void)
{ {
#ifdef __REACTOS__
return E_FAIL; // FIXME: __wine_register_resources(COMDLG32_hInstance); return E_FAIL; // FIXME: __wine_register_resources(COMDLG32_hInstance);
#else
return __wine_register_resources(COMDLG32_hInstance);
#endif
} }
/*********************************************************************** /***********************************************************************
@ -276,7 +280,11 @@ HRESULT WINAPI DllRegisterServer(void)
*/ */
HRESULT WINAPI DllUnregisterServer(void) HRESULT WINAPI DllUnregisterServer(void)
{ {
#ifdef __REACTOS__
return E_FAIL; // FIXME: __wine_unregister_resources(COMDLG32_hInstance); return E_FAIL; // FIXME: __wine_unregister_resources(COMDLG32_hInstance);
#else
return __wine_unregister_resources(COMDLG32_hInstance);
#endif
} }
#endif /* Win 7 */ #endif /* Win 7 */

View file

@ -1,6 +1,6 @@
diff -prudN e:\Wine\dlls\comdlg32/cdlg32.c e:\reactos\dll\win32\comdlg32/cdlg32.c diff -pudN e:\wine\dlls\comdlg32/cdlg32.c e:\reactos\dll\win32\comdlg32/cdlg32.c
--- e:\Wine\dlls\comdlg32/cdlg32.c 2013-10-26 22:24:27.508648000 +0100 --- e:\wine\dlls\comdlg32/cdlg32.c 2015-02-21 17:13:08.621542200 +0100
+++ e:\reactos\dll\win32\comdlg32/cdlg32.c 2014-03-05 11:46:06.260510700 +0100 +++ e:\reactos\dll\win32\comdlg32/cdlg32.c 2015-07-21 09:48:05.584922500 +0100
@@ -174,6 +157,8 @@ DWORD WINAPI CommDlgExtendedError(void) @@ -174,6 +157,8 @@ DWORD WINAPI CommDlgExtendedError(void)
return 0; /* we never set an error, so there isn't one */ return 0; /* we never set an error, so there isn't one */
} }
@ -10,27 +10,33 @@ diff -prudN e:\Wine\dlls\comdlg32/cdlg32.c e:\reactos\dll\win32\comdlg32/cdlg32.
/************************************************************************* /*************************************************************************
* Implement the CommDlg32 class factory * Implement the CommDlg32 class factory
* *
@@ -283,7 +268,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSI @@ -283,7 +268,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSI
*/ */
HRESULT WINAPI DllRegisterServer(void) HRESULT WINAPI DllRegisterServer(void)
{ {
- return __wine_register_resources(COMDLG32_hInstance); +#ifdef __REACTOS__
+ return E_FAIL; // FIXME: __wine_register_resources(COMDLG32_hInstance); + return E_FAIL; // FIXME: __wine_register_resources(COMDLG32_hInstance);
+#else
return __wine_register_resources(COMDLG32_hInstance);
+#endif
} }
/*********************************************************************** /***********************************************************************
@@ -291,5 +276,7 @@ HRESULT WINAPI DllRegisterServer(void) @@ -291,5 +280,11 @@ HRESULT WINAPI DllRegisterServer(void)
*/ */
HRESULT WINAPI DllUnregisterServer(void) HRESULT WINAPI DllUnregisterServer(void)
{ {
- return __wine_unregister_resources(COMDLG32_hInstance); +#ifdef __REACTOS__
+ return E_FAIL; // FIXME: __wine_unregister_resources(COMDLG32_hInstance); + return E_FAIL; // FIXME: __wine_unregister_resources(COMDLG32_hInstance);
+#else
return __wine_unregister_resources(COMDLG32_hInstance);
+#endif
} }
+ +
+#endif /* Win 7 */ +#endif /* Win 7 */
diff -prudN e:\Wine\dlls\comdlg32/comdlg32.spec e:\reactos\dll\win32\comdlg32/comdlg32.spec diff -pudN e:\wine\dlls\comdlg32/comdlg32.spec e:\reactos\dll\win32\comdlg32/comdlg32.spec
--- e:\Wine\dlls\comdlg32/comdlg32.spec 2011-09-16 23:22:36.026770600 +0100 --- e:\wine\dlls\comdlg32/comdlg32.spec 2015-02-21 17:13:08.621542200 +0100
+++ e:\reactos\dll\win32\comdlg32/comdlg32.spec 2012-02-15 22:32:22.456422900 +0100 +++ e:\reactos\dll\win32\comdlg32/comdlg32.spec 2012-02-15 22:32:22.456422900 +0100
@@ -3,9 +3,9 @@ @@ -3,9 +3,9 @@
@ stdcall ChooseFontA(ptr) @ stdcall ChooseFontA(ptr)
@ -45,11 +51,10 @@ diff -prudN e:\Wine\dlls\comdlg32/comdlg32.spec e:\reactos\dll\win32\comdlg32/co
@ stdcall FindTextA(ptr) @ stdcall FindTextA(ptr)
@ stdcall FindTextW(ptr) @ stdcall FindTextW(ptr)
@ stdcall GetFileTitleA(str ptr long) @ stdcall GetFileTitleA(str ptr long)
diff -pudN e:\wine\dlls\comdlg32/itemdlg.c e:\reactos\dll\win32\comdlg32/itemdlg.c
diff -prudN e:\Wine\dlls\comdlg32/itemdlg.c e:\reactos\dll\win32\comdlg32/itemdlg.c --- e:\wine\dlls\comdlg32/itemdlg.c 2015-04-05 20:44:56.807083800 +0100
--- e:\Wine\dlls\comdlg32/itemdlg.c 2013-10-26 22:24:27.515652700 +0100 +++ e:\reactos\dll\win32\comdlg32/itemdlg.c 2015-07-21 09:56:34.329021000 +0100
+++ e:\reactos\dll\win32\comdlg32/itemdlg.c 2013-10-15 19:32:27.803008200 +0100 @@ -18,10 +18,13 @@
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
@ -58,7 +63,12 @@ diff -prudN e:\Wine\dlls\comdlg32/itemdlg.c e:\reactos\dll\win32\comdlg32/itemdl
#include <stdarg.h> #include <stdarg.h>
#define COBJMACROS #define COBJMACROS
@@ -3660,3 +3662,5 @@ HRESULT FileSaveDialog_Constructor(IUnkn #define NONAMELESSUNION
+#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
@@ -3847,3 +3850,5 @@ HRESULT FileSaveDialog_Constructor(IUnkn
{ {
return FileDialog_constructor(pUnkOuter, riid, ppv, ITEMDLG_TYPE_SAVE); return FileDialog_constructor(pUnkOuter, riid, ppv, ITEMDLG_TYPE_SAVE);
} }

View file

@ -2567,10 +2567,11 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
filterSearchIndex[0] = '\0'; filterSearchIndex[0] = '\0';
} }
/* find the file extension by searching for the first dot in filterExt */
/* strip the * or anything else from the extension, "*.abc" becomes "abc" */ /* strip the * or anything else from the extension, "*.abc" becomes "abc" */
/* if the extension is invalid or contains a glob, ignore it */ /* if the extension is invalid or contains a glob, ignore it */
filterSearchIndex = PathFindExtensionW(filterExt); filterSearchIndex = strchrW(filterExt, '.');
if (*filterSearchIndex++ && !strchrW(filterSearchIndex, '*') && !strchrW(filterSearchIndex, '?')) if (filterSearchIndex++ && !strchrW(filterSearchIndex, '*') && !strchrW(filterSearchIndex, '?'))
{ {
strcpyW(filterExt, filterSearchIndex); strcpyW(filterExt, filterSearchIndex);
} }

View file

@ -1228,7 +1228,7 @@ static HRESULT init_custom_controls(FileDialogImpl *This)
/************************************************************************** /**************************************************************************
* Window related functions. * Window related functions.
*/ */
static SIZE update_layout(FileDialogImpl *This) static void update_layout(FileDialogImpl *This)
{ {
HDWP hdwp; HDWP hdwp;
HWND hwnd; HWND hwnd;
@ -1236,21 +1236,19 @@ static SIZE update_layout(FileDialogImpl *This)
RECT cancel_rc, open_rc; RECT cancel_rc, open_rc;
RECT filetype_rc, filename_rc, filenamelabel_rc; RECT filetype_rc, filename_rc, filenamelabel_rc;
RECT toolbar_rc, ebrowser_rc, customctrls_rc; RECT toolbar_rc, ebrowser_rc, customctrls_rc;
int missing_width, missing_height;
static const UINT vspacing = 4, hspacing = 4; static const UINT vspacing = 4, hspacing = 4;
SIZE ret; static const UINT min_width = 320, min_height = 200;
GetClientRect(This->dlg_hwnd, &dialog_rc); if (!GetClientRect(This->dlg_hwnd, &dialog_rc))
missing_width = max(0, 320 - dialog_rc.right);
missing_height = max(0, 200 - dialog_rc.bottom);
if(missing_width || missing_height)
{ {
TRACE("Missing (%d, %d)\n", missing_width, missing_height); TRACE("Invalid dialog window, not updating layout\n");
ret.cx = missing_width; return;
ret.cy = missing_height; }
return ret;
if(dialog_rc.right < min_width || dialog_rc.bottom < min_height)
{
TRACE("Dialog size (%d, %d) too small, not updating layout\n", dialog_rc.right, dialog_rc.bottom);
return;
} }
/**** /****
@ -1402,8 +1400,7 @@ static SIZE update_layout(FileDialogImpl *This)
else else
ERR("Failed to position dialog controls.\n"); ERR("Failed to position dialog controls.\n");
ret.cx = 0; ret.cy = 0; return;
return ret;
} }
static HRESULT init_explorerbrowser(FileDialogImpl *This) static HRESULT init_explorerbrowser(FileDialogImpl *This)

View file

@ -56,7 +56,7 @@ reactos/dll/win32/cabinet # Synced to WineStaging-1.7.37
reactos/dll/win32/clusapi # Synced to WineStaging-1.7.37 reactos/dll/win32/clusapi # Synced to WineStaging-1.7.37
reactos/dll/win32/comcat # Synced to WineStaging-1.7.37 reactos/dll/win32/comcat # Synced to WineStaging-1.7.37
reactos/dll/win32/comctl32 # Synced to WineStaging-1.7.47 reactos/dll/win32/comctl32 # Synced to WineStaging-1.7.47
reactos/dll/win32/comdlg32 # Synced to WineStaging-1.7.37 reactos/dll/win32/comdlg32 # Synced to WineStaging-1.7.47
reactos/dll/win32/compstui # Synced to WineStaging-1.7.37 reactos/dll/win32/compstui # Synced to WineStaging-1.7.37
reactos/dll/win32/credui # Synced to WineStaging-1.7.37 reactos/dll/win32/credui # Synced to WineStaging-1.7.37
reactos/dll/win32/crypt32 # Synced to WineStaging-1.7.47 reactos/dll/win32/crypt32 # Synced to WineStaging-1.7.47