app/actions/tools-actions.c special case gimp-rotate-tool being called

2005-10-13  Sven Neumann  <sven@gimp.org>

	* app/actions/tools-actions.c
	* app/actions/tools-commands.c: special case gimp-rotate-tool
	being called from the Layer menu and set transform type to
	GIMP_TRANSFORM_TYPE_LAYER. Fixes bug #318540.
This commit is contained in:
Sven Neumann 2005-10-13 12:29:46 +00:00 committed by Sven Neumann
parent 7d720d646f
commit 9c3a3b04e3
3 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2005-10-13 Sven Neumann <sven@gimp.org>
* app/actions/tools-actions.c
* app/actions/tools-commands.c: special case gimp-rotate-tool
being called from the Layer menu and set transform type to
GIMP_TRANSFORM_TYPE_LAYER. Fixes bug #318540.
2005-10-13 Jakub Steiner <jimmac@ximian.com>
* data/palettes/Tango.gpl: Added the tango icon palette

View File

@ -102,7 +102,7 @@ static GimpStringActionEntry tools_alternative_actions[] =
{ "tools-rotate-arbitrary", GIMP_STOCK_TOOL_ROTATE,
N_("_Arbitrary Rotation..."), NULL, NULL,
"gimp-rotate-tool",
"gimp-rotate-layer",
GIMP_HELP_TOOL_ROTATE }
};

View File

@ -61,8 +61,16 @@ tools_select_cmd_callback (GtkAction *action,
GimpToolInfo *tool_info;
GimpContext *context;
GimpDisplay *gdisp;
gboolean rotate_layer = FALSE;
return_if_no_gimp (gimp, data);
/* special case gimp-rotate-tool being called from the Layer menu */
if (strcmp (value, "gimp-rotate-layer") == 0)
{
rotate_layer = TRUE;
value = "gimp-rotate-tool";
}
tool_info = (GimpToolInfo *)
gimp_container_get_child_by_name (gimp->tool_info_list, value);
@ -73,6 +81,11 @@ tools_select_cmd_callback (GtkAction *action,
if (gimp_context_get_tool (context) != tool_info)
{
gimp_context_set_tool (context, tool_info);
if (rotate_layer)
g_object_set (tool_info->tool_options,
"type", GIMP_TRANSFORM_TYPE_LAYER,
NULL);
}
else
{