mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 02:10:37 +00:00
* Source/NSSavePanel.m (-runModal): Use only last component from
filename. * Source/NSSavePanel.m (-filename): Return autoreleased copy of instance variable. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37570 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0725950577
commit
e15355d1e0
2 changed files with 12 additions and 3 deletions
|
@ -1108,7 +1108,8 @@ selectCellWithString: (NSString*)title
|
|||
*/
|
||||
- (NSInteger) runModal
|
||||
{
|
||||
return [self runModalForDirectory: [self directory] file: [self filename]];
|
||||
return [self runModalForDirectory: [self directory]
|
||||
file: [[self filename] lastPathComponent]];
|
||||
}
|
||||
|
||||
- (void) beginSheetModalForWindow:(NSWindow *)window
|
||||
|
@ -1201,7 +1202,7 @@ selectCellWithString: (NSString*)title
|
|||
|
||||
if (_allowedFileTypes == nil ||
|
||||
[_allowedFileTypes indexOfObject: @""] != NSNotFound)
|
||||
return _fullFileName;
|
||||
return AUTORELEASE([_fullFileName copy]);
|
||||
|
||||
/* add file type extension if the file name does not have an extension or
|
||||
the file name's extension is not one of the allowed extensions and the
|
||||
|
@ -1216,7 +1217,7 @@ selectCellWithString: (NSString*)title
|
|||
}
|
||||
else
|
||||
{
|
||||
return _fullFileName;
|
||||
return AUTORELEASE([_fullFileName copy]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue