Bug 795230 - Rename Blend tool and provide PDB compatibility

Rename the tool and its options, and the gradient sub-struct of paint
options.
This commit is contained in:
Michael Natterer 2018-04-14 00:52:20 +02:00
parent 4f2e078ccb
commit b0beb0197a
21 changed files with 3772 additions and 3772 deletions

View file

@ -36,7 +36,7 @@
/* The defaults are "everything except color", which is problematic
* with gradients, which is why we special case the blend tool in
* with gradients, which is why we special case the gradient tool in
* gimp_tool_preset_set_options().
*/
#define DEFAULT_USE_FG_BG FALSE
@ -541,7 +541,7 @@ gimp_tool_preset_set_options (GimpToolPreset *preset,
g_object_set (preset, "use-font", FALSE, NULL);
/* see comment above the DEFAULT defines at the top of the file */
if (! g_strcmp0 ("gimp-blend-tool",
if (! g_strcmp0 ("gimp-gradient-tool",
gimp_object_get_name (preset->tool_options->tool_info)))
g_object_set (preset, "use-gradient", TRUE, NULL);

View file

@ -223,7 +223,6 @@ static GtkWidget * dialogs_restore_window (GimpDialogFactory *factory,
static const GimpDialogFactoryEntry entries[] =
{
/* foreign toplevels without constructor */
FOREIGN ("gimp-blend-tool-dialog", TRUE, FALSE),
FOREIGN ("gimp-brightness-contrast-tool-dialog", TRUE, FALSE),
FOREIGN ("gimp-color-balance-tool-dialog", TRUE, FALSE),
FOREIGN ("gimp-color-picker-tool-dialog", TRUE, TRUE),
@ -233,6 +232,7 @@ static const GimpDialogFactoryEntry entries[] =
FOREIGN ("gimp-desaturate-tool-dialog", TRUE, FALSE),
FOREIGN ("gimp-foreground-select-tool-dialog", TRUE, FALSE),
FOREIGN ("gimp-gegl-tool-dialog", TRUE, FALSE),
FOREIGN ("gimp-gradient-tool-dialog", TRUE, FALSE),
FOREIGN ("gimp-hue-saturation-tool-dialog", TRUE, FALSE),
FOREIGN ("gimp-levels-tool-dialog", TRUE, TRUE),
FOREIGN ("gimp-measure-tool-dialog", TRUE, FALSE),

View file

@ -445,7 +445,7 @@ gimp_paint_options_init (GimpPaintOptions *options)
options->jitter_options = g_slice_new0 (GimpJitterOptions);
options->fade_options = g_slice_new0 (GimpFadeOptions);
options->gradient_options = g_slice_new0 (GimpGradientOptions);
options->gradient_options = g_slice_new0 (GimpGradientPaintOptions);
options->smoothing_options = g_slice_new0 (GimpSmoothingOptions);
}
@ -468,10 +468,10 @@ gimp_paint_options_finalize (GObject *object)
{
GimpPaintOptions *options = GIMP_PAINT_OPTIONS (object);
g_slice_free (GimpJitterOptions, options->jitter_options);
g_slice_free (GimpFadeOptions, options->fade_options);
g_slice_free (GimpGradientOptions, options->gradient_options);
g_slice_free (GimpSmoothingOptions, options->smoothing_options);
g_slice_free (GimpJitterOptions, options->jitter_options);
g_slice_free (GimpFadeOptions, options->fade_options);
g_slice_free (GimpGradientPaintOptions, options->gradient_options);
g_slice_free (GimpSmoothingOptions, options->smoothing_options);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@ -482,11 +482,11 @@ gimp_paint_options_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
GimpPaintOptions *options = GIMP_PAINT_OPTIONS (object);
GimpFadeOptions *fade_options = options->fade_options;
GimpJitterOptions *jitter_options = options->jitter_options;
GimpGradientOptions *gradient_options = options->gradient_options;
GimpSmoothingOptions *smoothing_options = options->smoothing_options;
GimpPaintOptions *options = GIMP_PAINT_OPTIONS (object);
GimpFadeOptions *fade_options = options->fade_options;
GimpJitterOptions *jitter_options = options->jitter_options;
GimpGradientPaintOptions *gradient_options = options->gradient_options;
GimpSmoothingOptions *smoothing_options = options->smoothing_options;
switch (property_id)
{
@ -645,11 +645,11 @@ gimp_paint_options_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
GimpPaintOptions *options = GIMP_PAINT_OPTIONS (object);
GimpFadeOptions *fade_options = options->fade_options;
GimpJitterOptions *jitter_options = options->jitter_options;
GimpGradientOptions *gradient_options = options->gradient_options;
GimpSmoothingOptions *smoothing_options = options->smoothing_options;
GimpPaintOptions *options = GIMP_PAINT_OPTIONS (object);
GimpFadeOptions *fade_options = options->fade_options;
GimpJitterOptions *jitter_options = options->jitter_options;
GimpGradientPaintOptions *gradient_options = options->gradient_options;
GimpSmoothingOptions *smoothing_options = options->smoothing_options;
switch (property_id)
{
@ -958,8 +958,8 @@ gimp_paint_options_get_gradient_color (GimpPaintOptions *paint_options,
if (gimp_dynamics_is_output_enabled (dynamics, GIMP_DYNAMICS_OUTPUT_COLOR))
{
GimpGradientOptions *gradient_options = paint_options->gradient_options;
GimpGradient *gradient;
GimpGradientPaintOptions *gradient_options = paint_options->gradient_options;
GimpGradient *gradient;
gradient = gimp_context_get_gradient (GIMP_CONTEXT (paint_options));

View file

@ -31,10 +31,10 @@
GIMP_CONTEXT_PROP_MASK_PALETTE
typedef struct _GimpJitterOptions GimpJitterOptions;
typedef struct _GimpFadeOptions GimpFadeOptions;
typedef struct _GimpGradientOptions GimpGradientOptions;
typedef struct _GimpSmoothingOptions GimpSmoothingOptions;
typedef struct _GimpJitterOptions GimpJitterOptions;
typedef struct _GimpFadeOptions GimpFadeOptions;
typedef struct _GimpGradientPaintOptions GimpGradientPaintOptions;
typedef struct _GimpSmoothingOptions GimpSmoothingOptions;
struct _GimpJitterOptions
{
@ -50,7 +50,7 @@ struct _GimpFadeOptions
GimpRepeatMode fade_repeat;
};
struct _GimpGradientOptions
struct _GimpGradientPaintOptions
{
gboolean gradient_reverse;
GimpGradientBlendColorSpace gradient_blend_color_space;
@ -109,7 +109,7 @@ struct _GimpPaintOptions
gboolean dynamics_expanded;
GimpFadeOptions *fade_options;
GimpGradientOptions *gradient_options;
GimpGradientPaintOptions *gradient_options;
GimpSmoothingOptions *smoothing_options;
GimpViewType brush_view_type;

View file

@ -26,12 +26,6 @@ libapptools_a_sources = \
gimpalignoptions.h \
gimpaligntool.c \
gimpaligntool.h \
gimpblendoptions.c \
gimpblendoptions.h \
gimpblendtool.c \
gimpblendtool.h \
gimpblendtool-editor.c \
gimpblendtool-editor.h \
gimpbrightnesscontrasttool.c \
gimpbrightnesscontrasttool.h \
gimpbrushtool.c \
@ -102,6 +96,12 @@ libapptools_a_sources = \
gimpgegltool.h \
gimpgenerictransformtool.c \
gimpgenerictransformtool.h \
gimpgradientoptions.c \
gimpgradientoptions.h \
gimpgradienttool.c \
gimpgradienttool.h \
gimpgradienttool-editor.c \
gimpgradienttool-editor.h \
gimpguidetool.c \
gimpguidetool.h \
gimphandletransformoptions.c \

View file

@ -41,7 +41,6 @@
#include "gimpairbrushtool.h"
#include "gimpaligntool.h"
#include "gimpblendtool.h"
#include "gimpbrightnesscontrasttool.h"
#include "gimpbucketfilltool.h"
#include "gimpbycolorselecttool.h"
@ -59,6 +58,7 @@
#include "gimpforegroundselecttool.h"
#include "gimpfuzzyselecttool.h"
#include "gimpgegltool.h"
#include "gimpgradienttool.h"
#include "gimphandletransformtool.h"
#include "gimphealtool.h"
#include "gimpinktool.h"
@ -159,7 +159,7 @@ gimp_tools_init (Gimp *gimp)
gimp_seamless_clone_tool_register,
gimp_text_tool_register,
gimp_bucket_fill_tool_register,
gimp_blend_tool_register,
gimp_gradient_tool_register,
gimp_pencil_tool_register,
gimp_paintbrush_tool_register,
gimp_eraser_tool_register,

File diff suppressed because it is too large Load diff

View file

@ -1,48 +0,0 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_BLEND_TOOL_EDITOR_H__
#define __GIMP_BLEND_TOOL_EDITOR_H__
void gimp_blend_tool_editor_options_notify (GimpBlendTool *blend_tool,
GimpToolOptions *options,
const GParamSpec *pspec);
void gimp_blend_tool_editor_start (GimpBlendTool *blend_tool);
void gimp_blend_tool_editor_halt (GimpBlendTool *blend_tool);
gboolean gimp_blend_tool_editor_line_changed (GimpBlendTool *blend_tool);
void gimp_blend_tool_editor_fg_bg_changed (GimpBlendTool *blend_tool);
void gimp_blend_tool_editor_gradient_dirty (GimpBlendTool *blend_tool);
void gimp_blend_tool_editor_gradient_changed (GimpBlendTool *blend_tool);
const gchar * gimp_blend_tool_editor_can_undo (GimpBlendTool *blend_tool);
const gchar * gimp_blend_tool_editor_can_redo (GimpBlendTool *blend_tool);
gboolean gimp_blend_tool_editor_undo (GimpBlendTool *blend_tool);
gboolean gimp_blend_tool_editor_redo (GimpBlendTool *blend_tool);
void gimp_blend_tool_editor_start_edit (GimpBlendTool *blend_tool);
void gimp_blend_tool_editor_end_edit (GimpBlendTool *blend_tool,
gboolean cancel);
#endif /* __GIMP_BLEND_TOOL_EDITOR_H__ */

File diff suppressed because it is too large Load diff

View file

@ -33,7 +33,7 @@
#include "widgets/gimpviewablebox.h"
#include "widgets/gimpwidgets-utils.h"
#include "gimpblendoptions.h"
#include "gimpgradientoptions.h"
#include "gimppaintoptions-gui.h"
#include "gimp-intl.h"
@ -55,33 +55,34 @@ enum
};
static void gimp_blend_options_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_blend_options_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_gradient_options_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_gradient_options_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void blend_options_repeat_gradient_type_notify (GimpBlendOptions *options,
GParamSpec *pspec,
GtkWidget *repeat_combo);
static void blend_options_metric_gradient_type_notify (GimpBlendOptions *options,
GParamSpec *pspec,
GtkWidget *repeat_combo);
static void gradient_options_repeat_gradient_type_notify (GimpGradientOptions *options,
GParamSpec *pspec,
GtkWidget *repeat_combo);
static void gradient_options_metric_gradient_type_notify (GimpGradientOptions *options,
GParamSpec *pspec,
GtkWidget *repeat_combo);
G_DEFINE_TYPE (GimpBlendOptions, gimp_blend_options, GIMP_TYPE_PAINT_OPTIONS)
G_DEFINE_TYPE (GimpGradientOptions, gimp_gradient_options,
GIMP_TYPE_PAINT_OPTIONS)
static void
gimp_blend_options_class_init (GimpBlendOptionsClass *klass)
gimp_gradient_options_class_init (GimpGradientOptionsClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->set_property = gimp_blend_options_set_property;
object_class->get_property = gimp_blend_options_get_property;
object_class->set_property = gimp_gradient_options_set_property;
object_class->get_property = gimp_gradient_options_get_property;
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_OFFSET,
"offset",
@ -153,17 +154,17 @@ gimp_blend_options_class_init (GimpBlendOptionsClass *klass)
}
static void
gimp_blend_options_init (GimpBlendOptions *options)
gimp_gradient_options_init (GimpGradientOptions *options)
{
}
static void
gimp_blend_options_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
gimp_gradient_options_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GimpBlendOptions *options = GIMP_BLEND_OPTIONS (object);
GimpGradientOptions *options = GIMP_GRADIENT_OPTIONS (object);
switch (property_id)
{
@ -209,12 +210,12 @@ gimp_blend_options_set_property (GObject *object,
}
static void
gimp_blend_options_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
gimp_gradient_options_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GimpBlendOptions *options = GIMP_BLEND_OPTIONS (object);
GimpGradientOptions *options = GIMP_GRADIENT_OPTIONS (object);
switch (property_id)
{
@ -260,21 +261,21 @@ gimp_blend_options_get_property (GObject *object,
}
GtkWidget *
gimp_blend_options_gui (GimpToolOptions *tool_options)
gimp_gradient_options_gui (GimpToolOptions *tool_options)
{
GObject *config = G_OBJECT (tool_options);
GimpContext *context = GIMP_CONTEXT (tool_options);
GimpBlendOptions *options = GIMP_BLEND_OPTIONS (tool_options);
GtkWidget *vbox = gimp_paint_options_gui (tool_options);
GtkWidget *vbox2;
GtkWidget *frame;
GtkWidget *scale;
GtkWidget *combo;
GtkWidget *button;
GtkWidget *label;
gchar *str;
GdkModifierType extend_mask;
GimpGradient *gradient;
GObject *config = G_OBJECT (tool_options);
GimpContext *context = GIMP_CONTEXT (tool_options);
GimpGradientOptions *options = GIMP_GRADIENT_OPTIONS (tool_options);
GtkWidget *vbox = gimp_paint_options_gui (tool_options);
GtkWidget *vbox2;
GtkWidget *frame;
GtkWidget *scale;
GtkWidget *combo;
GtkWidget *button;
GtkWidget *label;
gchar *str;
GdkModifierType extend_mask;
GimpGradient *gradient;
extend_mask = gimp_get_extend_selection_mask ();
@ -316,9 +317,9 @@ gimp_blend_options_gui (GimpToolOptions *tool_options)
gtk_widget_show (combo);
g_signal_connect (config, "notify::gradient-type",
G_CALLBACK (blend_options_metric_gradient_type_notify),
G_CALLBACK (gradient_options_metric_gradient_type_notify),
combo);
blend_options_metric_gradient_type_notify (options, NULL, combo);
gradient_options_metric_gradient_type_notify (options, NULL, combo);
/* the repeat option */
combo = gimp_prop_enum_combo_box_new (config, "gradient-repeat", 0, 0);
@ -328,9 +329,9 @@ gimp_blend_options_gui (GimpToolOptions *tool_options)
gtk_widget_show (combo);
g_signal_connect (config, "notify::gradient-type",
G_CALLBACK (blend_options_repeat_gradient_type_notify),
G_CALLBACK (gradient_options_repeat_gradient_type_notify),
combo);
blend_options_repeat_gradient_type_notify (options, NULL, combo);
gradient_options_repeat_gradient_type_notify (options, NULL, combo);
/* the offset scale */
scale = gimp_prop_spin_scale_new (config, "offset", NULL,
@ -410,18 +411,18 @@ gimp_blend_options_gui (GimpToolOptions *tool_options)
}
static void
blend_options_repeat_gradient_type_notify (GimpBlendOptions *options,
GParamSpec *pspec,
GtkWidget *repeat_combo)
gradient_options_repeat_gradient_type_notify (GimpGradientOptions *options,
GParamSpec *pspec,
GtkWidget *repeat_combo)
{
gtk_widget_set_sensitive (repeat_combo,
options->gradient_type < GIMP_GRADIENT_SHAPEBURST_ANGULAR);
}
static void
blend_options_metric_gradient_type_notify (GimpBlendOptions *options,
GParamSpec *pspec,
GtkWidget *repeat_combo)
gradient_options_metric_gradient_type_notify (GimpGradientOptions *options,
GParamSpec *pspec,
GtkWidget *repeat_combo)
{
gtk_widget_set_sensitive (repeat_combo,
options->gradient_type >= GIMP_GRADIENT_SHAPEBURST_ANGULAR &&

View file

@ -15,25 +15,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_BLEND_OPTIONS_H__
#define __GIMP_BLEND_OPTIONS_H__
#ifndef __GIMP_GRADIENT_OPTIONS_H__
#define __GIMP_GRADIENT_OPTIONS_H__
#include "paint/gimppaintoptions.h"
#define GIMP_TYPE_BLEND_OPTIONS (gimp_blend_options_get_type ())
#define GIMP_BLEND_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_BLEND_OPTIONS, GimpBlendOptions))
#define GIMP_BLEND_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_BLEND_OPTIONS, GimpBlendOptionsClass))
#define GIMP_IS_BLEND_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_BLEND_OPTIONS))
#define GIMP_IS_BLEND_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_BLEND_OPTIONS))
#define GIMP_BLEND_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_BLEND_OPTIONS, GimpBlendOptionsClass))
#define GIMP_TYPE_GRADIENT_OPTIONS (gimp_gradient_options_get_type ())
#define GIMP_GRADIENT_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_GRADIENT_OPTIONS, GimpGradientOptions))
#define GIMP_GRADIENT_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_GRADIENT_OPTIONS, GimpGradientOptionsClass))
#define GIMP_IS_GRADIENT_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_GRADIENT_OPTIONS))
#define GIMP_IS_GRADIENT_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_GRADIENT_OPTIONS))
#define GIMP_GRADIENT_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_GRADIENT_OPTIONS, GimpGradientOptionsClass))
typedef struct _GimpBlendOptions GimpBlendOptions;
typedef struct _GimpPaintOptionsClass GimpBlendOptionsClass;
typedef struct _GimpGradientOptions GimpGradientOptions;
typedef struct _GimpPaintOptionsClass GimpGradientOptionsClass;
struct _GimpBlendOptions
struct _GimpGradientOptions
{
GimpPaintOptions paint_options;
@ -57,9 +57,9 @@ struct _GimpBlendOptions
};
GType gimp_blend_options_get_type (void) G_GNUC_CONST;
GType gimp_gradient_options_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_blend_options_gui (GimpToolOptions *tool_options);
GtkWidget * gimp_gradient_options_gui (GimpToolOptions *tool_options);
#endif /* __GIMP_BLEND_OPTIONS_H__ */
#endif /* __GIMP_GRADIENT_OPTIONS_H__ */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,48 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_GRADIENT_TOOL_EDITOR_H__
#define __GIMP_GRADIENT_TOOL_EDITOR_H__
void gimp_gradient_tool_editor_options_notify (GimpGradientTool *gradient_tool,
GimpToolOptions *options,
const GParamSpec *pspec);
void gimp_gradient_tool_editor_start (GimpGradientTool *gradient_tool);
void gimp_gradient_tool_editor_halt (GimpGradientTool *gradient_tool);
gboolean gimp_gradient_tool_editor_line_changed (GimpGradientTool *gradient_tool);
void gimp_gradient_tool_editor_fg_bg_changed (GimpGradientTool *gradient_tool);
void gimp_gradient_tool_editor_gradient_dirty (GimpGradientTool *gradient_tool);
void gimp_gradient_tool_editor_gradient_changed (GimpGradientTool *gradient_tool);
const gchar * gimp_gradient_tool_editor_can_undo (GimpGradientTool *gradient_tool);
const gchar * gimp_gradient_tool_editor_can_redo (GimpGradientTool *gradient_tool);
gboolean gimp_gradient_tool_editor_undo (GimpGradientTool *gradient_tool);
gboolean gimp_gradient_tool_editor_redo (GimpGradientTool *gradient_tool);
void gimp_gradient_tool_editor_start_edit (GimpGradientTool *gradient_tool);
void gimp_gradient_tool_editor_end_edit (GimpGradientTool *gradient_tool,
gboolean cancel);
#endif /* __GIMP_GRADIENT_TOOL_EDITOR_H__ */

1073
app/tools/gimpgradienttool.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -15,27 +15,27 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_BLEND_TOOL_H__
#define __GIMP_BLEND_TOOL_H__
#ifndef __GIMP_GRADIENT_TOOL_H__
#define __GIMP_GRADIENT_TOOL_H__
#include "gimpdrawtool.h"
#define GIMP_TYPE_BLEND_TOOL (gimp_blend_tool_get_type ())
#define GIMP_BLEND_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_BLEND_TOOL, GimpBlendTool))
#define GIMP_BLEND_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_BLEND_TOOL, GimpBlendToolClass))
#define GIMP_IS_BLEND_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_BLEND_TOOL))
#define GIMP_IS_BLEND_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_BLEND_TOOL))
#define GIMP_BLEND_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_BLEND_TOOL, GimpBlendToolClass))
#define GIMP_TYPE_GRADIENT_TOOL (gimp_gradient_tool_get_type ())
#define GIMP_GRADIENT_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_GRADIENT_TOOL, GimpGradientTool))
#define GIMP_GRADIENT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_GRADIENT_TOOL, GimpGradientToolClass))
#define GIMP_IS_GRADIENT_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_GRADIENT_TOOL))
#define GIMP_IS_GRADIENT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_GRADIENT_TOOL))
#define GIMP_GRADIENT_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_GRADIENT_TOOL, GimpGradientToolClass))
#define GIMP_BLEND_TOOL_GET_OPTIONS(t) (GIMP_BLEND_OPTIONS (gimp_tool_get_options (GIMP_TOOL (t))))
#define GIMP_GRADIENT_TOOL_GET_OPTIONS(t) (GIMP_GRADIENT_OPTIONS (gimp_tool_get_options (GIMP_TOOL (t))))
typedef struct _GimpBlendTool GimpBlendTool;
typedef struct _GimpBlendToolClass GimpBlendToolClass;
typedef struct _GimpGradientTool GimpGradientTool;
typedef struct _GimpGradientToolClass GimpGradientToolClass;
struct _GimpBlendTool
struct _GimpGradientTool
{
GimpDrawTool parent_instance;
@ -90,22 +90,22 @@ struct _GimpBlendTool
GtkWidget *midpoint_center_button;
};
struct _GimpBlendToolClass
struct _GimpGradientToolClass
{
GimpDrawToolClass parent_class;
};
void gimp_blend_tool_register (GimpToolRegisterCallback callback,
gpointer data);
void gimp_gradient_tool_register (GimpToolRegisterCallback callback,
gpointer data);
GType gimp_blend_tool_get_type (void) G_GNUC_CONST;
GType gimp_gradient_tool_get_type (void) G_GNUC_CONST;
/* protected functions */
void gimp_blend_tool_set_tentative_gradient (GimpBlendTool *blend_tool,
GimpGradient *gradient);
void gimp_gradient_tool_set_tentative_gradient (GimpGradientTool *gradient_tool,
GimpGradient *gradient);
#endif /* __GIMP_BLEND_TOOL_H__ */
#endif /* __GIMP_GRADIENT_TOOL_H__ */

View file

@ -894,7 +894,7 @@ tool_manager_cast_spell (GimpToolInfo *tool_info)
{
{ .sequence = "gimp-warp-tool\0"
"gimp-iscissors-tool\0"
"gimp-blend-tool\0"
"gimp-gradient-tool\0"
"gimp-vector-tool\0"
"gimp-ellipse-select-tool\0"
"gimp-rect-select-tool\0",

View file

@ -287,7 +287,6 @@
#define GIMP_HELP_TOOL_AIRBRUSH "gimp-tool-airbrush"
#define GIMP_HELP_TOOL_ALIGN "gimp-tool-align"
#define GIMP_HELP_TOOL_BLEND "gimp-tool-blend"
#define GIMP_HELP_TOOL_BRIGHTNESS_CONTRAST "gimp-tool-brightness-contrast"
#define GIMP_HELP_TOOL_BUCKET_FILL "gimp-tool-bucket-fill"
#define GIMP_HELP_TOOL_BY_COLOR_SELECT "gimp-tool-by-color-select"
@ -308,6 +307,7 @@
#define GIMP_HELP_TOOL_FOREGROUND_SELECT "gimp-tool-foreground-select"
#define GIMP_HELP_TOOL_FUZZY_SELECT "gimp-tool-fuzzy-select"
#define GIMP_HELP_TOOL_GEGL "gimp-tool-gegl"
#define GIMP_HELP_TOOL_GRADIENT "gimp-tool-gradient"
#define GIMP_HELP_TOOL_HANDLE_TRANSFORM "gimp-tool-handle-transform"
#define GIMP_HELP_TOOL_HEAL "gimp-tool-heal"
#define GIMP_HELP_TOOL_HUE_SATURATION "gimp-tool-hue-saturation"

View file

@ -1,9 +1,9 @@
# GIMP tool preset file
(icon-name "gimp-tool-blend")
(icon-name "gimp-tool-gradient")
(name "FX Radial Softlight")
(tool-options "GimpBlendOptions"
(tool "gimp-blend-tool")
(tool-options "GimpGradientOptions"
(tool "gimp-gradient-tool")
(foreground (color-rgb 0.102075 0.183901 0.594317))
(paint-mode softlight-mode)
(gradient "FG to Transparent")

View file

@ -1,9 +1,9 @@
# GIMP tool preset file
(icon-name "gimp-tool-blend")
(icon-name "gimp-tool-gradient")
(name "Vignette")
(tool-options "GimpBlendOptions"
(tool "gimp-blend-tool")
(tool-options "GimpGradientOptions"
(tool "gimp-gradient-tool")
(opacity 0.750000)
(paint-mode multiply-mode)
(gradient "FG to Transparent")

View file

@ -637,7 +637,7 @@
</menu>
<menu action="tools-paint-menu" name="Paint Tools">
<menuitem action="tools-bucket-fill" />
<menuitem action="tools-blend" />
<menuitem action="tools-gradient" />
<menuitem action="tools-pencil" />
<menuitem action="tools-paintbrush" />
<menuitem action="tools-eraser" />

View file

@ -405,9 +405,6 @@ app/tools/gimp-tools.c
app/tools/gimpairbrushtool.c
app/tools/gimpalignoptions.c
app/tools/gimpaligntool.c
app/tools/gimpblendoptions.c
app/tools/gimpblendtool.c
app/tools/gimpblendtool-editor.c
app/tools/gimpbrightnesscontrasttool.c
app/tools/gimpbucketfilloptions.c
app/tools/gimpbucketfilltool.c
@ -439,6 +436,9 @@ app/tools/gimpfreeselecttool.c
app/tools/gimpfuzzyselecttool.c
app/tools/gimpgegltool.c
app/tools/gimpgenerictransformtool.c
app/tools/gimpgradientptions.c
app/tools/gimpgradienttool.c
app/tools/gimpgradienttool-editor.c
app/tools/gimpguidetool.c
app/tools/gimphandletransformoptions.c
app/tools/gimphandletransformtool.c