Commit graph

54290 commits

Author SHA1 Message Date
Jehan
388e346a5c app: further fix merging a pass-through group when opacity < 1.0.
Just using the output of the group is not enough since the pass-through
mode cannot be reused for the normal layer (and anyway all below layers
will have been removed). This still works out with a full-opacity
pass-through, but for lesser opacity, what we want is to replace with
not just the group's render, but in fact the render after the
compositing node.

As far as my tests go, we should now have exactly the same render before
and after merging a pass-through group, whatever the group opacity.
2025-03-11 17:18:42 +01:00
Alx Sa
7013fad34d core: Use selection when updating GimpBrushClipboard...
...and GimpPatternClipboard

Resolves #10046
After 1b64fdf5, gimp_get_clipboard_object () no longer
returns a merged version of the selected area.
This affected the Clipboard Brush, Clipboard Mask,
and Clipboard Pattern, causing them to always use the
entire image instead.

To restore the 2.10 behavior, we check if the pasted
image has a selection. If so, then we call 
gimp_selection_extract () to get the buffer of the
selected area. We also need to unreference this
buffer afterwards, so a boolean check is added once
the buffer has been copied over to the brush and
pattern.
2025-03-11 12:40:08 +00:00
Jehan
f3eb02b2f0 app: merging a pass-through group should merge all visible layers below it.
Existing logic to merge a pass-through group layer was wrong because it
was changing the global rendering of the image as though the group was
in fact in Normal mode.

