Commit e14e158e authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

removed enum GimpContextPropType and enum GimpContextPropMask.

2003-06-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.h: removed enum GimpContextPropType and
	enum GimpContextPropMask.

	* app/core/core-enums.[ch]: added them here.

	* app/core/gimptoolinfo.[ch]: replaced "gboolean tool_context"
	member by "GimpContextPropMask context_props" so each tool can
	specify exactly which context properties it wants to have
	persistently remembered.

	* app/tools/tools-types.h: changed typedef GimpToolRegisterCallback
	accordingly.

	* app/tools/tool_manager.[ch] (tool_manager_register_tool): ditto.

	Removed the "global_tool_context" and initialize all tool info
	objects from the user_context after creation. Removed the
	PAINT_OPTIONS_MASK #define and use the new context_props stored in
	tool_info insted.

	* app/tools/gimppainttool.h: #define the common properties of the
	paint tools as GIMP_PAINT_TOOL_OPTIONS_MASK (which is OPACITY |
	PAINT_MODE | BRUSH).

	* app/tools/[all tools].c (gimp_*_tool_register): replaced the
	"use_context" boolean by the actual mask of context properties the
	tools need.
parent e39f334f
2003-06-28 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.h: removed enum GimpContextPropType and
enum GimpContextPropMask.
* app/core/core-enums.[ch]: added them here.
* app/core/gimptoolinfo.[ch]: replaced "gboolean tool_context"
member by "GimpContextPropMask context_props" so each tool can
specify exactly which context properties it wants to have
persistently remembered.
* app/tools/tools-types.h: changed typedef GimpToolRegisterCallback
accordingly.
* app/tools/tool_manager.[ch] (tool_manager_register_tool): ditto.
Removed the "global_tool_context" and initialize all tool info
objects from the user_context after creation. Removed the
PAINT_OPTIONS_MASK #define and use the new context_props stored in
tool_info insted.
* app/tools/gimppainttool.h: #define the common properties of the
paint tools as GIMP_PAINT_TOOL_OPTIONS_MASK (which is OPACITY |
PAINT_MODE | BRUSH).
* app/tools/[all tools].c (gimp_*_tool_register): replaced the
"use_context" boolean by the actual mask of context properties the
tools need.
2003-06-27 Manish Singh <yosh@gimp.org>
* plug-ins/pygimp/gimpui.py: Missing self. reference. Fixes #115714.
......@@ -554,6 +554,74 @@ gimp_undo_type_get_type (void)
}
static const GEnumValue gimp_context_prop_type_enum_values[] =
{
{ GIMP_CONTEXT_FIRST_PROP, "GIMP_CONTEXT_FIRST_PROP", "first-prop" },
{ GIMP_CONTEXT_PROP_IMAGE, "GIMP_CONTEXT_PROP_IMAGE", "prop-image" },
{ GIMP_CONTEXT_PROP_DISPLAY, "GIMP_CONTEXT_PROP_DISPLAY", "prop-display" },
{ GIMP_CONTEXT_PROP_TOOL, "GIMP_CONTEXT_PROP_TOOL", "prop-tool" },
{ GIMP_CONTEXT_PROP_FOREGROUND, "GIMP_CONTEXT_PROP_FOREGROUND", "prop-foreground" },
{ GIMP_CONTEXT_PROP_BACKGROUND, "GIMP_CONTEXT_PROP_BACKGROUND", "prop-background" },
{ GIMP_CONTEXT_PROP_OPACITY, "GIMP_CONTEXT_PROP_OPACITY", "prop-opacity" },
{ GIMP_CONTEXT_PROP_PAINT_MODE, "GIMP_CONTEXT_PROP_PAINT_MODE", "prop-paint-mode" },
{ GIMP_CONTEXT_PROP_BRUSH, "GIMP_CONTEXT_PROP_BRUSH", "prop-brush" },
{ GIMP_CONTEXT_PROP_PATTERN, "GIMP_CONTEXT_PROP_PATTERN", "prop-pattern" },
{ GIMP_CONTEXT_PROP_GRADIENT, "GIMP_CONTEXT_PROP_GRADIENT", "prop-gradient" },
{ GIMP_CONTEXT_PROP_PALETTE, "GIMP_CONTEXT_PROP_PALETTE", "prop-palette" },
{ GIMP_CONTEXT_PROP_FONT, "GIMP_CONTEXT_PROP_FONT", "prop-font" },
{ GIMP_CONTEXT_PROP_BUFFER, "GIMP_CONTEXT_PROP_BUFFER", "prop-buffer" },
{ GIMP_CONTEXT_PROP_IMAGEFILE, "GIMP_CONTEXT_PROP_IMAGEFILE", "prop-imagefile" },
{ GIMP_CONTEXT_PROP_TEMPLATE, "GIMP_CONTEXT_PROP_TEMPLATE", "prop-template" },
{ GIMP_CONTEXT_LAST_PROP, "GIMP_CONTEXT_LAST_PROP", "last-prop" },
{ 0, NULL, NULL }
};
GType
gimp_context_prop_type_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpContextPropType", gimp_context_prop_type_enum_values);
return enum_type;
}
static const GEnumValue gimp_context_prop_mask_enum_values[] =
{
{ GIMP_CONTEXT_IMAGE_MASK, "GIMP_CONTEXT_IMAGE_MASK", "image-mask" },
{ GIMP_CONTEXT_DISPLAY_MASK, "GIMP_CONTEXT_DISPLAY_MASK", "display-mask" },
{ GIMP_CONTEXT_TOOL_MASK, "GIMP_CONTEXT_TOOL_MASK", "tool-mask" },
{ GIMP_CONTEXT_FOREGROUND_MASK, "GIMP_CONTEXT_FOREGROUND_MASK", "foreground-mask" },
{ GIMP_CONTEXT_BACKGROUND_MASK, "GIMP_CONTEXT_BACKGROUND_MASK", "background-mask" },
{ GIMP_CONTEXT_OPACITY_MASK, "GIMP_CONTEXT_OPACITY_MASK", "opacity-mask" },
{ GIMP_CONTEXT_PAINT_MODE_MASK, "GIMP_CONTEXT_PAINT_MODE_MASK", "paint-mode-mask" },
{ GIMP_CONTEXT_BRUSH_MASK, "GIMP_CONTEXT_BRUSH_MASK", "brush-mask" },
{ GIMP_CONTEXT_PATTERN_MASK, "GIMP_CONTEXT_PATTERN_MASK", "pattern-mask" },
{ GIMP_CONTEXT_GRADIENT_MASK, "GIMP_CONTEXT_GRADIENT_MASK", "gradient-mask" },
{ GIMP_CONTEXT_PALETTE_MASK, "GIMP_CONTEXT_PALETTE_MASK", "palette-mask" },
{ GIMP_CONTEXT_FONT_MASK, "GIMP_CONTEXT_FONT_MASK", "font-mask" },
{ GIMP_CONTEXT_BUFFER_MASK, "GIMP_CONTEXT_BUFFER_MASK", "buffer-mask" },
{ GIMP_CONTEXT_IMAGEFILE_MASK, "GIMP_CONTEXT_IMAGEFILE_MASK", "imagefile-mask" },
{ GIMP_CONTEXT_TEMPLATE_MASK, "GIMP_CONTEXT_TEMPLATE_MASK", "template-mask" },
{ GIMP_CONTEXT_PAINT_PROPS_MASK, "GIMP_CONTEXT_PAINT_PROPS_MASK", "paint-props-mask" },
{ GIMP_CONTEXT_ALL_PROPS_MASK, "GIMP_CONTEXT_ALL_PROPS_MASK", "all-props-mask" },
{ 0, NULL, NULL }
};
GType
gimp_context_prop_mask_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpContextPropMask", gimp_context_prop_mask_enum_values);
return enum_type;
}
static const GEnumValue gimp_gradient_segment_type_enum_values[] =
{
{ GIMP_GRAD_LINEAR, "GIMP_GRAD_LINEAR", "linear" },
......
......@@ -423,6 +423,66 @@ typedef enum /*< pdb-skip >*/
* non-registered enums; register them if needed
*/
typedef enum /*< pdb-skip >*/ /*< skip >*/
{
GIMP_CONTEXT_FIRST_PROP = 2,
GIMP_CONTEXT_PROP_IMAGE = GIMP_CONTEXT_FIRST_PROP,
GIMP_CONTEXT_PROP_DISPLAY = 3,
GIMP_CONTEXT_PROP_TOOL = 4,
GIMP_CONTEXT_PROP_FOREGROUND = 5,
GIMP_CONTEXT_PROP_BACKGROUND = 6,
GIMP_CONTEXT_PROP_OPACITY = 7,
GIMP_CONTEXT_PROP_PAINT_MODE = 8,
GIMP_CONTEXT_PROP_BRUSH = 9,
GIMP_CONTEXT_PROP_PATTERN = 10,
GIMP_CONTEXT_PROP_GRADIENT = 11,
GIMP_CONTEXT_PROP_PALETTE = 12,
GIMP_CONTEXT_PROP_FONT = 13,
GIMP_CONTEXT_PROP_BUFFER = 14,
GIMP_CONTEXT_PROP_IMAGEFILE = 15,
GIMP_CONTEXT_PROP_TEMPLATE = 16,
GIMP_CONTEXT_LAST_PROP = GIMP_CONTEXT_PROP_TEMPLATE
} GimpContextPropType;
typedef enum /*< pdb-skip >*/ /*< skip >*/
{
GIMP_CONTEXT_IMAGE_MASK = 1 << 2,
GIMP_CONTEXT_DISPLAY_MASK = 1 << 3,
GIMP_CONTEXT_TOOL_MASK = 1 << 4,
GIMP_CONTEXT_FOREGROUND_MASK = 1 << 5,
GIMP_CONTEXT_BACKGROUND_MASK = 1 << 6,
GIMP_CONTEXT_OPACITY_MASK = 1 << 7,
GIMP_CONTEXT_PAINT_MODE_MASK = 1 << 8,
GIMP_CONTEXT_BRUSH_MASK = 1 << 9,
GIMP_CONTEXT_PATTERN_MASK = 1 << 10,
GIMP_CONTEXT_GRADIENT_MASK = 1 << 11,
GIMP_CONTEXT_PALETTE_MASK = 1 << 12,
GIMP_CONTEXT_FONT_MASK = 1 << 13,
GIMP_CONTEXT_BUFFER_MASK = 1 << 14,
GIMP_CONTEXT_IMAGEFILE_MASK = 1 << 15,
GIMP_CONTEXT_TEMPLATE_MASK = 1 << 16,
/* aliases */
GIMP_CONTEXT_PAINT_PROPS_MASK = (GIMP_CONTEXT_FOREGROUND_MASK |
GIMP_CONTEXT_BACKGROUND_MASK |
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_PAINT_MODE_MASK |
GIMP_CONTEXT_BRUSH_MASK |
GIMP_CONTEXT_PATTERN_MASK |
GIMP_CONTEXT_GRADIENT_MASK),
GIMP_CONTEXT_ALL_PROPS_MASK = (GIMP_CONTEXT_IMAGE_MASK |
GIMP_CONTEXT_DISPLAY_MASK |
GIMP_CONTEXT_TOOL_MASK |
GIMP_CONTEXT_PALETTE_MASK |
GIMP_CONTEXT_FONT_MASK |
GIMP_CONTEXT_BUFFER_MASK |
GIMP_CONTEXT_IMAGEFILE_MASK |
GIMP_CONTEXT_TEMPLATE_MASK |
GIMP_CONTEXT_PAINT_PROPS_MASK)
} GimpContextPropMask;
typedef enum /*< skip >*/
{
GIMP_MAKE_PALETTE,
......
......@@ -26,67 +26,6 @@
#include "gimpobject.h"
typedef enum
{
GIMP_CONTEXT_FIRST_PROP = 2,
GIMP_CONTEXT_PROP_IMAGE = GIMP_CONTEXT_FIRST_PROP,
GIMP_CONTEXT_PROP_DISPLAY = 3,
GIMP_CONTEXT_PROP_TOOL = 4,
GIMP_CONTEXT_PROP_FOREGROUND = 5,
GIMP_CONTEXT_PROP_BACKGROUND = 6,
GIMP_CONTEXT_PROP_OPACITY = 7,
GIMP_CONTEXT_PROP_PAINT_MODE = 8,
GIMP_CONTEXT_PROP_BRUSH = 9,
GIMP_CONTEXT_PROP_PATTERN = 10,
GIMP_CONTEXT_PROP_GRADIENT = 11,
GIMP_CONTEXT_PROP_PALETTE = 12,
GIMP_CONTEXT_PROP_FONT = 13,
GIMP_CONTEXT_PROP_BUFFER = 14,
GIMP_CONTEXT_PROP_IMAGEFILE = 15,
GIMP_CONTEXT_PROP_TEMPLATE = 16,
GIMP_CONTEXT_LAST_PROP = GIMP_CONTEXT_PROP_TEMPLATE
} GimpContextPropType;
typedef enum
{
GIMP_CONTEXT_IMAGE_MASK = 1 << 2,
GIMP_CONTEXT_DISPLAY_MASK = 1 << 3,
GIMP_CONTEXT_TOOL_MASK = 1 << 4,
GIMP_CONTEXT_FOREGROUND_MASK = 1 << 5,
GIMP_CONTEXT_BACKGROUND_MASK = 1 << 6,
GIMP_CONTEXT_OPACITY_MASK = 1 << 7,
GIMP_CONTEXT_PAINT_MODE_MASK = 1 << 8,
GIMP_CONTEXT_BRUSH_MASK = 1 << 9,
GIMP_CONTEXT_PATTERN_MASK = 1 << 10,
GIMP_CONTEXT_GRADIENT_MASK = 1 << 11,
GIMP_CONTEXT_PALETTE_MASK = 1 << 12,
GIMP_CONTEXT_FONT_MASK = 1 << 13,
GIMP_CONTEXT_BUFFER_MASK = 1 << 14,
GIMP_CONTEXT_IMAGEFILE_MASK = 1 << 15,
GIMP_CONTEXT_TEMPLATE_MASK = 1 << 16,
/* aliases */
GIMP_CONTEXT_PAINT_PROPS_MASK = (GIMP_CONTEXT_FOREGROUND_MASK |
GIMP_CONTEXT_BACKGROUND_MASK |
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_PAINT_MODE_MASK |
GIMP_CONTEXT_BRUSH_MASK |
GIMP_CONTEXT_PATTERN_MASK |
GIMP_CONTEXT_GRADIENT_MASK),
GIMP_CONTEXT_ALL_PROPS_MASK = (GIMP_CONTEXT_IMAGE_MASK |
GIMP_CONTEXT_DISPLAY_MASK |
GIMP_CONTEXT_TOOL_MASK |
GIMP_CONTEXT_PALETTE_MASK |
GIMP_CONTEXT_FONT_MASK |
GIMP_CONTEXT_BUFFER_MASK |
GIMP_CONTEXT_IMAGEFILE_MASK |
GIMP_CONTEXT_TEMPLATE_MASK |
GIMP_CONTEXT_PAINT_PROPS_MASK)
} GimpContextPropMask;
#define GIMP_TYPE_CONTEXT (gimp_context_get_type ())
#define GIMP_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CONTEXT, GimpContext))
#define GIMP_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, GIMP_TYPE_CONTEXT, GimpContextClass))
......
......@@ -91,8 +91,11 @@ gimp_tool_info_class_init (GimpToolInfoClass *klass)
static void
gimp_tool_info_init (GimpToolInfo *tool_info)
{
tool_info->gimp = NULL;
tool_info->tool_type = G_TYPE_NONE;
tool_info->tool_options_type = G_TYPE_NONE;
tool_info->context_props = 0;
tool_info->blurb = NULL;
tool_info->help = NULL;
......@@ -104,7 +107,6 @@ gimp_tool_info_init (GimpToolInfo *tool_info)
tool_info->help_data = NULL;
tool_info->in_toolbox = TRUE;
tool_info->use_context = FALSE;
tool_info->tool_options = NULL;
tool_info->paint_info = NULL;
}
......@@ -173,19 +175,19 @@ gimp_tool_info_get_description (GimpViewable *viewable,
}
GimpToolInfo *
gimp_tool_info_new (Gimp *gimp,
GType tool_type,
GType tool_options_type,
gboolean tool_context,
const gchar *identifier,
const gchar *blurb,
const gchar *help,
const gchar *menu_path,
const gchar *menu_accel,
const gchar *help_domain,
const gchar *help_data,
const gchar *paint_core_name,
const gchar *stock_id)
gimp_tool_info_new (Gimp *gimp,
GType tool_type,
GType tool_options_type,
GimpContextPropMask context_props,
const gchar *identifier,
const gchar *blurb,
const gchar *help,
const gchar *menu_path,
const gchar *menu_accel,
const gchar *help_domain,
const gchar *help_data,
const gchar *paint_core_name,
const gchar *stock_id)
{
GimpPaintInfo *paint_info;
GimpToolInfo *tool_info;
......@@ -210,13 +212,13 @@ gimp_tool_info_new (Gimp *gimp,
viewable = GIMP_VIEWABLE (tool_info);
tool_info->use_context = tool_context;
tool_info->tool_options = NULL;
tool_info->paint_info = paint_info;
tool_info->gimp = gimp;
tool_info->tool_type = tool_type;
tool_info->tool_options_type = tool_options_type;
tool_info->context_props = context_props;
tool_info->blurb = g_strdup (blurb);
tool_info->help = g_strdup (help);
......
......@@ -35,26 +35,26 @@ typedef struct _GimpToolInfoClass GimpToolInfoClass;
struct _GimpToolInfo
{
GimpData parent_instance;
GimpData parent_instance;
Gimp *gimp;
Gimp *gimp;
GType tool_type;
GType tool_options_type;
GType tool_type;
GType tool_options_type;
GimpContextPropMask context_props;
gchar *blurb;
gchar *help;
gchar *blurb;
gchar *help;
gchar *menu_path;
gchar *menu_accel;
gchar *menu_path;
gchar *menu_accel;
gchar *help_domain;
gchar *help_data;
gchar *help_domain;
gchar *help_data;
gboolean in_toolbox;
gboolean use_context;
GimpToolOptions *tool_options;
GimpPaintInfo *paint_info;
gboolean in_toolbox;
GimpToolOptions *tool_options;
GimpPaintInfo *paint_info;
};
struct _GimpToolInfoClass
......@@ -65,23 +65,23 @@ struct _GimpToolInfoClass
GType gimp_tool_info_get_type (void) G_GNUC_CONST;
GimpToolInfo * gimp_tool_info_new (Gimp *gimp,
GType tool_type,
GType tool_options_type,
gboolean tool_context,
const gchar *identifier,
const gchar *blurb,
const gchar *help,
const gchar *menu_path,
const gchar *menu_accel,
const gchar *help_domain,
const gchar *help_data,
const gchar *paint_core_name,
const gchar *stock_id);
void gimp_tool_info_set_standard (Gimp *gimp,
GimpToolInfo *tool_info);
GimpToolInfo * gimp_tool_info_get_standard (Gimp *gimp);
GimpToolInfo * gimp_tool_info_new (Gimp *gimp,
GType tool_type,
GType tool_options_type,
GimpContextPropMask context_props,
const gchar *identifier,
const gchar *blurb,
const gchar *help,
const gchar *menu_path,
const gchar *menu_accel,
const gchar *help_domain,
const gchar *help_data,
const gchar *paint_core_name,
const gchar *stock_id);
void gimp_tool_info_set_standard (Gimp *gimp,
GimpToolInfo *tool_info);
GimpToolInfo * gimp_tool_info_get_standard (Gimp *gimp);
#endif /* __GIMP_TOOL_INFO_H__ */
......@@ -161,7 +161,8 @@ gimp_ink_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_INK_TOOL,
GIMP_TYPE_INK_OPTIONS,
gimp_ink_options_gui,
TRUE,
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_PAINT_MODE_MASK,
"gimp-ink-tool",
_("Ink"),
_("Draw in ink"),
......
......@@ -56,7 +56,7 @@ gimp_airbrush_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_AIRBRUSH_TOOL,
GIMP_TYPE_AIRBRUSH_OPTIONS,
gimp_airbrush_options_gui,
TRUE,
GIMP_PAINT_TOOL_OPTIONS_MASK,
"gimp-airbrush-tool",
_("Airbrush"),
_("Airbrush with variable pressure"),
......
......@@ -89,7 +89,9 @@ gimp_blend_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_BLEND_TOOL,
GIMP_TYPE_BLEND_OPTIONS,
gimp_blend_options_gui,
TRUE,
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_PAINT_MODE_MASK |
GIMP_CONTEXT_GRADIENT_MASK,
"gimp-blend-tool",
_("Blend"),
_("Fill with a color gradient"),
......
......@@ -77,7 +77,7 @@ gimp_brightness_contrast_tool_register (GimpToolRegisterCallback callback,
{
(* callback) (GIMP_TYPE_BRIGHTNESS_CONTRAST_TOOL,
G_TYPE_NONE, NULL,
FALSE,
0,
"gimp-brightness-contrast-tool",
_("Brightness-Contrast"),
_("Adjust brightness and contrast"),
......
......@@ -23,6 +23,11 @@
#include "gimpcolortool.h"
#define GIMP_PAINT_TOOL_OPTIONS_MASK GIMP_CONTEXT_OPACITY_MASK | \
GIMP_CONTEXT_PAINT_MODE_MASK | \
GIMP_CONTEXT_BRUSH_MASK
#define GIMP_TYPE_PAINT_TOOL (gimp_paint_tool_get_type ())
#define GIMP_PAINT_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PAINT_TOOL, GimpPaintTool))
#define GIMP_PAINT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PAINT_TOOL, GimpPaintToolClass))
......
......@@ -81,7 +81,9 @@ gimp_bucket_fill_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_BUCKET_FILL_TOOL,
GIMP_TYPE_BUCKET_FILL_OPTIONS,
gimp_bucket_fill_options_gui,
TRUE,
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_PAINT_MODE_MASK |
GIMP_CONTEXT_PATTERN_MASK,
"gimp-bucket-fill-tool",
_("Bucket Fill"),
_("Fill with a color or pattern"),
......
......@@ -75,7 +75,7 @@ gimp_by_color_select_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_BY_COLOR_SELECT_TOOL,
GIMP_TYPE_SELECTION_OPTIONS,
gimp_selection_options_gui,
FALSE,
0,
"gimp-by-color-select-tool",
_("Select By Color"),
_("Select regions by color"),
......
......@@ -92,7 +92,8 @@ gimp_clone_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_CLONE_TOOL,
GIMP_TYPE_CLONE_OPTIONS,
gimp_clone_options_gui,
TRUE,
GIMP_PAINT_TOOL_OPTIONS_MASK |
GIMP_CONTEXT_PATTERN_MASK,
"gimp-clone-tool",
_("Clone"),
_("Paint using Patterns or Image Regions"),
......
......@@ -89,7 +89,7 @@ gimp_color_balance_tool_register (GimpToolRegisterCallback callback,
{
(* callback) (GIMP_TYPE_COLOR_BALANCE_TOOL,
G_TYPE_NONE, NULL,
FALSE,
0,
"gimp-color-balance-tool",
_("Color Balance"),
_("Adjust color balance"),
......
......@@ -88,7 +88,7 @@ gimp_colorize_tool_register (GimpToolRegisterCallback callback,
{
(* callback) (GIMP_TYPE_COLORIZE_TOOL,
G_TYPE_NONE, NULL,
FALSE,
0,
"gimp-colorize-tool",
_("Colorize"),
_("Colorize the image"),
......
......@@ -97,7 +97,7 @@ gimp_color_picker_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_COLOR_PICKER_TOOL,
GIMP_TYPE_COLOR_PICKER_OPTIONS,
gimp_color_picker_options_gui,
FALSE,
0,
"gimp-color-picker-tool",
_("Color Picker"),
_("Pick colors from the image"),
......
......@@ -85,7 +85,7 @@ gimp_convolve_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_CONVOLVE_TOOL,
GIMP_TYPE_CONVOLVE_OPTIONS,
gimp_convolve_options_gui,
TRUE,
GIMP_PAINT_TOOL_OPTIONS_MASK,
"gimp-convolve-tool",
_("Convolve"),
_("Blur or Sharpen"),
......
......@@ -154,7 +154,7 @@ gimp_crop_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_CROP_TOOL,
GIMP_TYPE_CROP_OPTIONS,
gimp_crop_options_gui,
FALSE,
0,
"gimp-crop-tool",
_("Crop & Resize"),
_("Crop or Resize an image"),
......
......@@ -154,7 +154,7 @@ gimp_curves_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_CURVES_TOOL,
GIMP_TYPE_COLOR_OPTIONS,
gimp_color_options_gui,
FALSE,
0,
"gimp-curves-tool",
_("Curves"),
_("Adjust color curves"),
......
......@@ -65,7 +65,7 @@ gimp_dodgeburn_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_DODGEBURN_TOOL,
GIMP_TYPE_DODGE_BURN_OPTIONS,
gimp_dodge_burn_options_gui,
TRUE,
GIMP_PAINT_TOOL_OPTIONS_MASK,
"gimp-dodgeburn-tool",
_("Dodge/Burn"),
_("Dodge or Burn strokes"),
......
......@@ -65,7 +65,7 @@ gimp_ellipse_select_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_ELLIPSE_SELECT_TOOL,
GIMP_TYPE_SELECTION_OPTIONS,
gimp_selection_options_gui,
FALSE,
0,
"gimp-ellipse-select-tool",
_("Ellipse Select"),
_("Select elliptical regions"),
......
......@@ -65,7 +65,7 @@ gimp_eraser_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_ERASER_TOOL,
GIMP_TYPE_ERASER_OPTIONS,
gimp_eraser_options_gui,
TRUE,
GIMP_PAINT_TOOL_OPTIONS_MASK,
"gimp-eraser-tool",
_("Eraser"),
_("Erase to background or transparency"),
......
......@@ -79,7 +79,7 @@ gimp_flip_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_FLIP_TOOL,
GIMP_TYPE_FLIP_OPTIONS,
gimp_flip_options_gui,
FALSE,
0,
"gimp-flip-tool",
_("Flip"),
_("Flip the layer or selection"),
......
......@@ -91,7 +91,7 @@ gimp_free_select_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_FREE_SELECT_TOOL,
GIMP_TYPE_SELECTION_OPTIONS,
gimp_selection_options_gui,
FALSE,
0,
"gimp-free-select-tool",
_("Free Select"),
_("Select hand-drawn regions"),
......
......@@ -93,7 +93,7 @@ gimp_fuzzy_select_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_FUZZY_SELECT_TOOL,
GIMP_TYPE_SELECTION_OPTIONS,
gimp_selection_options_gui,
FALSE,
0,
"gimp-fuzzy-select-tool",
_("Fuzzy Select"),
_("Select contiguous regions"),
......
......@@ -116,7 +116,7 @@ gimp_histogram_tool_register (GimpToolRegisterCallback callback,
{
(* callback) (GIMP_TYPE_HISTOGRAM_TOOL,
G_TYPE_NONE, NULL,
FALSE,
0,
"gimp-histogram-tool",
_("Histogram"),
_("View image histogram"),
......
......@@ -102,7 +102,7 @@ gimp_hue_saturation_tool_register (GimpToolRegisterCallback callback,
{
(* callback) (GIMP_TYPE_HUE_SATURATION_TOOL,
G_TYPE_NONE, NULL,
FALSE,
0,
"gimp-hue-saturation-tool",
_("Hue-Saturation"),
_("Adjust hue and saturation"),
......
......@@ -161,7 +161,8 @@ gimp_ink_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_INK_TOOL,
GIMP_TYPE_INK_OPTIONS,
gimp_ink_options_gui,
TRUE,
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_PAINT_MODE_MASK,
"gimp-ink-tool",
_("Ink"),
_("Draw in ink"),
......
......@@ -272,7 +272,7 @@ gimp_iscissors_tool_register (GimpToolRegisterCallback callback,
(* callback) (GIMP_TYPE_ISCISSORS_TOOL,
GIMP_TYPE_SELECTION_OPTIONS,
gimp_selection_options_gui,