mirror of https://github.com/GNOME/gimp.git
app: some GimpAction color which was forgotten after the port.
This commit is contained in:
parent
46121685b8
commit
cf213d1051
|
@ -129,7 +129,7 @@ gimp_color_panel_button_press (GtkWidget *widget,
|
|||
GimpColorPanel *color_panel;
|
||||
GSimpleActionGroup *group;
|
||||
GimpAction *action;
|
||||
GimpRGB rgb;
|
||||
GeglColor *color;
|
||||
|
||||
color_button = GIMP_COLOR_BUTTON (widget);
|
||||
color_panel = GIMP_COLOR_PANEL (widget);
|
||||
|
@ -144,26 +144,24 @@ gimp_color_panel_button_press (GtkWidget *widget,
|
|||
|
||||
if (color_panel->context)
|
||||
{
|
||||
GeglColor *color;
|
||||
|
||||
action = GIMP_ACTION (g_action_map_lookup_action (G_ACTION_MAP (group), "use-foreground"));
|
||||
color = gimp_context_get_foreground (color_panel->context);
|
||||
gegl_color_get_rgba_with_space (color, &rgb.r, &rgb.g, &rgb.b, &rgb.a, NULL);
|
||||
g_object_set (action, "color", &rgb, NULL);
|
||||
g_object_set (action, "color", color, NULL);
|
||||
|
||||
action = GIMP_ACTION (g_action_map_lookup_action (G_ACTION_MAP (group), "use-background"));
|
||||
color = gegl_color_duplicate (gimp_context_get_background (color_panel->context));
|
||||
gegl_color_get_rgba_with_space (color, &rgb.r, &rgb.g, &rgb.b, &rgb.a, NULL);
|
||||
g_object_set (action, "color", &rgb, NULL);
|
||||
color = gimp_context_get_background (color_panel->context);
|
||||
g_object_set (action, "color", color, NULL);
|
||||
}
|
||||
|
||||
action = GIMP_ACTION (g_action_map_lookup_action (G_ACTION_MAP (group), "use-black"));
|
||||
gimp_rgba_set (&rgb, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
|
||||
g_object_set (action, "color", &rgb, NULL);
|
||||
color = gegl_color_new ("black");
|
||||
g_object_set (action, "color", color, NULL);
|
||||
g_object_unref (color);
|
||||
|
||||
action = GIMP_ACTION (g_action_map_lookup_action (G_ACTION_MAP (group), "use-white"));
|
||||
gimp_rgba_set (&rgb, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
|
||||
g_object_set (action, "color", &rgb, NULL);
|
||||
color = gegl_color_new ("white");
|
||||
g_object_set (action, "color", color, NULL);
|
||||
g_object_unref (color);
|
||||
}
|
||||
|
||||
if (GTK_WIDGET_CLASS (parent_class)->button_press_event)
|
||||
|
|
Loading…
Reference in New Issue