mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 13:20:55 +00:00
2000-09-11 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Source/NSBrowser.m ([NSBrowser -_performLoadOfColumn:]): set intercell spacing to 0. * Source/NSMatrix.m ([NSMatrix -mouseDown:]): in NSRadioModeMatrix deselect the previous selected cell only if the cell is valid. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7471 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
69f05100bd
commit
47061712e4
3 changed files with 21 additions and 11 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2000-09-11 Mirko Viviani <mirko.viviani@rccr.cremona.it>
|
||||||
|
|
||||||
|
* Source/NSBrowser.m ([NSBrowser -_performLoadOfColumn:]): set
|
||||||
|
intercell spacing to 0.
|
||||||
|
* Source/NSMatrix.m ([NSMatrix -mouseDown:]): in NSRadioModeMatrix
|
||||||
|
deselect the previous selected cell only if the cell is valid.
|
||||||
|
|
||||||
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
|
2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
|
||||||
|
|
||||||
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
|
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
|
||||||
|
|
|
@ -2815,6 +2815,7 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
{
|
{
|
||||||
id bc, sc, matrix = nil;
|
id bc, sc, matrix = nil;
|
||||||
NSRect matrixRect = {{0, 0}, {100, 100}};
|
NSRect matrixRect = {{0, 0}, {100, 100}};
|
||||||
|
NSSize matrixIntercellSpace = {{0, 0}};
|
||||||
|
|
||||||
#if defined NSBTRACE__performLoadOfColumn || defined NSBTRACE_all
|
#if defined NSBTRACE__performLoadOfColumn || defined NSBTRACE_all
|
||||||
fprintf(stderr, "NSBrowser - (void)_performLoadOfColumn: %d\n", column);
|
fprintf(stderr, "NSBrowser - (void)_performLoadOfColumn: %d\n", column);
|
||||||
|
@ -2846,6 +2847,7 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
prototype: _browserCellPrototype
|
prototype: _browserCellPrototype
|
||||||
numberOfRows: n
|
numberOfRows: n
|
||||||
numberOfColumns: 1];
|
numberOfColumns: 1];
|
||||||
|
[matrix setIntercellSpacing:matrixIntercellSpace];
|
||||||
[matrix setAllowsEmptySelection: _allowsEmptySelection];
|
[matrix setAllowsEmptySelection: _allowsEmptySelection];
|
||||||
if (!_allowsMultipleSelection)
|
if (!_allowsMultipleSelection)
|
||||||
[matrix setMode: NSRadioModeMatrix];
|
[matrix setMode: NSRadioModeMatrix];
|
||||||
|
@ -2877,6 +2879,7 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
prototype: _browserCellPrototype
|
prototype: _browserCellPrototype
|
||||||
numberOfRows: 0
|
numberOfRows: 0
|
||||||
numberOfColumns: 0];
|
numberOfColumns: 0];
|
||||||
|
[matrix setIntercellSpacing:matrixIntercellSpace];
|
||||||
[matrix setAllowsEmptySelection: _allowsEmptySelection];
|
[matrix setAllowsEmptySelection: _allowsEmptySelection];
|
||||||
if (_allowsMultipleSelection)
|
if (_allowsMultipleSelection)
|
||||||
[matrix setMode: NSListModeMatrix];
|
[matrix setMode: NSListModeMatrix];
|
||||||
|
|
|
@ -1917,6 +1917,16 @@ static SEL getSel = @selector(objectAtIndex:);
|
||||||
column: &column
|
column: &column
|
||||||
forPoint: lastLocation])
|
forPoint: lastLocation])
|
||||||
{
|
{
|
||||||
|
if ((_mode == NSRadioModeMatrix) && _selectedCell != nil)
|
||||||
|
{
|
||||||
|
[_selectedCell setState: NSOffState];
|
||||||
|
[self drawCellAtRow: _selectedRow column: _selectedColumn];
|
||||||
|
[_window flushWindow];
|
||||||
|
_selectedCells[_selectedRow][_selectedColumn] = NO;
|
||||||
|
_selectedCell = nil;
|
||||||
|
_selectedRow = _selectedColumn = -1;
|
||||||
|
}
|
||||||
|
|
||||||
if ([_cells[row][column] isSelectable])
|
if ([_cells[row][column] isSelectable])
|
||||||
{
|
{
|
||||||
NSText* t = [_window fieldEditor: YES forObject: self];
|
NSText* t = [_window fieldEditor: YES forObject: self];
|
||||||
|
@ -1969,16 +1979,6 @@ static SEL getSel = @selector(objectAtIndex:);
|
||||||
withPeriod: 0.05];
|
withPeriod: 0.05];
|
||||||
ASSIGN(lastEvent, theEvent);
|
ASSIGN(lastEvent, theEvent);
|
||||||
|
|
||||||
if ((_mode == NSRadioModeMatrix) && _selectedCell != nil)
|
|
||||||
{
|
|
||||||
[_selectedCell setState: NSOffState];
|
|
||||||
[self drawCellAtRow: _selectedRow column: _selectedColumn];
|
|
||||||
[_window flushWindow];
|
|
||||||
_selectedCells[_selectedRow][_selectedColumn] = NO;
|
|
||||||
_selectedCell = nil;
|
|
||||||
_selectedRow = _selectedColumn = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// selection involves two steps, first
|
// selection involves two steps, first
|
||||||
// a loop that continues until the left mouse goes up; then a series of
|
// a loop that continues until the left mouse goes up; then a series of
|
||||||
// steps which send actions and display the cell as it should appear after
|
// steps which send actions and display the cell as it should appear after
|
||||||
|
@ -2036,7 +2036,7 @@ static SEL getSel = @selector(objectAtIndex:);
|
||||||
|
|
||||||
case NSRadioModeMatrix:
|
case NSRadioModeMatrix:
|
||||||
// Radio mode allows no more than one cell to be selected
|
// Radio mode allows no more than one cell to be selected
|
||||||
if (previousCell == aCell)
|
if (previousCell == aCell || aCell == nil)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// deselect previously selected cell
|
// deselect previously selected cell
|
||||||
|
|
Loading…
Reference in a new issue