mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
2005-01-14 16:11 Alexander Malmberg <alexander@malmberg.org>
* Headers/AppKit/NSSavePanel.h (-panel:shouldShowFilename:): Document. * Source/NSSavePanel.m (-setDelegate:): Call -validateVisibleColumns. Whitespace cleanups. (-browser:isColumnValid:): Give the delegate the complete path to each file. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20555 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
71c8e09b8b
commit
52e84e5d08
4 changed files with 20 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-01-14 16:11 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Headers/AppKit/NSSavePanel.h (-panel:shouldShowFilename:):
|
||||
Document.
|
||||
* Source/NSSavePanel.m (-setDelegate:): Call -validateVisibleColumns.
|
||||
Whitespace cleanups.
|
||||
(-browser:isColumnValid:): Give the delegate the complete path to
|
||||
each file.
|
||||
|
||||
2005-01-14 09:25 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSDocument.m: Minor change. The init method now sets the
|
||||
|
|
|
@ -250,6 +250,7 @@
|
|||
|
||||
- (void) browser: (NSBrowser *)sender createRowsForColumn: (int)column
|
||||
inMatrix: (NSMatrix *)matrix;
|
||||
/** Returns YES iff */
|
||||
- (BOOL) browser: (NSBrowser *)sender isColumnValid: (int)column;
|
||||
- (int) browser: (NSBrowser *)sender numberOfRowsInColumn: (int)column;
|
||||
- (BOOL) browser: (NSBrowser *)sender selectCellWithString: (NSString *)title
|
||||
|
|
|
@ -203,6 +203,9 @@ enum {
|
|||
compareFilename: (NSString *)filename1
|
||||
with: (NSString *)filename2
|
||||
caseSensitive: (BOOL)caseSensitive;
|
||||
/** Sent by NSSavePanel to check whether a file should be displayed in
|
||||
the panel or not. The filename argument is the complete path
|
||||
to the file. */
|
||||
- (BOOL) panel: (id)sender shouldShowFilename: (NSString *)filename;
|
||||
- (NSString *)panel: (id)sender
|
||||
userEnteredFilename: (NSString *)fileName
|
||||
|
|
|
@ -1192,16 +1192,17 @@ selectCellWithString: (NSString*)title
|
|||
_delegateHasUserEnteredFilename = NO;
|
||||
|
||||
if ([aDelegate respondsToSelector: @selector(panel:directoryDidChange:)])
|
||||
_delegateHasDirectoryDidChange = YES;
|
||||
_delegateHasDirectoryDidChange = YES;
|
||||
else
|
||||
_delegateHasDirectoryDidChange = NO;
|
||||
|
||||
if ([aDelegate respondsToSelector: @selector(panelSelectionDidChange:)])
|
||||
_delegateHasSelectionDidChange = YES;
|
||||
_delegateHasSelectionDidChange = YES;
|
||||
else
|
||||
_delegateHasSelectionDidChange = NO;
|
||||
|
||||
[super setDelegate: aDelegate];
|
||||
[self validateVisibleColumns];
|
||||
}
|
||||
|
||||
- (void) setCanSelectHiddenExtension: (BOOL) flag
|
||||
|
@ -1550,7 +1551,8 @@ createRowsForColumn: (int)column
|
|||
{
|
||||
NSArray *cells = [[sender matrixInColumn: column] cells];
|
||||
unsigned count = [cells count], i;
|
||||
|
||||
NSString *path = [sender pathToColumn: column];
|
||||
|
||||
// iterate through the cells asking the delegate if each filename is valid
|
||||
// if it says no for any filename, the column is not valid
|
||||
if (_delegateHasShowFilenameFilter == YES)
|
||||
|
@ -1558,7 +1560,8 @@ createRowsForColumn: (int)column
|
|||
{
|
||||
if (![_delegate panel: self
|
||||
shouldShowFilename:
|
||||
[[cells objectAtIndex: i] stringValue]])
|
||||
[path stringByAppendingPathComponent:
|
||||
[[cells objectAtIndex: i] stringValue]]])
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue