Commit Graph

53978 Commits

Author SHA1 Message Date
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
18d88c207c app, libgimp, pdb, plug-ins: PDB (gimp-group-layer-new) made public. 2025-01-20 22:38:01 +01:00
957d76fd14 app, libgimp, pdb, plug-ins: PDB (gimp-layer-copy) made public.
Not sure what I had in mind with the class method copy() in libgimp
GimpLayer. The core duplicate code already takes care of returning an
object of the right type. Also the GimpTextLayer implementation was not
a perfect copy (only text, font and font size were copied). Now it is
because, again, core has all the duplication code necessary.

Finally this makes this function visible to PDB, hence Script-Fu, again.
2025-01-20 22:38:01 +01:00
92330f7b3c plug-ins, psd: Allow exporting of metadata, color profile and thumbnail
The PSD export dialog did not allow you to choose what metadata to
export, nor whether the color profile and thumbnail should be exported.
The metadata and thubmnail were not exported at all.

A recent commit changed this export dialog to GimpExportProcedureDialog,
which now allows us to easily add support for these types by
indicating we support these for psd, which is what this commit does.
2025-01-20 15:54:14 -05:00
250932caa4 plug-ins, psd: fix two issues with debug output
When using GIMP_DEBUG=file-psd to have debug output in the terminal,
there are two issues:
1. When exporting there is a critical because nowadays we work on a
copy of the image, which doesn't have a filename attached to it, so
let's just remove this debug statement.
2. When loading the merged image, we do not load all layer resources,
since we don't need them. In this case it is expected that the layer
offset isn't at the end of the resources. We now skip writing this
debug statement in this specific case. The offset will be adjusted
in the lines below this.
2025-01-20 15:14:17 -05:00
65635e8a0c app, libgimp, pdb: also get rid of gimp_text_layer_new() wrapper.
See previous commit.
2025-01-20 20:55:48 +01:00
e125c30cfd Issue #12771: (gimp-layer-new) is missing.
The libgimp wrapper was just calling the PDB procedure. Get rid of the
wrapper and make the PDB proc public. Also reorder the name argument to
be in the second place, just like it was for the wrapper.
2025-01-20 20:55:48 +01:00
305303330c app, libgimp, pdb: fix a null_ok/none_ok mixup.
We had 2 flags to indicate that a PDB argument could be nullable:
null_ok and none_ok. That was a huge mixup and the PDB generation code
was using sometimes one, sometimes the other. Let's settle for only
none_ok.

This fixes a bunch of annotations.
2025-01-20 20:55:48 +01:00
d8df72869f core: Copy simulation settings when duplicating images
Among other issues, this bug impacted exporting images with CMYK
simulation profiles. Because the image was duplicated for export, we
lose the simulation profile information after
gimp_export_options_get_image () is called.
This patch ensures the profile, simulation intent, and simulation
black point compensation toggles are carried over to the new image.
2025-01-20 18:28:36 +00:00
54c92db299 plug-ins: Use GimpExportProcedureDialog for PSD export
Previously we used GimpProcedureDialog,
rather than the specialized export dialog.
2025-01-20 17:29:06 +00:00
6e3c60dd66 Issue #12760: make the metadata PDB arguments public. 2025-01-20 17:58:30 +01:00
d511efb822 libgimp, plug-ins: rename the various "save-*" metadata arguments…
… per discussion with Liam on IRC.

I should have done this sooner, not in a RC, but it's better to do it
now, rather than after 3.0 is released!
2025-01-20 17:58:30 +01:00
beecc7b723 gimp-data: Update to have proper Installer right-top icon size 2025-01-20 13:01:27 -03:00
f17a42be75 plug-ins: add type check for the argument names in filter configuration too.
After the few specific args (drawable/filter ID, opacity, blend mode, op
name…), the op argument names can be passed either as string or with the
new argument name syntax. The error message though focus on argument
name type.

Also fix the argument count for the various possible cases (when
configuring with (gimp-drawable-filter-configure) or
(gimp-drawable-merge|append-new-filter), the start arg count is
different).
2025-01-20 15:28:15 +01:00
6a85288723 NEWS: update. 2025-01-20 01:09:01 +01:00
f92f7d425c plug-ins: new named argument syntax in Script-Fu.
This syntax is now the official syntax for non-core PDB procedures.

I.e. that while core procedures will still use ordered arguments (e.g.:
`(gimp-image-get-layers 1)`), plug-in PDB procedures called from
Script-Fu will have named arguments in any order.

Say for instance that you want to call python-fu-foggify from Script-Fu.
Whereas we used to run:

