mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
Perform column validation for NSSavePanel (and thereby NSOpenPanel)
whenever the panel's browser is scrolled, since only the contents of the visible columns is validated. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27287 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d1695ecc3c
commit
c3b2fa7059
2 changed files with 16 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-12-14 Wolfgang Lux <wlux@uni-muenster.de>
|
||||
|
||||
* Source/NSSavePanel.m (-browserDidScroll:): Perform column
|
||||
validation whenever the browser is scrolled, since only the
|
||||
contents of the visible columns is validated.
|
||||
|
||||
2008-12-13 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSImage.m: Reorganize the image caching code to make it
|
||||
|
|
|
@ -1467,6 +1467,7 @@ selectCellWithString: (NSString*)title
|
|||
// NSSavePanel browser delegate methods
|
||||
//
|
||||
@interface NSSavePanel (GSBrowserDelegate)
|
||||
- (void) browserDidScroll: (NSBrowser *)sender;
|
||||
- (void) browser: (NSBrowser*)sender
|
||||
createRowsForColumn: (int)column
|
||||
inMatrix: (NSMatrix*)matrix;
|
||||
|
@ -1499,6 +1500,11 @@ static int compareFilenames (id elem1, id elem2, void *context)
|
|||
|
||||
|
||||
@implementation NSSavePanel (GSBrowserDelegate)
|
||||
- (void) browserDidScroll: (NSBrowser *)sender
|
||||
{
|
||||
[self validateVisibleColumns];
|
||||
}
|
||||
|
||||
- (void) browser: (NSBrowser*)sender
|
||||
createRowsForColumn: (int)column
|
||||
inMatrix: (NSMatrix*)matrix
|
||||
|
@ -1714,6 +1720,10 @@ createRowsForColumn: (int)column
|
|||
- (BOOL) browser: (NSBrowser*)sender
|
||||
isColumnValid: (int)column
|
||||
{
|
||||
/*
|
||||
* FIXME This code doesn't handle the case where the delegate now wants
|
||||
* to show additional files, which were not displayed before.
|
||||
*/
|
||||
NSArray *cells = [[sender matrixInColumn: column] cells];
|
||||
unsigned count = [cells count], i;
|
||||
NSString *path = pathToColumn(sender, column);
|
||||
|
|
Loading…
Reference in a new issue