don't use action_data_get_context() to update the "tools" action group

2004-05-13  Michael Natterer  <mitch@gimp.org>

	* app/actions/tools-actions.c (tools_actions_update): don't use
	action_data_get_context() to update the "tools" action group
	because it may return NULL. Use gimp_get_user_context() instead
	because the active tool is global regardless of the action group's
	context. Fixes accidential tool hiding when closing the last
	display.
This commit is contained in:
Michael Natterer 2004-05-13 13:52:18 +00:00 committed by Michael Natterer
parent 81dcecc917
commit 57d09bed4e
2 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2004-05-13 Michael Natterer <mitch@gimp.org>
* app/actions/tools-actions.c (tools_actions_update): don't use
action_data_get_context() to update the "tools" action group
because it may return NULL. Use gimp_get_user_context() instead
because the active tool is global regardless of the action group's
context. Fixes accidential tool hiding when closing the last
display.
2004-05-13 Sven Neumann <sven@gimp.org>
* libgimpthumb/gimpthumbnail.c (gimp_thumbnail_save_thumb): oops.

View file

@ -165,7 +165,7 @@ tools_actions_update (GimpActionGroup *group,
GimpContext *context;
GimpToolInfo *tool_info = NULL;
context = action_data_get_context (data);
context = gimp_get_user_context (group->gimp);
if (context)
tool_info = gimp_context_get_tool (context);
@ -176,7 +176,9 @@ tools_actions_update (GimpActionGroup *group,
gimp_action_group_set_action_active (group, action, (condition) != 0)
SET_SENSITIVE ("tools-visibility", tool_info);
SET_ACTIVE ("tools-visibility", tool_info && tool_info->visible);
if (tool_info)
SET_ACTIVE ("tools-visibility", tool_info->visible);
#undef SET_SENSITIVE
#undef SET_ACTIVE