Commit graph

54878 commits

Author SHA1 Message Date
Bruno Lopes
478ec9014f
devel-docs: Remove outdated info about icons (again) 2025-05-12 22:32:59 -03:00
Bruno Lopes
35bde24daa
devel-docs: Remove outdated CI explanation in favor of gitlab-ci.yml
This is already documented and updated on gitlab-ci.yml's
"There are five "TYPES" of pipelines on our CI" section so
maintaining two explanations is pointless and not future-proof.
2025-05-12 22:15:56 -03:00
Alx Sa
db040ce9e0 display: Connect path on click in design mode
Rather than having to hold Ctrl to switch to edit mode, users can now
just click the start point from the end node to create a connected path.
This makes the Path tool consistent with similar tools in GIMP
(such as Free Select, Scissor Select, and Cage Transform tools) as well
as other programs with a Path tool.
2025-05-13 00:11:05 +00:00
Bruno Lopes
a6d7bf1a8a
devel-docs: Remove sparse plug-in content in favor of Jehan nice tutorials
Despite the fact a tutorial have a different nature than a formal wiki-like text with
topics, the plug-in subject is undoubtedly well documented after Jehan and others work:

#### Basics -> https://developer.gimp.org/resource/writing-a-plug-in/tutorial-c-basic/#theory-introduction

#### Procedural DataBase (PDB) -> https://developer.gimp.org/resource/writing-a-plug-in/tutorial-pdb/

#### libgimp and libgimpui -> https://developer.gimp.org/resource/writing-a-plug-in/tutorial-c-basic/#theory-library-organization

### Programming Languages -> https://developer.gimp.org/resource/writing-a-plug-in/tutorial-python/#theory-what-about-other-bindings

### Tutorials -> https://developer.gimp.org/resource/writing-a-plug-in/#tutorial-for-gimp-30-plug-ins

### Debugging -> https://developer.gimp.org/resource/debug-plug-ins/

## Script-fu development -> https://developer.gimp.org/resource/writing-a-plug-in/tutorial-script-fu/

### Porting from GIMP 2 scripts -> https://developer.gimp.org/resource/script-fu/

## TODO: GEGL operation development -> https://developer.gimp.org/resource/writing-a-filter/

The few omissions I found were ported with:
fbf60dc5c2
2025-05-12 20:18:10 -03:00
Alx Sa
2db5875e28 tools, widgets: Don't show Fx icon for Cage Tool
Resolves #13982
This tool was missed in cc50ef99
2025-05-12 17:25:29 +00:00
Bruno Lopes
0c10e6cb98
devel-docs: Update Directory structure in gimp-data era 2025-05-12 10:08:42 -03:00
Bruno Lopes
c4e9af88bb
devel-docs: Move icons.md to gimp-data
See: e35194222b
2025-05-11 14:34:32 -03:00
Alx Sa
c92071fd28 tools: Close iscissors curve on pressing Enter
This better aligns the tool with the path tool, which also closes on 
Enter if it is not already a connected path.
2025-05-11 16:23:12 +00:00
Alx Sa
cb0f8a0282 libgimp, libgimpwidgets: Let string widgets expand horizontally
This makes GimpProcedureDialog string argument widgets expand
horizontally by default.
2025-05-11 05:50:49 +00:00
Bruno Lopes
4290f3dc7b
build/linux: Update flatpak SDK and runtime install commands
Ported from: 25ba247a96
2025-05-10 13:23:37 -03:00
Bruno Lopes
53f5a3dfd6
build/windows: Fix .hpp headers not being distributed on installer
They are rare but exist on GEGL.
2025-05-10 13:00:14 -03:00
Alx Sa
258344031c widgets: Allow color dialogues to not match the image mode
For some GUI elements, we may not want to restrict
the color options to the image mode (for instance,
grid colors on a grayscale or indexed image).

This patch adds a "user_context_aware" boolean
to GimpColorPanel so it can be passed on to set
the same boolean already in GimpColorDialog.
This allows GUI elements like GimpGridEditor to
optionally give full color choices to users,
independent of the image mode.
2025-05-10 14:18:41 +00:00
Bruno Lopes
2f7209482b
build/windows: Fix Python detection on Installer script
Following 1d5c3cbd
2025-05-10 10:27:50 -03:00
Idriss Fekir
f9de30fd6d app/tools: Always push an undo step not just when a single property changes
The behavior of the text tool was such that an undo is pushed only when a single property changes, which is obviously not expected, because, e.g. if part of the text uses a different font this means that the markup changed and all "properties" stayed the same, so an undo wouldn't be pushed.
2025-05-10 02:22:29 +00:00
Bruno Lopes
d917aef7c4
docs: Remove old 2.X series references on gimptool manpage 2025-05-09 21:40:06 -03:00
Bruno Lopes
63d2e1f871
build/windows: Set timeout for Restore Point creation
See: #13874

The process is managed by WMI so we need to
prevent stuckness that can happen in rare scenarios.
2025-05-09 21:25:12 -03:00
Bruno Lopes
1d5c3cbd43
gitlab-ci, build/windows: Standardize use of env:PATH 2025-05-09 21:24:38 -03:00
Bruno Lopes
41e8f49720
build/windows: Fix file-raw distribution on Installer 2025-05-09 21:24:33 -03:00
Bruno Lopes
ddf9d57ab6
build/linux: Fix bundling of GEGL json modules 2025-05-09 21:22:27 -03:00
Alx Sa
60fb3baa1a widgets: Update index in color-map selection when...
...color-picking on the image.

In GIMP 3.0, we now show a GimpColormapSelection when
users open a color dialogue. However, unlike the RGB color
selector it does not respond to color-picking, instead always
defaulting to index 0.
This patch adds code to get the index of the currently selected
color from the palette, and set the ColormapSelection's selected
index to that.
2025-05-09 23:07:11 +00:00
Bruno Lopes
e1efba413d
gitlab-ci: Implement "inputs:" for easier custom GUI pipelines
This new feature enables a nice panel with options on:
https://gitlab.gnome.org/GNOME/gimp/-/pipelines/new

We will still support GitLab variables.
2025-05-09 08:06:23 -03:00
Anders Jonsson
2d8fe8dbed Update Swedish translation 2025-05-08 13:07:48 +00:00
Anders Jonsson
25022abfe1 Update Swedish translation 2025-05-08 13:04:25 +00:00
Anders Jonsson
1c28093e58 Update Swedish translation 2025-05-08 13:00:54 +00:00
Øyvind Kolås
eeed283da2 build, app: depend on babl-0.1.114 and GEGL 0.4.62 2025-05-08 12:30:10 +02:00
Ondřej Míchal
3988b76e33 build/linux: Sync dependencies with Flathub flatpak
OpenEXR     - 3.3.2   -> 3.3.3
Poppler     - 25.03.0 -> 25.05.0
Ghostscript - 10.04.0 -> 10.05.1
libheif     - 1.19.7  -> 1.19.8
libde265    - 1.0.15  -> 1.0.16
SuiteSparse - 7.10.1  -> 7.10.3
2025-05-08 11:46:35 +03:00
Alx Sa
0b6fd06e19 widgets: Fix horizontal spacing of toolbox widgets
47224ba1 set the number of children in the GtkFlowBox
that holds the toolbox widgets to a constant 3. However,
this means if you only have one or two widgets shown,
there was still a horizontal imbalance.
This patch adds up the number of visible widgets whenever
that is changed, and adjust the maximum number of flowbox
children accordingly. It does add a small amount of padding at
the bottom since the invisible widgets are moved below.
2025-05-07 19:40:12 +00:00
Jacob Boerema
548bc3a46d plug-ins: CWE-190: Integer Overflow or Wraparound in Despeckle
As reported by Seungho Kim our despeckle filter doesn't check for
integer overflow when allocating buffers, nor do we check for failed
allocations.

A potential integer overflow vulnerability exists in the GIMP
"Despeckle" plug-in. The issue occurs due to unchecked multiplication
of image dimensions (width, height) and bytes-per-pixel (img_bpp),
which can result in allocating insufficient memory and subsequently
performing out-of-bounds writes. This could lead to heap corruption and
potential denial-of-service (DoS) or arbitrary code execution in
certain scenarios.

Vulnerability Details
•width and height are of type guint (signed 32-bit int).
•Multiplying width * height * img_bpp can result in a value exceeding
the bounds of gsize.
•g_new() does not perform overflow protection; if the size wraps around,
less memory than needed will be allocated.
•Subsequent pixel processing loops write beyond the allocated memory
region (src, dst).

Proof of Concept (PoC)
Open a specially crafted image with very large dimensions (e.g.,
70,000 x 70,000 pixels) and apply the Despeckle filter. GIMP may crash
due to heap corruption, or undefined behavior may occur.

We applied the suggested changes and in addition adjusted the despeckle
function to be able to set error messages, and check for NULL
allocations.
2025-05-07 14:50:11 -04:00
Jacob Boerema
d7901a8890 plug-ins, testing: add two tests for fli and ico...
based on the ZDI-CAN poc images
2025-05-07 17:57:38 +00:00
Bruno Lopes
7ead87df1e
gitlab-ci: Mention 'Image File Formats' page on feature.md
This should make file format requests less "noisy" as Jehan describes them.
2025-05-07 13:59:59 -03:00
Jehan
47e69fd4b5 NEWS: update. 2025-05-07 15:44:09 +02:00
Jehan
ae14e623a6 plug-ins: just use TRUE/FALSE instead of new macros.
Small follow-up from !2097. To be fair, looking at this plug-in's code,
we should also go much further, because so many useful types are defined
while we could use GLib types.

But I don't want to get into this cleanup rabbit hole right now.
2025-05-07 15:27:32 +02:00
Alx Sa
fb577f1833 plug-ins: Prevent infinite signal loop in legacy grid
Selecting a color in GimpColorSelection triggers
gimp_color_selection_color_changed (). In the legacy
Grid plug-in, this led to an infinite signal loop (and crash)
when changing colors when the chain link is active. Changing
one button's color would trigger the other to change, which
would trigger the first one to change again and so on.

