mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 16:20:46 +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
|
@ -1,3 +1,9 @@
|
|||
2005-07-09 Adrian Robert <arobert@cogsci.ucsd.edu>
|
||||
|
||||
* Source/NSSavePanel.m (-ok:): Set _fullFileName before invoking
|
||||
delegate -panel:userEnteredFilename:confirmed: so it is given the
|
||||
current filename to process.
|
||||
|
||||
2005-07-09 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSGraphicsContext.h,
|
||||
|
|
|
@ -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…
Reference in a new issue