mirror of https://github.com/GNOME/gimp.git
app: set a color config on color areas created from menu actions
and set a GimpContext on the actions so they can find the config.
This commit is contained in:
parent
9225176ce3
commit
ef78897c67
|
@ -232,6 +232,14 @@ edit_actions_setup (GimpActionGroup *group)
|
|||
"edit-paste-as-new-short");
|
||||
gtk_action_set_accel_path (action, "<Actions>/edit/edit-paste-as-new");
|
||||
|
||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||
"edit-fill-fg");
|
||||
g_object_set (action, "context", context, NULL);
|
||||
|
||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||
"edit-fill-bg");
|
||||
g_object_set (action, "context", context, NULL);
|
||||
|
||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||
"edit-fill-pattern");
|
||||
g_object_set (action, "context", context, NULL);
|
||||
|
|
|
@ -31,6 +31,9 @@
|
|||
|
||||
#include "widgets-types.h"
|
||||
|
||||
#include "config/gimpcoreconfig.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpmarshal.h"
|
||||
#include "core/gimpimagefile.h" /* eek */
|
||||
|
@ -389,6 +392,10 @@ gimp_action_set_proxy (GimpAction *action,
|
|||
GIMP_COLOR_AREA_SMALL_CHECKS, 0);
|
||||
gimp_color_area_set_draw_border (GIMP_COLOR_AREA (area), TRUE);
|
||||
|
||||
if (action->context)
|
||||
gimp_color_area_set_color_config (GIMP_COLOR_AREA (area),
|
||||
action->context->gimp->config->color_management);
|
||||
|
||||
gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (proxy),
|
||||
GTK_ICON_SIZE_MENU,
|
||||
&width, &height);
|
||||
|
|
Loading…
Reference in New Issue