mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 02:41:01 +00:00
* 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:
parent
374e5a71b1
commit
50cf187fad
3 changed files with 26 additions and 11 deletions
|
@ -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>
|
2000-05-01 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Headers/AppKit/GSMethodTable.h:
|
* Headers/AppKit/GSMethodTable.h:
|
||||||
|
|
|
@ -1948,6 +1948,9 @@ static SEL getSel;
|
||||||
column: &mouseColumn
|
column: &mouseColumn
|
||||||
forPoint: mouseLocation];
|
forPoint: mouseLocation];
|
||||||
|
|
||||||
|
if (!onCell)
|
||||||
|
scrolling = NO;
|
||||||
|
|
||||||
if (onCell)
|
if (onCell)
|
||||||
{
|
{
|
||||||
mouseCellFrame = [self cellFrameAtRow: mouseRow column: mouseColumn];
|
mouseCellFrame = [self cellFrameAtRow: mouseRow column: mouseColumn];
|
||||||
|
@ -1956,8 +1959,7 @@ static SEL getSel;
|
||||||
if (_autoscroll)
|
if (_autoscroll)
|
||||||
scrolling = [self scrollRectToVisible: mouseCellFrame];
|
scrolling = [self scrollRectToVisible: mouseCellFrame];
|
||||||
|
|
||||||
if ([mouseCell isEnabled]
|
if ([mouseCell isEnabled])
|
||||||
&& [self mouse: mouseLocation inRect: mouseCellFrame])
|
|
||||||
{
|
{
|
||||||
if ([mouseCell acceptsFirstResponder])
|
if ([mouseCell acceptsFirstResponder])
|
||||||
{
|
{
|
||||||
|
@ -2009,7 +2011,7 @@ static SEL getSel;
|
||||||
|
|
||||||
if (_mode != NSTrackModeMatrix)
|
if (_mode != NSTrackModeMatrix)
|
||||||
{
|
{
|
||||||
if(_mode == NSRadioModeMatrix && !_allowsEmptySelection)
|
if(_mode == NSRadioModeMatrix)
|
||||||
{
|
{
|
||||||
if (!mouseUpInCell)
|
if (!mouseUpInCell)
|
||||||
[mouseCell setState: NSOnState];
|
[mouseCell setState: NSOnState];
|
||||||
|
@ -2025,9 +2027,10 @@ static SEL getSel;
|
||||||
|
|
||||||
if (!mouseUpInCell)
|
if (!mouseUpInCell)
|
||||||
{
|
{
|
||||||
currentEvent = [NSApp currentEvent];
|
ASSIGN(currentEvent, [NSApp currentEvent]);
|
||||||
|
|
||||||
if (currentEvent && [currentEvent type] != NSPeriodic)
|
if (currentEvent && currentEvent != theEvent
|
||||||
|
&& [currentEvent type] != NSPeriodic)
|
||||||
{
|
{
|
||||||
if (!scrolling)
|
if (!scrolling)
|
||||||
{
|
{
|
||||||
|
@ -2036,11 +2039,11 @@ static SEL getSel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
currentEvent = nil;
|
DESTROY(currentEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_mode != NSRadioModeMatrix || _allowsEmptySelection)
|
else if (_mode != NSRadioModeMatrix)
|
||||||
{
|
{
|
||||||
// mouse is not over a Cell
|
// mouse is not over a Cell
|
||||||
if (_selectedCell != nil)
|
if (_selectedCell != nil)
|
||||||
|
@ -2061,7 +2064,7 @@ static SEL getSel;
|
||||||
if (!mouseUpInCell)
|
if (!mouseUpInCell)
|
||||||
{
|
{
|
||||||
theEvent = [NSApp nextEventMatchingMask: eventMask
|
theEvent = [NSApp nextEventMatchingMask: eventMask
|
||||||
untilDate: !scrolling && currentEvent
|
untilDate: !scrolling || !currentEvent
|
||||||
? [NSDate distantFuture]
|
? [NSDate distantFuture]
|
||||||
: [NSDate dateWithTimeIntervalSinceNow: 0.05]
|
: [NSDate dateWithTimeIntervalSinceNow: 0.05]
|
||||||
inMode: NSEventTrackingRunLoopMode
|
inMode: NSEventTrackingRunLoopMode
|
||||||
|
@ -2070,10 +2073,12 @@ static SEL getSel;
|
||||||
if (scrolling && !theEvent)
|
if (scrolling && !theEvent)
|
||||||
theEvent = currentEvent;
|
theEvent = currentEvent;
|
||||||
else
|
else
|
||||||
currentEvent = nil;
|
DESTROY(currentEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RELEASE(currentEvent);
|
||||||
|
|
||||||
// the mouse went up.
|
// the mouse went up.
|
||||||
// if it was inside a cell, the cell has already sent the action.
|
// 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
|
// 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
|
// anyway, the action has to be sent
|
||||||
if (!mouseUpInCell)
|
if (!mouseUpInCell)
|
||||||
{
|
{
|
||||||
if (_mode != NSRadioModeMatrix || _allowsEmptySelection)
|
if (_mode != NSRadioModeMatrix)
|
||||||
{
|
{
|
||||||
if (_selectedCell != nil)
|
if (_selectedCell != nil)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1057,7 +1057,8 @@ createRowsForColumn: (int)column
|
||||||
shouldShowFilename: pathAndFile];
|
shouldShowFilename: pathAndFile];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_treatsFilePackagesAsDirectories == NO && isDir == YES && exists)
|
if (_treatsFilePackagesAsDirectories == NO && isDir == YES && exists
|
||||||
|
&& ![extension isEqualToString: @""])
|
||||||
{
|
{
|
||||||
// Ones with more chance first
|
// Ones with more chance first
|
||||||
if ([self isMemberOfClass: [NSSavePanel class]] == YES)
|
if ([self isMemberOfClass: [NSSavePanel class]] == YES)
|
||||||
|
|
Loading…
Reference in a new issue