GNOME Bugzilla – Bug 101541
API Wish REGISTER_LASTVALUE_STRUCTURE
Last modified: 2006-06-16 16:08:10 UTC
For the redesign of GAP 'Filter All Layers' i have written procedures to register the structure of LAST_VALUE buffers in a file. GAP can call the registrated Plug-Ins with varying Values using a common Iterator Procedure that checks this file. My API wish is to extend libgimp by adding the registration modules libgimp/gimplastvaldesc.c libgimp/gimplastvaldesc.h (Sourcecode, Patches and README can be found at: http://wolfganghofer.tripod.com/gap/patch_libgimp_lastvaldesc-1.3.5.tgz ) If this wish gets accepted, i'll send patches for most of the Plug-Ins of the gimp-1.3.10 release that will do the registration of their LAST_VALUE buffers.
IMO this should be addressed by a redesign of the PDB. Such a redesign would offer named parameters, default values as well as automatic registration of last used values. This stuff should probably be based on GType. Nathan Summers started to little project to implement a better PDB outside the GIMP tree. We might decide to switch to this implementation when it has evolved. Of course all this is not for 1.4 and I would prefer not to complicate the current PDB interface. It's sort of too late to start a redesign of the PDB and glueing new APIs onto it will make it even more difficult to ever switch to a new saner system. Wolfgang, could you please, next time, attach a plain patch instead of a gzipped tarball. It makes using bugzilla much easier if patches can be viewed directly. Just create a diff using the -uraN options in order to include new files as well.
The link is broken, but the file can be downloaded using wget as follows: wget --referer=http://wolfganghofer.tripod.com http://wolfganghofer.tripod.com/gap/patch_libgimp_lastvaldesc-1.3.5.tgz (line breaks courtesy of Bugzilla) I've added this to the libpdb TODO. It should be implemented in libpdb version 0.4.0. Sven: do you want to move this bug to the libpdb product, or leave it here in gimp?
Well, Wolfgang seems to seek for a solution in GIMP-1.4 (I wonder why he proposed the change this late; the name of the patch seems to suggest that is has been around for quite some time) but IMO we should reject the since the PDB should be considered feature frozen for GIMP-1.4. Perhaps we should indeed reassign the bug-report to libpdb. Doing this is in a separate tree has the advantage that a real solution can be found since we don't have to care about backward compatibility.
Without going for a full redesign of the PDB, the proposed patch looks interesting but it does not do enough, because a related problem is also mentioned in bug #51937 (implementation of a macro recorder). Take a look at the comments from 2002-12-06, suggesting to add an enhanced version of "gimp_set_data()" with typed parameters. So I think that we should look at the whole problem of the interfacing between the plug-ins and the core (or other plug-ins) and design a solution that covers (most of) these problems. This may require more than some of the things proposed in libpdb. So I have just opened a "tracking bug" for keeping track of these issues: bug #101604
My Patch was intended for gimp-1.4. Here: http://wolfganghofer.tripod.com/gap/patch_libgimp_lastval-1.3.11.tgz is an updated version of this patch for gimp-1.3.11 (nothing new, just using gimp_directory to build the filename).
Patches should preferably be attached (uncompressed) to the bug report.
Changes at the request of Dave Neary on the developer mailing list. I am changing many of the bugzilla reports that have not specified a target milestone to Future milestone. Hope that is acceptable.
I am going to mark this bug report as OBSOLETE because it refers to the state of GIMP prior to 2.0. Some of the issues are still relevant, but it would be better to file a new bug report than to try to deal with them in this one.