On Mon, 2005-01-31 at 15:24, Sven Neumann wrote:
> May I ask why you are not using the preview widgets found in libgimpui?
> That would give your plug-ins the same user interface for previews
> that all other GIMP plug-ins use. Is there functionality missing in
> our preview widgets that you would have needed? Please tell us about
> it then, so that we can add that functionality for GIMP 2.4.
I looked at porting to the libgimpui previews but the documentation
wasn't clear to me (not that its bad - I just didn't quite get it right
off the bat). After thinking it over a bit I realized that carrying
around the object weight of a widget wasn't really necessary for my
So far, only two of the plug-ins use previews: GFXTrans and GFXLayers.
The former *could* use the libgimpui preview but zooming and panning
really aren't necessary for this plug-in. I just need a thumbnail to
shove in the middle a drawing area. Take a look at the plugin and
you'll see what I mean. I'm not modifying the layer content, I'm just
doing a transform on it. And the preview doesn't get updated with the
interactive transform. Its a hacky solution, but I did it originally
before the much nicer builtin in transforms for 2.x came out. It's only
real advantage is allowing you to do multiple, identical transforms into
GFXLayers is much more intense - it used to carry a gimppreview (this
was the old gimppreview code that floated around a while back) for each
layer, sans zooming/panning features. These were stuffed in a GtkFixed
widget and moved around by the user. GtkFixed isn't recommended for new
applications according to the GTK+ 2.6 docs, and that's when I realized
I really didn't need widgets if GIMP could just pass me the right sized
pixbuf - which it now does. Again, I just need a very small thumbnail
to represent the layers. In fact, there is an option to turn off the
previews if that gets too confusing (which it can be if you have a *lot*
of layers). That came about because it got really slow in the old
version with lots of layers using the older gimppreview code I had.
Additionally, the weight of carrying around widgets for all those layers
is overkill for this plugin. I just need a simple pixbuf for each
So, it's nothing against the gimppreview widgets - these look and
perform fine in all the stock plugins. It's just that the gimppreview
widgets provide far more than I really need.
This is all just one design perspective, of course. I'm open to
suggestions on making these plugins better.
Michael J. Hammel
The Graphics Muse A hard-on doesn't count as personal growth.
Gimp-user mailing list