Commit Graph

51041 Commits

Author SHA1 Message Date
James Golden 22b28df391 app: save dialog now adjusts size up to monitor height
Fixes: #9373
2023-10-20 14:28:30 +00:00
bootchk 3646b86ce0 2.99 libgimpconfig: #10194 broken API GimpItem
And GimpTextLayer, GimpLayerMask
2023-10-20 09:04:42 -04:00
Ekaterine Papava d8140cc2a1 Update Georgian translation 2023-10-20 04:03:45 +00:00
Alx Sa 208e22da3a themes: Define file dialog path buttons hover colors
Resolves #10039.

This keeps the highlight style consistent for the file
dialogues, no matter the underlying system theme.
2023-10-20 02:30:14 +00:00
Alx Sa 2c83d84d02 plug-ins: Load guides and grid info for PSP files
These are stored in the Extended Block. This block also holds metadata
in Exif, IPTC, and XMP formats, but those are not yet implemented in this
patch. A comment stating Exif was implemented in PSP 10 was corrected
to PSP 8 as well.
2023-10-19 19:36:52 +00:00
Rodrigo Lledó f3d54b76b6 Update Spanish translation 2023-10-19 17:52:42 +00:00
bootchk 355f665403 Fix 10170
Changes only to ScriptFu.

The third term (the default) of a SF-FONT etc. spec is now ignored.

Test case is SF>Test>Sphere.  There are still crashing issues
related but separate.
2023-10-19 16:37:05 +00:00
Alx Sa 414f9f9abf build: Replace overlooked gimp_pdb_run_procedure_config () call
from 57ca3f48.
2023-10-19 14:55:59 +00:00
Alx Sa 85d8322c00 widgets: Restore layer/mask highlight on select
Changes were made to the click code for layers & masks
due to the introduction of multi-select, and this seems to
have caused the view highlight to be inconsistent.
This patch adds the gimp_layer_tree_view_update_borders ()
call after a click or selection to fix this.
2023-10-19 10:53:07 +00:00
Alx Sa ad8b47bff7 gui: Change Windows title bar based on theme
On Windows, the title bar can be set to light or dark mode via DwmSetWindowAttribute ().
This adds code to update the main title bar and dialogue title bars based on the current theme.
The main title bar uses "prefer-dark-theme", while the dialogue title bars
uses the color of the widget background to assume the correct color.
2023-10-18 16:48:25 +00:00
Jehan bf8ee69570 plug-ins: fix some broken macros with a massive search-and-replace.
If we leave a space between the macro name and opening parenthese for argument
lists, the args are not considered macro args (which will be discovered when
using it). I experienced this issue while testing code on some plug-in
yesterday, so thought I might as well fix all these broken macros for casting to
the specific GimpPlugIn subclass, so that we won't have a next time.
2023-10-18 18:29:37 +02:00
Jehan 57ca3f4807 libgimp, plug-ins: move gimp_pdb_run_procedure*() to gimp_procedure_run*().
The gimp_procedure_run() already existed, though it was with an ordered
GimpValueArray array of arguments. Its usage feels redundant to the series of
gimp_pdb_run_procedure*() functions (which is confusing), but
gimp_procedure_run() was actually a bit more generic, because it does not
necessarily calls GimpProcedure-s through the PDB! For instance, it can runs a
local GimpProcedure, such as the case of one procedure which would want to call
another procedure in the same plug-in, but without having to go through PDB. Of
course, for local code, you may as well run relevant functions directly, yet it
makes sense that if one of the redundant-looking function is removed, it should
be the more specific one. Also gimp_procedure_run() feels a lot simpler and
logical, API wise.

A main difference in usage is that now, plug-in developers have to first
explicitly look up the GimpPdbProcedure with gimp_pdb_lookup_procedure() when
they wish to call PDB procedures on the wire. This was done anyway in the
gimp_pdb_run_procedure*() code, now it's explicit (rather than calling by name
directly).

Concretely:

* gimp_pdb_run_procedure(), gimp_pdb_run_procedure_config() and
  gimp_pdb_run_procedure_valist() are removed.
* gimp_procedure_run() API is modified to use a variable args list instead of a
  GimpValueArray.
* gimp_procedure_run_config() and gimp_procedure_run_valist() are added.
* gimp_procedure_run_config() in particular will be the one used in bindings
  which don't have variable args support through a (rename-to
  gimp_procedure_run) annotation.
