Commit graph

56788 commits

Author SHA1 Message Date
Jehan
d4e92b44ea pdb: remove unused std_pdb_deprecated().
This function is counter-productive, since we now want to have both
deprecated and deprecated_since together. But there is no generic
"since version" to be used for such a macro.

So let's just have people explicitly add both variables (and error out
the generation script if they miss any).
2026-02-02 12:27:59 +01:00
Jehan
28a4d8fd07 pdb: let pdbgen output to stderr.
If we capture the stderr, then we never get error messages when the
generation script fails.
2026-02-02 12:26:17 +01:00
Jehan
651da72b6c pdb: make deprecated_since mandatory when deprecated is set.
I believe it is important information and there is no reason for not
setting it.
2026-02-02 02:12:10 +01:00
Jehan
b590dc1a2f app, libgimp, pdb: use deprecated and deprecated_since rather than…
… std_pdb_deprecated for previously deprecated functions.

The &std_pdb_deprecated() call won't set a "Deprecated since"
information since this can't be made generic anyway. We have the info,
it'd be a shame not to document it!

Also it clears the blurb and help string, which I find unhelpful (even
for deprecated functions, it's better to have proper documentation!).
2026-02-01 22:40:27 +01:00
Jehan
98e71ee34e libgimp, pdb: re-generate annotations for deprecated functions. 2026-02-01 22:37:14 +01:00
Jehan
3a9ab1c419 pdb: fix GIR annotation format for Deprecated tag.
I just realized that the way we have been using "Deprecated:" tag was
wrong. It has a version first, then further descriptive text.

Fixes display "Deprecated since: Unknown" in gi-docgen documentation.
2026-02-01 22:33:49 +01:00
Jehan
c8c8a68247 app, libgimp, pdb: deprecate various procedures in favor of filters.
I have manually tested each and every of the deprecated functions,
making sure we don't lose any feature. As expected, we don't. Having
dedicated libgimp functions may feel a tiny bit easier to call but this
is not scalable. We can't do this forever, with one function per filter.
And fortunately we won't have to, since now we can call filters on any
drawable directly! It also comes with the following generic advantages:

* It works with any filter, even third-party ones;
* We can also append filters non-destructively for later removal or
  edits (the deprecated functions were always merging the filters);
* If the filter evolves, e.g. with new arguments, it should not affect
  the API (though we should implement GEGL operation versions);
* If we don't need to set all arguments (e.g. leaving many args with
  default value), the filter API may even be simpler and shorter;
* The filter API will be much less "opaque" thanks to argument naming
  (rather than a long list of integers, doubles, etc.).

Specifically to the now deprecated functions, I noted the following
weaknesses on the deprecated API when testing:

* gimp_drawable_colorize_hsl() was missing a "color" argument;
* gimp_drawable_extract_component() had the enum argument "component"
  set as an integer, which is particularly opaque when re-reading
  existing code. Whereas the filter API uses generate choice strings
  which are self-explanatory! For instance choice RGB Red is 0 with the
  deprecated function but "rgb-r" with the filter API.
