Author: akhaldi
Date: Thu Mar 19 12:24:05 2015
New Revision: 66803
URL:
http://svn.reactos.org/svn/reactos?rev=66803&view=rev
Log:
[COMDLG32] Sync with Wine Staging 1.7.37. CORE-9246
Modified:
trunk/reactos/dll/win32/comdlg32/filedlg.c
trunk/reactos/dll/win32/comdlg32/filedlgbrowser.c
trunk/reactos/dll/win32/comdlg32/printdlg.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/comdlg32/filedlg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/filedlg…
==============================================================================
--- trunk/reactos/dll/win32/comdlg32/filedlg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comdlg32/filedlg.c [iso-8859-1] Thu Mar 19 12:24:05 2015
@@ -1556,41 +1556,37 @@
/* 2. (All platforms) If initdir is not null, then use it */
if (!handledPath && fodInfos->initdir && *fodInfos->initdir)
{
- /* Work out the proper path as supplied one might be relative */
- /* (Here because supplying '.' as dir browses to My Computer) */
- if (!handledPath) {
- WCHAR tmpBuf[MAX_PATH];
- WCHAR tmpBuf2[MAX_PATH];
- WCHAR *nameBit;
- DWORD result;
-
- lstrcpyW(tmpBuf, fodInfos->initdir);
- if( PathFileExistsW(tmpBuf) ) {
- /* initdir does not have to be a directory. If a file is
- * specified, the dir part is taken */
- if( PathIsDirectoryW(tmpBuf)) {
- if (tmpBuf[lstrlenW(tmpBuf)-1] != '\\') {
- lstrcatW(tmpBuf, szwSlash);
- }
- lstrcatW(tmpBuf, szwStar);
- }
- result = GetFullPathNameW(tmpBuf, MAX_PATH, tmpBuf2, &nameBit);
- if (result) {
- *nameBit = 0x00;
- MemFree(fodInfos->initdir);
- fodInfos->initdir = MemAlloc((lstrlenW(tmpBuf2) + 1)*sizeof(WCHAR));
- lstrcpyW(fodInfos->initdir, tmpBuf2);
- handledPath = TRUE;
- TRACE("Value in InitDir changed to %s\n",
debugstr_w(fodInfos->initdir));
- }
- }
- else if (fodInfos->initdir)
- {
- MemFree(fodInfos->initdir);
- fodInfos->initdir = NULL;
- TRACE("Value in InitDir is not an existing path, changed to
(nil)\n");
- }
- }
+ /* Work out the proper path as supplied one might be relative */
+ /* (Here because supplying '.' as dir browses to My Computer)
*/
+ WCHAR tmpBuf[MAX_PATH];
+ WCHAR tmpBuf2[MAX_PATH];
+ WCHAR *nameBit;
+ DWORD result;
+
+ lstrcpyW(tmpBuf, fodInfos->initdir);
+ if (PathFileExistsW(tmpBuf)) {
+ /* initdir does not have to be a directory. If a file is
+ * specified, the dir part is taken */
+ if (PathIsDirectoryW(tmpBuf)) {
+ PathAddBackslashW(tmpBuf);
+ lstrcatW(tmpBuf, szwStar);
+ }
+ result = GetFullPathNameW(tmpBuf, MAX_PATH, tmpBuf2, &nameBit);
+ if (result) {
+ *nameBit = 0x00;
+ MemFree(fodInfos->initdir);
+ fodInfos->initdir = MemAlloc((lstrlenW(tmpBuf2) + 1) *
sizeof(WCHAR));
+ lstrcpyW(fodInfos->initdir, tmpBuf2);
+ handledPath = TRUE;
+ TRACE("Value in InitDir changed to %s\n",
debugstr_w(fodInfos->initdir));
+ }
+ }
+ else if (fodInfos->initdir)
+ {
+ MemFree(fodInfos->initdir);
+ fodInfos->initdir = NULL;
+ TRACE("Value in InitDir is not an existing path, changed to
(nil)\n");
+ }
}
if (!handledPath && (!fodInfos->initdir || !*fodInfos->initdir))
@@ -3240,7 +3236,6 @@
int iIndentation;
TEXTMETRICW tm;
LPSFOLDER tmpFolder;
- LookInInfos *liInfos = GetPropA(pDIStruct->hwndItem,LookInInfosStr);
UINT shgfi_flags = SHGFI_PIDL | SHGFI_OPENICON | SHGFI_SYSICONINDEX |
SHGFI_DISPLAYNAME;
UINT icon_width, icon_height;
@@ -3263,16 +3258,8 @@
shgfi_flags |= SHGFI_SMALLICON;
}
- if(pDIStruct->itemID == liInfos->uSelectedItem)
- {
- ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
- 0, &sfi, sizeof (sfi), shgfi_flags );
- }
- else
- {
- ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
- 0, &sfi, sizeof (sfi), shgfi_flags );
- }
+ ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
+ 0, &sfi, sizeof (sfi), shgfi_flags );
/* Is this item selected ? */
if(pDIStruct->itemState & ODS_SELECTED)
@@ -3290,16 +3277,10 @@
/* Do not indent item if drawing in the edit of the combo */
if(pDIStruct->itemState & ODS_COMBOBOXEDIT)
- {
iIndentation = 0;
- ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
- 0, &sfi, sizeof (sfi), shgfi_flags );
-
- }
else
- {
iIndentation = tmpFolder->m_iIndent;
- }
+
/* Draw text and icon */
/* Initialise the icon display area */
Modified: trunk/reactos/dll/win32/comdlg32/filedlgbrowser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/filedlg…
==============================================================================
--- trunk/reactos/dll/win32/comdlg32/filedlgbrowser.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comdlg32/filedlgbrowser.c [iso-8859-1] Thu Mar 19 12:24:05
2015
@@ -919,7 +919,7 @@
return S_OK;
/* Check if there is a mask to apply if not */
- if(!fodInfos->ShellInfos.lpstrCurrentFilter ||
!lstrlenW(fodInfos->ShellInfos.lpstrCurrentFilter))
+ if(!fodInfos->ShellInfos.lpstrCurrentFilter ||
!fodInfos->ShellInfos.lpstrCurrentFilter[0])
return S_OK;
if (SUCCEEDED(IShellFolder_GetDisplayNameOf(fodInfos->Shell.FOIShellFolder, pidl,
SHGDN_INFOLDER | SHGDN_FORPARSING, &str)))
Modified: trunk/reactos/dll/win32/comdlg32/printdlg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/printdl…
==============================================================================
--- trunk/reactos/dll/win32/comdlg32/printdlg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comdlg32/printdlg.c [iso-8859-1] Thu Mar 19 12:24:05 2015
@@ -816,8 +816,7 @@
Names = HeapAlloc(GetProcessHeap(),0, NrOfEntries*sizeof(char)*NamesSize);
Words = HeapAlloc(GetProcessHeap(),0, NrOfEntries*sizeof(WORD));
- NrOfEntries = DeviceCapabilitiesA(PrinterName, PortName,
- fwCapability_Names, Names, dm);
+ DeviceCapabilitiesA(PrinterName, PortName, fwCapability_Names, Names, dm);
NrOfEntries = DeviceCapabilitiesA(PrinterName, PortName,
fwCapability_Words, (LPSTR)Words, dm);
@@ -927,8 +926,7 @@
Names = HeapAlloc(GetProcessHeap(),0, NrOfEntries*sizeof(WCHAR)*NamesSize);
Words = HeapAlloc(GetProcessHeap(),0, NrOfEntries*sizeof(WORD));
- NrOfEntries = DeviceCapabilitiesW(PrinterName, PortName,
- fwCapability_Names, Names, dm);
+ DeviceCapabilitiesW(PrinterName, PortName, fwCapability_Names, Names, dm);
NrOfEntries = DeviceCapabilitiesW(PrinterName, PortName,
fwCapability_Words, Words, dm);
@@ -1776,10 +1774,12 @@
case cmb2: /* Papersize */
{
DWORD Sel = SendDlgItemMessageA(hDlg, cmb2, CB_GETCURSEL, 0, 0);
- if(Sel != CB_ERR)
+ if(Sel != CB_ERR) {
lpdm->u1.s1.dmPaperSize = SendDlgItemMessageA(hDlg, cmb2,
CB_GETITEMDATA,
Sel, 0);
+ GetDlgItemTextA(hDlg, cmb2, (char *)lpdm->dmFormName, CCHFORMNAME);
+ }
}
break;
@@ -1932,10 +1932,12 @@
case cmb2: /* Papersize */
{
DWORD Sel = SendDlgItemMessageW(hDlg, cmb2, CB_GETCURSEL, 0, 0);
- if(Sel != CB_ERR)
+ if(Sel != CB_ERR) {
lpdm->u1.s1.dmPaperSize = SendDlgItemMessageW(hDlg, cmb2,
CB_GETITEMDATA,
Sel, 0);
+ GetDlgItemTextW(hDlg, cmb2, lpdm->dmFormName, CCHFORMNAME);
+ }
}
break;
@@ -3791,16 +3793,16 @@
{
if(data->unicode)
res = FindResourceW(data->u.dlgw->hInstance,
- data->u.dlgw->lpPageSetupTemplateName,
MAKEINTRESOURCEW(RT_DIALOG));
+ data->u.dlgw->lpPageSetupTemplateName,
(LPWSTR)RT_DIALOG);
else
res = FindResourceA(data->u.dlga->hInstance,
- data->u.dlga->lpPageSetupTemplateName,
MAKEINTRESOURCEA(RT_DIALOG));
+ data->u.dlga->lpPageSetupTemplateName,
(LPSTR)RT_DIALOG);
tmpl_handle = LoadResource(data->u.dlgw->hInstance, res);
}
else
{
res = FindResourceW(COMDLG32_hInstance, MAKEINTRESOURCEW(PAGESETUPDLGORD),
- MAKEINTRESOURCEW(RT_DIALOG));
+ (LPWSTR)RT_DIALOG);
tmpl_handle = LoadResource(COMDLG32_hInstance, res);
}
return LockResource(tmpl_handle);
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Mar 19 12:24:05 2015
@@ -62,7 +62,7 @@
reactos/dll/win32/clusapi # Synced to Wine-1.7.27
reactos/dll/win32/comcat # Synced to Wine-1.7.27
reactos/dll/win32/comctl32 # Synced to WineStaging-1.7.37
-reactos/dll/win32/comdlg32 # Synced to Wine-1.7.27
+reactos/dll/win32/comdlg32 # Synced to WineStaging-1.7.37
reactos/dll/win32/compstui # Synced to Wine-1.7.27
reactos/dll/win32/credui # Synced to Wine-1.7.27
reactos/dll/win32/crypt32 # Synced to Wine-1.7.27