* 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

@ -365,9 +365,6 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
- (void) _apply: (id) sender
{
// This is currently not used
[NSApp sendAction: @selector(changeColor:) to: nil from: self];
if ((_action) && (_target != nil))
[NSApp sendAction: _action to: _target from: self];
}
- (void) _magnify: (id) sender
@ -745,7 +742,12 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
if ([self showsAlpha])
[_alphaSlider setFloatValue: [aColor alphaComponent] * MAX_ALPHA_VALUE];
if (_isContinuous && (_action) && (_target != nil))
// FIXME: to support [self isContinuous] the API between color pickers
// and NSColorPanel needs some changes. Currently the color panel is
// always continuous
[NSApp sendAction: @selector(changeColor:) to: nil from: self];
if ((_action) && (_target != nil))
[NSApp sendAction: _action to: _target from: self];
[[NSNotificationCenter defaultCenter]