* Source/NSSavePanel.m ([NSSavePanel -browser:createRowsForColumn:

inMatrix:]): do not treat a file package a directory with an empty
extension.
* Source/NSMatrix.m ([NSMatrix -_mouseDownNonListMode:]): retain the
currentEvent. Fix to prevent theEvent to become nil.
Do not allow empty selection in NSRadioModeMatrix.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9834 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Mirko Viviani 2001-05-05 21:45:59 +00:00
parent 374e5a71b1
commit 50cf187fad
3 changed files with 26 additions and 11 deletions

View file

@ -1,3 +1,12 @@
2001-05-05 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Source/NSSavePanel.m ([NSSavePanel -browser:createRowsForColumn:
inMatrix:]): do not treat a file package a directory with an empty
extension.
* Source/NSMatrix.m ([NSMatrix -_mouseDownNonListMode:]): retain the
currentEvent. Fix to prevent theEvent to become nil.
Do not allow empty selection in NSRadioModeMatrix.
2000-05-01 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/GSMethodTable.h:

View file

@ -1948,6 +1948,9 @@ static SEL getSel;
column: &mouseColumn
forPoint: mouseLocation];
if (!onCell)
scrolling = NO;
if (onCell)
{
mouseCellFrame = [self cellFrameAtRow: mouseRow column: mouseColumn];
@ -1956,8 +1959,7 @@ static SEL getSel;
if (_autoscroll)
scrolling = [self scrollRectToVisible: mouseCellFrame];
if ([mouseCell isEnabled]
&& [self mouse: mouseLocation inRect: mouseCellFrame])
if ([mouseCell isEnabled])
{
if ([mouseCell acceptsFirstResponder])
{
@ -2009,7 +2011,7 @@ static SEL getSel;
if (_mode != NSTrackModeMatrix)
{
if(_mode == NSRadioModeMatrix && !_allowsEmptySelection)
if(_mode == NSRadioModeMatrix)
{
if (!mouseUpInCell)
[mouseCell setState: NSOnState];
@ -2025,9 +2027,10 @@ static SEL getSel;
if (!mouseUpInCell)
{
currentEvent = [NSApp currentEvent];
ASSIGN(currentEvent, [NSApp currentEvent]);
if (currentEvent && [currentEvent type] != NSPeriodic)
if (currentEvent && currentEvent != theEvent
&& [currentEvent type] != NSPeriodic)
{
if (!scrolling)
{
@ -2036,11 +2039,11 @@ static SEL getSel;
}
}
else
currentEvent = nil;
DESTROY(currentEvent);
}
}
}
else if (_mode != NSRadioModeMatrix || _allowsEmptySelection)
else if (_mode != NSRadioModeMatrix)
{
// mouse is not over a Cell
if (_selectedCell != nil)
@ -2061,7 +2064,7 @@ static SEL getSel;
if (!mouseUpInCell)
{
theEvent = [NSApp nextEventMatchingMask: eventMask
untilDate: !scrolling && currentEvent
untilDate: !scrolling || !currentEvent
? [NSDate distantFuture]
: [NSDate dateWithTimeIntervalSinceNow: 0.05]
inMode: NSEventTrackingRunLoopMode
@ -2070,10 +2073,12 @@ static SEL getSel;
if (scrolling && !theEvent)
theEvent = currentEvent;
else
currentEvent = nil;
DESTROY(currentEvent);
}
}
RELEASE(currentEvent);
// the mouse went up.
// if it was inside a cell, the cell has already sent the action.
// if not, _selectedCell is the last cell that had the mouse, and
@ -2081,7 +2086,7 @@ static SEL getSel;
// anyway, the action has to be sent
if (!mouseUpInCell)
{
if (_mode != NSRadioModeMatrix || _allowsEmptySelection)
if (_mode != NSRadioModeMatrix)
{
if (_selectedCell != nil)
{

View file

@ -1057,7 +1057,8 @@ createRowsForColumn: (int)column
shouldShowFilename: pathAndFile];
}
if (_treatsFilePackagesAsDirectories == NO && isDir == YES && exists)
if (_treatsFilePackagesAsDirectories == NO && isDir == YES && exists
&& ![extension isEqualToString: @""])
{
// Ones with more chance first
if ([self isMemberOfClass: [NSSavePanel class]] == YES)