rem: RColor	color; char	tmp[3]; int		value; W_ColorPanel	*panel = (W_ColorPanel*)observerData;  value = atoi(WMGetTextFieldText(panel->grayBrightnessT)); if (value > 100) value = 100; if (value < 0) value = 0;  sprintf(tmp, "%d", value); WMSetTextFieldText(panel->grayBrightnessT, tmp); WMSetSliderValue(panel->grayBrightnessS, value);  color.red = color.green = color.blue = rint(255.0*value/100.0); WMSetColorPanelColor(panel, color); panel->lastChanged = WMGrayModeColorPanel;
add: RColor    color; char    tmp[4]; int        value; W_ColorPanel    *panel = (W_ColorPanel*)observerData;  value = atoi(WMGetTextFieldText(panel->grayBrightnessT)); if (value > 100) value = 100; if (value < 0) value = 0;  sprintf(tmp, "%d", value); WMSetTextFieldText(panel->grayBrightnessT, tmp); WMSetSliderValue(panel->grayBrightnessS, value);  color.red = color.green = color.blue = rint(255.0*value/100.0); WMSetColorPanelColor(panel, color); panel->lastChanged = WMGrayModeColorPanel;
context: grayBrightnessTextFieldCallback(void *observerData, WMNotification *notification){	RColor	color;	char	tmp[3];	int		value;	W_ColorPanel	*panel = (W_ColorPanel*)observerData;	value = atoi(WMGetTextFieldText(panel->grayBrightnessT));	if (value > 100)		value = 100;	if (value < 0)		value = 0;	sprintf(tmp, "%d", value);	WMSetTextFieldText(panel->grayBrightnessT, tmp);	WMSetSliderValue(panel->grayBrightnessS, value);	color.red = color.green = color.blue = rint(255.0*value/100.0);	WMSetColorPanelColor(panel, color);	panel->lastChanged = WMGrayModeColorPanel;}