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

app/actions/tools-actions.c added actions and callbacks for the new paint

2006-11-17  Michael Natterer  <mitch@gimp.org>

	* app/actions/tools-actions.c
	* app/actions/tools-commands.[ch]: added actions and callbacks for
	the new paint options brush scale property. Assigned new
	shortcuts: '<' and '>' are now changing tool-value-1 and '[' and
	']' are changing tool-value-2

	* app/actions/context-actions.c: removed the shortcuts from the
	brush size actions.

	* app/tools/gimpbrushtool.c
	* app/tools/gimpcolortool.c: set tool-value-2 to brush-scale and
	to color-average-radius, so '[' and ']' always affect the size of
	the tip of the active tool. tool-value-1 is connected to
	context-opacity so that is changeable using '<' and '>' now.
parent 7eee48b1
2006-11-17 Michael Natterer <mitch@gimp.org>
* app/actions/tools-actions.c
* app/actions/tools-commands.[ch]: added actions and callbacks for
the new paint options brush scale property. Assigned new
shortcuts: '<' and '>' are now changing tool-value-1 and '[' and
']' are changing tool-value-2
* app/actions/context-actions.c: removed the shortcuts from the
brush size actions.
* app/tools/gimpbrushtool.c
* app/tools/gimpcolortool.c: set tool-value-2 to brush-scale and
to color-average-radius, so '[' and ']' always affect the size of
the tip of the active tool. tool-value-1 is connected to
context-opacity so that is changeable using '<' and '>' now.
2006-11-17 Sven Neumann <sven@gimp.org>
* plug-ins/pygimp/gimpui.override: override the wrapper for
......
......@@ -885,19 +885,19 @@ static const GimpEnumActionEntry context_brush_radius_actions[] =
GIMP_ACTION_SELECT_SMALL_NEXT, FALSE,
NULL },
{ "context-brush-radius-decrease", GIMP_STOCK_BRUSH,
"Decrease Radius", "bracketleft", NULL,
"Decrease Radius", NULL, NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL },
{ "context-brush-radius-increase", GIMP_STOCK_BRUSH,
"Increase Radius", "bracketright", NULL,
"Increase Radius", NULL, NULL,
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "context-brush-radius-decrease-skip", GIMP_STOCK_BRUSH,
"Decrease Radius More", "<shift>bracketleft", NULL,
"Decrease Radius More", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "context-brush-radius-increase-skip", GIMP_STOCK_BRUSH,
"Increase Radius More", "<shift>bracketright", NULL,
"Increase Radius More", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL },
{ "context-brush-radius-decrease-percent", GIMP_STOCK_BRUSH,
......
......@@ -140,6 +140,38 @@ static const GimpEnumActionEntry tools_color_average_radius_actions[] =
NULL },
};
static const GimpEnumActionEntry tools_paint_brush_scale_actions[] =
{
{ "tools-paint-brush-scale-set", GIMP_STOCK_TOOL_PAINTBRUSH,
"Set Brush Scale", NULL, NULL,
GIMP_ACTION_SELECT_SET, TRUE,
NULL },
{ "tools-paint-brush-scale-minimum", GIMP_STOCK_TOOL_PAINTBRUSH,
"Minumum Brush Scale", NULL, NULL,
GIMP_ACTION_SELECT_FIRST, FALSE,
NULL },
{ "tools-paint-brush-scale-maximum", GIMP_STOCK_TOOL_PAINTBRUSH,
"Maximum Brush Scale", NULL, NULL,
GIMP_ACTION_SELECT_LAST, FALSE,
NULL },
{ "tools-paint-brush-scale-decrease", GIMP_STOCK_TOOL_PAINTBRUSH,
"Decrease Brush Scale", NULL, NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL },
{ "tools-paint-brush-scale-increase", GIMP_STOCK_TOOL_PAINTBRUSH,
"Increase Brush Scale", NULL, NULL,
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "tools-paint-brush-scale-decrease-skip", GIMP_STOCK_TOOL_PAINTBRUSH,
"Decrease Brush Scale More", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "tools-paint-brush-scale-increase-skip", GIMP_STOCK_TOOL_PAINTBRUSH,
"Increase Brush Scale More", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL },
};
static const GimpEnumActionEntry tools_ink_blob_size_actions[] =
{
{ "tools-ink-blob-size-set", GIMP_STOCK_TOOL_INK,
......@@ -265,19 +297,19 @@ static const GimpEnumActionEntry tools_value_1_actions[] =
GIMP_ACTION_SELECT_LAST, FALSE,
NULL },
{ "tools-value-1-decrease", GIMP_STOCK_TOOL_OPTIONS,
"Decrease Value 1", NULL, NULL,
"Decrease Value 1", "less", NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL },
{ "tools-value-1-increase", GIMP_STOCK_TOOL_OPTIONS,
"Increase Value 1", NULL, NULL,
"Increase Value 1", "greater", NULL,
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "tools-value-1-decrease-skip", GIMP_STOCK_TOOL_OPTIONS,
"Decrease Value 1 More", NULL, NULL,
"Decrease Value 1 More", "<control>less", NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "tools-value-1-increase-skip", GIMP_STOCK_TOOL_OPTIONS,
"Increase Value 1 More", NULL, NULL,
"Increase Value 1 More", "<control>greater", NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL },
};
......@@ -297,19 +329,19 @@ static const GimpEnumActionEntry tools_value_2_actions[] =
GIMP_ACTION_SELECT_LAST, FALSE,
NULL },
{ "tools-value-2-decrease", GIMP_STOCK_TOOL_OPTIONS,
"Decrease Value 2", NULL, NULL,
"Decrease Value 2", "bracketleft", NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL },
{ "tools-value-2-increase", GIMP_STOCK_TOOL_OPTIONS,
"Increase Value 2", NULL, NULL,
"Increase Value 2", "bracketright", NULL,
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "tools-value-2-decrease-skip", GIMP_STOCK_TOOL_OPTIONS,
"Decrease Value 2 More", NULL, NULL,
"Decrease Value 2 More", "<shift>bracketleft", NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "tools-value-2-increase-skip", GIMP_STOCK_TOOL_OPTIONS,
"Increase Value 2 More", NULL, NULL,
"Increase Value 2 More", "<shift>bracketright", NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL },
};
......@@ -455,6 +487,11 @@ tools_actions_setup (GimpActionGroup *group)
G_N_ELEMENTS (tools_color_average_radius_actions),
G_CALLBACK (tools_color_average_radius_cmd_callback));
gimp_action_group_add_enum_actions (group,
tools_paint_brush_scale_actions,
G_N_ELEMENTS (tools_paint_brush_scale_actions),
G_CALLBACK (tools_paint_brush_scale_cmd_callback));
gimp_action_group_add_enum_actions (group,
tools_ink_blob_size_actions,
G_N_ELEMENTS (tools_ink_blob_size_actions),
......
......@@ -270,6 +270,26 @@ tools_color_average_radius_cmd_callback (GtkAction *action,
}
}
void
tools_paint_brush_scale_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpContext *context;
GimpToolInfo *tool_info;
return_if_no_context (context, data);
tool_info = gimp_context_get_tool (context);
if (tool_info && GIMP_IS_PAINT_OPTIONS (tool_info->tool_options))
{
action_select_property ((GimpActionSelectType) value,
G_OBJECT (tool_info->tool_options),
"brush-scale",
0.01, 0.1, 1.0, FALSE);
}
}
void
tools_ink_blob_size_cmd_callback (GtkAction *action,
gint value,
......
......@@ -42,6 +42,10 @@ void tools_color_average_radius_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void tools_paint_brush_scale_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void tools_ink_blob_size_cmd_callback (GtkAction *action,
gint value,
gpointer data);
......
......@@ -102,8 +102,8 @@ gimp_brush_tool_init (GimpBrushTool *brush_tool)
{
GimpTool *tool = GIMP_TOOL (brush_tool);
gimp_tool_control_set_action_value_2 (tool->control,
"context/context-brush-radius-set");
gimp_tool_control_set_action_value_2 (tool->control,
"tools/tools-paint-brush-scale-set");
gimp_tool_control_set_action_value_3 (tool->control,
"context/context-brush-aspect-set");
gimp_tool_control_set_action_value_4 (tool->control,
......
......@@ -160,7 +160,7 @@ gimp_color_tool_init (GimpColorTool *color_tool)
{
GimpTool *tool = GIMP_TOOL (color_tool);
gimp_tool_control_set_action_value_1 (tool->control,
gimp_tool_control_set_action_value_2 (tool->control,
"tools/tools-color-average-radius-set");
color_tool->enabled = FALSE;
......
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