2023-10-18 17:11:20 +02:00
Jehan 701357c02f libgimp, plug-ins: no need for GType of argument in gimp_pdb_run_procedure().
Passing (name, type, value) triplets is actually useless because we can get the
type information from the procedure/config anyway. That only adds one more
verification to do. Let's just change the function so that we pass (name, value)
couples instead, pretty much like in `g_object_set()`.
2023-10-17 15:49:32 +02:00
Jehan 4693f1d824 Issue #10183: --iso-8601 is not a supported option by `date` CLI tool on macOS. 2023-10-17 15:23:30 +02:00
Luming Zh aa8ab50a27 Update Chinese (China) translation 2023-10-16 20:38:01 +00:00
Jehan 475dafcee4 libgimp, pdb: make gimp_pdb_run_procedure_array() internal.
Apart from all regenerated PDB files, this commit fixes the few manual usages in
libgimp too.
2023-10-16 22:12:08 +02:00
Jehan 70438028aa libgimp: PDB procedure arguments are not order-based anymore (API-wise).
As far as plug-in API is concerned, at least the calling API, order of arguments
when calling PDB procedures doesn't matter anymore.

Order still matters for creating procedures with standard arguments (for
instance, "run-mode" is first, then image, or file, drawables or whatnot,
depending on the subtype of procedure), but not for calling with libgimp.

Concretely in this commit:

- gimp_pdb_run_procedure_argv() was removed as it's intrinsically order-based.
- gimp_pdb_run_procedure() and gimp_pdb_run_procedure_valist() stay but their
  semantic changes. Instead of an ordered list of (type, value) couple, it's now
  an unordered list of (name, type, value) triplets. This way, you can also
  ignore as many args as you want if you intend to keep them default. For
  instance, say you have a procedure with 20 args and you only want to change
  the last one and keep the 19 first with default values: while you used to have
  to write down all 20 args annoyingly, now you can just list the only arg you
  care about.

There are 2 important consequences here:

1. Calling PDB procedures becomes much more semantic, which means scripts with
   PDB calls are simpler (smaller list of arguments) and easier to read (when
   you had 5 int arguments in a row, you couldn't know what they refer to,
   except by always checking the PDB source; now you'll have associated names,
   such as "width", "height" and so on) hence maintain.
2. We will have the ability to add arguments and even order the new arguments in
   middle of existing arguments without breaking compatibility. The only thing
   which will matter will be that default values of new arguments will have to
   behave like when the arg didn't exist. This way, existing scripts will not be
   broken. This will avoid us having to always create variants of PDB procedure
   (like original "file-bla-save", then variant "file-bla-save-2" and so on)
   each time we add arguments.

Note: gimp_pdb_run_procedure_array() was not removed yet because it's currently
used by the PDB. To be followed.
2023-10-16 21:56:37 +02:00
Jehan 61e2faed1b app, plug-ins: port "file-gbr-save-internal" to multi-drawable API.
Similar to commit 6905b0bbef for "file-pat-save-internal". For interactive
usage, nothing is changed, but for non-interactive ones, we can now choose a
list of drawables to export.

Pending more changes, relative to the discussion in #7370.
2023-10-16 16:21:42 +02:00
Jehan 2728294063 app: rename "dummy-param" to "run-mode".
Since now the name of arguments will become more important, over order, let's
name the first parameter "run-mode" even in cases when this is a dummy argument
(most often the case when a procedure always acts the same, whether interactive
or not). I keep the mention of the parameter being useless in the nick and blurb
strings, as it's useful information. But let's keep using our "standard" arg
name "run-mode" for this first argument.
2023-10-16 14:49:17 +02:00
Jehan 8e66e5ae58 app: use "num-drawables" consistently for the array size argument of "drawables".
This is the naming we use everywhere else.
2023-10-16 14:45:04 +02:00
Jehan a2c6a5ee72 NEWS: update. 2023-10-16 13:58:03 +02:00
Jehan a101fd60eb libgimp: export again gimp_procedure_config_*_default() functions.
This partially revert some of the changes in commit 652a1b4388 because the
Windows CI suddenly failed because of this (my local build on Linux didn't have
any problem though) with:

