mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 16:10:37 +00:00
[NSSavePanel -runModalForDirectory:file:]
[NSOpenPanel -runModalForDirectory:file:types:] Moved functionality from NSOpenPanel to NSSavePanel: the "ok" button is shown as enabled or not at the beginning depending on whether the given file is valid. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10702 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
71cc8b1587
commit
e165ba44af
2 changed files with 4 additions and 8 deletions
|
@ -359,14 +359,6 @@ static NSOpenPanel *_gs_gui_open_panel = nil;
|
|||
|
||||
if (_canChooseDirectories == NO)
|
||||
{
|
||||
BOOL isDir;
|
||||
NSString *file = [path stringByAppendingPathComponent: name];
|
||||
|
||||
if (([[NSFileManager defaultManager] fileExistsAtPath: file
|
||||
isDirectory: &isDir] == NO)
|
||||
|| isDir)
|
||||
[_okButton setEnabled: NO];
|
||||
|
||||
if([_browser allowsMultipleSelection] == YES)
|
||||
[_browser setAllowsBranchSelection:NO];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue