Fix problems where the string value of a text field control might not

be updated while its cell is edited and where the save panel's text
form ignores the file name passed to -runModalForDirectory:file:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27059 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
wlux 2008-11-14 23:12:33 +00:00
parent 9609741ebf
commit 93746ed9be
4 changed files with 29 additions and 1 deletions

View file

@ -965,10 +965,18 @@ originalContentsURL: (NSURL *)orig
- (int)runModalSavePanel: (NSSavePanel *)savePanel
withAccessoryView: (NSView *)accessoryView
{
NSString *directory, *file;
if (accessoryView)
{
[savePanel setAccessoryView: accessoryView];
}
if ([self fileName])
{
directory = [[self fileName] stringByDeletingLastPathComponent];
file = [[self fileName] lastPathComponent];
return [savePanel runModalForDirectory: directory file: file];
}
return [savePanel runModal];
}