From 3ec4d3e37449742ab46f2feb0689f8cb0567861f Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Tue, 24 Apr 2012 16:27:36 -0700 Subject: [PATCH] Encode/Decode tooltip in CPView --- AppKit/CPView.j | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AppKit/CPView.j b/AppKit/CPView.j index deb71c195..a16562a7a 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -2707,6 +2707,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask", CPViewBoundsKey = @"CPViewBoundsKey", CPViewFrameKey = @"CPViewFrameKey", CPViewHitTestsKey = @"CPViewHitTestsKey", + CPViewToolTipKey = @"CPViewToolTipKey", CPViewIsHiddenKey = @"CPViewIsHiddenKey", CPViewOpacityKey = @"CPViewOpacityKey", CPViewSubviewsKey = @"CPViewSubviewsKey", @@ -2763,6 +2764,10 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask", _hitTests = ![aCoder containsValueForKey:CPViewHitTestsKey] || [aCoder decodeBoolForKey:CPViewHitTestsKey]; +#if PLATFORM(DOM) + [self setToolTip:[aCoder decodeObjectForKey:CPViewToolTipKey]]; +#endif + // DOM SETUP #if PLATFORM(DOM) _DOMImageParts = []; @@ -2870,6 +2875,9 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask", if (_isHidden) [aCoder encodeBool:_isHidden forKey:CPViewIsHiddenKey]; + if (_toolTip) + [aCoder encodeObject:_toolTip forKey:CPViewToolTipKey]; + var nextKeyView = [self nextKeyView]; if (nextKeyView !== nil && ![nextKeyView isEqual:self])