mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:25:58 +00:00
[COMDLG32] Sync with Wine Staging 4.18. CORE-16441
This commit is contained in:
parent
8addeea484
commit
5981ef3ecc
6 changed files with 56 additions and 61 deletions
|
@ -45,9 +45,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "wine/port.h"
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -78,7 +75,6 @@
|
||||||
#include "filedlgbrowser.h"
|
#include "filedlgbrowser.h"
|
||||||
#include "shlwapi.h"
|
#include "shlwapi.h"
|
||||||
|
|
||||||
#include "wine/unicode.h"
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/heap.h"
|
#include "wine/heap.h"
|
||||||
|
|
||||||
|
@ -324,7 +320,7 @@ static void filedlg_collect_places_pidls(FileOpenDlgInfos *fodInfos)
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
WCHAR *str;
|
WCHAR *str;
|
||||||
|
|
||||||
sprintfW(nameW, placeW, i);
|
swprintf(nameW, placeW, i);
|
||||||
if (get_config_key_dword(hkey, nameW, &value))
|
if (get_config_key_dword(hkey, nameW, &value))
|
||||||
{
|
{
|
||||||
hr = SHGetSpecialFolderLocation(NULL, value, &fodInfos->places[i]);
|
hr = SHGetSpecialFolderLocation(NULL, value, &fodInfos->places[i]);
|
||||||
|
@ -1032,13 +1028,13 @@ static INT_PTR FILEDLG95_Handle_GetFilePath(HWND hwnd, DWORD size, LPVOID result
|
||||||
COMDLG32_GetDisplayNameOf( fodInfos->ShellInfos.pidlAbsCurrent, buffer );
|
COMDLG32_GetDisplayNameOf( fodInfos->ShellInfos.pidlAbsCurrent, buffer );
|
||||||
if (len)
|
if (len)
|
||||||
{
|
{
|
||||||
p = buffer + strlenW(buffer);
|
p = buffer + lstrlenW(buffer);
|
||||||
*p++ = '\\';
|
*p++ = '\\';
|
||||||
SendMessageW( fodInfos->DlgInfos.hwndFileName, WM_GETTEXT, len + 1, (LPARAM)p );
|
SendMessageW( fodInfos->DlgInfos.hwndFileName, WM_GETTEXT, len + 1, (LPARAM)p );
|
||||||
}
|
}
|
||||||
if (fodInfos->unicode)
|
if (fodInfos->unicode)
|
||||||
{
|
{
|
||||||
total = strlenW( buffer) + 1;
|
total = lstrlenW( buffer) + 1;
|
||||||
if (result) lstrcpynW( result, buffer, size );
|
if (result) lstrcpynW( result, buffer, size );
|
||||||
TRACE( "CDM_GETFILEPATH: returning %u %s\n", total, debugstr_w(result));
|
TRACE( "CDM_GETFILEPATH: returning %u %s\n", total, debugstr_w(result));
|
||||||
}
|
}
|
||||||
|
@ -1690,7 +1686,7 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
|
||||||
{
|
{
|
||||||
/* 1. If win2000 or higher and filename contains a path, use it
|
/* 1. If win2000 or higher and filename contains a path, use it
|
||||||
in preference over the lpstrInitialDir */
|
in preference over the lpstrInitialDir */
|
||||||
if (win2000plus && *fodInfos->filename && strpbrkW(fodInfos->filename, szwSlash)) {
|
if (win2000plus && *fodInfos->filename && wcspbrk(fodInfos->filename, szwSlash)) {
|
||||||
WCHAR tmpBuf[MAX_PATH];
|
WCHAR tmpBuf[MAX_PATH];
|
||||||
WCHAR *nameBit;
|
WCHAR *nameBit;
|
||||||
DWORD result;
|
DWORD result;
|
||||||
|
@ -1783,7 +1779,7 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
|
||||||
/* 3. All except w2k+: if filename contains a path use it */
|
/* 3. All except w2k+: if filename contains a path use it */
|
||||||
if (!win2000plus && fodInfos->filename &&
|
if (!win2000plus && fodInfos->filename &&
|
||||||
*fodInfos->filename &&
|
*fodInfos->filename &&
|
||||||
strpbrkW(fodInfos->filename, szwSlash)) {
|
wcspbrk(fodInfos->filename, szwSlash)) {
|
||||||
WCHAR tmpBuf[MAX_PATH];
|
WCHAR tmpBuf[MAX_PATH];
|
||||||
WCHAR *nameBit;
|
WCHAR *nameBit;
|
||||||
DWORD result;
|
DWORD result;
|
||||||
|
@ -2346,7 +2342,7 @@ static WCHAR FILEDLG95_MRU_get_slot(LPCWSTR module_name, LPWSTR stored_path, PHK
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!strcmpiW(module_name, value_data)){
|
if(!wcsicmp(module_name, value_data)){
|
||||||
if(!hkey_ret)
|
if(!hkey_ret)
|
||||||
RegCloseKey(*hkey);
|
RegCloseKey(*hkey);
|
||||||
if(stored_path)
|
if(stored_path)
|
||||||
|
@ -2384,7 +2380,7 @@ static void FILEDLG95_MRU_save_filename(LPCWSTR filename)
|
||||||
WARN("GotModuleFileName failed: %d\n", GetLastError());
|
WARN("GotModuleFileName failed: %d\n", GetLastError());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
module_name = strrchrW(module_path, '\\');
|
module_name = wcsrchr(module_path, '\\');
|
||||||
if(!module_name)
|
if(!module_name)
|
||||||
module_name = module_path;
|
module_name = module_path;
|
||||||
else
|
else
|
||||||
|
@ -2400,7 +2396,7 @@ static void FILEDLG95_MRU_save_filename(LPCWSTR filename)
|
||||||
DWORD path_len, final_len;
|
DWORD path_len, final_len;
|
||||||
|
|
||||||
/* use only the path segment of `filename' */
|
/* use only the path segment of `filename' */
|
||||||
path_ends = strrchrW(filename, '\\');
|
path_ends = wcsrchr(filename, '\\');
|
||||||
path_len = path_ends - filename;
|
path_len = path_ends - filename;
|
||||||
|
|
||||||
final_len = path_len + lstrlenW(module_name) + 2;
|
final_len = path_len + lstrlenW(module_name) + 2;
|
||||||
|
@ -2472,7 +2468,7 @@ static void FILEDLG95_MRU_load_filename(LPWSTR stored_path)
|
||||||
WARN("GotModuleFileName failed: %d\n", GetLastError());
|
WARN("GotModuleFileName failed: %d\n", GetLastError());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
module_name = strrchrW(module_path, '\\');
|
module_name = wcsrchr(module_path, '\\');
|
||||||
if(!module_name)
|
if(!module_name)
|
||||||
module_name = module_path;
|
module_name = module_path;
|
||||||
else
|
else
|
||||||
|
@ -2482,6 +2478,7 @@ static void FILEDLG95_MRU_load_filename(LPWSTR stored_path)
|
||||||
TRACE("got MRU path: %s\n", wine_dbgstr_w(stored_path));
|
TRACE("got MRU path: %s\n", wine_dbgstr_w(stored_path));
|
||||||
}
|
}
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
|
|
||||||
static const WCHAR s_subkey[] =
|
static const WCHAR s_subkey[] =
|
||||||
{
|
{
|
||||||
'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
|
'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
|
||||||
|
@ -2699,7 +2696,8 @@ static void FILEDLG95_MRU_save_ext(LPCWSTR filename)
|
||||||
RegCloseKey(hOpenSaveMRT);
|
RegCloseKey(hOpenSaveMRT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#endif /* __REACTOS__ */
|
||||||
|
|
||||||
void FILEDLG95_OnOpenMessage(HWND hwnd, int idCaption, int idText)
|
void FILEDLG95_OnOpenMessage(HWND hwnd, int idCaption, int idText)
|
||||||
{
|
{
|
||||||
|
@ -2722,7 +2720,7 @@ int FILEDLG95_ValidatePathAction(LPWSTR lpstrPathAndFile, IShellFolder **ppsf,
|
||||||
static const WCHAR szwInvalid[] = { '/',':','<','>','|', 0};
|
static const WCHAR szwInvalid[] = { '/',':','<','>','|', 0};
|
||||||
|
|
||||||
/* check for invalid chars */
|
/* check for invalid chars */
|
||||||
if((strpbrkW(lpstrPathAndFile+3, szwInvalid) != NULL) && !(flags & OFN_NOVALIDATE))
|
if((wcspbrk(lpstrPathAndFile+3, szwInvalid) != NULL) && !(flags & OFN_NOVALIDATE))
|
||||||
{
|
{
|
||||||
FILEDLG95_OnOpenMessage(hwnd, IDS_INVALID_FILENAME_TITLE, IDS_INVALID_FILENAME);
|
FILEDLG95_OnOpenMessage(hwnd, IDS_INVALID_FILENAME_TITLE, IDS_INVALID_FILENAME);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -2751,7 +2749,7 @@ int FILEDLG95_ValidatePathAction(LPWSTR lpstrPathAndFile, IShellFolder **ppsf,
|
||||||
{
|
{
|
||||||
static const WCHAR wszWild[] = { '*', '?', 0 };
|
static const WCHAR wszWild[] = { '*', '?', 0 };
|
||||||
/* if the last element is a wildcard do a search */
|
/* if the last element is a wildcard do a search */
|
||||||
if(strpbrkW(lpszTemp1, wszWild) != NULL)
|
if(wcspbrk(lpszTemp1, wszWild) != NULL)
|
||||||
{
|
{
|
||||||
nOpenAction = ONOPEN_SEARCH;
|
nOpenAction = ONOPEN_SEARCH;
|
||||||
break;
|
break;
|
||||||
|
@ -2799,7 +2797,7 @@ int FILEDLG95_ValidatePathAction(LPWSTR lpstrPathAndFile, IShellFolder **ppsf,
|
||||||
else if (!(flags & OFN_NOVALIDATE))
|
else if (!(flags & OFN_NOVALIDATE))
|
||||||
{
|
{
|
||||||
if(*lpszTemp || /* points to trailing null for last path element */
|
if(*lpszTemp || /* points to trailing null for last path element */
|
||||||
(lpwstrTemp[strlenW(lpwstrTemp)-1] == '\\')) /* or if last element ends in '\' */
|
(lpwstrTemp[lstrlenW(lpwstrTemp)-1] == '\\')) /* or if last element ends in '\' */
|
||||||
{
|
{
|
||||||
if(flags & OFN_PATHMUSTEXIST)
|
if(flags & OFN_PATHMUSTEXIST)
|
||||||
{
|
{
|
||||||
|
@ -3080,7 +3078,7 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
|
||||||
|
|
||||||
/* update dialog data */
|
/* update dialog data */
|
||||||
SetWindowTextW(fodInfos->DlgInfos.hwndFileName, PathFindFileNameW(lpstrPathAndFile));
|
SetWindowTextW(fodInfos->DlgInfos.hwndFileName, PathFindFileNameW(lpstrPathAndFile));
|
||||||
#else
|
#else /* __REACTOS__ */
|
||||||
if (! *ext && fodInfos->defext)
|
if (! *ext && fodInfos->defext)
|
||||||
{
|
{
|
||||||
/* if no extension is specified with file name, then */
|
/* if no extension is specified with file name, then */
|
||||||
|
@ -3099,12 +3097,12 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
|
||||||
{
|
{
|
||||||
WCHAR* filterSearchIndex;
|
WCHAR* filterSearchIndex;
|
||||||
filterExt = heap_alloc((lstrlenW(lpstrFilter) + 1) * sizeof(WCHAR));
|
filterExt = heap_alloc((lstrlenW(lpstrFilter) + 1) * sizeof(WCHAR));
|
||||||
strcpyW(filterExt, lpstrFilter);
|
lstrcpyW(filterExt, lpstrFilter);
|
||||||
|
|
||||||
/* if a semicolon-separated list of file extensions was given, do not include the
|
/* if a semicolon-separated list of file extensions was given, do not include the
|
||||||
semicolon or anything after it in the extension.
|
semicolon or anything after it in the extension.
|
||||||
example: if filterExt was "*.abc;*.def", it will become "*.abc" */
|
example: if filterExt was "*.abc;*.def", it will become "*.abc" */
|
||||||
filterSearchIndex = strchrW(filterExt, ';');
|
filterSearchIndex = wcschr(filterExt, ';');
|
||||||
if (filterSearchIndex)
|
if (filterSearchIndex)
|
||||||
{
|
{
|
||||||
filterSearchIndex[0] = '\0';
|
filterSearchIndex[0] = '\0';
|
||||||
|
@ -3113,10 +3111,10 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
|
||||||
/* find the file extension by searching for the first dot in filterExt */
|
/* 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 = strchrW(filterExt, '.');
|
filterSearchIndex = wcschr(filterExt, '.');
|
||||||
if (filterSearchIndex++ && !strchrW(filterSearchIndex, '*') && !strchrW(filterSearchIndex, '?'))
|
if (filterSearchIndex++ && !wcschr(filterSearchIndex, '*') && !wcschr(filterSearchIndex, '?'))
|
||||||
{
|
{
|
||||||
strcpyW(filterExt, filterSearchIndex);
|
lstrcpyW(filterExt, filterSearchIndex);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3129,7 +3127,7 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
|
||||||
{
|
{
|
||||||
/* use the default file extension */
|
/* use the default file extension */
|
||||||
filterExt = heap_alloc((lstrlenW(fodInfos->defext) + 1) * sizeof(WCHAR));
|
filterExt = heap_alloc((lstrlenW(fodInfos->defext) + 1) * sizeof(WCHAR));
|
||||||
strcpyW(filterExt, fodInfos->defext);
|
lstrcpyW(filterExt, fodInfos->defext);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*filterExt) /* ignore filterExt="" */
|
if (*filterExt) /* ignore filterExt="" */
|
||||||
|
@ -3154,7 +3152,7 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
|
||||||
else
|
else
|
||||||
fodInfos->ofnInfos->Flags |= OFN_EXTENSIONDIFFERENT;
|
fodInfos->ofnInfos->Flags |= OFN_EXTENSIONDIFFERENT;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* __REACTOS__ */
|
||||||
|
|
||||||
/* In Save dialog: check if the file already exists */
|
/* In Save dialog: check if the file already exists */
|
||||||
if (fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG
|
if (fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG
|
||||||
|
@ -4695,7 +4693,7 @@ short WINAPI GetFileTitleW(LPCWSTR lpFile, LPWSTR lpTitle, WORD cbBuf)
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if(strpbrkW(lpFile, brkpoint))
|
if(wcspbrk(lpFile, brkpoint))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
len--;
|
len--;
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include "winnls.h"
|
#include "winnls.h"
|
||||||
#include "wingdi.h"
|
#include "wingdi.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "wine/unicode.h"
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/heap.h"
|
#include "wine/heap.h"
|
||||||
#include "winreg.h"
|
#include "winreg.h"
|
||||||
|
@ -107,13 +106,13 @@ static void FD31_StripEditControl(HWND hwnd)
|
||||||
WCHAR temp[BUFFILE], *cp;
|
WCHAR temp[BUFFILE], *cp;
|
||||||
|
|
||||||
GetDlgItemTextW( hwnd, edt1, temp, ARRAY_SIZE(temp));
|
GetDlgItemTextW( hwnd, edt1, temp, ARRAY_SIZE(temp));
|
||||||
cp = strrchrW(temp, '\\');
|
cp = wcsrchr(temp, '\\');
|
||||||
if (cp != NULL) {
|
if (cp != NULL) {
|
||||||
strcpyW(temp, cp+1);
|
lstrcpyW(temp, cp+1);
|
||||||
}
|
}
|
||||||
cp = strrchrW(temp, ':');
|
cp = wcsrchr(temp, ':');
|
||||||
if (cp != NULL) {
|
if (cp != NULL) {
|
||||||
strcpyW(temp, cp+1);
|
lstrcpyW(temp, cp+1);
|
||||||
}
|
}
|
||||||
/* FIXME: shouldn't we do something with the result here? ;-) */
|
/* FIXME: shouldn't we do something with the result here? ;-) */
|
||||||
}
|
}
|
||||||
|
@ -200,7 +199,7 @@ static BOOL FD31_ScanDir(const OPENFILENAMEW *ofn, HWND hWnd, LPCWSTR newPath)
|
||||||
TRACE("Using filter %s\n", debugstr_w(filter));
|
TRACE("Using filter %s\n", debugstr_w(filter));
|
||||||
SendMessageW(hdlg, LB_RESETCONTENT, 0, 0);
|
SendMessageW(hdlg, LB_RESETCONTENT, 0, 0);
|
||||||
while (filter) {
|
while (filter) {
|
||||||
scptr = strchrW(filter, ';');
|
scptr = wcschr(filter, ';');
|
||||||
if (scptr) *scptr = 0;
|
if (scptr) *scptr = 0;
|
||||||
while (*filter == ' ') filter++;
|
while (*filter == ' ') filter++;
|
||||||
TRACE("Using file spec %s\n", debugstr_w(filter));
|
TRACE("Using file spec %s\n", debugstr_w(filter));
|
||||||
|
@ -211,7 +210,7 @@ static BOOL FD31_ScanDir(const OPENFILENAMEW *ofn, HWND hWnd, LPCWSTR newPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* list of directories */
|
/* list of directories */
|
||||||
strcpyW(buffer, FILE_star);
|
lstrcpyW(buffer, FILE_star);
|
||||||
|
|
||||||
if (GetDlgItem(hWnd, lst2) != 0) {
|
if (GetDlgItem(hWnd, lst2) != 0) {
|
||||||
lRet = DlgDirListW(hWnd, buffer, lst2, stc1, DDL_EXCLUSIVE | DDL_DIRECTORY);
|
lRet = DlgDirListW(hWnd, buffer, lst2, stc1, DDL_EXCLUSIVE | DDL_DIRECTORY);
|
||||||
|
@ -342,7 +341,7 @@ static void FD31_UpdateResult(const FD31_DATA *lfs, const WCHAR *tmpstr)
|
||||||
tmpstr2[0] = '\0';
|
tmpstr2[0] = '\0';
|
||||||
else
|
else
|
||||||
GetCurrentDirectoryW(BUFFILE, tmpstr2);
|
GetCurrentDirectoryW(BUFFILE, tmpstr2);
|
||||||
lenstr2 = strlenW(tmpstr2);
|
lenstr2 = lstrlenW(tmpstr2);
|
||||||
if (lenstr2 > 3)
|
if (lenstr2 > 3)
|
||||||
tmpstr2[lenstr2++]='\\';
|
tmpstr2[lenstr2++]='\\';
|
||||||
lstrcpynW(tmpstr2+lenstr2, tmpstr, BUFFILE-lenstr2);
|
lstrcpynW(tmpstr2+lenstr2, tmpstr, BUFFILE-lenstr2);
|
||||||
|
@ -422,15 +421,15 @@ static LRESULT FD31_DirListDblClick( const FD31_DATA *lfs )
|
||||||
pstr = heap_alloc(BUFFILEALLOC);
|
pstr = heap_alloc(BUFFILEALLOC);
|
||||||
SendDlgItemMessageW(hWnd, lst2, LB_GETTEXT, lRet,
|
SendDlgItemMessageW(hWnd, lst2, LB_GETTEXT, lRet,
|
||||||
(LPARAM)pstr);
|
(LPARAM)pstr);
|
||||||
strcpyW( tmpstr, pstr );
|
lstrcpyW( tmpstr, pstr );
|
||||||
heap_free(pstr);
|
heap_free(pstr);
|
||||||
/* get the selected directory in tmpstr */
|
/* get the selected directory in tmpstr */
|
||||||
if (tmpstr[0] == '[')
|
if (tmpstr[0] == '[')
|
||||||
{
|
{
|
||||||
tmpstr[lstrlenW(tmpstr) - 1] = 0;
|
tmpstr[lstrlenW(tmpstr) - 1] = 0;
|
||||||
strcpyW(tmpstr,tmpstr+1);
|
lstrcpyW(tmpstr,tmpstr+1);
|
||||||
}
|
}
|
||||||
strcatW(tmpstr, FILE_bslash);
|
lstrcatW(tmpstr, FILE_bslash);
|
||||||
|
|
||||||
FD31_ScanDir(lfs->ofnW, hWnd, tmpstr);
|
FD31_ScanDir(lfs->ofnW, hWnd, tmpstr);
|
||||||
/* notify the app */
|
/* notify the app */
|
||||||
|
@ -486,11 +485,11 @@ static LRESULT FD31_TestPath( const FD31_DATA *lfs, LPWSTR path )
|
||||||
LPWSTR pBeginFileName, pstr2;
|
LPWSTR pBeginFileName, pstr2;
|
||||||
WCHAR tmpstr2[BUFFILE];
|
WCHAR tmpstr2[BUFFILE];
|
||||||
|
|
||||||
pBeginFileName = strrchrW(path, '\\');
|
pBeginFileName = wcsrchr(path, '\\');
|
||||||
if (pBeginFileName == NULL)
|
if (pBeginFileName == NULL)
|
||||||
pBeginFileName = strrchrW(path, ':');
|
pBeginFileName = wcsrchr(path, ':');
|
||||||
|
|
||||||
if (strchrW(path,'*') != NULL || strchrW(path,'?') != NULL)
|
if (wcschr(path,'*') != NULL || wcschr(path,'?') != NULL)
|
||||||
{
|
{
|
||||||
/* edit control contains wildcards */
|
/* edit control contains wildcards */
|
||||||
if (pBeginFileName != NULL)
|
if (pBeginFileName != NULL)
|
||||||
|
@ -500,7 +499,7 @@ static LRESULT FD31_TestPath( const FD31_DATA *lfs, LPWSTR path )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcpyW(tmpstr2, path);
|
lstrcpyW(tmpstr2, path);
|
||||||
if(!(lfs->ofnW->Flags & OFN_NOVALIDATE))
|
if(!(lfs->ofnW->Flags & OFN_NOVALIDATE))
|
||||||
*path = 0;
|
*path = 0;
|
||||||
}
|
}
|
||||||
|
@ -516,7 +515,7 @@ static LRESULT FD31_TestPath( const FD31_DATA *lfs, LPWSTR path )
|
||||||
|
|
||||||
pstr2 = path + lstrlenW(path);
|
pstr2 = path + lstrlenW(path);
|
||||||
if (pBeginFileName == NULL || *(pBeginFileName + 1) != 0)
|
if (pBeginFileName == NULL || *(pBeginFileName + 1) != 0)
|
||||||
strcatW(path, FILE_bslash);
|
lstrcatW(path, FILE_bslash);
|
||||||
|
|
||||||
/* if ScanDir succeeds, we have changed the directory */
|
/* if ScanDir succeeds, we have changed the directory */
|
||||||
if (FD31_ScanDir(lfs->ofnW, hWnd, path))
|
if (FD31_ScanDir(lfs->ofnW, hWnd, path))
|
||||||
|
@ -538,7 +537,7 @@ static LRESULT FD31_TestPath( const FD31_DATA *lfs, LPWSTR path )
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
strcpyW(path, tmpstr2);
|
lstrcpyW(path, tmpstr2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
SetDlgItemTextW( hWnd, edt1, path );
|
SetDlgItemTextW( hWnd, edt1, path );
|
||||||
|
@ -602,7 +601,7 @@ static LRESULT FD31_Validate( const FD31_DATA *lfs, LPCWSTR path, UINT control,
|
||||||
if (ofnW->lpstrFile)
|
if (ofnW->lpstrFile)
|
||||||
{
|
{
|
||||||
LPWSTR str = ofnW->lpstrFile;
|
LPWSTR str = ofnW->lpstrFile;
|
||||||
LPWSTR ptr = strrchrW(str, '\\');
|
LPWSTR ptr = wcsrchr(str, '\\');
|
||||||
str[lstrlenW(str) + 1] = '\0';
|
str[lstrlenW(str) + 1] = '\0';
|
||||||
*ptr = 0;
|
*ptr = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include "dlgs.h"
|
#include "dlgs.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/heap.h"
|
#include "wine/heap.h"
|
||||||
#include "wine/unicode.h"
|
|
||||||
#include "cderr.h"
|
#include "cderr.h"
|
||||||
#include "cdlg.h"
|
#include "cdlg.h"
|
||||||
|
|
||||||
|
@ -423,7 +422,7 @@ static BOOL AddFontSizeToCombo3(HWND hwnd, UINT h, const CHOOSEFONTW *lpcf)
|
||||||
if ( (!(lpcf->Flags & CF_LIMITSIZE)) ||
|
if ( (!(lpcf->Flags & CF_LIMITSIZE)) ||
|
||||||
((lpcf->Flags & CF_LIMITSIZE) && (h >= lpcf->nSizeMin) && (h <= lpcf->nSizeMax)))
|
((lpcf->Flags & CF_LIMITSIZE) && (h >= lpcf->nSizeMin) && (h <= lpcf->nSizeMax)))
|
||||||
{
|
{
|
||||||
sprintfW(buffer, fontsizefmtW, h);
|
swprintf(buffer, fontsizefmtW, h);
|
||||||
j=SendMessageW(hwnd, CB_FINDSTRINGEXACT, -1, (LPARAM)buffer);
|
j=SendMessageW(hwnd, CB_FINDSTRINGEXACT, -1, (LPARAM)buffer);
|
||||||
if (j==CB_ERR)
|
if (j==CB_ERR)
|
||||||
{
|
{
|
||||||
|
@ -905,7 +904,7 @@ static INT get_dialog_font_point_size(HWND hDlg, CHOOSEFONTW *cf)
|
||||||
WCHAR buffW[8], *endptrW;
|
WCHAR buffW[8], *endptrW;
|
||||||
|
|
||||||
GetDlgItemTextW(hDlg, cmb3, buffW, ARRAY_SIZE(buffW));
|
GetDlgItemTextW(hDlg, cmb3, buffW, ARRAY_SIZE(buffW));
|
||||||
size = strtolW(buffW, &endptrW, 10);
|
size = wcstol(buffW, &endptrW, 10);
|
||||||
invalid_size = size == 0 && *endptrW;
|
invalid_size = size == 0 && *endptrW;
|
||||||
|
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
|
|
|
@ -1286,7 +1286,7 @@ static UINT ctrl_container_resize(FileDialogImpl *This, UINT container_width)
|
||||||
|
|
||||||
/* Move the controls to their final destination
|
/* Move the controls to their final destination
|
||||||
*/
|
*/
|
||||||
cur_col_pos = 0, cur_row_pos = 0;
|
cur_col_pos = 0; cur_row_pos = 0;
|
||||||
LIST_FOR_EACH_ENTRY(ctrl, &This->cctrls, customctrl, entry)
|
LIST_FOR_EACH_ENTRY(ctrl, &This->cctrls, customctrl, entry)
|
||||||
{
|
{
|
||||||
if(ctrl->cdcstate & CDCS_VISIBLE)
|
if(ctrl->cdcstate & CDCS_VISIBLE)
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#include "objbase.h"
|
#include "objbase.h"
|
||||||
#include "commdlg.h"
|
#include "commdlg.h"
|
||||||
|
|
||||||
#include "wine/unicode.h"
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
#include "dlgs.h"
|
#include "dlgs.h"
|
||||||
|
@ -157,7 +156,7 @@ static LPWSTR strdupW(LPCWSTR p)
|
||||||
DWORD len;
|
DWORD len;
|
||||||
|
|
||||||
if(!p) return NULL;
|
if(!p) return NULL;
|
||||||
len = (strlenW(p) + 1) * sizeof(WCHAR);
|
len = (lstrlenW(p) + 1) * sizeof(WCHAR);
|
||||||
ret = HeapAlloc(GetProcessHeap(), 0, len);
|
ret = HeapAlloc(GetProcessHeap(), 0, len);
|
||||||
memcpy(ret, p, len);
|
memcpy(ret, p, len);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -527,7 +526,7 @@ static BOOL PRINTDLG_CreateDevNamesW(HGLOBAL *hmem, LPCWSTR DeviceDriverName,
|
||||||
DWORD dwBufLen = ARRAY_SIZE(bufW);
|
DWORD dwBufLen = ARRAY_SIZE(bufW);
|
||||||
const WCHAR *p;
|
const WCHAR *p;
|
||||||
|
|
||||||
p = strrchrW( DeviceDriverName, '\\' );
|
p = wcsrchr( DeviceDriverName, '\\' );
|
||||||
if (p) DeviceDriverName = p + 1;
|
if (p) DeviceDriverName = p + 1;
|
||||||
|
|
||||||
size = sizeof(WCHAR)*lstrlenW(DeviceDriverName) + 2
|
size = sizeof(WCHAR)*lstrlenW(DeviceDriverName) + 2
|
||||||
|
@ -2818,9 +2817,9 @@ static void pagesetup_set_devnames(pagesetup_data *data, LPCWSTR drv, LPCWSTR de
|
||||||
|
|
||||||
if(data->unicode)
|
if(data->unicode)
|
||||||
{
|
{
|
||||||
drv_len = (strlenW(drv) + 1) * sizeof(WCHAR);
|
drv_len = (lstrlenW(drv) + 1) * sizeof(WCHAR);
|
||||||
dev_len = (strlenW(devname) + 1) * sizeof(WCHAR);
|
dev_len = (lstrlenW(devname) + 1) * sizeof(WCHAR);
|
||||||
port_len = (strlenW(port) + 1) * sizeof(WCHAR);
|
port_len = (lstrlenW(port) + 1) * sizeof(WCHAR);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2842,15 +2841,15 @@ static void pagesetup_set_devnames(pagesetup_data *data, LPCWSTR drv, LPCWSTR de
|
||||||
WCHAR *ptr = (WCHAR *)(dn + 1);
|
WCHAR *ptr = (WCHAR *)(dn + 1);
|
||||||
len = sizeof(DEVNAMES) / sizeof(WCHAR);
|
len = sizeof(DEVNAMES) / sizeof(WCHAR);
|
||||||
dn->wDriverOffset = len;
|
dn->wDriverOffset = len;
|
||||||
strcpyW(ptr, drv);
|
lstrcpyW(ptr, drv);
|
||||||
ptr += drv_len / sizeof(WCHAR);
|
ptr += drv_len / sizeof(WCHAR);
|
||||||
len += drv_len / sizeof(WCHAR);
|
len += drv_len / sizeof(WCHAR);
|
||||||
dn->wDeviceOffset = len;
|
dn->wDeviceOffset = len;
|
||||||
strcpyW(ptr, devname);
|
lstrcpyW(ptr, devname);
|
||||||
ptr += dev_len / sizeof(WCHAR);
|
ptr += dev_len / sizeof(WCHAR);
|
||||||
len += dev_len / sizeof(WCHAR);
|
len += dev_len / sizeof(WCHAR);
|
||||||
dn->wOutputOffset = len;
|
dn->wOutputOffset = len;
|
||||||
strcpyW(ptr, port);
|
lstrcpyW(ptr, port);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3248,7 +3247,7 @@ static void margin_edit_notification(HWND hDlg, const pagesetup_data *data, WORD
|
||||||
WCHAR *end;
|
WCHAR *end;
|
||||||
WCHAR decimal = get_decimal_sep();
|
WCHAR decimal = get_decimal_sep();
|
||||||
|
|
||||||
val = strtolW(buf, &end, 10);
|
val = wcstol(buf, &end, 10);
|
||||||
if(end != buf || *end == decimal)
|
if(end != buf || *end == decimal)
|
||||||
{
|
{
|
||||||
int mult = is_metric(data) ? 100 : 1000;
|
int mult = is_metric(data) ? 100 : 1000;
|
||||||
|
@ -3259,7 +3258,7 @@ static void margin_edit_notification(HWND hDlg, const pagesetup_data *data, WORD
|
||||||
{
|
{
|
||||||
end++;
|
end++;
|
||||||
mult /= 10;
|
mult /= 10;
|
||||||
if(isdigitW(*end))
|
if(iswdigit(*end))
|
||||||
val += (*end - '0') * mult;
|
val += (*end - '0') * mult;
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
@ -3640,7 +3639,7 @@ static LRESULT CALLBACK pagesetup_margin_editproc(HWND hwnd, UINT msg, WPARAM wp
|
||||||
{
|
{
|
||||||
WCHAR decimal = get_decimal_sep();
|
WCHAR decimal = get_decimal_sep();
|
||||||
WCHAR wc = (WCHAR)wparam;
|
WCHAR wc = (WCHAR)wparam;
|
||||||
if(!isdigitW(wc) && wc != decimal && wc != VK_BACK) return 0;
|
if(!iswdigit(wc) && wc != decimal && wc != VK_BACK) return 0;
|
||||||
}
|
}
|
||||||
return CallWindowProcW(edit_wndproc, hwnd, msg, wparam, lparam);
|
return CallWindowProcW(edit_wndproc, hwnd, msg, wparam, lparam);
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ dll/win32/cabinet # Synced to WineStaging-4.18
|
||||||
dll/win32/clusapi # Synced to WineStaging-3.3
|
dll/win32/clusapi # Synced to WineStaging-3.3
|
||||||
dll/win32/comcat # Synced to WineStaging-3.3
|
dll/win32/comcat # Synced to WineStaging-3.3
|
||||||
dll/win32/comctl32 # Synced to WineStaging-3.3
|
dll/win32/comctl32 # Synced to WineStaging-3.3
|
||||||
dll/win32/comdlg32 # Synced to WineStaging-4.0
|
dll/win32/comdlg32 # Synced to WineStaging-4.18
|
||||||
dll/win32/compstui # Synced to WineStaging-3.3
|
dll/win32/compstui # Synced to WineStaging-3.3
|
||||||
dll/win32/credui # Synced to WineStaging-4.0
|
dll/win32/credui # Synced to WineStaging-4.0
|
||||||
dll/win32/crypt32 # Synced to WineStaging-4.0
|
dll/win32/crypt32 # Synced to WineStaging-4.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue