building on 10.5
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
86e73b4397
commit
95cb88191c
@ -585,20 +585,22 @@ int wxFileDialog::ShowModal()
|
|||||||
[oPanel setMessage:cf.AsNSString()];
|
[oPanel setMessage:cf.AsNSString()];
|
||||||
[oPanel setAllowsMultipleSelection: (HasFlag(wxFD_MULTIPLE) ? YES : NO )];
|
[oPanel setAllowsMultipleSelection: (HasFlag(wxFD_MULTIPLE) ? YES : NO )];
|
||||||
|
|
||||||
if ( UMAGetSystemVersion() < 0x1060 )
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
|
||||||
{
|
if ( UMAGetSystemVersion() >= 0x1060 )
|
||||||
returnCode = [oPanel runModalForDirectory:m_dir.IsEmpty() ? nil : dir.AsNSString()
|
|
||||||
file:file.AsNSString() types:(m_delegate == nil ? types : nil)];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
[oPanel setAllowedFileTypes: (m_delegate == nil ? types : nil)];
|
[oPanel setAllowedFileTypes: (m_delegate == nil ? types : nil)];
|
||||||
if ( !m_dir.IsEmpty() )
|
if ( !m_dir.IsEmpty() )
|
||||||
[oPanel setDirectoryURL:[NSURL fileURLWithPath:dir.AsNSString()
|
[oPanel setDirectoryURL:[NSURL fileURLWithPath:dir.AsNSString()
|
||||||
isDirectory:YES]];
|
isDirectory:YES]];
|
||||||
returnCode = [oPanel runModal];
|
returnCode = [oPanel runModal];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
returnCode = [oPanel runModalForDirectory:m_dir.IsEmpty() ? nil : dir.AsNSString()
|
||||||
|
file:file.AsNSString() types:(m_delegate == nil ? types : nil)];
|
||||||
|
}
|
||||||
|
|
||||||
ModalFinishedCallback(oPanel, returnCode);
|
ModalFinishedCallback(oPanel, returnCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user