* Source/NSColorPanel.m: Always send action and colorChanged: when

the color changes. NSColorPanel is always "continuous" for now...
to support -isContinuous == NO, we need to augment the API between
the color panel and the pickers so they can send a message when
the mouse is released.
* Source/NSTextView.m: Change typing attributes in response to
colorChanged:


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34105 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ericwa 2011-11-01 20:31:24 +00:00
parent d3f2649460
commit b36b46c5b8
3 changed files with 28 additions and 5 deletions

View file

@ -3175,7 +3175,18 @@ This method is for user changes; see NSTextView_actions.m.
NSColor *aColor = (NSColor *)[sender color];
NSRange aRange = [self rangeForUserCharacterAttributeChange];
if (aRange.location == NSNotFound)
// FIXME: support undo
/* Set typing attributes */
if (_layoutManager)
{
[_layoutManager->_typingAttributes setObject: aColor
forKey: NSForegroundColorAttributeName];
[notificationCenter postNotificationName: NSTextViewDidChangeTypingAttributesNotification
object: _notifObject];
}
if (aRange.location == NSNotFound || aRange.length == 0)
return;
if (![self shouldChangeTextInRange: aRange