Ok, this has been discussed numerous times and seems to be quite high on
the wishlist but it still doesn't really exist: a preview widget that
can be used in all (or probably most) plug-ins.

So I've taken up this challenge and started coding, heavily based on
some work that has already been done in this area. However my approach
is slightly different: instead of coding a perfect preview widget from
the start I opted for the evolutionary approach:

Step 1) first create a quick and dirty preview widget that really
consists of code factored out from several plugins. This code relies on
the deprecated GtkPreview widget. Main advantage of having this step is
that it doesn't involve a lot of rewriting of the existing plugin code.
This step has been succesful: I have changed the code from the max_rgb
and the plasma plugin so they now both use my new preview widget.

Step 2) update all plugins that already have a preview. Some of them
will be easy, others might involve more rewriting or adding
functionality to the preview widget.

Step 3) once all plugins use the same preview widget it's time to
replace the deprecated GtkPreview by another widget (GtkImage or
GtkDrawingArea). In this step the API should be well established and be
able to handle all preview needs.

Step 4) update plugins that don't have a preview yet.

So what's the current status? Well, I've finished step 1 and it seems to
work :) Step 2 will take quite a bit more time, but will greatly clean
up and reduce the current plugin code for all those plugins that use a
preview. I expect this to take about 2 or 3 months. Step 3 will be
relatively easy. Few evenings of hacking should be enough to do this.
And finally, step 4, will be comparable with step 2: about 2 or 3

To sum up: before the end of the year all plugins for which this is
appropriate will have a preview, using a common preview widget. I just
hope Gimp 1.4 isn't already released before that time :)

Any thoughts?


Gimp-developer mailing list

Reply via email to