[gimp/gimp-2-10] app: rename enum GimpColorPickMode to GimpColorPickTarget
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: rename enum GimpColorPickMode to GimpColorPickTarget
- Date: Sun, 15 Jul 2018 13:00:44 +0000 (UTC)
commit a90619ff0015b904f34da8ab3e2a6dcf8a841522
Author: Michael Natterer <mitch gimp org>
Date: Sun Jul 15 14:32:53 2018 +0200
app: rename enum GimpColorPickMode to GimpColorPickTarget
This is just some preparation for fixing issue #1805, but actually
"target" is a much better name so I went the full way and also changed
GUI labels and the color picker tool options config property
accordingly.
If anyone notices at all, how horrible is it to lose your saved pick
target...
(cherry picked from commit b140b283dc263bd1e289bb0f37c9f55eda237144)
app/tools/gimpcolorpickeroptions.c | 26 +++++++++++++-------------
app/tools/gimpcolorpickeroptions.h | 10 +++++-----
app/tools/gimpcolorpickertool.c | 26 ++++++++++++++------------
app/tools/gimpcolortool.c | 26 ++++++++++++--------------
app/tools/gimpcolortool.h | 18 +++++++++---------
app/tools/gimpcurvestool.c | 16 ++++++++--------
app/tools/gimperasertool.c | 2 +-
app/tools/gimpinktool.c | 2 +-
app/tools/gimpmybrushtool.c | 2 +-
app/tools/gimppaintbrushtool.c | 2 +-
app/tools/gimppainttool.c | 16 ++++++++--------
app/tools/gimppainttool.h | 18 +++++++++---------
app/tools/gimpsmudgetool.c | 2 +-
app/widgets/gimpgradienteditor.c | 24 ++++++++++++------------
app/widgets/widgets-enums.c | 22 +++++++++++-----------
app/widgets/widgets-enums.h | 14 +++++++-------
16 files changed, 113 insertions(+), 113 deletions(-)
---
diff --git a/app/tools/gimpcolorpickeroptions.c b/app/tools/gimpcolorpickeroptions.c
index 2b968dfaf2..802bd00c76 100644
--- a/app/tools/gimpcolorpickeroptions.c
+++ b/app/tools/gimpcolorpickeroptions.c
@@ -36,7 +36,7 @@ enum
{
PROP_0,
PROP_SAMPLE_AVERAGE, /* overrides a GimpColorOptions property */
- PROP_PICK_MODE,
+ PROP_PICK_TARGET,
PROP_USE_INFO_WINDOW,
PROP_FRAME1_MODE,
PROP_FRAME2_MODE,
@@ -74,12 +74,12 @@ gimp_color_picker_options_class_init (GimpColorPickerOptionsClass *klass)
FALSE,
GIMP_PARAM_STATIC_STRINGS);
- GIMP_CONFIG_PROP_ENUM (object_class, PROP_PICK_MODE,
- "pick-mode",
- _("Pick Mode"),
- _("Choose what color picker will do"),
- GIMP_TYPE_COLOR_PICK_MODE,
- GIMP_COLOR_PICK_MODE_FOREGROUND,
+ GIMP_CONFIG_PROP_ENUM (object_class, PROP_PICK_TARGET,
+ "pick-target",
+ _("Pick Target"),
+ _("Choose what the color picker will do"),
+ GIMP_TYPE_COLOR_PICK_TARGET,
+ GIMP_COLOR_PICK_TARGET_FOREGROUND,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_USE_INFO_WINDOW,
@@ -123,8 +123,8 @@ gimp_color_picker_options_set_property (GObject *object,
case PROP_SAMPLE_AVERAGE:
GIMP_COLOR_OPTIONS (options)->sample_average = g_value_get_boolean (value);
break;
- case PROP_PICK_MODE:
- options->pick_mode = g_value_get_enum (value);
+ case PROP_PICK_TARGET:
+ options->pick_target = g_value_get_enum (value);
break;
case PROP_USE_INFO_WINDOW:
options->use_info_window = g_value_get_boolean (value);
@@ -156,8 +156,8 @@ gimp_color_picker_options_get_property (GObject *object,
g_value_set_boolean (value,
GIMP_COLOR_OPTIONS (options)->sample_average);
break;
- case PROP_PICK_MODE:
- g_value_set_enum (value, options->pick_mode);
+ case PROP_PICK_TARGET:
+ g_value_set_enum (value, options->pick_target);
break;
case PROP_USE_INFO_WINDOW:
g_value_set_boolean (value, options->use_info_window);
@@ -192,9 +192,9 @@ gimp_color_picker_options_gui (GimpToolOptions *tool_options)
gtk_widget_show (button);
/* the pick FG/BG frame */
- str = g_strdup_printf (_("Pick Mode (%s)"),
+ str = g_strdup_printf (_("Pick Target (%s)"),
gimp_get_mod_string (toggle_mask));
- frame = gimp_prop_enum_radio_frame_new (config, "pick-mode", str, -1, -1);
+ frame = gimp_prop_enum_radio_frame_new (config, "pick-target", str, -1, -1);
g_free (str);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
diff --git a/app/tools/gimpcolorpickeroptions.h b/app/tools/gimpcolorpickeroptions.h
index db1e54dc93..b74d28c0b7 100644
--- a/app/tools/gimpcolorpickeroptions.h
+++ b/app/tools/gimpcolorpickeroptions.h
@@ -35,12 +35,12 @@ typedef struct _GimpToolOptionsClass GimpColorPickerOptionsClass;
struct _GimpColorPickerOptions
{
- GimpColorOptions parent_instance;
+ GimpColorOptions parent_instance;
- GimpColorPickMode pick_mode;
- gboolean use_info_window;
- GimpColorFrameMode frame1_mode;
- GimpColorFrameMode frame2_mode;
+ GimpColorPickTarget pick_target;
+ gboolean use_info_window;
+ GimpColorFrameMode frame1_mode;
+ GimpColorFrameMode frame2_mode;
};
diff --git a/app/tools/gimpcolorpickertool.c b/app/tools/gimpcolorpickertool.c
index 918dfb791a..7e9b117ff5 100644
--- a/app/tools/gimpcolorpickertool.c
+++ b/app/tools/gimpcolorpickertool.c
@@ -135,7 +135,7 @@ gimp_color_picker_tool_init (GimpColorPickerTool *picker_tool)
{
GimpColorTool *color_tool = GIMP_COLOR_TOOL (picker_tool);
- color_tool->pick_mode = GIMP_COLOR_PICK_MODE_FOREGROUND;
+ color_tool->pick_target = GIMP_COLOR_PICK_TARGET_FOREGROUND;
}
static void
@@ -203,15 +203,17 @@ gimp_color_picker_tool_modifier_key (GimpTool *tool,
}
else if (key == gimp_get_toggle_behavior_mask ())
{
- switch (options->pick_mode)
+ switch (options->pick_target)
{
- case GIMP_COLOR_PICK_MODE_FOREGROUND:
- g_object_set (options, "pick-mode", GIMP_COLOR_PICK_MODE_BACKGROUND,
+ case GIMP_COLOR_PICK_TARGET_FOREGROUND:
+ g_object_set (options,
+ "pick-target", GIMP_COLOR_PICK_TARGET_BACKGROUND,
NULL);
break;
- case GIMP_COLOR_PICK_MODE_BACKGROUND:
- g_object_set (options, "pick-mode", GIMP_COLOR_PICK_MODE_FOREGROUND,
+ case GIMP_COLOR_PICK_TARGET_BACKGROUND:
+ g_object_set (options,
+ "pick-target", GIMP_COLOR_PICK_TARGET_FOREGROUND,
NULL);
break;
@@ -232,7 +234,7 @@ gimp_color_picker_tool_oper_update (GimpTool *tool,
GimpColorPickerTool *picker_tool = GIMP_COLOR_PICKER_TOOL (tool);
GimpColorPickerOptions *options = GIMP_COLOR_PICKER_TOOL_GET_OPTIONS (tool);
- GIMP_COLOR_TOOL (tool)->pick_mode = options->pick_mode;
+ GIMP_COLOR_TOOL (tool)->pick_target = options->pick_target;
gimp_tool_pop_status (tool, display);
@@ -247,16 +249,16 @@ gimp_color_picker_tool_oper_update (GimpTool *tool,
toggle_mask = gimp_get_toggle_behavior_mask ();
- switch (options->pick_mode)
+ switch (options->pick_target)
{
- case GIMP_COLOR_PICK_MODE_NONE:
+ case GIMP_COLOR_PICK_TARGET_NONE:
status_help = gimp_suggest_modifiers (_("Click in any image to view"
" its color"),
extend_mask & ~state,
NULL, NULL, NULL);
break;
- case GIMP_COLOR_PICK_MODE_FOREGROUND:
+ case GIMP_COLOR_PICK_TARGET_FOREGROUND:
status_help = gimp_suggest_modifiers (_("Click in any image to pick"
" the foreground color"),
(extend_mask | toggle_mask) &
@@ -264,7 +266,7 @@ gimp_color_picker_tool_oper_update (GimpTool *tool,
NULL, NULL, NULL);
break;
- case GIMP_COLOR_PICK_MODE_BACKGROUND:
+ case GIMP_COLOR_PICK_TARGET_BACKGROUND:
status_help = gimp_suggest_modifiers (_("Click in any image to pick"
" the background color"),
(extend_mask | toggle_mask) &
@@ -272,7 +274,7 @@ gimp_color_picker_tool_oper_update (GimpTool *tool,
NULL, NULL, NULL);
break;
- case GIMP_COLOR_PICK_MODE_PALETTE:
+ case GIMP_COLOR_PICK_TARGET_PALETTE:
status_help = gimp_suggest_modifiers (_("Click in any image to add"
" the color to the palette"),
extend_mask & ~state,
diff --git a/app/tools/gimpcolortool.c b/app/tools/gimpcolortool.c
index 563c3ed42d..28b3d6481d 100644
--- a/app/tools/gimpcolortool.c
+++ b/app/tools/gimpcolortool.c
@@ -175,8 +175,6 @@ gimp_color_tool_init (GimpColorTool *color_tool)
gimp_tool_control_set_action_size (tool->control,
"tools/tools-color-average-radius-set");
-
- color_tool->pick_mode = GIMP_COLOR_PICK_MODE_NONE;
}
static void
@@ -371,18 +369,18 @@ gimp_color_tool_cursor_update (GimpTool *tool,
if (gimp_color_tool_can_pick (color_tool, coords, display))
{
- switch (color_tool->pick_mode)
+ switch (color_tool->pick_target)
{
- case GIMP_COLOR_PICK_MODE_NONE:
+ case GIMP_COLOR_PICK_TARGET_NONE:
modifier = GIMP_CURSOR_MODIFIER_NONE;
break;
- case GIMP_COLOR_PICK_MODE_FOREGROUND:
+ case GIMP_COLOR_PICK_TARGET_FOREGROUND:
modifier = GIMP_CURSOR_MODIFIER_FOREGROUND;
break;
- case GIMP_COLOR_PICK_MODE_BACKGROUND:
+ case GIMP_COLOR_PICK_TARGET_BACKGROUND:
modifier = GIMP_CURSOR_MODIFIER_BACKGROUND;
break;
- case GIMP_COLOR_PICK_MODE_PALETTE:
+ case GIMP_COLOR_PICK_TARGET_PALETTE:
modifier = GIMP_CURSOR_MODIFIER_PLUS;
break;
}
@@ -496,8 +494,8 @@ gimp_color_tool_real_picked (GimpColorTool *color_tool,
/* use this tool's own options here (NOT color_tool->options) */
context = GIMP_CONTEXT (gimp_tool_get_options (tool));
- if (color_tool->pick_mode == GIMP_COLOR_PICK_MODE_FOREGROUND ||
- color_tool->pick_mode == GIMP_COLOR_PICK_MODE_BACKGROUND)
+ if (color_tool->pick_target == GIMP_COLOR_PICK_TARGET_FOREGROUND ||
+ color_tool->pick_target == GIMP_COLOR_PICK_TARGET_BACKGROUND)
{
GtkWidget *widget;
@@ -530,20 +528,20 @@ gimp_color_tool_real_picked (GimpColorTool *color_tool,
}
}
- switch (color_tool->pick_mode)
+ switch (color_tool->pick_target)
{
- case GIMP_COLOR_PICK_MODE_NONE:
+ case GIMP_COLOR_PICK_TARGET_NONE:
break;
- case GIMP_COLOR_PICK_MODE_FOREGROUND:
+ case GIMP_COLOR_PICK_TARGET_FOREGROUND:
gimp_context_set_foreground (context, color);
break;
- case GIMP_COLOR_PICK_MODE_BACKGROUND:
+ case GIMP_COLOR_PICK_TARGET_BACKGROUND:
gimp_context_set_background (context, color);
break;
- case GIMP_COLOR_PICK_MODE_PALETTE:
+ case GIMP_COLOR_PICK_TARGET_PALETTE:
{
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (shell));
gint monitor = gimp_widget_get_monitor (GTK_WIDGET (shell));
diff --git a/app/tools/gimpcolortool.h b/app/tools/gimpcolortool.h
index ff1cff7741..f6455906fc 100644
--- a/app/tools/gimpcolortool.h
+++ b/app/tools/gimpcolortool.h
@@ -36,18 +36,18 @@ typedef struct _GimpColorToolClass GimpColorToolClass;
struct _GimpColorTool
{
- GimpDrawTool parent_instance;
+ GimpDrawTool parent_instance;
- gboolean enabled;
- GimpColorOptions *options;
- gboolean saved_snap_to;
+ gboolean enabled;
+ GimpColorOptions *options;
+ gboolean saved_snap_to;
- GimpColorPickMode pick_mode;
+ GimpColorPickTarget pick_target;
- gboolean can_pick;
- gint center_x;
- gint center_y;
- GimpSamplePoint *sample_point;
+ gboolean can_pick;
+ gint center_x;
+ gint center_y;
+ GimpSamplePoint *sample_point;
};
struct _GimpColorToolClass
diff --git a/app/tools/gimpcurvestool.c b/app/tools/gimpcurvestool.c
index af44021cee..6e8b9b2961 100644
--- a/app/tools/gimpcurvestool.c
+++ b/app/tools/gimpcurvestool.c
@@ -313,26 +313,26 @@ gimp_curves_tool_oper_update (GimpTool *tool,
}
else
{
- GimpColorPickMode mode;
- gchar *status = NULL;
- GdkModifierType extend_mask = gimp_get_extend_selection_mask ();
- GdkModifierType toggle_mask = gimp_get_toggle_behavior_mask ();
+ GimpColorPickTarget target;
+ gchar *status = NULL;
+ GdkModifierType extend_mask = gimp_get_extend_selection_mask ();
+ GdkModifierType toggle_mask = gimp_get_toggle_behavior_mask ();
gimp_tool_pop_status (tool, display);
if (state & extend_mask)
{
- mode = GIMP_COLOR_PICK_MODE_PALETTE;
+ target = GIMP_COLOR_PICK_TARGET_PALETTE;
status = g_strdup (_("Click to add a control point"));
}
else if (state & toggle_mask)
{
- mode = GIMP_COLOR_PICK_MODE_PALETTE;
+ target = GIMP_COLOR_PICK_TARGET_PALETTE;
status = g_strdup (_("Click to add control points to all channels"));
}
else
{
- mode = GIMP_COLOR_PICK_MODE_NONE;
+ target = GIMP_COLOR_PICK_TARGET_NONE;
status = gimp_suggest_modifiers (_("Click to locate on curve"),
(extend_mask | toggle_mask) & ~state,
_("%s: add control point"),
@@ -340,7 +340,7 @@ gimp_curves_tool_oper_update (GimpTool *tool,
NULL);
}
- GIMP_COLOR_TOOL (tool)->pick_mode = mode;
+ GIMP_COLOR_TOOL (tool)->pick_target = target;
if (proximity)
gimp_tool_push_status (tool, display, "%s", status);
diff --git a/app/tools/gimperasertool.c b/app/tools/gimperasertool.c
index 5a8e2f3df4..d6e2ac987b 100644
--- a/app/tools/gimperasertool.c
+++ b/app/tools/gimperasertool.c
@@ -100,7 +100,7 @@ gimp_eraser_tool_init (GimpEraserTool *eraser)
GIMP_CURSOR_MODIFIER_MINUS);
gimp_paint_tool_enable_color_picker (paint_tool,
- GIMP_COLOR_PICK_MODE_BACKGROUND);
+ GIMP_COLOR_PICK_TARGET_BACKGROUND);
paint_tool->status = _("Click to erase");
paint_tool->status_line = _("Click to erase the line");
diff --git a/app/tools/gimpinktool.c b/app/tools/gimpinktool.c
index e8457446f0..4935f7b7cc 100644
--- a/app/tools/gimpinktool.c
+++ b/app/tools/gimpinktool.c
@@ -93,7 +93,7 @@ gimp_ink_tool_init (GimpInkTool *ink_tool)
"tools/tools-ink-blob-angle-set");
gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (ink_tool),
- GIMP_COLOR_PICK_MODE_FOREGROUND);
+ GIMP_COLOR_PICK_TARGET_FOREGROUND);
}
static GimpCanvasItem *
diff --git a/app/tools/gimpmybrushtool.c b/app/tools/gimpmybrushtool.c
index 27b5bc4498..4576b894e3 100644
--- a/app/tools/gimpmybrushtool.c
+++ b/app/tools/gimpmybrushtool.c
@@ -101,7 +101,7 @@ gimp_mybrush_tool_init (GimpMybrushTool *mybrush_tool)
"tools/tools-mypaint-brush-hardness-set");
gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (mybrush_tool),
- GIMP_COLOR_PICK_MODE_FOREGROUND);
+ GIMP_COLOR_PICK_TARGET_FOREGROUND);
}
static void
diff --git a/app/tools/gimppaintbrushtool.c b/app/tools/gimppaintbrushtool.c
index 496c279796..a8aefe8dd5 100644
--- a/app/tools/gimppaintbrushtool.c
+++ b/app/tools/gimppaintbrushtool.c
@@ -79,7 +79,7 @@ gimp_paintbrush_tool_init (GimpPaintbrushTool *paintbrush)
GIMP_TOOL_CURSOR_PAINTBRUSH);
gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (paintbrush),
- GIMP_COLOR_PICK_MODE_FOREGROUND);
+ GIMP_COLOR_PICK_TARGET_FOREGROUND);
}
static gboolean
diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c
index c40302d485..ce85abef39 100644
--- a/app/tools/gimppainttool.c
+++ b/app/tools/gimppainttool.c
@@ -417,15 +417,15 @@ gimp_paint_tool_modifier_key (GimpTool *tool,
gimp_color_tool_enable (GIMP_COLOR_TOOL (tool),
GIMP_COLOR_OPTIONS (info->tool_options));
- switch (GIMP_COLOR_TOOL (tool)->pick_mode)
+ switch (GIMP_COLOR_TOOL (tool)->pick_target)
{
- case GIMP_COLOR_PICK_MODE_FOREGROUND:
+ case GIMP_COLOR_PICK_TARGET_FOREGROUND:
gimp_tool_push_status (tool, display,
_("Click in any image to pick the "
"foreground color"));
break;
- case GIMP_COLOR_PICK_MODE_BACKGROUND:
+ case GIMP_COLOR_PICK_TARGET_BACKGROUND:
gimp_tool_push_status (tool, display,
_("Click in any image to pick the "
"background color"));
@@ -857,8 +857,8 @@ gimp_paint_tool_cursor_notify (GimpDisplayConfig *config,
/**
* gimp_paint_tool_enable_color_picker:
- * @tool: a #GimpPaintTool
- * @mode: the #GimpColorPickMode to set
+ * @tool: a #GimpPaintTool
+ * @target: the #GimpColorPickTarget to set
*
* This is a convenience function used from the init method of paint
* tools that want the color picking functionality. The @mode that is
@@ -866,14 +866,14 @@ gimp_paint_tool_cursor_notify (GimpDisplayConfig *config,
* picked color goes to the foreground or background color.
**/
void
-gimp_paint_tool_enable_color_picker (GimpPaintTool *tool,
- GimpColorPickMode mode)
+gimp_paint_tool_enable_color_picker (GimpPaintTool *tool,
+ GimpColorPickTarget target)
{
g_return_if_fail (GIMP_IS_PAINT_TOOL (tool));
tool->pick_colors = TRUE;
- GIMP_COLOR_TOOL (tool)->pick_mode = mode;
+ GIMP_COLOR_TOOL (tool)->pick_target = target;
}
void
diff --git a/app/tools/gimppainttool.h b/app/tools/gimppainttool.h
index f351d90e05..387239e7f4 100644
--- a/app/tools/gimppainttool.h
+++ b/app/tools/gimppainttool.h
@@ -82,18 +82,18 @@ struct _GimpPaintToolClass
};
-GType gimp_paint_tool_get_type (void) G_GNUC_CONST;
+GType gimp_paint_tool_get_type (void) G_GNUC_CONST;
-void gimp_paint_tool_enable_color_picker (GimpPaintTool *tool,
- GimpColorPickMode mode);
+void gimp_paint_tool_enable_color_picker (GimpPaintTool *tool,
+ GimpColorPickTarget target);
-void gimp_paint_tool_set_draw_fallback (GimpPaintTool *tool,
- gboolean draw_fallback,
- gint fallback_size);
+void gimp_paint_tool_set_draw_fallback (GimpPaintTool *tool,
+ gboolean draw_fallback,
+ gint fallback_size);
-void gimp_paint_tool_set_draw_circle (GimpPaintTool *tool,
- gboolean draw_circle,
- gint circle_size);
+void gimp_paint_tool_set_draw_circle (GimpPaintTool *tool,
+ gboolean draw_circle,
+ gint circle_size);
#endif /* __GIMP_PAINT_TOOL_H__ */
diff --git a/app/tools/gimpsmudgetool.c b/app/tools/gimpsmudgetool.c
index c05d47daeb..ca9e64c538 100644
--- a/app/tools/gimpsmudgetool.c
+++ b/app/tools/gimpsmudgetool.c
@@ -74,7 +74,7 @@ gimp_smudge_tool_init (GimpSmudgeTool *smudge)
gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_SMUDGE);
gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (smudge),
- GIMP_COLOR_PICK_MODE_FOREGROUND);
+ GIMP_COLOR_PICK_TARGET_FOREGROUND);
paint_tool->status = _("Click to smudge");
paint_tool->status_line = _("Click to smudge the line");
diff --git a/app/widgets/gimpgradienteditor.c b/app/widgets/gimpgradienteditor.c
index 70fec088fe..a8851c5424 100644
--- a/app/widgets/gimpgradienteditor.c
+++ b/app/widgets/gimpgradienteditor.c
@@ -170,7 +170,7 @@ static void view_set_hint (GimpGradientEditor *editor,
gint x);
static void view_pick_color (GimpGradientEditor *editor,
- GimpColorPickMode pick_mode,
+ GimpColorPickTarget pick_target,
GimpColorPickState pick_state,
gint x);
@@ -1102,8 +1102,8 @@ view_events (GtkWidget *widget,
{
view_pick_color (editor,
(mevent->state & gimp_get_toggle_behavior_mask ()) ?
- GIMP_COLOR_PICK_MODE_BACKGROUND :
- GIMP_COLOR_PICK_MODE_FOREGROUND,
+ GIMP_COLOR_PICK_TARGET_BACKGROUND :
+ GIMP_COLOR_PICK_TARGET_FOREGROUND,
GIMP_COLOR_PICK_STATE_UPDATE,
mevent->x);
}
@@ -1132,8 +1132,8 @@ view_events (GtkWidget *widget,
view_pick_color (editor,
(bevent->state & gimp_get_toggle_behavior_mask ()) ?
- GIMP_COLOR_PICK_MODE_BACKGROUND :
- GIMP_COLOR_PICK_MODE_FOREGROUND,
+ GIMP_COLOR_PICK_TARGET_BACKGROUND :
+ GIMP_COLOR_PICK_TARGET_FOREGROUND,
GIMP_COLOR_PICK_STATE_START,
bevent->x);
}
@@ -1199,8 +1199,8 @@ view_events (GtkWidget *widget,
view_pick_color (editor,
(bevent->state & gimp_get_toggle_behavior_mask ()) ?
- GIMP_COLOR_PICK_MODE_BACKGROUND :
- GIMP_COLOR_PICK_MODE_FOREGROUND,
+ GIMP_COLOR_PICK_TARGET_BACKGROUND :
+ GIMP_COLOR_PICK_TARGET_FOREGROUND,
GIMP_COLOR_PICK_STATE_END,
bevent->x);
break;
@@ -1255,10 +1255,10 @@ view_set_hint (GimpGradientEditor *editor,
}
static void
-view_pick_color (GimpGradientEditor *editor,
- GimpColorPickMode pick_mode,
- GimpColorPickState pick_state,
- gint x)
+view_pick_color (GimpGradientEditor *editor,
+ GimpColorPickTarget pick_target,
+ GimpColorPickState pick_state,
+ gint x)
{
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (editor);
GimpRGB color;
@@ -1281,7 +1281,7 @@ view_pick_color (GimpGradientEditor *editor,
str3 = g_strdup_printf ("(%0.3f, %0.3f, %0.3f)", color.r, color.g, color.b);
- if (pick_mode == GIMP_COLOR_PICK_MODE_FOREGROUND)
+ if (pick_target == GIMP_COLOR_PICK_TARGET_FOREGROUND)
{
gimp_context_set_foreground (data_editor->context, &color);
diff --git a/app/widgets/widgets-enums.c b/app/widgets/widgets-enums.c
index 4fe0f7f354..e0d1c1ccc7 100644
--- a/app/widgets/widgets-enums.c
+++ b/app/widgets/widgets-enums.c
@@ -137,23 +137,23 @@ gimp_color_frame_mode_get_type (void)
}
GType
-gimp_color_pick_mode_get_type (void)
+gimp_color_pick_target_get_type (void)
{
static const GEnumValue values[] =
{
- { GIMP_COLOR_PICK_MODE_NONE, "GIMP_COLOR_PICK_MODE_NONE", "none" },
- { GIMP_COLOR_PICK_MODE_FOREGROUND, "GIMP_COLOR_PICK_MODE_FOREGROUND", "foreground" },
- { GIMP_COLOR_PICK_MODE_BACKGROUND, "GIMP_COLOR_PICK_MODE_BACKGROUND", "background" },
- { GIMP_COLOR_PICK_MODE_PALETTE, "GIMP_COLOR_PICK_MODE_PALETTE", "palette" },
+ { GIMP_COLOR_PICK_TARGET_NONE, "GIMP_COLOR_PICK_TARGET_NONE", "none" },
+ { GIMP_COLOR_PICK_TARGET_FOREGROUND, "GIMP_COLOR_PICK_TARGET_FOREGROUND", "foreground" },
+ { GIMP_COLOR_PICK_TARGET_BACKGROUND, "GIMP_COLOR_PICK_TARGET_BACKGROUND", "background" },
+ { GIMP_COLOR_PICK_TARGET_PALETTE, "GIMP_COLOR_PICK_TARGET_PALETTE", "palette" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
- { GIMP_COLOR_PICK_MODE_NONE, NC_("color-pick-mode", "Pick only"), NULL },
- { GIMP_COLOR_PICK_MODE_FOREGROUND, NC_("color-pick-mode", "Set foreground color"), NULL },
- { GIMP_COLOR_PICK_MODE_BACKGROUND, NC_("color-pick-mode", "Set background color"), NULL },
- { GIMP_COLOR_PICK_MODE_PALETTE, NC_("color-pick-mode", "Add to palette"), NULL },
+ { GIMP_COLOR_PICK_TARGET_NONE, NC_("color-pick-target", "Pick only"), NULL },
+ { GIMP_COLOR_PICK_TARGET_FOREGROUND, NC_("color-pick-target", "Set foreground color"), NULL },
+ { GIMP_COLOR_PICK_TARGET_BACKGROUND, NC_("color-pick-target", "Set background color"), NULL },
+ { GIMP_COLOR_PICK_TARGET_PALETTE, NC_("color-pick-target", "Add to palette"), NULL },
{ 0, NULL, NULL }
};
@@ -161,8 +161,8 @@ gimp_color_pick_mode_get_type (void)
if (G_UNLIKELY (! type))
{
- type = g_enum_register_static ("GimpColorPickMode", values);
- gimp_type_set_translation_context (type, "color-pick-mode");
+ type = g_enum_register_static ("GimpColorPickTarget", values);
+ gimp_type_set_translation_context (type, "color-pick-target");
gimp_enum_set_value_descriptions (type, descs);
}
diff --git a/app/widgets/widgets-enums.h b/app/widgets/widgets-enums.h
index 77bf3d8277..c519ca9489 100644
--- a/app/widgets/widgets-enums.h
+++ b/app/widgets/widgets-enums.h
@@ -73,17 +73,17 @@ typedef enum
} GimpColorFrameMode;
-#define GIMP_TYPE_COLOR_PICK_MODE (gimp_color_pick_mode_get_type ())
+#define GIMP_TYPE_COLOR_PICK_TARGET (gimp_color_pick_target_get_type ())
-GType gimp_color_pick_mode_get_type (void) G_GNUC_CONST;
+GType gimp_color_pick_target_get_type (void) G_GNUC_CONST;
typedef enum
{
- GIMP_COLOR_PICK_MODE_NONE, /*< desc="Pick only" >*/
- GIMP_COLOR_PICK_MODE_FOREGROUND, /*< desc="Set foreground color" >*/
- GIMP_COLOR_PICK_MODE_BACKGROUND, /*< desc="Set background color" >*/
- GIMP_COLOR_PICK_MODE_PALETTE /*< desc="Add to palette" >*/
-} GimpColorPickMode;
+ GIMP_COLOR_PICK_TARGET_NONE, /*< desc="Pick only" >*/
+ GIMP_COLOR_PICK_TARGET_FOREGROUND, /*< desc="Set foreground color" >*/
+ GIMP_COLOR_PICK_TARGET_BACKGROUND, /*< desc="Set background color" >*/
+ GIMP_COLOR_PICK_TARGET_PALETTE /*< desc="Add to palette" >*/
+} GimpColorPickTarget;
#define GIMP_TYPE_COLOR_PICK_STATE (gimp_color_pick_state_get_type ())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]