Commit Graph

54147 Commits

Author SHA1 Message Date
edbbb60ea3 Update Bulgarian translation 2025-01-25 11:02:13 +00:00
b1acb256e1 libgimp*, plug-ins: now hide GimpParamSpecChoice struct.
New libgimpbase functions:

- gimp_param_spec_choice_get_choice
- gimp_param_spec_choice_get_default

Now the only GParamSpec in libgimpbase whose struct is visible is
GimpParamSpecObject. This can't change since it is derived into param
specs defined in libgimp and therefore needs to be visible.
2025-01-25 01:28:19 +01:00
080b09bb96 libgimp*: GimpParamSpecValueArray struct also hidden away!
New libgimpbase function: gimp_param_spec_value_array_get_element_spec()
2025-01-25 01:28:19 +01:00
f09d97b9a5 app, libgimp*: GimpParamSpecCoreObjectArray struct hidden too.
New libgimpbase function: gimp_param_spec_core_object_array_get_object_type()
2025-01-25 01:28:19 +01:00
b51f2b5252 gitlab-ci, build: Give up of build caching (ccache)
Actually it does more harm than good on CI, causing inconsistency and work.

The plan was to use it in all jobs but it is simply impossible for Flatpak
(https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/1502)
and seems that for Crossbuilds too (tested both crossroad and quasi-msys2).
Actually, only Windows jobs can use it, but started to fail on x86 runners.

On the other hand, sometimes the build is faster without ccache and we do
not have the burden of contacting managers etc. Just pkg caching is fine.
2025-01-24 21:04:35 -03:00
6e777c861b app, app, libgimp*: hide struct for several GParamSpec based off GimpParamSpecObject.
As a consequence, here are needed new functions:

* libgimp:
  - gimp_param_spec_resource_defaults_to_context()
  - gimp_param_spec_resource_none_allowed()

* libgimpbase:
  - gimp_param_spec_file_get_action()
  - gimp_param_spec_file_none_allowed()
  - gimp_param_spec_unit_percent_allowed()
  - gimp_param_spec_unit_pixel_allowed()
2025-01-24 23:44:43 +01:00
40aa78ac10 libgimp: add support for GimpParamSpecUnit to gimp_procedure_dialog_get_widget(). 2025-01-24 22:09:40 +01:00
23c9503bfa app, libgimp, libgimpbase: use GimpParamSpecObject infrastructure for…
… GimpParamSpecUnit's default value.

When I reparented GimpParamSpecUnit to GimpParamSpecObject in commit
ba3da3d338, I clearly forgot to get rid of the redundant default value.
2025-01-24 22:06:56 +01:00
af53dfab75 Issue #12722: force-query when system language change was not working with LANGUAGE.
It was working with LC_ALL or LANG but not with LANGUAGE which is an
additional system above the locale system AFAIU.
Concatenating both LANGUAGE environment variable and the locale-set
language, we get a more resilient opaque string value to compare.
2025-01-24 20:54:44 +01:00
4ceec875c9 script-fu: Fix parameter typo in chrome-it.scm
Resolved by @Nizhile
In 4bdb8792, a patch porting chrome-it.scm to not rely on
removed brushes included an apparent typo. A decimal
was left off a curve point, resulting in incorrect outcomes.
This patch by @Nizhile fixes the problem.
2025-01-24 13:26:51 +00:00
eb8076526d python: Update Spyro-Plus after GEGL Color update
Resolves #12795
After the Color Space Invasion, gimp_gradient_get_uniform_samples ()
returns an array of GeglColors rather than GimpRGB values and a status
variable. This patch fixes the Spyro-Plus plug-in to expects the new
return values.
It also restores code that utilized the second color gradient in the output
when the Gradient's Repeat Mode is Triangular Wave. This appears to
have been lost during the port from GIMP 2.10.
2025-01-24 02:51:34 +00:00
bb2181b194 NEWS: update. 2025-01-23 23:53:28 +01:00
6cc7d90744 libgimpbase: add a values_cmp() implementation for GimpParamSpecFile.
Without a proper way to compare GFile, gimp_config_reset_properties()
does not reset the config argument to default. This breaks the "Reset to
Factory Defaults" feature in particular.
2025-01-23 23:36:34 +01:00
cb9227a6a1 libgimp: do not call gimp_procedure_dialog_get_file_chooser() from within…
… gimp_procedure_dialog_get_widget().
2025-01-23 23:36:34 +01:00
3115d97248 libgimpwidgets: fix crashing prop file chooser button with GFile arg.
This same widget is used for GFile args and GimpParamSpecConfigPath
specs. The latter are string-based. So we need different code to handle
both types of arguments.