Instead a pass-through group can be kinda considered as a Normal group
which would contain not only its children, but also all visible sister
layers below it. Therefore the new pass-through group merging will be
taking the real pass-through group render into the new layer (we don't
change the original group's mode before copying the render anymore), set
to Normal mode, then we remove not only the pass-through group but all
its big sister layers below it on same level.

Organizational-wise, it may seem unexpected because "merging" this group
leaks outside it (getting rid of not only the children but also the big
sisters and cousins). Nevertheless this is exactly how this group mode
works after all. So let's go full-in.

After discussing on IRC with Wormnest and NikcDC, we decided that it was
worth doing this specific merge the technically proper way, and we would
just educate people through the docs on why this group mode is very
particular this way.
After all, if someone absolutely wants the old-style merge, they can
always manually change the group to Normal mode first before merging.
But if they let to "Pass-Through", we should assume this is the render
they want.
2025-03-11 12:43:43 +01:00
Jehan
db8be0c28c app: fix order of context reset when exitting.
Some data in a GimpContext may have a reference to a GimpImage. In
particular there may be a GimpLineArt when the bucket fill tool is ON
when exiting GIMP.

In such a case, gimp_exit_idle_cleanup_stray_images() would see a
remaining GimpImage, would believe it's a stray image left by a plug-in,
output an INFO message and free it, which would in turn produce various
CRITICALs when actually finalizing the GimpContext.

Therefore we move gimp_contexts_exit() into gimp_exit(), and not when
disposing of the Gimp object (which happens too late).
2025-03-11 12:43:43 +01:00
Bruno Lopes
6484c7ed11
gitlab-ci: Fix failing git tag of babl and gegl 2025-03-10 14:42:50 -03:00
Bruno Lopes
412e33a638
build/windows: Fix 6fcf3c954b 2025-03-10 12:27:23 -03:00
Bruno Lopes
6fcf3c954b
build/windows: Create nightly MSIX identity: "GIMP (Insider)"
This avoids crashes from non-release branches being sent to Partner Center.
2025-03-10 12:21:26 -03:00
Bruno Lopes
ca0afabbf9
gitlab-ci: Proper fix to 'connection reset by peer' error
142de1c4 was wrong
2025-03-10 10:16:43 -03:00
Bruno Lopes
142de1c41b
gitlab-ci: Try to mitigate 'connection reset by peer' error 2025-03-10 09:09:34 -03:00
Øyvind Kolås
9f73ecaa6d meson, app: depend on babl-0.1.112 2025-03-10 12:59:12 +01:00
Nathan Follens
87ff181a3a Update Dutch translation 2025-03-10 11:56:42 +00:00
Jehan
b7b2516350 gimp-data: update to stable splash image. 2025-03-10 12:26:32 +01:00
Alx Sa
0806bc76ca plug-ins: Fix ZDI-CAN-25100 for FLI plug-in
Resolves #13073
This patch adds a check to make sure we're not
writing beyond the bounds of the "pos" array.
This is the same check that we do earlier when
writing pos[xc++], but it was left off of the last
write command. Since "n" will be 0 if we get to the
end of the array, it prevents us from writing beyond
that.
2025-03-10 04:07:44 +00:00
Alx Sa
121a997af5 app/tools:
Resolves #12967

In cdd51740, we added a destructive option
for filters. Since toggling this moves the filter
to the bottom of the stack, we refresh the
layer.
However, layer masks and channels can not
yet have filters applied non-destructively,
so this code created unnecessary undo history
items when commited. This patch adds a
check so that we only refresh layers and
layer groups for now. Once we have NDE
filters for layer masks/channels, we should
revisit this code.
2025-03-10 01:22:12 +00:00
Jehan
7aac6507ad AUTHORS: update generated file. 2025-03-10 00:29:43 +01:00
Jehan
dbe4aa0e37 README: update for release. 2025-03-10 00:26:44 +01:00
Jehan
9fc83f03c6 desktop: GIMP 3.0.0 AppStream <release> tag. 2025-03-10 00:20:37 +01:00
Idriss Fekir
5782643b5c GimpFontFactory: Fix exporting to pdf
Adding xml configs for bold/italic broke exporting to pdf (all fonts
were fallback) because fontconfig considered the xml malformed.
2025-03-09 23:05:07 +01:00
Idriss Fekir
2392709d06 GimpFontFactory: Use family+style as display when possible
Fullname might not be suitable for display (e.g. if contains family and
style with no whitespace between them), so when available,
use "family style" for display instead.
2025-03-09 23:05:07 +01:00
Idriss Fekir
06d2af7b35 GimpFontFactory: Fix display name of some fonts
Sometimes there is more than one name in the font file, the heuristic to
use the second name instead of the first assumed that the first name is
in english and the second is in the font's primary language, but that's
not the case.
e.g. on Windows "Times New Roman Italic" second name is "Times New Roman Cursiva".
2025-03-09 23:05:07 +01:00
Idriss Fekir
1609197792 GimpFontFactory:Fix bold/italic custom xml config
Previously buttons in the style editor meant just "faux" bold/italic,
which is different from the behaviour of 2.10, where real bold/italic
was used if available.

Unfortunately this might break in some cases if fontconfig doesn't return the correct face,
but at least it's consistent with 2.10.
2025-03-09 23:05:07 +01:00
Anders Jonsson
13e821bba5 Update Swedish translation 2025-03-09 19:21:10 +00:00
Alx Sa
975d1a4aa3 core, display: Enable resize for GUI layer copying
Resolves #12428 (for now)

As noted by Thomas Manni, GimpDrawable
does not initialize its push_resize_undo value
except via gimp_drawable_new ().
If the drawable is created in some other way,
it defaults to FALSE and does not save the
original size in history when resized or cropped.

Thomas proposed initializing it to TRUE in
the init () function. This is likely the correct
approach, but could cause some new bugs
right before the 3.0 release.

For now, this patch calls 
gimp_drawable_enable_resize_undo () for
GUI-specific operations (like opening as
layers or dragging and dropping layers) to
fix the regression for 3.0. Afterwards, we
can spend time confirming the init ()
approach and switch over to that.
2025-03-09 16:06:35 +00:00
Bruno Lopes
f63dfe8ec0
build/windows: Add stable GIMP identity to MSIX script 2025-03-08 10:04:43 -03:00
Bruno Lopes
2ad8aa8a56
build/linux: Update Flatpak modules preparing to 3.0 RC3
Ported from:

4006f0fcf5
8d6a68748b
fd3926baac
2025-03-08 08:04:44 -03:00
Jehan
96514d51a8 NEWS: update. 2025-03-08 02:06:42 +01:00
Jehan
691a3d2478 app: fix some memory usage bugs.
- One leak when returning early.
- One possible usage after free in a specific case.
2025-03-08 01:53:36 +01:00
Jacob Boerema
7d153bcc6d plug-ins: fix #13049 Calling help on unknown help-id causes...
progress on statusbar to not finish

When we returned early we did not call `_gimp_help_progress_finish`.
We fix this by adding those calls in relevant places.
2025-03-06 19:03:19 -05:00
Jacob Boerema
fd0ccfa16c plug-ins/help: fix thread unnecessarily waiting when locale_parse failed
If `gimp_help_locale_parse` failed due to a locale not having a
manual available, we always waited for a 10 seconds timeout because
we depended on the value of success to decide if we should exit
the thread.

When the call finishes we should always stop, so add a `done` parameter
and depend on that to decide if we can exit instead of using success.
2025-03-06 20:29:41 +00:00
Jacob Boerema
4075add5b4 plug-ins/help: fix crash when locale is NULL
Due to recent changes locale could become NULL when no manual for a
certain locale was found.
We fix this by always checking locale first.

While working at this, I realized that nowadays we don't need a second
loop when the specified help-id was not found. Even if a certain
help-id is not translated, an untranslated page is always available
when an English page is present.
So just reference the help_missing page for the locale we found instead
of doing another loop over the locales.
2025-03-06 20:29:41 +00:00
dimspingos
fb1ff560c8 Updated Greek translation 2025-03-06 17:54:41 +02:00
Alx Sa
49f0a1d408 plug-ins: Reduce JPEG dialogue height
Because of all the options, the JPEG export dialogue is too tall
on smaller displays or resolutions and goes off-screen.
This patch attempts to mitigate the problem by putting some options
in a two column layout.
2025-03-06 12:30:42 +00:00
Alx Sa
69e57b6dc3 actions: Ellipsize long file names in menu
To prevent long file names from stretching
the menu across the screen, we set a max
character limit and ellipsize them in the middle
in both the File and Windows submenus.
2025-03-06 00:09:03 +00:00
Jacob Boerema
68422e3c70 app: fix #12475 Eraser tip uses same tool as pen tip
This Windows specific error seems to be a reversal of previous issue
#2495 where we had to add an exception due to many issue of breaking
tablet support.

Now, many years later, it seems the reverse is happening, and people
are reporting not being able to separate between eraser and stylus,
and that there is no differentiation in different pointing devices.
Removing this old "hack" fixes this.

However, we don't know for certain if there are still other devices
where this will cause issues. Let's hope that all drivers for old
devices have been updated by now.
2025-03-05 23:11:49 +00:00
Bruno Lopes
d86d1f8d9e
gitlab-ci: Make CI aware of jobs stuckness
According to my experience, Debian jobs never surpass 20min.
So, if they take more than that, they are likely stuck at:
- Deps job: when pulling Kaniko docker image
- Test job: when running some problematic plug-in test

Regarding Flatpak jobs, they can reach up to 40min at:
- Deps job: when building deps not present on GNOME runtime

Similarly, if Windows jobs surpass 60min, they are stuck at:
- Gimp job: when generating things from gimp-data or bundling
2025-03-05 20:03:48 -03:00
Bruno Lopes
b74c7d1b8a
gitlab-ci, build/windows: Unify env collapsible section verbosity 2025-03-05 19:06:48 -03:00
Bruno Lopes
a988a3cbf6
gitlab-ci: Set CLICOLOR_FORCE inside Docker image
0f425554 should be enough, but Docker or Kaniko don't pass it.
2025-03-05 12:03:29 -03:00
Alx Sa
de41deb5c9 themes: System theme leak definitions
Defines the background color behind
GtkNotebook tabs, removes the background
image from GimpSpinScale progressbar,
and specifies the padding and border width
for toolbuttons to prevent offset issues when
hovered over.
2025-03-05 03:40:18 +00:00
Bruno Lopes
2f4c9adf1c
gitlab-ci: Drop 'prepare' stage
Now, we create the Debian packages image and build babl and GEGL in the
same job. That's not only more consistent with other pipelines but also:

- First, we reduce queues to runners and the chances of they being busy
- Finally, we can cache more "layers" while in Kaniko container (this
  will be useful specially to crossbuilds, when they get fixed, and
  could be even more to flatpak too if its Docker image wasn't RO).
2025-03-04 18:49:31 -03:00
lloyd konneker
15be032786 ScriptFu: test: add tests
Add tests of named args.

Add more tests of file exporters.
2025-03-04 12:36:27 +00:00
lloyd konneker
7bec0168f5 ScriptFu: test: test load-thumbnail 2025-03-04 12:36:27 +00:00
Alx Sa
8c209f05a2 themes: Define GimpScaleEntry slider color
This patch prevents a system theme leak
for the "highlight" slider on GimpScaleEntry
widgets. Future work can be done to
improve the appearance of the slider.
2025-03-04 05:01:55 +00:00
Alx Sa
d2889d5a00 widgets: Prevent CRITICAL introduced in b7e9634d
When used outside of the dockable dialogues,
GimpEditor objects might not have a label
widget assigned. This patch adds a check
to make sure it does before trying to
change its text.
2025-03-04 00:21:02 +00:00
Jehan
4012f93e62 Issue #11251: Edit -> Clear (Undo) does not clear the effects which extend…
… outside the drawable's boundary.
2025-03-03 20:51:34 +01:00
Jehan
5d6e1ec889 app: also make sure that we run filters-changed when an operation's argument is updated.
While this was already working when updating a filter through the GUI,
we could see the weakness in the code when updating through the plug-in
API (there, we could again reproduce problematic not-updated bounding
box, similar to #12294).
2025-03-03 20:51:34 +01:00
Jacob Boerema
38f0527ebc plug-ins: fix failing to access help from within GIMP
Since commit 543bb374a8 when
`gimp_help_domain_lookup_locale` returned NULL, we returned with
an error condition.

However, when a user with locale en_CA, or sv_SE tries to access our
help, it should not return, but try again with en and sv respectively.

Instead of returning, only call `gimp_help_locale_map` when locale is
not NULL. Then after that we continue with second pass processing
which will handle the above cases.
2025-03-03 14:06:55 -05:00
Jehan
cd1aa23ede Issue #12294: drawable bounding box not recomputed when needed.
The bounding box of a drawable must be recomputed when the filters
changed. And a filter's "active" property change must trigger a
"filters-changed".
2025-03-03 18:31:21 +01:00
Bruno Lopes
c63419ee7f
build/linux: Fix AppDir detection on AppImage script
It wasn't making possible to create one AppDir per arch locally.
2025-03-03 11:18:46 -03:00
Alx Sa
b7e9634de3 widgets: Restore GimpContainerEditor label
At some point, the code to show the label
for grids in dockable dialogues was removed.
(Possibly when GimpContainerGridView
was removed around 10e3a968).
This patch restores that code to
GimpContainerEditor to display the label
when selecting items in gridview in the
dockable dialogues.
2025-03-02 21:28:59 +00:00
Bruno Lopes
b72c289413
gitlab-ci: Do not trigger crossbuilds (again)
Similar to b3b466dcbc, our
builds are constantly red due to these quasi-msys2 bugs:

https://github.com/HolyBlackCat/quasi-msys2/issues/18
https://github.com/HolyBlackCat/quasi-msys2/issues/33
2025-03-02 18:11:02 -03:00