Commit Graph

52327 Commits

Author SHA1 Message Date
Jehan 252f991cfb app: swapping gimp_prop_color_button_new() and gimp_prop_gegl_color_button_new().
Color propwidgets now use GeglColor only.
2024-04-18 00:37:20 +02:00
Jehan 80334f0eba app: gimp_gegl_color_new() is not used anywhere anymore.
We don't need to convert GimpRGB to GeglColor now as we work directly with
GeglColor!
2024-04-18 00:25:14 +02:00
Jehan 266e694920 libgimp: library unit testing should use a separate environment.
The comment I had written back then was wrong. Meson in fact can create an env
object from another with a simple assignment (which copies the object, rather
than pointing to a same object), per the answer which has been given to me in:
https://github.com/mesonbuild/meson/issues/13045

This allows to have a properly separate environment (when using GIMP as a build
tool, we don't want to load the test files).
2024-04-18 00:01:30 +02:00
Jehan 354970c0eb tools: make sure in-build-gimp.sh fails when the gimp-console command fails. 2024-04-18 00:01:30 +02:00
Jacob Boerema 204bc9390e plug-ins: compose needs to add .xcf filename extension
We are using `gimp_image_set_file` to set the filename, which
requires an extension, not doing so caused an error.
So let's add .xcf to all compose filenames.
2024-04-17 16:58:27 -04:00
Jacob Boerema 4aa3e7a475 plug-ins: fix #3480 decompose extension needs to be .xcf
When decomposing, the plug-in sets the filename without changing the
extension. However, gimp_image_set_file requires the filename to be
an .xcf file.

To fix this we simplified `generate_filename` to always add an
.xcf extension.
While doing this we also fixed a critical that happened when no
filename was set (new image), by testing `gimp_image_get_file` for
being NULL first.
When no filename was set it also didn't use the type when
config_as_layers was set, this is also fixed.
2024-04-17 16:58:27 -04:00
Alx Sa 2af0218d23 widgets: Do not show internal procedures as search actions
Resolves #11334

GBR, GIH, and PAT have internal save functions which are not meant
to be run directly. However, they were showing up in the Search dialogue
as valid options. This patch adds an additional check for "-internal" to
prevent users from accidentally running them, as they only give a warning.
2024-04-17 17:10:18 +00:00
Sveinn í Felli 64d994b198 Update Icelandic translation 2024-04-17 16:37:37 +00:00
Jehan 88d4033b98 Issue #9578: crash accessing tab menu.
The whole action name prefixing will definitely need to be straightened up in
our codebase at some point (differenciating the global actions and the local
ones).
2024-04-17 18:22:53 +02:00
Martin 3d2207558c Update Slovenian translation 2024-04-17 13:38:45 +00:00
Alx Sa 337ec4cd57 themes: Prevent "bold" button icons when focused
Extends aefdb84b to all buttons with images.
2024-04-17 10:37:49 +00:00
Yuri Chornoivan 5c287b9b9d Update Ukrainian translation 2024-04-17 10:16:55 +00:00
Sveinn í Felli 756e12efa1 Update Icelandic translation 2024-04-17 09:18:01 +00:00
Sveinn í Felli 5c610c203c Update Icelandic translation 2024-04-17 09:16:21 +00:00
Sveinn í Felli 7dd8b62860 Update Icelandic translation 2024-04-17 08:58:02 +00:00
Sveinn í Felli 554bb34371 Update Icelandic translation 2024-04-17 08:46:35 +00:00
Alx Sa aefdb84bb4 themes: Prevent too thick image button border
Resolves #11337

"gtk-icon-shadow" is applied to all buttons with images,
which creates a bold effect on symbolic icons.
This patch zeroes this effect out and makes them highlight
the background in the same way as the toolbox buttons.
2024-04-17 04:15:17 +00:00
Jacob Boerema ae2cf562e8 libgimpwidgets: fix #10821 Problem with LabelSpin widget
For certain min/max values of the LabelSpin widget, in combination with
zero digits, it proves impossible to change the initial value.
The reason for this is that the step size may become less than 1.0.
In which case, stepping doesn't work because the number of digits is
set to zero.

Let's check for this situation and when digits is zero set the step
to 1.0 and make sure that page is at least the same value.

While testing this I also noticed another issue: when initializing
the upper value was set to 0.0 and the lower to 1.0 which leads to
a critical because lower > upper.
We fix this by switching the initial upper and lower values.
2024-04-16 21:44:22 -04:00
Jordi Mas b71464804d Fixes to Catalan translation 2024-04-16 21:58:22 +02:00
Jacob Boerema f574dc7f0f plug-ins: add missing error message when TWAIN driver isn't found
There was no user feedback when our twain plug-in couldn't find the
(32-bit) TWAIN driver, making for a poor user experience.

Especially since nowadays the availability of the twain driver is
less likely, let's add an error message for the user, so they will
know what's going on.
2024-04-16 15:09:49 -04:00
Jehan 956a9fac6c Issue #10715: icon for effects.
We now have a proper icon thanks to Denis Rangelov!
2024-04-16 19:54:06 +02:00
Jehan 3e980d5ad4 libgimp: generate build-only GIR/Typelib variants for macOS.
The previous commit worked for all the compiled executables, but for Python
plug-ins (and likely all other GObject-Introspected bindings), we need to
generate a temporary typelib linking to the in-build-directory libgimp*
libraries.

This is similar to what the script `package/macports_build_app.sh` does for
packaging in gimp-macos-build repository.
2024-04-16 17:43:15 +00:00
Jehan a78c41d2a3 meson: on macOS temporarily update rpath to find libraries of non-installed GIMP.
The DYLD_LIBRARY_PATH trick was working fine on CI, but not on local builds for
Lukas. Apparently there are security measures disabling the environment
variable. Instead let's temporarily add then remove libgimp libraries folders
from rpath.

See: https://gitlab.gnome.org/Infrastructure/gimp-macos-build/-/merge_requests/292#note_2075291
2024-04-16 17:43:15 +00:00
Yuri Chornoivan 7f76285bc8 Update Ukrainian translation 2024-04-16 17:16:31 +00:00
Alx Sa c92cf7e8f2 plug-ins: Convert file_*_save to file_*_export
Resolves #10932

Since GIMP distinguishes between saving
XCF and exporting image like PNG,
we should change the PDB to show
export rather than save in the function
calls.
2024-04-16 16:07:10 +00:00
Bruno Lopes d09a2a6f7a gitlab-ci: Drop 'packaging' stage
This stage was introduced in 076e4d68 and it fulfilled well its purpose. But
the side effects were: more (sometimes slow) uploading and downloading of
packages and artifacts. Even if we have caching, this is far from ideal.

Now, the so-called "packaging" jobs were moved inside in the "build" jobs.
The advantages are: just one pacman install (ideally cached from deps job);
direct packaging without waiting for upload/download; and less confusion,
since "packaging" naming was implying that the .zips are somewhat official,
which isn't totally true, and sometimes overlaps the dist/deploy concept.

---

Also, the flatpak job now uses config.h instead of triggering a GIMP build.
In other words, I'm reverting part of my work in some old commits.
2024-04-16 12:08:07 -03:00
Jehan bf91e454fd app: fix build warnings.
Fix 2 "discards ‘const’ qualifier from pointer target type" warnings.
2024-04-16 16:40:36 +02:00
Jehan f10d9a706d app: keep image reference with weak pointer in GimpStatusBar.
Unlike the previous 2 commits, this was not making an error but was the reason
why our code was keeping the last closed GimpImage alive a bit longer than it
should. In particular, the status bar code was keeping a hard reference to the
image until the focus changed, hence preventing the object to get finalized
longer than necessary.

Now it will also be a weak reference, so the image is immediately freed when the
view is closed.
2024-04-16 15:48:54 +02:00
Jehan d888e95cfa app: keep track of image with a weak pointer.
Similar to the previous commit, but this time for the GimpAlignOptions.
2024-04-16 15:43:40 +02:00
Jehan 9abda0ab00 Issue #10826: crash when closing view.
Using weak pointers to make sure that the previously pointed image is still a
valid GimpImage.
2024-04-16 15:43:40 +02:00
Bruno Lopes c064148a95 gitlab-ci: Make the CI a little more smart
Now, the CI will auto cancel jobs after a new commit is pushed and retry when
the runners fails. The first case is frequent, the last is rare but happened.
2024-04-16 08:57:14 -03:00
bootchk 4048556171 libgimpwidgets: fix #11255 unterminated Wayland window ID string
Copy the NULL when creating GBytes from a string.
2024-04-16 09:26:00 +00:00
Alx Sa 5b5a8f58e4 python: Fix ColorXHTML export
Since the GeglColor port, gimp_drawable_get_pixel () returns
a GeglColor rather than a GimpRGB structure. We needed to
update the supporting code in ColorXHTML to handle the change.
2024-04-16 01:57:01 +00:00
nb1 d8c98e74f3 Refreshing the templaterc 2024-04-15 23:46:32 +00:00
Anders Jonsson bca4679fa3 python: fix translation of Spyrograph dropdowns 2024-04-15 23:19:02 +00:00
cheesequake 8153dffb92 Issue #9727: Reduced text area to improve Slider UX 2024-04-15 22:31:35 +00:00
Jacob Boerema af8ef61a04 app, pdb: fix incorrect group checks for edit-cut and edit-named-cut
As a follow up to the previous commit, I noticed that the pdb functions
gimp-edit-cut and gimp-edit-named-cut also incorrectly used
gimp_pdb_item_is_group.

This can be seen by calling Filters/Blur/Tileable blur when a group
layer is selected. The error message was incorrect.
We replace the call here also to `! gimp_pdb_item_is_not_group`.
2024-04-15 18:13:32 -04:00
Jacob Boerema 7aa33bf771 app, pdb: fix #8363 gimp_selection_float() crash
Calling gimp_selection_float from a Python plug-in could make it crash
with an error like Calling error for procedure 'gimp-selection-float':
Item x cannot be used because it is not a group item.

This is caused by an incorrect check for group layers.
gimp_pdb_item_is_group returns an error when the condition is False,
while we only want an error when a group layer is selected (True).
Thus we need to use gimp_pdb_item_is_not_group, which returns an error
when the item is a group, which is what we want.

These function names are a little confusing, we might need to think
about better naming sometime.

I added C/Python tests for this function, so that we can test whether
this works correctly.
2024-04-15 18:13:32 -04:00
Jehan 140a3c82d0 Issue #10713: API versioning got broken with meson.
This is now back in sync with how it used to be up to GIMP 2.10. Basically our
API version should always be <major>.0 in the shared libraries naming, as well
as in pkg-config and docs. Otherwise we would break library compatibility with
every minor version bump.
2024-04-15 23:35:37 +02:00
Jehan d7ec3a5ca4 tools: delete a remnant from autotools paths.
Library binaries are not under a hidden .libs/ directory anymore.
2024-04-15 23:35:37 +02:00
Alx Sa 167066a468 plug-ins: Get Blue channel in Palette-Sort
Per Elad Shahar, this should be v.b instead of v.r.
2024-04-15 18:12:29 +00:00
Alx Sa 15ffc4a6c0 plug-ins: Improve FITS import error handling
Code that checked if an image was NULL was run
*after* the variable was used in a function,
gimp_image_resize_to_layers (). This patch moves
the NULL check before the function call is made.
Additionally, we now verify there are at least two axis
before trying to access indexes in the naxis array.
2024-04-14 17:20:40 +00:00
Bruno Lopes 876c709a29 gitlab-ci: Move 'image:' from deprecated global to .default 2024-04-14 13:52:29 +00:00
Bruno Lopes 18079e176f gitlab-ci, build/windows: Unify a bit Windows (cross and native) jobs 2024-04-14 10:36:04 +00:00
Martin d9694a6e38 Update Slovenian translation 2024-04-14 10:27:48 +00:00
Ngọc Quân Trần 761d740f9b Update Vietnamese translation 2024-04-14 08:01:24 +00:00
Ngọc Quân Trần 6ee9158cca Update Vietnamese translation 2024-04-14 03:10:09 +00:00
Ngọc Quân Trần 26d6aa4c6d Update Vietnamese translation 2024-04-14 03:08:43 +00:00
Bruno Lopes ad132ad0fa gitlab-ci, build/windows: Organize 'git' variables 2024-04-13 20:47:47 -03:00
Bruno Lopes 5202935db7 gitlab-ci: Make use of 'before_script' less unorthodox
Since !1171 the 'before_script' was being used by me for organization, but
this is at least unexpected to "mainstream" .yml pratice and can be wrong.
For example, the universal variables can't be properly used this way.
So, let's use 'before_script' only for the (official) purpose: save code.
2024-04-13 23:12:34 +00:00