From bef7e3dc54e061e79204ffeda1c6bb62c1d77d3d Mon Sep 17 00:00:00 2001 From: FredKiefer Date: Tue, 20 Feb 2001 01:02:06 +0000 Subject: [PATCH] [_initWithoutGModel] set target and action for the main colour well. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9188 72102866-910b-0410-8b05-ffd578937521 --- Source/NSColorPanel.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/NSColorPanel.m b/Source/NSColorPanel.m index ef7fbed74..a33341827 100644 --- a/Source/NSColorPanel.m +++ b/Source/NSColorPanel.m @@ -232,7 +232,8 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel; _colorWell = [[NSColorWell alloc] initWithFrame: wellRect]; [_colorWell setAutoresizingMask: (NSViewWidthSizable | NSViewMinYMargin)]; [_colorWell setBordered: NO]; - // FIXME: How can we monitor colours that get dropped here? + [_colorWell setTarget: self]; + [_colorWell setAction: @selector(_updatePicker:)]; [_topView addSubview: _colorWell]; // Prototype cell for the matrix @@ -343,6 +344,11 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel; NSLog(@"Magnification is not implemented"); } +- (void) _updatePicker: (id) sender +{ + [_currentPicker setColor: [_colorWell color]]; +} + @end @implementation NSColorPanel