mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 23:31:02 +00:00
Conform to documentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19334 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7583dde374
commit
43997f992f
2 changed files with 8 additions and 7 deletions
|
@ -1,5 +1,8 @@
|
|||
2004-05-14 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/NSDocumentController.m ([NSDocumentController -currentDirectory]):
|
||||
Conform to the documentation. (Fixes #7900).
|
||||
|
||||
* Tools/gsnd/gsnd.m: Rename variables starting with _, indent lines
|
||||
properly (Fixes #7502).
|
||||
|
||||
|
|
|
@ -611,13 +611,11 @@ static NSDictionary *TypeInfoForName (NSArray *types, NSString *typeName)
|
|||
NSString *directory;
|
||||
BOOL isDir = NO;
|
||||
|
||||
if (document == nil)
|
||||
document = [[self documents] lastObject];
|
||||
directory = [[document fileName] stringByDeletingLastPathComponent];
|
||||
if (directory == nil)
|
||||
directory = [[NSUserDefaults standardUserDefaults]
|
||||
objectForKey: NSDefaultOpenDirectory];
|
||||
if (directory == nil
|
||||
if (document)
|
||||
directory = [[document fileName] stringByDeletingLastPathComponent];
|
||||
else
|
||||
directory = [[NSOpenPanel openPanel] directory];
|
||||
if (directory == nil || [directory isEqual: @""]
|
||||
|| [manager fileExistsAtPath: directory isDirectory: &isDir] == NO
|
||||
|| isDir == NO)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue