From e0eb6df937525b40191a231ad72a74fb55518c75 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 5 Nov 2007 06:53:13 +0000 Subject: put tk_chooseColor back in place after global search and replace object renaming fucked it up svn path=/trunk/externals/hcs/; revision=8937 --- colorpanel.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'colorpanel.c') diff --git a/colorpanel.c b/colorpanel.c index 00945b5..569b762 100644 --- a/colorpanel.c +++ b/colorpanel.c @@ -3,6 +3,8 @@ #include #include +#define DEBUG(x) + static t_class *colorpanel_class; typedef struct _colorpanel @@ -14,15 +16,15 @@ typedef struct _colorpanel static void colorpanel_bang(t_colorpanel *x) { - post("pd [concat %s callback [tk_colorpanel -initialcolor %s] \\;]\n", - x->x_s->s_name, x->current_color); - sys_vgui("pd [concat %s callback [tk_colorpanel -initialcolor %s] \\;]\n", + DEBUG(post("pd [concat %s callback [tk_chooseColor -initialcolor %s] \\;]\n", + x->x_s->s_name, x->current_color);); + sys_vgui("pd [concat %s callback [tk_chooseColor -initialcolor %s] \\;]\n", x->x_s->s_name, x->current_color); } static void colorpanel_symbol(t_colorpanel *x, t_symbol *s) { - post("setting initial color: %s", s->s_name); + DEBUG(post("setting initial color: %s", s->s_name);); strncpy(x->current_color, s->s_name, MAXPDSTRING); colorpanel_bang(x); } @@ -52,7 +54,7 @@ static void colorpanel_list(t_colorpanel *x, t_symbol *s, int argc, t_atom *argv } } memcpy(x->current_color, color_string, 7); - post("setting initial color: %s", x->current_color); + DEBUG(post("setting initial color: %s", x->current_color);); colorpanel_bang(x); } @@ -63,10 +65,8 @@ static void colorpanel_callback(t_colorpanel *x, t_symbol *color) if(color != &s_) { - post("callback color: %s", color->s_name); strncpy(x->current_color, color->s_name, MAXPDSTRING); sscanf(x->current_color, "#%02x%02x%02x", &red, &green, &blue); - post("current color: %s", x->current_color); SETFLOAT(output_atoms, (t_float) red / 255); SETFLOAT(output_atoms + 1, (t_float) green / 255); SETFLOAT(output_atoms + 2, (t_float) blue / 255); -- cgit v1.2.1