mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 18:50:48 +00:00
* configure.in: added /usr/local/include and /usr/local/lib for
FreeBSD. Use ADDITIONAL_LIB_DIRS instead of ADDITIONAL_LD_FLAGS. * config.make.in (ADDITIONAL_LIB_DIRS): renamed. * config.guess: new file. * config.sub: new file. * install-sh: new file. * Source/NSSavePanel.m ([NSSavePanel -setDelegate:]): check for -panel: userEnteredFilename:confirmed: ([NSSavePanel -ok:]): call delegate method -panel:userEnteredFilename: confirmed: (MacOS X). Run an alert panel if the filename already exists ([NSSavePanel -browser:selectCellWithString:inColumn:]): removed keyboard handling. * Headers/gnustep/gui/NSSavePanel.h: added ivar. * Source/NSBrowserCell.m ([NSBrowserCell -highlightColorInView:]): return the highlight color of the cell. (Mac OS X) ([NSBrowserCell -drawInteriorWithFrame:inView:]): use highlight color from previous method. * Headers/gnustep/gui/NSBrowserCell.h: added method. * Source/NSMatrix.m ([NSMatrix -_mouseDownNonListMode:]): when tracking the mouse use cell's +prefersTrackingUntilMouseUp ([NSMatrix -_move:]): new private method. Fixed deselection of cells in NSRadioModeMatrix and NSListModeMatrix. ([NSMatrix -moveUp:]): use _move: to reduce maintance. ([NSMatrix -moveDown:]): likewise. ([NSMatrix -moveLeft:]): likewise. ([NSMatrix -moveRight:]): likewise. ([NSMatrix -getRow:column:ofCell:]): if cell does not exist set row and column to -1. ([NSMatrix -mouseDown:]): does not select and highlight a cell at the same time. Ensure that only a cell at a time has the dotted outile. * Source/NSBrowser.m ([NSBrowser -addColumn]): load a column and scroll if necessary. ([NSBrowser -doClick:]): rearranged for the new -addColumn ([NSBrowser -setPath:]): likewise and removed additional redisplay. ([NSBrowser -_createColumn]): method to create a new NSBrowserColumn. ([NSBrowser -setMaxVisibleColumns:]): use _createColumn ([NSBrowser -initWithFrame:]): likewise. ([NSBrowser -doClick:]): fixed selection problems. ([NSBrowser -selectRow:inColumn:]): fixed cell selection and perform load of column if cell is not a leaf. ([NSBrowser -loadColumnZero]): use -addColumn to load column zero. ([NSBrowser -setLastColumn:]): check for min value of column. ([NSBrowser -reloadColumn:]): check with _lastColumnLoaded instead in the column browser. ([NSBrowser -moveLeft:]): fixed an index out of bound exception when it was selected the first column. ([NSBrowser -moveRight:]): does nothing if multiple cells are selected or if the cell is a leaf. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9938 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
94316503ff
commit
ced7e3c19c
13 changed files with 3414 additions and 452 deletions
57
ChangeLog
57
ChangeLog
|
@ -1,3 +1,60 @@
|
||||||
|
2001-05-13 Mirko Viviani <mirko.viviani@rccr.cremona.it>
|
||||||
|
|
||||||
|
* configure.in: added /usr/local/include and /usr/local/lib for
|
||||||
|
FreeBSD. Use ADDITIONAL_LIB_DIRS instead of ADDITIONAL_LD_FLAGS.
|
||||||
|
* config.make.in (ADDITIONAL_LIB_DIRS): renamed.
|
||||||
|
* config.guess: new file.
|
||||||
|
* config.sub: new file.
|
||||||
|
* install-sh: new file.
|
||||||
|
|
||||||
|
* Source/NSSavePanel.m ([NSSavePanel -setDelegate:]): check for -panel:
|
||||||
|
userEnteredFilename:confirmed:
|
||||||
|
([NSSavePanel -ok:]): call delegate method -panel:userEnteredFilename:
|
||||||
|
confirmed: (MacOS X). Run an alert panel if the filename already exists
|
||||||
|
([NSSavePanel -browser:selectCellWithString:inColumn:]): removed
|
||||||
|
keyboard handling.
|
||||||
|
|
||||||
|
* Headers/gnustep/gui/NSSavePanel.h: added ivar.
|
||||||
|
|
||||||
|
* Source/NSBrowserCell.m ([NSBrowserCell -highlightColorInView:]):
|
||||||
|
return the highlight color of the cell. (Mac OS X)
|
||||||
|
([NSBrowserCell -drawInteriorWithFrame:inView:]): use highlight color
|
||||||
|
from previous method.
|
||||||
|
|
||||||
|
* Headers/gnustep/gui/NSBrowserCell.h: added method.
|
||||||
|
|
||||||
|
* Source/NSMatrix.m ([NSMatrix -_mouseDownNonListMode:]): when
|
||||||
|
tracking the mouse use cell's +prefersTrackingUntilMouseUp
|
||||||
|
([NSMatrix -_move:]): new private method.
|
||||||
|
Fixed deselection of cells in NSRadioModeMatrix and NSListModeMatrix.
|
||||||
|
([NSMatrix -moveUp:]): use _move: to reduce maintance.
|
||||||
|
([NSMatrix -moveDown:]): likewise.
|
||||||
|
([NSMatrix -moveLeft:]): likewise.
|
||||||
|
([NSMatrix -moveRight:]): likewise.
|
||||||
|
([NSMatrix -getRow:column:ofCell:]): if cell does not exist set row and
|
||||||
|
column to -1.
|
||||||
|
([NSMatrix -mouseDown:]): does not select and highlight a cell at the
|
||||||
|
same time. Ensure that only a cell at a time has the dotted outile.
|
||||||
|
|
||||||
|
* Source/NSBrowser.m ([NSBrowser -addColumn]): load a column and scroll
|
||||||
|
if necessary.
|
||||||
|
([NSBrowser -doClick:]): rearranged for the new -addColumn
|
||||||
|
([NSBrowser -setPath:]): likewise and removed additional redisplay.
|
||||||
|
([NSBrowser -_createColumn]): method to create a new NSBrowserColumn.
|
||||||
|
([NSBrowser -setMaxVisibleColumns:]): use _createColumn
|
||||||
|
([NSBrowser -initWithFrame:]): likewise.
|
||||||
|
([NSBrowser -doClick:]): fixed selection problems.
|
||||||
|
([NSBrowser -selectRow:inColumn:]): fixed cell selection and perform
|
||||||
|
load of column if cell is not a leaf.
|
||||||
|
([NSBrowser -loadColumnZero]): use -addColumn to load column zero.
|
||||||
|
([NSBrowser -setLastColumn:]): check for min value of column.
|
||||||
|
([NSBrowser -reloadColumn:]): check with _lastColumnLoaded instead in
|
||||||
|
the column browser.
|
||||||
|
([NSBrowser -moveLeft:]): fixed an index out of bound exception when
|
||||||
|
it was selected the first column.
|
||||||
|
([NSBrowser -moveRight:]): does nothing if multiple cells are selected
|
||||||
|
or if the cell is a leaf.
|
||||||
|
|
||||||
2000-05-12 Fred Kiefer <FredKiefer@gmx.de>
|
2000-05-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Headers/gnustep/gui/NSFont.h
|
* Headers/gnustep/gui/NSFont.h
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
+ (NSImage *)highlightedBranchImage;
|
+ (NSImage *)highlightedBranchImage;
|
||||||
- (NSImage *)alternateImage;
|
- (NSImage *)alternateImage;
|
||||||
- (void)setAlternateImage:(NSImage *)anImage;
|
- (void)setAlternateImage:(NSImage *)anImage;
|
||||||
|
- (NSColor *)highlightColorInView: (NSView *)controlView;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Placing in the Browser Hierarchy
|
// Placing in the Browser Hierarchy
|
||||||
|
|
|
@ -78,6 +78,7 @@ enum {
|
||||||
BOOL _delegateHasCompareFilter;
|
BOOL _delegateHasCompareFilter;
|
||||||
BOOL _delegateHasShowFilenameFilter;
|
BOOL _delegateHasShowFilenameFilter;
|
||||||
BOOL _delegateHasValidNameFilter;
|
BOOL _delegateHasValidNameFilter;
|
||||||
|
BOOL _delegateHasUserEnteredFilename;
|
||||||
BOOL _selfHasShowExtensionFilter;
|
BOOL _selfHasShowExtensionFilter;
|
||||||
|
|
||||||
// YES when we stopped because the user pressed 'OK'
|
// YES when we stopped because the user pressed 'OK'
|
||||||
|
@ -220,6 +221,9 @@ enum {
|
||||||
with: (NSString *)filename2
|
with: (NSString *)filename2
|
||||||
caseSensitive: (BOOL)caseSensitive;
|
caseSensitive: (BOOL)caseSensitive;
|
||||||
- (BOOL) panel: (id)sender shouldShowFilename: (NSString *)filename;
|
- (BOOL) panel: (id)sender shouldShowFilename: (NSString *)filename;
|
||||||
|
- (NSString *)panel: (id)sender
|
||||||
|
userEnteredFilename: (NSString *)fileName
|
||||||
|
confirmed: (BOOL)okFlag;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* _GNUstep_H_NSSavePanel */
|
#endif /* _GNUstep_H_NSSavePanel */
|
||||||
|
|
|
@ -426,17 +426,30 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
- (void)selectRow:(int)row inColumn:(int)column
|
- (void)selectRow:(int)row inColumn:(int)column
|
||||||
{
|
{
|
||||||
id matrix;
|
id matrix;
|
||||||
|
id cell;
|
||||||
|
|
||||||
#if defined NSBTRACE_selectRow || defined NSBTRACE_all
|
#if defined NSBTRACE_selectRow || defined NSBTRACE_all
|
||||||
fprintf(stderr, "NSBrowser - (NSRect)selectedCellInColumn: %d\n", column);
|
fprintf(stderr, "NSBrowser - (NSRect)selectRow: %d inColumn: %d\n", row,
|
||||||
|
column);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!(matrix = [self matrixInColumn: column]))
|
if (column < 0 || column > _lastColumnLoaded)
|
||||||
{
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[matrix selectCellAtRow: row column: 0];
|
if (!(matrix = [self matrixInColumn: column]))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ((cell = [matrix cellAtRow: row column: column]))
|
||||||
|
{
|
||||||
|
if (column < _lastColumnLoaded)
|
||||||
|
[self setLastColumn: column];
|
||||||
|
|
||||||
|
[matrix deselectAllCells];
|
||||||
|
[matrix selectCellAtRow: row column: 0];
|
||||||
|
|
||||||
|
if (![cell isLeaf])
|
||||||
|
[self addColumn];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------
|
// -------------------
|
||||||
|
@ -573,17 +586,12 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
fprintf(stderr, "NSBrowser - (BOOL)setPath: %s\n", [path cString]);
|
fprintf(stderr, "NSBrowser - (BOOL)setPath: %s\n", [path cString]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
[self _unloadFromColumn: 0];
|
|
||||||
|
|
||||||
// Column Zero is always present.
|
// Column Zero is always present.
|
||||||
[self loadColumnZero];
|
[self loadColumnZero];
|
||||||
|
|
||||||
// If that's all, return.
|
// If that's all, return.
|
||||||
if (path == nil || [path isEqualToString: _pathSeparator])
|
if (path == nil || [path isEqualToString: _pathSeparator])
|
||||||
{
|
{
|
||||||
[self tile];
|
|
||||||
[self updateScroller];
|
|
||||||
[self _remapColumnSubviews: YES];
|
|
||||||
[self setNeedsDisplay: YES];
|
[self setNeedsDisplay: YES];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
@ -639,23 +647,13 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// if the cell is not a leaf add a column to the browser for it
|
// if the cell is not a leaf add a column to the browser for it
|
||||||
if (![selectedCell isLeaf])
|
if ([selectedCell isLeaf])
|
||||||
{
|
|
||||||
if ([_browserColumns count] <= i)
|
|
||||||
[self addColumn];
|
|
||||||
[self _performLoadOfColumn: i];
|
|
||||||
[self setLastColumn: i];
|
|
||||||
[self _adjustMatrixOfColumn: i];
|
|
||||||
[self scrollColumnsRightBy: 1];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
[self addColumn];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[self tile];
|
|
||||||
[self updateScroller];
|
|
||||||
[self _remapColumnSubviews: YES];
|
|
||||||
[self setNeedsDisplay: YES];
|
[self setNeedsDisplay: YES];
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
|
@ -749,21 +747,12 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
- (NSBrowserColumn *)_createColumn
|
||||||
// -------------------
|
|
||||||
// Adds a column to the right of the last column.
|
|
||||||
//
|
|
||||||
|
|
||||||
- (void)addColumn
|
|
||||||
{
|
{
|
||||||
NSBrowserColumn *bc;
|
NSBrowserColumn *bc;
|
||||||
NSScrollView *sc;
|
NSScrollView *sc;
|
||||||
NSRect rect = {{0, 0}, {100, 100}};
|
NSRect rect = {{0, 0}, {100, 100}};
|
||||||
|
|
||||||
#if defined NSBTRACE_addColumn || defined NSBTRACE_all
|
|
||||||
fprintf(stderr, "NSBrowser - (void)addColumn\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bc = [[NSBrowserColumn alloc] init];
|
bc = [[NSBrowserColumn alloc] init];
|
||||||
|
|
||||||
// Create a scrollview
|
// Create a scrollview
|
||||||
|
@ -778,7 +767,39 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
[_browserColumns addObject: bc];
|
[_browserColumns addObject: bc];
|
||||||
RELEASE(bc);
|
RELEASE(bc);
|
||||||
|
|
||||||
|
return bc;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------
|
||||||
|
// Adds a column to the right of the last column.
|
||||||
|
//
|
||||||
|
|
||||||
|
- (void)addColumn
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
#if defined NSBTRACE_addColumn || defined NSBTRACE_all
|
||||||
|
fprintf(stderr, "NSBrowser - (void)addColumn\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (_lastColumnLoaded >= (int)[_browserColumns count]-1)
|
||||||
|
i = [_browserColumns indexOfObject: [self _createColumn]];
|
||||||
|
else
|
||||||
|
i = _lastColumnLoaded + 1;
|
||||||
|
|
||||||
|
if (i < 0)
|
||||||
|
i = 0;
|
||||||
|
|
||||||
|
[self _performLoadOfColumn: i];
|
||||||
|
[self setLastColumn: i];
|
||||||
|
[self _adjustMatrixOfColumn: i];
|
||||||
|
|
||||||
|
_isLoaded = YES;
|
||||||
|
|
||||||
[self tile];
|
[self tile];
|
||||||
|
|
||||||
|
if (i > 0 && i-1 == _lastVisibleColumn)
|
||||||
|
[self scrollColumnsRightBy: 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) acceptsFirstResponder
|
- (BOOL) acceptsFirstResponder
|
||||||
|
@ -930,6 +951,9 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
fprintf(stderr, "NSBrowser - (void)setLastColumn: %d\n", column);
|
fprintf(stderr, "NSBrowser - (void)setLastColumn: %d\n", column);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (column < -1)
|
||||||
|
column = -1;
|
||||||
|
|
||||||
_lastColumnLoaded = column;
|
_lastColumnLoaded = column;
|
||||||
[self _unloadFromColumn: column + 1];
|
[self _unloadFromColumn: column + 1];
|
||||||
[self _setColumnTitlesNeedDisplay];
|
[self _setColumnTitlesNeedDisplay];
|
||||||
|
@ -1027,15 +1051,11 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// set last column loaded
|
// set last column loaded
|
||||||
[self setLastColumn: 0];
|
[self setLastColumn: -1];
|
||||||
|
|
||||||
// load column 0
|
// load column 0
|
||||||
[self _performLoadOfColumn: 0];
|
[self addColumn];
|
||||||
[self _adjustMatrixOfColumn: 0];
|
|
||||||
|
|
||||||
_isLoaded = YES;
|
|
||||||
|
|
||||||
[self tile];
|
|
||||||
[self _remapColumnSubviews: YES];
|
[self _remapColumnSubviews: YES];
|
||||||
[self _setColumnTitlesNeedDisplay];
|
[self _setColumnTitlesNeedDisplay];
|
||||||
}
|
}
|
||||||
|
@ -1046,7 +1066,6 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
|
|
||||||
- (void)reloadColumn: (int)column
|
- (void)reloadColumn: (int)column
|
||||||
{
|
{
|
||||||
id bc;
|
|
||||||
NSArray *selectedCells;
|
NSArray *selectedCells;
|
||||||
NSMatrix *matrix;
|
NSMatrix *matrix;
|
||||||
int i, count, max;
|
int i, count, max;
|
||||||
|
@ -1057,24 +1076,8 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Make sure the column even exists
|
// Make sure the column even exists
|
||||||
if (column >= (int)[_browserColumns count])
|
if (column > _lastColumnLoaded)
|
||||||
{
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bc = [_browserColumns objectAtIndex: column];
|
|
||||||
if (bc == nil)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// If the column has not been already loaded then do not reload
|
|
||||||
if (![bc isLoaded])
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Save the index of the previously selected cells
|
// Save the index of the previously selected cells
|
||||||
matrix = [self matrixInColumn: column];
|
matrix = [self matrixInColumn: column];
|
||||||
|
@ -1251,7 +1254,7 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
// Adds columns as needed
|
// Adds columns as needed
|
||||||
for (i = [_browserColumns count]; i < columnCount; i++)
|
for (i = [_browserColumns count]; i < columnCount; i++)
|
||||||
{
|
{
|
||||||
[self addColumn];
|
[self _createColumn];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets other variables
|
// Sets other variables
|
||||||
|
@ -2106,7 +2109,7 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
NSMutableArray *selectedCells;
|
NSMutableArray *selectedCells;
|
||||||
NSEnumerator *enumerator;
|
NSEnumerator *enumerator;
|
||||||
NSBrowserCell *cell;
|
NSBrowserCell *cell;
|
||||||
BOOL shouldSelect = YES;
|
BOOL shouldSelect = YES, sel1, sel2;
|
||||||
int row, column, aCount, selectedCellsCount;
|
int row, column, aCount, selectedCellsCount;
|
||||||
|
|
||||||
#if defined NSBTRACE_doClick || defined NSBTRACE_all
|
#if defined NSBTRACE_doClick || defined NSBTRACE_all
|
||||||
|
@ -2129,37 +2132,39 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
selectedCells = [a mutableCopy];
|
selectedCells = [a mutableCopy];
|
||||||
|
|
||||||
enumerator = [a objectEnumerator];
|
enumerator = [a objectEnumerator];
|
||||||
while((cell = [enumerator nextObject]))
|
while ((cell = [enumerator nextObject]))
|
||||||
{
|
{
|
||||||
if(_allowsBranchSelection == NO && [cell isLeaf] == NO)
|
if (_allowsBranchSelection == NO && [cell isLeaf] == NO)
|
||||||
{
|
{
|
||||||
[selectedCells removeObject:cell];
|
[selectedCells removeObject: cell];
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if([selectedCells count] == 0)
|
if ([selectedCells count] == 0)
|
||||||
[selectedCells addObject:[sender selectedCell]];
|
[selectedCells addObject: [sender selectedCell]];
|
||||||
|
|
||||||
|
sel1 = [_browserDelegate respondsToSelector:
|
||||||
|
@selector(browser:selectRow:inColumn:)];
|
||||||
|
sel2 = [_browserDelegate respondsToSelector:
|
||||||
|
@selector(browser:selectCellWithString:inColumn:)];
|
||||||
|
|
||||||
enumerator = [a objectEnumerator];
|
enumerator = [a objectEnumerator];
|
||||||
while((cell = [enumerator nextObject]))
|
while ((cell = [enumerator nextObject]))
|
||||||
{
|
{
|
||||||
if([selectedCells containsObject:cell] == YES)
|
if ([selectedCells containsObject: cell] == YES)
|
||||||
{
|
{
|
||||||
// Ask delegate if selection is ok
|
// Ask delegate if selection is ok
|
||||||
if ([_browserDelegate respondsToSelector:
|
if (sel1)
|
||||||
@selector(browser:selectRow:inColumn:)])
|
|
||||||
{
|
{
|
||||||
[sender getRow:&row column:NULL ofCell:cell];
|
[sender getRow: &row column: NULL ofCell: cell];
|
||||||
|
|
||||||
shouldSelect = [_browserDelegate browser: self
|
shouldSelect = [_browserDelegate browser: self
|
||||||
selectRow: row
|
selectRow: row
|
||||||
inColumn: column];
|
inColumn: column];
|
||||||
}
|
}
|
||||||
// Try the other method
|
// Try the other method
|
||||||
else if ([_browserDelegate
|
else if (sel2)
|
||||||
respondsToSelector:
|
|
||||||
@selector(browser:selectCellWithString:inColumn:)])
|
|
||||||
{
|
{
|
||||||
shouldSelect = [_browserDelegate browser: self
|
shouldSelect = [_browserDelegate browser: self
|
||||||
selectCellWithString:
|
selectCellWithString:
|
||||||
|
@ -2168,39 +2173,41 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldSelect == NO)
|
if (shouldSelect == NO)
|
||||||
[selectedCells removeObject:cell];
|
[selectedCells removeObject: cell];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedCellsCount = [selectedCells count];
|
selectedCellsCount = [selectedCells count];
|
||||||
|
|
||||||
if(selectedCellsCount == 0)
|
if (selectedCellsCount == 0)
|
||||||
{
|
{
|
||||||
// If we should not select the cell
|
// If we should not select the cell
|
||||||
// then deselect it and return
|
// then deselect it and return
|
||||||
|
|
||||||
[sender deselectSelectedCell];
|
[sender deselectAllCells];
|
||||||
RELEASE(selectedCells);
|
RELEASE(selectedCells);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(selectedCellsCount < aCount)
|
else if (selectedCellsCount < aCount)
|
||||||
{
|
{
|
||||||
[sender deselectSelectedCell];
|
[sender deselectSelectedCell];
|
||||||
|
|
||||||
enumerator = [selectedCells objectEnumerator];
|
enumerator = [selectedCells objectEnumerator];
|
||||||
while((cell = [enumerator nextObject]))
|
while ((cell = [enumerator nextObject]))
|
||||||
{
|
[sender selectCell: cell];
|
||||||
[sender getRow:&row column:NULL ofCell:cell];
|
|
||||||
[sender selectCellAtRow:row column:0];
|
|
||||||
}
|
|
||||||
|
|
||||||
enumerator = [a objectEnumerator];
|
enumerator = [a objectEnumerator];
|
||||||
while((cell = [enumerator nextObject]))
|
while ((cell = [enumerator nextObject]))
|
||||||
{
|
{
|
||||||
if([selectedCells containsObject:cell] == NO)
|
if ([selectedCells containsObject: cell] == NO)
|
||||||
{
|
{
|
||||||
[sender getRow:&row column:NULL ofCell:cell];
|
if (![sender getRow: &row column: NULL ofCell: cell])
|
||||||
[sender highlightCell:NO atRow:row column:0];
|
continue;
|
||||||
|
|
||||||
|
if ([cell isHighlighted])
|
||||||
|
[sender highlightCell: NO atRow: row column: 0];
|
||||||
|
else
|
||||||
|
[sender drawCellAtRow: row column: 0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2220,22 +2227,15 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int count = [_browserColumns count];
|
int count = [_browserColumns count];
|
||||||
// If last column then add a column
|
|
||||||
if (column >= count - 1)
|
|
||||||
[self addColumn];
|
|
||||||
|
|
||||||
// Load column
|
if (column < count - 1)
|
||||||
[self _performLoadOfColumn: column + 1];
|
[self setLastColumn: column];
|
||||||
[self setLastColumn: column + 1];
|
|
||||||
[self _adjustMatrixOfColumn: column + 1];
|
|
||||||
|
|
||||||
// If this column is the last visible
|
[self addColumn];
|
||||||
// then scroll right by one column
|
|
||||||
if (column == _lastVisibleColumn)
|
|
||||||
[self scrollColumnsRightBy: 1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[sender scrollCellToVisibleAtRow:[sender selectedRow] column:column];
|
[sender scrollCellToVisibleAtRow: [sender selectedRow]
|
||||||
|
column: column];
|
||||||
}
|
}
|
||||||
// Multiple selection
|
// Multiple selection
|
||||||
else
|
else
|
||||||
|
@ -2381,7 +2381,7 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
_lastColumnLoaded = -1;
|
_lastColumnLoaded = -1;
|
||||||
_firstVisibleColumn = 0;
|
_firstVisibleColumn = 0;
|
||||||
_lastVisibleColumn = 0;
|
_lastVisibleColumn = 0;
|
||||||
[self addColumn];
|
[self _createColumn];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -2548,7 +2548,7 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
int selectedRow, selectedColumn;
|
int selectedRow, selectedColumn;
|
||||||
|
|
||||||
selectedColumn = [self selectedColumn];
|
selectedColumn = [self selectedColumn];
|
||||||
if (selectedColumn >= 0)
|
if (selectedColumn > 0)
|
||||||
{
|
{
|
||||||
matrix = [self matrixInColumn: selectedColumn];
|
matrix = [self matrixInColumn: selectedColumn];
|
||||||
selectedCell = [matrix selectedCell];
|
selectedCell = [matrix selectedCell];
|
||||||
|
@ -2592,7 +2592,10 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
matrix = [self matrixInColumn: selectedColumn];
|
matrix = [self matrixInColumn: selectedColumn];
|
||||||
selectFirstRow = YES;
|
|
||||||
|
if (![[matrix selectedCell] isLeaf]
|
||||||
|
&& [[matrix selectedCells] count] == 1)
|
||||||
|
selectFirstRow = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(selectFirstRow == YES)
|
if(selectFirstRow == YES)
|
||||||
|
|
|
@ -155,6 +155,11 @@ static NSFont *_leafFont;
|
||||||
ASSIGN(_alternateImage, anImage);
|
ASSIGN(_alternateImage, anImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSColor *)highlightColorInView: (NSView *)controlView
|
||||||
|
{
|
||||||
|
return [_colorClass selectedControlColor];
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Placing in the Browser Hierarchy
|
* Placing in the Browser Hierarchy
|
||||||
*/
|
*/
|
||||||
|
@ -229,7 +234,7 @@ static NSFont *_leafFont;
|
||||||
|
|
||||||
if (_cell.is_highlighted || _cell.state)
|
if (_cell.is_highlighted || _cell.state)
|
||||||
{
|
{
|
||||||
backColor = [_colorClass selectedControlColor];
|
backColor = [self highlightColorInView: controlView];
|
||||||
[backColor set];
|
[backColor set];
|
||||||
if (!_browsercell_is_leaf)
|
if (!_browsercell_is_leaf)
|
||||||
image = [isa highlightedBranchImage];
|
image = [isa highlightedBranchImage];
|
||||||
|
@ -274,7 +279,7 @@ static NSFont *_leafFont;
|
||||||
title_rect.size.width -= 2;
|
title_rect.size.width -= 2;
|
||||||
|
|
||||||
// Draw the body of the cell
|
// Draw the body of the cell
|
||||||
if ((_cell.type == NSImageCellType)
|
if ((_cell.type == NSImageCellType)
|
||||||
&& (_cell.is_highlighted || _cell.state)
|
&& (_cell.is_highlighted || _cell.state)
|
||||||
&& _alternateImage)
|
&& _alternateImage)
|
||||||
{
|
{
|
||||||
|
|
|
@ -791,6 +791,12 @@ static SEL getSel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(row)
|
||||||
|
*row = -1;
|
||||||
|
if(column)
|
||||||
|
*column = -1;
|
||||||
|
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2007,7 +2013,9 @@ static SEL getSel;
|
||||||
mouseUpInCell = [mouseCell trackMouse: theEvent
|
mouseUpInCell = [mouseCell trackMouse: theEvent
|
||||||
inRect: mouseCellFrame
|
inRect: mouseCellFrame
|
||||||
ofView: self
|
ofView: self
|
||||||
untilMouseUp: NO];
|
untilMouseUp:
|
||||||
|
[[mouseCell class]
|
||||||
|
prefersTrackingUntilMouseUp]];
|
||||||
|
|
||||||
if (_mode != NSTrackModeMatrix)
|
if (_mode != NSTrackModeMatrix)
|
||||||
{
|
{
|
||||||
|
@ -2247,11 +2255,17 @@ static SEL getSel;
|
||||||
|
|
||||||
if ([aCell acceptsFirstResponder])
|
if ([aCell acceptsFirstResponder])
|
||||||
{
|
{
|
||||||
|
int lastRow, lastColumn;
|
||||||
|
|
||||||
|
lastRow = _dottedRow;
|
||||||
|
lastColumn = _dottedColumn;
|
||||||
|
|
||||||
_dottedRow = row;
|
_dottedRow = row;
|
||||||
_dottedColumn = column;
|
_dottedColumn = column;
|
||||||
|
|
||||||
if (previousDottedCell && previousDottedCell != aCell)
|
if (lastRow != -1
|
||||||
[self drawCell: previousDottedCell];
|
&& (!previousDottedCell || previousDottedCell != aCell))
|
||||||
|
[self drawCellAtRow: lastRow column: lastColumn];
|
||||||
|
|
||||||
previousDottedCell = aCell;
|
previousDottedCell = aCell;
|
||||||
}
|
}
|
||||||
|
@ -2271,9 +2285,7 @@ static SEL getSel;
|
||||||
if (!(modifiers & NSAlternateKeyMask))
|
if (!(modifiers & NSAlternateKeyMask))
|
||||||
{
|
{
|
||||||
[aCell setState: NSOnState];
|
[aCell setState: NSOnState];
|
||||||
[self highlightCell: YES
|
[self drawCell: aCell];
|
||||||
atRow: row
|
|
||||||
column: column];
|
|
||||||
[_window flushWindow];
|
[_window flushWindow];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2844,82 +2856,180 @@ static SEL getSel;
|
||||||
[self setNeedsDisplay: YES];
|
[self setNeedsDisplay: YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)moveUp:(id)sender
|
- (void)_move:(unichar)pos
|
||||||
{
|
{
|
||||||
BOOL selectCell = NO;
|
BOOL selectCell = NO;
|
||||||
int h, i, lastDottedRow;
|
int h, i, lastDottedRow, lastDottedColumn;
|
||||||
|
|
||||||
if (_mode == NSRadioModeMatrix || _mode == NSListModeMatrix)
|
if (_mode == NSRadioModeMatrix || _mode == NSListModeMatrix)
|
||||||
selectCell = YES;
|
selectCell = YES;
|
||||||
|
|
||||||
if (_dottedRow == -1 || _dottedColumn == -1)
|
if (_dottedRow == -1 || _dottedColumn == -1)
|
||||||
{
|
{
|
||||||
for (h = 0; h < _numCols; h++)
|
if (pos == NSUpArrowFunctionKey || pos == NSDownArrowFunctionKey)
|
||||||
|
{
|
||||||
|
for (h = 0; h < _numCols; h++)
|
||||||
|
{
|
||||||
|
for (i = 0; i < _numRows; i++)
|
||||||
|
{
|
||||||
|
if ([_cells[i][h] acceptsFirstResponder])
|
||||||
|
{
|
||||||
|
_dottedRow = i;
|
||||||
|
_dottedColumn = h;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i == _dottedRow)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
for (i = 0; i < _numRows; i++)
|
for (i = 0; i < _numRows; i++)
|
||||||
{
|
{
|
||||||
if ([_cells[i][h] acceptsFirstResponder])
|
for (h = 0; h < _numCols; h++)
|
||||||
{
|
{
|
||||||
_dottedRow = i;
|
if ([_cells[i][h] acceptsFirstResponder])
|
||||||
_dottedColumn = h;
|
{
|
||||||
break;
|
_dottedRow = i;
|
||||||
|
_dottedColumn = h;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (i == _dottedRow)
|
if (h == _dottedColumn)
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_dottedRow == -1 || _dottedColumn == -1)
|
if (_dottedRow == -1 || _dottedColumn == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (selectCell)
|
if (selectCell)
|
||||||
[self selectCellAtRow: _dottedRow column: _dottedColumn];
|
|
||||||
else
|
|
||||||
[self drawCell: _cells[_dottedRow][_dottedColumn]];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (_dottedRow <= 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lastDottedRow = _dottedRow;
|
|
||||||
|
|
||||||
for (i = _dottedRow-1; i >= 0; i--)
|
|
||||||
{
|
{
|
||||||
if ([_cells[i][_dottedColumn] acceptsFirstResponder])
|
if (_selectedCell)
|
||||||
{
|
{
|
||||||
_dottedRow = i;
|
if (_mode == NSRadioModeMatrix)
|
||||||
break;
|
{
|
||||||
}
|
NSCell *aCell = _selectedCell;
|
||||||
}
|
|
||||||
|
|
||||||
if (_dottedRow != i)
|
[aCell setState: NSOffState];
|
||||||
return;
|
_selectedCells[_selectedRow][_selectedColumn] = NO;
|
||||||
|
_selectedRow = _selectedColumn = -1;
|
||||||
|
_selectedCell = nil;
|
||||||
|
|
||||||
if (selectCell)
|
[self drawCell: aCell];
|
||||||
{
|
}
|
||||||
NSCell *aCell = _cells[lastDottedRow][_dottedColumn];
|
|
||||||
BOOL isHighlighted = [aCell isHighlighted];
|
|
||||||
|
|
||||||
if ([aCell state] || isHighlighted)
|
|
||||||
{
|
|
||||||
[aCell setState: NSOffState];
|
|
||||||
_selectedCells[lastDottedRow][_dottedColumn] = NO;
|
|
||||||
|
|
||||||
if (isHighlighted)
|
|
||||||
[self highlightCell: NO
|
|
||||||
atRow: lastDottedRow
|
|
||||||
column: _dottedColumn];
|
|
||||||
else
|
else
|
||||||
[self drawCell: aCell];
|
[self deselectAllCells];
|
||||||
}
|
}
|
||||||
|
|
||||||
[self selectCellAtRow: _dottedRow column: _dottedColumn];
|
[self selectCellAtRow: _dottedRow column: _dottedColumn];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
[self drawCellAtRow: _dottedRow column: _dottedColumn];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lastDottedRow = _dottedRow;
|
||||||
|
lastDottedColumn = _dottedColumn;
|
||||||
|
|
||||||
|
if (pos == NSUpArrowFunctionKey)
|
||||||
{
|
{
|
||||||
[self drawCell: _cells[lastDottedRow][_dottedColumn]];
|
if (_dottedRow <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = _dottedRow-1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
if ([_cells[i][_dottedColumn] acceptsFirstResponder])
|
||||||
|
{
|
||||||
|
_dottedRow = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (pos == NSDownArrowFunctionKey)
|
||||||
|
{
|
||||||
|
if (_dottedRow >= _numRows-1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = _dottedRow+1; i < _numRows; i++)
|
||||||
|
{
|
||||||
|
if ([_cells[i][_dottedColumn] acceptsFirstResponder])
|
||||||
|
{
|
||||||
|
_dottedRow = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (pos == NSLeftArrowFunctionKey)
|
||||||
|
{
|
||||||
|
if (_dottedColumn <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = _dottedColumn-1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
if ([_cells[_dottedRow][i] acceptsFirstResponder])
|
||||||
|
{
|
||||||
|
_dottedColumn = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (_dottedColumn >= _numCols-1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = _dottedColumn+1; i < _numCols; i++)
|
||||||
|
{
|
||||||
|
if ([_cells[_dottedRow][i] acceptsFirstResponder])
|
||||||
|
{
|
||||||
|
_dottedColumn = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((pos == NSUpArrowFunctionKey || pos == NSDownArrowFunctionKey)
|
||||||
|
&& _dottedRow != i)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ((pos == NSLeftArrowFunctionKey || pos == NSRightArrowFunctionKey)
|
||||||
|
&& _dottedColumn != i)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (selectCell)
|
||||||
|
{
|
||||||
|
if (_mode == NSRadioModeMatrix)
|
||||||
|
{
|
||||||
|
NSCell *aCell = _cells[lastDottedRow][lastDottedColumn];
|
||||||
|
BOOL isHighlighted = [aCell isHighlighted];
|
||||||
|
|
||||||
|
if ([aCell state] || isHighlighted)
|
||||||
|
{
|
||||||
|
[aCell setState: NSOffState];
|
||||||
|
_selectedCells[lastDottedRow][lastDottedColumn] = NO;
|
||||||
|
_selectedRow = _selectedColumn = -1;
|
||||||
|
_selectedCell = nil;
|
||||||
|
|
||||||
|
if (isHighlighted)
|
||||||
|
[self highlightCell: NO
|
||||||
|
atRow: lastDottedRow
|
||||||
|
column: lastDottedColumn];
|
||||||
|
else
|
||||||
|
[self drawCell: aCell];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
[self deselectAllCells];
|
||||||
|
|
||||||
|
[self selectCellAtRow: _dottedRow column: _dottedColumn];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self drawCell: _cells[lastDottedRow][lastDottedColumn]];
|
||||||
[self drawCell: _cells[_dottedRow][_dottedColumn]];
|
[self drawCell: _cells[_dottedRow][_dottedColumn]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2927,265 +3037,30 @@ static SEL getSel;
|
||||||
[_window flushWindow];
|
[_window flushWindow];
|
||||||
|
|
||||||
if (selectCell)
|
if (selectCell)
|
||||||
[self performClick: self];
|
{
|
||||||
|
[self performClick: self];
|
||||||
|
[_window flushWindow];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)moveUp:(id)sender
|
||||||
|
{
|
||||||
|
[self _move: NSUpArrowFunctionKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)moveDown:(id)sender
|
- (void)moveDown:(id)sender
|
||||||
{
|
{
|
||||||
BOOL selectCell = NO;
|
[self _move: NSDownArrowFunctionKey];
|
||||||
int h, i, lastDottedRow;
|
|
||||||
|
|
||||||
if (_mode == NSRadioModeMatrix || _mode == NSListModeMatrix)
|
|
||||||
selectCell = YES;
|
|
||||||
|
|
||||||
if (_dottedRow == -1 || _dottedColumn == -1)
|
|
||||||
{
|
|
||||||
for (h = 0; h < _numCols; h++)
|
|
||||||
{
|
|
||||||
for (i = 0; i < _numRows; i++)
|
|
||||||
{
|
|
||||||
if ([_cells[i][h] acceptsFirstResponder])
|
|
||||||
{
|
|
||||||
_dottedRow = i;
|
|
||||||
_dottedColumn = h;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i == _dottedRow)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_dottedRow == -1 || _dottedColumn == -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (selectCell)
|
|
||||||
[self selectCellAtRow: _dottedRow column: _dottedColumn];
|
|
||||||
else
|
|
||||||
[self drawCell: _cells[_dottedRow][_dottedColumn]];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (_dottedRow >= _numRows-1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lastDottedRow = _dottedRow;
|
|
||||||
|
|
||||||
for (i = _dottedRow+1; i < _numRows; i++)
|
|
||||||
{
|
|
||||||
if ([_cells[i][_dottedColumn] acceptsFirstResponder])
|
|
||||||
{
|
|
||||||
_dottedRow = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_dottedRow != i)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (selectCell)
|
|
||||||
{
|
|
||||||
NSCell *aCell = _cells[lastDottedRow][_dottedColumn];
|
|
||||||
BOOL isHighlighted = [aCell isHighlighted];
|
|
||||||
|
|
||||||
if ([aCell state] || isHighlighted)
|
|
||||||
{
|
|
||||||
[aCell setState: NSOffState];
|
|
||||||
_selectedCells[lastDottedRow][_dottedColumn] = NO;
|
|
||||||
|
|
||||||
if (isHighlighted)
|
|
||||||
[self highlightCell: NO
|
|
||||||
atRow: lastDottedRow
|
|
||||||
column: _dottedColumn];
|
|
||||||
else
|
|
||||||
[self drawCell: aCell];
|
|
||||||
}
|
|
||||||
|
|
||||||
[self selectCellAtRow: _dottedRow column: _dottedColumn];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
[self drawCell: _cells[lastDottedRow][_dottedColumn]];
|
|
||||||
[self drawCell: _cells[_dottedRow][_dottedColumn]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[_window flushWindow];
|
|
||||||
|
|
||||||
if (selectCell)
|
|
||||||
[self performClick: self];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)moveLeft:(id)sender
|
- (void)moveLeft:(id)sender
|
||||||
{
|
{
|
||||||
BOOL selectCell = NO;
|
[self _move: NSLeftArrowFunctionKey];
|
||||||
int h, i, lastDottedColumn;
|
|
||||||
|
|
||||||
if (_mode == NSRadioModeMatrix || _mode == NSListModeMatrix)
|
|
||||||
selectCell = YES;
|
|
||||||
|
|
||||||
if (_dottedRow == -1 || _dottedColumn == -1)
|
|
||||||
{
|
|
||||||
for (i = 0; i < _numRows; i++)
|
|
||||||
{
|
|
||||||
for (h = 0; h < _numCols; h++)
|
|
||||||
{
|
|
||||||
if ([_cells[i][h] acceptsFirstResponder])
|
|
||||||
{
|
|
||||||
_dottedRow = i;
|
|
||||||
_dottedColumn = h;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (h == _dottedColumn)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_dottedRow == -1 || _dottedColumn == -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (selectCell)
|
|
||||||
[self selectCellAtRow: _dottedRow column: _dottedColumn];
|
|
||||||
else
|
|
||||||
[self drawCell: _cells[_dottedRow][_dottedColumn]];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (_dottedColumn <= 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lastDottedColumn = _dottedColumn;
|
|
||||||
|
|
||||||
for (i = _dottedColumn-1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
if ([_cells[_dottedRow][i] acceptsFirstResponder])
|
|
||||||
{
|
|
||||||
_dottedColumn = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_dottedColumn != i)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (selectCell)
|
|
||||||
{
|
|
||||||
NSCell *aCell = _cells[_dottedRow][lastDottedColumn];
|
|
||||||
BOOL isHighlighted = [aCell isHighlighted];
|
|
||||||
|
|
||||||
if ([aCell state] || isHighlighted)
|
|
||||||
{
|
|
||||||
[aCell setState: NSOffState];
|
|
||||||
_selectedCells[_dottedRow][lastDottedColumn] = NO;
|
|
||||||
|
|
||||||
if (isHighlighted)
|
|
||||||
[self highlightCell: NO
|
|
||||||
atRow: _dottedRow
|
|
||||||
column: lastDottedColumn];
|
|
||||||
else
|
|
||||||
[self drawCell: aCell];
|
|
||||||
}
|
|
||||||
|
|
||||||
[self selectCellAtRow: _dottedRow column: _dottedColumn];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
[self drawCell: _cells[_dottedRow][lastDottedColumn]];
|
|
||||||
[self drawCell: _cells[_dottedRow][_dottedColumn]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[_window flushWindow];
|
|
||||||
|
|
||||||
if (selectCell)
|
|
||||||
[self performClick: self];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)moveRight:(id)sender
|
- (void)moveRight:(id)sender
|
||||||
{
|
{
|
||||||
BOOL selectCell = NO;
|
[self _move: NSRightArrowFunctionKey];
|
||||||
int h, i, lastDottedColumn;
|
|
||||||
|
|
||||||
if (_mode == NSRadioModeMatrix || _mode == NSListModeMatrix)
|
|
||||||
selectCell = YES;
|
|
||||||
|
|
||||||
if (_dottedRow == -1 || _dottedColumn == -1)
|
|
||||||
{
|
|
||||||
for (i = 0; i < _numRows; i++)
|
|
||||||
{
|
|
||||||
for (h = 0; h < _numCols; h++)
|
|
||||||
{
|
|
||||||
if ([_cells[i][h] acceptsFirstResponder])
|
|
||||||
{
|
|
||||||
_dottedRow = i;
|
|
||||||
_dottedColumn = h;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (h == _dottedColumn)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_dottedRow == -1 || _dottedColumn == -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (selectCell)
|
|
||||||
[self selectCellAtRow: _dottedRow column: _dottedColumn];
|
|
||||||
else
|
|
||||||
[self drawCell: _cells[_dottedRow][_dottedColumn]];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (_dottedColumn >= _numCols-1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lastDottedColumn = _dottedColumn;
|
|
||||||
|
|
||||||
for (i = _dottedColumn+1; i < _numCols; i++)
|
|
||||||
{
|
|
||||||
if ([_cells[_dottedRow][i] acceptsFirstResponder])
|
|
||||||
{
|
|
||||||
_dottedColumn = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_dottedColumn != i)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (selectCell)
|
|
||||||
{
|
|
||||||
NSCell *aCell = _cells[_dottedRow][lastDottedColumn];
|
|
||||||
BOOL isHighlighted = [aCell isHighlighted];
|
|
||||||
|
|
||||||
if ([aCell state] || isHighlighted)
|
|
||||||
{
|
|
||||||
[aCell setState: NSOffState];
|
|
||||||
_selectedCells[_dottedRow][lastDottedColumn] = NO;
|
|
||||||
|
|
||||||
if (isHighlighted)
|
|
||||||
[self highlightCell: NO
|
|
||||||
atRow: _dottedRow
|
|
||||||
column: lastDottedColumn];
|
|
||||||
else
|
|
||||||
[self drawCell: aCell];
|
|
||||||
}
|
|
||||||
|
|
||||||
[self selectCellAtRow: _dottedRow column: _dottedColumn];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
[self drawCell: _cells[_dottedRow][lastDottedColumn]];
|
|
||||||
[self drawCell: _cells[_dottedRow][_dottedColumn]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[_window flushWindow];
|
|
||||||
|
|
||||||
if (selectCell)
|
|
||||||
[self performClick: self];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) keyDown: (NSEvent *)theEvent
|
- (void) keyDown: (NSEvent *)theEvent
|
||||||
|
|
|
@ -745,22 +745,60 @@ static BOOL _gs_display_reading_progress = NO;
|
||||||
{
|
{
|
||||||
NSMatrix *matrix;
|
NSMatrix *matrix;
|
||||||
NSBrowserCell *selectedCell;
|
NSBrowserCell *selectedCell;
|
||||||
|
NSString *filename;
|
||||||
|
|
||||||
matrix = [_browser matrixInColumn:[_browser lastColumn]];
|
matrix = [_browser matrixInColumn: [_browser lastColumn]];
|
||||||
selectedCell = [matrix selectedCell];
|
selectedCell = [matrix selectedCell];
|
||||||
|
|
||||||
if (selectedCell && [selectedCell isLeaf] == NO)
|
if (selectedCell && [selectedCell isLeaf] == NO)
|
||||||
{
|
{
|
||||||
[_browser doClick:matrix];
|
[_browser doClick: matrix];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_delegateHasUserEnteredFilename)
|
||||||
|
{
|
||||||
|
filename = [_delegate panel: self
|
||||||
|
userEnteredFilename: _fullFileName
|
||||||
|
confirmed: YES];
|
||||||
|
if (!filename)
|
||||||
|
return;
|
||||||
|
else if (![_fullFileName isEqual: filename])
|
||||||
|
{
|
||||||
|
ASSIGN (_directory, [filename stringByDeletingLastPathComponent]);
|
||||||
|
ASSIGN (_fullFileName, filename);
|
||||||
|
[_browser setPath: _fullFileName];
|
||||||
|
|
||||||
|
filename = [_fullFileName lastPathComponent];
|
||||||
|
|
||||||
|
[self _selectCellName: filename];
|
||||||
|
[[_form cellAtIndex: 0] setStringValue: filename];
|
||||||
|
[_form selectTextAtIndex: 0];
|
||||||
|
[_form setNeedsDisplay: YES];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ASSIGN (_directory, [_browser pathToColumn:[_browser lastColumn]]);
|
ASSIGN (_directory, [_browser pathToColumn:[_browser lastColumn]]);
|
||||||
ASSIGN (_fullFileName, [_directory stringByAppendingPathComponent:
|
ASSIGN (_fullFileName, [_directory stringByAppendingPathComponent:
|
||||||
[[_form cellAtIndex:0] stringValue]]);
|
[[_form cellAtIndex: 0] stringValue]]);
|
||||||
|
|
||||||
|
if ([_fm fileExistsAtPath: [self filename] isDirectory: NULL])
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
|
//FIXME -- localize
|
||||||
|
result = NSRunAlertPanel(@"Save",
|
||||||
|
@"The file '%@' in '%@' exists. Replace it?",
|
||||||
|
@"Replace", @"Cancel", nil,
|
||||||
|
[[_form cellAtIndex: 0] stringValue],
|
||||||
|
_directory);
|
||||||
|
|
||||||
|
if (result != NSAlertDefaultReturn)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_delegateHasValidNameFilter)
|
if (_delegateHasValidNameFilter)
|
||||||
if (![_delegate panel:self isValidFilename: [self filename]])
|
if (![_delegate panel: self isValidFilename: [self filename]])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_OKButtonPressed = YES;
|
_OKButtonPressed = YES;
|
||||||
|
@ -828,17 +866,22 @@ static BOOL _gs_display_reading_progress = NO;
|
||||||
_delegateHasCompareFilter = YES;
|
_delegateHasCompareFilter = YES;
|
||||||
else
|
else
|
||||||
_delegateHasCompareFilter = NO;
|
_delegateHasCompareFilter = NO;
|
||||||
|
|
||||||
if ([aDelegate respondsToSelector: @selector(panel:shouldShowFilename:)])
|
if ([aDelegate respondsToSelector: @selector(panel:shouldShowFilename:)])
|
||||||
_delegateHasShowFilenameFilter = YES;
|
_delegateHasShowFilenameFilter = YES;
|
||||||
else
|
else
|
||||||
_delegateHasShowFilenameFilter = NO;
|
_delegateHasShowFilenameFilter = NO;
|
||||||
|
|
||||||
if ([aDelegate respondsToSelector: @selector(panel:isValidFilename:)])
|
if ([aDelegate respondsToSelector: @selector(panel:isValidFilename:)])
|
||||||
_delegateHasValidNameFilter = YES;
|
_delegateHasValidNameFilter = YES;
|
||||||
else
|
else
|
||||||
_delegateHasValidNameFilter = NO;
|
_delegateHasValidNameFilter = NO;
|
||||||
|
|
||||||
|
if ([aDelegate respondsToSelector: @selector(panel:userEnteredFilename:confirmed:)])
|
||||||
|
_delegateHasUserEnteredFilename = YES;
|
||||||
|
else
|
||||||
|
_delegateHasUserEnteredFilename = NO;
|
||||||
|
|
||||||
[super setDelegate: aDelegate];
|
[super setDelegate: aDelegate];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1140,25 +1183,6 @@ selectCellWithString: (NSString*)title
|
||||||
isLeaf = [[m selectedCell] isLeaf];
|
isLeaf = [[m selectedCell] isLeaf];
|
||||||
path = [sender pathToColumn: column];
|
path = [sender pathToColumn: column];
|
||||||
|
|
||||||
if([self isKindOfClass:[NSOpenPanel class]] == NO)
|
|
||||||
{
|
|
||||||
event = [self currentEvent];
|
|
||||||
if(event && [event type] == NSKeyDown && isLeaf == YES)
|
|
||||||
{
|
|
||||||
NSString *characters = [event characters];
|
|
||||||
unichar character = 0;
|
|
||||||
|
|
||||||
if ([characters length] > 0)
|
|
||||||
{
|
|
||||||
character = [characters characterAtIndex: 0];
|
|
||||||
}
|
|
||||||
|
|
||||||
if(character != NSRightArrowFunctionKey ||
|
|
||||||
[sender selectedRowInColumn:column] != 0)
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isLeaf)
|
if (isLeaf)
|
||||||
{
|
{
|
||||||
ASSIGN (_directory, path);
|
ASSIGN (_directory, path);
|
||||||
|
|
1368
config.guess
vendored
Executable file
1368
config.guess
vendored
Executable file
File diff suppressed because it is too large
Load diff
|
@ -3,5 +3,5 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
ADDITIONAL_INCLUDE_DIRS += @ADDITIONAL_INCLUDE_DIRS@
|
ADDITIONAL_INCLUDE_DIRS += @ADDITIONAL_INCLUDE_DIRS@
|
||||||
ADDITIONAL_LDFLAGS += @ADDITIONAL_LDFLAGS@
|
ADDITIONAL_LIB_DIRS += @ADDITIONAL_LIB_DIRS@
|
||||||
|
|
||||||
|
|
1360
config.sub
vendored
Executable file
1360
config.sub
vendored
Executable file
File diff suppressed because it is too large
Load diff
176
configure
vendored
176
configure
vendored
|
@ -528,8 +528,120 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# Determine the host, build, and target systems
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
ac_aux_dir=
|
||||||
|
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
|
||||||
|
if test -f $ac_dir/install-sh; then
|
||||||
|
ac_aux_dir=$ac_dir
|
||||||
|
ac_install_sh="$ac_aux_dir/install-sh -c"
|
||||||
|
break
|
||||||
|
elif test -f $ac_dir/install.sh; then
|
||||||
|
ac_aux_dir=$ac_dir
|
||||||
|
ac_install_sh="$ac_aux_dir/install.sh -c"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$ac_aux_dir"; then
|
||||||
|
{ echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
ac_config_guess=$ac_aux_dir/config.guess
|
||||||
|
ac_config_sub=$ac_aux_dir/config.sub
|
||||||
|
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
|
||||||
|
|
||||||
|
|
||||||
|
# Do some error checking and defaulting for the host and target type.
|
||||||
|
# The inputs are:
|
||||||
|
# configure --host=HOST --target=TARGET --build=BUILD NONOPT
|
||||||
|
#
|
||||||
|
# The rules are:
|
||||||
|
# 1. You are not allowed to specify --host, --target, and nonopt at the
|
||||||
|
# same time.
|
||||||
|
# 2. Host defaults to nonopt.
|
||||||
|
# 3. If nonopt is not specified, then host defaults to the current host,
|
||||||
|
# as determined by config.guess.
|
||||||
|
# 4. Target and build default to nonopt.
|
||||||
|
# 5. If nonopt is not specified, then target and build default to host.
|
||||||
|
|
||||||
|
# The aliases save the names the user supplied, while $host etc.
|
||||||
|
# will get canonicalized.
|
||||||
|
case $host---$target---$nonopt in
|
||||||
|
NONE---*---* | *---NONE---* | *---*---NONE) ;;
|
||||||
|
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
# Make sure we can run config.sub.
|
||||||
|
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
|
||||||
|
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo $ac_n "checking host system type""... $ac_c" 1>&6
|
||||||
|
echo "configure:582: checking host system type" >&5
|
||||||
|
|
||||||
|
host_alias=$host
|
||||||
|
case "$host_alias" in
|
||||||
|
NONE)
|
||||||
|
case $nonopt in
|
||||||
|
NONE)
|
||||||
|
if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
|
||||||
|
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
|
||||||
|
fi ;;
|
||||||
|
*) host_alias=$nonopt ;;
|
||||||
|
esac ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
|
||||||
|
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||||
|
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||||
|
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||||
|
echo "$ac_t""$host" 1>&6
|
||||||
|
|
||||||
|
echo $ac_n "checking target system type""... $ac_c" 1>&6
|
||||||
|
echo "configure:603: checking target system type" >&5
|
||||||
|
|
||||||
|
target_alias=$target
|
||||||
|
case "$target_alias" in
|
||||||
|
NONE)
|
||||||
|
case $nonopt in
|
||||||
|
NONE) target_alias=$host_alias ;;
|
||||||
|
*) target_alias=$nonopt ;;
|
||||||
|
esac ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
|
||||||
|
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||||
|
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||||
|
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||||
|
echo "$ac_t""$target" 1>&6
|
||||||
|
|
||||||
|
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
||||||
|
echo "configure:621: checking build system type" >&5
|
||||||
|
|
||||||
|
build_alias=$build
|
||||||
|
case "$build_alias" in
|
||||||
|
NONE)
|
||||||
|
case $nonopt in
|
||||||
|
NONE) build_alias=$host_alias ;;
|
||||||
|
*) build_alias=$nonopt ;;
|
||||||
|
esac ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
|
||||||
|
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||||
|
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||||
|
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||||
|
echo "$ac_t""$build" 1>&6
|
||||||
|
|
||||||
|
test "$host_alias" != "$target_alias" &&
|
||||||
|
test "$program_prefix$program_suffix$program_transform_name" = \
|
||||||
|
NONENONEs,x,x, &&
|
||||||
|
program_prefix=${target_alias}-
|
||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
|
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
|
||||||
echo "configure:533: checking for main in -lm" >&5
|
echo "configure:645: checking for main in -lm" >&5
|
||||||
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
@ -537,14 +649,14 @@ else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lm $LIBS"
|
LIBS="-lm $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 541 "configure"
|
#line 653 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
main()
|
main()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -574,12 +686,12 @@ fi
|
||||||
for ac_func in rintf
|
for ac_func in rintf
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:578: checking for $ac_func" >&5
|
echo "configure:690: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 583 "configure"
|
#line 695 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
|
@ -602,7 +714,7 @@ $ac_func();
|
||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
|
@ -649,6 +761,13 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
case "$target_os" in
|
||||||
|
freebsd*) CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||||
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||||
|
ADDITIONAL_INCLUDE_DIRS="-I/usr/local/include"
|
||||||
|
ADDITIONAL_LIB_DIRS="-L/usr/local/lib";;
|
||||||
|
esac
|
||||||
|
|
||||||
save_cpp=${CPPFLAGS}
|
save_cpp=${CPPFLAGS}
|
||||||
save_ldf=${LDFLAGS}
|
save_ldf=${LDFLAGS}
|
||||||
if test "$with_tiff_include" != ""; then
|
if test "$with_tiff_include" != ""; then
|
||||||
|
@ -657,10 +776,10 @@ if test "$with_tiff_include" != ""; then
|
||||||
fi
|
fi
|
||||||
if test -n "$with_tiff_library"; then
|
if test -n "$with_tiff_library"; then
|
||||||
LDFLAGS="-L$with_tiff_library $LDFLAGS"
|
LDFLAGS="-L$with_tiff_library $LDFLAGS"
|
||||||
ADDITIONAL_LDFLAGS="-L$with_tiff_library"
|
ADDITIONAL_LIB_DIRS="-L$with_tiff_library"
|
||||||
fi
|
fi
|
||||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||||
echo "configure:664: checking how to run the C preprocessor" >&5
|
echo "configure:783: checking how to run the C preprocessor" >&5
|
||||||
# On Suns, sometimes $CPP names a directory.
|
# On Suns, sometimes $CPP names a directory.
|
||||||
if test -n "$CPP" && test -d "$CPP"; then
|
if test -n "$CPP" && test -d "$CPP"; then
|
||||||
CPP=
|
CPP=
|
||||||
|
@ -675,13 +794,13 @@ else
|
||||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||||
# not just through cpp.
|
# not just through cpp.
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 679 "configure"
|
#line 798 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
Syntax Error
|
Syntax Error
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
:
|
:
|
||||||
|
@ -692,13 +811,13 @@ else
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
CPP="${CC-cc} -E -traditional-cpp"
|
CPP="${CC-cc} -E -traditional-cpp"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 696 "configure"
|
#line 815 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
Syntax Error
|
Syntax Error
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
:
|
:
|
||||||
|
@ -709,13 +828,13 @@ else
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
CPP="${CC-cc} -nologo -E"
|
CPP="${CC-cc} -nologo -E"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 713 "configure"
|
#line 832 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
Syntax Error
|
Syntax Error
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
:
|
:
|
||||||
|
@ -741,17 +860,17 @@ echo "$ac_t""$CPP" 1>&6
|
||||||
|
|
||||||
ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
|
echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
|
||||||
echo "configure:745: checking for tiffio.h" >&5
|
echo "configure:864: checking for tiffio.h" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 750 "configure"
|
#line 869 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <tiffio.h>
|
#include <tiffio.h>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
|
@ -781,7 +900,7 @@ if test $ac_cv_header_tiffio_h = no; then
|
||||||
{ echo "configure: error: gnustep-gui will not compile without tiff includes" 1>&2; exit 1; }
|
{ echo "configure: error: gnustep-gui will not compile without tiff includes" 1>&2; exit 1; }
|
||||||
fi
|
fi
|
||||||
echo $ac_n "checking for main in -ltiff""... $ac_c" 1>&6
|
echo $ac_n "checking for main in -ltiff""... $ac_c" 1>&6
|
||||||
echo "configure:785: checking for main in -ltiff" >&5
|
echo "configure:904: checking for main in -ltiff" >&5
|
||||||
ac_lib_var=`echo tiff'_'main | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo tiff'_'main | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
@ -789,14 +908,14 @@ else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ltiff $LIBS"
|
LIBS="-ltiff $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 793 "configure"
|
#line 912 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
main()
|
main()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -961,8 +1080,23 @@ s%@includedir@%$includedir%g
|
||||||
s%@oldincludedir@%$oldincludedir%g
|
s%@oldincludedir@%$oldincludedir%g
|
||||||
s%@infodir@%$infodir%g
|
s%@infodir@%$infodir%g
|
||||||
s%@mandir@%$mandir%g
|
s%@mandir@%$mandir%g
|
||||||
|
s%@host@%$host%g
|
||||||
|
s%@host_alias@%$host_alias%g
|
||||||
|
s%@host_cpu@%$host_cpu%g
|
||||||
|
s%@host_vendor@%$host_vendor%g
|
||||||
|
s%@host_os@%$host_os%g
|
||||||
|
s%@target@%$target%g
|
||||||
|
s%@target_alias@%$target_alias%g
|
||||||
|
s%@target_cpu@%$target_cpu%g
|
||||||
|
s%@target_vendor@%$target_vendor%g
|
||||||
|
s%@target_os@%$target_os%g
|
||||||
|
s%@build@%$build%g
|
||||||
|
s%@build_alias@%$build_alias%g
|
||||||
|
s%@build_cpu@%$build_cpu%g
|
||||||
|
s%@build_vendor@%$build_vendor%g
|
||||||
|
s%@build_os@%$build_os%g
|
||||||
s%@CPP@%$CPP%g
|
s%@CPP@%$CPP%g
|
||||||
s%@ADDITIONAL_LDFLAGS@%$ADDITIONAL_LDFLAGS%g
|
s%@ADDITIONAL_LIB_DIRS@%$ADDITIONAL_LIB_DIRS%g
|
||||||
s%@ADDITIONAL_INCLUDE_DIRS@%$ADDITIONAL_INCLUDE_DIRS%g
|
s%@ADDITIONAL_INCLUDE_DIRS@%$ADDITIONAL_INCLUDE_DIRS%g
|
||||||
|
|
||||||
CEOF
|
CEOF
|
||||||
|
|
16
configure.in
16
configure.in
|
@ -27,6 +27,11 @@ AC_INIT(Source/NSApplication.m)
|
||||||
|
|
||||||
AC_CONFIG_HEADER(Headers/gnustep/gui/config.h)
|
AC_CONFIG_HEADER(Headers/gnustep/gui/config.h)
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# Determine the host, build, and target systems
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
AC_CANONICAL_SYSTEM
|
||||||
|
|
||||||
AC_CHECK_LIB(m, main)
|
AC_CHECK_LIB(m, main)
|
||||||
AC_CHECK_FUNCS(rintf)
|
AC_CHECK_FUNCS(rintf)
|
||||||
|
|
||||||
|
@ -42,6 +47,13 @@ AC_ARG_WITH(tiff_include,
|
||||||
[ --with-tiff-include=DIR TIFF include files are in DIR], ,
|
[ --with-tiff-include=DIR TIFF include files are in DIR], ,
|
||||||
with_tiff_include=)
|
with_tiff_include=)
|
||||||
|
|
||||||
|
case "$target_os" in
|
||||||
|
freebsd*) CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||||
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||||
|
ADDITIONAL_INCLUDE_DIRS="-I/usr/local/include"
|
||||||
|
ADDITIONAL_LIB_DIRS="-L/usr/local/lib";;
|
||||||
|
esac
|
||||||
|
|
||||||
save_cpp=${CPPFLAGS}
|
save_cpp=${CPPFLAGS}
|
||||||
save_ldf=${LDFLAGS}
|
save_ldf=${LDFLAGS}
|
||||||
if test "$with_tiff_include" != ""; then
|
if test "$with_tiff_include" != ""; then
|
||||||
|
@ -50,7 +62,7 @@ if test "$with_tiff_include" != ""; then
|
||||||
fi
|
fi
|
||||||
if test -n "$with_tiff_library"; then
|
if test -n "$with_tiff_library"; then
|
||||||
LDFLAGS="-L$with_tiff_library $LDFLAGS"
|
LDFLAGS="-L$with_tiff_library $LDFLAGS"
|
||||||
ADDITIONAL_LDFLAGS="-L$with_tiff_library"
|
ADDITIONAL_LIB_DIRS="-L$with_tiff_library"
|
||||||
fi
|
fi
|
||||||
AC_CHECK_HEADER(tiffio.h)
|
AC_CHECK_HEADER(tiffio.h)
|
||||||
if test $ac_cv_header_tiffio_h = no; then
|
if test $ac_cv_header_tiffio_h = no; then
|
||||||
|
@ -65,7 +77,7 @@ AC_CHECK_LIB(tiff, main)
|
||||||
CPPFLAGS="$save_cpp"
|
CPPFLAGS="$save_cpp"
|
||||||
LDFLAGS="$save_ldf"
|
LDFLAGS="$save_ldf"
|
||||||
|
|
||||||
AC_SUBST(ADDITIONAL_LDFLAGS)
|
AC_SUBST(ADDITIONAL_LIB_DIRS)
|
||||||
AC_SUBST(ADDITIONAL_INCLUDE_DIRS)
|
AC_SUBST(ADDITIONAL_INCLUDE_DIRS)
|
||||||
|
|
||||||
AC_OUTPUT(config.make)
|
AC_OUTPUT(config.make)
|
||||||
|
|
119
install-sh
Executable file
119
install-sh
Executable file
|
@ -0,0 +1,119 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# install - install a program, script, or datafile
|
||||||
|
# This comes from X11R5; it is not part of GNU.
|
||||||
|
#
|
||||||
|
# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
|
||||||
|
#
|
||||||
|
# This script is compatible with the BSD install script, but was written
|
||||||
|
# from scratch.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# set DOITPROG to echo to test this script
|
||||||
|
|
||||||
|
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||||
|
doit="${DOITPROG-}"
|
||||||
|
|
||||||
|
|
||||||
|
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||||
|
|
||||||
|
mvprog="${MVPROG-mv}"
|
||||||
|
cpprog="${CPPROG-cp}"
|
||||||
|
chmodprog="${CHMODPROG-chmod}"
|
||||||
|
chownprog="${CHOWNPROG-chown}"
|
||||||
|
chgrpprog="${CHGRPPROG-chgrp}"
|
||||||
|
stripprog="${STRIPPROG-strip}"
|
||||||
|
rmprog="${RMPROG-rm}"
|
||||||
|
|
||||||
|
instcmd="$cpprog"
|
||||||
|
chmodcmd=""
|
||||||
|
chowncmd=""
|
||||||
|
chgrpcmd=""
|
||||||
|
stripcmd=""
|
||||||
|
rmcmd="$rmprog -f"
|
||||||
|
mvcmd="$mvprog"
|
||||||
|
src=""
|
||||||
|
dst=""
|
||||||
|
|
||||||
|
while [ x"$1" != x ]; do
|
||||||
|
case $1 in
|
||||||
|
-c) instcmd="$cpprog"
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-m) chmodcmd="$chmodprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-o) chowncmd="$chownprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-s) stripcmd="$stripprog"
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
*) if [ x"$src" = x ]
|
||||||
|
then
|
||||||
|
src=$1
|
||||||
|
else
|
||||||
|
dst=$1
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ x"$src" = x ]
|
||||||
|
then
|
||||||
|
echo "install: no input file specified"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$dst" = x ]
|
||||||
|
then
|
||||||
|
echo "install: no destination specified"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# If destination is a directory, append the input filename; if your system
|
||||||
|
# does not like double slashes in filenames, you may need to add some logic
|
||||||
|
|
||||||
|
if [ -d $dst ]
|
||||||
|
then
|
||||||
|
dst="$dst"/`basename $src`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make a temp file name in the proper directory.
|
||||||
|
|
||||||
|
dstdir=`dirname $dst`
|
||||||
|
dsttmp=$dstdir/#inst.$$#
|
||||||
|
|
||||||
|
# Move or copy the file name to the temp name
|
||||||
|
|
||||||
|
$doit $instcmd $src $dsttmp
|
||||||
|
|
||||||
|
# and set any options; do chmod last to preserve setuid bits
|
||||||
|
|
||||||
|
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
|
||||||
|
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
|
||||||
|
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
|
||||||
|
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
|
||||||
|
$doit $rmcmd $dst
|
||||||
|
$doit $mvcmd $dsttmp $dst
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue