* Source/NSSplitView.m ([NSSplitView -initWithCoder:]):

set _never_displayed_before to YES.
* Source/NSFont.m: rearrange the last change to make
  it look like other classes' initWithCoder/encodeWithCoder
* Source/NSTextView.m: do not call _blink directly
  (suggested by Nicola Pero).
* Source/NSButtonCell.m
  ([NSButtonCell -drawInteriorWithFrame:inView:]):
  if the button is NSImageOnly, draw the dotted frame at
  the right location.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14483 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Pierre-Yves Rivaille 2002-09-18 18:00:30 +00:00
parent 12644d7d71
commit f9bdd044b1
5 changed files with 41 additions and 21 deletions

View file

@ -1,3 +1,16 @@
2002-09-18 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
* Source/NSSplitView.m ([NSSplitView -initWithCoder:]):
set _never_displayed_before to YES.
* Source/NSFont.m: rearrange the last change to make
it look like other classes' initWithCoder/encodeWithCoder
* Source/NSTextView.m: do not call _blink directly
(suggested by Nicola Pero).
* Source/NSButtonCell.m
([NSButtonCell -drawInteriorWithFrame:inView:]):
if the button is NSImageOnly, draw the dotted frame at
the right location.
2002-09-16 19:28 Alexander Malmberg <alexander@malmberg.org>
* Source/NSFont (+initialize, -initWithCoder:, -encodeWithCoder:):

View file

@ -856,6 +856,8 @@
{
if (_cell.is_bordered || _cell.is_bezeled)
NSDottedFrameRect(cellFrame);
else if (ipos == NSImageOnly)
NSDottedFrameRect(cellFrame);
else
NSDottedFrameRect(titleRect);
}

View file

@ -50,6 +50,8 @@ static BOOL userFixedCacheNeedsRecomputing = NO;
matrix: (const float*)fontMatrix;
@end
static int currentVersion = 2;
/**
<unit>
<heading>NSFont</heading>
@ -166,7 +168,7 @@ setNSFont(NSString* key, NSFont* font)
defaults = RETAIN([NSUserDefaults standardUserDefaults]);
}
[self setVersion: 2];
[self setVersion: currentVersion];
}
}
@ -780,25 +782,28 @@ setNSFont(NSString* key, NSFont* font)
{
int version = [aDecoder versionForClassName:
@"NSFont"];
id name;
float fontMatrix[6];
name = [aDecoder decodeObject];
[aDecoder decodeArrayOfObjCType: @encode(float) count: 6 at: fontMatrix];
self = [self initWithName: name matrix: fontMatrix];
if (version == 2)
if (version == currentVersion)
{
id name;
float fontMatrix[6];
name = [aDecoder decodeObject];
[aDecoder decodeArrayOfObjCType: @encode(float) count: 6 at: fontMatrix];
self = [self initWithName: name matrix: fontMatrix];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &matrixExplicitlySet];
}
else
{
id name;
float fontMatrix[6];
name = [aDecoder decodeObject];
[aDecoder decodeArrayOfObjCType: @encode(float) count: 6 at: fontMatrix];
self = [self initWithName: name matrix: fontMatrix];
if (fontMatrix[0] == fontMatrix[3]
&& fontMatrix[1]==0.0
&& fontMatrix[2]==0.0)
{
matrixExplicitlySet = NO;
}
&& fontMatrix[1] == 0.0
&& fontMatrix[2] == 0.0)
matrixExplicitlySet = NO;
}
return self;
}

View file

@ -931,7 +931,7 @@ static inline NSPoint centerSizeInRect(NSSize innerSize, NSRect outerRect)
*
*/
_dividerWidth = [self dividerThickness];
_never_displayed_before = YES;
return self;
}

View file

@ -1770,8 +1770,6 @@ static NSNotificationCenter *nc;
/* Start blinking timer if not yet started */
if (_insertionPointTimer == nil && [self shouldDrawInsertionPoint])
{
_drawInsertionPointNow = NO;
[self _blink: nil];
_insertionPointTimer = [NSTimer scheduledTimerWithTimeInterval: 0.5
target: self
selector: @selector(_blink:)
@ -1783,9 +1781,8 @@ static NSNotificationCenter *nc;
{
[_insertionPointTimer invalidate];
DESTROY (_insertionPointTimer);
[self setNeedsDisplayInRect: oldInsertionPointRect];
_drawInsertionPointNow = NO;
[self _blink: nil];
[self setNeedsDisplayInRect: oldInsertionPointRect
avoidAdditionalLayout: YES];
_insertionPointTimer = [NSTimer scheduledTimerWithTimeInterval: 0.5
target: self
selector: @selector(_blink:)
@ -1799,12 +1796,15 @@ static NSNotificationCenter *nc;
* possible.
*/
_drawInsertionPointNow = YES;
[self setNeedsDisplayInRect: _insertionPointRect
avoidAdditionalLayout: YES];
}
else
{
if (_insertionPointTimer != nil)
{
[self setNeedsDisplayInRect: oldInsertionPointRect];
[self setNeedsDisplayInRect: oldInsertionPointRect
avoidAdditionalLayout: YES];
[_insertionPointTimer invalidate];
DESTROY (_insertionPointTimer);