mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Make sure NSSavePanel and NSOpenPanel show the contents of their
initial directory regardless of the result of validation. This should fix bug #25363. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27820 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
75f908ff62
commit
f980764a02
2 changed files with 28 additions and 13 deletions
|
@ -7,6 +7,10 @@
|
|||
variable used by the aspell checker. This prevents a crash of
|
||||
the spelling server during its initialization.
|
||||
|
||||
* Source/NSSavePanel.m (-browser:createRowsForColumn:inMatrix:):
|
||||
Make sure the contents of the initial directory is always shown.
|
||||
This should fix bug #25363.
|
||||
|
||||
2009-02-08 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSImage.m: Fix missing header.
|
||||
|
|
|
@ -1663,21 +1663,32 @@ createRowsForColumn: (int)column
|
|||
pathAndFile = [path stringByAppendingPathComponent: file];
|
||||
exists = [_fm fileExistsAtPath: pathAndFile
|
||||
isDirectory: &isDir];
|
||||
if (isDir && !_treatsFilePackagesAsDirectories
|
||||
&& [ws isFilePackageAtPath: pathAndFile])
|
||||
{
|
||||
isDir = NO;
|
||||
}
|
||||
if (_delegateHasShowFilenameFilter)
|
||||
{
|
||||
exists = [_delegate panel: self shouldShowFilename: pathAndFile];
|
||||
}
|
||||
|
||||
if (exists && !isDir)
|
||||
/* Note: The initial directory and its parents are always shown, even if
|
||||
* it they are file packages or would be rejected by the validator. */
|
||||
#define HAS_PATH_PREFIX(aPath, otherPath) \
|
||||
([aPath isEqualToString: otherPath] || \
|
||||
[aPath hasPrefix: [otherPath stringByAppendingString: @"/"]])
|
||||
|
||||
if (exists && (!isDir || !HAS_PATH_PREFIX(_directory, pathAndFile)))
|
||||
{
|
||||
exists = [self _shouldShowExtension: extension];
|
||||
}
|
||||
|
||||
if (isDir && !_treatsFilePackagesAsDirectories
|
||||
&& [ws isFilePackageAtPath: pathAndFile])
|
||||
{
|
||||
isDir = NO;
|
||||
}
|
||||
|
||||
if (_delegateHasShowFilenameFilter)
|
||||
{
|
||||
exists = [_delegate panel: self shouldShowFilename: pathAndFile];
|
||||
}
|
||||
|
||||
if (exists && !isDir)
|
||||
{
|
||||
exists = [self _shouldShowExtension: extension];
|
||||
}
|
||||
}
|
||||
|
||||
if (exists)
|
||||
{
|
||||
if (addedRows == 0)
|
||||
|
|
Loading…
Reference in a new issue