Commit c7a7196b authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

Treat FG/BG just like all other context properties:

2004-05-04  Michael Natterer  <mitch@gimp.org>

	Treat FG/BG just like all other context properties:

	* app/paint/gimppaintoptions.h: added GIMP_CONTEXT_FOREGROUND_MASK
	and _BACKGROUND_MASK to GIMP_PAINT_OPTIONS_CONTEXT_MASK to specify
	that they are used by GimpPaintOptions (automatically affects all
	paint tools).

	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpinktool.c: set FOREGROUND_MASK and BACKGROUND_MASK
	manually here.

	* app/tools/tool_manager.c (tool_manager_tool_changed): decide
	about the globality of FG and BG at the same place where we decide
	about the brush's, pattern's etc. globality, but hardcode them to
	global = TRUE instead of looking at GimpConfig.

	Fixes bug #141786.
parent 068ed6e6
2004-05-04 Michael Natterer <mitch@gimp.org>
Treat FG/BG just like all other context properties:
* app/paint/gimppaintoptions.h: added GIMP_CONTEXT_FOREGROUND_MASK
and _BACKGROUND_MASK to GIMP_PAINT_OPTIONS_CONTEXT_MASK to specify
that they are used by GimpPaintOptions (automatically affects all
paint tools).
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpinktool.c: set FOREGROUND_MASK and BACKGROUND_MASK
manually here.
* app/tools/tool_manager.c (tool_manager_tool_changed): decide
about the globality of FG and BG at the same place where we decide
about the brush's, pattern's etc. globality, but hardcode them to
global = TRUE instead of looking at GimpConfig.
Fixes bug #141786.
2004-05-04 Sven Neumann <sven@gimp.org>
* plug-ins/common/sobel.c (sobel_dialog): removed frame, adjusted
......
......@@ -162,7 +162,9 @@ gimp_ink_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_INK_TOOL,
GIMP_TYPE_INK_OPTIONS,
gimp_ink_options_gui,
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_FOREGROUND_MASK |
GIMP_CONTEXT_BACKGROUND_MASK |
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_PAINT_MODE_MASK,
"gimp-ink-tool",
_("Ink"),
......
......@@ -23,7 +23,9 @@
#include "core/gimptooloptions.h"
#define GIMP_PAINT_OPTIONS_CONTEXT_MASK GIMP_CONTEXT_OPACITY_MASK | \
#define GIMP_PAINT_OPTIONS_CONTEXT_MASK GIMP_CONTEXT_FOREGROUND_MASK | \
GIMP_CONTEXT_BACKGROUND_MASK | \
GIMP_CONTEXT_OPACITY_MASK | \
GIMP_CONTEXT_PAINT_MODE_MASK | \
GIMP_CONTEXT_BRUSH_MASK
......
......@@ -91,6 +91,8 @@ gimp_blend_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_BLEND_TOOL,
GIMP_TYPE_BLEND_OPTIONS,
gimp_blend_options_gui,
GIMP_CONTEXT_FOREGROUND_MASK |
GIMP_CONTEXT_BACKGROUND_MASK |
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_PAINT_MODE_MASK |
GIMP_CONTEXT_GRADIENT_MASK,
......
......@@ -82,6 +82,8 @@ gimp_bucket_fill_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_BUCKET_FILL_TOOL,
GIMP_TYPE_BUCKET_FILL_OPTIONS,
gimp_bucket_fill_options_gui,
GIMP_CONTEXT_FOREGROUND_MASK |
GIMP_CONTEXT_BACKGROUND_MASK |
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_PAINT_MODE_MASK |
GIMP_CONTEXT_PATTERN_MASK,
......
......@@ -162,7 +162,9 @@ gimp_ink_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_INK_TOOL,
GIMP_TYPE_INK_OPTIONS,
gimp_ink_options_gui,
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_FOREGROUND_MASK |
GIMP_CONTEXT_BACKGROUND_MASK |
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_PAINT_MODE_MASK,
"gimp-ink-tool",
_("Ink"),
......
......@@ -518,6 +518,10 @@ tool_manager_tool_changed (GimpContext *user_context,
GimpCoreConfig *config = user_context->gimp->config;
GimpContextPropMask global_props = 0;
/* FG and BG are always shared between all tools */
global_props |= GIMP_CONTEXT_FOREGROUND_MASK;
global_props |= GIMP_CONTEXT_BACKGROUND_MASK;
if (config->global_brush)
global_props |= GIMP_CONTEXT_BRUSH_MASK;
if (config->global_pattern)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment