Two small patches by Wolfgang Lux <wolfgang.lux@gmail.com>.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25549 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2007-11-01 10:15:35 +00:00
parent d1d2f1b02c
commit eb23e9991d
3 changed files with 18 additions and 10 deletions

View file

@ -1,3 +1,11 @@
2007-11-01 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTableView.m (-draggingUpdated:): Use
currentDropOperation instead of NSTableViewDropAbove.
* Source/NSDocument.m (-windowForSheet): Return nil instead of
mainWindow, when there is no associated window.
Patches by Wolfgang Lux <wolfgang.lux@gmail.com>.
2007-10-30 Adam Fedor <fedor@gnu.org> 2007-10-30 Adam Fedor <fedor@gnu.org>
* gnustep-gui.spec.in: Change Copyright to License. * gnustep-gui.spec.in: Change Copyright to License.

View file

@ -352,7 +352,7 @@ withContentsOfURL: (NSURL *)url
return win; return win;
} }
return [NSApp mainWindow]; return nil;
} }
/** /**

View file

@ -6192,13 +6192,13 @@ static BOOL selectContiguousRegion(NSTableView *self,
{ {
currentRow = [self rowAtPoint: p] - 1; currentRow = [self rowAtPoint: p] - 1;
if (currentRow > 0) if (currentRow > 0)
[self scrollRowToVisible: currentRow]; [self scrollRowToVisible: currentRow];
} }
else if (p.y > NSMaxY([self visibleRect])-3) else if (p.y > NSMaxY([self visibleRect])-3)
{ {
currentRow = [self rowAtPoint: p] + 1; currentRow = [self rowAtPoint: p] + 1;
if (currentRow < _numberOfRows) if (currentRow < _numberOfRows)
[self scrollRowToVisible: currentRow]; [self scrollRowToVisible: currentRow];
} }
positionInRow = (int)(p.y - _bounds.origin.y) % (int)_rowHeight; positionInRow = (int)(p.y - _bounds.origin.y) % (int)_rowHeight;
@ -6232,13 +6232,13 @@ static BOOL selectContiguousRegion(NSTableView *self,
{ {
currentDragOperation = dragOperation; currentDragOperation = dragOperation;
if ([_dataSource respondsToSelector: if ([_dataSource respondsToSelector:
@selector(tableView:validateDrop:proposedRow:proposedDropOperation:)]) @selector(tableView:validateDrop:proposedRow:proposedDropOperation:)])
{ {
currentDragOperation = [_dataSource tableView: self currentDragOperation = [_dataSource tableView: self
validateDrop: sender validateDrop: sender
proposedRow: currentDropRow proposedRow: currentDropRow
proposedDropOperation: NSTableViewDropAbove]; proposedDropOperation: currentDropOperation];
} }
lastQuarterPosition = quarterPosition; lastQuarterPosition = quarterPosition;