RSS/Atom feed Twitter
Site is read-only, email is disabled

Question regarding ToolInfo and Gimp Context

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

1 of 1 message available
Toggle history

Please log in to manage your subscriptions.

Question regarding ToolInfo and Gimp Context Filip Krynicki 04 Jan 21:48
Filip Krynicki
2011-01-04 21:48:10 UTC (about 14 years ago)

Question regarding ToolInfo and Gimp Context

I took a stab at explaining what I'm doing in the IRC channel, but I think I did a poor job, so here goes nothing. In short, I am working with a University lab in making an adaptation of Gimp. While most of our code does not interact with Gimp directly, we do make need to activate tools/actions at particular times.

Currently I am running into a problem. We use GimpContext.set_tool(ToolInfo) to set the currently active tool. In our interface this is always called by a button in the toolbox. While this works for most tools and actions, some specific tools have issues. For example, trying to active Hue/Saturation from the toolbox requires that an image be selected before the Hue/Saturation window appears. My understanding is that this is because the tool is set for that window's context, and does not actually execute until the window has focus again (though I could be completely wrong on this).

I was hoping someone here with an understanding of the tools architecture could explain to me whether or not I am right, and whether or not the approach I am considering - determining the last active window and giving it focus before activating tools - is in spirit with the existing engine, or if there is a better solution. The stroke selection tool does not seem to have the same limitation as the Hue/Saturation tool, which leads me to believe there may be a better option.

Thanks.