> /usr/bin/x86_64-w64-mingw32-ld: libgimp/libgimpui-3.0-0.dll.p/gimpproceduredialog.c.obj: in function `gimp_procedure_dialog_save_defaults':
> /builds/GNOME/gimp/_build/../libgimp/gimpproceduredialog.c:2570:(.text+0x633): undefined reference to `_gimp_procedure_config_save_default'
> /usr/bin/x86_64-w64-mingw32-ld: /builds/GNOME/gimp/_build/../libgimp/gimpproceduredialog.c:2576:(.text+0x644): undefined reference to `_gimp_procedure_config_has_default'
> /usr/bin/x86_64-w64-mingw32-ld: libgimp/libgimpui-3.0-0.dll.p/gimpproceduredialog.c.obj: in function `gimp_procedure_dialog_load_defaults':
> /builds/GNOME/gimp/_build/../libgimp/gimpproceduredialog.c:2549:(.text+0xa2f): undefined reference to `_gimp_procedure_config_load_default'
> /usr/bin/x86_64-w64-mingw32-ld: libgimp/libgimpui-3.0-0.dll.p/gimpproceduredialog.c.obj: in function `gimp_procedure_dialog_constructed':
> /builds/GNOME/gimp/_build/../libgimp/gimpproceduredialog.c:368:(.text+0x11b1): undefined reference to `_gimp_procedure_config_has_default'

This is because these functions are used not only inside libgimp but also
across inside libgimpui. As a consequence, the build fails when linking
libgimpui.
2023-10-15 23:20:44 +02:00
Jehan f25e0448b2 libgimp, plug-ins: gimp_procedure_config_[gs]et_values() not public anymore.
This goes with our planned change of not making GimpProcedure arguments order
relevant anymore regarding the PDB API. In particular, it means we don't want to
use GimpValueArray for various procedure arguments API, but directly
GimpProcedureConfig objects.

This change will allow to add or reorder arguments in the future, so that we
won't have to create new PDB procedures when adding new arguments, while still
keeping PDB API stability.
2023-10-15 22:10:38 +02:00
Asier Sarasua Garmendia 8881079d9d Update Basque translation 2023-10-15 18:51:34 +00:00
Alx Sa 65dd773163 plug-ins: Fix issue with RGBA 32BPP import
Resolves #10174.
The precision assignments for floating point versus integer options
were flipped by accident.
2023-10-15 15:37:13 +00:00
Jehan 652a1b4388 libgimp: do not export private GimpProcedureConfig functions in the lib.
Some of these should not even be visible by libgimp and were just fine as static
as well! For the rest, I make them really private (not only with a private
header).
2023-10-15 17:32:04 +02:00
Jehan b2f633a26c libgimp: all _gimp_procedure_config_begin|end_*() functions made private.
Since now all GimpProcedure and subclasses run these before and after the
relevant run() functions, there is no need to keep these public.
2023-10-15 17:19:30 +02:00
Jehan 317be5f4ce Issue #3912: Object proxy management not happy with bindings.
We cannot be 100% sure generically (i.e. for all possible bindings available
with GObject Introspection) if bindings add their own reference to objects or
not. Clearly we have cases when they always do (Lua, Javascript), cases when
they do only in certain conditions (global Python variables) and cases when they
don't (Vala). What we know for sure is that in these script languages,
developers don't manually manage memory anyway. So the additional reference is
not their fact.

So let's just maintain a list of automatic memory managed binding languages,
among the few we officially support (i.e. the ones for which we have working
test plug-ins) and verify by executable extension if the plug-in is written in
one of these.
Both keeping a manually-updated list and verifying by extension are not so
pretty solution, but for now it will do.
2023-10-15 16:45:15 +02:00
Alx Sa bd7423915c gui: Use "minimize" window hint on Windows
Resolves the second half of #300.

This adds conditional code to the gtk_window_present () call in gui.c
to prevent it from running if the user requested it stay minimized in the shortcut
or commandline call on Windows.
It also keeps the splashscreen minimized in that case.
2023-10-15 14:14:06 +00:00
Jehan d1297b8c2b libgimp: do not unref the additional object reference hold by a plug-in.
As explained in the comment above, the reference might actually be owned by the
binding code (not by the plug-in code) and therefore can still be released
afterwards. Freeing it now while we don't own the reference exposes us to
double-free crashes.
2023-10-15 11:53:27 +00:00
Jehan c9c372e77c build: missing dependencies at Windows build packaging stage.
This is unrelated to the Aarch64 changes. It was just already broken.
2023-10-15 11:53:27 +00:00
Jehan fe465120be build: install lua5.1 instead of luajit on Windows/Aarch64. 2023-10-15 11:53:27 +00:00
Jehan 7f2b301d68 meson: search lua alternatively to luajit.
This will be needed in particular for GIMP on Windows/Aarch64. Also even on
other OSes, it is useful to support lua plug-ins not only with luajit but also
upstream lua.
2023-10-15 11:53:27 +00:00
Jehan 7a34282fa5 gitlab-ci, build: add Aarch64 build in our universal installer.
This is in part a port of commit 6f921b27bb from gimp-2-10 branch, except that I
could not easily cherry-pick because too much had changed already in the master
branch.
There are also a bunch of additional changes in some other glue scripts.

Also some rules which were in the 2.10 branch don't apply to the main one, such
as Python being copied from the x86 binaries, since clang-aarch64 has Python3
(unlike Python2).
2023-10-15 11:53:27 +00:00
Jehan de126b0c32 build: split-debug-msys2.sh fails silently on Windows/Aarch64.
Fixes:

> $ C:\msys64\usr\bin\bash -lc "bash -x ../build/windows/gitlab-ci/split-debug-msys2.sh"
> + '[' -z '' ']'
> + find . '(' -iname '*.dll' -or -iname '*.exe' -or -iname '*.pyd' ')' -type f -exec objcopy -v --only-keep-debug '{}' '{}.debug' ';'
> C:/msys64/clangarm64/bin/objcopy.exe: error: unknown argument '-v'
2023-10-15 11:53:27 +00:00
U-YGGDRASIL\ender 050c56851b Installer: remove setup.ini (not used any more)
(cherry picked from commit 0793b2a796)
2023-10-15 11:53:27 +00:00
U-YGGDRASIL\ender 092be766e5 Installer: include file extension in association name
(cherry picked from commit 597e68a364)
2023-10-15 11:53:27 +00:00
Jehan 4426eef73a build: fix per-architecture directories and Vala plug-in build.
Thanks to Hernan Martinez for noticing this issue which should fix Vala building
both for i686 and Aarch64 builds.
2023-10-15 11:53:27 +00:00
Jehan 17688ffa3a build, gitlab-ci: taking one more patch from MSYS2 project.
This should hopefully fix this error in the CI:

> llvm-rc: Error in ICON statement (ID 1):

See: https://github.com/llvm/llvm-project/issues/51286
2023-10-15 11:53:27 +00:00
Jehan 823f24c401 build, gitlab-ci: temporary patch for the Windows/Aarch64 build.
See discussion in #9170 and !1091. It looks like this soon won't be a problem
with a recent llvm-windres (which is now patched). But until then, let's patch
upstream GIMP but only for this build.
2023-10-15 11:53:27 +00:00
Jehan bb6ac317b8 build: luajit is currently not available in clangarm64 MSYS2 repository. 2023-10-15 11:53:27 +00:00
Jehan b4a06737c0 build: testing a Windows/Aarch64 build.
Note: the additional `rm` call was done for this error:

> + mv _install-arm64 /home/SYSTEM
> mv: cannot move '_install-arm64' to '/home/SYSTEM/_install-arm64': Directory not empty

I guess the home directory is not properly wiped-out between runs, which is not
a huge problem as long as the runner is private to our project. Let's clean
things ourselves.
2023-10-15 11:53:27 +00:00
Anders Jonsson 5c28355d5e plug-ins: remove i18n for widget ID 2023-10-15 10:18:08 +00:00
Jehan 6d36e38018 app: fix a quite-random crash on exit with a race condition.
In some very hard-to-reproduce conditions, I experienced
tool_manager_selected_layers_changed() running on an invalid GimpToolManager
pointer (because tool_manager_exit() had already run) and therefore segfaulting
on quit. Let's make sure we disconnect the signal handler.
2023-10-15 11:45:16 +02:00
Martin 68928ac5ab Update Slovenian translation 2023-10-15 09:44:24 +00:00
Asier Sarasua Garmendia d61b96cef1 Update Basque translation 2023-10-15 07:10:26 +00:00
Jehan 24a4b6bf65 plug-ins: mistakenly internationalized signal names and widget IDs.
Thanks to Anders Jonsson for noticing these.
2023-10-14 19:05:52 +02:00
Jehan ccb8a7be2e meson: fix inserting generation date and time in authors.md. 2023-10-14 17:12:49 +02:00
Martin 8fcf4c44f9 Update Slovenian translation 2023-10-14 15:01:14 +00:00
Martin 56d415f10f Update Slovenian translation 2023-10-14 14:40:57 +00:00