bail out early if the procedure is already at the start of the list.

2006-09-06  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginmanager-history.c
	(gimp_plug_in_manager_history_add): bail out early if the
	procedure is already at the start of the list.
This commit is contained in:
Sven Neumann 2006-09-06 19:50:08 +00:00 committed by Sven Neumann
parent c28e8253d4
commit e077975358
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2006-09-06 Sven Neumann <sven@gimp.org>
* app/plug-in/gimppluginmanager-history.c
(gimp_plug_in_manager_history_add): bail out early if the
procedure is already at the start of the list.
2006-09-06 Bill Skaggs <weskaggs@primate.ucdavis.edu> 2006-09-06 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/tools-enums.[ch]: remove GimpCropMode enum; * app/tools/tools-enums.[ch]: remove GimpCropMode enum;
@ -19,7 +25,7 @@
* app/actions/plug-in-commands.c (plug_in_run_cmd_callback) * app/actions/plug-in-commands.c (plug_in_run_cmd_callback)
(plug_in_repeat_cmd_callback): also add the procedure to the (plug_in_repeat_cmd_callback): also add the procedure to the
history if it is called from the "Repeat" or "Re-Show" menus. history if it is called from the "Recently Used" menu.
* plug-ins/common/vpropagate.c: changed progress text. * plug-ins/common/vpropagate.c: changed progress text.

View File

@ -70,6 +70,10 @@ gimp_plug_in_manager_history_add (GimpPlugInManager *manager,
g_return_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager)); g_return_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager));
g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (procedure)); g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (procedure));
/* return early if the procedure is already at the top */
if (manager->history && manager->history->data == procedure)
return;
history_size = gimp_plug_in_manager_history_size (manager); history_size = gimp_plug_in_manager_history_size (manager);
manager->history = g_slist_remove (manager->history, procedure); manager->history = g_slist_remove (manager->history, procedure);