* gimp_drawable_levels() was missing "trc" argument (as noted in
  #15681).

And as expected, no features are lost.

Note that I didn't deprecate the curves functions yet, because we need
to implement the GimpCurve type in libgimp first.

There are a few more functions which I didn't deprecate yet, because
they don't use a filter directly, but some core functions, though for
some of them, it is very likely they can be efficiently reimplemented
with the filter API too. I'll have to look closer at it. It looks like
we may have to implement GimpHistogram in libgimp too though.
2026-02-01 22:31:02 +01:00
Jehan
1d167ce611 pdb: better deprecated message, assuming it can be a function, GEGL op…
… or a content to use as-is.

Until now, it was assuming the deprecated content was a function. So if
I want to deprecate in favor of a GEGL op (e.g. "gimp:levels"), we'd
have warnings showing a "Deprecated: Use gimp:levels() instead".

Now it will try to recognize the type of suggested replacement with a
basic heuristic: if there is a space, it'll just use the replacement
text as-is; else if there is a colon, it'll assume it's a filter name.
Else it assumes it's a replacement function, as it used to.
2026-02-01 22:31:02 +01:00
Bruno Lopes
250469dd05 build/linux: Workaround Debian 13 broken gresource on AppImage
Closes: #15552
2026-02-01 18:14:21 -03:00
luming zh
20ec33d0c7 Update Chinese (China) translation 2026-02-01 00:39:30 +00:00
Bruno Lopes
691cc71892 gitlab-ci: Slightly improve gimp-debian-nonreloc install message
Following f560c8a9
2026-01-31 14:36:46 -03:00
Jehan
11097dff79 plug-ins: also retrieve values from args in non-interactive mode. 2026-01-31 17:15:54 +01:00
Jehan
51bec948fc plug-ins: fix loading configurations from before all args were implemented.
With an older configuration of a last run from before the new args had
been implemented, Curve Bend plug-in was crashing at start. The various
"*-point-*" argument were serialized as: (upper-point-x 0)

That meant an array of size 0 and that was enough to have the variable
load_settings_data set to 0 and therefore settings-data (which had the
real data) was never deserialized.
2026-01-31 17:15:54 +01:00
Bruno Lopes
232ce0a29f gitlab-ci: Set VARIANT var for artifacts of Homebrew builds
Following 5abb249d
2026-01-31 12:52:37 -03:00
Alx Sa
c4466d0c9f libgimpconfig: Fix number format issue with 5753ac75
When system settings use , instead of . for decimal separation,
5753ac75 broke for legacy XCF grid parasites because numbers
were not encoded consistently. This patch brings back the
sanitation step with g_ascii_dtostr () that ensures all numbers
are saved with . decimal separation.
2026-01-31 05:10:08 +00:00
Bruno Lopes
22a9703f55 meson: Check for libthai support on pango library
It is needed for proper word breaking of texts with Thai language.

See also: 4cbb9360, 739c613f, 0cf15a4f and GNOME/gnome-build-meta!3334
2026-01-30 22:10:45 -03:00
Martin
6a5fbb78a1 Update Slovenian translation 2026-01-30 23:04:32 +00:00
Jehan
85e919e9ce app: default Curves and Levels to working in linear space.
This was always planned, as outlined in commit 54d3beab9c. As a stroke
of luck, even though this default change had never happened, it turned
out that these 2 filters were always run in linear, when called from the
API (cf. #15681).

This is now fixed, and as a consequence, setting the default TRC to
linear would make sure that any script which was calling "gimp:levels"
with default "trc" would still run exactly the same (and if the prop was
set, it was broken anyway). As for "gimp:curves", it could not even have
been used anyway, because of the lack of the GimpCurve type in libgimp.
Therefore, plug-in API-wise, we can consider that changing the default
is actually the less breakage, which is good news as it fits our plans!

As for XCF storing of filters, since we are storing all the properties
anyway, it doesn't break XCF files with these filters either.
2026-01-30 23:38:34 +01:00
Jehan
f5018b995c app: sync config "trc" with GimpOperationPointFilter "trc".
This last point was part of the mess discovered when handling #15681.
With both Curves and Levels, both the child operation class and the
parent class (GimpOperationPointFilter) have a "trc" property. When
setting these in the GUI, they are synced back properly, but not when
set by API.

This commit syncs the config's "trc" into the operation's "trc"
properly, not in the GUI layer.

Note that I had considered trying to get rid of one of the properties.
Having 2 props like this is kinda messy (as could be shown here). But
for now, let's just keep as it is and see later if we can do something
better.

With this commit, the "trc" argument on "gimp:levels" and "gimp:curves"
is now working properly, which is a first step in taking care of #15681.
2026-01-30 23:38:34 +01:00
Jehan
df0b74c956 app: ignore "linear" property on Curves and Levels.
Though it went OK in the GUI, this was completely interfering when
creating filters from API.

The problem was that in gimp_drawable_filter_update(), any property not
set is considered to be at its default value. And therefore if the core
operation's prop is not at default value, we reset it.
Where it went wrong is that if "trc" is first in the list of properties,
it may affect the value of "linear" (e.g. if "trc" is set to
GIMP_TRC_NON_LINEAR, then "linear" will be FALSE). And since it was
unchanged by the caller, this function will reset it to TRUE, which on
turn sets "trc" to GIMP_TRC_LINEAR.

Now I did consider a few alternatives, such as ignoring "linear"
properties in some cases (such as when "trc" was explicitly set once),
but this did not feel satisfying, and a bit random, or special-casing
the "linear" property for these 2 specific operations in this function,
but that felt too dirty.

In the end, I decided to simply render "linear" bogus, based on:

1. We don't use this property anywhere in the GUI already.
2. The main reason I can see in previous commits was to parse older
   settings for these 2 filters; this won't be a problem anymore since
   these settings will now be migrated to the new argument (see my
   previous commit) and will therefore still render the same way.
3. This would have been a filter API breakage, except that both "trc"
   and "linear" were not working correctly anyway and these filters were
   always running as "linear" in GIMP 3.0 (cf. #15681), which I fixed 2
   commits ago. So "linear" was already not doing anything in practice.

Based on all these reasons, I think it makes sense to deactivate this
property. We should remove it as soon as we are able to handle GEGL
property versions (allowing us to remove the property without breaking
the filter).

Note: this commit breaks the string freeze (sorry, translators!) for the
help string of "linear" property, but I think it is worth it documenting
that this property is now bogus (it was already outdated), and it's not
even really in the GUI (except in the filter browser, so primarily for
developers).
2026-01-30 23:38:34 +01:00
Jehan
955ff5b765 app: add new migration rule for property (linear) for Curves and Levels.
Property "linear" was replaced by "trc" in commit e09e563a70.
Unfortunately "linear" still stayed "as compat if needed for file
pasring" (cf. commit message) but this made a big mess, because when
setting operation properties at once, these 2 property can mess with
each other.

These migration rules are a first step in cleaning up the mess. Now we
should not have any config file with (linear) property in there,
therefore we can cleanly neutralize this property in further commits.
2026-01-30 23:38:34 +01:00
Jehan
4aec57d2b7 app: install "trc" with G_PARAM_CONSTRUCT.
If we don't install it as a CONSTRUCT property, nor are we setting it
explicitly in the init() method, then it is never set (unless explicitly
set!), which often means the compiler sets it to 0, i.e. GIMP_TRC_LINEAR
for this enum type.

This was one of the issues which was explaining why these 2 operations
were always run in linear, even though the default was non-linear.
Note though that this fix is not enough. Now I even see the opposite: it
is always run in non-linear. I have more fixes in other parts of the
operations coming up.
2026-01-30 23:38:34 +01:00
Bruno Lopes
a140c251cb gitlab-ci: Allow non-devs to run package pipelines from MR description
Following 6245e4ee

In addition to producing testable packages by adding certain labels
(which only developers can do), now we can produce such packages by
adding the same label in the issue description. This facilitates to
non-developers generating such packages (e.g. new GsoC contributors).
2026-01-30 18:16:44 -03:00
Bruno Lopes
571c8fb95a gitlab-ci: Do not make .app bundle on scheduled Homebrew builds
While it was good to know the bundling is running fine,
this had the risk of people taking them as official.

So, let's be consistent with GNU Clang and Clang-CL builds.
2026-01-30 15:19:48 -03:00
Bruno Lopes
d0228dd79f gitlab-ci: Clarify a bit what is behind the "MSVC" builds 2026-01-30 13:44:24 -03:00
Bruno Lopes
d7edee8ec8 build/windows: Update MSVC .patch again
It got broken by 61c078fa
2026-01-30 10:00:53 -03:00
Bruno Lopes
2dcffe6aad build/macos: pango is now built with Thai support on Homebrew too
See: https://github.com/Homebrew/homebrew-core/pull/262960
2026-01-30 07:40:57 -03:00
Bruno Lopes
807678cc92 build/linux: Make AppRun more robust to dashes when extracted
Ported from 8c8c91f762
2026-01-29 12:48:08 -03:00
Bruno Lopes
acc94cbdb8 build/linux: Update libXmu-1.3.0.tar.xz to 1.3.1
Synced from aad5f83ddd
2026-01-29 08:01:13 -03:00
Bruno Lopes
70b8ed1530 build/macos: Fix .dmg icons layout after custom volume icon 2026-01-28 18:35:15 -03:00
Bruno Lopes
9a2a19575e build/macos: Bundle relevant headers and import libraries on .app 2026-01-28 14:47:24 -03:00
Bruno Lopes
801d845011 libgimpwidgets: Mark gimpcolorscales and gimpcolorselect as introspectable 2026-01-28 14:48:48 +00:00
Alx Sa
3b29b0b522 plug-ins: Use GimpProcedure parameters in Curve Bend
Previously, we serialize/deserialized the curve values in the
"settings-data" GBytes parameters, ignoring the specific parameters
created for the procedure.

This patch adds code to check if they exist (non-interactively) and
loads them from the *-point-* and *-val-* parameters. Otherwise,
the "settings-data" parameter is used for backwards compatibility.
Going forward, the relevant curve values are stored in the individual
parameters rather than "settings-data", so that we're ready to remove
that parameter in GIMP 4.0. A deprecation warning has been added
to make sure we don't miss it.
2026-01-28 12:53:34 +00:00
Bruno Lopes
1f56b60a71 build/linux: Use legacy --device=all on Flatpak to support Pendrive, MIDI etc
Closes #14060

Alternative (legacy) approach to 96a65045e9

Flatpak 1.16 will take some time to land on distros so let's use --device=all
which is retrocompatible and recommended by Flathub linter for this use case.

The only problem is that the "sandbox cops" on our Flathub repo will complain
since we are allowing more devices than needed (even MIDI works as side-effect).
2026-01-27 21:30:21 -03:00
Jehan
8ad5dffa3a app, libgimp, pdb: improve a bit the docs of gimp_drawable_curves_spline().
One point which was raised in #15681 is that the documentation is
lacking.

* Let's write down that the range of the point coordinates is in the [0,
  1] range.
* Also let's rename num_points to num_coordinates because argument
  points will actually contain 2 coordinates per points (so for 10
  points, the points array will be of size 20). We also write that it
  means that num_coordinates must therefore be even.
* Add more spacing in the docs and some better styling and annotations.
2026-01-27 20:48:25 +01:00
Jehan
b85e4db100 app: typo fix.
Not localizing it because anyway it doesn't look this arg is ever shown
in UI (there is another "trc" arg inside the config objects). But at
least fixing this typo because it's ugly.
2026-01-27 20:24:31 +01:00
Bruno Lopes
890514702e gitlab-ci, build/macos: Add custom icon to the DMG volume
See: Infrastructure/gimp-macos-build#60
2026-01-27 11:13:17 -03:00
Bruno Lopes
06e2ebfea4 gitlab-ci, build/macos: Add caching to MacPorts builds
This makes the macOS builds way faster (aprox. 1hr instead of 3.5hr)
thanks to local caching of GNOME runner. We, however, still need to
split them since the timeout is relatively small on such runner.
2026-01-27 08:04:12 -03:00
Alx Sa
815b7a438f app, pdb: Fix arguments for Gimp.clone ()...
...and Gimp.heal ().

The "src-x" and "src-y" arguments for the
PDB Gimp.clone () and Gimp.heal ()
PDB commands belong to 
GimpSourceOptions (which is a child of
GimpPaintOptions).
However, we were setting them to
GimpPaintCore instead, resulting in them
being ignored when cloning/healing via
the PDB.
This patch moves them to the correct
variable to be set, similar to how
1abb4543 moved "src-drawables" to the
GimpSourceOptions variable.
2026-01-27 03:27:20 +00:00
Bruno Lopes
1aa51ca063 meson: Fix libunwind header detection on non-macOS platforms
Closes: #15750
2026-01-26 17:41:15 -03:00
Bruno Lopes
945df2052c build/linux: Update xmu and graphviz modules
Synced from: 07cf41a2b1
2026-01-26 16:08:44 -03:00
Jehan
0f325fa0d0 app: only grab focus on canvas when exiting the color dialog.
This was introduced in commit d4733e5b21. This was triggering a focus
grab each time we changed the color from within the FG/BG dialog, which
in particular had the focus being lost from said dialog. This is not
really good usability wise (and as a side issue, with some themes, the
focus change was apparently a bit bothering visually).
2026-01-26 16:33:00 +01:00
Michael Schumacher
e6a7cdeae6 plug-ins: Fix clang-format warnings in XMC plug-in. 2026-01-25 22:15:36 +00:00
Michael Schumacher
ab8c93b7be plug-ins: Make XMC export actually iterate through the list of layers.
Removes the orig_list and orig_layers variables to simplify the export code, as these are
not used anymore, and advances the list variable to iterate through the layers list. Also
fixes a debug output line to make building with #define XMC_DEBUG work again.

Fixes issue #15645.
2026-01-25 22:15:36 +00:00
Michael Schumacher
6d75090f3c plug-ins: Do not change layer names in the loaded image when exporting to XMC.
Fixes issue #13119.
2026-01-25 22:15:36 +00:00
Jacob Boerema
8c58f543f9 plug-ins: fix alignment in file-psp
I messed up again with the alignment after my previous PSP commit
so let's fix that and also a few other similar mistakes.
2026-01-25 12:23:24 -05:00
Jehan
bfa15552ed NEWS: update. 2026-01-24 16:30:52 +01:00
Bruno Lopes
5abb249d1d gitlab-ci: Make Homebrew builds scheduled only
Since the COMMIT_SHA, we default to build with MacPorts which is more native.

But it is wise to not be overly reliant on it, since it tends to be very flaky,
and Mac platform have very restrictive hardware with software always changing.
2026-01-24 11:42:46 -03:00
Bruno Lopes
472dcb22ee build/macos: Add FIXME comment about ScreenCaptureKit 2026-01-24 09:07:08 -03:00
Bruno Lopes
962291dbb7 build/macos: Build GIMP with MacPorts targeting macOS 11 on our CI
We still need to implement cache and better timeouts in the future.
2026-01-23 23:05:18 -03:00