> (python-fu-foggify RUN-NONINTERACTIVE 1 (car (gimp-image-get-layers 1)) "Clouds" '(50 4 4) 1.0 50.0)

Now we should call:

> (python-fu-foggify #:image 1 #:drawables (car (gimp-image-get-layers 1)) #:opacity 50.0 #:color '(50 4 4))

Now we can note:

* Every argument is preceded by a #:label which is the argument name.
  This makes these calls much more readable (some plug-in procedures can
  have dozen of arguments and these end up as list of integers, floats
  and strings, which are hard to read and hard to debug) and semantic.
* Order doesn't matter anymore. For instance here, I put #:opacity
  before #:color.
* As a direct consequence, we can drop any argument which we wish to
  keep with default value. E.g. in the old style, we had to put the
  #:run-mode, #:name ("Clouds") and #:turbulence (1.0) because we were
  changing the last argument #:opacity (50.0). Now we can drop all 3
  default arguments.

Having non-ordered argument is in fact the starter of this feature,
because it is already the case for calling PDB procedures in the libgimp
API (and therefore in all GIR bindings). By saying that the order of PDB
procedures is not part of the API, we actually allow to add arguments
and even to reorder them in the future without breaking existing scripts
in the 3.0 series.

This became even more serious when I was considering to make the generic
metadata arguments public. Since they are appended to the end, after all
plug-in-specific arguments, if I do this, adding any argument in an
export plug-in would break order. It won't matter anymore!

Note that it doesn't matter for core PDB procedures (where this syntax
is not used) because these are also C functions and therefore order and
number of arguments matter anyway. Also these don't have dozens of
arguments.

As a helper for Script-Fu developer, in particular as we already
released 2 RCs and therefore some people already started to port their
scripts, the old syntax will still work yet will produce a warning
showing how to call the same thing with the new syntax. For instance,
with the above first call, the warning will be:

> (script-fu:2059912): scriptfu-WARNING **: 22:54:47.507: Calling Plug-In PDB procedures with arguments as an ordered list is deprecated.
> Please use named arguments: (python-fu-foggify #:run-mode 1 #:image 1 #:drawables (2) #:name "Clouds" #:color '(50 4 4) #:turbulence 1.000000 #:opacity 50.000000)

Note that the argument name syntax is coming from the Racket scheme
variant: https://docs.racket-lang.org/arguments/index.html

Common Lisp has a similar syntax, either with just a colon, or also a
sharp + colon (it's unclear to me the difference, something about
interned vs. uninterned symbols).
After discussion with Liam on IRC, we decided to go with the #: syntax
of Racket.
2025-01-20 00:01:23 +01:00
751665a7bd app: gimp_pdb_query() in libgimp doesn't return private procedures anymore.
A main consequence of this is that the Procedure Browser plug-in in GIMP
doesn't show now private PDB procedures. I was always finding this
annoying as their presence in the procedure browser would encourage
people to use these in plug-ins and scripts (even when sometimes we
added explicit description that these should not be used).

Now it's clearer. The procedure are much more hidden to plug-in
developers (and if they still use them, it's at their own risk,
especially of having broken plug-ins when we change signature of these
as they are not meant to be used, and therefore we don't promise
stability for these).
2025-01-20 00:01:23 +01:00
45af19e917 app, libgimp, pdb: adding concept of core and private PDB procedures.
Core procedures are all the procedures created for libgimp basically. In
opposition, procedures created by plug-ins are not core procedures.

GimpProcedure class in libgimp now has a gimp_procedure_is_core() which
will tell you if a procedure is core or not.

Private procedures already existed, except that they were only marked as
"private" in libgimp (e.g. _gimp_font_get_lookup_name()) starting with
an underscore and marked as G_GNUC_INTERNAL. Now we also store this
information in the procedure object itself for reuse.
2025-01-20 00:01:23 +01:00
b53d88a6ac gimp-data: New Installer assets size 2025-01-19 16:58:40 -03:00
2e69cbb980 core: Use basename rather than URI for file loading
Certain cloud providers return a blobname
rather than the actual filename with
g_file_get_uri (). Since our code only checks
the suffix and extension of non-native files,
we received "Unknown File Type" when
trying to load images from those providers.

This patch replaces g_file_get_uri () so that
we get the display-name instead, which
should always have the extension. This
may be changed in the future when we
switch to a FileChooser portal.

This same pattern is also used on the
GimpThumbBox so we see the display-name
rather than the blob name.

Thanks to Khalid Abu Shawarib for the
additional information!
2025-01-19 18:28:32 +00:00