On Sun, 2009-09-13 at 23:42 +0000, Ilya Zakharevich wrote:

> > I am afraid there is no way to do this for tools like 'color select' or
> > 'magic wand'. Tools are a user interface thing and the PDB explicitly
> > doesn't give access to the user interface parts of GIMP.
> This sentence does not make any sense to me.  To make sense, one
> should have a PRIOR definition of "the user interface parts of GIMP".
> E.g., from what you write, It looks like foreground color is not in
> "the user interface parts of GIMP".

The foreground color is part of the context, which is not part of the
user interface. The user interface just controls the user context. The
fact that script-fu, or rather the PDB, allows to change things in the
user context, such as the foreground or background color, is actually a
misconception that was made early in the GIMP development. We tried
later to correct this by introducing script-specific contexts. But since
we didn't want to break existing scripts, we had to introduce
'gimp-context-push' and 'gimp-context-pop'. All scripts that wish to
change the context are supposed to use these, so that they get their own
context. This way the user context (which is what the GIMP user
interface uses), is not affected by scripts.

> So. is there such a definition?  Is it defined as "any setting outside
> those related to save/restore-state Script-Fu API", or is there
> anything else accessible from Script-Fu?

The code in app makes a very clear distinction between the core and the
user interface. If you want to understand the details, please have a
look at the code.


Gimp-user mailing list

Reply via email to