+
+ colorbutton = GTK_COLOR_BUTTON(GET_COMPONENT("buttonColorChooser"));
+ if ((ui.toolno[ui.cur_mapping] != TOOL_PEN &&
+ ui.toolno[ui.cur_mapping] != TOOL_HIGHLIGHTER &&
+ ui.toolno[ui.cur_mapping] != TOOL_TEXT))
+ gdkcolor.red = gdkcolor.blue = gdkcolor.green = 0;
+ else rgb_to_gdkcolor(ui.cur_brush->color_rgba, &gdkcolor);
+ gtk_color_button_set_color(colorbutton, &gdkcolor);
+ if (ui.toolno[ui.cur_mapping] == TOOL_HIGHLIGHTER) {
+ gtk_color_button_set_alpha(colorbutton,
+ (ui.cur_brush->color_rgba&0xff)*0x101);
+ gtk_color_button_set_use_alpha(colorbutton, TRUE);
+ } else {
+ gtk_color_button_set_alpha(colorbutton, 0xffff);
+ gtk_color_button_set_use_alpha(colorbutton, FALSE);
+ }