mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 20:17:38 +00:00
In NSSavePanel-ok:, determine user-entered filename before passing it to delegate filter userEnteredFilename.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21442 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d54180c5bb
commit
4dcb44655a
2 changed files with 18 additions and 12 deletions
|
@ -1071,6 +1071,18 @@ selectCellWithString: (NSString*)title
|
|||
return;
|
||||
}
|
||||
|
||||
ASSIGN (_directory, [_browser pathToColumn:[_browser lastColumn]]);
|
||||
filename = [[_form cellAtIndex: 0] stringValue];
|
||||
if ([filename isAbsolutePath] == YES)
|
||||
{
|
||||
ASSIGN (_fullFileName, filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSIGN (_fullFileName, [_directory stringByAppendingPathComponent:
|
||||
filename]);
|
||||
}
|
||||
|
||||
if (_delegateHasUserEnteredFilename)
|
||||
{
|
||||
filename = [_delegate panel: self
|
||||
|
@ -1093,18 +1105,6 @@ selectCellWithString: (NSString*)title
|
|||
}
|
||||
}
|
||||
|
||||
ASSIGN (_directory, [_browser pathToColumn:[_browser lastColumn]]);
|
||||
filename = [[_form cellAtIndex: 0] stringValue];
|
||||
if ([filename isAbsolutePath] == YES)
|
||||
{
|
||||
ASSIGN (_fullFileName, filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSIGN (_fullFileName, [_directory stringByAppendingPathComponent:
|
||||
filename]);
|
||||
}
|
||||
|
||||
filename = [_fullFileName stringByDeletingLastPathComponent];
|
||||
if ([_fm fileExistsAtPath: filename isDirectory: &isDir] == NO)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue