GNOME Bugzilla – Bug 348243
repeat "last used filter" does noet work for script-fu filters
Last modified: 2008-01-15 14:07:29 UTC
Please describe the problem: Script-fu filters are not 'remebered' in the 'repeat last filter' and 'reshow last filter' menu items. Examples: "Filters/Light and shadow/Drop-shadow" and "Filters/Render/Lava". A non-script-fu Filter works okay for example: "/Edge-detect/Edge works". Steps to reproduce: 1. choose non-script fu filter 2. check two top items in filter menu, last chosen filter is mentioned 3. choose script-fu filter 4. still the non-script-fu filter is shown. Actual results: the script-fu filter is not shown in last-used filter. Expected results: script-fu filter should be treated like any other filter. Does this happen every time? yes Other information: don't know what happens to python-fu filters.
The culprit here is the following code in app/actions/plug-in-actions.c: /* remember only "standard" plug-ins */ if (procedure->proc_type == GIMP_PLUGIN && procedure->num_args >= 3 && GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]) && GIMP_IS_PARAM_SPEC_DRAWABLE_ID (procedure->args[2])) { gimp_plug_in_manager_set_last_plug_in (gimp->plug_in_manager, proc); } Not sure what this limitation is good for. We should probably set the last plug-in regardless of the procedure type and perhaps even regardless of the procedure parameters.
Created attachment 70385 [details] [review] proposed change This patch relaxes the check so that all plug-in procedures that take an image parameter are added to the filter history. Mitch, could you please review this change?
2006-08-08 Sven Neumann <sven@gimp.org> * app/actions/plug-in-commands.c (plug_in_run_cmd_callback): add all procedures that take an image paramter to the history of last-used procedures. Fixes bug #348243. (plug_in_repeat_cmd_callback): use plug_in_collect_drawable_args() to construct the procedure arguments. * app/actions/plug-in-actions.c * app/plug-in/gimppluginmanager.[ch]: renamed "last_plug_ins" to "history"; it's actually a list of procedures. Will need to put a little more work into this to make sure that procedures are removed from the history when they are unregistered. But the problem reported here has been addressed, closing as FIXED.
*** Bug 351203 has been marked as a duplicate of this bug. ***