Fixed handling of filedlg flags.

This commit is contained in:
Juergen Schmied 2000-02-25 20:36:42 +00:00 committed by Alexandre Julliard
parent 296186a85f
commit 4dc586108e
1 changed files with 56 additions and 4 deletions

View File

@ -1373,7 +1373,20 @@ static BOOL Commdlg_GetFileNameW( BOOL16 (CALLBACK *dofunction)(SEGPTR x),
BOOL WINAPI GetOpenFileNameA( BOOL WINAPI GetOpenFileNameA(
LPOPENFILENAMEA ofn) /* address of init structure */ LPOPENFILENAMEA ofn) /* address of init structure */
{ {
if(TWEAK_WineLook>WIN31_LOOK) BOOL newlook;
/* some flags don't allow to match the TWEAK_WineLook */
if (ofn->Flags & (OFN_ALLOWMULTISELECT|OFN_ENABLEHOOK|OFN_ENABLETEMPLATE))
{
newlook = (ofn->Flags & OFN_EXPLORER) ? TRUE : FALSE;
}
else
{
/* no special flags set, we can match the TWEAK_WineLook */
newlook = (TWEAK_WineLook>WIN31_LOOK) ? TRUE : FALSE;
}
if (newlook)
{ {
return GetFileDialog95A(ofn, OPEN_DIALOG); return GetFileDialog95A(ofn, OPEN_DIALOG);
} }
@ -1397,7 +1410,20 @@ BOOL WINAPI GetOpenFileNameA(
BOOL WINAPI GetOpenFileNameW( BOOL WINAPI GetOpenFileNameW(
LPOPENFILENAMEW ofn) /* address of init structure */ LPOPENFILENAMEW ofn) /* address of init structure */
{ {
if(TWEAK_WineLook>WIN31_LOOK) BOOL newlook;
/* some flags don't allow to match the TWEAK_WineLook */
if (ofn->Flags & (OFN_ALLOWMULTISELECT|OFN_ENABLEHOOK|OFN_ENABLETEMPLATE))
{
newlook = (ofn->Flags & OFN_EXPLORER) ? TRUE : FALSE;
}
else
{
/* no special flags set, we can match the TWEAK_WineLook */
newlook = (TWEAK_WineLook>WIN31_LOOK) ? TRUE : FALSE;
}
if (newlook)
{ {
return GetFileDialog95W(ofn, OPEN_DIALOG); return GetFileDialog95W(ofn, OPEN_DIALOG);
} }
@ -1421,7 +1447,20 @@ BOOL WINAPI GetOpenFileNameW(
BOOL WINAPI GetSaveFileNameA( BOOL WINAPI GetSaveFileNameA(
LPOPENFILENAMEA ofn) /* address of init structure */ LPOPENFILENAMEA ofn) /* address of init structure */
{ {
if(TWEAK_WineLook>WIN31_LOOK) BOOL newlook;
/* some flags don't allow to match the TWEAK_WineLook */
if (ofn->Flags & (OFN_ALLOWMULTISELECT|OFN_ENABLEHOOK|OFN_ENABLETEMPLATE))
{
newlook = (ofn->Flags & OFN_EXPLORER) ? TRUE : FALSE;
}
else
{
/* no special flags set, we can match the TWEAK_WineLook */
newlook = (TWEAK_WineLook>WIN31_LOOK) ? TRUE : FALSE;
}
if (newlook)
{ {
return GetFileDialog95A(ofn, SAVE_DIALOG); return GetFileDialog95A(ofn, SAVE_DIALOG);
} }
@ -1445,7 +1484,20 @@ BOOL WINAPI GetSaveFileNameA(
BOOL WINAPI GetSaveFileNameW( BOOL WINAPI GetSaveFileNameW(
LPOPENFILENAMEW ofn) /* address of init structure */ LPOPENFILENAMEW ofn) /* address of init structure */
{ {
if( TWEAK_WineLook>WIN31_LOOK) BOOL newlook;
/* some flags don't allow to match the TWEAK_WineLook */
if (ofn->Flags & (OFN_ALLOWMULTISELECT|OFN_ENABLEHOOK|OFN_ENABLETEMPLATE))
{
newlook = (ofn->Flags & OFN_EXPLORER) ? TRUE : FALSE;
}
else
{
/* no special flags set, we can match the TWEAK_WineLook */
newlook = (TWEAK_WineLook>WIN31_LOOK) ? TRUE : FALSE;
}
if (newlook)
{ {
return GetFileDialog95W(ofn, SAVE_DIALOG); return GetFileDialog95W(ofn, SAVE_DIALOG);
} }