conforming to deprecation recommendation for 10.6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -200,8 +200,7 @@ void wxFileDialog::ShowWindowModal()
|
|||||||
[oPanel setResolvesAliases:YES];
|
[oPanel setResolvesAliases:YES];
|
||||||
[oPanel setCanChooseFiles:YES];
|
[oPanel setCanChooseFiles:YES];
|
||||||
[oPanel setMessage:cf.AsNSString()];
|
[oPanel setMessage:cf.AsNSString()];
|
||||||
if ( HasFlag(wxFD_MULTIPLE) )
|
[oPanel setAllowsMultipleSelection: (HasFlag(wxFD_MULTIPLE) ? YES : NO )];
|
||||||
[oPanel setAllowsMultipleSelection:YES];
|
|
||||||
|
|
||||||
NSWindow* nativeParent = parentWindow->GetWXWindow();
|
NSWindow* nativeParent = parentWindow->GetWXWindow();
|
||||||
ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init];
|
ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init];
|
||||||
@@ -298,11 +297,20 @@ int wxFileDialog::ShowModal()
|
|||||||
[oPanel setResolvesAliases:YES];
|
[oPanel setResolvesAliases:YES];
|
||||||
[oPanel setCanChooseFiles:YES];
|
[oPanel setCanChooseFiles:YES];
|
||||||
[oPanel setMessage:cf.AsNSString()];
|
[oPanel setMessage:cf.AsNSString()];
|
||||||
if ( HasFlag(wxFD_MULTIPLE) )
|
[oPanel setAllowsMultipleSelection: (HasFlag(wxFD_MULTIPLE) ? YES : NO )];
|
||||||
[oPanel setAllowsMultipleSelection:YES];
|
|
||||||
|
|
||||||
returnCode = [oPanel runModalForDirectory:dir.AsNSString()
|
if ( UMAGetSystemVersion() < 0x1060 )
|
||||||
|
{
|
||||||
|
returnCode = [oPanel runModalForDirectory:dir.AsNSString()
|
||||||
file:file.AsNSString() types:types];
|
file:file.AsNSString() types:types];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[oPanel setAllowedFileTypes:types];
|
||||||
|
[oPanel setDirectoryURL:[NSURL fileURLWithPath:dir.AsNSString()
|
||||||
|
isDirectory:YES]];
|
||||||
|
returnCode = [oPanel runModal];
|
||||||
|
}
|
||||||
|
|
||||||
ModalFinishedCallback(oPanel, returnCode);
|
ModalFinishedCallback(oPanel, returnCode);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user