Apart from some obvious typo, libgimpui link was failing with meson
because it now relies on a function from libgimpconfig (i.e.
gimp_config_reset()), since commit bfb7f43dbc. This fixes:
> /usr/bin/ld: libgimp/gimpproceduredialog.c:223: undefined reference to `gimp_config_reset'
When in "show all" mode and canvas padding is disabled, have the
"layers-new-from-visible" action create a new layer from the full
image content, rather than just the canvas content.
... which is similar to gimp_display_shell_get_pickable(), however,
it returns the projection, rather than the image, only when
gimp_display_shell_get_infinite_canvas() is TRUE, i.e., when the
shell is in "show all" mode *and* canvas padding is disabled.
In GimpRectangleSelectTool, when creating the rectangle widget as a
result of clicking inside an existing selection, update the
selection at the click, so that the tool's effects are applied
immediately, without having to further modify the selection.
Some change which happened with the meson port. From my research, this
`#pragma once` is not standard, though it is apparently implemented in
most common compilers.
Also apparently it is based on heuristic, hence it might happen that
file identity fails. Though unsure how often it would happen, if ever, I
don't find this very acceptable (and probably makes for hard-to-debug
bugs).
So let's revert to basic macro guards, stupid and no heuristic, which
don't ever fail and are very easy to read.
In GimpBufferSourceBox, dup the selected buffer (and flush the
pickable to make sure it's fully rendered) instead of using it
directly in the source node. This avoids chunking artifacts when
the buffer's content depends on the filter output, such as when
using the affected layer, or a dependent projection, as input.
Scripts must be able to pass values to procedures even if they have no
idea what the actual parameter type is (item, uchar, layer mask), to
the script it's all just numbers anyway.
I wrote down the wrong option name (based on some Gaussian Blur specific
option). My mistake was to make a quick check in GIMP itself instead of
properly looking at the relevant commit message and code change.
Thanks to Sabri Ünal for raising this issue.
There is at least one valid case of a config type registration with no
parameters: when registering the gegl:nop operation. This is the default
case when running the GEGL operation tool. See implementation of
gimp_filter_tool_get_operation().
Therefore we ended up crashing GIMP just by calling this tool.
They are semantically wrong anyway because they work on drawable,
assuming that the drawable is encoded in whatever non-RGB pixel (while
getting data in R'G'B'A format). This is just an internal trick of the
file-dds plug-in which converts DDS data internally instead of having
babl doing the job by making appropriate formats.
Anyway we should definitely not expose such procedure publicly. I am not
deleting the code directly, just hiding it away in `#if 0` for now.
Commit 283ec1da0f previously pushed had some coding style bugs, which
unfortunately couldn't be fixed before pushing because the platform
doesn't allow it and the original contributor is not available lately.
Let's fix these.
Add an option to keep the normal canvas padding in "show all" mode,
instead of extending the checkerboard pattern indefinitely. This
is useful when wanting to show the image content beyond the canvas,
while still keeping the focus on the canvas; further commits will
extend this mode to behave in more view-related cases as if "show
all" wasn't enabled.
Add a new 'View -> Padding Color -> Keep Padding in "Show All"
Mode" toggle, which controls this behavior, with a corresponding
default-value option in the preferences, under "Image Windows ->
Appearance".
```
../../gimp/plug-ins/common/file-psp.c: In function 'load_image':
../../gimp/plug-ins/common/file-psp.c:1930:25: warning: passing argument 2 of 'g_stat' from incompatible pointer type [-Wincompatible-pointer-types]
1930 | if (g_stat (filename, &st) == -1)
| ^~~
| |
| struct stat *
In file included from ../../gimp/plug-ins/common/file-psp.c:44:
C:/msys64/mingw64/include/glib-2.0/glib/gstdio.h:134:31: note: expected 'GStatBuf *' {aka 'struct _stat64 *'} but argument is of type 'struct stat *'
134 | GStatBuf *buf);
| ~~~~~~~~~~~~~^~~
```
Continue installing the list of files to install even if a failure
occured. In particular, I encountered a problem where script-fu was
failing to install because the installed binary was being executed (and
its memory probably mmap-ed). Hence the copy failed with:
> [Errno 26] Text file busy: '/my/prefix/lib64/gimp/2.99/plug-ins/script-fu/script-fu'
Yet trying to reinstall plug-ins while GIMP is being run, hence
script-fu is being executed, is a very common development trick (for me
at least). So instead, when such an error occurs, I simply save it and
output all the exceptions in the end (where these warnings are properly
visible), instead of failing everything.
Of course, ideally the subtarget should not even try to install
script-fu as it is unchanged. This is why I changed shutil.copy() by
shutil.copy2() to install metadata, which include last access timestamp.
Maybe this could be used to decide whether the installed file is already
the last one, thus not retry, though I am actually unsure if this is
enough (on the other hand, the ultimate check of bit-to-bit comparison
may obviously be too much/slow which is counter-productive), which is
why I am not doing this change right now.
It now supports all GParamSpecs possible on the wire protocol, except
the ones that are implemented in app/ and libgimp/ (image, drawable,
...) and are not visible to libgimpconfig