Minor fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4741 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-08-22 11:03:10 +00:00
parent 10e5bb5a8f
commit 6393cf81c4
3 changed files with 18 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Sun Aug 22 11:52:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSView.m: ([-viewWillMoveToWindow:]) fixed to call method
in subviews when new window is nil.
1999-08-22 Gerrit van Dyk <gerritvd@decimax.com>
* Headers/NSProgressIndicator.h

View file

@ -1153,7 +1153,7 @@ Ghiradelli chocolate to he who puts all the pieces together :) */
for (i=0;i<[lines count];i++)
{
NSRect aRect, *bRect;
NSRect aRect, bRect;
float padding = [aContainer lineFragmentPadding];
NSRange ourRange;
@ -1175,9 +1175,10 @@ intValue]);
// ask our textContainer to fix our lineFragment.
secondProposedRect = [aContainer lineFragmentRectForProposedRect:firstProposedRect
sweepDirection: NULL
movementDirection: NULL
secondProposedRect = [aContainer
lineFragmentRectForProposedRect: firstProposedRect
sweepDirection: NSLineSweepLeft
movementDirection: NSLineMoveLeft
remainingRect: &bRect];
// set the line fragmentRect for this range.

View file

@ -481,9 +481,14 @@ GSSetDragTypes(NSView* obj, NSArray *types)
super_view = newSuper;
}
/*
* NOTE - this method is used when removing a view from a window
* (in which case, newWindow is nil) to let all the subviews know
* that they have also been removed from the window.
*/
- (void) viewWillMoveToWindow: (NSWindow*)newWindow
{
if (newWindow == window || !newWindow)
if (newWindow == window)
return;
if (_rFlags.has_draginfo)
@ -493,7 +498,8 @@ GSSetDragTypes(NSView* obj, NSArray *types)
if (window != nil)
[ctxt _removeDragTypes: t fromWindow: [window windowNumber]];
[ctxt _addDragTypes: t toWindow: [newWindow windowNumber]];
if (newWindow != nil)
[ctxt _addDragTypes: t toWindow: [newWindow windowNumber]];
}
window = newWindow;