Implement support for wxFD_NO_FOLLOW in wxMac
Disable aliases resolving in standard file dialogs if this flag is specified. Closes https://github.com/wxWidgets/wxWidgets/pull/1479
This commit is contained in:
committed by
Vadim Zeitlin
parent
0861f6504b
commit
78c3ef2ebb
@@ -124,7 +124,8 @@ const char wxFileSelectorDefaultWildcardStr[];
|
||||
@style{wxFD_NO_FOLLOW}
|
||||
Directs the dialog to return the path and file name of the selected
|
||||
shortcut file, not its target as it does by default. Currently this
|
||||
flag is only implemented in wxMSW and the non-dereferenced link path
|
||||
flag is only implemented in wxMSW and wxOSX (where it prevents
|
||||
aliases from being resolved). The non-dereferenced link path
|
||||
is always returned, even without this flag, under Unix and so using
|
||||
it there doesn't do anything. This flag was added in wxWidgets
|
||||
3.1.0.
|
||||
|
@@ -350,7 +350,7 @@ void wxFileDialog::ShowWindowModal()
|
||||
|
||||
[oPanel setTreatsFilePackagesAsDirectories:NO];
|
||||
[oPanel setCanChooseDirectories:NO];
|
||||
[oPanel setResolvesAliases:YES];
|
||||
[oPanel setResolvesAliases:HasFlag(wxFD_NO_FOLLOW) ? NO : YES];
|
||||
[oPanel setCanChooseFiles:YES];
|
||||
[oPanel setMessage:cf.AsNSString()];
|
||||
[oPanel setAllowsMultipleSelection: (HasFlag(wxFD_MULTIPLE) ? YES : NO )];
|
||||
@@ -608,7 +608,7 @@ int wxFileDialog::ShowModal()
|
||||
|
||||
[oPanel setTreatsFilePackagesAsDirectories:NO];
|
||||
[oPanel setCanChooseDirectories:NO];
|
||||
[oPanel setResolvesAliases:YES];
|
||||
[oPanel setResolvesAliases:HasFlag(wxFD_NO_FOLLOW) ? NO : YES];
|
||||
[oPanel setCanChooseFiles:YES];
|
||||
[oPanel setMessage:cf.AsNSString()];
|
||||
[oPanel setAllowsMultipleSelection: (HasFlag(wxFD_MULTIPLE) ? YES : NO )];
|
||||
|
Reference in New Issue
Block a user