This patch resolves the issue by blocking the signal in color_callback ()
when the other button is changed in response to the first, so that
there's no infinite chain of callbacks.
2025-05-06 17:57:55 +00:00
Nils Philippsen
85bdad2b2c Avoid type names and keywords
This fixes various errors when compiling with current toolchains and/or
-std=c23.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2025-05-06 15:31:55 +00:00
Jehan
16fe79a45f app: replace the mutex by a RW lock.
It would be more performant since it allows concurrent access as long as
you only need read access (i.e. as long as the cache won't change, which
is the most common case).
2025-05-06 14:18:09 +00:00
Jehan
7125d2c52d Issue #13617: segmentation fault when painting. 2025-05-06 14:18:09 +00:00
Bruno Lopes
01ffbd064b
themes: Fix system theme leak of selected menubar item 2025-05-06 11:12:53 -03:00
Jehan
15d2e25404 libgimp: further cleanup in GimpGradientChooser code.
- No need of local_grad_data_new(). Just set default variables in init()
  as it should be.
- Also move gimp_gradient_chooser_draw_interior() to the init()
  function, so that the new() function is only a wrapper of
  g_object_new() which is the proper way to implement new classes.
- Get rid of wrong comment.
2025-05-06 15:33:05 +02:00
lloyd konneker
2d7a1a5d6d libgimp: some code reorganization.
This commit message has been rewritten by the reviewer (Jehan) because
the original message was not right. It was originally meant to fix #13189
but it was only doing so as a side effect of getting rid of the slice
API.

We still push it as a second step (with updated message) because it's
not a bad idea to stop using the slice API where we can as it's anyway
no more than a malloc/free synonym since GLib 2.76 and might get
deprecated some day.
2025-05-06 15:33:05 +02:00
Bruno Lopes
3f36a16f6d
themes: Fix system theme leak of progress bar color on Dark themes 2025-05-06 10:21:54 -03:00
Jehan
cbd013d7b2 Issue #13189: free the slice with g_slice_free().
Even though this is mostly the same thing now, it's only true since GLib
2.76, yet our AppImage uses GLib 2.74.6. This explains why the chooser
finalization was crashing plug-ins.
2025-05-06 14:59:19 +02:00
André Dazereix
b56c59c92e Update French translation 2025-05-06 11:23:22 +00:00
Jehan
2fa5967f21 Issue #1486: invalid disconnected monitor on exit.
Note that I also tried to set the monitor as a weak pointer, but it was
not properly finalized by GDK at disconnection apparently. Anyway
processing the "invalidate" signal is a correct way to do this too.

A further possible improvement may be to store the description of the
monitor in the sessionrc file, and keep these in the GimpSessionInfo
too, so that we can easily retrieve a monitor which is often
disconnected and reconnected.
2025-05-06 01:25:48 +02:00
Jehan
83e213d770 app: initial monitor information is only needed at display shell construction.
Making sure that it's private then NULLified at end of construction so
that none tries to use this again later on during the life of the
display shell (it may have become invalid since then, cf. #12542).

Also NULLifying a similar variable stored in GimpImageWindow (though it
was already a private variable not used outside in this case).
2025-05-06 01:25:48 +02:00
Jehan
07f9402f82 app: do not store the initial monitor when starting and restoring.
Setting NULL monitor to file_open_with_display() and
file_open_from_command_line() work just as well to use the monitor under
the pointer which is what gui_get_display_name() was also doing anyway.
2025-05-06 01:25:48 +02:00
Jacob Boerema
fedb647cb4 app: fix #12542 crash due to invalid monitor
We store an `initial_monitor` in several places, not taking into
consideration that a monitor object can become invalid, e.g. when
disconnecting or turning off a monitor. When the monitor is invalid,
it can cause a crash in `gimp_display_shell_set_initial_scale`.

Instead of referencing the initial monitor, we request the monitor for
our display shell. Since at that point we already know that shell is
valid, we should get a valid monitor too.
2025-05-06 01:25:48 +02:00
Jehan
2fc1fdd400 modules: partially revert commit 41ba9b31.
We don't need to build modules as .so files with the last 2 commits.
Just keep using shared_module() from commit 41ba9b31.
2025-05-05 23:07:53 +00:00
Jehan
1c696ae646 libgimpmodule: properly close module opened only for testing. 2025-05-05 23:07:53 +00:00
mkmo
b0562cf0a5 issue #13149: libgimpmodule: using g_module_open() instead of G_MODULE_SUFFIX 2025-05-05 23:07:53 +00:00
Bruno Lopes
8a6a651688
build/windows: Go back to Inno 6.4.2 to fix broken Task Dialog
Inno 6.4.3 changed the install-mode task dialog in a way that
makes our installer pretty ugly to see. See the report:
https://groups.google.com/g/innosetup/c/g0V_QE3Zf5Y/m/Daki-eb8EQAJ
2025-05-05 19:34:59 -03:00