This was crashing when a change was coming from the config object,
rather than from the GUI, such as when doing a reset to factory values.
2025-01-23 23:36:34 +01:00
f4f68c686f Update Dutch translation 2025-01-23 20:06:51 +00:00
2e2c672544 Update Dutch translation 2025-01-23 20:00:54 +00:00
a2cb96c250 build/windows: Comment situation of some versioning code on Installer .ps1 2025-01-23 16:53:20 -03:00
042d3051c6 app, libgimpbase: do not try to open a non existing file.
Now that GimpParamSpecFile makes file validation depending on the action
set in the param spec, when trying to open a non-existing file (which
can happen through GUI, for instance when opening through the Document
History dockable or Open Recent menu), we had a quite obscure error
about a value "out of range" used "for argument 'file' (#2, type
GFile)", which is because core tried to set the GFile for a non-existing
file into the second parameter of the plug-in PDB. This is not a very
nice error for end-users.

The old error was much nicer as it used to say things like:

> Could not open '/path/not/existing.png' for reading: No such file or directory

But in fact, this string came from the plug-in, which means:

* first that the error can be different depending on the format
  (inconsistency of error message);
* depending on bugs in plug-ins, it may just crash or return no error
  messages;
* finally we were making a useless call to a load plug-in while we
  should already know from core that it won't work.

The new message is something like:

> Error when getting information for file "/path/not/existing.png: No such file or directory

This error is generated by core, so it will always be consistently the
same, is understandable too and the plug-in won't even be called.

As a side related fix, I updated the GimpParamSpecFile validation to
only validate local files, just like we do in core. Remote files can
always be set (and we let plug-ins handle them), at least for the time
being.
2025-01-23 20:04:54 +01:00
f9203916c0 gitlab-ci: Workaround lack of common 'x86_64' runner tag
This way, we can use OSUL and Canonical runners on some Debian jobs.
2025-01-23 13:49:16 -03:00
7f3741957e Update Danish translation 2025-01-23 16:26:55 +00:00
7ad02976c4 Update Danish translation 2025-01-23 16:24:21 +00:00
38277a1fee gitlab-ci: More g-ir-doc remnants removal (not at dist job)
Following 55d0745b

This one was a bit more hard to catch since
the devel-docs dir is heavily disorganized.
2025-01-23 09:34:18 -03:00
55d0745bc0 gitlab-ci: Fix broken Debian jobs after removal of g-ir-doc option
26a079bd lacked a bit of CTRL + F
2025-01-23 09:18:31 -03:00
c57b10aff4 gitlab-ci: Do not install yelp-tools since we got rid of g-ir-doc in 26a079bd 2025-01-23 09:15:08 -03:00
26a079bd57 devel-docs: get rid of g-ir-doc.
Per the (quite off-topic) discussion in #12772, the fact it's quite
broken on Windows, apparently not too maintained anymore and its syntax
clashes with gi-docgen syntax…
2025-01-23 13:07:03 +01:00
9821d91745 app: Make possible to 'gimp-debug-tool' work relocatable
Following 50b6ba63

This is specially useful for AppImage and Snap
2025-01-23 08:53:13 -03:00
d25c97e7c9 libgimp, libgimpbase: fix passing a file spec action through the wire.
I forgot to set meta.m_file.action into the GPParamDef! 🤦

As a side update, let's store the action as gint32 in GPParamDefFile. I
realized that otherwise, depending on the actual size of an enum type,
when casting to a (guint32 *), we crop the value! This works out in
Little Endian because we are only in small number territory, but in Big
Endian, we would always crop any action value to 0!
This was not the bug in this specific case, but it could become the
exact same bug (always passing action 0, i.e. OPEN, through the wire) on
Big Endian hardware.
2025-01-23 00:52:18 +01:00
8db404516e python: Fix file arguments after 161b3c53
We accidentally missed updating the
Python file parameters after 161b3c53.
This patch updates the API as well.
2025-01-22 21:29:16 +01:00
e752687321 libgimp: fix introspection.
The variable name was not the same on function declaration and
definition/annotations and this was confusing GIR scanner.
2025-01-22 21:29:16 +01:00
c975c1d19b Update Norwegian Nynorsk translation 2025-01-22 18:30:57 +00:00
915be5ce33 Update Norwegian Nynorsk translation 2025-01-22 18:28:30 +00:00
8b50f186b9 plug-ins: fix incorrect loading of psd cmyk merged images
I don't know what I was seeing when I added this several years ago,
but I can't find any psd CMYK images where the merged image is RGB.

