After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 348243 - repeat "last used filter" does noet work for script-fu filters
repeat "last used filter" does noet work for script-fu filters
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.3.x
Other All
: Normal minor
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
: 351203 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-07-21 13:56 UTC by dennis
Modified: 2008-01-15 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed change (2.97 KB, patch)
2006-08-07 13:27 UTC, Sven Neumann
none Details | Review

Description dennis 2006-07-21 13:56:10 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.
Comment 1 Sven Neumann 2006-08-07 13:03:44 UTC
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.
Comment 2 Sven Neumann 2006-08-07 13:27:46 UTC
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?
Comment 3 Sven Neumann 2006-08-08 15:37:40 UTC
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.
Comment 4 Karl Günter Wünsch 2006-08-13 21:54:42 UTC
*** Bug 351203 has been marked as a duplicate of this bug. ***