diff --git a/app/widgets/gimpcolorpanel.c b/app/widgets/gimpcolorpanel.c index 2efd9b4295..e369f9e2cb 100644 --- a/app/widgets/gimpcolorpanel.c +++ b/app/widgets/gimpcolorpanel.c @@ -101,8 +101,9 @@ gimp_color_panel_class_init (GimpColorPanelClass *klass) static void gimp_color_panel_init (GimpColorPanel *panel) { - panel->context = NULL; - panel->color_dialog = NULL; + panel->context = NULL; + panel->color_dialog = NULL; + panel->user_context_aware = TRUE; } static void @@ -183,7 +184,8 @@ gimp_color_panel_clicked (GtkButton *button) GimpColorButton *color_button = GIMP_COLOR_BUTTON (button); panel->color_dialog = - gimp_color_dialog_new (NULL, panel->context, TRUE, + gimp_color_dialog_new (NULL, panel->context, + panel->user_context_aware, gimp_color_button_get_title (color_button), NULL, NULL, GTK_WIDGET (button), @@ -275,6 +277,15 @@ gimp_color_panel_set_context (GimpColorPanel *panel, context->gimp->config->color_management); } +void +gimp_color_panel_set_user_context_aware (GimpColorPanel *panel, + gboolean user_context_aware) +{ + g_return_if_fail (GIMP_IS_COLOR_PANEL (panel)); + + panel->user_context_aware = user_context_aware; +} + void gimp_color_panel_dialog_response (GimpColorPanel *panel, GimpColorDialogState state) diff --git a/app/widgets/gimpcolorpanel.h b/app/widgets/gimpcolorpanel.h index ca7a684bc7..b5b319c13d 100644 --- a/app/widgets/gimpcolorpanel.h +++ b/app/widgets/gimpcolorpanel.h @@ -35,6 +35,8 @@ struct _GimpColorPanel GimpContext *context; GtkWidget *color_dialog; + + gboolean user_context_aware; }; struct _GimpColorPanelClass @@ -58,6 +60,10 @@ GtkWidget * gimp_color_panel_new (const gchar *title, void gimp_color_panel_set_context (GimpColorPanel *panel, GimpContext *context); +void gimp_color_panel_set_user_context_aware + (GimpColorPanel *panel, + gboolean user_context_aware); + void gimp_color_panel_dialog_response (GimpColorPanel *panel, GimpColorDialogState state); diff --git a/app/widgets/gimpgrideditor.c b/app/widgets/gimpgrideditor.c index 1a26835167..9db1861857 100644 --- a/app/widgets/gimpgrideditor.c +++ b/app/widgets/gimpgrideditor.c @@ -154,6 +154,8 @@ gimp_grid_editor_constructed (GObject *object) gtk_widget_set_halign (color_button, GTK_ALIGN_START); gimp_color_panel_set_context (GIMP_COLOR_PANEL (color_button), editor->context); + gimp_color_panel_set_user_context_aware (GIMP_COLOR_PANEL (color_button), + FALSE); gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1, _("_Foreground color:"), 0.0, 0.5, color_button, 1); @@ -166,6 +168,8 @@ gimp_grid_editor_constructed (GObject *object) gtk_widget_set_halign (color_button, GTK_ALIGN_START); gimp_color_panel_set_context (GIMP_COLOR_PANEL (color_button), editor->context); + gimp_color_panel_set_user_context_aware (GIMP_COLOR_PANEL (color_button), + FALSE); gimp_grid_attach_aligned (GTK_GRID (grid), 0, 2, _("_Background color:"), 0.0, 0.5, color_button, 1);