mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:50:44 +00:00
* Source/GSLayoutManager.m: do not return (0,0) when a zero length
range is passed into glyphRangeForCharacterRange: actualCharacterRange:. Tests on Mac OS X indicate that this is a valid case. * Source/GSNibLoading.m: Fixed some memory leaks. * Source/NSRulerMarker.m: Use the bounds of the containing view instead of markersRect. I will revisit if the _markersRect method needs to be corrected, but this code seems to correct problems observed when dragging markers in and out of the rulerView. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27986 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2229c7fc91
commit
26e2eb86ea
4 changed files with 22 additions and 20 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2009-02-26 00:35-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/GSLayoutManager.m: do not return (0,0) when a zero length
|
||||
range is passed into glyphRangeForCharacterRange:
|
||||
actualCharacterRange:. Tests on Mac OS X indicate that this is
|
||||
a valid case.
|
||||
* Source/GSNibLoading.m: Fixed some memory leaks.
|
||||
* Source/NSRulerMarker.m: Use the bounds of the containing view
|
||||
instead of markersRect. I will revisit if the _markersRect method
|
||||
needs to be corrected, but this code seems to correct problems
|
||||
observed when dragging markers in and out of the rulerView.
|
||||
|
||||
2009-02-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSSavePanel.m (-directory): Optimize last change.
|
||||
|
@ -312,7 +324,7 @@
|
|||
|
||||
2009-01-28 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSWindow.m (GSWindowWithNumber): Protect agains
|
||||
* Source/NSWindow.m (GSWindowWithNumber): Protect against
|
||||
windowmaps not being set.
|
||||
|
||||
2009-01-27 15:28-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
|
|
@ -1137,16 +1137,6 @@ Fills in all glyph holes up to last. only looking at levels below level
|
|||
}
|
||||
#endif
|
||||
|
||||
/* TODO: this case is also dubious, but it makes sense to return like this,
|
||||
so it's mostly the caller's fault */
|
||||
if (charRange.length == 0)
|
||||
{
|
||||
NSLog(@"Warning: %s called with zero-length range", __PRETTY_FUNCTION__);
|
||||
if (actualCharRange)
|
||||
*actualCharRange = NSMakeRange(0, 0);
|
||||
return NSMakeRange(0, 0);
|
||||
}
|
||||
|
||||
pos = NSMaxRange(charRange) - 1;
|
||||
[self _generateGlyphsUpToCharacter: pos];
|
||||
if (glyphs->char_length <= pos)
|
||||
|
|
|
@ -205,9 +205,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
@implementation NSView (NibCompatibility)
|
||||
- (void) _setWindow: (id) w
|
||||
{
|
||||
// FIXME: Why is this an ASSIGN? The view is held by the window
|
||||
// not the othe way around.
|
||||
ASSIGN(_window,w);
|
||||
_window = w;
|
||||
}
|
||||
|
||||
- (void) _fixSubviews
|
||||
|
@ -804,7 +802,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (id) initWithCoder: (NSCoder *)aCoder
|
||||
{
|
||||
// FIXME: Should release self
|
||||
RELEASE(self);
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -1440,6 +1438,8 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
{
|
||||
[self instantiateRealObject: coder withClassName: _className];
|
||||
}
|
||||
|
||||
RELEASE(self);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1448,7 +1448,6 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
NSStringFromClass([coder class])];
|
||||
}
|
||||
|
||||
// FIXME: Needs to release self
|
||||
return _template;
|
||||
}
|
||||
|
||||
|
|
|
@ -241,6 +241,7 @@
|
|||
NSRect markersRect;
|
||||
float location;
|
||||
NSRect drawRect;
|
||||
NSRect bounds = [_rulerView bounds];
|
||||
NSPoint drawPoint;
|
||||
BOOL returnValue = NO;
|
||||
NSWindow *window;
|
||||
|
@ -341,9 +342,9 @@
|
|||
while (_isDragging)
|
||||
{
|
||||
newEvent = [NSApp nextEventMatchingMask: eventMask
|
||||
untilDate: [NSDate distantFuture]
|
||||
inMode: NSEventTrackingRunLoopMode
|
||||
dequeue: YES];
|
||||
untilDate: [NSDate distantFuture]
|
||||
inMode: NSEventTrackingRunLoopMode
|
||||
dequeue: YES];
|
||||
switch ([newEvent type])
|
||||
{
|
||||
case NSLeftMouseDragged:
|
||||
|
@ -364,7 +365,7 @@
|
|||
/* see if mouse is far from ruler area (to remove marker) */
|
||||
mousePositionInRuler = [_rulerView convertPoint: mousePositionInWindow
|
||||
fromView: nil];
|
||||
isFar = !NSMouseInRect(mousePositionInRuler, markersRect, flipped);
|
||||
isFar = !NSMouseInRect(mousePositionInRuler, bounds, flipped);
|
||||
|
||||
/* if it is the first time it's far from the ruler area,
|
||||
see if it can be removed */
|
||||
|
|
Loading…
Reference in a new issue