It is wrong for the CMYK images we have and there are none so far
that do conform to it, so let's remove this code.
2025-01-22 18:25:16 +00:00
4203761708 plug-ins, psd: fix #12745 invalid merged image when selecting cmyk
The merged psd image we create when writing psd's is incorrect when
we selected cmyk at export.
The problem is that we are only saving the 3 channels of our RGB
input image, or 1 for a grayscale image.
Move the channel count up and compute it separately for cmyk, then
reuse the count instead of computing it again.
2025-01-22 18:25:16 +00:00
50b6ba6366 build/linux: Include 'gimp-debug-tool' on AppImage
It works, but do not work well if 'gdb' or 'lldb' are installed.
2025-01-22 14:26:09 -03:00
161b3c5331 Issue #12045: no defaults for plugin args of type File.
libgimpbase:

  - Mew GimpFileChooserAction enum type: basically a near-mapping of
    GtkFileChooserAction (GTK is not accessible from libgimpbase) with
    an added GIMP_FILE_CHOOSER_ACTION_ANY.
  - New GimpParamSpecFile param spec type: based off
    GimpParamSpecObject, it has a default value, but also a none_ok and
    action argument. This way, we can also know from the argument type
    if this is a file argument meant for selecting a normal file or a
    folder, or for saving into a file, or for creating a directory.

libgimp, plug-ins:

  - All existing file arguments (until now using a standard
    GParamSpecObject param with GFile value type) were moved to the new
    GimpParamSpecFile.
  - Script-Fu in particular will now generate the appropriate param type
    depending on whether it is an SF-FILENAME or SF-DIRNAME.
  - File arguments are now stored between runs as a URI rather than as a
    path. As far as I can tell, a GFile always has a URI, but not always
    a path (in particular remote file won't have a path).
2025-01-22 17:53:21 +01:00
b6d6ccecc7 plug-ins: Make PSD compatibility messages selectable
For diagnosis purposes, it is useful for people to be able to copy and paste
the compatibility warning text that GIMP shows when loading a PSD with
unsupported features. This patch makes that label selectable, which allows
for copying.
2025-01-21 23:07:12 +00:00
a64c46b830 Issue #12776: Underscored .isl langs (pt_BR, zh_CN and zh_TW) lost translation on Installer.
This is again a change in gettext 0.23 whose release notes say:

> The value of the xml:lang attribute, inserted by msgfmt, now conforms to W3C standards.

Our xpath selection now recognizes both the old and new (proper) format
so that it works both with older and new versions of msgfmt.
2025-01-21 20:41:57 +00:00
f58d36a942 script-fu: Further API fixes to Render Font Map
f4582d97 uses gimp-font-get-lookup-name, which is now
marked as private PDB. This patch replaces that usage with
gimp-resource-get-name, which is public and standardized.
2025-01-21 20:24:49 +00:00
6dfc9f96c5 app, libgimp, pdb, plug-ins: improve and rename gimp_file_save_thumbnail() to…
… gimp_file_create_thumbnail().

One more case where "save" is misleading, and even more as it's not a
procedure where we control where an image is stored. We only say
basically "make a thumbnail which maps to this file according to my
platform's rules".

As a side fix, I also improved a bit the logic so that it allows @file
to be the exported or — as last fallback — the imported file.

And finally improve the function's docs.
2025-01-21 20:31:27 +01:00
66aacf9633 plug-ins: add support for loading 16-bit per channel LAB psd's 2025-01-21 19:28:25 +00:00
f4582d97dd script-fu: Fix Render-Font-Map after API updates
Resolves #12753
gimp-fonts-get-list now returns a vector rather than a list,
so we needed to change calls for length to vector-length
and replace car with vector-ref.
2025-01-21 16:41:52 +00:00
602e8f71c7 app, libgimp, pdb: reword some save/export API documentation.
Followup of the save/export difference, plug-ins can only register
"export" handler procedure (save handlers are registered by core). Also
rename _gimp_pdb_set_file_proc_save_handler() though it's private so it
doesn't matter much.

Now gimp_file_save() is a special case, because it can indeed "save" to
XCF or "export" to any other format. So I just leave it named this way,
but I make the function's documentation more exhaustive.
2025-01-21 17:40:11 +01:00
f98c9a851b Update Norwegian Nynorsk translation 2025-01-21 15:52:35 +00:00
a2a6bda810 Update Norwegian Nynorsk translation 2025-01-21 15:51:56 +00:00
adef456236 Update Norwegian Nynorsk translation 2025-01-21 15:48:15 +00:00
6726372464 Issue #12729: copy-paste into a path is lost. 2025-01-21 15:15:07 +01:00
9f204e7441 Issue #12772: fix annotations. 2025-01-21 15:04:34 +01:00
efdd0b76ef plug-ins: Remove unused variables in Gradient Flare 2025-01-21 01:51:19 -05:00
2b8c4ff0de NEWS: update. 2025-01-20 22:45:30 +01:00