1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 05:22:40 +02:00

Compare commits

...

2729 Commits

Author SHA1 Message Date
Massimo Valentini
fd5715e6d7 text, tools, pdb: NDE text rotation
Initial implementation of non-destructive transforms of text layers.
Applies to scale, rotate, flip, and shear tools (as well as Unified
Transform Tools' version of those operations).
2025-05-14 09:22:35 -03:00
Bruno Lopes
84c4e0b639 gitlab-ci, devel-docs: Update to new "Package:" labels
A common prefix makes easier to use these dist pipelines.
2025-05-14 09:13:40 -03:00
Idriss Fekir
f0dc96caf1 GimpText:Partially Revert some of the changes in commit b2eb374aaacd0c8054234c4fa2b785da0007355f
I accidently commited 2 calls to g_assert in the previous commit.

Reverting.
2025-05-14 09:16:28 +02:00
Idriss Fekir
9d43b2cfc2 GimpText: Fix crash when serializing text with missing font.
For some reason pango returns a FontDescription with name "Normal" when called
with empty string. This caused crashes in pango markup serialization. This
patch checks if the font before serialization is a valid font object, otherwise fallback to the fallback font.

Also font's reference count wasn't increased in one case when opening xcf file with a text layer.
2025-05-14 01:51:58 +02:00
lloyd konneker
12806b2830 ScriptFu: tests: add tests of selection semantics
No changes except to tests.
2025-05-13 11:22:25 -04:00
Alx Sa
60891765a5 core: Update filter size when image is rotated
Resolves #13981
The dimensions of NDE filters were being updated
when a drawable was resized or scaled, but not when
the drawable was rotated. Since this transform also
affects the dimensions of the filter, the filter refresh
code should be called there as well.
2025-05-13 14:28:29 +00:00
Bruno Lopes
e68cc824c1 devel-docs: Restore one paragraph from icons section 2025-05-13 06:54:36 -03:00
Bruno Lopes
fb2167c8ad devel-docs: Restore gitlab-mr reference but on Core Contributors section 2025-05-12 22:36:02 -03:00
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
Jehan
b24d10cfe0 app: (show-tooltips) settings removed before GIMP 3.0.
This was removed in commit b3620517 though we missed it when making our
GIMP 2 to 3 migration rules. A bit late now, but better than never.

I realized this thanks to MR !2240.
2025-05-05 23:05:16 +02:00
Andi Chandler
0f9c47ae10 Update British English translation 2025-05-05 19:00:35 +00:00
Andi Chandler
05cf8fbb2d Update British English translation 2025-05-05 18:57:22 +00:00
Jehan
9d9265f099 desktop: preparing GIMP 3.0.4 metadata. 2025-05-05 15:31:32 +02:00
Alx Sa
ba9a6d0dce plug-ins: Refresh Fractal Explorer gradient display
Whenever we change the colormap colors in the
Fractal Explorer plug-in, we call set_cmap_preview ()
to update the gradient widget. However, this only changes
the colors if the total number is different than the previous
one, since the only time we change the colors is via a
size reallocation. As a result, most of the time the GUI
display doesn't change.
This patch adds an initial size request of 0, 0, to ensure
the second resize actually triggers the size reallocation
code.
2025-05-05 10:33:46 +00:00
Alx Sa
2c31c0e34d libgimp, plug-ins: Prevent GFig crash with NULL brush
The GFig plug-in assumes that there is always
a valid brush selected when creating its
dialogue. However, a NULL brush is possible,
and GFig's assumption can cause a crash
in GIMP by attempting to get a buffer from
a NULL brush.
This patch adds conditional checks for the
brush to not be NULL before using it.
2025-05-05 09:36:04 +00:00
Bruno Lopes
373e46f871 build: Fix pkgconfig files not being fully bundled (e.g. gimpui*.pc) 2025-05-04 14:36:29 -03:00
Bruno Lopes
eff825c1a7 Issue #6378: tools: Don't auto-quote filenames on gimptool for Windows
Fixes #6378

This will break Cygwin workflows (aka when the dev use 'sh' instead
of native cmd or PowerShell) but we were already not supporting that
due to 'win32_command' which redirects Unixish commands to cmd.
2025-05-04 11:54:03 -03:00
Alx Sa
7af987d31b plug-ins: Convert screenshot dropdowns to radios
This restores the GUI design from 2.10, which requires
less clicks to update settings. It also aligns with
proposed design guidelines to use radio buttons for
parameters with only a few options.
2025-05-04 13:48:21 +00:00
Alx Sa
afc1fa5250 core: Resize clip image when copying
In 1b64fdf5, when copying a selection we resize the
layers but leave the image itself the same size. This
allows us to paste the image in-place if requested by
the user. When pasting as a new image, we retrieved
the stored offsets and use them to resize the image
and shift the layers in the opposite direction of the
offset to align them in the image.

This process works fine within GIMP. However, when
pasting outside of GIMP, we don't go through the
resizing process - so we paste an area the size of the
original image instead of only the selection.

This patch inverts the logic to resolve this regression.
The image is resized on copy, but the original offsets
are still stored. When pasting in place, we retrieve the
offsets to shift the layers over, since we still control
the data inside GIMP. This allows us to send the
correctly cropped image when pasting to outside
applications.
2025-05-04 00:55:51 +00:00
Jehan
9ebc1f2126 desktop: make sure "GIMP" (original acronym) stays in the list of keywords.
Some languages may **add** localized variants of the acronym (in
particular when the language system is different, usually when it's not
latin script), but the original acronym should stay a valid keyword
because many people will still use it to search the software.
2025-05-03 18:42:35 +02:00
Alx Sa
c855d1df60 plug-ins: ZDI-CAN-26752 mitigation
Resolves #13910
Since ICO can store PNGs, it's possible to create an
icon that's much larger than the stated image size and
cause a buffer overflow.
This patch adds a check to make sure the width * height * 4
calculation does not overflow in addition to making sure it
doesn't exceed the maximum allowed size for that icon.
2025-05-03 14:13:46 +00:00
Rupert
ec03ef1a41 Fix #13900: bmp export warning dialog not showing under Linux/gdm
swapping the order of the calls to gtk_widget_show() and
calling gimp_window_set_transient() seems to fix the problem of the
dialog not showing with recent versions of gdm.
2025-05-03 01:14:14 +02:00
Alx Sa
61e5721067 display: Don't pan with spacebar if option is off
Resolves #13903
Our code was set to pan the screen if the user had the
space bar held, even if they had the space bar set to
"no action" or "switch to move tool" in Canvas Interactions
in Preferences. This patch adds a check to make sure we
have the action set to pan before continuing to pan when
the mouse moves.
2025-05-02 18:28:55 +00:00
Alx Sa
a937a229c2 themes: Add padding for radio icons in tool selection options
Resolves issue #13901
Some system themes did not add sufficient padding around
radio icons in our Tool options (like Move and Rectangle Selection).
This made it more difficult to see what was selected.
This patch defines padding to ensure there is enough space to see
which option is currently selected.
2025-05-02 12:16:42 +00:00
Jacob Boerema
dc873c18c4 plug-ins: fix #13642 crash when loading PSD...
while we are looking for the end of a clipping group. We did not take
into account that (non-clipping) groups can be nested multiple levels
deep. In that case the parent last_index will also be -1 which
caused a crash because we used it as an index into the layer array.

To fix this test if parents last_index is -1. In that case the we
keep looking for the end of the clipping group, so no change to
use_clipping_group, just output optional debug info.
2025-05-01 14:57:43 +00:00
Alx Sa
81c416e3d5 core: Fix linear conversion for Sample Average picks
In gimp_pickable_pick_color (), we get RGBA values using
the pickable's babl format, but then create a linear format
to convert it when Sample Average is enabled. As a result,
non-linear encodings are always converted to linear, and
the displayed pixel values are shown incorrectly in the
color frame.

This patch removes the code that changes the pickable's
format to RaGaBaA double, since gimp_gegl_average_color ()
already does this and handles the conversion to and from the
original pickable format.
2025-05-01 04:47:22 +00:00
Jehan
c90cc40735 app: style "You installed GIMP X.Y.Z!" text as "title-3" rather than pango markup.
Cf. discussion with rangelovd. I'll let others take care of actually
styling properly with CSS updates.
2025-05-01 00:26:50 +02:00
Jehan
a6103b677d NEWS: update. 2025-04-30 23:56:14 +02:00
Jehan
4ec3268c78 clang-format: uncomment rule not usable yet.
BinPackParameters is looking for a boolean right now, which was changed
to the enum we were using, but only for LLVM 20 (not yet available in
our CI). Comment this line for now.

Fixes failure in "clang-format" job in CI:

> Debian clang-format version 14.0.6
> /builds/GNOME/gimp/.clang-format:22:20: error: invalid boolean
> BinPackParameters: AlwaysOnePerLine
>                    ^~~~~~~~~~~~~~~~
> Error reading /builds/GNOME/gimp/.clang-format: Invalid argument

See: https://github.com/llvm/llvm-project/issues/117830
2025-04-30 23:36:15 +02:00
Akkana Peck
7a961cf4a4 window hints: fix transient-for keep-above behavior
Fixes issue 5176.
In GIMP2, the window hint preference controlled whether the image
window was allowed to draw on top of the Toolbox and docks.
In GIMP3/GTK3, apparently that hint does nothing; it's transient-for
that controls that behavior. This patch uses the transient-for
setting only if dock_window_hint is set to GIMP_WINDOW_HINT_KEEP_ABOVE.
2025-04-30 16:33:03 +00:00
Bruno Lopes
8fb6d64415 gitlab: In the screenshots text on Default.md, suggest full screenshots
We waste a lot of time requesting this to reporters.
2025-04-30 11:45:45 -03:00
Bruno Lopes
9d78ba0845 gitlab: Make a bit more clear what is "GIMP version" on Default.md
Very often reporters were giving package info on gimp version.
2025-04-30 11:40:28 -03:00
Bruno Lopes
afd8d7c73e gitlab: Mention gimp-ux repo on feature.md
I uppercased some words because the
Default.md template does this too so
seems to be legitimate and not rude.
2025-04-30 11:11:01 -03:00
Alx Sa
33485d7e6d tools: Use NDE filter name for undo history
Resolves #13711
This patch replaces the generic "Add filter" undo history
for NDE filters with the filter's name. This makes the label
consistent with destructive filters, and is more descriptive.
We may consider adding some indicator that filters are
NDE or not in a future patch.
2025-04-30 03:28:09 +00:00
Ondřej Míchal
e6bef93d73 .clang-format: Adjust bin-packing of parameters and arguments
As per GIMP's style documentation [0]:

- put function parameters on their own lines,
- pack function arguments to fit line and only then wrap.

[0] https://developer.gimp.org/core/coding_style/
2025-04-29 21:39:18 +03:00
Dirk Stöcker
7849f8cedb Update German translation 2025-04-29 16:51:13 +00:00
Dirk Stöcker
5dbfc48872 Update German translation 2025-04-29 16:50:57 +00:00
Alx Sa
d83d5929ad tools: Standardize MyPaint Brush tool layout
MyPaint Brushes have their own custom sliders for brush
options, so they were displayed lower in the dockable
compared to other paint tools like Pencil and Paintbrush.
This patch moves them up so options are in the same place
across all standard paint tools.
2025-04-27 23:18:28 +00:00
Alx Sa
8c14e432b7 actions: Hide Layer Attributes for floating selections
Resolves #13850

While layer-actions.c blocks showing the Layer Attributes
dialogue if the layer is a floating selection, it was still
possible to show it if the preview icon was activated.
This is because that calls the "layers-edit" action, which
bypasses the "layers-edit-attributes" block and shows
the dialogue anyway.
This patch adds a check for floating selections in
layers_edit_attributes_cmd_callback (), and returns if the
layer is a floating selection.
2025-04-27 16:44:34 +00:00
Bruno Lopes
a2aedc789b build/linux: Improve a bit the comments of Flatpak dist script 2025-04-26 22:11:48 -03:00
Bruno Lopes
a89d7aeccc build/windows: Do not ship orphan .pdb files
Actually babl.pdb and gegl-imgcmp.pdb
2025-04-26 18:19:42 -03:00
Bruno Lopes
e8e32375d4 build/windows: Do not hardcode python executable on bundling script 2025-04-26 17:41:38 -03:00
Bruno Lopes
10979fb031 build/windows: Cosmetic change on deps cloning script 2025-04-26 16:00:44 -03:00
Bruno Lopes
00ff3831e4 build/linux: Fix indentation on Flatpak scripts after c2771753 2025-04-26 14:13:27 -03:00
Bruno Lopes
72f80d5331 build/linux: Make Flatpak scripts POSIX-compliant 2025-04-26 11:08:29 -03:00
Bruno Lopes
c2771753db build/linux: Add org.flatpak.Builder support for Flatpak .sh scripts 2025-04-26 10:52:38 -03:00
Bruno Lopes
d59bb64ffa build/windows: Set solidbreak for 32-bit binaries
Mitigates #13801
2025-04-25 20:18:41 -03:00
Alx Sa
1d640b3e47 plug-ins: Make sure CMYK profile is exported for TIFF
Unlike PSD and JPEG, our TIFF plug-in's color profile export
code only ran if the user had enabled the Save Color Profile
option. The CMYK option alone did not trigger the profile code,
so it was possible to accidently export a CMYK TIFF without
including its color profile. Since this is rarely desired, the CMYK
boolean was added to the profile export conditional code, so that
it runs if either option is selected.
2025-04-25 21:02:18 +00:00
Bruno Lopes
2ccc4be050 data: Make environ meson.build file a bit more readable 2025-04-25 16:02:31 -03:00
Bruno Lopes
fa6854a896 build/windows: Fix buttons bar glitch on Installer /SILENT mode 2025-04-25 13:10:34 -03:00
Bruno Lopes
1d2add6606 build/windows: Do not add CYGWIN binaries to PATH
Since we don't (and shouldn't, see: #11385) use them. Now, our
Windows builds are 100% native (aka not using Unix-only binaries) so
on par with Linux, which completes a process starded in 9ab48164.
2025-04-25 10:23:45 -03:00
Bruno Lopes
806694f04d build/windows: Port file use on 2_bundle-gimp-uni_dep.py to Python 2025-04-25 10:16:01 -03:00
Alx Sa
2371c04758 widgets: Don't show hidden tools on tooltip
The tool group tooltip was not updated when users
toggled the visibility of tools in Preferences. This patch
adds a check before adding a tool to the tooltip, to make
sure it's visible first. It also clears out tool group tooltips
on mouse over to ensure the tooltip is updated.
2025-04-25 00:51:28 +00:00
Bruno Lopes
d164d713d7 gitlab: Check for platform-specific bins on .py files too
Since .py files are normally called by meson .build files.
2025-04-24 10:43:45 -03:00
Bruno Lopes
8ef096373f gitlab: Check for 'diff' and 'cmp' on meson-health job 2025-04-24 10:28:49 -03:00
Bruno Lopes
7ba10e73d9 pdb: Port echo use on groups.pl generation to Python 2025-04-24 09:52:36 -03:00
Alx Sa
aa94975003 pdb: Make gimp-plug-ins-query public
The Plug-in Browser plug-in makes a call
to gimp-plug-ins-query to get plug-in
information. Since this PDB was made
private, the browser could no longer load
plug-in information.
This patch makes gimp-plug-ins-query
public again so it can be used.
2025-04-23 14:05:16 +00:00
Bruno Lopes
3dca11596b gitlab-ci: Prevent build system from becoming Windows-centric too
Following: 89dfd0161a

Even if some script/tool is common on Windows, it's not wise to
use Win-specific things on Meson if they are avaiable on Python,
since that non-Python code will be too hard to mantain without the
Windows maintainer. So, let's make life easier for non-Win devs.
2025-04-23 10:22:16 -03:00
Bruno Lopes
89dfd0161a gitlab-ci: Add Meson linter job to prevent performance degradation
Meson broadly uses one of the few languages that it is available on
all platforms so let's take advantage of it on internal scripts.

This way, we have only one build language to care (aside Perl, which
have its own purpose) and avoid terrible bugs like: #11385.
2025-04-23 10:15:07 -03:00
Jehan
73b57a9914 etc: removing singular and plural fields from default unitrc.
We forgot to edit the default unitrc when removing these fields in
commit 2a00a9e60a. It's OK since our code can still read these fields
for backward compatibility anyway, but better clean up the file.
2025-04-23 13:41:43 +02:00
Bruno Lopes
3e439868fa build/windows: Port meson.build check of test-installer-langs.sh to Python 2025-04-22 14:33:41 -03:00
Bruno Lopes
ae514268b5 build/windows: Port .po tests of test-installer-langs.sh to Python
Also, they are now run on list-installer-langs.py before ninja test,
since this was technically possible to implement.
2025-04-22 11:35:56 -03:00
Alx Sa
8e81ed9572 widgets: Remove size restrictions on Display Filters
The "Available Filters" scrolled window was locked to
200px by 100px when the Display Filters dialogue is
opened. Since this size restriction is unnecessary and
makes it difficult to see the actual filters, it was removed.
The "Active Filters" still restricts the height (with scrolling),
since you can add multiple copies of the same filter
to the display.
2025-04-22 03:05:53 +00:00
Bruno Lopes
0fe938939c libgimp/tests: Bump timeout to 90s (because 60 is not enough on Windows) 2025-04-21 12:30:50 -03:00
Bruno Lopes
f158cc2b6e libgimp/tests: Port libgimp-run-python-test.sh to Python 2025-04-21 12:30:46 -03:00
Bruno Lopes
54697c1d3c app/tests: Drop dangling create_test_env.sh
Before the "fix" on 941fc000, everything was working fine, which
is a sign that it wasn't even being used. Also, after Jehan own
investigation and my tests, I confirmed that it isn't used anymore.
2025-04-21 12:30:42 -03:00
Jehan
41660fcf7d NEWS: update. 2025-04-21 15:49:03 +02:00
Jehan
8a3e0cfcee gimp-data: use splash with no-micro version in it. 2025-04-21 15:13:08 +02:00
Lukas Oberhuber
e8a9f5bab0 gimp-data: updated with macos fix #13761 2025-04-21 00:57:40 +01:00
Bruno Lopes
49249d35bd build/windows: Build with not-CYGWIN Perl 2025-04-20 19:05:42 -03:00
Alx Sa
cc50ef99a6 tools, widgets: Don't show Fx icon for tool-based filters
We use GEGL filters for some of our currently destructive
editing only tools, like Warp and Bucket Fill.
While eventually these will have non-destructive options,
for now it's confusing to show an Fx icon briefly when
the tools are active.
This patch sets these filters as temporary, and updates
the GimpItemTreeView code to not show the Fx icon
if there is only one filter and it is temporary.
Temporary filters can not be deleted from the NDE
pop-up, only from their tools, preventing another set
of reported crashes.
2025-04-20 15:26:07 +00:00
Lukas Oberhuber
d46b6e4e0e app: Partial fix for #13702 infinite loop on startup
If somehow an image is not passed when opened from the command line, this avoids an infinite loop
as was seen in #13702

This still does not solve the issue of how a bad image was passed in in the first place.
2025-04-20 15:51:49 +01:00
Lukas Oberhuber
994cb2b21f Fix #13761: Broken macos build 2025-04-20 15:32:27 +01:00
Bruno Lopes
278946f767 build/windows: Port fix_msg.sh to Python
This port made clear that it is almost impossible to
do the langs patching with PowerShell alone.

The new output of the patching will display the encoding.
2025-04-19 17:15:21 -03:00
Bruno Lopes
1fe8db7a94 data: Workaround for macOS broken Python 2025-04-19 12:06:31 -03:00
Bruno Lopes
23b8867115 libgimp: Port libgimp-run-c-test.sh to Python 2025-04-18 21:53:22 -03:00
Bruno Lopes
8ef7bf3553 desktop: Port test-appdata.sh to Python
This works on Windows too so let's make it cross platform.
2025-04-18 20:56:07 -03:00
Bruno Lopes
941fc0000b apps/tests : Fix IconsRoot path on gimp-data era 2025-04-18 19:41:19 -03:00
Bruno Lopes
72cb81f6a7 meson: Default ICC directory is Linux-specific 2025-04-18 14:32:00 -03:00
Bruno Lopes
5281804a5c gitlab-ci: Reduce Windows jobs timeout to 40m thanks to pythonization
Let's test a shorter timeout since our scripts were improved.
2025-04-18 14:09:43 -03:00
Bruno Lopes
f88ca87ca9 build/windows: Restrict clean() output of bundling script
This is the python version of c748b3d2
2025-04-18 14:01:26 -03:00
Bruno Lopes
a683495b09 build/windows: Port 2_bundle-gimp-uni_sym.sh to Python 2025-04-18 13:36:35 -03:00
Bruno Lopes
00ab5e3a19 .gitlab: Move cp-plug-in-subfolder.py to build/meson
It is not a CI-specific file.
2025-04-18 13:36:31 -03:00
Gabriele Barbero
9989dfe933 Issue #13752 - Handle GTK_RESPONSE_HELP in about dialog
Previously, the Help button triggered the default dialog close behavior, without showing any help.
This change ensures that pressing Help triggers the expected help function.
2025-04-18 16:36:33 +02:00
Bruno Lopes
4e00c87ff5 gimp-data: Bump commit regarding Python module 2025-04-17 16:19:52 -03:00
Bruno Lopes
ddcc51204b libgimp: Port from cat to Python 2025-04-17 15:32:20 -03:00
Bruno Lopes
547abb038e meson: Fix testing option of authors.md being accidentally pushed 2025-04-17 15:10:12 -03:00
Bruno Lopes
30f1a34750 meson: Get date with Python on authors.md generation 2025-04-17 14:49:01 -03:00
Bruno Lopes
d88966b272 app, app-tools, data, plug-ins, tools: Do not hardcode python executable
Use 'python' module instead.
2025-04-17 14:32:06 -03:00
Bruno Lopes
49065eb635 plug-ins: Port echo use on gresource generation to Python 2025-04-17 13:57:25 -03:00
Bruno Lopes
cbad5f4bb7 gimp-data: Bump commit to latest Python changes 2025-04-17 13:28:40 -03:00
Bruno Lopes
160ec3d0d7 meson: Port meson_dist_script.sh to Python
It's not used by Windows right now, but it can be so let's port it.
2025-04-17 11:18:30 -03:00
Bruno Lopes
42049493cb tools: Port meson-mkenums.sh to Python 2025-04-17 09:39:08 -03:00
Bruno Lopes
c7308335a5 data: Port share/gimp/*/fonts creation to Python 2025-04-17 09:39:04 -03:00
Bruno Lopes
455dc1faa6 app, app-tools, tools: Port Windows's enable_default_bin to Python 2025-04-17 09:39:00 -03:00
Bruno Lopes
b95c78fdbd build/windows: Port list-installer-langs.sh to Python 2025-04-17 09:38:55 -03:00
Bruno Lopes
dea5e2414a tools: Fix 'in-build-gimp.py' indentation to conform with Coding Style 2025-04-16 16:44:22 -03:00
Bruno Lopes
99bf8defe7 tools: Port in-build-gimp.sh to Python
Both .sh and .py versions take 2:15 minutes to generate all the
assets but the more cross platform the better so Python wins.
2025-04-16 13:41:16 -03:00
Bruno Lopes
f5ee454098 build/meson: Port check-gimp-data.sh to Python
It is not faster than using 'wc' but it is cross platform.
2025-04-16 07:05:08 -03:00
Bruno Lopes
231b89537e pdb: Port meson-*.sh to Python
This avoids using CYGWIN-linked binaries from $MSYS_ROOT/usr,
which are extremely slow. Python is cross-platform and faster.
2025-04-15 13:55:19 -03:00
Bruno Lopes
9abc42933a build/windows: Port 2_bundle-gimp-uni_base.sh to Python
This avoids using CYGWIN-linked binaries from $MSYS_ROOT/usr,
which are extremely slow. Python is cross-platform and faster.
2025-04-15 11:45:15 -03:00
Bruno Lopes
c4309ee0ce Issue #11677: Add fractional scaling support to Installer welcome image 2025-04-14 09:08:24 -03:00
Bruno Lopes
63f5ea9dc5 build, meson, gitlab: Generate native .pdb CodeView symbols on Windows
Reverts dc21fb76

The CodeView format introduces some advantages to our Windows build:
- It is way smaller than DWARF, reducing the .exe installer. With
  the strip of COFF symbols too, the installation is 120MB smaller.
- Can be uploaded as .appxsym to be used on demand by MSIX (in thesis)
- Works better with DIA and DbgHelp debuggers like WinDbg and DrMingW,
  respectively. LLDB also works by using LLDB_USE_NATIVE_PDB_READER=1

Context: that was not working before because DrMingw and LLDB seems to
only search for the build-time .pdb path in '.buildid' section of bins.
See: https://github.com/jrfonseca/drmingw/issues/91 and
https://github.com/llvm/llvm-project/issues/125355. So, we will set
_NT_SYMBOL_PATH at least for $PREFIX/bin for now as workaround.
2025-04-14 07:50:43 -03:00
Alx Sa
19bb4a5251 paint: Prevent crash on out-of-bounds smudge tool
The Smudge Tool gets accumulated buffers from its
history via g_list_nth_data (). However, this function can
return NULL if we go out of bounds. We did not check for
this before trying to use it as a GeglBuffer, which caused
crashes if we ran out of accumulated buffers (e.g. if we
were partially smudging off-canvas).
This patch adds NULL checks to prevent the crashes.
2025-04-13 22:55:12 +00:00
Alx Sa
c3814125e3 display: Verify GtkWidget is a GimpCanvas object...
...before trying to get its GimpColorConfig.
Resolves #13691

After the color space invasion, various GimpCanvas
functions are now aware of color management settings.
However, these public GimpCanvas functions do not
require the user to pass in a GimpCanvas, just a GtkWidget.
This can lead to crashes if we pass in a different kind of
GtkWidget, since it may not have a GimpColorConfig property.

One example is the Navigation Dockable, which crashes when
it tries to draw boundaries around the image when "Show All"
is turned on, because it passes a GimpView widget instead of
a GimpCanvas.

This patch adds a check if the "canvas" parameter is actually a
GimpCanvas, and sets the config to NULL otherwise.
2025-04-13 15:31:48 +00:00
Bruno Lopes
ea89353fd7 gitlab-ci, build: Drop crossbuilds since they only make sense on Fedora
With grave on heart I am dropping crosbuilds. Always liked them but
actually our crossbuids on Debian are flawed on either GCC or Clang
(with linking either to UCRT or MSVCRT, I tested all possibilities).

The main problem is that Debian does not provide the runtime deps
(unlike Fedora) so we use from MSYS2. This fact tends to cause:
- Linking problems due to undefined references on compiler: #11756
- Clash between Windows runtime and Linux build-time deps: #12970

Worst, these bugs historically are rarely spotted or fixed at all.
Some of them took weeks and even months(!) to be reported by us and,
in the end, there is only one or two guys to do this: me and Jehan.
I do rather prefer to improve native builds than spending more and
more time on fixing crossbuilds without effectively using them.
2025-04-13 11:07:27 -03:00
Alx Sa
2ed959ed7c themes: Keep menubar color consistent when out of focus
Same issue as 484b9cfe, just applied to the
non-merged menubar instead.
2025-04-13 01:04:53 +00:00
Bruno Lopes
2cedc9fc96 build/linux: Do not allow library preloading on AppImage
Closes: #13527
2025-04-12 19:20:29 -03:00
Alx Sa
f58ac5f6cd themes: Define merged titlebar icon colors
Resolves #11552
We did not explicitly define the colors for the Minimize,
Maximize, and Close button icons for merged titlebars.
On some system themes, the color used blends into
the titlebar and makes the icon look invisible.
This patch makes sure we always define the icon color
for the Default theme.
2025-04-12 20:59:45 +00:00
Emin Tufan Çetin
a5de79e3b2 Update Turkish translation 2025-04-12 16:12:10 +00:00
Emin Tufan Çetin
7d3d041bae Update Turkish translation 2025-04-12 16:07:26 +00:00
Alx Sa
a331caa9f2 core: Enable resize for GUI layer duplication
Resolves #13633 (for now)
Same rationale as 975d1a4a, as diagnosed by Thomas Manni.

During 3.2 development, we can review and likely just set this as
the default value inside GimpDrawable.
For now, this is a limited bugfix for 3.0.x.
2025-04-12 14:27:51 +00:00
Bruno Lopes
44e3655536 build/windows: Improve Repair mode to check parent dir
Following eab5e061

This avoids curious users cheating the mode to make multiple installs, which
is unsupported by us since we only allow for different mutexes. See: #1382
2025-04-11 08:20:31 -03:00
Jehan
23d4c6fda9 INSTALL: more info about HEIF support.
It looks like packagers have regular issues with this support. Also I
added info about the fact we also support JPEG2000-in-HEIF (HEJ2) now.
And I made clearer that there may be other encoders/decoders possible
for a given format (though for AV1, we have a clear AOM preference in
our code).

Finally I add info about an environment variable which may be useful
probably in cases when the run prefix differs from the build prefix.
Cf. a case which was recently happening in the Snap package.
See: https://github.com/snapcrafters/gimp/issues/390
2025-04-11 11:25:05 +02:00
Alx Sa
93c3d83dd0 tools: Hide Force slider for Pencil Tool
The Force option does not affect the Pencil Tool's painting.
While Force is already set to be insensitive, hiding the
option entirely makes it even clearer that it can not
be used with this tool.
2025-04-11 02:58:42 +00:00
Jacob Boerema
5273f26ef0 app, pdb: fix #13480 inconsistent use of maximum radius...
for generated brushes.
The maximum radius we allowed for generated brushes was not used
consistently everywhere.
In the API call we clamped it to 0.0-32767.0, while the param_spec
set min and max to 0.1 and 4000.0, and the brush editor used a
maximum of 1000.0.
Using a large value (probably anything larger than 4000) would
sooner or later lead to a crash.

Instead of manual changes everywhere, let's define a maximum and
minimum in one place and use that wherever we need the min/max values.
Use the values as set in the param_spec for the defines.
The only place we can't easily do that is in brush.pdb, so we add
a comment above our defines that the values need updating there too.

Actually we should probably use more defines for other values too,
that way there is less chance of min/max values getting out of synch
throughout our code.
2025-04-11 02:02:40 +00:00
Bruno Lopes
e67a99b275 build/windows: Add some comments regarding InstallType and other things
This makes a bit more clear changes introduced by:

itInstall, itReinstall, itUpdate: cbe2f6bec2
itRepair: eab5e0615d
itDowngrade: e447b1244b

Unninstall (settings): b6069baa04
Unninstall (restore): 22e3ae24c7
2025-04-10 15:03:55 -03:00
Bruno Lopes
822981d209 build/windows: Clarify DefaultIcon/uap:Logo "policy" for .ico files 2025-04-10 13:22:29 -03:00
Bruno Lopes
d3501ffc35 build/linux: Make AppImage script tool-agnostic (part 3) 2025-04-10 07:33:01 -03:00
Bruno Lopes
4070cfb9ee build/linux: Add some comments to AppRun
And make APPDIR output clearer.
2025-04-10 07:27:36 -03:00
Alx Sa
5b822032c8 widgets: Include filters in GimpBufferSourceBox buffer
Updates the code to use gimp_pickable_get_buffer_with_effects ()
which copies over the filters that the user sees when choosing
an Aux Input option.
2025-04-09 12:13:37 +00:00
Bruno Lopes
f2bdf03b9a build/linux: Do not set uneeded GIMP3_* dirs on (relocatable) AppImage
Relocatable builds do not need them.

Also, remove comments about the inspiration for the scripts since
they are now so refined that make no sense to link 3P sources.
2025-04-09 08:58:03 -03:00
Bruno Lopes
6d9a9d3d7b build/windows: Log downgrade message when Installer is silent
Following: e447b124
2025-04-08 20:10:28 -03:00
Jehan
884353ed3d plug-ins: fix relocatability of the Python Console.
If we were running Gimp.locale_directory() at the very start of the
script, it would append before _gimp_reloc_init_lib() had happened, and
therefore the returned value would be the non-relocated locale
directory.

Calling this inside set_i18n() happens later, and also feels like the
proper place for this code.
2025-04-09 00:20:03 +02:00
Bruno Lopes
64d63cd937 build/windows: Use native icon from 'imageres.dll' on Installer dir page 2025-04-08 13:58:13 -03:00
Ekaterine Papava
cef5ab3992 Update Georgian translation 2025-04-08 02:33:05 +00:00
Kolbjørn Stuestøl
14b1c11273 Update Norwegian Nynorsk translation 2025-04-07 19:17:57 +00:00
Alx Sa
8b0185ba8f tools: Don't crash when reading invalid Curves preset
When reading a gimp:curves preset file, we assume
that we read in at least 64 bytes for the header. If the
invalid preset file is smaller than that, g_input_stream_read_all ()
can read it just fine but the code fails when comparing the
bytes read in to the size of the header.

This means that the GError object is still NULL, so g_prefix_error ()
has no effect - and thus the calling code crashes when it tries
to get "message" from a NULL GError object.

To resolve this issue, we check if error or *error are NULL.
If so, we set the error with g_set_error () instead.
2025-04-07 18:57:31 +00:00
Bruno Lopes
43ae9fced5 build/linux: Prevent LD_LIBRARY_PATH leaking on AppImage
Closes #13603

Following 8fe7ddf3
2025-04-07 09:23:45 -03:00
Martin
e4bf961cbb Update Slovenian translation 2025-04-07 10:29:51 +00:00
Yuri Chornoivan
7a242913fd Update Ukrainian translation 2025-04-07 06:26:01 +00:00
Bruno Lopes
abeac94e8e build/linux: Fix '--no-expand' param of conf_app function on AppImage script 2025-04-06 22:05:21 -03:00
Luming Zh
b2493f4273 Update Chinese (China) translation 2025-04-07 00:52:13 +00:00
Bruno Lopes
b303b6e20b Issue #13367: set Mesa drivers on Continuous appimage from stable series.
Partially reverts 3bbcdbd325
2025-04-06 20:19:31 +00:00
Bruno Lopes
87cfc65ab6 Issue #13367: use correct python*.exe on insider MSIX from stable series 2025-04-06 20:19:31 +00:00
Jehan
c893a96298 Issue #13367: show commit in about dialog in all non-release builds.
The commit hash is not that useful on releases, even for unstable
releases, because a release is always at a known tagged commit anyway.

Note that I only change this for the About dialog where it's less
visible, and not on the canvas, because I do appreciate that stable
series show with a clean empty canvas. I like stable series to be closer
to a release state (even though it's true that having the commit hash
accessible somewhere for dev/continuous build is a useful feature).

Sorry to translators too! I break the string freeze during the stable
series. It's a string only visible on dev builds anyway, so it's not a
very urgent string anyway. Thanks for all the hard translation work! 🤗
2025-04-06 20:19:31 +00:00
Jehan
9d6f80c9dc Issue #13367: show devel warning on Windows installer even in dev build of stable series.
Also, set correct python interpreter (which attachs to debug console).
2025-04-06 20:19:31 +00:00
Jehan
afa152ea54 Issue #13367: use correct AppImage and MSIX IDs for continuous builds.
Also make sure we ship the relevant graphviz runtime dependencies when
the debug menu is visible.
2025-04-06 20:19:31 +00:00
Bruno Lopes
b2bf83a6bd build/linux: Make AppImage script tool-agnostic (part 2) 2025-04-06 16:04:49 -03:00
Danial Behzadi
e5c2791378 Update Persian translation 2025-04-06 18:01:41 +00:00
Bruno Lopes
30d7631d34 build/linux: Make AppImage script tool-agnostic (part 1) 2025-04-06 13:39:15 -03:00
Emin Tufan Çetin
b514fa3338 Update Turkish translation 2025-04-06 16:25:03 +00:00
Emin Tufan Çetin
5c9e28634e Update Turkish translation 2025-04-06 16:19:17 +00:00
Jacob Boerema
257ac87e9f app: fix #13288 crash when opening a recently closed dock
When at least 3 recently closed docks were present in the Windows ->
Recently Closed Docks submenu, then clicking the middle one caused
a crash. Clicking the top or bottom one didn't cause a crash, but
the submenu was then removed so the other closed docks were not
visible anymore (until restarting GIMP).

It turns out we were removing the whole recent menu, instead of
picking the specific action that needed removing. So now we change
this to get the action_name and use that in the remove call.

Although this already fixes the crash, I added an extra check to
make sure action is valid, and if not we generate a critical. This
way we will notice something is wrong if this happens in the future,
without causing a crash here.
2025-04-04 19:29:04 +00:00
Alx Sa
9a3209844e themes: Fix display of .default response style
The .default style (to show which button is selected by
default) was being overridden by more general CSS styles.
This patch moves it after these general styles so that it
is shown again.
2025-04-04 18:10:12 +00:00
Alx Sa
20cf6d553a tools: Connect MoveOptions and TransformOptions to icon size
Resolves #13044
Same code as 816fb1c6, applied to the Move icon box
in GimpMoveOptions and the Transform icon box
in GimpTransformOptions.
2025-04-04 10:46:23 +00:00
Alx Sa
4dfa4924ff plug-ins: Use viewbox dims if needed for SVG
Starting in librsvg 2.54,
rsvg_handle_get_intrinsic_dimensions ()
always returns TRUE for width and height because
the SVG assumes a width/height of 100%.
This means that SVGs without explicit widths/heights
are loaded as 1px by 1px.
This patch adds a check to see if the width/height is
100%, and if the viewbox exists, we use those values
instead.
2025-04-04 02:09:02 +00:00
Bruno Lopes
d66e58265d Issue #11623: Use icons from imageres.dll for custom installer dialogs 2025-04-03 21:12:57 -03:00
Alx Sa
5201d194fa plug-ins: Read texture map size on DDS import
In 594afaf9, we changed how texture maps were imported.
The array size is now only loaded if we have a valid DX10 compression
set. However, GIMP allows you to export a texture map without
setting a DDS compression. Thus, any DDS images exported with
no compression would only load the first layer on import.

This patch moves the code that copies over the array items size to
be unconditional once the header is loaded.
2025-04-03 00:54:15 +00:00
Alx Sa
5a43663f09 paint: Prevent crash on expanding with pattern fill
Resolves #13501
When painting with "Expand Layers" on, we call gimp_get_fill_params ()
to get the color to fill in the new area. However, if the user has set the
fill type to Pattern, the color is NULL. This caused a crash because we
immediately try to set the alpha channel of the color to 1.0 if the layer
has no transparency - and if the color is NULL, that's not possible.
This patch checks if we received a valid GeglColor before trying to
set its alpha channel.
2025-04-02 13:57:24 +00:00
Bruno Lopes
e447b1244b build/windows: Prevent users from downgrading without uninstalling GIMP
That's not supported by Inno and our (confusing) custom code to
remove previous "old" GIMP versions seems to not support that.
2025-04-02 09:41:46 -03:00
Anders Jonsson
0486b11d5c plug-ins: fix dds volume map export with more than 2 layers
In 10b798c198 g_list_next always was used from the beginning of
the layer list for each call for volume map and array export, so
all layers after the first were the same.
2025-04-01 19:00:24 +00:00
Bruno Lopes
e975c1625a meson, app, build: Fix Inno wrongly allowing to unninstall with GIMP running
Inno needs an AppMutex to be aware of GIMP execution so
prevent unninstalling or installing GIMP if still running.

(Unninstalling with GIMP running was making GIMP to not be
fully unninstaled since gimp*.exe process file was opened.
It also could cause problems with settings unninstall.)

(Installing with GIMP running was already not possible
since Inno code in that part is more refined but
that check isn't done before deleting .debug files)
2025-04-01 16:25:47 +00:00
Alx Sa
b2b0ad7536 widgets: Set default response to GimpViewableDialog
Resolves #13504
Similar to c997349e, 2.10 users expect that pressing Enter
on dialogues such as Fill/Stroke Path should immediately commit
the operation. This default response may have been lost during the
GTK3 port, so we need to explicitly set the default response with
gtk_dialog_set_default_response () if a GTK_RESPONSE_OK has been
set.
2025-04-01 14:20:22 +00:00
Philipp Kiemle
812d43b278 Update German translation 2025-04-01 13:15:16 +00:00
Alexander Shopov
d960c6c29c Update Bulgarian translation 2025-03-31 13:48:51 +00:00
Alexander Shopov
ab847e6577 Update Bulgarian translation 2025-03-31 13:45:58 +00:00
Alexander Shopov
8acff211c6 Update Bulgarian translation 2025-03-31 13:42:09 +00:00
Alx Sa
e494538393 pdb: Pass GIMP object when creating text layer via API
After discussing with Idriss, we found that if you create
a GimpTextLayer via the public API, the GIMP object
was not being stored in the GimpText object.
If markup like bold/italics was then applied, GIMP
would crash on saving as XCF because the serialization
code tried to access text->gimp_font_factory.
This patch resolves the issue by passing the GIMP
object into GimpText when we create it via the
API.
2025-03-31 11:07:14 +00:00
Bruno Lopes
089f98f795 build/windows: Use special fileicon for XCF on Installer and MSIX
Closes: #issue_sha
2025-03-31 10:50:49 +00:00
Alx Sa
76dccc32b1 themes: Another round of System Theme leak fixes
Based on user reports after the 3.0 release.
These leaks were most visible in the Preferences dialogue,
and cover too large checkboxes and radio boxes, wrong colors
for scrolled window backgrounds, sliders, scales, and
Preference Dialog headers.
2025-03-30 18:35:26 +00:00
Bruno Lopes
78b1377488 gitlab-ci: Do not set MSYS_ROOT in 'before_script' 2025-03-30 15:03:25 -03:00
Alx Sa
68c7329988 dialogs: "You Installed GIMP" text no longer selectable...
...in Welcome Dialog.
Resolves #13468

Per Jehan, there is no need for this text to be selectable,
especially as the other text on the Welcome Dialog is not.
This patch removes gtk_label_set_selectable () for the
"You installed GIMP x.y.z" text to keep it consistent.
2025-03-30 17:34:50 +00:00
Jordi Mas i Hernandez
8636aa4ec6 Update Catalan translation 2025-03-30 17:26:53 +00:00
Kolbjørn Stuestøl
c791360b8c Update Norwegian Nynorsk translation 2025-03-30 16:12:02 +00:00
Kolbjørn Stuestøl
2966dbe547 Update Norwegian Nynorsk translation 2025-03-30 16:08:49 +00:00
Kolbjørn Stuestøl
83c78c3275 Update Norwegian Nynorsk translation 2025-03-30 16:03:18 +00:00
Alx Sa
238d0b3d31 plug-ins: Fix check for DDS cubemap option
Our DDS plug-in checks to see if we have six layers
with certain labels in their name to create a cubemap,
and if we don't, that option is locked.
When porting to GIMP 3 API, we accidentally kept checking
only the first layer's name instead of all six+ layers, thus
making it impossible to verify we had layers with the right labels.

This patch adjusts the iteration code to ensure we check all layers
in the image and not just the name of the first one.
2025-03-30 12:49:07 +00:00
Yuri Chornoivan
1918259ef6 Update Ukrainian translation 2025-03-30 10:45:44 +00:00
Alx Sa
f6b87826d6 plug-ins: Use selected layer for DDS export option
When we removed the drawables parameter for image exports,
we switched to using gimp_image_list_layers () to retrieve the
layers from the image parameter inside the function.
However, for DDS, this provided all layers rather than the selected
ones, so we always exported the top layer. This patch switches
to using gimp_image_get_selected_layers () to only retrieve the
subset of selected layers.
2025-03-30 01:38:18 +00:00
Luming Zh
031a80a981 Update Chinese (China) translation 2025-03-29 23:34:02 +00:00
Martin
d9b4e4d3e8 Update Slovenian translation 2025-03-29 22:20:42 +00:00
Bruno Lopes
a09405d0ae build/linux: Make .pc files on AppImage relocatable
Following: c29be7ba
2025-03-29 17:46:43 -03:00
Bruno Lopes
c29be7ba5f build/linux: Bundle correct Resource dev files on AppImage
Similarly to 73c7d468
2025-03-29 15:38:31 -03:00
Bruno Lopes
73c7d46829 build/windows: Ship babl, gegl and gimp development files on Windows
Partly inspired by Infrastructure/gimp-macos-build#69

Now, we ship headers, static libraries and (relocatable) pkg-config files of
babl, gegl and gimp to make a bit easier building filters and plug-ins.

Developers will still need MSYS2 to install the compiler and the
other many dependencies.
2025-03-29 13:41:32 -03:00
Jehan
8719e231fd NEWS: update. 2025-03-29 10:57:39 +01:00
Bruno Lopes
ad155fd545 build/linux: Do not include .debug symbols
Shipping .debug symbols is not a common practice on Linux distros.
Also, backtrace() API seems to not be able to read them separetely.

So, there is no use for them. Who wants top tier debugging can set:
export DEBUGINFOD_URLS="https://debuginfod.debian.net"
2025-03-28 21:10:44 -03:00
Alx Sa
d138453795 script-fu: Restore GUI to Difference Clouds script
Difference Clouds displayed a GUI in GIMP 2.8, which came
from the Solid Noise plug-in. When Solid Noise was converted to
a GEGL operation, it no longer showed a GUI when called from a script.

This patch adds custom parameters to the Difference Cloud so that it will
auto-generate a GUI, restoring the ability to configure most settings for
Solid Noise. Because of commit f92f7d42, script-writers can still call
Difference Clouds without the new parameters to retain the GIMP 2.10
behavior.
2025-03-28 19:18:16 +00:00
Bruno Lopes
0ab3037e78 build/windows: Fix comnent syntax on util_uninst.isi 2025-03-27 09:59:01 -03:00
Alx Sa
6f50061eff plug-ins: Use GimpExportOptions for ICO export
Since the ICO plug-in did not process the image with
gimp_export_options_get_image () before export,
filters were not being merged down and thus not
included in the final image.
This patch adds that feature to ICO, CUR, and ANI
exports.
2025-03-27 03:05:49 +00:00
Bruno Lopes
d17684734f build/windows: Make a copy of settings on Settings unninstall
This middle term adresses a major concern of non-Windows devs on IRC:
the hypothesis of some user removing its settings by accident.
2025-03-26 21:33:02 -03:00
Alx Sa
083cd67c87 plug-ins: Remove unused variable in file-tiff-load.c
Resolves #13411
While implementing the Sketchbook layers import
code in TIFF, we originally used a procedure to do
part of the processing. This code was replaced, but
the unused variable was left behind. This patch
removes it to reduce warnings on compile.
2025-03-26 23:22:21 +00:00
Alx Sa
befc8ed444 widget, themes: Highlight selected device in GimpDeviceStatus
Gives GimpDeviceStatus a CSS class so
we can apply custom styling to the
selected device, similar to GIMP 2.10's
style.
2025-03-26 14:35:37 +00:00
Bruno Lopes
d3645edfdf build/windows: Fix broken fontconfig cache
Closes: #1366
2025-03-26 11:30:12 -03:00
Bruno Lopes
f6c8c29553 build/windows: Make Settings unninstall wording a bit more "scary"
As per feedback on IRC.
2025-03-26 09:47:42 -03:00
Bruno Lopes
fa6e880e20 build/windows: Use IDI_WARNING icon on Settings unninstall dialog
That's the right way to use it:
https://learn.microsoft.com/en-us/windows/win32/uxguide/vis-std-icons
2025-03-26 09:19:38 -03:00
Ekaterine Papava
eb9f9794b9 Update Georgian translation 2025-03-26 06:55:34 +00:00
Bruno Lopes
8b5ddf53aa build/linux: Sync with Beta manifest
Ported from: 7d7e018d0f
2025-03-25 13:32:39 -03:00
Bruno Lopes
3a476aa62b build/windows: Fix wrong revisioning [Code] on DebugMsg
This wasn't creating any bugs but making debugging obscure.
2025-03-25 12:30:01 -03:00
Bruno Lopes
e7a7a7974c build/windows: Fix 'set' conjugation on Installer revisioning log
Closes: #13384
2025-03-25 12:24:43 -03:00
Hugo Carvalho
772caae144 Update Portuguese translation 2025-03-25 14:25:55 +00:00
Luming Zh
f38e0a51bc Update Chinese (China) translation 2025-03-25 10:21:50 +00:00
Bruno Lopes
5614f04f9a build/windows: Windows DLLs are not on /lib dir! (fix d58e6911) 2025-03-25 06:24:14 -03:00
Martin
2dee263016 Update Slovenian translation 2025-03-25 09:15:00 +00:00
Bruno Lopes
eab5e0615d build/windows: Add Repair mode to our Installer
Closes: #1382

We do not allow multiple installs under the same GIMP_MUTEX_VERSION.
That is a good thing but depends on the partition of the install dir.
Otherwise, if the partition is lost, this become a registry nightmare.

That nightmare is a more 5 years old issue that tormented even one of
our past maintainers, Michael Natterer.

So, let's make possible to fix GIMP installation when the previous
install dir can't be accessed.
2025-03-24 18:37:14 -03:00
Bruno Lopes
cbe2f6bec2 build/windows: Make Installer aware of Install, Reinstall and Update modes
Closes #12998.

On Install mode, we correctly allow users to customize the installation.
This is the expected use case of the "Customize" button: the first user be
able to decide if the installation will be system-wide or on local user,
to see the license, to choose the install dir, to select components etc.

On Reinstall and Update mode, however, some options choosen byf the first
user can't be undone, mainly components, since Inno never had support to
"modify" installs (it can only not install the unchecked components).
So, in our current scenario (before this commit):
- If python support was installed but on the update the user uncheck it,
  the old python and all old gimp python plug-ins will remain installed
- The same applies for postscript (.ps) component and 32-bit TWAIN

So, the chances of breaking the install are very high. Inno knows that
and displays a built-in warning, but even that dialog have limitations.
So, let's not keep that false impression of being able to modify the
install, let's fix that by hidding "Customize" on Reinstall and Update.
2025-03-24 18:37:10 -03:00
Yuri Chornoivan
423b1b567c Update Ukrainian translation 2025-03-24 21:05:00 +00:00
Sabri Ünal
eebc40ebb6 Fix a typo 2025-03-24 16:46:26 +00:00
Alan Mortensen
24a1dea3e3 Update Danish translation 2025-03-24 16:23:59 +00:00
Alan Mortensen
1a70759309 Update Danish translation 2025-03-24 16:20:15 +00:00
Jehan
e9b6ef67ab Post-release version bump to 3.0.3. 2025-03-24 17:00:37 +01:00
Jehan
3d4503e82c Release GIMP 3.0.2. 2025-03-23 23:47:58 +01:00
Jehan
67067f9ffa NEWS: list of changes for 3.0.2. 2025-03-23 23:07:12 +01:00
Idriss Fekir
ea5fff1b3f app: Keep the current font in use if the font searched for doesn't exist
Whenever the font in the Context (e.g. through selecting another font
from the fonts list) changes, a signal is emitted to propagate the
change to the active text layer, but if the font is set to NULL in
Context, we don't want that to propagate (because this would change the
current text's font to some fallback font).

In other similar codepaths (e.g. brushes) this is not a problem because
selecting a brush that doesn't exist will prevent painting until an
existing brush is selected.
2025-03-23 21:35:53 +00:00
Muhammet Kara
20138edff8 Update Turkish translation 2025-03-23 21:33:29 +00:00
Bruno
22e3ae24c7 build/windows: Create Restore Point on system-wide install
Closes: #11666

Creating restore points when admin is common on .msi installers.
We will use PowerShell's 'Checkpoint-Computer' cmdlet which will
automatically evaluate if the Restore point should be created.
2025-03-23 17:34:19 -03:00
Denis Rangelov
292220ff97 app/widgets: Replace confusing Search Actions icons with toggles 2025-03-23 18:56:22 +00:00
Jehan
cb79353b96 gimp-data: bumping so that gimp-data!23 and !2027 are synced. 2025-03-23 19:37:39 +01:00
Alx Sa
7d8b8c113d themes: Change the pane separator to outline only
As suggested by Jehan, Aryeom, and
Denis, this makes the separator feel less
heavy while still indicating the difference
between sections.
2025-03-23 18:24:21 +00:00
Jacob Boerema
5f7a136685 Revert "app: fix #12475 Eraser tip uses same tool as pen tip"
This reverts commit 68422e3c70.
2025-03-23 17:49:45 +00:00
Jethro Beekman
b3e3241c6f screenshot: Don't consider X11 to be available when running under XWayland 2025-03-23 17:20:51 +00:00
Jehan
0e7c4fec14 libgimpwidgets: slightly better form.
Previous code was right and equivalent because
gdk_wayland_window_export_handle() works asynchronously in the same
thread (so phandle can't get overridden by mistake). Nevertheless a
quick code scan felt surprising, so to avoid any such future surprise,
let's just switch the order of statements.
2025-03-23 18:10:25 +01:00
Jehan
bb6b2e395f plug-ins: use proper Window type for X11. 2025-03-23 18:09:38 +01:00
Lukas Oberhuber
41ba9b315c meson: fix 13146
This is probably a temporary fix until 13149 is tackled. And we need to make sure it works on all platforms.
The problem has been patched on macOS so we could also skip this change until the proper fix is done.
2025-03-23 15:02:59 +00:00
Alx Sa
a5c35fb244 theme: Invert GimpSpinScale slider colors in dark mode
While the slider colors match GIMP 2.10's light and
grey themes, the colors in 3.0 were inverted compared
to 2.10's dark mode. This patch inverts the dark mode
colors to better match 2.10's version.
2025-03-23 14:39:47 +00:00
Alx Sa
47224ba1a6 widgets: Improve spacing between toolbox widgets
The default value of the number of
children in a GtkFlowBox row is 7.
Since we only have 3 widgets in the toolbox
area, this caused them to be scrunched
over to the left. This patch improves the
spacing to match the widget count.
2025-03-23 14:37:45 +00:00
Øyvind Kolås
aac8656039 meson, app: depend on GEGL 0.4.58 2025-03-23 15:33:25 +01:00
Bruno Lopes
d58e69119a build/windows: Alternative approach to broken PyGobject bundling (#13170)
Reverts: 093f31dc

My approach avoids bundling build-time deps (that increase about 100MB and
creates expectancy of support of some not-used things like 'Tcl/Tk').

However, this hardcoded approach of mine is more fragile.
2025-03-23 09:18:00 -03:00
Rodrigo Lledó
7cfb94b1d5 Update Spanish translation 2025-03-23 11:13:44 +00:00
Rodrigo Lledó
7a1add73ef Update Spanish translation 2025-03-23 11:05:50 +00:00
Alx Sa
aa773e618b themes: Plug system theme leak for menu hover
Some system themes add additional padding or borders
to menu items when hovered over, which causes
the menu to jitter or shake. This patch attempts
to mitigate the issue by defining those values in the
Default CSS theme.
2025-03-23 01:35:32 +00:00
Jehan
093f31dc40 Issue #13170: Python Plugins crashes and don't show up.
Per discussions in #13170, `.pyd` files are just renamed `.dll`. So
let's also look their DLL dependencies the same was as any other DLL.
2025-03-22 23:58:56 +00:00
Jacob Boerema
73341ebdbd plug-ins: fix gradient-flare crash in Selector editor.
In the Selector editor dialog, on the Glow tab, Changing the Size (%)
and then sliding it back to 0, causes a crash when reaching 0.
When the Size is 0, the pos in `calc_get_gradient` is NAN, which we
do no check for.
This could be issue #13282, but until we hear back and see a crashlog,
we can't be sure.

There might be other issues earlier on, but the whole plug-in could
probably use a revision since a lot of code is unchanged from 1999.
So let's just add a check for `isnan` and additionally change the
< 0 check to < 0.0001, since I saw it not catching very small values
near zero.
2025-03-22 22:44:27 +00:00
Jehan
a705e0fec3 .gitlab: update default templates.
Adding some excerpt from our Code of Conduct to be "Considerate and
Respectful". Negative emotions are only making things worse and make
some contributors not even want to interact anymore with some reports.

Also in our MR template, add the mention that we don't want anything
AI-generated in or even anywhere near our project.

Both these topics are things which were recently discussed within the
team (mostly on IRC).
2025-03-22 23:04:07 +01:00
Anders Jonsson
916f282d30 Update Swedish translation 2025-03-22 14:26:01 +00:00
Alx Sa
c997349eec libgimpwidgets: Add default response for GimpQueryBox dialogues
Resolves #13293
This patch fixes a regression from 2.10. The OK button
was not set to be the default response for certain
Selection dialogues like Shrink/Grow/Border, so
users could not just press Enter to apply if they were
fine with the default values. This patch adds a call to
gtk_dialog_set_default_response () to restore this
behavior.
2025-03-22 02:10:46 +00:00
Alx Sa
61d38cf9c1 themes: Improve separation between panels in dark theme
In collaboration with Denis Rangelov, the separator between
panes has been updated to use the same colors and thinner border
in all three theme variants.
Note that the border is created with box-shadow CSS, and is only
shown on one side of the horizontal separators to suggest that
it is a continuation of the bottom section.
2025-03-21 17:56:43 +00:00
Alx Sa
b1d1699f14 widgets: Use different color for Histogram borders
GimpHistogramView uses the widget's foreground color
to draw both the histogram and its border. This causes
clipped values to blend into the sides of the border,
preventing the user from seeing them.

This patch gets the luminance value of the foreground
color, then uses that as a threshold to lighten or
darken the border color for contrast.
2025-03-21 13:25:20 +00:00
Nathan Follens
25b423d094 Update Dutch translation 2025-03-21 12:53:09 +00:00
Alx Sa
484b9cfe62 themes: Keep headerbar color consistent when out of focus
On some system themes, the background color of
menu items on a merged headerbar would be a
different color from the rest of the menu when
GIMP's main window was out of focus.
This patch defines those items as clear so they become
whatever color the rest of the headerbar is instead.
2025-03-21 12:02:11 +00:00
Jehan
af754df863 desktop: add AppStream metadata to prepare for GIMP 3.0.2.
See #13266.
2025-03-20 23:52:35 +01:00
Wyatt Radkiewicz
b6691e5394 plug-ins/metadata: fix buffer overflow in date picker 2025-03-20 21:46:34 +00:00
Bruno
b6069baa04 build/windows: Make possible to unninstall user settings
Closes: #4544

This adds a dialog (after GIMP files unninstall) that prompts about
deleting GIMP config files only: %AppData%\GIMP\${GIMP_APP_VERSION}

Doing that at admin mode would be too convoluted so that feature is
exclusive of user-mode install (which is the default since: 08019d95)
2025-03-20 13:05:35 -03:00
Alx Sa
72964efb29 app/tools: Reorder Line Art Detection options
This patch moves the Stroke Threshold spin scale to
be on top, like similar tool option groupings such as
Dynamics Fade Options.
2025-03-20 14:25:59 +00:00
Luming Zh
b0d9fb80cd Update Chinese (China) translation 2025-03-20 10:50:24 +00:00
Ekaterine Papava
cfb30a4e94 Update Georgian translation 2025-03-20 03:11:04 +00:00
Jehan
187bb014d7 Issue #13138: crash when choosing a brush. 2025-03-20 02:41:33 +01:00
Bruno Lopes
d79122d5ef build/windows: Remove Windows XP SP3 string too!
Following 4de439d1
2025-03-19 20:27:11 -03:00
Bruno Lopes
0d327aa3eb build/windows: Add '[package]' to Installer gimp-release generation
Otherwise, the gimp-release file is invalid
2025-03-19 20:21:19 -03:00
Bruno Lopes
4de439d1b1 build/windows: Clean dead Installer strings 2025-03-19 20:05:34 -03:00
Yuri Chornoivan
c62323e6aa Update Ukrainian translation 2025-03-19 21:10:01 +00:00
Martin
3cd3fe93c8 Update Slovenian translation 2025-03-19 20:56:01 +00:00
Anders Jonsson
9b708c3f7f app: mark rendering intent strings for translation 2025-03-19 19:06:10 +00:00
Alx Sa
6af4c13139 python: Set error color based on theme
This patch changes the color of the error text in the
Python console based on the luminance of the
background-color (using GIMP_RGB_LUMINANCE
values).
2025-03-19 12:42:17 +00:00
Sveinn í Felli
02ec393b2c Update Icelandic translation 2025-03-18 12:02:26 +00:00
Yuri Chornoivan
fa068d08c9 Update Ukrainian translation 2025-03-18 06:13:48 +00:00
Jehan
36d8a63004 NEWS: move to NEWS.pre-3-0 and prepare for the new stable series. 2025-03-17 23:43:19 +01:00
Bruno Lopes
5efb09fb2c build/windows: Fix crazy rebase done by
2983c0ac
2025-03-17 19:34:57 -03:00
Bruno Lopes
2983c0ac61 build/windows: Fix MSIX script failure at .msixupload making
This was a regression introduced by b285cfd3
2025-03-17 19:22:51 -03:00
Bruno Lopes
bfad4aba8e build/windows: Add Stable MSIX Product ID
It wasn't needed for the first submission, but
the following automatic ones will need it.
2025-03-17 14:31:34 -03:00
Jehan
07e0345b5f meson.build: post-release version bump to 3.0.1. 2025-03-17 13:06:36 +01:00
Alexander Shopov
fb10438965 Update Bulgarian translation 2025-03-17 11:06:33 +00:00
Luming Zh
a0876355ff Update Chinese (China) translation 2025-03-17 10:57:18 +00:00
Luming Zh
8cecce1081 Update Chinese (China) translation 2025-03-17 10:34:11 +00:00
Martin
1282293b18 Update Slovenian translation 2025-03-17 01:09:59 +00:00
Jehan
9785099e5a Release GIMP 3.0.0. 2025-03-17 01:44:19 +01:00
Bruno Lopes
8cb3f0ff66 build/linux: Ensure that 'ld-linux' have .debug symbols
x86_64 have a peculiar path so this trick is needed.
2025-03-16 19:27:31 -03:00
Bruno Lopes
4e073a6788 build/linux: Do not bundle 'gdk-pixbuf-query-loaders' .debug symbol 2025-03-16 19:27:27 -03:00
Jehan
599f209238 desktop: update release date. 2025-03-16 23:06:32 +01:00
Jehan
60119602be desktop: fourth screenshot, by Liam! 2025-03-16 22:58:52 +01:00
Jehan
8ae4c9d066 NEWS: update. 2025-03-16 22:03:56 +01:00
Bruno Lopes
4c8c64aa46 build/linux: Remove leftover from previous try of .debug on AppImage
It is not needed because the .debug files are bundled.
2025-03-16 17:43:01 -03:00
Yuri Chornoivan
492e429881 Update Ukrainian translation 2025-03-16 20:20:41 +00:00
Bruno Lopes
958e82d5e9 build/linux: Bundle deps .debug symbols on AppImage with 'debuginfod' 2025-03-16 17:14:54 -03:00
Jehan
ba4dae9cd9 desktop: update the screenshots. 2025-03-16 20:32:04 +01:00
Jehan
8c077d50d1 plug-ins: revert the multi-threading code.
The whole multi-threading changes in the help plug-in seem to badly
break on macOS. See discussion in reopened #12898.
We decided to get rid of it for now and see later if we need to
reimplement this (after understanding what is going on).

Revert "plug-ins: fix #13049 Calling help on unknown help-id causes..."

This reverts commit 7d153bcc6d.

Revert "plug-ins/help: fix thread unnecessarily waiting when locale_parse failed"

This reverts commit fd0ccfa16c.

Revert "plug-ins/help: fix crash when locale is NULL"

This reverts commit 4075add5b4.

Revert "plug-ins: fix failing to access help from within GIMP"

This reverts commit 38f0527ebc.

Revert "plug-ins: add some better error handling when the docs XML request/parsing fails."

This reverts commit 543bb374a8.

Revert "plug-ins: try to load the gimp-help.xml file in a thread."

This reverts commit f2d47e910b.
2025-03-16 19:30:47 +01:00
Kolbjørn Stuestøl
34e35f3fd5 Update Norwegian Nynorsk translation 2025-03-16 17:09:44 +00:00
Øyvind Kolås
fc35864880 meson, app: depend on GEGL-0.4.56 2025-03-16 15:38:41 +01:00
Bruno Lopes
dc53786acd build/linux: Update README regarding versioning 2025-03-16 07:02:44 -03:00
Bruno Lopes
b0b4c513ff build/linux: Make gimp module a bit more alike the one on Beta manifest 2025-03-15 21:30:50 -03:00
Bruno Lopes
d4f51fdd77 build/linux: No need to set PYTHONHOME on AppImage
Closes: #13050
2025-03-15 20:45:11 -03:00
Bruno Lopes
ce33dab5f1 build/linux: Add error message to runtime version check 2025-03-15 17:13:15 -03:00
Bruno Lopes
5b3ffcb64e build/windows: Auto instruct MSIX maintainer about self-sign certificate
Partially reverts dd4b687d
2025-03-15 16:26:06 -03:00
Alx Sa
206273c6b5 core: Add version 23 to XCF switch statement
Resolves #13124
In 3f3b29ba we bumped XCF version to 23 due to
new blending spaces. However, we did not update
the version check switch statement to accept this
version. This patch adds a new case to handle version
23.
2025-03-15 18:23:07 +00:00
Alx Sa
a723fe27b3 plug-ins: Fix crash when exporting indexed ICNS images
Resolves #12880
Same problem as in 4cd3360d, just applied to exported ICNS icons instead.
2025-03-15 17:34:03 +00:00
Alx Sa
a034283cb0 plug-ins: Import/Export color profiles for PNG-based ICNS files
Resolves #12880
Since ICNS stores full PNGs for some icon types, it's
possible for them to have a color profile stored in
their iCCP chunk. This patch enables the existing
metadata option to save color profiles, then passes
that choice to the PNG procedure when exporting. Since the new widget affects the existing flowbox,
we also define a minimum height to prevent cutting
off the first row.

Loading is trickier since other software could
potentially combine PNGs with different color profiles
in the ICNS. GIMP does not yet support per-layer
profiles, so for now we'll follow the way the TIFF
importer does it and just attach the first color profile
we come across while loading.
2025-03-15 17:34:03 +00:00
Bruno Lopes
36e788abec build/windows: Make MINGW_PACKAGE_PREFIX detection more subtle 2025-03-15 14:04:10 -03:00
Alx Sa
133bd2d432 plug-ins: Fix crash when exporting indexed HTML tables
Resolves #13122
The HTML table code expects RGB or Grayscale pixels
when creating a "BGCOLOR" attribute in the table.
This patch defines the capabilities of the exporter
in GimpExportOptions and retrieves a suitable image
with gimp_export_options_get_image ().
2025-03-15 15:18:14 +00:00
Alx Sa
4cd3360d53 python: Fix crash when exporting indexed ORA images
Exporting ORA images involves first creating PNGs of
the layers. To do this, we create separate images for
each layer with Gimp.Image.new ().
However, if the original image was indexed, we lose
the palette when passing the temporary image to
the PDB call. This caused us to try saving a NULL
palette, which resulted in the crash.

This patch adds a check if the image is indexed, and
copies over the palette to the temporary image.
2025-03-15 02:36:20 +00:00
Bruno Lopes
a091b6b2d8 build/windows: Update MSIX README to mention Stable entry 2025-03-14 19:57:05 -03:00
Jehan
26caad3f3b NEWS: update. 2025-03-14 22:55:41 +01:00
Bruno Lopes
df9f812b59 build/linux: Fix comment style about Lua on AppImage script
Let's put links only about toolkit (go-appimage and appimagetool) issues
2025-03-14 18:04:48 -03:00
Jehan
c381390615 Issue #12636: _gimp_gp_param_def_to_param_spec throws WARNING on…
… a build of type "release".

Thanks to Lloyd Konneker for their original diagnosis of this issue!
2025-03-14 21:52:19 +01:00
Bruno Lopes
6adc6aa23f gitlab-ci: Add build-id to AppImage
This is needed to proper update check.
2025-03-14 16:01:09 -03:00
Jehan
5272618512 app: fix wrong offset of layer buffer with pass-through groups. 2025-03-14 18:53:57 +01:00
Jacob Boerema
3ee85e422b plug-ins: fix #13107 failure to read exported grayscale DDS image
When exporting a grayscale image with alpha channel as DDS while
choosing "default" format, we did not set the DDPF_LUMINANCE flag,
but instead used DDPF_RGB, on loading in the 3.0 branch this caused
a failure to read this format due to unrecognized combination of
settings.

First we make sure that on exporting to also set DDPF_LUMINANCE for
grayscale with alpha.
Second we also make sure to zero the blue and green mask fields,
since that is the expected value when these fields are not used.

To support this type of older exported DDS images, we add an extra
format definition for this unusual combination of DDS settings,
that way we recognize them when opening and are able to load them.
2025-03-14 12:23:42 -04:00
Alx Sa
4d8073a3a0 widgets: Prevent crash when converting to indexed image
Resolves #13092
GIMP crashed when converting an image to indexed mode,
if the user first changed the color in the Configure Grid
Dialogue. This was because signals were not being
properly disconnected from GimpColorMapSelection
after the dialogue was closed.

Jehan found the solution, to replace 
g_signal_connect_swapped () calls with
g_signal_connect_object () and flags set to
G_CONNECT_SWAPPED to retain the original
behavior. This ensures the signals are disconnected
after the widget is destroyed on dialogue close.
2025-03-14 15:18:48 +00:00
Bruno Lopes
e139e016a5 gitlab-ci: Install 'python3-gi-cairo' for full introspection
Closes #13105

Differently from MacPorts and MSYS2 packages, this isn't auto installed.
2025-03-13 21:11:21 -03:00
Jehan
bf144eba1b Issue #13057: partly rendered passthrough layer group inside passthrough layer group.
So the problem was that the duplicated image (as returned by
gimp_export_options_get_image()) was not fully rendered. I think it is
related to the computed size of pass-through group layers (whose borders
may show actually smaller than their actual render which is in fact
composited with below layers).

I am not perfectly happy with my solution as I'd have prefered fixing
the source issue, but it is good enough, just a few before GIMP 3.0
release.
2025-03-14 00:54:31 +01:00
Jehan
8bf314f47a app: use the mode node output on a pass-through group with no filter.
The call to gimp_drawable_merge_filters() on a group set a buffer to the
group layer (a bit like when we rasterize text layer) which was why it
worked fine. But when the group had no filter, we didn't have this side
effect.
So let's make sure we use the mode node output as our merged layer's
buffer in such case.

Also when the bottom layer (to merge) is a pass-through group, we don't
want to disconnect its input.
2025-03-14 00:54:31 +01:00
Alx Sa
40fe4fc62f plug-ins: Convert Print Preview for images with higher bit depth
Resolves #13104
print_preview_get_thumbnail () crashes when trying
to display thumbnails where the image's precision is
higher than 8 BPC. While the plan is to rewrite/replace
this plug-in, for now, we'll duplicate the drawable's
image and convert to 8BPC to prevent issues.
2025-03-13 23:22:51 +00:00
Alx Sa
f576531bec plug-ins: Fix palette being blacked out on indexed ICO export
Resolves #13099
For indexed ICO images, we get the palette from a
temporary image during export. Since the palette is
tied to the image, when we convert the temp image to
RGB and then delete it, the GimpPalette is lost and
the image is exported as pure black.

This patch resolves the issue by calling
gimp_palette_get_colors () to get the actual GeglColors,
then adding them to a new palette with
gimp_palette_new (). As this is separate from the
temporary image, it is retained after the call to
ico_image_get_reduced_buf ().
2025-03-13 03:25:26 +00:00
Jacob Boerema
acead5642e plug-ins, tests: add tests for more file formats...
using example files from the nomacs testset.
2025-03-12 21:51:19 +00:00
Alx Sa
731766e9bc vectors: Remove debug printout when Snap to Active Path on
Resolves #13096
In 5a43a464, some debug output was added to help
diagnosis a problem when Snap to Active Path was
turned on. The issue seemed mostly resolved in e57ad0f8,
but the print statements were left in. This leads to
slowdown when moving layers while Snap is enabled
(due to the continuous print statements).

As it's been 19 years since the original commit, it
should be fine to remove these debug statements
to boost performance.
2025-03-12 20:29:54 +00:00
Alx Sa
8fd1d229dc plug-ins: Fix reading/writing NULL clipping paths for PSD
Previously, we did not check if the clipping path name
was properly converted to ISO-8859-1 from UTF-8
before saving. g_convert can return NULL if it fails,
which means we wrote NULL (causing a crash on load).

To resolve, this patch adds a check if the clipping path
name is NULL on load, warns the user, and then
stops loading the clipping path resource.
On export, we fall back to ASCII instead if the conversion
to ISO-8859-1 fails.
2025-03-12 20:06:25 +00:00
Bruno Lopes
4497c906c1 build/linux: Fix AppImage crashing due to lack of Xapp gschemas
Closes: #13082
2025-03-12 13:24:32 -03:00
Jehan
f628b1715f Issue #13058: passthrough layer groups with filters don't merge correctly. 2025-03-11 17:18:42 +01:00
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
Jehan
71aff49750 Issue #11592: do not strength-reduce pass-through groups with filters.
While the pass-through group can be skipped in some specific conditions,
this won't work with filters (then the effect would only apply to the
one layer child instead of applying to the result of the child
blended/composited with the bottom layers).

This inconsistency was quite visible because people had to create 2
layers and have one as non-Normal mode for it to behave as actual
pass-through group.
2025-03-01 22:32:33 +01:00
Bruno Lopes
a1e5049f9f build/linux: Make AppImage deps download and revisioning work locally 2025-03-01 18:02:25 -03:00
Alx Sa
78d1e517d4 dialogs: Compress undos for multiple Open as Layer calls
Currently, if you open multiple files at once via the Open as Layers
dialog, it creates a new Undo History entry for each layer. As we
compress multiple layer operations elsewhere (such as deleting
or duplicating multiple layers), it makes sense to compress them
here as well.
2025-03-01 16:21:24 +00:00
Alx Sa
af96e64d9c plug-ins: Fix support for loading 12 and 16 bit JPEGs
12 bpc JPEGs currently load a blank image with a warning
that 12 bit precision is not supported.
libjpeg-turbo supports loading 8, 12, and 16 bpc JPEGs without
separate builds as of 3.0, so this patch adds support for loading
them and normalizing to 16 bit precision if needed.
Since we don't enforce a minimum libjpeg-turbo version, macros are
used to prevent this enhancement from being compiled if not supported.
2025-03-01 15:40:21 +00:00
Alx Sa
a74287c5cc libgimpwidgets: Shrink width of GimpSizeEntry
In 2baa518a, to avoid a critical we use
the resolution as the width of GimpScaleEntry
when the unit is set to pixels.
This had the side-effect of making the
width of the GimpSizeEntry very long when
the unit is initially set to pixels.
Since GimpUnit is now an object, the original
critical no longer displays. Therefore, we
partially revert 2baa518a and refer to the
value as entry_width instead for clarity.
The minimum width is set to 7 to match
the minimum width of GimpSpinButton.
2025-03-01 03:45:13 +00:00
Balázs Meskó
9e03e45f8f Update Hungarian translation 2025-02-28 19:41:58 +00:00
Balázs Úr
2e39e3dae1 Update Hungarian translation 2025-02-28 19:35:48 +00:00
Balázs Meskó
c1813e2d03 Update Hungarian translation 2025-02-28 19:24:47 +00:00
Balázs Meskó
5a8694d742 Update Hungarian translation 2025-02-28 19:16:45 +00:00
Balázs Meskó
ad0b5d128f Update Hungarian translation 2025-02-28 18:57:14 +00:00
Jehan
a7a390f82a Issue #12996: CRITICAL on the "keep the embedded working space" dialog. 2025-02-28 15:00:57 +01:00
Jehan
57a51994a3 app: use g_signal_connect_object().
Otherwise we may end up in cases when the handler is called while the
manager object is already freed.
2025-02-28 14:37:30 +01:00
Jehan
ee2a479f7d app: fix converting a layer to group layer by mistake when dnd between images.
This would happen when dragging several layers and one of them is a
group layer. Then any successive "normal" layers were converted to layer
groups.
2025-02-28 13:05:05 +01:00
Jehan
2bf25d8487 app: fix not-finding correct container when dnd across images. 2025-02-28 12:05:06 +01:00
Jehan
99b2ef9564 app: when dropping items containing groups and descendants, just consider the item group.
If you were to select a layer group and some/all its children, current
implementation was "flattening" all these at the same level, which is
weird.

Now the whole questioning of what to do in this situation is a very good
UX discussion to have, in particular when you only select *some* (not
all) of the children. Does it mean something? Does it mean you want to
copy part of the tree structure with only part of the children? What
when it's not a copy, but a move (e.g. a dnd in the same image). You
can't move part of the children (what do you do with the rest?).

Anyway that's many questions which I prefer to leave for a real gimp-ux
discussion and specification. For the time being, at least not
flattening a whole tree structure seems a better behavior.
2025-02-28 11:08:35 +01:00
Jehan
37f49e1a27 app: fixes uninitialized variable sometimes used.
Fixes:

> warning: variable 'n_children' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
2025-02-28 11:08:35 +01:00
Alx Sa
6279d7b70b core: Consider filters when selecting by color
When selecting by color with the Fuzzy Selection, Color Selection,
or Bucket Fill tool, we use gimp_pickable_get_buffer (). This only looks
at the raw pixels and not any active filters, which can result in some
unexpected selections (for example, an NDE offset filter will make it
appear as if you are selecting the wrong area).

There are plans to let users decide whether to select the raw
pixels or the filtered layer. For now, this sets the default action to
consider the layer as seen by the user, with filters included in the
calculation.
2025-02-28 01:06:41 +00:00
Jehan
414c0132e3 NEWS: update. 2025-02-27 18:59:59 +01:00
Jehan
09ebc2042a app: just needed to close that parenthese! 2025-02-27 18:18:54 +01:00
Jehan
b3acda1839 Issue #12950: undoing a deleted layer group loses filters. 2025-02-27 18:14:43 +01:00
Jehan
39d0925b86 plug-ins: in non-v3, return in fact (0) or (1), not just an integer.
Comparing with other functions returning boolean, this seems to be the
actual "standard" for these in Script-Fu v2.
2025-02-27 17:34:43 +01:00
Bruno Lopes
ada2bbeb57 gitlab-ci: Catch GIMP's 'meson-log.txt' artifact on AppImage builds
As we do in other GIMP jobs.
2025-02-27 08:37:01 -03:00
Anders Jonsson
8f6c6867c8 plug-ins: restrict GIH max dimensions to GIMP_PIXPIPE_MAXDIM
In 06bd1f1289 the max number of
dimensions was set to 1000, but the plug-in runs into a
segfault when dimension >4. The rest of the plug-in uses
GIMP_PIXPIPE_MAXDIM as max (4), so use it for the dimension argument
as well.
2025-02-27 03:13:25 +00:00
Jehan
d7cfc441e0 Issue #12948: make (gimp-pdb-procedure-exists) Script-Fu v3 compliant.
In particular, in v3, we want to return #t or #f, not an integer.
2025-02-26 22:31:28 +01:00
Jacob Boerema
f87ecbe0db plug-ins: add a reminder to the main plug-in tests configuration...
about adding any new ini files to meson.build,
since that is what I often keep forgetting.
2025-02-26 20:31:17 +00:00
Jacob Boerema
321e0a545f plug-ins, tests: add tests for loading xcf images 2025-02-26 20:31:17 +00:00
Jacob Boerema
eae1d5f9b6 app/xcf: fix #12980 protection against invalid xcf offset 2025-02-26 20:30:05 +00:00
Jehan
63e6065197 Issue #12948: only report progression for "extension-script-fu" scripts.
In particular, we want the new Script-Fu plug-in to be able to handle
their progress status themselves, which is possible with
(gimp-progress-set-text) except that it is far too quickly overriden
because each procedure call generates a new progress message.
2025-02-26 15:16:05 +01:00
Jehan
ad136c1ab9 plug-ins: more accurate error message when using named argument syntax for…
… internal procedures.

See #13003.
2025-02-26 14:12:25 +01:00
Jehan
61c1014ba6 app, pdb: (gimp-pdb-proc-exists) should only return TRUE for public procedures. 2025-02-26 14:12:25 +01:00
Alx Sa
7a72a30e3a themes: Define slider padding values in System theme
Resolves #12999
Ports the padding and margin definitions
for GimpSpinScale from 6a820e94 to the
System theme.
2025-02-26 02:09:09 +00:00
Jehan
1df9dc5751 Issue #12948: implement (gimp-pdb-procedure-exists) in Script-fu.
I hesitated to make (gimp-pdb-proc-exists) public but I don't think it's
a good idea as it would be redundant with gimp_pdb_procedure_exists() in
the C API.

Instead, just implement (gimp-pdb-procedure-exists) specifically for
Script-Fu, with a name mapped to the C function.
2025-02-25 23:04:00 +01:00
Jehan
6a5fe88e29 plug-ins: fix a forgotten debug test. 2025-02-25 22:40:43 +01:00
Jehan
711be6db8c app, libgimp, pdb: clean up some more code redundancy. 2025-02-25 20:17:05 +01:00
Jehan
1e869b9ce0 libgimp: cleanup and adding missing doc-comment.
The comment about temporary API was added in commit 244b52bf0d for
functions long gone.
2025-02-25 20:01:29 +01:00
Jehan
269463389e app, pdb: internal procedures are simply ones with type GIMP_PDB_PROC_TYPE_INTERNAL.
Adding an is_internal value was a mistake, or rather it was redundant.
We already had a procedure type and all internal procedure are set as
GIMP_PDB_PROC_TYPE_INTERNAL.

I also double-checked that it is not possible for a plug-in to create a
procedure with this type (it is rejected), so it's very fine.
2025-02-25 20:01:29 +01:00
Jehan
ad0b02d2b7 app, libgimp, pdb, plug-ins: rename gimp_procedure_is_core() to…
… gimp_procedure_is_internal().

I realized we were already naming these "internal procedures" in the
Procedure Browser and this is in fact a better naming than "core
procedure".
2025-02-25 20:01:29 +01:00
Sveinn í Felli
d774ba8d1a Update Icelandic translation 2025-02-25 16:25:29 +00:00
Jehan
77d296f95b app: some code cleanup.
This was not a bug, but having the same name for 2 variables (with an
inner-scope variable hiding the outer-scope one) is confusing.
2025-02-25 00:56:11 +01:00
Jehan
58a7fd09cb Issue #12304: make sure the GMenuModel triggers appropriate updates when a label changes.
This was working fine in our custom menu widget, but not with menus
generated by GTK (GIMP_GTK_MENUBAR codepath).
2025-02-25 00:53:19 +01:00
Jehan
8c0e979808 app: fix a crash in GIMP_GTK_MENUBAR codepath.
When closing the last image, it seems that we'd remove twice the
"windows-display-0001" item, first when making the action invisible,
then when gimp_ui_manager_remove_ui() is called on emptying the display.

And gtk_menu_tracker_remove_items() doesn't handle correctly a NULL
list.
2025-02-25 00:53:19 +01:00
Jehan
0d98500984 Issue #12789: make sure gimp-debug-tool is correctly found on Windows. 2025-02-24 18:37:58 +01:00
Jehan
c3bc4e5336 Issue #12904: make debugging self with gdb optional with -Ddebug-self-in-build.
Some people reported cases where gdb doesn't even seem to understand
Python scripts (the error in #12904 implies it is looking for standard
gdb commands, because apparently -x option allows both styles).
Others had issues in sandbox building (#12956).

I don't really want to spend too much time understanding each case,
especially as it's a self-debugging tool, not absolutely necessary for a
successful compilation.

So let's just make this optional, and default to "false".
2025-02-24 18:13:09 +01:00
Bruno
0ec94aef5b build/windows: Fix auto repair of unreleased official and unofficial langs
b450bf92 was enough only to official langs present on Inno releases.
2025-02-24 10:37:10 -03:00
Andi Chandler
4aac3c8362 Update British English translation 2025-02-24 12:22:52 +00:00
Bruce Cowan
c4ff1b47eb Update British English translation 2025-02-24 12:20:51 +00:00
Bruce Cowan
c597d016d7 Update British English translation 2025-02-24 12:20:41 +00:00
Bruce Cowan
ac81284376 Update British English translation 2025-02-24 12:17:10 +00:00
Bruno
b285cfd310 build/windows: Extend local compatibility layer to .NET and msstore-cli download
The original code from 9eec33ba was wrong because it was not downloading at
CI_PROJECT_DIR. Now, it does, and only downloads on parent dir if locally.

Also, fix .NET Runtime download URL.
2025-02-23 16:37:57 -03:00
Bruno
f1c51c1169 build/windows: Prevent calling Store-MSIX script from wrong CWD
Similar to 333499265d,
since we need 'AppxManifest.xml' and 'data_associations.list'.

Also, fix build_dir code when script is called from 'installer' or
'store' dir.
2025-02-23 15:53:59 -03:00
Bruno
333499265d build/windows: Prevent calling Installer script from wrong CWD
Since we need 'iso_639_custom.xml' from source, let's ensure it can be found.
2025-02-23 14:24:28 -03:00
Bruno
f69dd75a17 build/windows: Move all Installer versioning code to Inno .iss script
Now, we don't need to set a lot of params when calling 'issc' anymore.
The version vars will be taken from Meson, being more future-proof.

This is not 100% future-proof, however, because we unfortunately can not
take 'config.h' vars directly due to Meson limitations:
https://github.com/mesonbuild/meson/issues/14260
2025-02-23 13:32:16 -03:00
Bruno
13d2751446 build/windows: Update .isl patching situation regarding PowerShell capabilities 2025-02-23 08:15:01 -03:00
Lukas Oberhuber
9042486dac plugin, macos: Fix #12711, #12898
This fix does not cause the problems that the alternative fix caused (as detailed in #12898).
2025-02-22 17:32:51 +00:00
lloyd konneker
ff5e3fdab6 libgimpbase and core: fix #12711 plugin hang on MacOS
This a bandaid for an issue on MacOS:
an IO event is received that says a read pipe from a plugin has data,
but the pipe is actually empty and reads hang, and hang the app.

Possibly this is an issue with GLib and could be fixed there,
to not send such a spurious IO event.

Possibly an alternative fix is to determine whether the app side of the
plugin protocol is in a state where no messages from the plugin
are expected.  In that case, the read pipe should be flushed
i.e. data discarded, with non-blocking reads, until a read returns nothing.
2025-02-22 17:32:51 +00:00
Lukas Oberhuber
3a9dbbd4b0 Revert "app/plug-in: fix #12711 app hang on MacOS IO event on empty pipe"
This reverts commit 4b71ca6e44.

Breaks on MacOS, see #12711.
2025-02-22 17:32:51 +00:00
Jehan
70843915d3 NEWS: update. 2025-02-22 13:52:20 +01:00
Jordi Mas
9b59e54457 Fixes to Catalan translation 2025-02-22 11:18:58 +01:00
Alx Sa
ca6ea27c3e python: Update suggestion for GimpCoreObjectArray parameters
Resolves #12973
Since the standard 'drawables' argument for procedures
is now a GimpCoreObjectArray, the suggested syntax for
setting it in a Python call was incorrect. This impacts other
parameters as well, so we add a check for the argument type
being Gimp.ParamCoreObjectArray and then provide the
correct Python code to set them.
2025-02-22 03:45:55 +00:00
Jehan
6076c4d4a6 Issue #12825: generate a help ID for any operation with "gimp:menu-path" key.
This is an alternative implementation for issue #12825, replacing commit
424ef17bac, after further discussion with Jacob.

Basically we don't need a new key "gimp:help-id" anymore. Instead, for
every action we add through a "gimp:menu-path" key AND when its name is
prefixed with "gegl:", we generate a help ID from the operation name.

The first few operations in such case already have a help page for them,
with corresponding help ID, in gimp-help repository.

In the future, we may expand this help ID generation rule to any
core operation (i.e. any operation prefixed with "gegl:") but for the
time being, we only do for the ones with a menu path, otherwise we'd
have too many missing pages.

Also fix again gimp_gegl_procedure_get_help_id() so that it searches a
help ID within all existing operations in the "filters" group, as I
realized that this was still broken in some cases.
2025-02-21 22:53:37 +01:00
Jehan
29ba885985 app: fix help ID of hardcoded filters.
Help ID of filters with an explicit help ID got broken with commit
8c0fdb9cf0 (which was fixing help ID for filters added to menus with a
GEGL key).
2025-02-21 21:41:16 +01:00
Jehan
b146b6255e Issue #12751: get rid of the direct exit() call in stable builds.
I pondered a lot about this one. In particular I wished we saw the leaks
earlier so that this change were in a RC (really unsure we'll have any
more RCs now).

On the one hand, I could tweak signal callbacks so that the callback
gui_exit_after_callback() is called before the fast exit(). But it feels
more and more like a hack over a hack.

Having 2 code paths depending on whether we are in a release or not is
ugly and would only hide bugs during the whole development cycle (as
proven here). Now when I read the comment, the part about speeding up
the quit process doesn't seem like it makes much sense these days (maybe
back then when this was implemented?). GIMP is fast to quit with or
without this.
Now the part where I worry is the problem of plug-in possibly still
running. Does it mean there used to be cases where GIMP would be stuck
at exit because of buggy plug-ins? I don't think I ever saw one of these
during the whole unstable cycle, and pretty sure we have code able to
kill plug-ins when needed. Even if not, by now, my preference would be
that, if ever someone were to report a similar case, we should just
improve our exiting code to kill (SIGKILL, without any chance of
avoiding it) any guitly plug-in.

This is why I finally decided to just get rid of this very old code.
For reference, the last time it was added was commit cdc2f0ded6 in
2004, though we can actually find older commits where it was removed
(921f00c13d), added (1db2ada311)… Looks like it used to be quite a
dance, but this is hopefully not needed anymore.
2025-02-21 21:15:48 +01:00
Jehan
614fdfcd70 app: fix a CRITICAL when cutting when there is a floating layer.
Fixes:

> app/gimp-3.0: Gimp-Core-CRITICAL: gimp_image_remove_layer: assertion 'gimp_item_is_attached (GIMP_ITEM (layer))' failed
2025-02-21 18:45:28 +01:00
Jehan
a435bc98e7 Issue #12851: crashed with seg fault using gimp-edit-cut. 2025-02-21 18:33:56 +01:00
Jehan
543bb374a8 plug-ins: add some better error handling when the docs XML request/parsing fails.
In particular, we don't want to return/store a bogus GimpHelpLocale for
which the parsing actually failed.
2025-02-21 18:33:56 +01:00
Bruno
b36787894f gitlab-ci, build/windows: Take simplier approach on ccache drop
The result is the same but more pleasant to see.
2025-02-20 21:31:06 -03:00
Bruno
cbfd1152ad build/windows: Prettify MSYSTEM_PREFIX condition 2025-02-20 21:30:20 -03:00
Jordi Mas
ca70bce088 Update Catalan translation 2025-02-20 21:48:41 +01:00
Jehan
8c0fdb9cf0 Issue #12825: implement a get_help_id() for GimpGeglProcedure.
This fixes the second part of #12825, which is that the help ID was even
wronger when editing a filter.
2025-02-20 20:21:56 +01:00
Jehan
424ef17bac Issue #12825: new custom GEGL key "gimp:help-id". 2025-02-20 20:21:56 +01:00
Jehan
f2d47e910b plug-ins: try to load the gimp-help.xml file in a thread.
I had a case where the GIO API ended just stuck and never returning.
This API is made to work in a thread so that you can cancel loading URIs
from the main thread. Let's make use of that.
2025-02-20 20:21:56 +01:00
Bruno
87a22a7401 gitlab-ci: Re-order Universal and Windows vars respecting build-time and runtime 2025-02-20 16:12:26 -03:00
Bruno
67827f8597 gitlab-ci: Fix 'apt' warnings on crossbuilds by seting TERM and DEBIAN_FRONTEND
Seems that Debian Testing 'apt' defaults to 'dialog' mode by default, which
produces warnings since the Docker image don't come with 'noninteractive' set.

These warnings are inoffensive but they pollute the job output. Indeed,
they were making some GIMPers a bit worried on IRC.

---

Also, added a comment about why we always use Debian Testing for crossbuilds.
2025-02-20 11:52:15 -03:00
Bruno
d27828c00f build/windows: Improve MSYSTEM_PREFIX AND MINGW_PACKAGE_PREFIX detection 2025-02-20 09:11:57 -03:00
Bruno
693f95a25c build/windows: Detect local MSYS_ROOT with PowerShell wizardry
This is useful only for local runs. There is no registry key on runners.
2025-02-20 09:11:53 -03:00
Bruno
128b0b81cc gitlab-ci: Organize Windows variables puting GIMP_PREFIX on the front
That's how we do in the other platforms.
2025-02-20 09:11:49 -03:00
Bruno
9e8f1b3a38 gitlab-ci, build/windows: Organize MSYS variables naming
Let's call 'C:\msys64' $MSYS_ROOT as vcpkg guys do (since
it is not a prefix, the real MSYS prefix is $MSYS_ROOT/usr)
and call the various shells by MSYSTEM_PREFIX.
2025-02-20 09:11:46 -03:00
Alx Sa
127cd67118 plug-ins: Fix crash when loading CMYK JPEG 2000 images
When converting a CMYK JPEG 2000 image to RGB, we freed
the Key array. Since it is still in use, this caused the
plug-in to crash. This patch replaces this with lowering
the component content and letting the OpenJPEG clean up
process handle this work instead.
2025-02-19 19:00:57 +00:00
Alx Sa
535d0183be core: Data security improvements per Wormnest 2025-02-19 16:47:54 +00:00
Alx Sa
3a01b90c2d core: Add support for uncompressed 16 bit ABR brushes
Some ABR brush files have 16 bit grayscale masks, which fail to load.
This patch adds support for uncompressed versions of these brushes,
based on a provided sample file.
2025-02-19 16:47:54 +00:00
Jordi Mas
421186ecee Update Catalan translation 2025-02-19 07:30:37 +01:00
Jehan
4a1dee4651 plug-ins: improve the progress notification for Script-Fu.
First of all, let's init with the main procedure label (stripped of
leading/traling spaces, of mnemonic underscore and of ellipsis) as
progress status for gimp_progress_init().

Then reuse this main label for all subsequent progress updates by the
same top procedure.

Finally "pulse" the progress at each update to make it more like
progression actually happens.

This is a first experiment to see if not having progress API in
Script-Fu is fine (#12948), by having better progression defaults.
2025-02-18 21:09:22 +01:00
Jehan
9d7bfb4669 Issue #12940: GimpProcedure base class should default to GIMP_PROCEDURE_SENSITIVE_ALWAYS.
Note that I don't touch the GimpFileProcedure and children because they
are special-cased anyway. As for GimpBatchProcedure, ALWAYS is a good
default too.
2025-02-18 16:50:37 +01:00
Bruno
7a2537de9a build/linux : Fix unwanted character in AppImage revisioning
Completing 57e91450
2025-02-17 21:03:58 -03:00
Jehan
9ef88f3c88 app: re-add "gegl:hstack" to blacklist.
This was removed by commit 38b18de709 because this operation doesn't
exist anymore and was replaced years ago. Even though it was not wrong,
let's be over-cautious rather than not enough. What if someone had still
a binary of this old operation lying around?

This doesn't cost much to keep it in the list, so let's just do it (with
a comment to still document it doesn't even exist anymore).
2025-02-17 22:33:38 +01:00
Jehan
f7b0a82cf3 NEWS: update. 2025-02-17 22:28:16 +01:00
Jehan
5861be8d2b plug-ins: support GimpUnit type in Script-Fu.
Since the move of GimpUnit from some weird int/enum mixed type into a
proper object type, this was not usable anymore in Script-Fu.

Functions like (gimp-text-layer-new) were therefore broken. It now works
again.
2025-02-17 22:21:24 +01:00
Jehan
4f44ef6ed1 app, pdb: add parameter validation for (gimp-text-layer-new).
Even though the libgimp wrapper has annotations, it is still possible to
pass a NULL font through, in Script-Fu for instance by not passing all
arguments (and very likely in a plug-in by calling the PDB procedure
directly rather). And unfortunately this would crash GIMP when it tries
to work on the NULL font.

Let's do some sanity check!
2025-02-17 22:21:24 +01:00
Bruno
57e914507d build/linux: Complete AppImage revisioning code
It was first introduced in 131834d3 but was incomplete.
2025-02-17 16:01:23 -03:00
Marco Ciampa
62bd4b30cb Update Italian translation 2025-02-17 16:33:41 +00:00
Bruno
79568e3094 build/windows: Patch only the needed Inno lang files
The previous code was inconditionally patching all the lang files, even
the ones which we don't use. Let's fix that using the "langs*" arrays.
2025-02-17 12:32:31 -03:00
Bruno
27a01b5ca8 build/windows: Supress noisy .gitignore creation on MSIX script 2025-02-17 10:10:24 -03:00
Bruno
5e287e8bbe meson, build: Auto parse full 'config.h' for future-proof scripts
Now, we can use whatever variable we want from 'config.h' with its
value, unlike the previous code which was hardcoded and did not
worked at all for variables with custom values like GIMP_RC_VERSION.

(Note: there are still work to do with Inno scripts)
2025-02-17 09:51:19 -03:00
Danial Behzadi
322002e389 Update Persian translation 2025-02-17 10:10:40 +00:00
Bruno
1473a52704 build/windows: Do revisioning stuff with Inno scripting
Also, fixes CUSTOM_GIMP_VERSION format.
2025-02-16 18:58:11 -03:00
Anders Jonsson
0fa421d874 po: update POTFILES.in 2025-02-16 18:33:33 +01:00
Bruno
fd3fcf68a5 build/linux: Fix 'undefined symbol: gtk_module_display_init' error on AppImage
It was caused by GTK finding host's canberra or others modules, which
is goappimage fault: https://github.com/probonopd/go-appimage/issues/332

This bug will remain if the distro have some uncommon module (e.g.
appmenu, colorreload), since we don't ship them.
2025-02-16 10:49:58 -03:00
Jordi Mas
10e6642786 Update Catalan translation 2025-02-16 07:07:08 +01:00
Jordi Mas
626af9990f Update Catalan translation 2025-02-15 21:57:36 +01:00
Bruno
29209fa219 Issue #12937: Bundle 'gio-launch-desktop' to fix AppImage unable to open links
Closes #12937
2025-02-15 16:57:43 -03:00
Kolbjørn Stuestøl
f6fb61f5fe Update Norwegian Nynorsk translation 2025-02-15 17:39:38 +00:00
Jehan
61f380789e libgimp: all blurbs to GimpProcedure arguments are nullable.
Without this, we cannot set NULL (or equivalent, such as None in Python
3) when calling these functions in bindings.
2025-02-15 17:42:52 +01:00
Jehan
1a794ad77c app, pdb: gimp_text_layer_set_font_size() allows the pixel unit. 2025-02-15 17:42:52 +01:00
Alx Sa
c548ca5dfd core: Display image previews in original format
In 9e8499bb, we forced image and drawable
previews to be 8 bit integer for compatibility.
However, this affects image previews when
in higher precisions, leading to banding
and other conversion issues.
Since the color space invasion, the original
problem should have less of an impact
as GIMP now handles conversions between
profiles much better. Therefore, we will
just grab the existing format for Grayscale
and RGB images, rather than forcing a
precision change to 8 bit.
2025-02-15 15:01:43 +00:00
Bruno
f1f529ce5d build/windows: Fix .gitignore patching done by MSIX script
4b15d3d6 showed that the script was imperfect in that point
2025-02-15 11:44:49 -03:00
Jacob Boerema
e589b8a3da app: blacklist json:dropshadow and json:grey2 gegl ops
As discussed on IRC these ops mostly duplicate other gegl ops and
have some shortcomings: range and gui-range, among other things,
are currently not supported. This causes some issues changing values
of parameters in GIMP, see e.g.
https://gitlab.gnome.org/GNOME/gegl/-/issues/403

Since they bring nothing new, and have issues, we will blacklist them
from the GEGL tools interface in GIMP, at least until they have
better support in GEGL.
2025-02-14 16:13:36 -05:00
Emin Tufan Çetin
173ece82a8 Update Turkish translation 2025-02-14 19:45:14 +00:00
Emin Tufan Çetin
2f850dd9e3 Update Turkish translation 2025-02-14 19:39:22 +00:00
Emin Tufan Çetin
cd220944b3 Update Turkish translation 2025-02-14 19:13:29 +00:00
Jehan
e74759184c app, libgimp: change the default sensitivity mask.
After discussing with NikcDC and Wormnest on IRC, we agreed that maybe a
default of being sensitive when one or more drawables are selected seems
better, since the run() signature now has an array of drawables. So most
plug-in developers will consider the case when there are several
selected drawables as an obvious possible case.

And if someone really doesn't want to handle this case, they can always
set the sensitivity mask explicitly.
2025-02-14 20:08:43 +01:00
Jehan
059e9344a1 app: fix plug-in procedure sensitivity with no image types set.
In particular, when setting a sensitivity mask but no image types, the
procedure was always sensitive.
Also make gimp_plug_in_procedure_get_sensitive() more robust.
2025-02-14 19:52:39 +01:00
Jehan
c4c3a2f25d libgimp: improve annotations. 2025-02-14 19:52:39 +01:00
Jehan
2c3e56a6aa libgimp: fixing annotation formatting.
This is markup format where the asterisk has some special meaning.
2025-02-14 19:52:39 +01:00
Jehan
f1c1a869a9 gimp-data: bump to latest commit. 2025-02-14 19:52:39 +01:00
Jehan
7e7281b888 libgimp: add a links to gimp_main() docs from GIMP_MAIN(). 2025-02-14 19:52:39 +01:00
Alx Sa
0b7123ed2b xcf: Use filter's own mask when loading from XCF
Resolves #12854
Previously when loading filters, we used gimp_drawable_filter_apply ().
If there was also an active selection, it affected the recreation of the filter
and distorted the display.
This patch switches to using gimp_drawable_filter_apply_with_mask () so
that the filter's mask is always used instead, no matter if there is an active
selection or not.
2025-02-14 17:45:05 +00:00
Jacob Boerema
38b18de709 app: add gegl:pack to blacklist (replacement of gegl:hstack)
gegl:pack replaced gegl:hstack almost 5 years ago, but the blacklist
for not showing it in our list of ops in Gegl tool was never updated.

Since Pack is also causing issues in GIMP, see #12890 and #12902,
let's update the blacklist add it there and remove the old gegl:hstack
that has been removed from GEGL.
2025-02-14 11:32:21 -05:00
Bruno
4b15d3d667 .gitignore: Delete last unused exception
Following e653535e

The meson-generated 'compile_commands.json' file added by 793c9588 shows an
assumption that we are building in-source, and assumptions are not welcome in
this general file, according to Jehan comment: !1021 (comment 1801018)
2025-02-14 09:40:44 -03:00
Emin Tufan Çetin
55b05ec32e Update Turkish translation 2025-02-14 12:12:13 +00:00
Bruno
332b07f414 build/windows: Add a bit of verbosity to .appxsym and .msixupload creation 2025-02-14 06:23:16 -03:00
Sabri Ünal
d2b80f7c3e Update Turkish translation 2025-02-14 06:06:53 +00:00
Alx Sa
8d53675d9f libgimp: Convert floating selection to layer on export
On export, when GIMP_EXPORT_CAN_HANDLE_LAYERS is not set
but GIMP_EXPORT_NEEDS_ALPHA is, we merge all layers in the image.
If there's a floating selection however, its attached layer is not included
in the exported image.

This patch converts the floating selection to a regular layer so that both
are included in the final export.
2025-02-14 00:56:22 +00:00
Bruno
3d6a27570f build/windows: Try to fix quasi-msys2 deps download failing like crossroad
Ported from 81db76ea
2025-02-13 19:39:11 -03:00
Bruno
f5088b8915 build/linux: Support 'updateinformation' on AppImage
This makes possible to easily update the .appimage file with
tools compliant with AppImage spec (e.g.: AppImageUpdate)
2025-02-13 16:48:10 -03:00
Bruno
74a05bc967 gitlab-ci: Do not build GEGL workshop for AppImage while we are stable 2025-02-13 14:44:37 -03:00
Bruno
131834d34f build: Get rid of "CI_COMMIT_TAG" in favor of GIMP_* vars from config.h
This makes the scripts more consistent and easier to understand.
2025-02-13 09:24:57 -03:00
Bruno
0c1d11dc86 build: Unify checksumming behavior
As a rule, dist scripts will always output sha-256 and sha-512 sums but
the checksums files will be generated only on releases.
2025-02-13 09:24:19 -03:00
Alx Sa
095727b074 widgets: Prevent rearranging floating selection as filter
While we blocked rearranging a floating selection in the NDE GUI,
we did not add a check to prevent another filter from being moved
into it. Since a floating selection is considered a GimpLayer, applying
GimpDrawableFilter operations to it caused a crash. This patch adds
more safeguards to prevent this.
2025-02-12 19:03:12 +00:00
Jiri Grönroos
0b4eb271d1 Update Finnish translation 2025-02-12 18:20:07 +00:00
Jiri Grönroos
75a3bde06f Update Finnish translation 2025-02-12 17:46:40 +00:00
Rūdolfs Mazurs
395ef3c8cb Update Latvian translation 2025-02-11 19:43:57 +00:00
Kolbjørn Stuestøl
3253d88b8d Update Norwegian Nynorsk translation 2025-02-10 22:04:17 +00:00
Kolbjørn Stuestøl
e43d547755 Update Norwegian Nynorsk translation 2025-02-10 21:59:50 +00:00
Jeremy Bícha
4c63f41517 extensions: remove executable permission from vala file 2025-02-09 21:21:24 -05:00
Jehan
ed243e3829 meson.build: post-release version bump to 3.0.0-RC3+git. 2025-02-10 00:47:18 +01:00
Bruno
c69f050d2c build/windows: Document maintenance of GITLAB_CI's client secret 2025-02-09 18:37:56 -03:00
Bruno
180ec6ad4b Revert "build/windows: Try to diagnose Submission API failure"
This reverts commit 490c8e7dc4.

Actually, I forgot to add 'GITLAB_CI' as an authorized MS Entra app on
Partner Center. So, I just done that and submission from our CI worked.
2025-02-09 18:22:25 -03:00
Bruno
490c8e7dc4 build/windows: Try to diagnose Submission API failure 2025-02-09 17:15:35 -03:00
Jehan
9130eb8152 Release GIMP 3.0.0 RC3. 2025-02-09 19:52:36 +01:00
Jehan
3970300e9e NEWS: update. 2025-02-09 19:52:36 +01:00
Bruno
e496a1ce4f build/linux: Complete 827961ca (regarding CI_COMMIT_TAG check on AppImage) 2025-02-09 15:48:29 -03:00
Jehan
bffe766fc3 Issue #12883: fix incompatible pointer type.
The GimpLayer is a GimpDrawable. Cast it properly for strict compilers.
2025-02-09 19:41:56 +01:00
Jehan
b01ecf80e6 app, libgimp, pdb: allow NULL input drawable to the new crop procedures.
Cropping relatively to the full image contents is a common usage (it is
in fact the "Crop to Content" feature we have in the Image menu) so I
found it a bit frustrating that these 2 functions only allow to crop
relatively to a single drawable.

Therefore, I make NULL an acceptable input which will default to
cropping to the full image content instead.
2025-02-09 19:24:41 +01:00
Jehan
d7b6647647 app, pdb: fix implementation of gimp_image_autocrop_selected_layers()…
… taking into account drawable's offsets.
2025-02-09 18:50:19 +01:00
Jehan
3c21b768c5 app, libgimp, pdb: improve docs and names of autocrop functions.
- Clean up a bit the 2 procedures' descriptions and add more info in
  gimp_image_autocrop() description to explain how the input drawable is
  used.
- Rename gimp_image_autocrop_layer() to gimp_image_autocrop_selected_layers(),
  which makes it clearer.
2025-02-09 18:23:42 +01:00
lloyd konneker
9e2d8e4e16 API: fix #12860 autocrop is internal, not a compatibility plugin
Rename plug_in_compat.pdb to image_autocrop.pdb so we retain commit history.

All procedures defined there are related to autocrop.
   - made internal, not plugins
   - renamed from plug-in- to gimp-image-
   - exposed in libgimp

If we need plugin compatibility PDB group in the future,
a starting template can be recovered from plug_in_compat.pdb 2.10 or late 2.99.

Fixed plugins that call.  The C plugin now calls libgimp instead of a PDB procedure.
2025-02-09 16:51:13 +00:00
Jehan
d5f730d589 desktop: set release date for 3.0.0 RC3. 2025-02-09 17:25:54 +01:00
Jehan
3540cb73c1 gimp-data: fix downgraded gimp-data hash by mistake. 2025-02-09 17:24:29 +01:00
Jehan
0e8bbd6463 NEWS: update. 2025-02-09 17:24:04 +01:00
Bruno
827961cae3 build/linux: Generate checksums for released AppImages
This is used by our release scripts on gimp-web.

Let's not generate for other pipelines, however, since they
don't have long life on GitLab and there is no permalinks yet.
2025-02-09 11:41:47 -03:00
Øyvind Kolås
b32ce25526 meson,app: depend on GEGL-0.4.54 2025-02-09 14:36:06 +01:00
Jehan
a6d269d94f Issue #12875: fix WARNING about gegl:nop not having width and height properties. 2025-02-09 13:25:10 +01:00
Bruno
ca3880b205 build/windows: Add GitLab collapsible section to MSIX submitting
I forgot about it in 9eec33ba
2025-02-09 08:35:36 -03:00
Alx Sa
e58527b8bb plug-ins: Fix bug with pre-OSX ICNS with no masks
The 'ICON' type of ICNS is a 1 bit black and
white image without a mask. The current
code assumes all pre-OSX ICNS types
have a mask, which caused a crash when
we tried to access it. This patch adds an
additional check if the mask type is 0
before trying to access it.
2025-02-09 04:17:15 +00:00
Bruno
9eec33ba13 gitlab-ci, build: Auto send .msixupload to MS Store using Submisison API
Closes #11397

Now, the .msixupload submission will be done from our CI with 'msstore-cli'.

Unfortunately, we can't easily update the changelog due to problems of
Submission API regarding '\b' and '\u0008' backspaces, but it's better to
not have a changelog than to keep using the painfully slow Partner Center.
2025-02-08 22:41:42 -03:00
Jehan
95d47b9390 NEWS: update. 2025-02-09 02:36:47 +01:00
Jehan
ac0a722bf6 Issue #12569: clip issue with new filter API.
It was not a bug per-say. Simply the filters were set as having "clip"
set by default. We should add a libgimp function to let people choose
instead, but I want to think a bit better how we handle clip and masks
in filters before creating more API. Cf. #12874.

So for now, let's just set clip to FALSE. If we have to choose a single
possible clip value for filters made by the libgimp API, I believe this
is the nicer value.
2025-02-09 02:07:08 +01:00
Jacob Boerema
9a2709213d script-fu: use named parameters
Since named parameters were added for script-fu, we get a warning if
we don't use named parameters.
This adds named parameters to GIMP's own scripts.
Incidentally it also fixes an issue with Spinning globe when the
image was not the first one opened in GIMP and changes that script to
the new interface too.
2025-02-09 00:47:29 +00:00
Alx Sa
0b301f2fd0 plug-ins: Support loading ARGB ICNS icons 2025-02-09 00:38:43 +00:00
Jehan
18719a5e90 app: finally fix the crop bug with several filters.
This is a new attempt at fixing the issue with cropped effects when
stacking them. The previous attempt was reverted as commit c1c38228a2.

Instead of trying to find the bounding box for the previous effect's
output, just drop the crop_before node (i.e. make it a "gegl:nop") when
it's not the bottom effect.

I don't think this would create any undesirable behavior. In fact, the
only case which I could think of would be when the previous filter
creates an infinite plane (e.g. "gegl:color"). But when such case
happens, filter_clip is forced to TRUE anyway, which triggers crop_after
to be set. Therefore we don't need a crop_before anyway in this case,
because the previous filter necessarily has a crop_after.
2025-02-09 00:58:42 +01:00
Jehan
f69e98d44f gimp-data: update to latest. 2025-02-09 00:14:33 +01:00
Jehan
3ae90906d9 app: in image graph, only demote data back to storage format after a filter when…
… this filter is meant to be merged.

In commit 2c066afff9, I made so that we had a "gegl:convert-format" only
at the latest filter over a drawable. While this was already a huge
improvement, it was still "too much".

Basically the only time when we want to convert to drawable format
(which means usually demote the output to lower bit depth) is when the
filter was just created and is meant to be merged.

This also means that from now on, during preview time, when checking and
unchecking the "Merge filter" checkbox, the preview may be slightly
different. A very good test to see the difference more obviously would
be with indexed images, because "Merge filter" preview would map to
allowed colors only.
2025-02-09 00:08:54 +01:00
Bruno
57169f32df gitlab-ci: Fix non-triggered AppImage releases 2025-02-08 16:13:10 -03:00
Bruno
85a14735c8 build/windows: 'libiff' is not a direct babl, GEGL or GIMP dependency
Despite what f947109f implies, 'file-iff' plug-in don't link to libiff.
2025-02-08 10:35:33 -03:00
Bruno
6c879b8cb8 build/linux: Only 'Nimbus' and 'StandardSymbols' fonts are needed for WMF
Following e1294fec

This makes the AppImage's WMF bundling consistent with Windows and macOS.
See also: https://github.com/caolanm/libwmf/tree/master/fonts
2025-02-08 09:36:25 -03:00
Alx Sa
2e41fde7b1 plug-ins: Use older ICNS format to export small icons
It has been reported that ipc4, ipc5, and ipc6 type ICNS icons do not render well
when included in an app as part of a bundle.
This patch uses the older is32, il32, and ih32 24-bit RGB formats (with 8 bit masks)
instead of the newer PNG formats for those sized icons, to avoid the issue.
2025-02-08 05:29:46 +00:00
Bruno
5b84d17ec1 gitlab-ci, build/linux: Make AppImage releases
Closes: #7661 (for now)
2025-02-07 15:29:15 -03:00
Alan Mortensen
c62bf0ff69 Update Danish translation 2025-02-07 18:22:07 +00:00
Anders Jonsson
56f05c85d9 app: don't expand file dialog
Fixes #10612
2025-02-07 16:56:07 +00:00
lloyd konneker
cdf7a58dd1 libgimp: GimpFileChooser: fix #12847 inf loop in signal handler 2025-02-07 07:23:42 -05:00
Jacob Boerema
5ea45737e5 app: add separate help ids for View -> Color Management
The help ids for the View Color management commands all pointed to
the same id.
Let's use more specific ids, so that help will arrive at a more
specific location in the manual (once we have added the ids there too).
2025-02-06 15:50:45 -05:00
Jacob Boerema
c31ca5cd4c app: better help ids for soft-proofing related Image commands
The help ids for the Image Color management related to soft-proofing
were all pointing to the View color management submenu.
Let's use more specific ids for the Image menu, so that help will
arrive at a better location in the manual (once we have added the
ids there too).
2025-02-06 11:45:34 -05:00
Bruno
e1294fecc1 build/linux: Bundle PS fonts for WMF support on AppImage 2025-02-06 10:41:44 -03:00
Marco Ciampa
f384280962 Update Italian translation 2025-02-05 19:43:45 +00:00
Marco Ciampa
df12f06a9e Update Italian translation 2025-02-05 19:43:32 +00:00
lloyd konneker
3ee7ca9d56 ScriptFu: delete extra copies of init.scm
Cleanup cruft, unused files.

script-fu/scripts/init/init.scm
is the only copy that GIMP uses.
It is more or less upstream TinyScheme init.scm v1.42,
that K. Cozens occasionally patches with upstream changes.
But upstream has been at 1.42 for several years.

/scripts/script-fu.init is an unused copy of upstream TinyScheme init.scm v1.40
It should have been deleted on the earlier commit
that moved the file in the repo to /scripts/init/init.scm
and the installed init files to /scripts/scriptfu-init.

/tinyscheme/init.scm is an unused copy of upstream TinySche init.scm 1.41
Deleting it means that the tinyscheme dir can no longer be built by itself
into TinyScheme standalone binary, but we don't support that anyway.
2025-02-05 18:49:40 +00:00
Jacob Boerema
af5fc77a24 script-fu: fix crash when incorrectly using named parameters
The array of strings representing the Scheme types wasn't updated
after adding named parameters. This caused a crash when trying to
use named parameters where that isn't possible.
2025-02-05 13:33:46 -05:00
Alx Sa
bcbdf970a6 widgets: Don't check for operation when merging filters
Resolves #12855
Since tool-based filters like Warp Tool do not have operations,
checking them when merging down the active filter stack throws
a CRITICAL. The check was not needed, so it was removed.
2025-02-05 12:58:43 +00:00
lloyd konneker
dd59ee088c ScriptFu: test: add tests of gimp-file- methods and image exporters
Tests API not tested previously.

Tests ScriptFu, and more generally, that GIMP can roundtrip read the files it creates.
2025-02-05 06:58:39 -05:00
Sabri Ünal
ccb4d81ea2 Update Turkish translation 2025-02-04 17:30:49 +00:00
Sabri Ünal
efe839447b Update Turkish translation 2025-02-04 17:28:11 +00:00
Kolbjørn Stuestøl
419ed163ab Update Norwegian Nynorsk translation 2025-02-03 20:58:28 +00:00
Kolbjørn Stuestøl
9353e5f1c4 Update Norwegian Nynorsk translation 2025-02-03 20:54:40 +00:00
lloyd konneker
eaa703b8c8 ScriptFu: test: restore to working condition
After recent changes to API:
  some PDB procs now private
  some PDB procs signature changed, arguments reordered

New testing framework functions: testing:layer-new and testing:layer-new-inserted

No changes except to tests.
2025-02-03 09:19:50 -05:00
Jose Riha
dd1653e0ff Update Slovak translation 2025-02-02 18:39:28 +00:00
Lloyd Konneker
4b71ca6e44 app/plug-in: fix #12711 app hang on MacOS IO event on empty pipe
This is a bandaid for a situation on MacOS.

When plugin facade in core receives IO event on read pipe from
remote plugin process, check the plugin is in a state where
an IO event is expected i.e. sane.
Otherwise, ignore the event and assume the read pipe is empty.
2025-02-02 17:37:17 +00:00
Anders Jonsson
fee4b3f8bb script-fu: fix limit in bump-map calls
Clothify calls gegl:bump-map which has lower limit 0.5 for
elevation, so use the same limit in the plug-in.
2025-02-02 11:59:51 +01:00
Anders Jonsson
f715b54015 script-fu: fix modulo error in Waves plug-in
Resolves #12844

As suggested by Alx Sa, rounding the phase argument in waves-anim
is enough to fix the argument error the plug-in would run into when
using certain values for "Number of frames".
2025-02-01 22:31:41 +01:00
Nathan Follens
dd8da1e26f Update Dutch translation 2025-02-01 15:20:21 +00:00
Nathan Follens
c293704aad Update Dutch translation 2025-02-01 15:20:08 +00:00
Nathan Follens
e004841f01 Update Dutch translation 2025-02-01 15:19:55 +00:00
Nathan Follens
33c7325712 Update Dutch translation 2025-02-01 15:19:43 +00:00
Nathan Follens
eb08ca2f38 Update Dutch translation 2025-02-01 15:15:00 +00:00
Alan Mortensen
ecf33b8113 Update Danish translation 2025-02-01 14:59:51 +00:00
Alx Sa
dccc473eb4 script-fu: Update plug-in call to use vectors
Resolves #12842.
Due to API changes, the call to plug-in-animationoptimize in burn-in.scm
requires a vector to be sent rather than an individual layer. This affected the
script when "Prepare for GIF" was selected.
Therefore, the blended-layer argument was converted to a vector.
2025-02-01 14:30:39 +00:00
Alx Sa
7d363d125f python: Use context Palette/Gradient in GUI
Interactive scripts should use the context
palette or gradient rather than the saved
one, as the user is more likely wanting to
edit the gradient or palette they have
actively selected. This is also in line with
how 2.10 operated.
This patch clears out the palette or
gradient property of Python scripts
when the GUI is created, so that it
uses the context version. It does not
affect non-interactive usage.
2025-02-01 02:59:51 +00:00
Alx Sa
553aacbb19 actions: Add timestamp to default performance log filename
ISO 8601 basic format was used for standardization. Windows
does not support colons in filenames, so the more human-readable
extended format could not be used.
2025-01-31 03:46:41 +00:00
Hugo Carvalho
70a065eada Update Portuguese translation 2025-01-31 01:01:55 +00:00
Alx Sa
ebc4a245e4 python: Fix Autoslice in Sort Palette after Color Space Invasion
Resolves #12827.
The Autoslice option was not updated to expect GeglColors instead of GimpRGB
arrays after the Color Space invasion. This patch updates the find_index() and
hexcolor() functions accordingly.
2025-01-30 01:52:26 +00:00
Nathan Follens
f8cc2ff416 Update Dutch translation 2025-01-29 23:37:18 +00:00
Nathan Follens
e154267462 Update Dutch translation 2025-01-29 23:36:59 +00:00
Anders Jonsson
255e942087 python, libgimp: rename gimp_palette_entry_[gs]et_*()
Followup to 151cb9c40c
to make the palette offset and sort scripts work again.
2025-01-29 21:02:22 +01:00
Daniel Novomeský
29c9747222 plug-ins: simplify JXL export options
CMYK is saved with lossless compression. Lossy CMYK is
not recommended by libjxl developers.

libjxl API allows possibility to use lossy compression in original
profile but the compression in this combination of settings
is ineffective, with visible artifacts and discouraged
by libjxl developers. We removed this option.
2025-01-29 14:43:33 +00:00
Alx Sa
1bbf9518de themes: Explicitly define spinbutton and combobox hover colors
Resolves #12821.
GimpSpinButtons (CSS spinbutton class) did not inherit the hover colors of
other buttons, so they did not highlight when hovered over. While comboboxes
mostly did inherit, there were a few odd instances where they were not in the
same hierarchy as other elements with hover colors defined. This patch defines
both explicitly to prevent one-off issues.
2025-01-29 14:40:13 +00:00
Hugo Carvalho
5d241d39e0 Update Portuguese translation 2025-01-28 22:09:03 +00:00
Hugo Carvalho
3ae4db9e71 Update Portuguese translation 2025-01-28 22:06:05 +00:00
Hugo Carvalho
5b791691f5 Update Portuguese translation 2025-01-28 22:03:09 +00:00
Hugo Carvalho
b197cc08f2 Update Portuguese translation 2025-01-28 22:00:14 +00:00
Hugo Carvalho
7c9d1ac6e5 Update Portuguese translation 2025-01-28 21:54:55 +00:00
James Addison
f1ee6bf1ab .gitlab: omit Container Registry note in Merge Request template 2025-01-28 10:15:09 +00:00
Jordi Mas
b504ed47ac Update Catalan translation 2025-01-28 11:03:41 +01:00
Jehan
ccdb73d804 README: update. 2025-01-27 22:12:28 +01:00
Jehan
50a248d54e INSTALL, meson: update a bit installation docs. 2025-01-27 22:10:35 +01:00
Alan Mortensen
1b34a13535 Update Danish translation 2025-01-27 18:09:30 +00:00
Jehan
68947df3f1 desktop: AppStream update. 2025-01-27 17:50:39 +01:00
Jehan
1980dcd0bc NEWS: update. 2025-01-27 17:45:45 +01:00
Jehan
679220d8f5 Issue #12568: support GIMP's GEGL operations with a custom config argument…
… in new filter API.
2025-01-27 16:34:11 +01:00
lloyd konneker
79b200335c ScriptFu: interpreter: fix #12810
Interpreter should not override GimpPlugin.set_i18n,
so that translations are found in the interpreted plugin's directory.
2025-01-27 11:45:26 +00:00
Alx Sa
952da49058 widgets: Commit GEGL-based tools before merging
In the initial NDE implementation, we
prevented merging filters if the Warp, Cage,
or Gradient Tool were active to prevent
active tool-based filters from crashing
when cleared.

This patch removes this limitation by
automatically committing the tool before
merging the rest of the filter stack.
This applies the tool-based filter correctly
and then merges the rest of the filter
stack as normal.
2025-01-27 05:42:41 +00:00
Alx Sa
af4bf60477 core, tools, widget: Lock filters when editing
When editing a filter, the NDE UI is set to
insensitive so they can't be deleted.
However, closing and reopening the
popover re-enables the options.

This patch adds a new "temporary" boolean
to GimpDrawableFilter. It is only set to
TRUE if the filter is a temporary "editing"
filter. When we reopen the NDE UI, this
checks if the filter stack contains a
temporary filter, and if so, once again locks
the options.
2025-01-27 05:15:12 +00:00
Jehan
a353618d53 libgimp: make sure alignment and margin are same for all argument labels.
While fixing individual widget's labels to have proper default is good,
let's also have a centralized re-setting of alignment and margins for
all the labels which we set in the same GtkSizeGroup. This makes nice
and consistent dialogs.

Additionally I set a 4px margin at the end of label (0 elsewhere),
otherwise the longer label in the size group end up sticking too close
to its control widget and it's ugly.
2025-01-26 21:29:21 +01:00
Jehan
dd15b6a9a3 libgimpwidgets: GimpFileChooser should also be start-aligned. 2025-01-26 21:17:33 +01:00
Jehan
995329ac25 Issue #11261: unify argument widget alignment. 2025-01-26 21:10:29 +01:00
Bruno
4464537a38 build/linux: Do not distribute 'gegl-imgcmp' on Flatpak nightly
Similarly to 188deedb
2025-01-26 16:22:52 -03:00
Bruno
f61b98dd98 build/linux: Complete c45a4eed (regarding cfitsio update) 2025-01-26 14:46:12 -03:00
Bruno
188deedb98 build/windows: Bundle only 'gegl', not 'gegl-imgcmp'
'gegl-imgcmp' seems to be used only for ninja tests.
2025-01-26 14:37:33 -03:00
Jehan
10808f2830 libgimp, plug-ins: create automatically a GimpFileChooser for GimpParamSpecFile arguments.
This new widget is much nicer, with proper label to document the GUI and
also with support to save files or create folders. It also has mnemonic
support and the label is put into the same size group as other so that
it's nicely aligned.

As a consequence, I remove bad support of object arguments with a GFile
value. People should just create proper GimpParamSpecFile arguments
(also GimpProcedure API now has a function only for such type of file
argument).

I also remove gimp_procedure_dialog_get_file_chooser() which was only
useful when we didn't know what action a file argument was for. Now it's
part of the param spec definition.

libscriptfu was updated too because SF-DIRNAME arguments don't need
special casing anymore.

Finally I change gradients-save-as-css to just make use of the new
automatic widget creation (more than 60 lines of plug-in code replaced
by… 0 lines because it's automatic!).

This whole commit is mostly a lot of code removal now that we have
proper automatization for file arguments! \o/
2025-01-26 18:13:55 +01:00
Jehan
db2d3cffa2 libgimpwidgets: new GimpFileChooser widget.
This widget will replace our usage of GtkFileChooserButton, except that
it has a title label and also it contains GUI implementation for the
SAVE and CREATE_FOLDER actions (unlike the GTK button). Moreover this
widget was removed in GTK4. So it is a good idea to start encapsulating
such GTK widget anyway.

I'm also adding a propwidget function to create such a widget bound to a
GimpParamSpecFile property.

New functions:

- gimp_file_chooser_get_action
- gimp_file_chooser_get_file
- gimp_file_chooser_get_label
- gimp_file_chooser_get_label_widget
- gimp_file_chooser_get_title
- gimp_file_chooser_get_type
- gimp_file_chooser_new
- gimp_file_chooser_set_action
- gimp_file_chooser_set_file
- gimp_file_chooser_set_label
- gimp_file_chooser_set_title
- gimp_prop_file_chooser_new
2025-01-26 18:13:55 +01:00
Jehan
ed0d528bdc libgimpbase: add gimp_param_spec_file_set_action().
Ability to change a file param spec action will be useful in the next
commit.
2025-01-26 18:13:55 +01:00
Bruno
ec4fee282a build/windows: Check for 'sudo' mode when MSIX script is run targeting WACK
https://github.com/microsoft/sudo/issues/108
2025-01-26 11:36:51 -03:00
Bruno
94938affe6 gitlab-ci: Fix custom Windows pipelines being interrupted
This was a regression introduced by 3da281c4
2025-01-25 22:21:53 -03:00
Bruno
c45a4eed48 build/linux: Update cfitsio module to 4.5.0 preparing to RC3 2025-01-25 22:13:06 -03:00
Bruno
1c00380f56 build/linux: Workaround go-appimagetool failing to find 'file' util 2025-01-25 22:03:34 -03:00
Bruno
8e6e3546a2 gitlab-ci: Do not download 'deps-debian-x64' artifact on plugin tests
babl and gegl binaries are already present on 'gimp-debian-x64' artifact
2025-01-25 22:02:35 -03:00
Bruno
4065d92972 build/windows: Fix wrong prefix of exiv2 and gexiv2 headers 2025-01-25 19:06:45 -03:00
Bruno
7b11fe8dba build: Include all headers for use of gimptool 2025-01-25 19:03:55 -03:00
Bruno
c0cd664fdd gitlab-ci: 'libtool' is not a direct GIMP dependency 2025-01-25 18:57:46 -03:00
Alx Sa
0097d34a8f libgimpwidgets, plug-in: Reduce height of Load PDF dialog
This patch does the following to reduce the
height of the Load PDF GUI:
* Hides the title label if the PDF does not
have a title.
* Reduce the padding around elements
* Reduces the requested height of the
GimpPageSelector widget.
* Alter the GimpPageSelector widget so
that the layer/image combobox and the
range entry are on the same line.
2025-01-25 17:27:55 +00:00
Jehan
fa16da8ef0 NEWS: update. 2025-01-25 16:49:03 +01:00
Jehan
094414186b libgimp: also hide structs for GimpParamSpec(Display|Drawable|Image|Item).
New libgimp functions:

- gimp_param_spec_display_none_allowed()
- gimp_param_spec_drawable_filter_none_allowed()
- gimp_param_spec_image_none_allowed()
- gimp_param_spec_item_none_allowed()

I believe that now all param spec strucs which needed to be hidden are
effectively hidden!
2025-01-25 16:42:26 +01:00
Bruno
ae6ab8bc57 gitlab-ci: Move global variables to '.default' hidden job
This makes easier to understand and maintain the default job settings.
2025-01-25 11:01:34 -03:00
Bruno
0fbfc16da2 gitlab-ci: Organize Debian x64 and AppImage sections 2025-01-25 10:22:38 -03:00
Bruno
6a57853f7c gitlab-ci: Remove redundant 'needs'
Now, by default, jobs do not depend on any job and
will only depend when expressely configured to.
This reduces some some few lines of redundancy.
2025-01-25 09:44:19 -03:00
Alexander Shopov
edbbb60ea3 Update Bulgarian translation 2025-01-25 11:02:13 +00:00
Jehan
b1acb256e1 libgimp*, plug-ins: now hide GimpParamSpecChoice struct.
New libgimpbase functions:

- gimp_param_spec_choice_get_choice
- gimp_param_spec_choice_get_default

Now the only GParamSpec in libgimpbase whose struct is visible is
GimpParamSpecObject. This can't change since it is derived into param
specs defined in libgimp and therefore needs to be visible.
2025-01-25 01:28:19 +01:00
Jehan
080b09bb96 libgimp*: GimpParamSpecValueArray struct also hidden away!
New libgimpbase function: gimp_param_spec_value_array_get_element_spec()
2025-01-25 01:28:19 +01:00
Jehan
f09d97b9a5 app, libgimp*: GimpParamSpecCoreObjectArray struct hidden too.
New libgimpbase function: gimp_param_spec_core_object_array_get_object_type()
2025-01-25 01:28:19 +01:00
Bruno
b51f2b5252 gitlab-ci, build: Give up of build caching (ccache)
Actually it does more harm than good on CI, causing inconsistency and work.

The plan was to use it in all jobs but it is simply impossible for Flatpak
(https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/1502)
and seems that for Crossbuilds too (tested both crossroad and quasi-msys2).
Actually, only Windows jobs can use it, but started to fail on x86 runners.

On the other hand, sometimes the build is faster without ccache and we do
not have the burden of contacting managers etc. Just pkg caching is fine.
2025-01-24 21:04:35 -03:00
Jehan
6e777c861b app, app, libgimp*: hide struct for several GParamSpec based off GimpParamSpecObject.
As a consequence, here are needed new functions:

* libgimp:
  - gimp_param_spec_resource_defaults_to_context()
  - gimp_param_spec_resource_none_allowed()

* libgimpbase:
  - gimp_param_spec_file_get_action()
  - gimp_param_spec_file_none_allowed()
  - gimp_param_spec_unit_percent_allowed()
  - gimp_param_spec_unit_pixel_allowed()
2025-01-24 23:44:43 +01:00
Jehan
40aa78ac10 libgimp: add support for GimpParamSpecUnit to gimp_procedure_dialog_get_widget(). 2025-01-24 22:09:40 +01:00
Jehan
23c9503bfa app, libgimp, libgimpbase: use GimpParamSpecObject infrastructure for…
… GimpParamSpecUnit's default value.

When I reparented GimpParamSpecUnit to GimpParamSpecObject in commit
ba3da3d338, I clearly forgot to get rid of the redundant default value.
2025-01-24 22:06:56 +01:00
Jehan
af53dfab75 Issue #12722: force-query when system language change was not working with LANGUAGE.
It was working with LC_ALL or LANG but not with LANGUAGE which is an
additional system above the locale system AFAIU.
Concatenating both LANGUAGE environment variable and the locale-set
language, we get a more resilient opaque string value to compare.
2025-01-24 20:54:44 +01:00
Alx Sa
4ceec875c9 script-fu: Fix parameter typo in chrome-it.scm
Resolved by @Nizhile
In 4bdb8792, a patch porting chrome-it.scm to not rely on
removed brushes included an apparent typo. A decimal
was left off a curve point, resulting in incorrect outcomes.
This patch by @Nizhile fixes the problem.
2025-01-24 13:26:51 +00:00
Alx Sa
eb8076526d python: Update Spyro-Plus after GEGL Color update
Resolves #12795
After the Color Space Invasion, gimp_gradient_get_uniform_samples ()
returns an array of GeglColors rather than GimpRGB values and a status
variable. This patch fixes the Spyro-Plus plug-in to expects the new
return values.
It also restores code that utilized the second color gradient in the output
when the Gradient's Repeat Mode is Triangular Wave. This appears to
have been lost during the port from GIMP 2.10.
2025-01-24 02:51:34 +00:00
Jehan
bb2181b194 NEWS: update. 2025-01-23 23:53:28 +01:00
Jehan
6cc7d90744 libgimpbase: add a values_cmp() implementation for GimpParamSpecFile.
Without a proper way to compare GFile, gimp_config_reset_properties()
does not reset the config argument to default. This breaks the "Reset to
Factory Defaults" feature in particular.
2025-01-23 23:36:34 +01:00
Jehan
cb9227a6a1 libgimp: do not call gimp_procedure_dialog_get_file_chooser() from within…
… gimp_procedure_dialog_get_widget().
2025-01-23 23:36:34 +01:00
Jehan
3115d97248 libgimpwidgets: fix crashing prop file chooser button with GFile arg.
This same widget is used for GFile args and GimpParamSpecConfigPath
specs. The latter are string-based. So we need different code to handle
both types of arguments.

This was crashing when a change was coming from the config object,
rather than from the GUI, such as when doing a reset to factory values.
2025-01-23 23:36:34 +01:00
Nathan Follens
f4f68c686f Update Dutch translation 2025-01-23 20:06:51 +00:00
Nathan Follens
2e2c672544 Update Dutch translation 2025-01-23 20:00:54 +00:00
Bruno
a2cb96c250 build/windows: Comment situation of some versioning code on Installer .ps1 2025-01-23 16:53:20 -03:00
Jehan
042d3051c6 app, libgimpbase: do not try to open a non existing file.
Now that GimpParamSpecFile makes file validation depending on the action
set in the param spec, when trying to open a non-existing file (which
can happen through GUI, for instance when opening through the Document
History dockable or Open Recent menu), we had a quite obscure error
about a value "out of range" used "for argument 'file' (#2, type
GFile)", which is because core tried to set the GFile for a non-existing
file into the second parameter of the plug-in PDB. This is not a very
nice error for end-users.

The old error was much nicer as it used to say things like:

> Could not open '/path/not/existing.png' for reading: No such file or directory

But in fact, this string came from the plug-in, which means:

* first that the error can be different depending on the format
  (inconsistency of error message);
* depending on bugs in plug-ins, it may just crash or return no error
  messages;
* finally we were making a useless call to a load plug-in while we
  should already know from core that it won't work.

The new message is something like:

> Error when getting information for file "/path/not/existing.png: No such file or directory

This error is generated by core, so it will always be consistently the
same, is understandable too and the plug-in won't even be called.

As a side related fix, I updated the GimpParamSpecFile validation to
only validate local files, just like we do in core. Remote files can
always be set (and we let plug-ins handle them), at least for the time
being.
2025-01-23 20:04:54 +01:00
Bruno
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
Alan Mortensen
7f3741957e Update Danish translation 2025-01-23 16:26:55 +00:00
Alan Mortensen
7ad02976c4 Update Danish translation 2025-01-23 16:24:21 +00:00
Bruno
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
Bruno
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
Bruno
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
Jehan
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
Bruno
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
Jehan
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
Alx Sa
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
Jehan
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
Kolbjørn Stuestøl
c975c1d19b Update Norwegian Nynorsk translation 2025-01-22 18:30:57 +00:00
Kolbjørn Stuestøl
915be5ce33 Update Norwegian Nynorsk translation 2025-01-22 18:28:30 +00:00
Jacob Boerema
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
Jacob Boerema
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
Bruno
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
Jehan
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
Alx Sa
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
Jehan
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
Alx Sa
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
Jehan
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
Jacob Boerema
66aacf9633 plug-ins: add support for loading 16-bit per channel LAB psd's 2025-01-21 19:28:25 +00:00
Alx Sa
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
Jehan
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
Kolbjørn Stuestøl
f98c9a851b Update Norwegian Nynorsk translation 2025-01-21 15:52:35 +00:00
Kolbjørn Stuestøl
a2a6bda810 Update Norwegian Nynorsk translation 2025-01-21 15:51:56 +00:00
Kolbjørn Stuestøl
adef456236 Update Norwegian Nynorsk translation 2025-01-21 15:48:15 +00:00
Jehan
6726372464 Issue #12729: copy-paste into a path is lost. 2025-01-21 15:15:07 +01:00
Jehan
9f204e7441 Issue #12772: fix annotations. 2025-01-21 15:04:34 +01:00
lillolollo
efdd0b76ef plug-ins: Remove unused variables in Gradient Flare 2025-01-21 01:51:19 -05:00
Jehan
2b8c4ff0de NEWS: update. 2025-01-20 22:45:30 +01:00
Jehan
18d88c207c app, libgimp, pdb, plug-ins: PDB (gimp-group-layer-new) made public. 2025-01-20 22:38:01 +01:00
Jehan
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
Jacob Boerema
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
Jacob Boerema
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
Jehan
65635e8a0c app, libgimp, pdb: also get rid of gimp_text_layer_new() wrapper.
See previous commit.
2025-01-20 20:55:48 +01:00
Jehan
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
Jehan
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
Alx Sa
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
Alx Sa
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
Jehan
6e3c60dd66 Issue #12760: make the metadata PDB arguments public. 2025-01-20 17:58:30 +01:00
Jehan
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
Bruno
beecc7b723 gimp-data: Update to have proper Installer right-top icon size 2025-01-20 13:01:27 -03:00
Jehan
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
Jehan
6a85288723 NEWS: update. 2025-01-20 01:09:01 +01:00
Jehan
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
Jehan
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
Jehan
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
Bruno
b53d88a6ac gimp-data: New Installer assets size 2025-01-19 16:58:40 -03:00
Alx Sa
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
Bruno
99fa22939a Issue #12424: properly disable gjs requirement at build time 2025-01-19 11:35:36 -03:00
Bruno
6b13a9fff2 build/linux: Fix dangling "gimp-console*" and "gimptool*" symlinks on Flatpak
Ported from: 323972fdf5
2025-01-17 16:20:00 -03:00
Alx Sa
0a94d27bef themes: Additional system theme leak fixes
While testing an AppImage, I noticed a thick border around the
"Show All Files" in the File Open dialogue. This is because the
background color for the actionbar is not defined, and if the internal
padding is increased by the system theme, it's visible. Therefore
we define the color.

I also noticed that the GtkSwitch had a rectangle border rather than
a rounded one. This patch defines the border radius as well.
2025-01-17 16:47:30 +00:00
Bruno
44c0fc2bfd build/windows: Move 'toolchain' to unified deps list
'toolchain' package is out of the list since the earlier days of the
unified deps list (5f164ef9) to not break commands of crossroads
(https://gitlab.freedesktop.org/crossroad/crossroad/-/issues/3)
and quasi-msys2 (https://github.com/HolyBlackCat/quasi-msys2/issues/30)

Both do not support package groups, but there is a better workaround.
2025-01-16 19:02:47 -03:00
Bruno
744c022791 build/windows: MSYS2/Cygwin 'base-devel' is not needed
Our Windows builds are MinGW oriented
2025-01-16 18:44:43 -03:00
Bruno
c39600fcf0 build/windows: Build vanilla babl
babl docs building doesn't fail with Clang at all (ce57e91e).
2025-01-16 18:37:20 -03:00
Bruno
046d79c227 build/windows: 'gpgv' is a quasi-msys2 dependency
See: https://github.com/HolyBlackCat/quasi-msys2/issues/31

As I thought in b6fb472a and 41b3dfb7, this is mostly related to apt.
2025-01-16 06:14:04 -03:00
Bruno
ef8dedd109 build/linux: Complete d479eab2 (regarding Lua for AppImage) 2025-01-15 21:53:00 -03:00
Bruno
d479eab25e build/linux: Add Lua support to AppImage (but not enable it, see 78665ca3)
This is one of the last pending items on GNOME/gimp!1440 checklist.
It took time because LUA_CPATH and LUA_PATH are exotic and Lua docs not good.
2025-01-15 21:21:48 -03:00
Jehan
14cb6451dd Issue #12308: [macOS] dockable dialogues disabled on Windows menu.
Using the app. prefix/group for the top menu works better for the
GIMP_GTK_MENUBAR variant of the menubar (which is what is used on macOS
to get the macOS-style menu).

The whole action group code should be reviewed and straightened up
eventually!
2025-01-15 23:46:31 +01:00
Jacob Boerema
6b10cce682 app, libgimpbase: add creation date/time metadata...
when creating a new image.

We add a new function `gimp_metadata_set_creation_date` to
`libgimpbase/gimpmetadata` to handle setting all relevant
metadata tags.

We add a local function `gimp_image_new_add_creation_metadata` to
add the creation date metadata to relevant functions that create
new images.
We write tags for both the creation date and several modified dates
for IPTC, XMP and Exif metadata. All these use different ways to
express date/time and timezones and I can already see we need to have
another look at other places where we handle modified dates.

This solves the second part of #7287, adding metadata about the
date/time a new image was created.
2025-01-15 16:54:22 -05:00
Jacob Boerema
4ff4ce2870 app: fix #7287 failure to save metadata when creating a new image
When starting from an image we created in GIMP, saving/exporting with
metadata and/or thumbnail (thumbnails are part of the exif metadata)
failed, because our metadata was not initialized for newly created
images.

To fix this, create a metadata object in `gimp_create_image`, that way
when creating a new image in the gui, but also when creating an
image programmatically, gets metadata attached at the start.

We need to do that here, because we need to have metadata available
even for images that we import that do not have metadata attached.
2025-01-15 16:54:21 -05:00
Jehan
f373186dfd app: fix a crash when closing an image.
A flush happens when closing image displays, and with the idle code, it
means that the actual flush may happen once the image is already freed.

When I was saying that multi-threading is always full of surprises…
2025-01-15 18:43:36 +01:00
lloyd konneker
a00fee46af libgimp: fix #12631 set can_recurse on watch on msgs from core
So plugins don't block on second wire msgs for callbacks from remote
core chooser dialogs.
Makes libgimp/plug-in more similar to core/plug-in
2025-01-15 17:20:05 +00:00
Jehan
b931f177d3 desktop: prepare RC3 AppStream metadata. 2025-01-15 17:22:02 +01:00
Jehan
de0c08ace8 NEWS: new section for 3.0.0 RC3.
It became clear we need a RC3, mainly for 3 reasons (ordered with first
ones being more serious issues) for which I think more testing would be
better:

1. The changes in the image graph, regarding filters (#12614), and
   possibly more than I am thinking of doing before RC3.
2. The change in multi-threading code for paint (#11389). I want to be
   sure not to create new crashes (multi-threading is always full of
   surprises!).
3. The change to a central plug-in API implementation (!2058) and I want
   to make sure it doesn't bite us back with more testing (though it is
   only for persistent plug-ins so it is fortunately not touching every
   plug-in).
2025-01-15 16:59:50 +01:00
Jehan
c237b12d12 Issue #11389: crash when using layer auto-expansion.
The fix is basically to make gimp_projection_flush() thread-safe, so
that it can be called from any thread.

The actual rendering was actually already run in the main thread since
it was in an idle function, but update_region could be touched both from
the main thread and another thread (e.g. the "paint" thread). An
alternative could have been to put some mutex to protect usage, but then
I realized that iter variable was also to be protected, and there was
some code where I am unsure if we had to protect larger parts of code
(in particular with gimp_projection_projectable_bounds_changed() which
was touching update region through gimp_projection_chunk_render_stop()
then directly). The nice headaches of multi-threading!

Moving the whole actual logic of gimp_projection_flush() in the main
thread seems much more robust and maintainable.
2025-01-15 13:07:17 +01:00
Jehan
0c7168bf32 Issue #12732: fix "libxml2 error: unterminated entity reference" errors.
xgettext changed its default behavior since version 0.23 regarding
escaping of special characters into XML entities. Now we need to change
the gt:escapeRule value, differently depending on xgettext version (it
will fail in both cases with the wrong value, except the "wrong" value
is the opposite before and after).
2025-01-15 11:09:00 +00:00
Bruno
41b3dfb70f Revert "gitlab-ci, build/windows: Try to fix Debian Testing 'apt'"
This reverts commit b6fb472ae2.

We need to always have apt output since Debian Testing is tricky.
2025-01-15 06:20:25 -03:00
Jehan
135935c448 Revert "Issue #7539: Opening some images lock GIMP."
This reverts commit 9b94e347bc.

I leave a comment though, because we are not 100% sure that the issue is
gone. In fact, the upstream report is still opened.

The good point is that on stable code, we only debug crashes by default,
while the specific hang we had was happening with debugging metadata
warnings. So hopefully we won't have random people reporting GIMP
hanging (only people explicitly trying to help debugging GIMP).
2025-01-15 01:48:02 +01:00
Bruno
b6fb472ae2 gitlab-ci, build/windows: Try to fix Debian Testing 'apt' 2025-01-14 21:44:54 -03:00
Jehan
728b9cdd28 Issue #12707: CRITICAL on choosing gimp-drawable-filter-update. 2025-01-14 17:58:40 +01:00
Rodrigo Lledó
f75f585ed3 Update Spanish translation 2025-01-14 13:29:39 +00:00
Bruno
9600f3cc68 build/windows: Remove unneeded line on crossbuild script 2025-01-14 07:58:46 -03:00
Luming Zh
493fdce6ce Update Chinese (China) translation 2025-01-14 06:54:37 +00:00
Alx Sa
150f3a3274 dialogs: Don't show Releases Notes if none exist
If the generated `gimp_welcome_dialog_n_items` variable
is 0, there are no release notes to show (likely because
this is a development version). Therefore, we don't create
the Release Notes tab in the Welcome Dialogue.
2025-01-14 04:02:56 +00:00
cheesequake
84e58c5704 widgets: Confirm color map selection before...
...trying to get index.
When changing images or detaching a Colormap dockable,
we may temporarily not have a selection when the GUI
actions update. This patch adds a check to confirm we
have a valid selection before trying to get an index
from it.
2025-01-14 03:01:14 +00:00
Jehan
4448b1054a plug-ins: remove GIMP_PARAM_NO_VALIDATE for resource arguments.
We validate arguments for a reason. This special flag must only be used
in special cases (when it's harder/not possible or not implemented yet
to validate properly).

In fact #12039 would have been much simpler to diagnose and debug if
this flag had not been there from the start, because we would have had
an error earlier, on core side, which we could have traced back much
more simply!
2025-01-14 00:49:33 +01:00
Jehan
d42c76cf09 Issue #12039: do not set NULL to the first non-standard plug-in arg.
We had special code to pass around a special config object for some
filters but it was just looking if this first "non-standard" (after run
mode, image, drawables…) was an object and inserting the settings
object, which turns out to be NULL in most case (except for these
special filters from the filters_settings_actions list).

This is not right, first because we may override the default value in
such case, second because, even if this arg may be overrided later
depending on run mode, it is possible that this random other
(non-config) argument may not even allow NULL to begin with. This was
what was happening in #12039.
2025-01-14 00:13:21 +01:00
Rupert
e51b84e77b Issue #12717: file-bmp plugin broke cross-build with generated source
- build 'generate-huffman' natively when cross-building
- also reenable build of file-bmp for cross-builds
2025-01-13 22:36:41 +00:00
Jehan
51e719191d Issue #12712: non-configured filter throws CRITICAL when updating. 2025-01-13 20:08:16 +01:00
Bruno
40d38b0f9f gitlab-ci: Remove very obscure 'hicolor-icon-theme' dependency
GIMP have its own hicolor in 'share/gimp/*/icons/hicolor' since 2.99.2.

Removing that package made no difference to the resulting AppImage and
I could not find any indication on our tracker about its necessity.
2025-01-13 09:37:21 -03:00
Jehan
210ec64283 app: merging all filters should use the filter stack render.
Committing every filter one by one had the same drawback as in #12614,
and as destructive effects in general: you have to go back to source
storage precision after every layer. This really shows its limits when
this precision is low (8-bit per component) and/or when the TRC loses
even more data (linear TRC in 8-bit is usually not a good idea) as shown
in the report.
So instead, use the render of the last active filter directly and switch
the drawable's buffer with it.
2025-01-12 22:18:28 +01:00
Jehan
a3a7fb0983 app: make sure that reordering filters sync formats.
Otherwise when reordering but also when undoing (which does a reorder),
the applicator's convert nodes are not properly set.
2025-01-12 22:18:28 +01:00
Jehan
2c066afff9 Issue #12614: Successive layer effects should use a higher bit-depth as intermediary format.
While it's normal to be limited to the storage precision at drawable
level, we want to have as high precision as possible during processing.

Two pieces of code were problematic in this regard:

1. GimpApplicator had a "gegl:convert-format" node which was converting
   back to storage format after every effect. Instead only set this node
   after the last effect.
2. "gimp:mask-components" operation was working with the input format.
   Let's change this to work with the higher precision when comparing
   input and aux format (typically when aux was the output of a previous
   filter, now that we didn't convert format back to storage precision,
   the aux precision may be bigger).
2025-01-12 22:18:28 +01:00
Ekaterine Papava
bd4530e580 Update Georgian translation 2025-01-12 19:51:00 +00:00
Alx Sa
54405ddd0f libgimp: Respect alpha setting in color widgets
When creating a color widget in GimpProcedureDialog, we
were not taking into account whether the parameter's
has_alpha boolean was set to FALSE. As a result, all color
widgets allowed for transparency.

This patch checks if the GimpColor's GParamSpec has_alpha value
is FALSE, and if so, sets the color widget's type to
GIMP_COLOR_AREA_FLAT to enforce no transparency for that color.
2025-01-12 19:10:27 +00:00
Alx Sa
2dd55d117c core: Don't assume filter has single operation
Resolves #12719 and #12721
In b78f3dad, we assume that a filter is being created for a
single operation. However, certain tools like Bucket Fill might
pass a GEGL Graph node instead. This causes the call to
gegl_node_get_gegl_operation () to return NULL, which then
crashes when we attempt to get the Operation Class.
This path verifies that we have a single operation before
attempting to go further with getting its class.
2025-01-12 13:42:42 +00:00
Bruno
d4a7175a0f build/windows: Crossbuilds are back and with UCRT (thanks to 'quasi-msys2')
Fixes: #11756

Context: Debian Bookworm only have GCC that links to MSVCRT C library.
Actually, crossroads is failing on our CI probably due to GCC-MSVCRT.
On Debian, there is GCC-UCRT too but it is marked as Experimental and
crossroad does not support it nor Clang-UCRT yet: GNOME/gimp!1860.

Some people reported crossroad working with GCC-MSVCRT in Fedora but
adding a brand new pipeline would be at least suboptimal to mantain.

So, we are temporarely moving from crossroad to quasi-msys2 project which
have UCRT support for both GCC and Clang (it takes compiler resources from
MSYS2). The compilers itself we will take from Debian Testing for parity
(they are standard GCC and Clang with proper CFLAGS set by quasi-msys2).
We may go back to Crossroad when it has UCRT support like quasi-msys2.
2025-01-11 18:32:39 -03:00
Alx Sa
b78f3dadc6 core, pdb, xcf: Only load explicitly set filter names
We always save the filter name in XCFs,
even if the user did not intentionally set
it. This means that "default" names like
Gaussian Blur are not translated when
saved and loaded in XCFs.

This patch adds a new property,
"custom-name", to GimpDrawableFilter.
It is FALSE by default, and only set to
TRUE if the user provides a custom filter
name (currently only possible in the
public filter API). Based off this value,
we either use the saved filter name or
get it from the operation when saving and
loading a filter from the XCF.
2025-01-11 21:28:41 +00:00
Alx Sa
73f30b0dc6 plug-ins: Import DDS BC7 compression
This patch adds support for importing DDS images
with BC7 compression. The implementation references
ImageMagick's method.
2025-01-11 16:51:09 +00:00
lloyd konneker
994aa79724 ScriptFu: tests: test DrawableFilter class and its use sequences
No changes except to tests.
2025-01-11 10:07:40 -05:00
Alx Sa
c9ccb77287 themes: Define background-image for entry and switch
Resolves #12682
Some system themes add a gradient background-image to
text input and toggle widgets. On dark theme, this can
make the text unreadable if the background-image is a similar
color. This patch defines the background-image as none, to
prevent the system theme from leaking in.
2025-01-11 13:55:59 +00:00
Alan Mortensen
8953232359 Update Danish translation 2025-01-11 09:46:54 +00:00
Ngọc Quân Trần
04e1f830a7 Update Vietnamese translation 2025-01-11 06:44:14 +00:00
Jehan
d8a8d2f138 app: the "color-options-expanded" filter option is now bogus.
I missed this together with commit c3ef79b3ef. It's of no use now.
2025-01-10 23:43:31 +01:00
Jehan
bc3b6e5927 app: do not migrate option (filter-tool-show-color-options). 2025-01-10 23:26:11 +01:00
Jehan
c3ef79b3ef Issue #12577: get rid of the gamma hack.
What it was doing was casting the input buffer to another TRC, basically
pretending the data was what it was not. In particular, it was casting
linear input buffers to non-linear and all other TRCs to linear.

As was noted in #1958, this was in fact a useful trick, yet it's still a
trick. Basically when it's needed, it's either:

1. because the operation implementation does not work in the technically
   correct space. Then the operation code should be fixed;
2. or because several work TRC are valid, then an option should be
   proposed by the operation;
3. or for artistic reasons, which people are free to implement as
   plug-ins or third-party filters, but it should not be a core GIMP
   feature.

Therefore for most cases where it felt needed, the real solution will be
to improve the operations' implementations.
2025-01-10 23:26:11 +01:00
Jacob Boerema
496b390724 app: add help-ids to the vector tool path actions
These were missing help ids and don't have tooltips either, while some
of these actions may not be clear to end users what they do.

This will allow us to have context sensitive help about these commands
in the manual.
2025-01-10 13:52:49 -05:00
Jehan
6f197416ec libgimp: switch the relative path to full path.
Without this, the relative path alone was not working fine, likely
because current working directory is not the plug-in dir.
2025-01-10 18:59:37 +01:00
Jehan
49e2abd9ad Issue #12326: Bug in locale directory checking in gimpplugin.c. 2025-01-10 18:43:31 +01:00
Jehan
df6d9b63f7 app: fix localization of plug-ins on Linux.
This regression was added with MR !1551 (commit 7ccfad1716).
Localization was still working fine on the main processus, which made
the problem less obvious. But every plug-in would output such an error
on start:

> (border-average:257681): Gtk-WARNING **: 17:22:17.640: Locale not supported by C library.
> 	Using the fallback 'C' locale.

And the localization was indeed not working.
Apparently having a properly qualified locale, with both region and
encoding (e.g. "fr_FR.UTF-8") is fine, but any other contents was
breaking the whole locale.

Since it seems that this issue doesn't happen on Windows at all, let's
just not set LANG, except on Windows.
2025-01-10 18:43:31 +01:00
Jacob Boerema
473d07d364 plug-ins, exr: ensure dimensions are not outside our limits...
when loading an exr image.
While looking at the openexr fuzzed images I noticed we do not check
whether height or width are larger than our maximum.

Although this was caught in libgimp when trying to create the image,
let's add checks in the exr plug-in itself.
2025-01-09 18:32:50 -05:00
Rupert
565ead32b8 plug-ins: bmp import - simplify dest/offset handling
the offset to the dest buffer passed to the line-reading functions
wasn't counting bytes but items/values, which was slightly confusing.
Changed to not pass the offset at all, but rather a pointer to the
start of a line inside the buffer.
Also made rowstride count bytes, not values.
Made dest and rowstride local vars, as they are not used anywhere else.
2025-01-09 23:04:02 +00:00
Rupert
373f4821c3 plug-ins: bmp import - explicitly include RLE24 when setting channels...
...and precision
2025-01-09 23:04:02 +00:00
Rupert
71205f5b4e plug-ins: bmp import - height check was missing ABS()
bmp height can be negative
2025-01-09 23:04:02 +00:00
Rupert
b702a8b5c5 plug-ins: bmp import - move set_default_masks() next to other mask funcs 2025-01-09 23:04:02 +00:00
Rupert
8ffa8d1c98 plug-ins: bmp import - simplify digest_masks() 2025-01-09 23:04:02 +00:00
Rupert
d48ce04291 plug-ins: bmp import - add/clarify some comments 2025-01-09 23:04:02 +00:00
Rupert
5db4955d4d plug-ins: bmp import - rename rowbytes -> bytes_per_row
variable with identical purpose had different names in import and
export plug-in.
2025-01-09 23:04:02 +00:00
Rupert
1164b0baf8 plug-ins: bmp import - check compression type for 64bit bmps
BI_RGB is the only valid compression type for 64-bit bmps
2025-01-09 23:04:02 +00:00
Rupert
c3b391a319 plug-ins: bmp import - call digest_masks() only when needed 2025-01-09 23:04:02 +00:00
Rupert
df4d741275 plug-ins: bmp import - don't double-check eof
Removed unnecessary if(!eof) -- it's already part of the loop
condition.
2025-01-09 23:04:02 +00:00
lloyd konneker
8f1be83840 ScriptFu: tests: revise for recent changes to API circa 3.0rc2
No changes except to tests.

Mostly minor, except major changes to testing calls to gegl filters.
2025-01-09 16:43:48 -05:00
lloyd konneker
b14b17fa53 ScriptFu: fix relay error when marshalling args
Broken in previous commit to this file.
An error return from script_fu_marshal_arg_to_value must be relayed.
2025-01-09 16:43:48 -05:00
lloyd konneker
54a53ae8b7 ScriptFu: tests: fix tests broken between 2.99 and 3.0rc2
No changes other than to test framework and tests.
2025-01-09 16:43:48 -05:00
Yuri Chornoivan
ff192d25d3 Update Ukrainian translation 2025-01-09 21:38:41 +00:00
Alan Mortensen
d41ab22493 Update Danish translation 2025-01-09 15:53:20 +00:00
Alexander Shopov
967e099026 Update Bulgarian translation 2025-01-09 08:59:23 +00:00
Alexander Shopov
6a36278ad3 Update Bulgarian translation 2025-01-09 08:57:16 +00:00
Alexander Shopov
6def179174 Update Bulgarian translation 2025-01-09 08:56:51 +00:00
Martin
fc2c768f66 Update Slovenian translation 2025-01-08 21:14:10 +00:00
Jacob Boerema
9df18cb217 plug-ins, dds: fix #12660 failure to load certain DDS images...
that were written by older versions of GIMP.

The improved DDS reader that we got a year ago, caused us to be more
strict in determining what exact DDS format we are loading.

This causes failure in reading certain DDS images exported by older
versions of GIMP.

1. Both the A8 and A8L8 formats as written by GIMP, also wrote 0xff
in the masks of the green and blue channels, which should have been
set to 0, since they are unused. Because of this, they were not
recognized anymore by our import routine.

2. When the source layer didn't have an alpha channel, the BGR8 format
wrote a 24-bit format, which doesn't have any official representation
(only RGB8 exists). This also caused our import routine to fail for
this kind of image.

After updating our export in previous commits, this commit adjusts our
import routines to recognize and correctly load these images.
2025-01-08 14:26:26 -05:00
Jacob Boerema
6447add47b plug-ins, dds: export BGR8 as D3DFMT_X8B8G8R8
When the source image/layer didn't have an alpha channel, we were
exporting BGR8 as 24-bit B8G8R8, which is not an official D3D DDS
format.

For compatibility with other programs using DDS, let's instead use
D3DFMT_X8B8G8R8 which is 32-bit with the alpha channel being
ignored/set to 0.

See issue #12660 for more details.
2025-01-08 14:26:25 -05:00
Jacob Boerema
a427dcdf4d plug-ins, dds: incorrect flags when exporting to l8 and l8a8 formats.
When exporting a dds with types l8 or l8a8 we were also setting the
green and blue masks to 0xff instead of using 0 (since these channels
are not used for these formats).
See issue #12660

Set these channel masks to 0 to be more conforming to dds standards
and update our plug-in revision.
2025-01-08 14:26:25 -05:00
Bruno
be83d5aed5 gitlab-ci: Make Debian Docker image version easier to change and branch-aware
This is needed otherwise if we have a branch that relies on Debian testing and
other that relies on Debian stable their images would mix in the actual status.
2025-01-08 16:22:05 -03:00
Jacob Boerema
e5b35622d6 plug-ins, exr: fix #12340 crash on loading unsupported exr type
When trying to load an exr type that GIMP can't handle we threw an
exception causing a crash of the plug-in.

This isn't very user friendly, so change this to show a less
disruptive error message that we can't load the image.
Removed "for reading" from the existing error message to better reflect
that it isn't necessarily always a problem reading the file.
2025-01-08 18:20:06 +00:00
Jacob Boerema
f3d6c9326f image loading plug-in tests: add cmyk pam tests 2025-01-08 13:15:56 -05:00
Thomas Manni
43639e99fd app/widgets: do not use a reference to the active image in GimpColorFrame
...but use a signal handler for GimpImage::disconnect instead.

Fixes #12453
2025-01-08 17:23:16 +01:00
Anders Jonsson
efbf084e3a Update Swedish translation 2025-01-08 15:56:09 +00:00
lloyd konneker
fb3f8e7fe6 libgimp: fix #12494
Change the message for debugging proxy refs: say "DEBUG" instead of "ERROR".

This doesn't fix any logic.
The logic produces a spurious error msg often, scaring users.
The debug message can be seen and analyzed by devs.

Add a comment about what object proxies are normally reffed:
defaults for formal args of temporary procedures kept by persistent plugins.
2025-01-08 08:11:59 -05:00
lloyd konneker
caf007b22c ScriptFu: fix #12696 improper reffing of object proxies
For old-style scripts calling script-fu-register.

Test case Demo>Clothify v2
2025-01-08 08:11:59 -05:00
lloyd konneker
3c197d9578 ScriptFu: scripts: fix two test scripts affected by changes to object array in PDB API 2025-01-08 12:00:59 +00:00
Alx Sa
1beb1f7464 core: Prevent crash when multiple channels are copied
Currently, we do not handle copying multiple channels.
The function call returns NULL but does not set an error
message - this causes a crash when we try to print out
error->message.
This patch changes the g_return_val_if_fail () call to an
IF statement, so that we can initialize the error object
with a message to prevent the crash.
2025-01-08 02:01:28 +00:00
Jehan
a1e346b3a3 Issue #12671: 'libarchive' dependency is undeclared on INSTALL file. 2025-01-07 19:27:59 +01:00
Jehan
5b07268c24 Issue 12672: 'json-glib' is undeclared in INSTALL file. 2025-01-07 19:24:55 +01:00
Jehan
3362b52e0c devel-docs: use the devel logo for API docs.
Also depends on gimp-data, so I bump it, which brings as well some RTL
icon fixing.
2025-01-07 17:49:16 +01:00
Jehan
4e57e7b4ea Issue #12641: Help>About GIMP dialog does not show an update in 3.0 RC1.
RC numbering was not taken into account for version comparison.
2025-01-07 17:10:57 +01:00
Jehan
33ab56f554 Issue #12640: crash on font not found.
pango_context_load_font() can return NULL.
2025-01-07 12:57:44 +01:00
Bruno
8556db2759 build/windows: Do not build GEGL workshop while we are stable
Jehan and Pippin told me that this should not be enabled in stable releases, so
I am manually disabling this targeting the upcoming 3.0.
2025-01-07 08:45:50 -03:00
Alexander Shopov
9cdf8f4eb2 Update Bulgarian translation 2025-01-07 06:45:25 +00:00
Thomas Manni
c434fe8be8 Issue #12411: manage filters undo when deleting/cutting a layer
Push a filter remove undo for each filter when their layer is deleted or cut.
2025-01-07 06:01:09 +00:00
Jehan
7694b1dc04 Issue #12640: run in-build GIMP binary through a debugger when gdb is available.
It is not in fact a fix for #12640, only an improvement to our build
script, wrapping our calls to GIMP executables and outputting a
backtrace on a crash. This way, when people report issues during one of
the relevant calls, we may be able to diagnose.

It won't be useful for other types of failures (when the process doesn't
crash, but e.g. the script is wrong or other non-fatal bugs in GIMP).
2025-01-06 21:09:37 +01:00
Bruno
d58fe9e329 gitlab-ci: Explicitly install 'libarchive'
See: #12671
2025-01-06 16:12:05 -03:00
Alx Sa
59953205f8 themes: Define popover button padding
The padding for image buttons on popovers like the layer lock
options was not defined. On system themes which set this padding
to 0px, it made it difficult to tell if the alpha lock was enabled
or not. This patch defines the padding to prevent this issue.
2025-01-06 08:50:07 -05:00
Jordi Mas
485e6811f5 Update Catalan translation 2025-01-06 14:07:07 +01:00
Danial Behzadi
382bdb0a26 Update Persian translation 2025-01-06 13:06:05 +00:00
Bruno
47f4f78212 build/windows: 'vala' is a build-time only dependency
Following 68fad1e0
2025-01-06 07:42:42 -03:00
Bruno
68fad1e04b build/windows: Separate build-time deps from the others in all-deps-uni.txt
Similarly to f4ba4d97
2025-01-06 07:36:32 -03:00
Bruno
5aeb38b521 build/windows: 'shared-mime-info' is not a direct babl, GEGL or GIMP dependency
It is a remnant of the time we custom builded GTK (c59c93cd),
not being needed for icon generation on Windows at all (6126437a).
2025-01-05 19:50:15 -03:00
Rupert
84a501f516 clang-format update
- Add Alignment for bitfields.
- BreakBefore*Operators: adhere to GIMP Coding Style.
- Align... AcrossComments: allows section comments in long lists w/o
  disturbing alignment (e.g. the struct at top of bmp-load.c). Alignment
  can still be reset with a newline.
2025-01-05 13:27:47 +01:00
Bruno
841a30bed1 build/linux: Exit AppImage script if no 'config.h' file is present 2025-01-05 08:44:33 -03:00
Bruno
dfd4563e25 build/windows: Explicitly install 'libtiff'
Following f881408e

Also, remove old transitional package from Debian deps list.
2025-01-04 21:52:30 -03:00
Bruno
f881408e5f build/windows: Explicitly install 'librsvg'
Similarly to 9d133add, it is listed on INSTALL but not on this deps list.
2025-01-04 21:35:31 -03:00
Bruno
f4ba4d97d5 gitlab-ci: Separate build-time dependencies from the others in Dockerfile
This concept (taken from Arch PKGBUILD files) makes easier to understand and
mantain our naturally enormous dependencies list.
2025-01-04 19:48:47 -03:00
Bruno
00deb38ef8 build/windows: 'brotli' is not a direct babl, GEGL or GIMP dependency
This is a remnant from time we builded libjxl manually (e43743e0).
We can just omit it that pacman will install anyway due to libjxl.
2025-01-04 17:02:38 -03:00
Bruno
fb8f16d68e build/windows: Do not install 'lensfun' for obscure/broken gegl:lens-correct
It's very unclear who and when added that package to the deps list and if
it is needed to we bundle something more than the library (share/lensfun?).

Indeed, that GEGL op is reported to not work properly as a tool (2ba36733) and
have severe UX problems (#4695), being impossible to use even as experimental.
So, let's not install it to not bloat GIMP installation with not used code.
2025-01-04 16:25:28 -03:00
Bruno
29b2195751 build/windows: 'json-c' is not a direct babl, GEGL or GIMP dependency
This seems to be a remnant of the time we custom builded libmypaint.

According to my tests, removing it from the list do not break build,
after all pacman auto installs it for being a libmypaint dependency.
2025-01-04 16:09:07 -03:00
Alx Sa
5e3047c70d core: Apply noninteractive filters direct to drawable
When the user checks "Merge Filters" on interactive filters,
we move the filter to the bottom of the stack so it applies
directly onto the drawable (instead of merging the entire filter
stack).
However, we did not do this reordering for non-interactive filters,
resulting in incorrect output. This patch applies the same logic
so that when you apply a filter like Invert, it affects the drawable
only and does not cause problems for any existing NDE filters.
2025-01-04 19:04:11 +00:00
Lukas Oberhuber
65d4ec7ea4 macos: Open files from finder fixing #12603 #12465 #12439
Needs to be tested on MacOS below 15 (Sonoma)
2025-01-04 18:23:50 +00:00
Bruno
36d6217a56 Issue #4251: GIMP does not depend on 'dbus-glib' for over 10 years 2025-01-04 14:50:50 -03:00
Alexander Shopov
4c6ca3ef1a Update Bulgarian translation 2025-01-04 17:50:11 +00:00
Alexander Shopov
2b89dfd3ac Update Bulgarian translation 2025-01-04 17:48:35 +00:00
Bruno
d2babbcfaf gitlab-ci: Do not install 'xz-utils' in build-oriented Docker image
To contextualize: before, we used the custom Docker image for every
little thing (e.g. to compress docs), like firing a cannon at ants.

But this was changed, this "dep" is not needed since 876c709a.
2025-01-04 14:36:59 -03:00
Bruno
1c1b110b14 gitlab-ci: Install 'libgs10' (since Debian 12), not 'ghostscript' pkg
According to my tests in our AppImage, 'libgs10' is enough. Indeed,
we use the Ghostscript library for over ten years (see 005b119f) so
there is no need to install 'ghostscript' package (which is bin-oriented).
2025-01-04 13:28:28 -03:00
Daniele Forsi
994137a82e Fix spelling errors found with codespell 2025-01-04 15:11:03 +00:00
Bruno
1a1c52d0ba gitlab-ci: GIMP does not depend on 'libexif' for over 10 years
See: 21bed1e2

I double checked AppImage and Windows bundles and that
dependency is indeed not present since nothing links to it.
2025-01-04 11:21:54 -03:00
Bruno
f0598e34e6 gitlab-ci: Drop !reference workaround wrongly used for rules
We started to use !reference to rules as a workaround in a22393a6 to
merging rules with 'extends:', which isn't possible due to YAML spec:
https://gitlab.com/gitlab-org/gitlab/-/issues/213050

But simple extending, without merging, is totally supported by GitLab.
So let's clean our .yml since that workaround is needed in few places.
2025-01-04 09:57:49 -03:00
Asier Sarasua Garmendia
10ccaf0743 Update Basque translation 2025-01-04 09:31:30 +00:00
Asier Sarasua Garmendia
e268e18c50 Update Basque translation 2025-01-04 09:31:15 +00:00
Asier Sarasua Garmendia
4f00c0621f Update Basque translation 2025-01-04 09:30:56 +00:00
Asier Sarasua Garmendia
5cc9a389cd Update Basque translation 2025-01-04 09:30:38 +00:00
Alx Sa
86861952aa dialogs: Add Help buttons to About/Tips/Welcome dialogs
The About, Tips, and Welcome dialogues had Help IDs created,
but they were not being used on the dialogues themselves. This
meant there was no help button, and pressing F1 did not pull up
the help manual when pressed.
To be consistent, the Help ID was added to the gimp_dialog_new ()
calls for Tips and Welcome. Since About is not based on GimpDialog,
this patch adds it manually (after checking to make sure the user
has enabled help buttons in Preferences).
This patch also constrains the Tip dialogue's initial width to match
the About and Welcome dialogues.
2025-01-04 02:11:18 +00:00
Bruno
3da281c468 gitlab-ci, build/windows: Move Windows jobs to 'matrix'
This facilitate maintenance work and further vcpkg integration.
2025-01-03 21:12:50 -03:00
Bruno
4ec84dd157 build/windows: Complete 89cc3503 (regarding python.exe) 2025-01-03 20:13:13 -03:00
Jiri Grönroos
d661c23eb2 Update Finnish translation 2025-01-03 17:32:22 +00:00
Alx Sa
0243cf5c08 dialogs: Show icons in Tips Dialog on Windows
The Previous and Next buttons have arrow icons. However, these
have not shown up on Windows since at least 2.10, as buttons
created with gtk_dialog_add_button () don't automatically make
their icons visible on all platforms.
This patch uses the existing "image" variable to store the icon
rather than passing it inline in gtk_button_set_image ().
This allows us to explicitly set it to be visible so it shows for
all users.
2025-01-03 02:50:21 +00:00
Bruno
8fbd6727ac gitlab-ci: Revamp introductory comments to give a complete picture of pipelines
Our CI is complex, and while I and the maintainers know how it works by heart,
it can be very difficult for the others to understand it from the comments of
the .yml file. So, let's unify three separate sections into one for better QOL.
2025-01-02 19:50:14 -03:00
Bruno
5e606bb580 build/linux: Like other dist scripts, do not try to build in AppImage .sh
This is a remnant of the past, not needed since 46f716a0 organization.
2025-01-02 14:51:55 -03:00
Bruno
3c97048b3a build/windows: Complete b8ac9da4 (regarding strong bezel drop)
The previous commit only works if the user clicks on "Customize" button.
So, this commit extends to the case of cliking on "Install".
2025-01-02 13:27:29 -03:00
Alx Sa
d80ccb08d8 plug-ins: Include filters when composing
Since we use gimp_drawable_get_buffer () to get the
pixel data when composing or recomposing, NDE filters
were not being included in the final output.
This patch temporarily duplicates the layer, merges the
filters, and then retrieves the GeglBuffer from the merged
version of the layer rather than the raw pixels.
2025-01-01 21:26:09 -05:00
Bruno
01ce43d94b build/linux: Sync with Beta manifest regarding OpenMP and libbacktrace
11d009928e

30d588c455
2025-01-01 21:29:30 -03:00
Bruno
3fc06f06b6 build/linux: Make AppImage .desktop and appdata.xml configuration not scattered 2025-01-01 15:19:19 -03:00
Alx Sa
03b6e5fe16 themes: Define color for tree dnd borders
This patch adds CSS styling to define the color of the
underline/overline when dragging an item in a layer tree.
This prevents a system theme leak and keeps the color consistent
with the current theme's coloring.
2025-01-01 17:01:36 +00:00
Bruno
31218e69da build/windows: Never auto create bundles on Win vanilla builds
Partially reverts change described in paragraph 2 of 9ab48164

Despite GIMP being built targeting to be relocatable, our
bundling script is very SLOW and pretty hard to make it
portable since it makes many ASSUMPTIONS (e.g. that all
deps are pre-compiled etc) which not always holds up.

These limitations could be fixed but would take time.
This was disrupting MSYS2 and crossroads builds, so
let's revert it being called by default for now.
2025-01-01 11:59:04 -03:00
Ngọc Quân Trần
306c01328e Update Vietnamese translation 2025-01-01 01:27:22 +00:00
Ngọc Quân Trần
42fc499992 Update Vietnamese translation 2025-01-01 01:26:17 +00:00
Bruno
d04bfe964f build/linux: Complete 37b7b8f7 (regarding appstreamcli) 2024-12-31 14:17:28 -03:00
Bruno
37b7b8f7a4 build/linux: Do not copy additional .desktop file in AppDir root
We can just make a symlink that appimaged (the daemon for integration) will
read it and work just fine.

Also, run appstreamcli validation again.
2024-12-31 12:22:26 -03:00
Bruno
e32cf624a4 build/linux: Sync with Beta flatpak regarding updated modules for RC2
See: 17144650cd
2024-12-31 10:36:54 -03:00
Bruno
de37e08109 build/windows: Always bundle gspawn*-console.exe (for gimp*.exe --verbose)
Without this, it is not possible to open links when
running gimp*.exe --verbose
2024-12-30 21:08:05 -03:00
Bruno
89cc350348 build/windows: Bundle python.exe even on stable versions (for gimp-console)
This is needed for scripting output with 'gimp-console*.exe', which is
included in stable versions (but the user needs to change the .interp).

The need to manually change the .interp is ugly as hell (specially for
system-wide .exe installer and MSIX package) but a separate issue.
2024-12-30 17:32:25 -03:00
Alx Sa
f8436b67cf python: Fix function API in Palette-to-Gradient
We were still calling palette.entry_get_color () rather than the new API
palette.get_colors(), which returns the full array of colors. 
This patch updates the script to use the correct API.
2024-12-30 17:55:51 +00:00
Bruno
64481569c0 build/windows: Make (even more) clear how Inno langs maintenance works
Inno langs maintenance is semi-automatic since 21ffb589 and 4ec072ed

Right now, seems that everyone understands it, but who knows in the future?
So, just to make sure, being overly cautious, let's add one nice comment.
2024-12-30 11:42:27 -03:00
Bruno
1e37822533 build/windows: Fix 'revision 2' being shown in 'RC 2' MSIX About dialog
Following 9d9d7226
2024-12-30 08:45:21 -03:00
Jehan
d62dfc052b Issue #2037: make Pango and GExiv2 public dependencies in pkg-config.
Both these libs are exposed in the API and therefore should be set as
"Requires".
2024-12-30 10:41:07 +01:00
Alan Mortensen
61fb345ab6 Update Danish translation 2024-12-30 09:29:42 +00:00
Alan Mortensen
afd3d53f66 Update Danish translation 2024-12-30 09:29:09 +00:00
Alan Mortensen
00a0caf14a Update Danish translation 2024-12-30 09:28:35 +00:00
Bruno
739c613fe2 build/linux: Bundle "share/libthai" on AppImage too
Following 4cbb9360

Most of the distros provides the dictionary pre-installed but
some like Gentoo not. So, let's bundle "share/libthai" for
maximum portability.
2024-12-29 21:26:23 -03:00
Rupert
91f7331125 libgimp: imagemetadata-save - static assert expr. not constant
Fixes #12588. depending on build parameters, the strlen()s weren't
necessarily considered constant.
Changed to use arrays + sizeof instead.
2024-12-29 22:01:30 +00:00
Alexander Shopov
7177268d44 Update Bulgarian translation 2024-12-29 20:46:00 +00:00
Bruno
4cbb93609d build/windows: Bundle 'libthai' again for Thai (th) word breaking support
The only trace of reason for this dir being bundled was a pango crash: #2496.
Since the crash was gone, no other reason left, so it was discarded: c808d13b.

However, according to my tests, "word breaking" does not work without this.
(This is what thbrk.c#L22 source says but was never clear in our scripts).
So, let's bundle it with proper comments to make clear why this is needed.
2024-12-29 09:57:37 -03:00
Bruno
3d4ca10ba2 build/linux: Ensure the same type2-runtime is used for aarch64 and x86_64
The previous code left open a tiny possibility of a different runtime be
downloaded between the 5-6s of squashing of aarch64 and x86_64 appimage.
2024-12-29 08:36:00 -03:00
Alexander Shopov
e61be5de64 Update Bulgarian translation 2024-12-29 10:20:31 +00:00
Jacob Boerema
b150a4ea27 build installer: Swedish is now an official language in Innosetup 2024-12-28 18:54:53 -05:00
Alx Sa
c6d38fa551 plug-ins: Don't use compose-type on Recompose
Resolves #12623
Compose and Recompose are in the same plug-in.
When we converted compose.c to use GimpChoice in 7b29ac24,
we did so without checking if it was being called by
Compose or Recompose. As a result, we always overwrote
compose_type with 0 (RGB mode) on Recompose since it
did not have a "compose-type" GimpChoice property.

This patch adds a check to make sure we're not in a Recompose
call before trying to set compose_type from the GimpChoice
parameter.
2024-12-28 14:52:46 +00:00
Jehan
5434fb6e30 meson.build: post-release version bump to 3.0.0-RC2+git. 2024-12-27 22:51:50 +01:00
Bruno
541e7446ce build/windows: Bundle correct gspawn*.exe for stable releases
Following a4d2fbc9
2024-12-27 15:38:32 -03:00
Jehan
cdac2cd1fe NEWS: updates. 2024-12-27 15:21:42 +01:00
Jehan
03e9fbbd92 gitlab, meson, plug-ins: add a -Dfile-plug-ins-test meson option.
This option is run by the CI and makes so that the test-file-plug-ins
plug-in is always installed in the CI, even on stable releases. But by
default, they are not installed on stable releases.
2024-12-27 15:15:25 +01:00
Jehan
d52117a7f7 Release GIMP 3.0.0 RC2. 2024-12-27 14:34:56 +01:00
Jehan
921f8a0676 desktop: update AppStream metadata release date. 2024-12-27 12:18:29 +01:00
Øyvind Kolås
e7149ab200 build,app: depend on gegl-0.4.52 2024-12-27 10:25:42 +01:00
Bruno
f9cb8ba69f build/linux: Revert APPIMAGETOOL_APP_NAME change from 522b9ced
It was changed to "GIMP-continuous-ARCH.AppImage" because
I had hope of linking GitLab artifacts on gimp-web (which failed)
so let's use "GIMP-GIMP_VERSION-ARCH.AppImage" again.

Also, uppercase AppId 'Continuous' suffix to be consistent with Flatpak.
2024-12-26 19:49:34 -03:00
Alexander Shopov
eb3455ff2c Update Bulgarian translation 2024-12-26 20:52:16 +00:00
Alexander Shopov
d1cb6a7eff Update Bulgarian translation 2024-12-26 20:34:29 +00:00
Alexander Shopov
e1fbc0a787 Update Bulgarian translation 2024-12-26 20:29:32 +00:00
Alx Sa
201ab6ff7a actions: Add new Navigation dockable icons
This patch connects the new icons made by Denis Rangelov
for the Shrink Wrap and Fill Window zoom actions in the
Navigation Dockable.
2024-12-26 17:00:17 +00:00
Jehan
bfe842cd1d Issue #12359: encoding conversion undo does not undo the mask conversion.
In particular, we could end up with mask of wrong bytes per pixel, which
was what was happening in the report.

This commit adds a new GimpDrawableFilterMask class because we needed to
implement a specific is_attached() method for effect masks.

Note: the file is added to POTFILES but the only localized string
already existed elsewhere. So this doesn't break string freeze.
2024-12-26 15:55:05 +01:00
Andre Klapper
a6fdc51178 Correct help ID for GEGL graph dialog
Fix the mismatch between the ID in gimp-help and the ID in gimp.

Followup to c3bd2d368a

Fixes #12613
2024-12-26 12:51:29 +01:00
Alan Mortensen
bc6062c75a Update Danish translation 2024-12-26 08:33:13 +00:00
Bruno
6f03dd47aa gitlab-ci: Set CCACHE_MAX_SIZE to 0.25GB for deps and 0.75 for gimp
Without this change, we could be using 5GB per job, which
makes the ccache too old so kills its purpose. Also, if
we consider the pipeline it could reach 10GB per runner.

So, let's limit the 'deps' jobs to 256MB, which should be
enough considering my tests and babl and GEGL coding pacing.
GIMP, however, needed way more in my tests, so I set 768MB.
2024-12-25 13:05:19 -03:00
Alan Mortensen
8780834442 Update Danish translation 2024-12-25 14:45:02 +00:00
Bruno
46f716a0a3 gitlab-ci, build: Make 'aarch64' AppImage too
Partially reverts e01973b9

This makes the AppImage .sh script multiarch aware and
make Debian pipeline a GL 'matrix' for easier maintenance.

As consequence, making an arm64 .appimage is pretty easy now,
so let's make one since this arch is not that rare in Linux.
2024-12-24 14:28:28 -03:00
Jehan
461d5db07e NEWS: update. 2024-12-23 16:20:03 +01:00
Jehan
61abcd7412 libgimp, plug-ins: update gimp_drawable_append_new_filter() signature.
Adding the mode and opacity arguments makes it very similar to
gimp_drawable_merge_new_filter() signature, but also to its own
Script-fu wrapper (gimp-drawable-append-new-filter).

It's just better to be consistent. Also if either of these args need to
be changed immediately afterwards, then we spare one additional
re-render for nothing (for instance in the PSD load plug-in!).
2024-12-23 15:35:10 +01:00
Alx Sa
d46607f281 plug-ins: Load legacy Color Overlay layer style
This patch loads legacy 'sofi' data, which represents
the original Color Overlay layer style. It also sets up
the ability to add the other legacy layer styles once
we've matched the right GEGL operations and properties.
Note that this can not read the modern descriptor format
for layer styles.
2024-12-23 14:16:35 +00:00
Bruno
08019d95df build/windows: Default to user-mode install (recommended since Windows 7)
See: https://learn.microsoft.com/en-us/windows/win32/shell/app-registration#using-the-app-paths-subkey

Starting with Windows 7, Microsoft "strongly" recommends to install per user.
This still applies today for Windows 10: per-user is the default for our
MSIX installed from MS Store and for our .exe installer obtained by winget.

Note: this commit just change the "(recommended)" option in an Inno dialog.
Users can install GIMP in system-wide (admin mode) as always, nothing changed.
2024-12-22 11:51:25 -03:00
Jehan
d20cfa1124 app: salvage XCF with broken filters.
This is not a fix for #12359 yet, but an improvement to XCF loading.
When filters fail to load for any reason, we should still load the
layer. Only drop the broken filter.
2024-12-22 14:31:55 +01:00
Jehan
59d65818ce Issue #12292: image remains in memory after closing view.
I've tested lightly this removal. I don't think this code was really
needed or logical anyway, though maybe I am missing something because I
barely discover the existence of this "Image Selection" feature of dock
windows!
2024-12-22 00:19:08 +01:00
Alx Sa
aad2a5967e xcf: Don't try to deserialize an empty GimpConfig string
When loading a GimpConfig property for a filter, we assumed that
the string is always valid. This patch adds code to check if we read
in the string correctly - if we didn't (or if it was tampered with), we
don't try to deserialize an empty string.
2024-12-21 17:40:50 +00:00
Jehan
4b582bdba8 Issue #12573: Color Picker selects the wrong color on indexed images.
The code to retrieve the alpha-variant of the indexed palette was wrong,
and therefore babl was creating a brand-new palette fornat. Not sure if
the palette was empty, or was random or anything. It's even weird it
even produced somewhat resembling colors.
2024-12-21 12:57:16 +01:00
Bruno
dd4b687d36 build/windows: Renew pseudo-gimp*.pfx certificate and document it 2024-12-21 08:40:07 -03:00
Bruno
12db54cded build/windows: Create .msixbundle in fake tagged pipelines
This is useful right before releases according our release procedure:
https://testing.developer.gimp.org/core/maintainer/release/

Also, checking the variable content make the script more safe,
considering that in the future we will publish automatically from CI.
2024-12-21 08:40:03 -03:00
Bruno
9d9d7226db build/windows: Auto bump MSIX pseudo-revision in Release Candidates
See: https://gitlab.gnome.org/GNOME/gimp/-/blob/master/build/windows/store/README.md?ref_type=heads#versioning-the-msix
2024-12-21 08:40:00 -03:00
Aurimas Černius
312ffad4c8 Update Lithuanian translation 2024-12-20 20:49:10 +00:00
Aurimas Černius
aa2f3b84c4 Update Lithuanian translation 2024-12-20 20:38:26 +00:00
Yuri Chornoivan
fdd4eabbe0 Update Ukrainian translation 2024-12-20 20:17:07 +00:00
Thomas Manni
c346838043 actions: Set NDE filter before initialization
Filters with custom dialogues like Curves and Levels did not
have the existing filter set before being initialized. This meant
that if you have a different layer selected, editing an existing
filter would add a new filter to your selected layer rather than
editing the filter on its own layer.
This patch sets the NDE filter in the tool before initialization,
so that it can get the correct layer to edit and update the
filter settings on that one.
2024-12-20 16:54:36 +00:00
Kolbjørn Stuestøl
45b0b64036 Update Norwegian Nynorsk translation 2024-12-20 16:40:35 +00:00
Anders Jonsson
623400447b Update Swedish translation 2024-12-20 12:31:46 +00:00
Bruno
350c24cc8a build/linux: Possibly fix AppImage custom App ID still not working
Following 522b9ced
2024-12-20 08:39:03 -03:00
Luming Zh
d493e36cb0 Update Chinese (China) translation 2024-12-20 10:24:52 +00:00
Martin
454b7ef64f Update Slovenian translation 2024-12-20 06:19:39 +00:00
Ekaterine Papava
9697c5fcb5 Update Georgian translation 2024-12-20 04:39:04 +00:00
Jehan
34dfd6773e gimp-data: improve the script to generate images for the Windows installer. 2024-12-20 01:52:50 +01:00
Anders Jonsson
a3b52c3d4b po: update POTFILES.in 2024-12-20 00:00:35 +00:00
Jehan
d791ff0539 NEWS: update. 2024-12-20 00:45:57 +01:00
Jehan
0a47c59a26 app: some updates regarding MR !1996.
1. After discussions on IRC, we agreed that "A new perceptual blending
   space was added in GIMP 3.0" was a nicer reason to display for
   bumping the XCF version, because instead of focusing on fixes, we
   focus on the new feature (a real "perceptual blending space" was
   added for modes) and also because naming "perceptual" in some form
   seems more helpful for people to figure out what is different.
2. Fixing sensitivity of the non-linear (formerly named perceptual)
   actions when the blend or composite spaces are mutable.
2024-12-19 23:23:50 +01:00
Øyvind Kolås
3f3b29ba12 app, libgimp, pdb: fix perceptual blend space for linear TRC ICC profiles
In previous versions what has been stored/specified as perceptual blending or
compositing spaces has really been the non-linear variant of the images babl
space.

To maintain loading of old files, the code has been updated to actually mean
non-linear and a new perceptual value has been added to the GimpLayerColorSpace
enum, while preserving all old enum values.

This change bumps XCF file version to 23
2024-12-19 23:23:50 +01:00
Marco Ciampa
c380d289eb Update Italian translation 2024-12-19 19:15:24 +00:00
Marco Ciampa
10ac1d1edb Update Italian translation 2024-12-19 19:15:07 +00:00
Marco Ciampa
5a6998d350 Update Italian translation 2024-12-19 19:14:55 +00:00
Alx Sa
7bcc23ec05 tools, widgets: Fix NDE restrictions when different layer selected
As noted by Thomas Manni, editing NDE filters was still affected by
restrictions on existing layers, even if the edited layer did not have
those restrictions.
This patch alters gimp_item_tree_view_effects_edited_clicked () so that
it checks if the edited filter's drawable is visible or pixel locked,
rather than the currently selected layers. It also adds checks in
GimpFilterTool tool to verify an existing filter is being edited before
preventing certain operations.
2024-12-19 17:42:43 +00:00
Bruno
5ea569e208 build: Explain why we bundle GTK locales 2024-12-19 13:54:29 -03:00
Bruno
2952039ea7 build/linux: Use custom App ID on Nightly flatpak
This avoids DEs mixing icons from stable/beta with nightly.
2024-12-19 09:16:25 -03:00
Aurimas Černius
a8c59a6926 Update Lithuanian translation 2024-12-19 10:00:51 +00:00
Anders Jonsson
70db83ee33 dialogs: remove border around toolbar icons in preferences 2024-12-18 20:48:00 +00:00
Jehan
277d49235f Issue #12576: crash when applying filter from history after an edit. 2024-12-18 13:53:52 +01:00
Jehan
f2cf2bfd04 gimp-data: bump the pointed data commit.
- More icons from Default used in legacy as temporary workaround of
  missing icons.
- Splash image updated.
2024-12-18 00:32:41 +01:00
Jehan
e81a6bfdc3 NEWS: update. 2024-12-18 00:21:41 +01:00
Jehan
363f37d866 plug-ins: also update the prompt when searching.
When searching backward, it will show '^^^' and forward 'vvv' instead of
'>>>' and also the searched text will appear next to the prompt between
parentheses. This makes searching a lot easier as we have clear feedback
of where we are at and what we are searching.
2024-12-18 00:16:06 +01:00
Jehan
70da73ee0d plug-ins: implement Ctrl-R and Ctrl-S in Python Console for searching.
These are the common shell shortcuts for respectively searching backward
and forward in command history. I use the Python Console plug-in so much
for testing that it started to weigh on me on how ineffective it was not
to be able to search through the history and laboriously hit Up/Down
buttons instead.

While doing a search, most navigation keys would trigger to stop the
search (and stay at the current history item followed by whatever the
key was supposed to do, such as changing cursor position, etc.). Esc in
particular would just stop the search and do nothing else.

Ctrl-C though would reset the search and get the text back to what it
was before search started.
2024-12-17 23:53:34 +01:00
Jehan
9588132849 plug-ins: do not cycle through Python Console history.
When you want to get back to the latest command, it is very confusing
when it starts cycling from the oldest history command!
2024-12-17 23:15:53 +01:00
Jehan
3284e9a487 NEWS: update.
As a particularity in these NEWS, the changes for BMP are more accurate
in the NEWS file than in the commit because MR !1932 got mistakenly
squashed. For anyone looking to have even more details, they should read
the informative comments in the MR:

https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1932/commits
2024-12-17 21:12:52 +01:00
Jehan
aa2d35c5fc app, pdb, plug-ins: replace (plug-in-bump-map).
For plug-in writers reference, these are equivalent:

- (plug-in-bump-map RUN-NONINTERACTIVE img drawable bump-layer azimuth elevation depth 0 0 0 0 FALSE FALSE 0)
+ (let* ((filter (car (gimp-drawable-filter-new drawable "gegl:bump-map" ""))))
+   (gimp-drawable-filter-configure filter LAYER-MODE-REPLACE 1.0
+                                   "azimuth" azimuth "elevation" elevation "depth" depth
+                                   "offset-x" 0 "offset-y" 0 "waterlevel" 0.0 "ambient" 0.0
+                                   "compensate" FALSE "invert" FALSE "type" "linear"
+                                   "tiled" FALSE)
+   (gimp-drawable-filter-set-aux-input filter "aux" bump-layer)
+   (gimp-drawable-merge-filter drawable filter)
+ )

The "type" argument now uses strings.

This commit also do a big cleanup of remaining now-unused helper
functions in the compat PDB code.
2024-12-17 16:24:54 +00:00
Jehan
e2d7cc163e app, pdb, plug-ins: replace (plug-in-displace).
For plug-in writers reference, these are equivalent:

- (plug-in-displace RUN-NONINTERACTIVE work-image frame-layer
-                   x-displacement y-displacement
-                   TRUE TRUE aux1 aux2 abyss))
+ (let* ((abyss "black")
+        (filter (car (gimp-drawable-filter-new frame-layer "gegl:displace" ""))))
+
+   (if (= edge-type 1) (set! abyss "loop"))
+   (if (= edge-type 2) (set! abyss "clamp"))
+
+   (gimp-drawable-filter-configure filter LAYER-MODE-REPLACE 1.0
+                                   "amount-x" x-displacement "amount-x" y-displacement "abyss-policy" abyss
+                                   "sampler-type" "cubic" "displace-mode" "cartesian")
+   (gimp-drawable-filter-set-aux-input filter "aux" aux1)
+   (gimp-drawable-filter-set-aux-input filter "aux2" aux2)
+   (gimp-drawable-merge-filter frame-layer filter)
+ )

I also changed a test which (I think) was just a no-op since do-x and
do-y were 0 0 (hence FALSE). Therefore the whole filter processing was
ignored. Note though that unlike the rippling animation filter, I
haven't tested the test script.
2024-12-17 16:24:54 +00:00
Jehan
c663c8cd2d plug-ins: Script-fu (gimp-drawable-filter-set-aux-input) procedure.
This is a wrapper to the C function of the same name. It is now possible
to merge filters with auxiliary input pads!
2024-12-17 16:24:54 +00:00
Jehan
a6392ed84a app, libgimp, pdb, plug-ins: add a few Script-fu wrapper of libgimp filter API.
In particular (gimp-drawable-filter-configure),
(gimp-drawable-merge-filter) and (gimp-drawable-append-filter) are
proper Script-fu methods.

I had to rename the PDB procedures for the 2 latter because they were
clashing with these wrapper. I had not realized that private PDB
procedures are still visible by Script-fu. This is not so glop. :-/

Right now, it doesn't look so useful compared to the -new- one-liner
variant procedures. But it will make sense when I will add aux input C
procedure wrappers.
2024-12-17 16:24:54 +00:00
Jehan
6480ba2ad6 app, libgimp, pdb: new gimp_drawable_filter_set_aux_input() public API.
It is this way possible to set a drawable as auxiliary input to a filter
in C and GObject-Introspected bindings.

Note that such filters can only be merged, not appended
non-destructively for the time being.
2024-12-17 16:24:54 +00:00
Jehan
1fbd2acc84 app, pdb, plug-ins: get rid of (plug-in-rotate).
It can be reimplemented with (gimp-image-rotate) and
(gimp-item-transform-rotate-simple), with even more capabilities for the
latter.

The item rotate procedure is a bit more tricky though, since it takes
into account the selection. It means that either you want to just remove
the selection before (that's what I did here, because this script was
already losing the selection anyway), or you want to store the selection
(with (gimp-channel-copy)), then reapply it (very likely with
(gimp-channel-combine-masks)) at the end, after also rotating it
appropriately the same way as the image if needed.
2024-12-17 16:24:54 +00:00
Jehan
c26b2cd08f app, pdb, plug-ins: replace (plug-in-noisify).
For plug-in writers reference, these are equivalent:

- (plug-in-noisify RUN-NONINTERACTIVE theImage mLayer TRUE r g b a)
+ (gimp-drawable-merge-new-filter mLayer "gegl:noise-rgb" 0 LAYER-MODE-REPLACE 1.0
+                                 "independent" TRUE "red" r "green" g "blue" b "alpha" a
+                                 "correlated" FALSE "seed" (msrg-rand) "linear" TRUE)

Notes:

* When "independent" is FALSE, then you only need to set "red" (which is
  equivalent to a "value" field) and "alpha".
* Original plug-in was using the second value ('g', a.k.a. noise_2 in
  the PDB args) as alpha when the source drawable was grayscale. This
  logic is meaningless now. Just set "alpha".
* The PDB procedure was wrapping the operation between
  "gegl:cast-format" nodes to cast the input buffer to linear. This is
  useless as the "gegl:noise-rgb" has already a "linear" argument
  (defaulting to TRUE, but I specify it explicitly in this commit, for
  clarity) which requests linear input when set.
2024-12-17 16:24:54 +00:00
Jehan
dc4daa8396 app, pdb, plug-ins: replace (plug-in-emboss).
For plug-in writers reference, these are equivalent:

- (plug-in-emboss RUN-NONINTERACTIVE img mask-emboss 315.0 45.0 7 TRUE)
+ (gimp-drawable-merge-new-filter mask-emboss "gegl:emboss" 0 LAYER-MODE-REPLACE 1.0 "azimuth" 315.0 "elevation" 45.0 "depth" 7 "type" "emboss")

Note: the last arg, emboss, must be replaced by a string, "emboss" when
it was TRUE, "bumpmap" when FALSE.

Similarly to "gegl:gaussian-blur", the call to wrap_in_gamma_cast() was
useless because "gegl:emboss" already sets its output format to linear,
as well as its input format (through GeglOperationAreaFilter parent
class).
2024-12-17 16:24:54 +00:00
Jehan
cba5b2c4c6 plug-ins: fix a call to (gimp-drawable-offset).
GIMP_OFFSET_BACKGROUND doesn't exist since commit 2770cce833 and was
replaced by GIMP_OFFSET_COLOR + a specific GeglColor added in
gimp_drawable_offset().
2024-12-17 16:24:54 +00:00
Jehan
1c4a00de78 app, pdb, plug-ins: replace (plug-in-gauss).
For plug-in writers reference, these are equivalent:

- (plug-in-gauss RUN-NONINTERACTIVE image layer hblur vblur 0)
+ (gimp-drawable-merge-new-filter layer "gegl:gaussian-blur" 0 LAYER-MODE-REPLACE 1.0 "std-dev-x" hblur "std-dev-y" vblur "filter" "auto")

Note: the method arg { AUTO (0), FIR (1), IIR (2) } is transformed into
a string in lowercase. E.g. 1 becomes "fir".

At first, I was a bit annoyed by the wrap_in_gamma_cast() call which
converts the buffer to linear first, but looking at "gegl:gaussian-blur"
implementation, it is just a meta op to 2 "gegl:gblur-1d" which anyway
sets input format (to various formats, but always linear).

This legacy cast code must be a remnant from older times where it might
have been needed. Clearly it's not anymore.
2024-12-17 16:24:54 +00:00
Jehan
b0ac59b421 app, pdb, plug-ins: replace (plug-in-plasma).
This time, it's a Python plug-in, which is a bit more involved than C or
Script-fu usage (where we have variable args one-liner function) though
it's not too bad either. It's actually very similar (on purpose) to how
PDB procedures are run.
2024-12-17 16:24:54 +00:00
Jehan
082ba3bb1f app, pdb, plug-ins: replace (plug-in-waves).
For plug-in writers reference, these are equivalent:

- (plug-in-waves RUN-NONINTERACTIVE
-                image
-                source-layer
-                amplitude
-                phase
-                wavelength
-                0
-                FALSE)
+
+ (let* (
+       (phi phase)
+       (width (car (gimp-drawable-get-width source-layer)))
+       (height (car (gimp-drawable-get-height source-layer)))
+       (aspect (/ width height))
+       )
+
+   (while (< phi 0)
+     (set! phi (+ phi 360.0))
+   )
+   (set! phi (/ (- (modulo phase 360.0) 180.0) 180.0))
+
+   (if (< aspect 0.1)
+     (set! aspect 0.1))
+   (if (> aspect 10.0)
+     (set! aspect 10.0))
+   (gimp-drawable-merge-new-filter source-layer "gegl:waves" 0 LAYER-MODE-REPLACE 1.0 "amplitude" amplitude "phi" phi
+                                                                                      "period" (* wavelength 2.0)
+                                                                                      "clamp" TRUE "aspect" aspect)
+ )

Notes:

* The old type argument is the negated value of "clamp".
* The last argument (reflective) was unused.
2024-12-17 16:24:54 +00:00
Jehan
c70ffcec91 app, pdb, plug-ins: replace (plug-in-threshold-alpha).
For plug-in writers reference, these are equivalent:

- (plug-in-threshold-alpha RUN-NONINTERACTIVE image layer threshold))
+ (gimp-drawable-merge-new-filter layer "gimp:threshold-alpha" 0 LAYER-MODE-REPLACE 1.0 "value" (/ threshold 255))

The main difference is that threshold arg was a [0; 255] int whereas
"value" is a [0.0; 1.0] double.

This commit also shows how to run filters in C plug-ins (file-ico here)
as a one-liner too, thanks to the varargs conviency function.
2024-12-17 16:24:54 +00:00
Jehan
3c0c4db614 app, pdb, plug-ins: replace (plug-in-spread).
For plug-in writers reference, these are equivalent:

- (plug-in-spread RUN-NONINTERACTIVE image layer inSpread inSpread)
+ (gimp-drawable-merge-new-filter layer "gegl:noise-spread" 0 LAYER-MODE-REPLACE 1.0 "amount-x" inSpread "amount-y" inSpread "seed" (msrg-rand))
2024-12-17 16:24:54 +00:00
Jehan
5af02d292a app, pdb, plug-ins: replace (plug-in-solid-noise).
For plug-in writers reference, these are equivalent:

- (plug-in-solid-noise RUN-NONINTERACTIVE image layer FALSE TRUE seed 2 2 2)
+ (let* ((width  (cadddr (gimp-drawable-mask-intersect layer)))
+        (height (caddr (cddr (gimp-drawable-mask-intersect layer)))))
+   (gimp-drawable-merge-new-filter layer "gegl:noise-solid" 0 LAYER-MODE-REPLACE 1.0 "tileable" FALSE "turbulent" TRUE "seed" seed
+                                                                                     "detail" 2 "x-size" 2.0 "y-size" 2.0
+                                                                                     "width" width "height" height)
+ )
2024-12-17 16:24:54 +00:00
Jehan
093b09ccc6 app, pdb, plug-ins: replace (plug-in-oilify).
For plug-in writers reference, these are equivalent:

- (plug-in-oilify RUN-NONINTERACTIVE image active-layer mask-size 0)
+ (gimp-drawable-merge-new-filter active-layer "gegl:oilify" 0 LAYER-MODE-REPLACE 1.0 "mask-radius" (max 1 (/ mask-size 2)) "use-inten" FALSE)
2024-12-17 16:24:54 +00:00
Jehan
dfeab826ce app, pdb, plug-ins: replace (plug-in-maze).
For plug-in writers reference:

- (plug-in-maze RUN-NONINTERACTIVE image active-layer 5 5 TRUE 0 seed 57 1)
+ (gimp-drawable-merge-new-filter active-layer "gegl:maze" 0 LAYER-MODE-REPLACE 1.0 "x" 5 "y" 5 "tileable" TRUE "algorithm-type" "depth-first"
+                                                                                   "seed" seed
+                                                                                   "fg-color" (car (gimp-context-get-foreground))
+                                                                                   "bg-color" (car (gimp-context-get-background)))

Notes:

* FG and BG colors were hardcoded to current context colors. It also
  means with the new API, you can use whatever else you want.
* The algorithm arg changes like this:
  - 0 -> "depth-first"
  - 0 -> "prim"
* multiple and offset args (the 2 last args) were bogus and were doing
  nothing already.
2024-12-17 16:24:54 +00:00
Jehan
39c2b83746 libgimp: allow passing GeglParamSeed arguments from plug-ins.
In particular, I encountered some script-fu scripts calling some GEGL
ops with a seed, but this argument wouldn't be reproduced in the config
object. Technically it's just a uint. Let's just pass them as such.
2024-12-17 16:24:54 +00:00
Jehan
7e81bdfa14 app, pdb, plug-ins: replace (plug-in-edge).
For plug-in writers reference:

- (plug-in-edge RUN-NONINTERACTIVE image layer 2 1 0)
+ (gimp-drawable-merge-new-filter layer "gegl:edge" 0 LAYER-MODE-REPLACE opacity "amount" 2.0 "border-behavior" "loop" "algorithm" "sobel")

The warpmode (before-last) arg has to be replaced like this (types from
GeglAbyssPolicy enum type):

* NONE (0)  -> "none"
* WRAP (1)  -> "loop"
* SMEAR (2) -> "clamp"
* BLACK (3) -> "black"

For edgemode (last arg), just use the name value in lowercase as string:
{ SOBEL (0), PREWITT (1), GRADIENT (2), ROBERTS (3), DIFFERENTIAL (4), LAPLACE (5) }
E.g. "differencial" instead of formerly 4.
2024-12-17 16:24:54 +00:00
Jehan
4cc50c6701 app, pdb, plug-ins: replace (plug-in-cubism).
For plug-in developers reference:
- (plug-in-cubism RUN-NONINTERACTIVE image layer tile_size saturation 0)
+ (gimp-drawable-merge-new-filter layer "gegl:cubism" 0 LAYER-MODE-REPLACE 1.0 "tile-size" tile_size "tile-saturation" saturation "bg-color" '(0 0 0))

Now you can even choose the bg-color (not just an int/enum of black and
background color only).
2024-12-17 16:24:54 +00:00
Jehan
f539f8fb62 app, libgimp, pdb, plug-ins: plug-in-c-astretch compat PDB proc removed.
For plug-in writers, here is how to replace it:

- (plug-in-c-astretch RUN-NONINTERACTIVE img drawable)
+ (gimp-drawable-merge-new-filter drawable "gegl:stretch-contrast" 0 LAYER-MODE-REPLACE 1.0 "keep-colors" FALSE)
2024-12-17 16:24:54 +00:00
Jehan
e5134e67aa libgimp*, plug-ins: filter ID are now usable in script-fu.
Marshalled PDB procedures into script-fu can now convert a filter ID
into the proper object. For instance, here would be the code to append a
new gaussian blur filter to the drawable with ID 2 (with specific
settings), then making invisible:

```script-fu
(define filter (gimp-drawable-append-new-filter 2 "gegl:gaussian-blur" "hello" LAYER-MODE-COLOR-ERASE 1.0 "std-dev-x" 20 "abyss-policy" "none"))
(gimp-drawable-filter-set-visible filter FALSE)
(gimp-drawable-update 2 0 0 -1 -1)
```
2024-12-17 16:24:54 +00:00
Jehan
39df978c2c plug-ins: implement (gimp-drawable-append-new-filter) script-fu procedure. 2024-12-17 16:24:54 +00:00
Jehan
dc91fe6ccd plug-ins: implement gimp-drawable-merge-new-filter for script-fu.
I moved the code to transform scheme values into GValues depending on a
GParamSpec out of script_fu_marshal_procedure_call() into a shared
function script_fu_marshal_arg_to_value().
2024-12-17 16:24:54 +00:00
Jehan
3da53852df app, libgimp, pdb: make sure default values of a filter's config are right.
When calling gimp_drawable_filter_get_config() the first time, we don't
want the config's properties to be at default values, but instead to be
set same as they are on core app.

On further calls though, we don't touch the values, because they may be
out-of-sync until the next call to gimp_drawable_filter_update().
2024-12-17 16:24:54 +00:00
Jehan
4c07529553 libgimp, pdb: gimp_drawable_(append|merge)_filter() run …
… gimp_drawable_filter_update() first.

Otherwise this is bug-prone. When people were to update the
configuration of the filter, they obviously intend this to be used when
appending/merging.
2024-12-17 16:24:54 +00:00
Jehan
58b11d9d98 app, extensions, libgimp: new convenient function gimp_drawable_merge_new_filter().
Also adding an example of using it in the C goat exercise, though I
leave it commented out because showing code for direct GEGL usage is
also of interest.

As a side update, I am adding proper support of the NULL or empty string
value for the filter name. In this case, the default human-readable
title of the operation will be used instead.
2024-12-17 16:24:54 +00:00
Jehan
0223694583 libgimp: C-utility gimp_drawable_append_new_filter().
Makes adding new filters a one-liner in C.
2024-12-17 16:24:54 +00:00
Jehan
57a8449646 app, libgimp, pdb: add gimp_drawable_merge_filter(). 2024-12-17 16:24:54 +00:00
Jehan
a6187fc2a8 app: reorder the filter when "Merge filter" is checked at creation.
Without this, the filter order was right only when checking off then
then on the option, but the render was wrong when opening the filter
options dialog.
2024-12-17 16:24:54 +00:00
Jehan
b07a6986e0 app, libgimp, pdb: make GIMP_LAYER_MODE_REPLACE PDB-visible.
This is the actual default blend mode for filters so now that we have
API to set filters, this mode must be settable.
2024-12-17 16:24:54 +00:00
Jehan
c310573021 app, libgimp, pdb: new gimp_drawable_filter_(g|s)et_blend_mode() and gimp_drawable_filter_(g|s)et_opacity().
Similarly to the config arguments, the set functions are not directly
calling core. Instead they are queuing changes until
gimp_drawable_filter_update() is run.
2024-12-17 16:24:54 +00:00
Jehan
1587a8ec54 app, libgimp, pdb: new libgimp functions gimp_drawable_filter_new() and gimp_drawable_append_filter(). 2024-12-17 16:24:54 +00:00
Jehan
7715a875e0 app, libgimp, pdb: new gimp_drawable_filter_update() public API.
It is now possible to sync the GimpDrawableFilterConfig with core.

Another (simpler on usage) possibility could have been to sync
automatically when a property is updated. But considering that some
filters can be quite slow to render (especially in real-life usage when
working on possibly very big files), and especially that on bindings
with no variable args, scripts will likely have to edit properties one
by one, it could make editing multiple properties very slow. Therefore
the chosen solution is that editing properties stay local on libgimp and
all changed properties are synced with core at once (with a frozen
render until the end for single computation) when calling
gimp_drawable_filter_update().
2024-12-17 16:24:54 +00:00
Jehan
4d9d17504c libgimpbase: fix setting a GimpParamChoice to invalid value.
It was possible to set a GimpChoice property to a value out of the
allowed list. This got very likely broken when I re-parented
GimpParamSpecChoice to GParamSpecString which had a value_is_valid()
implementation, which was shadowing our custom value_validate().

This is fixed by now also implementing value_is_valid() for this param
spec type.
2024-12-17 16:24:54 +00:00
Jehan
2cf6b637e7 app, libgimp, pdb: new GimpDrawableFilterConfig class.
This is mostly an empty shell whose goal is to serve as base class for
specific dynamically generated per-operation subclasses, which will have
properties mimicking the arguments of the GEGL operation.

Most of the fundamental type args will just use the base GLib param spec
types instead of GEGL ones.

As a special case, the GeglParamEnum arguments are transformed into
GimpChoice param specs on libgimp side. The reason is that most of the
time, enum types are created within the scope of an operation code only
and cannot be properly reconstructed over the wire. I could just
transform these into an int type (which is mostly what is done in GEGL
right now when running an op with such arg), but GimpChoice allow much
nicer string-type args, which make much more semantic code. This class
was initially created for plug-ins, but it would work very well to run
GEGL ops on drawables. So let's do it.

Finally add a gimp_drawable_filter_get_config() to request the current
config of a filter.

Note that right now, we can't do much with this config object other than
observing an operation args and default values. Being able to update a
filter's settings will come up in further commits.
2024-12-17 16:24:54 +00:00
Jehan
c49dec3416 app, libgimp, pdb: 4 new libgimp/PDB procedures for GimpDrawableFilter.
* gimp_drawable_filter_get_name
* gimp_drawable_filter_get_operation_name
* gimp_drawable_filter_get_visible
* gimp_drawable_filter_set_visible
2024-12-17 16:24:54 +00:00
Jehan
0c1da8f328 app, libgimp, pdb: new gimp_drawable_filter_delete() libgimp/PDB function. 2024-12-17 16:24:54 +00:00
Jehan
08362d1e7b app, libgimp, pdb: passing GimpDrawableFilter across the wire.
A few functions were added, but the main one is
gimp_drawable_get_filters() to request the list of filters applied
non-destructively on a drawable. We can't do much with these for the
time being, but this will come.
WIP.
2024-12-17 16:24:54 +00:00
Jehan
1d7d3ab621 app: GimpDrawableFilter have a unique ID.
This will be needed if we want to pass drawable filters over the wire to
plug-ins.
2024-12-17 16:24:54 +00:00
lloyd konneker
e56f2b1c54 ScriptFu: show and hide Dock icon for extension-script-fu
Makes the Dock icon only appear when a script plugin has a dialog.
Unfortunately, on MacOS where "transient for" doesn't work,
we need a Dock icon for the separate process so user can "Show window."
See #12150

Done at runtime.
A build-time alternative is: package script-fu binary in a bundle, and set properties.

Fixes both the new-style dialog (GimpProcedureDialog) and the old-style dialog (deprecated.)
2024-12-17 15:18:50 +00:00
lloyd konneker
078e283f4b ScriptFu: fix #12150, activate apps (extension-script-fu and gimp) properly on MacOS
The gimp app and extension-script-fu (long-running)
are separate processes and "apps."
An app can be "active": in front and receiving GUI events.

As reported, on MacOS, when an extension-script-fu plugin yields,
the gimp app did not become active.
Also, on the second invocation of a plugin served by extension-script-fu,
the dialog could be hidden or require an extra click
because extension-script-fu was not active.
(Independently interpreted plugins did become active,
because it was a new process and gimpui_init activates on MacOS.)

On MacOS:
1. after the first dialog shown by extension-script-fu,
ensure subsequent calls to plugin make extension-script-fu active.
2. After a plugin yields, plugin manager ensure the Gimp app is active.

Note that this is done whenever a TEMPORARY procedure returns.
Most are calls to extension-script-fu plugins.
But some are also callbacks from Resource choosers running in the gimp app.
When they return, the gimp app remains active, and user must first click in
the plugin dialog to continue working.
Especially when the user clicks OK in a Resource Chooser, closing the chooser,
it would be nice if the plugin dialog became active.
That requires more, FUTURE development.

Special to MacOS: on Linux, "transient for foreign window" ensures this,
but that doesn't work on MacOS.

The fix is somewhat brute force and as simple as possible.
There is a more cooperative API for app activation on MacOS.
An app yields, and apps request, not force, self or other app be activated.
The fix does not use the cooperative API.
To do so would require a platform abstraction layer, in GIMP or Gtk.

The fix also sprinkles the code with #ifdefs.
That could be hidden if there were a platform abstraction layer PAL
The layer would be the greatest common denominator across platforms.
PAL methods would always be called in GIMP code,
but not do anything when the effect was accomplished another way.
For example "gimp_platform_request_app_active"
would request the app was active,
but do nothing on Linux where that is ensured by "transient for."
2024-12-17 15:18:50 +00:00
lloyd konneker
5ae61a890d ScriptFu: fix #12504, unhandled GUI events on MacOS
Previously, just hanging a read, extension-script-fu missed GUI events
that closed dialogs on MacOS.

The fix is a proper event loop for a plugin that persists, reads, and has GUI:
calling gimp_plug_in_persistent_enable and a main_loop,
instead of gimp_plug_in_persistent_process.

The fix is not conditional on MacOS, but seems events missed only on MacOS.

The previous fix for MacOS, #6577, only works for old-style GUI (script-fu-interface.c).
That was not the best fix, and doesn't work for new-style GUI (GimpProcedureDialog).
If symptoms still appear in 2.10.38
(#12150 says dialogs dissappear but a dock icon has spinning ball)
this should be backported to 2.10.
2024-12-17 15:18:50 +00:00
Alan Mortensen
ff9ac6c83c Update Danish translation 2024-12-16 18:38:36 +00:00
Bruno
b450bf922c build/windows: Make Inno auto repairing finally work
Partially revert f0fb4435

It is safer to wait for Inno to compile successfully before deleting the
.bak langs, which are the condition to auto repairing.
2024-12-16 13:54:05 -03:00
Bruno
b8ac9da4db build/windows: Do not display strong bezel so better match Vista-style
Note: I reinforce that, despite the name, this doesn't look like Vista.

Following de556c0734

Microsoft use of bezel in Win32 and UWP/WinUI3 apps is inconsistent:
sometimes the bezel is there, others not. However, when displayed
the bezel never is that dark. So let's at least hide it, just how
we do in the Devel warning and Inno do in most dialogs.
2024-12-16 13:53:30 -03:00
Bruno
8a0c294a32 build/windows: Drop SSE check (outdated since 2018)
SSE2 (not the first SSE) instructions are required since 2012 on Windows 8.
Our minimum requeriment for 3.0 series is 10 so Inno built-in 'MinVersion',
by consequence, implies requesting SSE(2) without needing a custom dialog.
Then, let's cleanup this, which will make us gain a few (milli?)seconds.

Just to note, SSE2 (again, not SSE) is required even on Win 7 (since 2018).
2024-12-16 13:42:43 -03:00
Bruno
3b6d9b1662 build/windows: Generate 32-bit TWAIN dependencies list automatically
Fixes #12537

Following e59dec50
2024-12-16 13:42:28 -03:00
Alx Sa
8466d53bdc app/widgets: Use foreground color for handle outline
This makes the range handles for the Levels tool and other
auto-generated range widgets adapt to any theme color,
just like the Gradient Editor range handles currently do.
2024-12-15 16:13:43 +00:00
lloyd konneker
500ef62cc4 ScriptFu: change warning to info for lenient wrong arg count to PDB
It is like a compiler warning, and should not be a full g_warning,
which should mean something will probably fail.
Passing fewer args is a feature since 3.0: the PDB will use defaults.
2024-12-15 14:04:16 +00:00
lloyd konneker
059a6990e9 ScriptFu: cleanup some debug statements
Condense a few, eliminate a few.

Turn off the debugging of args in a Config.
2024-12-15 14:04:16 +00:00
Alan Mortensen
52f52a4607 Update Danish translation 2024-12-15 14:01:17 +00:00
Alan Mortensen
c8605e0c93 Update Danish translation 2024-12-15 13:31:05 +00:00
Bruno
1309e98fb9 gitlab-ci, build: Implement GL collapsed logs (like GHA/CircleCI 'steps')
This provides us fine-grained info on how much time each step take,
making easier to spot stuckness and to quickly understand the logs.

'gimp' jobs normally do not take advantage on this due to log limits
(they expand and crop the log), so I adapted them to only output errors.

---

Also, to reduce logs, all jobs were reviewed with proper GIT_* variables.
2024-12-15 09:36:11 -03:00
Alan Mortensen
5577ae851e Update Danish translation 2024-12-15 11:57:23 +00:00
Alan Mortensen
36232bf442 Update Danish translation 2024-12-15 11:55:19 +00:00
Alx Sa
9059e64e7c app/tools: Use existing filter's drawable for thumbnail
We were unconditionally using the selected layers' drawable
when setting up the filter tool's dialogue. As a result, it
would use the wrong drawable as the dialogue thumbnail if a
different layer was selected while editing an NDE Filter.
This patch checks if we're editing an NDE filter, and if so,
uses its drawable instead.
2024-12-15 03:06:44 +00:00
Alx Sa
50262800ca plug-ins: Define Map Object GUI ranges
While we want to allow a flexible range for the
Box and Cylinder dimensions when called non-interactively,
having a large range in the GUI makes it difficult for
users to precisely set those values.
This patch adds calls to gimp_scale_entry_set_bounds ()
to match the 2.10 GUI ranges, while letting the values be
larger then that when called via the PDB.
2024-12-14 14:23:46 +00:00
Alan Mortensen
514dc70c72 Update Danish translation 2024-12-14 12:30:36 +00:00
Idriss Fekir
75cb93933a Issue #12376: Improve font matching on old XCF files
When opening an old XCF, we try to match the fonts specified in the text
layers (and the text tool) with the closest font (if the exact font isn't available).
This patch improves the matching heuristic a bit.
2024-12-13 19:06:21 +01:00
Alx Sa
cc5129a562 plug-ins: Load images from .lnk shortcuts
Based on suggestions from Michael
Schumacher in issue #12239.
Until we implement native file picker dialogues,
Windows users can't load images from
Windows shortcut (.lnk) files.
This patch adds a plug-in to open these
.lnk files, extract the path, then try to read
it in via gimp_file_load ().
Similar to file-compressor, the error
messages are suppressed in the GUI so that
users don't get error messages if they click
on a non-image shortcut in the file picker.
2024-12-11 20:15:41 +00:00
Michael Schumacher
5018cba5cc app/tests: use gdk_display_get_monitor_at_window in window_roles ui test
This works on Wayland, and uses the monitor the GIMP image window is shown on.
2024-12-11 20:18:02 +01:00
Aki
2ef1126e6b file-tiff: Fix 1-bit TIFF export for indexed images with alpha
Only export 1-bit TIFF for black and white indexed images without alpha
channel. 1-bit TIFF with alpha has poor software support:
- GIMP: cannot read its own exported files
- macOS Preview: ignores MINISWHITE/MINISBLACK
- Windows Photo Viewer: shows as invalid image
- InDesign: ignores alpha channel
- tiff2rgba: fails to process
- Photoshop/Illustrator: corrupted rendering
2024-12-11 15:57:07 +00:00
Danial Behzadi
d1e12c795f Update Persian translation 2024-12-11 15:10:16 +00:00
Danial Behzadi
696752eefd Update Persian translation 2024-12-11 15:05:45 +00:00
user062
a3968ddf70 Issue #12379: Don't pass invalid UTF-8 strings to fontconfig
Any font file path that's invalid utf-8, and/or any metadata (psname,
fullname, family...etc) that's not valid utf-8 should be skipped and not
passed to fontconfig.
2024-12-11 13:49:57 +00:00
Jehan
61cef720f3 Issue #7589: recommend Pango >= 1.55.0 to avoid ugly font breakage.
This issue has eluded us for a long time and it was recently fixed in
Pango (MR pango!745). We can't bump the minimum requirement because of
our bookworm baseline for GIMP 3.0.0, but we can at least warn when
building for macOS.
2024-12-11 14:22:30 +01:00
Michael Schumacher
7720cd6324 app/tests: send keyboard keys to the shell, not the window 2024-12-11 12:48:06 +01:00
Michael Schumacher
45e9b140f1 po-libgimp: Add missing space to pa.po to unblock from commit hook 2024-12-11 08:20:41 +00:00
Jehan
a18d347bf5 desktop: fix AppData unit testing when in RC+git code.
We still want the normal GIMP_RELEASE C macro to be set because the
whole development frame should have code behaving like release code, yet
only for the AppStream metadata testing, we want to allow a "TODO"
release date while in +git code.
2024-12-11 09:18:13 +01:00
Alx Sa
e6ad3ad0cd plug-ins: Add support for importing CMYK PAM files
While not an "official" tupl type for PAM files, software such as
mutools can export CMYK PAM files. This patch adds support
for loading such images.
Note that PAM files do not include color profile information. In
the future, we might add an option to convert using a pre-defined
color profile for this and other formats like EPS.
2024-12-10 01:27:17 +00:00
Bruno
522b9cedf2 build/linux: Move appimage making to separate job and make it weekly
The "AppImage platform" don't have releases, every tool is blending edge.
Obviously, it is too prone to broke, and for the first time it got broken.
So, let's move it to a separate job and with less frequency to not broke CI.
2024-12-09 22:09:08 -03:00
Hugo Carvalho
23f9ef1d96 Update Portuguese translation 2024-12-10 00:08:04 +00:00
Hugo Carvalho
de78cd2485 Update Portuguese translation 2024-12-10 00:03:47 +00:00
Michael Schumacher
75a19577e5 app/tests: use gtk_test_widget_send_key instead of gdk_test_simulate_key
Two tests were consistently timing out before this change:
save-and-export and ui. The gdk_test_simulate_key documentation mentions that
gtk_test_widget_send_key is the right approach for most testing purposes.
With this change, save-and-export started working for me, whereas ui now fails
properly - investigating this failure was the original point of the change.
2024-12-09 22:00:11 +01:00
Jordi Mas
bec457d126 Update Catalan translation 2024-12-09 06:43:27 +01:00
Rūdolfs Mazurs
6a747a355f Update Latvian translation 2024-12-08 22:02:03 +00:00
Jacob Boerema
62c7658f38 libgimpbase: exclude Exif.SonyMisc3c tags when exporting
Closes #12518

Certain Sony camera's have MakerNote tags in the Exif.SonyMisc3c range.
When exporting with EXIF metadata included this causes a failure saving
the metadata, which means that no metadata at all is saved to the image.

For now, let's exclude these tags, so that all other metadata tags at
least will be saved.
We will keep an eye on exiv2 issue
https://github.com/Exiv2/exiv2/issues/2670
to see if the actual cause will be solved.
2024-12-08 13:44:49 -05:00
Jacob Boerema
0d0a656b88 plug-ins, metadata-viewer: Show more interpreted strings for makernote tags
A lot of the custom brand makernote tags have interpreted strings
available, even though their type is set to Byte.
Since having those interpreted doesn't have any negative side effects
(real Byte values are correctly converted) let's not exclude these
tags for interpreted string conversion.
2024-12-08 13:33:08 -05:00
Bruno
3e5166f4cf build/windows: Drop workaround to stuck pacman
Note: the original workaround was superseded by: 9ab48164

The actual workaround (which adress the same issue) is being dropped since,
according to my tests, seems that the MSYS2 issue was fixed. See: #10782
2024-12-08 09:04:09 -03:00
Rupert Weber
a261fdb91b plug-ins: bmp import - overhaul 2024-12-07 23:49:39 +00:00
Alx Sa
b6be63eae3 app/display: Connect GimpStatusBar to icon size changes
Inspired by Mark Sweeney's work.
This patch passes the user-defined button
icon size from GimpDisplayShell to
GimpStatusBar, and updates the
Soft Proofing button and current tool
icon sizes based off of it.
2024-12-07 18:19:48 +00:00
Alx Sa
5eb9b6ac4b app/widgets: Update colormap count when adding new color
This patch creates a gimp_colormap_selection_colormap_changed ()
function that gets the new colormap count and updates the entries
and spinbutton maximum in the Colormap Selection widget.
Previously the palette view was being refreshed, but the rest of the
widgets in the dialogue were not being updated to match when a
new color was added.
2024-12-07 15:11:10 +00:00
Kolbjørn Stuestøl
dd8e47caa3 Update Norwegian Nynorsk translation 2024-12-07 13:40:53 +00:00
Kolbjørn Stuestøl
b7fcccf4c9 Update Norwegian Nynorsk translation 2024-12-07 13:39:29 +00:00
Jehan
27e4c10e81 desktop: prepare the RC2 release with AppStream metadata. 2024-12-06 16:56:59 +09:00
Jehan
7b4211b24e plug-ins: PageUp/Down is also commonly used same as Up/Down arrows in terminals. 2024-12-06 15:42:55 +09:00
Jehan
8dd13d85fc app: fixing a leak of duplicated string. 2024-12-06 15:42:55 +09:00
Alx Sa
d471ba45c7 display: Prevent drag and drop color fills on invisible layers...
...if user has "Allow editing on non-visible layers" turned off.
2024-12-05 04:25:55 +00:00
Simon Munton
d1e20e5e31 plug-ins: fix #12500 End of file error loading PSD file
The block size for layer info should be a multiple of 2.

We had erroneously thought it was a multiple of 4, based on what is used
for layer resources. But of course Photoshop is inconsistent and uses
a multiple of 2 here.
2024-12-03 10:41:56 -05:00
Alx Sa
91203b76cb plug-ins: Return error on sel2path if no selection
This notifies plug-ins and scripts that sel2path did not execute
because there was no active selection.
2024-12-01 23:08:57 +00:00
Alan Mortensen
b61455e35f Update Danish translation 2024-12-01 15:00:05 +00:00
Alan Mortensen
7d2c04d80f Update Danish translation 2024-12-01 14:57:27 +00:00
Bruno
e38dae1bb1 build/linux: Output go-appimage build number for easier debugging 2024-12-01 07:51:52 -03:00
Bruno
058d62c308 gitlab-ci, build/linux: Ensure that AppImage .log can always be downloaded
The fix is how we do in any other job.
2024-12-01 07:51:01 -03:00
Bruno
5948f8176b Issue #11734: Use Inno new 'x64os' architecture identifier 2024-11-30 18:13:24 -03:00
Alx Sa
fda5981c52 pdb: Copy NDE filters on layers when using PDB
This patch adds code to also copy over
NDE filters when using the gimp-layer-copy
and gimp-layer-new-from-drawable PDB calls.
2024-11-30 14:11:54 +00:00
Alx Sa
2770cce833 pdb, operations, tool: Replace GimpContext with GeglColor...
in gimp:offset filter.
Since gimp:offset is now an NDE filter,
always loading the background color from
context causes the color to change each
time the filter is redrawn. This is inconsistent
behavior.

This patch replaces the GimpContext
parameter with GeglColor, and updates
gimp_drawable_offset and related functions
to set the color directly. The libgimp version
loads the background color from context
and passes it on since the API is now
frozen.
2024-11-29 00:29:36 -05:00
Alx Sa
626c1ff781 app/core: Fix importing LAB colors in ASE palettes
Resolves #12478

There was existing code to scale the Lightness value of LAB
colors by 100 to match the 0.0 - 100.0 range used in babl.
However, it was not actually running because the `color_space`
value was not being properly cleaned before the comparison.
2024-11-29 00:04:21 +00:00
Cheng-Chia Tseng
2aaeb55ac0 Update Chinese (Taiwan) translation 2024-11-27 19:16:20 +00:00
Alx Sa
54c46ea175 app/xcf: Don't override channel opacity on XCF load
When loading channels, the alpha value is stored separately from
the RGB value as "opacity". After the switch to GeglColor, we were
overriding the opacity values by always using "R'G'B" format, so
the loaded opacity was always reset to 100%.

This patch pulls the opacity value before setting the color, then
restores the opacity afterwards.
2024-11-26 23:51:55 +00:00
Alx Sa
e409a74ec2 libgimpwidgets: Ellipsize GimpColorSelect color profile labels
Similar to 42300d9d, we want to prevent overly long color profile
labels from stretching out dialogues with GimpColorSelect too far.
This patch adds gtk_label_set_ellipsize () to both the color profile
and simulation profile labels, and adds them to a grid instead of
letting them free-flow.
2024-11-26 21:56:11 +00:00
Bruno
9149fd0727 build/linux: GTK_THEME code on AppImage is uneeded
Assuming that this var is needed seemed to be a error on my side. GIMP can
use the system theme out of the box in to my tests on Manjaro and Ubuntu.
2024-11-26 13:08:11 -03:00
Bruno
3bbcdbd325 build/linux: Drop LIBGL_DRIVERS_PATH for upcoming unstable AppImage
mesa 24.2, available on Debian testing, don't read this var anymore.
2024-11-26 13:08:08 -03:00
Bruno
72f2c0066c build/linux: Do not bundle graphviz nor video drivers in stable AppImage
They are not needed since the "Debug" menu is hidden.
2024-11-26 13:08:04 -03:00
Bruno
f8423e5e00 build/linux: Complete GJS bundling in AppImage 2024-11-26 13:08:01 -03:00
Bruno
444518da5d build/linux: Move to edge appimagetool for static AppImage squashing
The latest appimagetool inserts a runtime with static libfuse in the .appimage.
It also makes the .appimage run way faster and slightly better compressed.

Thanks for helping me with this, @samueru
2024-11-26 13:07:56 -03:00
Bruno
8fe7ddf36c build/linux: Set LD interpreter but unset LD_LIBRARY_PATH on AppImage
This avoids calling host libs, fixing the last pendency on !1440 desc.
In other words, the AppImage now can be run, in thesis, in any distro.

Thanks for helping me with this, @samueru
2024-11-26 13:07:53 -03:00
Jehan
10dc081c05 Issue #12469: Setting language to Chinese (zh_CN) in the preferences makes GIMP crash.
Make sure we always use the UTF-8 encoding, whichever the locale
language.
2024-11-26 22:26:40 +09:00
Rūdolfs Mazurs
4fcf9f7130 Update Latvian translation 2024-11-26 06:52:12 +00:00
Alx Sa
10b32c35b6 plug-ins: Read TIFF resolution correctly
Resolves #12468
In a2458f15, we converted xres and yres to gdouble since
gimp_image_get_resolution () requires doubles as arguments.
However, TIFFGetField () expects a float, and returns incorrect
values if a double is used as a parameter.

This patch converts xres and yres back to gfloat, and makes
new default_xres and default_yres variables as gdoubles to
use with gimp_image_get_resolution ().
2024-11-26 02:56:54 +00:00
Alx Sa
6a820e946f themes: Define GimpSpinScale slider padding values
We did not explicitly define the padding and margins for
the slider text and "progress" areas, which allowed for
system theme leaks. This patch defines these values and
makes the sliders visually closer to 2.10's style.
2024-11-25 19:57:36 +00:00
Rūdolfs Mazurs
7c275c96ed Update Latvian translation 2024-11-25 18:53:00 +00:00
Rūdolfs Mazurs
3a75022cf4 Update Latvian translation 2024-11-25 18:27:35 +00:00
Bruno
325074fec5 build/windows: Complete de3cf104 (regarding correct pyhton .exe)
I forgot to set rules to cleaning a previous Inno install. And they
need to be set since the previous .exe are from python3.11, not 3.12.
2024-11-24 17:37:32 +00:00
Alx Sa
c24ac78afd dialogs: Restore focus to Layer Name in Layer dialogue
In 2.10, the "Layer Name" field in the Layer dialogue was
auto-focused (perhaps because it was the first field in the dialogue). 
This patch restores this behavior so users can type the name and
press Enter/Return to continue their new layer workflow.
2024-11-24 17:31:00 +00:00
Rupert
4730ec4eb0 plug-ins: avoid log-spamming by tiff plug-in
* last log I checked had over 30.000 tiff msgs
* limit tiff_io_warning() and tiff_io_error() to a max of 3 msgs
2024-11-24 16:54:46 +00:00
Rupert
08fa28d6f9 plug-ins: avoid log-spamming by sgi plug-in
last log I checked had ~12.000 'sgiGetRow...' msgs
2024-11-24 16:54:46 +00:00
lloyd konneker
5b077a9232 Fix #12344 PDF export crash w stack smash on flatpak
Fix overflowing RGB array on the stack.

Revise comments to say painting opaque.
2024-11-24 16:24:45 +00:00
Jehan
b9bee21683 Issue #10874: crash when freeing uninitialized string.
Make sure the memory is 0-initialized because mapping->action_desc is
not necessarily initialized to an actual action.
2024-11-25 01:15:49 +09:00
Michael Natterer
64f45df6ce app: make sure pattern previews always have non-zero dimensions,
even if the pattern has an insane aspect ratio.
2024-11-24 16:58:52 +01:00
Jehan
e7523ed412 Issue #11822: fix double-free in edge cases of broken XCF.
A patch was originally contributed by Andrzej Hunt in #11822 (cf.
0002-xcf-fix-channel-s-reference-counts.patch in the report).

The diagnostic of the double PROP_SELECTION issue is right, but not the
fix which was over-reffing, hence leaking channels and buffers, in the
normal cases, just to avoid double-free in broken edge cases.

The other issue is not possible though (unreffing the image's selection
when encountering an error in xcf_load_channel()) because we explicitly
check it it's the image mask AFAICS.

I added a second test which was not double-freeing yet which deserves a
bit of stderr messaging: when 2 different channels have PROP_SELECTION
set.

Relevant text from the commit message originally contributed by Andrzej
Hunt is the following (diagnostic and ASAN output still of interest):

----------------

xcf_load_channel creates a new channel using gimp_channel_new. This
channel has a floating reference (because GimpChannel is a subclass of
GimpItem, and gimp_item_init uses g_object_force_floating()).

Next, three different scenarios can occur:
 - xcf_load_channel_props does nothing, and we either return channel, OR
   in the error case we g_object_unref (channel) which frees channel.
   The returned channel is either silently dropped (in the case where
   it's already been set as the mask), or added to the image using
   gimp_image_add_channel if not (which sinks the floating reference).
 - xcf_load_channel_props encounters a single PROP_SELECTION. We create
   a selection using gimp_selection_new (which again has a floating
   reference), transfer ownership of the new selection to the image
   using gimp_image_take_mask(), free the old channel, and finally set
   channel to point to this new selection. Back in xcf_load_channel, IF
   we hit the error case, we call g_object_unref (channel), which frees
   the new selection - but we're still using it as the image's mask,
   meaning we could eventually hit a use-after-free whenever someone
   reads the mask.
 - xcf_load_channel_props encounters 2 PROP_SELECTION's. After the first
   PROP_SELECTION, channel is pointing to the image mask, which has
   reference count == 1 (as explained above). When we hit the second
   PROP_SELECTION: we create another new selection, followed by calling
   gimp_image_take_mask() again. gimp_image_take_mask() call
   g_object_unref() on the old mask, which frees it - but channel is still
   pointing to this mask. We then call g_object_unref() on channel, which
   is effectively a double-free.

We fix this by making sure to always ref_sink whatever object is put
into channel. gimp_image_take_mask also calls ref_sink, which means
we'll now bump the refcount up to 2 when the channel is being used as
the image's mask (and drop back to 1 if the mask is replaced, and down
to 0 when channel is unref'd).

See also ASAN output below from the 2x PROP_SELECTION scenario:

==6381==ERROR: AddressSanitizer: heap-use-after-free on address 0x6150000047d0 at pc 0x7fb5531ef31b bp 0x7ffe81e86cb0 sp 0x7ffe81e86ca8
READ of size 8 at 0x6150000047d0 thread T0
    #0 0x7fb5531ef31a in g_type_check_instance_cast /home/ahunt/git/glib/_build/../gobject/gtype.c:4117:26
    #1 0xb2346b in xcf_load_channel_props /home/ahunt/git/gimp/app/xcf/xcf-load.c:1742:41
    #2 0xb1a3cc in xcf_load_channel /home/ahunt/git/gimp/app/xcf/xcf-load.c:2219:9
    #3 0xb147eb in xcf_load_image /home/ahunt/git/gimp/app/xcf/xcf-load.c:653:17
    #4 0xb121bb in xcf_load_stream /home/ahunt/git/gimp/app/xcf/xcf.c:305:19
    #5 0x619ead in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/app/fuzzers/xcf_fuzzer.c:50:17
    #6 0x51d414 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #7 0x507092 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:323:6
    #8 0x50d400 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:856:9
    #9 0x537452 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #10 0x7fb551e7c349 in __libc_start_main (/lib64/libc.so.6+0x24349)
    #11 0x4e0829 in _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:120

0x6150000047d0 is located 336 bytes inside of 504-byte region [0x615000004680,0x615000004878)
freed by thread T0 here:
    #0 0x5e8612 in free /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:127:3
    #1 0x7fb552d9ce08 in g_free /home/ahunt/git/glib/_build/../glib/gmem.c:199:3
    #2 0x7fb552dc7a6b in g_slice_free1 /home/ahunt/git/glib/_build/../glib/gslice.c:1183:7
    #3 0x7fb5531e7b04 in g_type_free_instance /home/ahunt/git/glib/_build/../gobject/gtype.c:2008:5
    #4 0x7fb5531bfe3a in g_object_unref /home/ahunt/git/glib/_build/../gobject/gobject.c:3604:11
    #5 0xd4d4d4 in gimp_image_take_mask /home/ahunt/git/gimp/app/core/gimpimage.c:3267:5
    #6 0xb23438 in xcf_load_channel_props /home/ahunt/git/gimp/app/xcf/xcf-load.c:1739:13
    #7 0xb1a3cc in xcf_load_channel /home/ahunt/git/gimp/app/xcf/xcf-load.c:2219:9
    #8 0xb147eb in xcf_load_image /home/ahunt/git/gimp/app/xcf/xcf-load.c:653:17
    #9 0xb121bb in xcf_load_stream /home/ahunt/git/gimp/app/xcf/xcf.c:305:19
    #10 0x619ead in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/app/fuzzers/xcf_fuzzer.c:50:17
    #11 0x51d414 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #12 0x507092 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:323:6
    #13 0x50d400 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:856:9
    #14 0x537452 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #15 0x7fb551e7c349 in __libc_start_main (/lib64/libc.so.6+0x24349)

previously allocated by thread T0 here:
    #0 0x5e887d in malloc /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x7fb552d9ccf2 in g_malloc /home/ahunt/git/glib/_build/../glib/gmem.c:106:13
    #2 0x7fb552dc72e0 in g_slice_alloc /home/ahunt/git/glib/_build/../glib/gslice.c:1072:11
    #3 0x7fb552dc78ae in g_slice_alloc0 /home/ahunt/git/glib/_build/../glib/gslice.c:1098:18
    #4 0x7fb5531e6e0a in g_type_create_instance /home/ahunt/git/glib/_build/../gobject/gtype.c:1911:17
    #5 0x7fb5531c215e in g_object_new_internal /home/ahunt/git/glib/_build/../gobject/gobject.c:1945:24
    #6 0x7fb5531c1d1f in g_object_new_valist /home/ahunt/git/glib/_build/../gobject/gobject.c:2288:16
    #7 0x7fb5531c0e8b in g_object_new /home/ahunt/git/glib/_build/../gobject/gobject.c:1788:12
    #8 0xdb7260 in gimp_item_new /home/ahunt/git/gimp/app/core/gimpitem.c:722:10
    #9 0xce1668 in gimp_drawable_new /home/ahunt/git/gimp/app/core/gimpdrawable.c:1067:14
    #10 0xe283e9 in gimp_selection_new /home/ahunt/git/gimp/app/core/gimpselection.c:626:13
    #11 0xb2342a in xcf_load_channel_props /home/ahunt/git/gimp/app/xcf/xcf-load.c:1735:15
    #12 0xb1a3cc in xcf_load_channel /home/ahunt/git/gimp/app/xcf/xcf-load.c:2219:9
    #13 0xb147eb in xcf_load_image /home/ahunt/git/gimp/app/xcf/xcf-load.c:653:17
    #14 0xb121bb in xcf_load_stream /home/ahunt/git/gimp/app/xcf/xcf.c:305:19
    #15 0x619ead in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/app/fuzzers/xcf_fuzzer.c:50:17
    #16 0x51d414 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #17 0x507092 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:323:6
    #18 0x50d400 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:856:9
    #19 0x537452 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #20 0x7fb551e7c349 in __libc_start_main (/lib64/libc.so.6+0x24349)

SUMMARY: AddressSanitizer: heap-use-after-free /home/ahunt/git/glib/_build/../gobject/gtype.c:4117:26 in g_type_check_instance_cast
Shadow bytes around the buggy address:
  0x0c2a7fff88a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2a7fff88b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa
  0x0c2a7fff88c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c2a7fff88d0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2a7fff88e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x0c2a7fff88f0: fd fd fd fd fd fd fd fd fd fd[fd]fd fd fd fd fd
  0x0c2a7fff8900: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
  0x0c2a7fff8910: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c2a7fff8920: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2a7fff8930: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2a7fff8940: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==6381==ABORTING

( crash-c35bcae86d35ce7d0cd8ffcb41a470f37354e018 )
2024-11-25 00:54:02 +09:00
Bruno
3b90d0b845 gitlab-ci: Fix untested commit that broke CI
b9f81e1c broke CI because it is a CI-related change but not tested on CI.
Despite https://developer.gimp.org/core/maintainer/giving-developer-right/
not making previous CI test mandatory, it is reasonable to do, even the infra
being sick. That is not the first time our CI got broken by lack of testing.
2024-11-24 10:59:15 -03:00
Anders Jonsson
52296cd3eb themes: fix System theme color for ink tool nib
Like in #11964 for Default theme, the nib handle for the ink
tool is invisible on the System theme. Fix this by adjusting
the solution in a4f9e7e89a for use with the System theme.
2024-11-24 13:03:19 +00:00
Jehan
986736f57f Issue #12433: do not show the unsupported fonts message on startup.
It seems any installation will have a lot of them (mostly because of
bitmap fonts which are now unsupported by Pango) and the message
startles people who believe there is something broken with GIMP.

Let's just not show this message on stable release builds, yet still
keep it on stable development builds (and all unstable builds, even
releases), because it is informative and keep us aware of this
limitation (which we hope to someday get rid of, i.e. get back support
of bitmap fonts, as well as any font format!).
2024-11-24 20:49:53 +09:00
Jehan
b9f81e1c0f gitlab-ci: add a more explicit error message when existing at the git diff CI test. 2024-11-24 20:38:26 +09:00
Jehan
74eb242587 pdb: sync enums.pl generated file with source.
My commit 0b792c22a4 was a beginner mistake as pdb/enums.pl is a
generated file. I also need to fix the source otherwise `git diff` will
always differe when generating the file.

Our CI in particular verifies that `git diff` is always empty so this
was breaking our gimp-debian-x64 CI job.
2024-11-24 20:34:43 +09:00
Jehan
58038990dc gimp-data: temporarily use Default icons as replacement of missing Legacy ones. 2024-11-24 08:51:21 +09:00
Alx Sa
7f09826d23 plug-ins: Fix fractal explorer crash related to color-mode
In activate_fractal (), we copy over preset Fractal values into the current
config object. Since "color-mode" is now a GimpChoice instead of an int,
this caused a crash when applied. This patch switches it to set a string in
g_object_set () rather than the original int.
2024-11-23 16:26:32 +00:00
Alx Sa
cd2d3bef85 themes: Fix menu style on context menus
In 9b917b8d, we defined the background and hover style
for the top menubar context menus. However, this did not
carry over to the menus for the on-canvas context menu.
This patch generalizes the CSS style so it affects both.
2024-11-23 15:13:53 +00:00
Bruno
19ab03e69f build/windows: Uninstall previous desktop .lnk icon again for RC2 and onwards
A regression introduced by a8b9bedf is that installing GIMP 3.0.0-RC1+git was
keeping GIMP 3.0.0-RC1 icon since an [InstallDelete] line was mislooked by me.

As a side note, to understand how the Windows versioning introduced by a8b9bedf
works, please read the latest base_gimp3264.iss file at 3.2.2 [Setup] section.
2024-11-23 09:34:37 -03:00
Ryan Sims
e682027b4b file-dds: Fix texture array loading
load_info.dxgi_format was not set after reading the DX10 header, leading
to DX10 texture arrays, volumes, and cubemaps not loading in multiple
layers
2024-11-23 01:32:09 +00:00
Jehan
01d8d2680f Issue #12409: make sure action tooltips are escaped when used as markup. 2024-11-22 16:37:51 +09:00
Jehan
121762d9b3 app: migrate the actions which used to have an -accel variant.
For this to work properly, I don't process them line by line, like all
other actions. Instead, I do a post-processing pass where I verify if
both variants were set, and if so, with an acceleration or with an empty
string. Indeed several cases are triggered:

1. We may migrate with 2 custom shortcuts on the same action;
2. we may mix 1 custom shortcut with one of the default shortcuts;
3. we may disable one of the default shortcut but not the other;
4. we may disable both shortcuts.
2024-11-22 09:03:25 +09:00
Jehan
bc89a8b046 app: migrate edit-paste-as-new-layer* actions.
These were removed in commit 2c4f91f585, though I do wonder if this may
not have been a mistake since edit-paste and edit-paste-in-place are not
exact equivalent. They may still create floating items in some cases.
But that's good enough for now.
2024-11-22 09:03:25 +09:00
Jehan
a6afbcbfe1 app: migrate *-gamma precision from templaterc and gimprc.
Since commit 2559138931, *-gamma precision were removed and this would
fail a templaterc file using such precision.
2024-11-22 09:03:25 +09:00
Jehan
2d9e8ef7bb app: better future-proof config migration.
This is an improvement over commit ce2a9dc3eb which was only meant to
work for GIMP 3.0. This new code should work for 3.2 and any future
version too. It will try to migrate any configuration folder from GIMP
2.0 to whatever is the current version.
2024-11-22 09:03:25 +09:00
Jehan
0b792c22a4 pdb: always set header to PDB enums, even when empty.
This fixes the following warning when generating gimpenums.h:

> Use of uninitialized value in pattern match (m//) at pdb/enumcode.pl line 71.
2024-11-22 09:03:25 +09:00
Alx Sa
054821b172 app/tools: Add filters even if Preview is unchecked
Should resolve #12436
Since we currently always apply filters with Aux nodes
destructively, we need to move them to the bottom of
the filter stack on creation. However, it's possible to have
the Preview checkbox unchecked when adding such a filter.

The current code does not add the filter to the stack until the
Preview is turned on. This can cause a crash when reordering
filters with Aux nodes, as they haven't actually been added yet.

Rather than duplicate code, this patch changes the code to always
apply the filters, then immediately set their visibility based on the
checkbox. This also adds a check to see if the filter stack actually
contains the filter before reordering.
2024-11-21 19:59:27 +00:00
Bruno
889c1f9896 build/windows: Fix not working WACK mode in MSIX script
The bug was introduced by 1380b899
2024-11-21 14:18:43 -03:00
Bruno
7b596bedbd build/windows: Make WinSDK detection code portable 2024-11-21 14:18:12 -03:00
Cheng-Chia Tseng
f5ca6e0151 Update Chinese (Taiwan) translation 2024-11-21 05:09:51 +00:00
Jehan
02199755ab Issue #12277: GIMP 3.0 RC1 opens Windows Console.
This is a followup of previous commit. We must set the win_subsystem
option on executable() so that the result binary is compiled as a GUI
application (and doesn't output a console every time).

The previous commit is still needed and is what allows us to control
when to actually display a console.
2024-11-21 04:23:10 +00:00
Jehan
fcf524fbc3 Issue #12277: GIMP 3.0 RC1 opens Windows Console.
This was a bug in the meson port which was not taking into account the
stable or release state of a build (unlike how it was in the old
autotools). The rules are:

* All unstable builds (release or not) have the console.
* Non-release builds in stable series have the console.
* Only release of stable series don't have the console.
* The RC of a stable release should behave as a stable release.
2024-11-21 04:23:10 +00:00
Cheng-Chia Tseng
b5e356265d Update Chinese (Taiwan) translation 2024-11-20 19:55:02 +00:00
Rupert
6c62856915 libgimp: avoid compiler warning in gimp_fix_xmp_tag() (#12127)
* compiler warned about terminating zero not copied
* removes all manual character counting
* static assert as a reminder that new string must be shorter, in case
  someone want to reuse the code with different strings
2024-11-20 17:30:30 +00:00
Bruno
0a9ba4491e build/windows: Distribute installer localized with not released Tamil lang
fa2b2b710f
2024-11-20 12:01:05 -03:00
Bruno
4ec072ed3a build/windows: Integrate Official langs download with 'iso_639_custom.xml' 2024-11-20 12:01:02 -03:00
lloyd konneker
34d47f1cb0 ScriptFu: port the test client to the SF server to Python 3
This is an app for testing only, and has no effect on the GIMP app.

Courtesy of Cameron Gregory.
2024-11-20 13:33:13 +00:00
lloyd konneker
9d444038a5 ScriptFu: fix #10741 tooltip and PDB description have underscore
Elide the underscore char from the blurb of the GParamSpec.
The tooltip remains redundant with the menu label.
We can't use an empty string (omit the tooltip)
because the blurb is also the description in the PDB Browser,
and the generated name of the arg is not descriptive.

FUTURE: let script author also declare a tooltip,
and a non-generated but unique name of the arg.
2024-11-20 12:48:10 +00:00
lloyd konneker
f8bd874a6f Fix #12360 SF server not returning same stream as version 2
Change SF server to load /scripts, just like extensio-script-fu.

This restores SF server to v2 behaviour re:
1) the content of responses
2) the need for a run_mode arg in calls to scripts

Thus calls to scripts (submitted to the server)
are evaluated without a call via the PDB to extension-script-fu.
This means such a call yields the string repr
of the last evaluated expression of the script,
instead of the string repr of a call via the PDB,
which is #t since scripts are declared in the PDB as returning void.

This also means the run-mode argument is not required in such calls,
since it is a call to a run_func in Scheme, which has no run_mode arg.

This also means that the SF server will continue to run
even if extension-script-fu crashes.

A test is that a call to a simple "echo" script, installed to /scripts,
yields the same response from the server in both GIMP 2 and 3.
2024-11-19 22:45:49 +00:00
lloyd konneker
9e1d0d7642 PDB: improve doc string for gimp-image-reorder-item
Discuss requirements on args.

Discuss reordering in a group versus moving to top-level.
2024-11-19 09:21:09 -05:00
lloyd konneker
c65cf25805 ScriptFu: tests: add tests of layer groups and item parent and position
Changes only test scripts.
2024-11-19 09:21:09 -05:00
lloyd konneker
da5dc1e303 ScriptFu: Fix #9286 gimp-image-reorder-fails
Make ScriptFu not check for invalid item ID, instead marshall to NULL
since gimp-image-reorder-item has a nullable arg.
2024-11-19 09:21:09 -05:00
lloyd konneker
f11784b8b2 ScriptFu: build: install test scripts on a release candidate
When version ends in "+git"
Same as for python file loader tests.
2024-11-19 09:21:09 -05:00
Bruno
de3cf104e3 build, plug-ins: Bundle and distribute correct python*.exe
According to Jernej and my searches pythonw.exe should be used for stable
releases and python.exe for unstable as commented in the changed files.
2024-11-19 09:30:57 -03:00
Alx Sa
a7a10be70f core: Refresh NDE filter crop after Transform Tools
Resolves issue #12252
Unlike the layer and image commands for scale layers,
the Transform Tools use gimp_item_transform () rather than
GimpDrawable's scale/rotate code. Therefore, the filter's crop
was not being refreshed, resulting in the layer being cut off
after the transform.
This patch moves the gimp_drawable_filter_refresh_crop ()
code to gimp_item_transform () so that the new layer size
is taken into account in the filter.
2024-11-19 03:27:36 +00:00
Daniel Novomeský
c08d2ecd40 plug-ins: fix crash in HEIF import 2024-11-18 16:52:59 +01:00
Bruno
f0fb443553 build/windows: Auto repair Inno langs if .ps1 script is interrupted
027013c7 was fine but not good enough. Without this new commit,
if you stop the script after touching the Inno lang files and run
the script again it would not restore the patched lang files so
patch over patch, producing something like "GIMP 3.0.0 3.0.0".

So, this new commit identifies if the script wasn't completed and
repair Inno installation before applying the patches again.
2024-11-18 12:03:40 -03:00
Alx Sa
a9056419ce app/tools: Use NDE filter's drawable for on-canvas transform grid
Resolves #12403
gimp_filter_tool_set_transform_grid () is used to draw the on-canvas
transform grid for filters. It always assumes that the tool's selected
layer should be used to define these boundaries.
With NDE filters, you might be editing a filter on a different layer than
the actively selected one. This patch checks if an existing filter is being
edited, and if so, we grab the drawable from the filter rather than from
the tool.
2024-11-18 15:02:47 +00:00
Alx Sa
8021b46414 pdb: Set choice args to default in gimp-file-save
In gimp_file_save (), we clear out the values
of any String parameters to prevent unexpected
results. However, GimpChoice is also a
String type. This causes the function to
fail because empty string is not a valid
option for GimpChoice.

This patch adds a prior check if the argument
is a GimpChoice, and sets it to its default
value instead to prevent this issue.
2024-11-18 13:32:38 +00:00
Julia Dronova
21d834ec9b Update Russian translation 2024-11-18 12:24:41 +00:00
Bruno
73bbb31242 build/linux: Make AppImage script work locally 2024-11-18 07:40:30 -03:00
Rūdolfs Mazurs
00dfe03904 Update Latvian translation 2024-11-17 13:29:44 +00:00
Rūdolfs Mazurs
b26d4972b1 Update Latvian translation 2024-11-17 12:57:08 +00:00
Rūdolfs Mazurs
3e324e6a7d Update Latvian translation 2024-11-17 12:56:02 +00:00
Bruno
32aeb4f630 build/windows: Make .ps1 scripts produce checksums in common format 2024-11-16 15:49:13 -03:00
Bruno
67c842b705 build/windows: Document 'App Paths' registration 2024-11-16 14:56:55 -03:00
Bruno
c15d9367b8 build/windows: Make backslashes more consistent in installer .ps1 2024-11-16 10:50:46 -03:00
Bruno
027013c7a0 build/windows: Make installer .ps1 script less pervasive
- Do not install Inno if it is already updated
- Delete unofficial langs after creating the .exe installer
- Ensure that all .isl files are kept as before the patching
2024-11-16 10:50:43 -03:00
Jiri Grönroos
9f876f06ad Update Finnish translation 2024-11-16 10:15:37 +00:00
Jiri Grönroos
6c846c14dd Update Finnish translation 2024-11-16 10:09:12 +00:00
Jehan
b13d4d9d17 app: use the "show all" value of the shell where cursor_image is displayed.
This is an attempt to fix #12333 where from the look of the trace, the
segfault may happen if it tries to dereference a NULL view->priv->shell
whereas we have a view->priv->cursor_image. Even though I couldn't
reproduce, I'm wondering if it may possible to have no active image
display while the cursor is indeed hovering an image.

Furthermore this updated code is more logical anyway, because we should
use the "show all" value from the actual display shell the cursor is
hovering, not from the active display shell.
2024-11-16 14:30:35 +09:00
Jehan
89fc9c6606 app: fix typo. 2024-11-16 11:33:27 +09:00
Anders Jonsson
1ead14f6ed app: fix dead link on RC releases
The welcome dialog creates a link to the release notes for stable
versions, but it also uses it for RC releases even if the
release notes for the final release haven't been written.

Check the version for "RC" to avoid creating dead links.
2024-11-15 22:25:59 +00:00
Bruno
743c4ed67d build/windows: Display 'DEVEL_WARNING' in RCs installer
This option wasn't implemented in the 2020s when the installer creation
process started to be done on CI, but this option was used in 2.10 RCs.
2024-11-15 19:17:36 +00:00
Alx Sa
8249151299 libgimp: Draw full gradient in GradientChooser button
When we converted to GeglColor arrays in 6327d1b3, we
didn't adjust the call to gimp_gradient_select_preview_draw ()
that still assumed we passed in 4 doubles per pixel instead
of 1 GeglColor. This patch removes the division operation so
that we see the full gradient in the chooser button.
2024-11-15 16:12:34 +00:00
Sveinn í Felli
f40f9bcff1 Update Icelandic translation 2024-11-15 11:49:37 +00:00
Jehan
ffee5cc98e gitlab: ask about display system on Linux in our default bug report template. 2024-11-15 12:32:10 +09:00
Alx Sa
45d0d4bef2 app/core: Use babl for histogram luminance values
This replaces the GIMP_RGB_LUMINANCE () macro with
babl_process () to retrieve luminance from pixels
in GimpHistogram. This allows us to consider the
color space during the conversion, rather than assuming
sRGB always.
2024-11-14 19:29:49 +00:00
Kolbjørn Stuestøl
a24d95d9cb Update Norwegian Nynorsk translation 2024-11-14 18:52:17 +00:00
Sveinn í Felli
444695cc1f Update Icelandic translation 2024-11-14 17:54:17 +00:00
Alx Sa
0cd0206917 app/plug-in: Fix expected argument count for Layer/Channel menus
Resolves issue #12365
Per Kamil Burda, since we no longer have an array length parameter
for layer and channel procedures, the required minimum size of
procedure->num_args should be 3 and not 4.
2024-11-14 13:25:06 +00:00
Alx Sa
56d207e98d plug-ins: Fix color format for Smooth Palette...
...when drawable has alpha channel.
We always created GeglSamplers in RGB format,
but used the original drawable's format to create a
GeglBuffer. If the original drawable had an alpha
channel, this caused "glitchy" results since not
enough data would be copied into the new buffer.
This patch resolves the issue by making the format
match the original drawable's number of channels.

Resolves Issue #12362.
2024-11-14 11:33:14 +00:00
Daniel Novomeský
c0395d1d4b plug-ins: fix grayscale+alpha JXL import 2024-11-14 11:10:22 +00:00
Bruno
7fc13e398d build/windows: Fix 'graphviz' bundling and only bundle it if GIMP_UNSTABLE=1
This was broken, see #12119. Now is fully bundled with DLLs and config, but
will not work on .exe installer because gegl have bugs: GNOME/gegl#394.

However, this should be bundled only in dev releases (due to "Debug" menu).
But not for 32-bit because MSYS2 doesn't provide 32-bit pango plugin for dot.
2024-11-14 07:30:19 -03:00
Bruno
db0a12463c build/windows: Reference "correct" gimp executable on .cmd wrapper 2024-11-14 07:30:15 -03:00
Bruno
e22fb67dba build: Bundle jpeg, gif and tiff loaders for non-PAT patterns support
Fixes: #12351

In short, some time ago we were asked by a MSYS2 guy about the possibility of
they dropping pixbuf loaders and some of us said that we just need SVG/PNG for
UI. I tested and confirmed it so the debloating (c808d13b) kept only these two.

However, seems that was said in the same discussion that we also need others for
non-PAT pattern loading. After testing, let's bundle JPEG, GIF and TIFF loaders
following: https://testing.docs.gimp.org/3.0/en/gimp-concepts-patterns.html

BMP is already bundled for legacy clipboard (a4671d72) and will work here too.
PNG too, of course, otherwise GIMP UI wouldn't even load, as pointed above.

---

Other formats are supported by pixbuf but some can make patterns: unportable,
e.g. HEIC (my ponderation); or even buggy, e.g. WEBP (@ok ponderation). So,
let's NOT bundle all loaders like before the debloating, just the safe ones.
2024-11-13 22:22:37 +00:00
Kolbjørn Stuestøl
428eeb8190 Update Norwegian Nynorsk translation 2024-11-13 20:27:42 +00:00
Kolbjørn Stuestøl
014cda5dd9 Update Norwegian Nynorsk translation 2024-11-13 20:26:22 +00:00
Bruno
711ed64f38 build/windows: Separate "MSYS2" prefix from GIMP_PREFIX in crossbuilds
This finally makes our crossbuild scripts work like in all other platforms:
with GIMP_PREFIX separated from the system/MSYS2 prefix. Thanks, @Jehan.

For some reason this makes meson don't find only 'bzip2' headers provided by
the cross compiler so, in crossbuilds, let's use the ones provided by MSYS2.
2024-11-13 10:51:34 -03:00
Jehan
ce2a9dc3eb Issue #12317: settings not imported from previous versions.
This was looping down from the minor version which is 0 for GIMP 3.0.0!
2024-11-12 22:20:43 +01:00
Alx Sa
abd863579b dialogs: Don't show Check for Updates button on About Dialog...
...when "check-release" is set to FALSE on build.
This is consistent with the option being hidden in the Welcome Dialog
and Preferences Dialog.
2024-11-12 19:37:24 +00:00
Sveinn í Felli
ab5b4718df Update Icelandic translation 2024-11-12 16:57:50 +00:00
Sveinn í Felli
ae134c75b6 Update Icelandic translation 2024-11-12 16:46:56 +00:00
Kolbjørn Stuestøl
b028694373 Update Norwegian Nynorsk translation 2024-11-11 19:19:28 +00:00
Kolbjørn Stuestøl
7da4bb0656 Update Norwegian Nynorsk translation 2024-11-11 19:17:58 +00:00
Bruno
10f8b5a1c1 build/windows: Fix bundle() function not working locally
I needed to make very rushed fixes (like 0b19f8c9) to release RC1 in
time so didn't have time to test locally.
2024-11-10 19:00:10 -03:00
Bruno
a4671d721b build/windows: Bundle bmp pixbuf loader again to proper clipboard support
Fixes: #4802 and #12148

This is needed to paste some images sent to Windows clipboard as .bmp.

---

Also, comment the reason to bundle the other loaders and the gio folder.
2024-11-10 14:03:12 -03:00
Bruno
9fa2461ecc build/windows: Distribute python3.12 on the .exe installer
Just routine maintenance otherwise the installer will not build. We need to
manually change this since Inno does NOT support wildcards on directories.
2024-11-10 09:54:03 -03:00
Bruno
19b392048f build/windows: (Probably) finalize .iss organization
This should be enough to make Inno scripts humanly readable,
a long process started in 9af3579f.
2024-11-10 09:30:21 -03:00
Jordi Mas
9525d67057 Fixes to Catalan translation 2024-11-10 13:28:35 +01:00
Alx Sa
6ff3e80d0b app/display: Initialize GimpDisplayShell's unit property
Since GimpUnit is now an object, if it's used in functions while
NULL it can cause issues. This patch initializes it to
gimp_unit_pixel () to remove the CRITICALs we received when
setting up rulers when "Show All" is enabled.
2024-11-09 22:09:20 +00:00
Cheng-Chia Tseng
817e19ee38 Update Chinese (Taiwan) translation 2024-11-08 18:53:20 +00:00
Cheng-Chia Tseng
a38295c17e Update Chinese (Taiwan) translation 2024-11-08 18:53:09 +00:00
Cheng-Chia Tseng
9f0bcb7bbc Update Chinese (Taiwan) translation 2024-11-08 18:46:34 +00:00
Jehan
aed9eabaa3 app: fix gimp_procedure_set_icon_file() from libgimp.
Plug-in procedures are passed as a URI, not as a path, when set with
gimp_procedure_set_icon_file().
2024-11-08 11:51:06 +01:00
Cheng-Chia Tseng
799beb0f5d Update Chinese (Taiwan) translation 2024-11-08 03:39:14 +00:00
Cheng-Chia Tseng
c7c243d2e5 Update Chinese (Taiwan) translation 2024-11-08 03:27:44 +00:00
Jiri Grönroos
677b517615 Update Finnish translation 2024-11-07 21:29:25 +00:00
Jiri Grönroos
deaee3568d Update Finnish translation 2024-11-07 21:25:45 +00:00
Jiri Grönroos
8e8a940a1f Update Finnish translation 2024-11-07 21:16:08 +00:00
Jiri Grönroos
8b72211e38 Update Finnish translation 2024-11-07 20:57:22 +00:00
Bruno
a4d2fbc922 build/windows: Bundle and distribute gspawn*.exe to be able to open links
This file has stopped of being bundled in c808d13b as a consequence of a
bad practice of the past: not documenting the purpose of bundled files.

Let's bundle it again commenting the reason so the future generations can
understand why it is bundled: gspawn*-console is needed to open hyperlinks.
Of course, it does more than this, but one use case is enough to understand.

The warning "Couldn't export handle, unsupported windowing system" still will
be output on terminal since the fix (GNOME/gtk!7694) wasn't released yet.

---

Also, clarify commenting other bundled files and dirs in the bundling script.
2024-11-07 16:18:18 +00:00
Bruno
a065b097eb gitlab-ci, build/windows: Make Windows building issues clearer 2024-11-07 16:18:18 +00:00
Bruno
1aefa4075c build/windows: Build reference docs again
Since the bug described on fbb484c5 is fixed, let's build them again
so we not mislook problems that could be present in vanilla Win builds.

Do not confuse with 'g-ir-doc', which is broken on Windows: #11200
2024-11-07 16:18:18 +00:00
Cheng-Chia Tseng
7b8c09ae3c Update Chinese (Taiwan) translation 2024-11-07 15:28:28 +00:00
Bruno
0fc459ce6d build/windows: Build with vala support again
This was removed in 9ab481647c because in
my tests vapigen wasn't working in PS but now it is working(?). Good, then.
2024-11-06 09:51:38 -03:00
Bruno
72ebbcf827 build/windows: Little cosmetic changes post-RC1 2024-11-06 07:39:53 -03:00
Bruno
c503eea378 build/windows: Fix arch detection code on Store script
$PROCESSOR_ARCHITECTURE is always evaluated to AMD64 so
let's use a more reliable method which can detect other archs.
2024-11-06 07:39:49 -03:00
Jacob Boerema
15f5b15e69 ci: fix test-file-plug-ins job
This job fails because our test plug-ins isn't installed in stable or
release versions. However we are in a RC1 status which leaves stable
and release true.

Let's fix this by checking for "+git" at the end of the version string
and also installing our plug-in if that is found.
2024-11-05 12:03:41 -05:00
Jehan
01a15f113b meson.build: post-release version bump to 3.0.0-RC1+git.
Intermediate RC versions used to be suffixed "-git" but gi-docgen
doesn't like this (or to be more accurate the packaging.version module
used by gi-docgen considers this an invalid version).

But it allows with a '+' (it calls it the local version segment). So
let's go with this new formatting.
2024-11-05 01:15:30 +01:00
Jehan
76036f4833 Release release candidate GIMP 3.0.0 RC1. 2024-11-04 22:17:55 +01:00
Jehan
5274f0a147 gitlab-ci: fix packaging babl and GEGL docs. 2024-11-04 22:05:15 +01:00
Bruno
aad76c6189 gitlab-ci: Build Installer and Store assets in releases
Following dffefa1b67

That's so obvious but I forgot it.
2024-11-04 18:24:29 +00:00
Bruno
0b19f8c9ce build/windows: Bundle headers again
Let's keep as it is for now and evaluate in the future.
2024-11-04 13:09:07 -03:00
Bruno
ce77f50dda build/windows: Prepare Installer scripts to RCs versioning and beyond
Adds GIMP_MUTEX_VERSION var to make possible to change the way we handle
multiple GIMP installations without needing to manually change parts of
the script to MAJOR or GIMP_APP_VERSION like a zoombie.

Also, this reorganizes some sections of the .iss file (for the third time)
and make LZMA multi threading the default even for stable builds.
2024-11-04 13:09:04 -03:00
Bruno
92bff66e1c build/windows: Stop PowerShell scripts if a command fails
This works like 'set -e' and is available only from PS 7.4 and onwards.
As a workaround, let's manually check the exit code in earlier versions.
2024-11-04 13:09:00 -03:00
Bruno
1380b899bf build/windows: Refactor Store versioning code to make sense
The previous code was ugly to see and hard to understand.
2024-11-04 13:08:57 -03:00
Alx Sa
c408d44e03 plug-ins: Fix crash for bumpmaps without alpha channels
979a3c3c assumed that all bumpmaps in the Lighting Effects plug-in
would have an alpha channel, which is not always the case.
This patch adds a check via gimp_drawable_has_alpha (), and sets the
babl format accordingly.
2024-11-04 11:11:27 +00:00
Jehan
fe6e1d77c8 tools: fix generating welcome dialog data for RCs.
Not sure why, but previous RCs' versions were written all lowercase and
with a tilde separator, so I just used the same syntax, but that won't
fly with how we will write it in the main meson file. So let's do a few
string fixes to make both syntax match.
2024-11-04 03:28:48 +01:00
Jehan
7faf646790 desktop: update release date.
We are very likely releasing on Monday 4, and not even now but after a
good night. The whole Gitlab infrastructure is clearly half-borked right
now, we are constantly waiting for runners, sometimes we get random
error 500 when loading Gitlab pages, sometimes some stuff get stuck on
display and we need to refresh.

Not only this, but the Flathub infra is also broken (I believe it's also
hosted by GNOME?) and all our builds are either failing or sometimes
going further then failing at "Committing builds" or other steps,
usually with some HTTP error.
It's not the wisest idea to make a RC1 release in such condition.
2024-11-04 03:28:48 +01:00
Jehan
2a80218455 build: fixing git ls-remote call.
There were 2 issues:

* The tag needs to start with the project name in uppercase.
* For GEGL repo, the last item was some very old tag. Make a pattern a
  bit more accurate (though it's only glob, so it's not that accurate
  either, but hopefully will work out in future too).
2024-11-04 02:27:28 +00:00
Bruno
e2614019b6 gitlab-ci, build/linux: Give .flatpak artifact a "standard" name
Every artifact from our CI have a pretty name with some reason for it:
- Installer: it is this way on download.gimp.org since ever(?) and that's fine
- Store: follows Microsoft de facto spec of .msix files naming
- AppImage: follows AppImage draft spec of .appimage files naming

But the .flatpak just looks like AUR pkg. So, let's use reverse DNS
naming which is used at least for .flatpakref files. This makes more sense.
2024-11-04 01:52:20 +00:00
Jehan
380d60da86 NEWS: update. 2024-11-04 01:19:34 +01:00
Alx Sa
c1c38228a2 app/core, widgets: Partially revert 59b7b6a5 and d4166013
While they work well, the gegl_node_get_bounding_box ()
call causes the entire filter stack to refresh
each time we need to update the filter stack.
This slows down rendering significantly.
For 3.0 RC1, it's better to have good performance
and deal with the less common crop
issue for now. We'll work to find a better
performing solution for 3.0.
2024-11-03 21:57:18 +00:00
Jehan
9c226d5e77 app*, docs, tools: -Denable-default-bin=enabled will also install a gimp-major binary.
On Windows, it will basically be a copy of the main binaries. On other
OSes, it will be symlinks.
This will help for Windows installers where we want to use major version
only in registry and we need a binary named appropriately for this
apparently.

As for the "major" version, I will in fact use the next major when minor
is 99 (also called API major version), not that it will matter much very
soon!
2024-11-03 22:55:39 +01:00
Jehan
cac4c094e6 plug-ins: fix gradient-flare after recent gimp_gradients_get_list() changes.
Not sure why it was failing on my native build, but I caught this in the
cross-build.
2024-11-03 22:55:39 +01:00
Øyvind Kolås
efe14ec0ff app: depend on GEGL-0.4.50 2024-11-03 21:03:17 +01:00
Jehan
42a3dacb61 meson: update GEGL dependency. We rely on new API from there. 2024-11-03 20:22:46 +01:00
Jehan
2559138931 libgimp*, pdb, plug-ins: remove deprecated GIMP_PRECISION_*_GAMMA.
These were the last deprecated values in libgimp AFAICS.
2024-11-03 20:18:52 +01:00
Jehan
6ac920542e Issue #11653: Revise plug-in procedures that convert parameters from…
… legacy to gegl parameters.

This commit removed 57 legacy PDB procedures which were replacing
outdated plug-ins (before transformed into GEGL ops) as far as I
understand.

These were all kept only as a legacy compatibility layer for third-party
scripts. Since we are breaking API anyway, let's remove as many as we
can. I've only kept the few which are still used at least once in our
core scripts or plug-ins.

Now as pippin notes, we still have no easy way to quickly run GEGL ops
on drawables in script-fu. Though we have at least access to GEGL API
for C plug-ins and all GObject-Introspected bindings. But that's true
for all other ops anyway.

I guess what should happen (quickly-ish) after 3.0 release is a libgimp
utility function which does the heavy lifting of creating a GEGL graph
for us, and for script-fu probably a special-case binding or something.
2024-11-03 18:56:33 +01:00
Jehan
b9db9cc865 NEWS: update. 2024-11-03 17:45:10 +01:00
Jehan
e9e7afa14f app, libgimp, pdb: removing gimp_fonts_get_by_name().
I realized it is redundant with gimp_fonts_get_list() which is a bit
more complicated to use but also more powerful. Let's see if we ever
need the simpler utility function in the future.
2024-11-03 17:45:10 +01:00
Jehan
a7064a18c3 app, libgimp, pdb: renaming a few PDB functions.
- s/gimp_buffers_get_list/gimp_buffers_get_name_list/
- s/gimp_context_get_dynamics/gimp_context_get_dynamics_name/
- s/gimp_context_set_dynamics/gimp_context_set_dynamics_name/
- s/gimp_dynamics_get_list/gimp_dynamics_get_name_list/

Named buffers and dynamics don't have their own classes. Using
*_get_name_list() will make sure that *_get_list() is available so that
we have constant naming if we add the new types, even during the 3.0
series. Same for the gimp_context_*() functions.

Note that the buffer API in particular has a few more functions which
we'd like to be able to reuse (e.g. gimp_buffer_rename()) with a proper
type. But we'll probably name this type GimpNamedBuffer anyway
(GimpBuffer is too similarly-named with GeglBuffer IMO) so it will be
easy to create new API for the new type.

See also #12268.
2024-11-03 17:45:10 +01:00
Jehan
6541e4d8da app, libgimp, pdb: gimp_*_get_list() for various resource types return a resource array.
There are 2 *_get_list() for buffers and dynamics but since we don't
have clases for these, they still just return a list of names for now.
I opened #12268 for further thinking on these.
2024-11-03 17:45:10 +01:00
Alx Sa
3c56c90763 plug-ins: Use more of the GIMP-specific darktable API
In a28b1bad, we ported the darktable detection code to use their
new API for darktable 4.6.1. However, the image and thumbnail loading
code was not ported as it still worked fine in that version. This patch
continues the port by making the the image and thumbnail functions
use the new API if darktable 4.6+ is installed.
2024-11-03 16:21:16 +00:00
Bruno
fb5e72fbbf build/linux: Build 'openblas' with DYNAMIC_ARCH enabled (for now)
Fixes: #12237

We were building with that option disabled here because it was making our
runners to randomly fail at building it. However, that option disabled also
makes some machines to fail, due to its low-level nature. So, there is no
fix for it(?), let's enable then and hope the runners willn't fail again.
2024-11-03 10:55:30 -03:00
Bruno
9d8e20f432 build/linux: Build flatpak with GCC to avoid LLVM/freedesktop branch hell
Despite building GIMP with Clang helped a lot to make our deps builds robust,
it is very hard to maintain, not because of LLVM but because of freedesktop.
We needed to ensure that the branch of LLVM matched the one of freedesktop on
which GNOME SDK is based. That stopped to work resulting on bad inconsistency:
1) flathub never had a problem; 2) GNOME runners sometimes worked, others not;
3) locally it stopped to work completely, so the .json right now is unportable.

Some annoying bugs were:
- "error: Requested extension *llvm* not installed"
- "Similar refs found for *llvm*"

So, let's end this not using any extension anymore while keeping only the nice
improvements in the custom builds.
2024-11-03 10:55:27 -03:00
Bruno
5284b5258f build/linux: Clean Flatpak dist stage output 2024-11-03 10:55:23 -03:00
Bruno
d5c7c9304c build/linux: Stop Flatpak scripts if any command fails 2024-11-03 10:55:19 -03:00
Bruno
1182d7606c build/linux: Make flatpak scripts humanly readable
Despite my good intentions in the previous structure, it
was just too complicated and not linear to read. Let's
make it more orthodox.
2024-11-03 10:55:08 -03:00
Bruno
975a462dc2 build/linux: Instruct contributors about flatpak-builder dependency
GNOME docker image and Flathub runner seems to use edge flatpak-builder,
which auto set -DCMAKE_INSTALL_LIBDIR option, crucial for some deps.
Pre-1.4.3 versions don't do this so the build fails in some machines.
Let's prevent this making the script more clear about flatpak-builder.
2024-11-03 10:48:27 -03:00
Jehan
5ed3bc33e0 app, libgimp, pdb: gimp_gradient_get_custom_samples() also returns an array of colors. 2024-11-03 13:35:16 +01:00
Jehan
6327d1b3ef app, libgimp, pdb, plug-ins: gimp_gradient_get_uniform_samples() returns an array of GeglColor. 2024-11-03 13:35:16 +01:00
Alx Sa
9b23c35c30 libgimpwidgets: Replaced deprecated gtk_icon_theme_add_builtin_icon ()...
...with gtk_icon_theme_add_resource_path (). Per Wormnest in !1027, this function
might not even be necessary at all. But until removing it can be completely tested,
this patch at least removes the deprecation warning for GIMP 3.0 RC1.
2024-11-02 23:26:18 +00:00
Jehan
3c1c4e7326 meson: fix format of generated authors.md.
Pelican did not like a quoted date and produced an error. Not sure what
changed, because pretty sure this output used to work fine, but…
whatever, let's fix it.
2024-11-02 15:52:46 +01:00
Jehan
dc3e815ff0 app, libgimp*, pdb, plug-ins: rename various public API name s/float/double/.
Several types functions were using the wording "float" historically to
mean double-precision, e.g. the float array type (which was in fact a
double array). Or the scanner function gimp_scanner_parse_float() was in
fact returning a double value. What if we wanted someday to actually add
float (usually this naming means in C the single-precision IEEE 754
floating point representation) support? How would we name this?

Now technically it's not entirely wrong (a double is still a floating
point). So I've been wondering if that is because maybe we never planned
to have float and double precision may be good enough for all usage in a
plug-in API (which doesn't have to be as generic so the higher precision
is enough)? But how can we be sure? Also we already had some functions
using the wording double (e.g. gimp_procedure_add_double_argument()), so
let's just go the safe route and use the accurate wording.

The additional change in PDB is internal, but there too, I was also
finding very confusing that we were naming double-precision float as
'float' type. So I took the opportunity to update this. It doesn't
change any signature.

In fact the whole commit doesn't change any type or code logic, only
naming, except for one bug fix in the middle which I encountered while
renaming: in gimp_scanner_parse_deprecated_color(), I discovered a
hidden bug in scanning (color-hsv*) values, which was mistakenly using a
double type for an array of float.
2024-11-02 15:00:03 +01:00
Alx Sa
cec189bd40 plug-ins: Don't show pixel ratio warning for IFF thumbnails
Like GIFs, Amiga IFFs can have pixel aspect ratios that aren't 1 to 1.
We have a warning for users when they load these kind of IFFs, so
they know to switch Dot for Dot mode off.
However, unlike GIFs, we don't have a thumbnail loader for IFFs.
So, this warning pops up even when users are scrolling through the
file dialogue. Since many Amiga IFFs have alternate PAR values, this
means a lot of pop-ups. This patch adds essentially a "dummy" thumbnail
procedure so we can stifle this warning unless we're actually loading
the IFF image.
2024-11-02 04:41:57 +00:00
Jehan
1013bacc44 NEWS: update. 2024-11-02 05:03:16 +01:00
Jehan
6402753692 app: migrate also from ~/.var/ if the 2.10 folder is not found in XDG config home.
So this one is a complicated beast, because inside the flatpak's
sandbox, ~/.var/ will not be the same as on the host (even with home
permission). In particular, we won't be able to find the 2.10 config folder in
there when running GIMP 3.

Yet local ~/.var/app/org.gimp.GIMP/config/ is in fact be mounted to
/var/config/! So inside the sandbox, this is where we must look in to
find a previous 2.10 config folder.

With this change, both flatpak and non-flatpak GIMP should be able to
find a 2.10 config folder both in the host XDG_CONFIG_HOME and inside
~/.var/ by:

* First looking inside XDG_CONFIG_HOME;
* Then looking in ~/.var/app/org.gimp.GIMP/config/ (which in non-flatpak
  environment will find a former flatpak config folder);
* Finally looking in /var/config/, but only is /.flatpak-info exists (so
  we are in a flatpak, and in there, this is the mapping for the host
  ~/.var).

This is not tested inside the flatpak sandbox yet.
2024-11-02 03:08:51 +01:00
Jehan
da8821169f app, libgimpcolor, plug-ins: move legacy luminance macros to private.
This was bothering me that we were keeping these macros marked as legacy
in our public headers. Now they aren't so we can delete the whole file
when we'll finally get rid of all usage later, without breaking API.
2024-11-02 00:27:02 +01:00
Jehan
0249c1c136 libgimpbase: clean out trailing newline. 2024-11-02 00:27:02 +01:00
Jehan
519f0bf817 libgimp, libgimpbase: don't uselessly expose param spec structs when…
… they are the same as the parent struct.
2024-11-02 00:27:02 +01:00
Jehan
8075474fda libgimp, libgimpbase, libgimpconfig: GimpParamSpecChoise's parent should be GParamSpecString. 2024-11-02 00:27:02 +01:00
Jehan
a0fa9cc191 app, libgimp*, pdb, plug-ins: capabilities should not be part of GimpParamSpecExportOptions.
The param option just contains an options object, not a separate
capabilities. Also even when passing the options object across the wire,
the capabilities within this object are not part of the "options". These
are actually handled separated by GimpExportProcedure.

Therefore the changes are:

* GimpExportCapabilities moved to gimpbaseenums.h with a proper GType.
* "capabilities" properties are changed to flags param spec with type
  GimpExportCapabilities.
* GimpParamSpecExportOptions doesn't have a capabilities variable
  anymore.
* Consequently gimp_param_spec_export_options() doesn't have a
  capabilities arg.
* Wire protocol updated as we don't need to pass any capabilities
  neither for the param definition, nor for the argument values.
* GimpExportOptionsEditFunc renamed GimpExportGetCapabilitiesFunc and
  returning GimpExportCapabilities flags, instead of setting the
  "capabilities" property. I believe it makes it much more obvious what
  this callback is for and how to use it.
* Annotations improved or completed.
* Don't make the GimpParamSpecExportOptions public anymore since it is
  the same as its parent.
2024-11-02 00:27:02 +01:00
Jacob Boerema
6934fd20e0 app: add help ids for Paste as floating data (in place)...
since it was duplicating ids. Having unique ids makes it easier to
limk to each command in the documentation.
2024-11-01 17:25:27 -04:00
Sabri Ünal
222fd3bb32 Update Turkish translation 2024-11-01 18:17:24 +00:00
Jehan
5b0a1d2934 libgimpbase: GimpParamSpecExportOptions derived from GParamSpecObject. 2024-11-01 17:22:07 +01:00
Jehan
5f4464445f libgimp*: keep 10 reserved spots for future virtual functions in every derivable class.
Hopefully this should be enough to add new features in the future
without breaking ABI, at least until GIMP 4!
2024-11-01 17:22:07 +01:00
Alan Mortensen
05795c404b Update Danish translation 2024-11-01 14:59:53 +00:00
Alan Mortensen
dbefe66b9c Update Danish translation 2024-11-01 14:58:37 +00:00
Alan Mortensen
7ba6fb80bf Update Danish translation 2024-11-01 14:58:31 +00:00
Alan Mortensen
3dc1458f5b Update Danish translation 2024-11-01 14:57:01 +00:00
Jehan
724e317272 libgimpwidgets: GimpFileEntry is not public anymore.
The whole widget was made deprecated in 2006 (commit 99f979e118) but it
is still being used by another widget. Since we can break API, I at
least hide the functions and type by making these private.

This will give us time to think if we really need this widget (or a
nicer implementation for this widget) or if we just want to get rid of
it.
2024-10-31 19:54:43 +01:00
Rupert
173d7640b7 plug-ins: Clean up BMP plug-in
This patch adds additional error handling
to the BMP plug-in. It also translates certain
variable names from German to English,
replaces magic numbers with existing
constants, and simplifies some formulas.
2024-10-31 17:31:17 +00:00
Juliano de Souza Camargo
9d5ece437d Update Brazilian Portuguese translation 2024-10-31 11:16:55 +00:00
Jehan
f57b831eaf Issue #12117: undo history corruption. 2024-10-30 19:14:21 +01:00
Jehan
39e1b409a3 meson: preparing accepting -RC<num> at the end of the project()'s version string. 2024-10-29 13:02:44 +01:00
Jehan
2076541011 INSTALL: update.
* Don't mention 2.99 anymore.
* GIMP_PKGCONFIG_VERSION was actually the version of libgimp regarding
  our .pc file, not our pkg-config requirement (per the commit removing
  autotools scripts). Now it looks like our pkg-config minimum
  requirement used to be version 0.16, but I didn't add this check back.
  Let's assume just saying "a recent version" in the INSTALL file is
  enough, without hard-check in meson.
* Simplify the end part about failed configuration or optional features,
  with a link to our build tutorial online instead of getting into
  details and advices to set LDFLAGS or CPPFLAGS (which to be fair, am
  not sure are very good advices at all in fact!).
* Fix a few more details.
2024-10-29 13:01:07 +01:00
Alx Sa
08ddc9fe96 app/widgets: Hide the layer search button on non-layer dockables
Currently the search feature in the Layer dockable is also visible on
the Paths and Channels dockable as well. However, it has hardcoded
strings that refer to layers, and it uses gimp_item_list_get_items_by_substr ()
which only works on layers. We should hide it for 3.0RC1 and implement
it for the other two ItemTreeView children afterwards.
2024-10-29 01:45:43 +00:00
Jehan
a38d4d2222 authors: update.
I'm surprised that Idriss and Shubham were not already in the file!

Also adding Denis for his design work, and Sevenix for the splash
screen.

Bruno was added for the awesome work in packaging and CI. Even though
it's not GIMP itself, it definitely counts as code and original work.

I didn't add the new GSoC contributors because Varun's work is
essentially in GEGL (which has its own credits) and there was no major
original feature pushed by Cheesequake unfortunately, only bugfixes. So
I'm unsure if we can add them.
2024-10-29 01:28:47 +01:00
Jehan
b57fae7873 README: update for the upcoming RC1. 2024-10-29 01:12:13 +01:00
Bruno
d9710697d6 build/linux: Sync with beta manifest updating some modules
Ported from: f381737705

This updates openexr, libdeflate, poppler and suitesparse, after testing them.
2024-10-28 20:40:50 -03:00
Jehan
496c799e2e Issue #3015: Space invasion: Using Levels Pick white point for all…
… channels doesn't work.
2024-10-29 00:27:22 +01:00
Cheesequake
366ba98efe Issue #11675: Fade x Jitter dynamics now sync correctly at every step 2024-10-28 22:40:51 +00:00
Jehan
7d6a7552ec NEWS: update. 2024-10-28 22:17:14 +01:00
Jehan
86f588224b libgimp, libgimpbase: create special functions to get/set boxed array properties.
While the work on NULL-terminated array types make it much easier in C,
bindings don't have enough information to create native array/list types
in some generic functions such as g_object_get|set(), or else we just
don't know the right annotations to use for this to be possible. This is
report gobject-introspection#492.

So for the time being, we are creating dedicated functions for GeglColor
arrays and for other core object arrays (arrays of images, items, etc.).

E.g. in Python, while you can set a single GimpImage like this:

> config.set_property('image', image)

… you need to set a list of images like this:

> config.set_core_object_array('images', [image1, image2])
2024-10-28 22:08:45 +01:00
Jehan
a42142d5a0 libgimpwidgets: delete unused variable.
Checking the log, it looks like this code has not been touched since
2007, so whatever this various was used for, it's clearly not been used
for a long time.

Fixes warning:

> libgimpwidgets/gimpcairo-utils.c:80:16: warning: variable 'total_length' set but not used [-Wunused-but-set-variable]
2024-10-28 22:08:45 +01:00
Jehan
b01b2e2683 plug-ins: comment out unused function.
Fix warning:

> plug-ins/file-dds/dxt.c:113:1: warning: unused function 'pack_rgb565'

I don't just remove it as I guess it may be of use at some point for a
not-yet fully implemented feature yet?
2024-10-28 22:08:45 +01:00
Jehan
8900967a81 extensions, libgimp, plug-ins: remove n_drawables arg from GimpImageProcedure's…
… run() function.

This is more consistent with recent changes in PDB, and now the
drawables argument is NULL-terminated.
2024-10-28 22:08:45 +01:00
Jehan
ea5824ebd7 app, libgimp, pdb: fix other int sizes.
Avoid the stack smashing bug from yesterday in other functions.
Additionally to fixing other functions, do not cast the pointer to size
in the PDB generation scripts so that we can quickly spot such bugs in
the future, through compilation time warnings, instead of hiding them.
2024-10-28 22:08:45 +01:00
Øyvind Kolås
a350efeeb1 meson,app: depend on babl-0.1.110 2024-10-28 21:48:49 +01:00
Kolbjørn Stuestøl
a254fb7710 Update Norwegian Nynorsk translation 2024-10-28 18:08:46 +00:00
Kolbjørn Stuestøl
a58a094504 Update Norwegian Nynorsk translation 2024-10-28 18:04:28 +00:00
Alx Sa
c093837bda scripts, pdb: Consolidate gauss and pixelize compat functions
Currently there are 5 separate plug-in-gauss
functions. IIR2 and RLE2 are not used, and
IIR and RLE are identical to each other.
Additionally, they all call a separate
gaussian_blur () function which multiples
two parameters by 0.32 to convert to the
actual GEGL operation.

This patch removes all functions except
for plug-in-gauss. It converts each
existing script that used one of the other
variants to use plug-in-gauss, and
multiples the coefficients by 0.32 so that
plug-in-gauss behaves the same as calling
gegl:gaussian-blur with a C plug-in.

There also exists a plug_in_pixelize2 ()
function in the PDB which allows the user to set
both the pixel width and height.
This patch converts this to become
plug_in_pixelize (), and removes the older
function which used a single width
parameter for both values.
2024-10-28 04:39:39 +00:00
Jehan
00753ef4fe NEWS: update. 2024-10-28 02:14:08 +01:00
Jehan
e02b8819e5 app, libgimp, pdb: fix “Stack smashing detected” crash.
Building with clang and various stack protection flags (as is done in
our flatpak apparently), we can trigger a crash when a gint on the stack
is set as a pointer to gsize.
Anyway now all array size must be gsize.

See: https://discourse.gnome.org/t/problem-with-select-polygon-in-gimp-2-99/24753
2024-10-28 02:03:57 +01:00
Jehan
4ee549b4eb plug-ins: link file-fits with libm.
When linking with clang/lld, I had the following linking error:

> ld.lld: error: undefined symbol: pow

As a side change, also adding math.h header include, even though it
didn't seem to break compilation. Just to be thorough.
2024-10-28 01:20:55 +01:00
Jehan
69ebc25feb plug-ins: port gegl.scm to new array format with no size arg. 2024-10-28 00:42:38 +01:00
Bruno
752dd40592 build/windows: Cosmetic changes to crossroad scripts 2024-10-27 19:53:19 -03:00
Bruno
c229e43744 build/windows: Complete 76f174f8 (regarding Installer .ps1 simplification) 2024-10-27 22:48:41 +00:00
Anders Jonsson
d018dd47fb Update Swedish translation 2024-10-27 22:46:07 +00:00
Jehan
92ae145e0d plug-ins: warning cleanup.
Fixing:

> plug-ins/script-fu/libscriptfu/tinyscheme/scheme.c:134:1: warning: no previous declaration for ‘set_outport’ [-Wmissing-declarations]
2024-10-27 23:44:50 +01:00
Anders Jonsson
8addfb1ec0 Update Swedish translation 2024-10-27 22:44:18 +00:00
Anders Jonsson
abbbd3ad3a Update Swedish translation 2024-10-27 22:43:29 +00:00
Anders Jonsson
008e756a34 Update Swedish translation 2024-10-27 22:42:17 +00:00
Jehan
0b4d104c15 app: use gdk_seat_grab() instead of deprecated gdk_device_grab().
Additionally to fixing a deprecation, I also ensure that we don't limit
pointer source to what the system considers the "Core Pointer" on
Wayland.

It is another bug similar to #8016 and possibly what !924 was trying to
fix, even though it turned out this was not the same problem which I
initially reported. In this other variant, when you were hitting Space,
it would originate from the "Core Keyboard" which was associated to a
"Core Pointer". On a laptop, this Core Pointer could be the trackpoint
for instance (in my case) so you could pan with Space + trackpoint move.
Yet say you add a graphics tablet, which is a separate pointer: you
could not pan with Space + stylus move!

Now you can, because when we are pan-spacing, events from all pointer
sources are accepted. Only when the panning comes from a pointer source
(middle click) do we listen only events from this same pointer device.
2024-10-27 23:00:30 +01:00
Jehan
3a8825cf06 Revert "app: Don't grab the pointer when doing scrolling"
This reverts commit 413cf9ad85.

As discussed with mitch during last Wilber Week, and commented in !924,
the fix was creating new problem and was not right. We definitely want
to grab pointer events when panning (or other similar interactions).

Also I think I had not tested under Wayland back then, only verified I
didn't see any huge issue on X11, but the commit did not in fact fix the
original issue #8016 (this time, I verified!). The problem I was
encountering seem to be more in how Wayland works + libinput, not giving
full control on input devices to applications and trying to be "smart"
with an option ("Disable Touchpad While Typing") which is often useful,
but other times counter-productive (e.g. in GIMP when we want to
space-panning — which should not be considered typing —, or again
shortcuts in video games, and so on).
2024-10-27 22:58:01 +01:00
Jehan
d6f015a6df app: fix forgotten change after removal of num-drawables argument. 2024-10-27 22:55:51 +01:00
Jehan
846a8f6e98 gimp-data: update the submodule to latest.
Apart from various structural or script improvements, we now have vector
icons for all tool icons in the Legacy icon theme (#887).
2024-10-27 22:55:51 +01:00
Jehan
97fb23e5b3 plug-ins: python-fu-eval should correctly exit with error.
When the passed code had a bug, the plug-in was crashing along with the
code given in argument. Instead, we must catch all exceptions and pass
the error message raised by exec() to the core application.
2024-10-27 22:55:51 +01:00
Anders Jonsson
8cf1aaf40f Issue #12216: fix crash on switch to MWM
Since commit 4e499810, GIMP could crash on switching to
multi-window mode on X11 Linux systems.

As suggested by Alx Sa it is enough to add a NULL check for
shell to avoid the crash.
2024-10-27 15:37:06 +00:00
Bruno
2db868ab50 gitlab-ci: Do not forbid custom crossbuild pipelines
Manual pipelines can be useful. Blocking them was an error from b3b466dc.
2024-10-27 07:59:57 -03:00
Bruno
9ab481647c build/windows: Port building scripts to use Windows native shell
From now, Windows contributors can use the default shell provided by the OS
(which is PS since Windows build 10.0.14971.0), like Linux and macOS users do.
We still use MSYS2 but not the POSIX shell. This change adds these features:

'1_build-deps-msys2.sh' is now '1_build-deps-msys2.ps1'
- Faster clonning by using 'git-scm' (the MSYS2 one had performance problems)
- Easier to use non-MSYS2 binaries, not only 'git-scm' but also official meson,
  deps from vckpg etc. This is a needed step towards the future use of MSVC.

'2_build-gimp-msys2.sh' is now '2_build-gimp-msys2.ps1'
- By default, vanilla builds (normally triggered on PS) will create a bundle,
  dropping the need of 'gimp.cmd' (that adressed .typelib and .interp limits),
  which is inline with other (Cmake-based) projects like Darktable and Inkscape.
  This change is important because even Windows devs more experienced than me
  get confused with the relocatibility stuff, which is the default on Windows.

'2_bundle-gimp-uni_base.sh'
- As a result of the change above, bundling code was changed to be a bit faster.
  It still is, however, painfully slow, since meson doesn't have a 'install()'
  function like Cmake to prepend targets in Ninja's 'install_manifest.txt'.

Since we are not using a POSIX shell (nor 'mintty') anymore:
- GIMP can be built from every path easily with R. Click "Open Terminal", with
  IDE integrations etc, without needing to manual tweak MSYS2 .ini files etc.
  We could tweak MSYS2 to get the features above but not top-tier integration.
- Developers can be more aware of Windows native vars, paths etc, and avoid bugs
  Some build files were improved to support the 'Windows way of doing things'.
- No need to close and reopen terminal anymore after running 'pacman -Suy'!

---

REGRESSION: Vala plug-ins are temporarely gone due to 'vapigen' bugs, a small
regression since this is a gnomeish language but I will investigate how to fix.
2024-10-26 22:26:48 -03:00
Alx Sa
a01dc47983 dialogs: Use correct enum for Metadata Rotation Policy
In 41894be7, GIMP_COLOR_PROFILE_POLICY_KEEP was accidentally
used instead of GIMP_METADATA_ROTATION_POLICY_KEEP as the
possible output of gimp_image_metadata_rotate_dialog ().
Fortunately they are currently the same value, but it would be best to
return the right enum type.
2024-10-26 20:12:45 +00:00
Alx Sa
428763591f widgets: Remove icon border on GimpControllerEditor dialog
GimpControllerEditor's "Select Controller Event Action" dialogue has
a border around the standard icon. This is because it uses a GimpViewableDialog,
which normally shows the current image or layer as the right side icon (and thus
needs a border to potentially distinguish).
Since this is a special case, this patch retrieves the GimpViewRenderer for the icon
and then sets the border color to transparent.
2024-10-26 14:40:35 +00:00
lloyd konneker
bdcf1ba22f ScriptFu: scripts: add Clothify v2 back as a test plugin
After we converted most scripts in the repo to use new registration functions,
there are no *filters* left from version 2.

But version 2 filters are still supported, with a warning
to the console like "image procedures ... only one drawable ... are deprecated."

A version 2 filter uses
the deprecated registration function script-fu-register
and declares args img and drawable (singular) explicitly
(contrary to encouraged multi-layer capable.)

Until we actually obsolete scripts of this ilk,
we need this test plugin for testing.
2024-10-26 07:08:44 -04:00
dimspingos
da98eabc8a Updated Greek translation 2024-10-26 08:37:17 +03:00
Alx Sa
71d2a1415f actions: Load menu colors for Gradient Editor
Resolves #12226.
GimpGradientEditor's saved_color array was
converted to GeglColor as part of the color
space invasion. However, we were still
treating it as if it was a GimpRGB array, so
we'd use gegl_color_set_pixel () to convert
it for gimp_action_group_set_action_color ().
This resulted in the menu displaying empty colors.
This patch removes the unnecessary conversions
and passed the saved_color values directly so that
they show up in the menu.
2024-10-26 03:10:22 +00:00
Alx Sa
d054a87d2c plug-ins: Fix naming conventions for Python plug-ins
Per Lloyd Konneker, all Python plug-ins except
histogram-export and gradients-save-as-css
have "python-fu-" in front of their name.
In fact, gradients-save-as-css does have
this prefix in some places already.
Since this is also how it was written in 2.10,
let's rename them now to be consistent.
2024-10-26 01:05:15 +00:00
Jehan
b3f1cb47a3 NEWS: update. 2024-10-26 01:18:55 +02:00
Jehan
f490a8eb63 app, libgimp: fix crash when selecting a gradient from plug-in.
As reported by Anders in !1919. This is because
gimp_pdb_execute_procedure_by_name() now expects a proper GimpArray for
float and int arrays, not a C array preceded by a size value.
2024-10-25 23:31:42 +02:00
Jehan
e3bdce7c5d plug-ins: port script-fu scripts to the new array handling.
These are most (all?) of the broken scripts. At least I hope so! 😅
2024-10-25 23:31:42 +02:00
Jehan
b992057b22 plug-ins: port script-fu PDB testing. 2024-10-25 23:31:41 +02:00
Jehan
48cb7e76d3 app, libgimp, pdb: add g_return*_if_fail() test for array size args.
Generated libgimp functions' arguments are normally tested through the
PDB, so that you get proper error messages when trying to call a
function with invalid arguments.
This is not true anymore for array arguments since the size argument is
not a PDB arg, only in the C function. Therefore I'm adding an
infrastructure asserting on invalid size, using the same PDB type
annotations as other args. It is important to assert valid input on
plug-in side (i.e. libgimp) so that the core doesn't make any assumption
on having received valid input when it has not.

Also changing size argument of gimppainttools PDB-generated functions to
proper gsize.
2024-10-25 23:31:06 +02:00
Jehan
253db343a6 plug-ins: fix calling gimp-plug-ins-query. 2024-10-25 23:28:42 +02:00
Jehan
ac2bef4410 app, libgimp, pdb, plug-ins: array size's type should be gsize.
This changes the signature of generated functions in libgimp with array
arguments.
2024-10-25 23:28:42 +02:00
Jehan
3a2cbb4162 app, libgimp, pdb: array length are not PDB arguments anymore.
Yet they still are generated libgimp functions' arguments.

For instance gimp_context_get_line_dash_pattern() still has a num_dashes
integer argument and a dashes C array, but when calling the PDB
procedure "gimp-context-get-line-dash-pattern", we only set the
GimpArray.

This will allow simpler direct PDB calls too, included in script-fu,
where the size argument is really redundant.
2024-10-25 23:28:42 +02:00
Jehan
096c45599d app, libgimp*, pdb, plug-ins: float arrays don't need size arguments too. 2024-10-25 23:28:42 +02:00
Jehan
f2b9babfb4 app, libgimp*, plug-ins: int32 array arguments don't need a size argument anymore.
GimpArray (and therefore the int32 array typedef) contains its own size.
We don't need to store the array size in a preceding argument.

Also adding gimp_int32_array_get_values() and gimp_int32_array_set_values()
to edit an existing GimpArray.
This comes with the fact we should start making the GimpArray type more
explicit, because clearly by trying to hide this type so much, it was
too much looking like the int32 array param spec was expecting a C array
(as was visible in the file-ico plug-in where we were getting a C array,
which was a bug only made invisible by the fact we were not setting the
C array back in the config object in the end).

Last but not least, I finally implemented int32 array (de)serialization.

As a side fix, the "images" arg in file-pdf-export-multi procedure is
now a proper image array (not an int32 array), and of course the "count"
arg was removed.
2024-10-25 23:28:42 +02:00
Jehan
60eb27ab18 app, libgimp*, pdb, plug-ins: first step to make int32array PDB type aware of its length.
PDB code is now looking directly into the GimpArray length for
determining the data length.

Also adding a 'size' argument (number of elements, not bytes) to
gimp_value_(get|dup)_int32_array() to make it actually introspectable.
Until now, it was somehow introspected but was segfaulting on run.
I.e. that, e.g. in Python, calling Gimp.value_set_int32_array(v, [1, 2, 3])
followed by Gimp.value_get_int32_array(v) would actually make a
segmentation fault. Now the binding works flawlessly.

This will also make these functions much more usable in general.
2024-10-25 23:28:42 +02:00
Jehan
87d3d921da libgimp, pdb: improve free function information on array types.
Core object arrays must also be freed with g_free() (since elements are
not ref-ed).

Also color arrays must be freed with gimp_color_array_free().
2024-10-25 23:28:42 +02:00
Jehan
4137dce97b libgimp*: get rid of GimpObjectArray and GimpParamSpecObjectArray.
These have now been completely replace with the new GimpCoreObjectArray.
2024-10-25 23:28:42 +02:00
Jehan
e97572af98 plug-ins: support the new NULL-terminated object arrays in script-fu. 2024-10-25 23:28:42 +02:00
Jehan
e1e2941d9e app, libgimp*, plug-ins: move all GimpObjectArray procedure args to GimpCoreObjectArray. 2024-10-25 23:28:42 +02:00
Jehan
08fd3a3f0d app, libgimp, pdb: imagearray PDB type as GimpCoreObjectArray. 2024-10-25 23:28:42 +02:00
Jehan
64f9c71ad5 app, libgimp, pdb: all resource (and subtype) array PDB types as GimpCoreObjectArray. 2024-10-25 23:28:42 +02:00
Jehan
59c040323c app, libgimp, pdb, plug-ins: patharray PDB type as GimpCoreObjectArray. 2024-10-25 23:28:42 +02:00
Jehan
255cda73c1 app, libgimp, pdb: channelarray PDB type as GimpCoreObjectArray. 2024-10-25 23:28:42 +02:00
Jehan
d484b591d9 app, libgimp, pdb, plug-ins: layerarray PDB type is now a GimpCoreObjectArray. 2024-10-25 23:28:42 +02:00
Jehan
318f7451cd app, libgimp*, pdb, plug-ins: change itemarray PDB type to use GimpCoreObjectArray. 2024-10-25 23:28:42 +02:00
Jehan
38c2cd3b15 app, libgimp, pdb, plug-ins: new GimpCoreObjectArray type and drawablearray…
… PDB type.

This is a first step for #7369. Clearly our GimpObjectArray was meant to
be used with C arrays, hence the wrapper function
gimp_value_set_object_array() which was taking a C array and actually
creating and setting a GimpObjectArray.

This is why our new type is actually a C array aliased as a boxed type
and containing its own size (thanks to NULL-termination).

Eventually GimpCoreObjectArray is meant to replace GimpObjectArray.

The only issue is that such a type does not allow NULL as a valid
element in such an array, but fact is that I don't think we currently
have any use case where this matters. If ever such a case arise in the
future, we may introduce back GimpObjectArray.

In this first commit, I replaced all itemarray PDB types with a new
drawablearray using this new boxed type when relevant.
2024-10-25 23:28:42 +02:00
lloyd konneker
cb4687633c devel-docs: delete ScriptFu docs
After moved to gimp-web-devel repo.
2024-10-25 10:07:49 -04:00
lloyd konneker
0db5f7dd72 ScriptFu: add compatibility scripts for third party scripts
For some symbols defined or deprecated in GIMP 2 and obsolete in GIMP 3.

ScriptFu automatically loaded these definitions
during development of GIMP 3 (from 2.99 to 3.0rc1).
That is no longer the case.

A third-party script CAN load them explicitly.
We discourage that, for scripts to be shared,
but it is convenient for private use.

PDB-compat-v2.scm is also an executable definition of renamings,
useful as a cross check of published documents re porting plugins
from v2 to v3.
2024-10-25 13:56:36 +00:00
lloyd konneker
b70fad8c94 ScriptFu: rename the init scripts to have suffix .scm
So an editor recognizes them.

Renames script-fu.init to init.scm since that is a Scheme convention.
Scheme interpreter maintainers expect that name.
The same name as upstream TinyScheme.
2024-10-25 13:56:36 +00:00
lloyd konneker
b4a67b661f ScriptFu: move init scripts to separate directory /scripts/scriptfu-init
When mingled with plugin scripts, they needed a non-standard suffix .init.
Which makes an editor not recognize them.
Which deviates from Scheme convention for the main init script: init.scm.

The separate directory is also a place for script authors
to put Scheme scripts they don't want loaded automatically,
but when a script calls Scheme load function.

No change to observable behavior in the app or ScriptFu tools.
2024-10-25 13:56:36 +00:00
lloyd konneker
ffa972f9a8 ScriptFu: libscriptfu: symbol for script-fu-sys-install-directory
and user-install.

Symbols not used yet.

Also improve function ts_load_init_and_compatibility_scripts,
so reader can understand what it does.
2024-10-25 13:56:36 +00:00
lloyd konneker
da84d3361d ScriptFu: libscriptfu: extract method that loads init and compat scripts
No functional change intended.

In preparation for loading from different dir, and different suffixes.
2024-10-25 13:56:36 +00:00
lloyd konneker
0e570f8db1 ScriptFu: libscriptfu: extract method ts_define_constant_string
No functional changes intended.

In preparation for defining another string constant.

Makes code more readable.
2024-10-25 13:56:36 +00:00
dimspingos
861f88ccf1 Updated greek translation 2024-10-24 21:11:02 +03:00
dimspingos
598fb4834b Updated Greek translation 2024-10-23 21:06:20 +03:00
lloyd konneker
c8740e8ab6 ScriptFu: obsolete the defined symbols abbreviating gimp paths
E.G. gimp-dir

Deprecated previously, obsolete for major version 3.0
2024-10-22 15:18:50 -04:00
lloyd konneker
fd7b029471 ScriptFu: tests: add test: scripts non-interactive call other script plugins
This is rarely done.
Most script plugins call PDB functions that are GIMP INTERNAL (gimp-foo)
or filter plugins that wrap Gegl filters (plug-in-foo).
But a Scheme script plugin can call other script plugins (script-fu-foo).

When a script does call another script,
it can be within the interpreter (purely in Scheme),
or to an interpreter in another process (via the PDB, with binding.)

It can get complicated using the optional v3 binding of return values.

This tests and illustrates different cases.
2024-10-22 15:18:50 -04:00
lloyd konneker
0c5a716fe8 ScriptFu: scripts: fix scripts that used now obsolete functions from the SIOD dialect
Mostly one word substitutions.

A few function definitions were moved to the scope of
a single script that used them.
Those functions won't be available to third party scripts
except now by cut and paste.

For major release 3.0.
2024-10-22 15:18:50 -04:00
lloyd konneker
e4372897fa ScriptFu: revert removal of certain compatibility definitions for SIOD
When the function is not trivially substituted with  a call to a Scheme R5RS function.
In other words, compatibility definitions that are not just an alias from SIOD to R5RS
Scheme dialects.

The prior removal was based on comments in the code,
saying the functions could easily be removed.
It turns out the functions are used in the repo, and not easily replaced.

Third party scripts may suffer the same dilemma:
use SIOD functions that are not trivially replaced.
This commit only fixes the dilemma for the scripts in the GIMP repo.

Reverted and kept:
  *pi* symbol for math constant
  cons-array an obscure function of unknown origin
  butlast a function in some Scheme dialects but apparently not in R5RS

These MIGHT be removed in the future, with more work.
2024-10-22 15:18:50 -04:00
lloyd konneker
55c0774e39 ScriptFu: remove ScriptFu's aliasing of deprecated PDB procedures
Leaves the mechanism in place, but erases all rows of the alias map data.

Update devel-doc to say ScriptFu has its own mechanism for aliasing.

For major release 3.0
2024-10-22 15:18:50 -04:00
lloyd konneker
38220ec9eb ScriptFu: obsolete compatibility scripts for SIOD dialect and older PDB
For major release 3.0

SIOD dialect was used before GIMP 2.4 circa 2006.

Two deprecated PDB adaptors removed, one dealing with multi-layer select.
2024-10-22 15:18:50 -04:00
lloyd konneker
563e9c7220 PDB: obsolete aliased deprecated PDB procedures
For major release.  Breaking  API for PDB.
2024-10-22 15:18:50 -04:00
lloyd konneker
07ac91e5a1 devel-docs: add doc about deprecated and wrapped PDB procedures 2024-10-22 15:18:50 -04:00
Alx Sa
bced3c5e04 libgimpwidgets: GimpUnitComboBox and GimpZoomModel...
...are now FINAL TYPEs.
2024-10-22 04:23:46 +00:00
Alx Sa
37d94f3fd6 app/display: Copy filters when layers are dropped on tabs
Resolves issue #12203.
Similar to d87c728f, dragging a layer over to a new image via
the tabs uses gimp_image_new_from_drawable () and only
copies a single layer. This patch adds the filter copy code
here as well.
2024-10-21 22:09:48 +00:00
Alx Sa
1a70e911b1 libgimpwidgets: Add parent instance to GimpPathEditor
The GtkBox parent_instance was left off when the widget
was converted to FINAL TYPE in bd23d5a9.
2024-10-21 13:40:59 +00:00
Massimo Valentini
542d2af2a5 pdb, libgimp: Add API to get/set Emulate Brush Dynamics
This patch adds a pdb getter/setter for GimpStrokeOptions'
emulate-brush-dynamics property. This allows users to change
the "Direction" of strokes via Script-fu/Python API calls.
2024-10-21 10:55:27 +00:00
Alx Sa
d87c728f0d core: Copy filters for new single-layer images
Resolves #12198.
When dragging a layer to the toolbox to create a new
image, we weren't copying over the filters. This is because
that action still uses gimp_image_new_from_drawable ()
rather than the multi-layer capable gimp_image_new_from_drawables ()
function.
For now, we'll fix the immediate problem by implementing the filter
copy code in this function. Long term, we should port that code to
use gimp_image_new_from_drawables () instead.
2024-10-20 19:04:16 +00:00
Tim Sabsch
b05c32e6ea Update German translation 2024-10-20 18:28:02 +00:00
Tim Sabsch
7c7831a3dd Update German translation 2024-10-20 18:26:59 +00:00
Alx Sa
344be9337a plug-ins: Make Legacy Grid colors independent of layer's transparency
Per Anders Jonsson, the grid colors can have semi-transparency even
if the image itself has no alpha channel. This patch always sets the
GeglColor's babl format to contain an Alpha channel, rather than reusing
the image's color format. The index used for alpha is also updated to
adjust to the number of channels, since GimpRGB previously always used
index 3 for both RGB and Grayscale images.
2024-10-20 12:11:30 +00:00
lloyd konneker
5a3d7f1005 ScriptFu: tests: enhance test of gegl wrappers
Call them on different modes of image
and different sizes of image.

Motivated by faults discovered in denoise filter for small images.

No faults detected by new tests.

ScriptFu: tests: enhance testing of gegl wrapper plugins

Add tests on other image modes.

Add tests on small images.
2024-10-19 14:37:39 -04:00
Alx Sa
bd23d5a926 libgimpwidgets: More widgets are now FINAL types 2024-10-19 02:27:07 +00:00
lloyd konneker
0b72b028e8 ScriptFu: fix #12157 old-style dialog slider default 0 instead of declared value
This seems like a hack.
A better fix might be in the gimp_scale_entry widget.
2024-10-18 15:33:44 -04:00
lloyd konneker
6a0844b59a ScriptFu: fix #12188 new-style dialog lacks slider widget
Creates a "custom" widget, slider w spinner,
since otherwise defaults to entry w spinner.
2024-10-18 14:35:17 -04:00
lloyd konneker
f1372acbdc ScriptFu: tests: restore to working condition
No changes except to tests.

After changes to API:
Colormap=>Palette
Vectors=>Path

After changes to ScriptFu handling of color.

Misc upgrade of tests to use-v3 binding
2024-10-18 08:25:42 -04:00
Alx Sa
d2d4d65acb libgimpwidgets: GimpIntRadioFrame is now a FINAL type 2024-10-18 04:17:23 +00:00
Ekaterine Papava
39480776ed Update Georgian translation 2024-10-18 04:15:57 +00:00
Ekaterine Papava
9db757690d Update Georgian translation 2024-10-18 04:14:33 +00:00
Ekaterine Papava
2cf77b1565 Update Georgian translation 2024-10-18 04:12:54 +00:00
Jehan
b06b7e47c1 NEWS: update. 2024-10-17 22:51:11 +02:00
Jehan
65460fc240 libgimpthumb: GimpThumbnail made into a final class. 2024-10-17 22:38:25 +02:00
Jehan
f965b659eb libgimpconfig: gimp_config_(de)serialize_strv() should not be public.
These 2 functions are only used in one file each, there are absolutely
zero reasons to make them public. These functions have nothing special.
2024-10-17 22:38:25 +02:00
Jehan
32034901d2 libgimpconfig: GimpColorConfig is now final. 2024-10-17 22:38:25 +02:00
Jehan
33efebae79 libgimpcolor: GimpColorTransform made final. 2024-10-17 22:38:25 +02:00
lloyd konneker
6f84a76e7a ScriptFu: fix #10978 handling of color
Revise handling of GeglColor, formerly GimpRGB.

Marshall to/from Scheme lists of numeric.
Marshall from string CSS names and notations.

Conversion to/from GRAY, GRAYA, RGB, RGBA.

See color.scm test script.
2024-10-17 18:45:51 +00:00
lloyd konneker
e92212d02a ScriptFu: add tests of Color 2024-10-17 18:45:51 +00:00
lloyd konneker
863bc2b3ed ScriptFu: new doc programmers ref for Color in ScriptFu 2024-10-17 18:45:51 +00:00
Jehan
732adc1f23 libgimpbase: moving GIMP_TYPE_PARAM_CHOICE and GIMP_TYPE_PARAM_EXPORT_OPTIONS…
… in gimpchoice.[ch] and gimpexportoptions.[ch] respectively.

The overlong gimpparamspecs.[ch] makes it harder to read IMO.
2024-10-17 19:41:39 +02:00
Jehan
47470880b2 app, libgimpbase: gimp_signal_private()'s header is now made private.
As other functions, it is still exported, but let make its header not
exposed in public API.
2024-10-17 17:12:30 +02:00
Jehan
ac1bf4a64e app, libgimpbase: also move gimp_cpu_accel_set_use() in a private header.
Similar to previous commit. If we don't want people to use this function
yet need to export it, at least don't expose the declaration in shipped
headers and even less in the API docs.
2024-10-17 16:12:04 +02:00
Jehan
f6edf596bf app, libgimp: move gimp_env_init() to a non-shipped header.
Since we consider it private, yet it's still needed in libgimp and app,
let's at least put it in a private header because there is no need for
people to try it out.

I'm also editing a bit the annotations for gimp_main() and GIMP_MAIN().
2024-10-17 16:11:15 +02:00
Jehan
8ff2682a3c libgimpcolor: the GimpRGB API is dead already. Just remnant files of it. 2024-10-16 22:44:59 +02:00
Jehan
cd71f9ff00 libgimpwidgets: GimpFileEntry now final. 2024-10-16 22:30:49 +02:00
Jehan
4a02c08bfa libgimpwidgets: GimpEnumStore made final. 2024-10-16 22:30:49 +02:00
Jehan
9ff663ccb2 libgimpwidgets: GimpColorSelector and GimpController are abstract. 2024-10-16 22:30:49 +02:00
Jehan
8822ca71a2 libgimpwidgets: GimpColorSelection made final. 2024-10-16 22:30:49 +02:00
Jehan
95b1963723 libgimpwidgets: GimpColorNotebook made final. 2024-10-16 22:30:49 +02:00
Jehan
426caf7132 libgimpwidgets: GimpColorHexEntry made final. 2024-10-16 22:30:49 +02:00
Jehan
555ce20248 libgimpwidgets: GimpColorDisplayStack made final. 2024-10-16 22:30:49 +02:00
Jehan
85c989da1e libgimpwidgets: GimpColorDisplay is an abstract class.
It is a shared API for subclasses and is not meant to be instanciated
directly.
2024-10-16 22:30:49 +02:00
Jehan
ba3f0c73a4 libgimpwidgets: GimpColorArea made final. 2024-10-16 22:30:49 +02:00
Jehan
925faf83ac libgimpwidgets: GimpChainButton now a final type too. 2024-10-16 22:30:49 +02:00
Jehan
03b88d8ac0 libgimpwidgets: GimpCellRendererToggle now final. 2024-10-16 22:30:49 +02:00
Jehan
3728e37553 libgimpwidgets: make GimpBrowser final. 2024-10-16 22:30:49 +02:00
Alx Sa
0a9020bb0a plug-ins: Fix IFS Compose crash related to undos
As part of the color space invasion, we
converted the IFS Compose colors to
GeglColor. However, we forgot to initialize
them when we create a new AFFElement
in undo_update (). As a result, when we
try to clear them out later in aff_element_free (),
the plug-in crashes.
This patch resolves the issues by initializing
the five GeglColors on creation.
2024-10-16 20:01:06 +00:00
Alx Sa
af8cc019e3 core: Rename gimp_drawable_has_filters ()...
...to gimp_drawable_has_visible_filters ().
With NDE filters, it's now possible to have
filters that are not active but still attached
to a layer. This patch renames the API to
prevent confusion as seen in prior
commits.
2024-10-16 14:17:55 +00:00
Alx Sa
c19f6509ea core: Update XCF version even if layer effects are inactive
Similar to afc0a6d1, we need to use gimp_drawable_get_filters () to
get the total number of filters rather than gimp_drawable_has_filters (),
which just returns if any filters in the stack are active/visible.
Because of this, we weren't updating the XCF version to 22 when we
saved a file that had all of its layer effects set to invisible/inactive.
2024-10-16 13:32:56 +00:00
Víttor Paulo Vieira da Costa
e5f217b3d0 Update Brazilian Portuguese translation 2024-10-15 16:35:26 +00:00
Jehan
3cc3688f21 NEWS: update. 2024-10-15 15:38:38 +02:00
Jehan
3ee7a922af Issue #10998: more cases where fg/bg color was not properly updated.
Always update stored colors. When colors are perceptually identical, we
only bypass color rendering code, but not the color value update (even
small value updates need to be echoed across the code, so that what is
shown is always what is set).
2024-10-15 15:23:11 +02:00
Tim Sabsch
56add53473 Update German translation 2024-10-15 05:48:58 +00:00
Alx Sa
ab6f4e9a34 app/tools: Fix split preview when different layer selected
With NDE, we can now edit a filter when another layer is selected. This
broke an assumption in GimpFilterTool that the selected layer is the same
as the layer the current filter is applied to.
This patch fixes the problem by checking if the filter is being editing, and then
using either the filter's drawable or tool->drawables->data accordingly.
2024-10-14 23:58:41 +00:00
Bruno
5778d9353a build/linux: Restore 'gjs' bundling in AppImage
This got lost in a988084a
2024-10-14 17:48:35 -03:00
Bruno
dc08645614 build/linux: Rectify comment about WMF support on AppImage
The previous comment is wrong, because GIMP never had WMF export. Let's
clarify, however, that WMF support is still tricky because of some
options available at configure time regarding 'fontmap' and so on.
2024-10-14 16:05:33 -03:00
Bruno
47852ef90f build/linux: Do not impose 'GIMP3_DIRECTORY' var on AppImage's AppRun
This var points to a dir that exists outside of the AppImage bundle and it
exists to be customized if needed. So, let's not impose it in the AppRun.
2024-10-14 10:43:29 -03:00
Bruno
dffefa1b67 gitlab-ci, build/windows: Do not build unneeded dist assets on CI
There is no need to generate Installer assets on Store (and vice versa) or
on build-only pipelines. Let's build only the necessary, mitigating #11385
2024-10-13 20:59:06 -03:00
lloyd konneker
1889f554d7 ScriptFu: scripts: revert changes to SF-TOGGLE args
Prior commits porting these scripts to v3 dialect
incorrectly compared SF-TOGGLE args to #t and #f.
They are bound to TRUE and FALSE, 1 and 0,
before choice of dialect can take effect.
2024-10-13 14:28:46 -04:00
lloyd konneker
ff1ad6d605 ScriptFu: update devel docs re version 3 changes 2024-10-13 14:28:46 -04:00
Bruno
1384bf8c28 build/windows: Streamline MSIX script "Arch:" output with Installer one
This is a more informative output about what msix is being generated.
2024-10-13 14:05:27 -03:00
Jehan
95518b6ba3 app: show clearer we are working in sRGB space.
This was already the case because gegl_operation_get_format() had no
space (i.e. default, sRGB). it's not the source format.
But let's make it clearer because otherwise on a short skimming, it
looks like we are working on the source space.

Also adding a comment on why working on the source space is not a good
idea right now anyway (it's *very* slow for anything but sRGB).
2024-10-13 17:55:59 +02:00
Bruno
9a6b93c4a5 build/windows: Add (optional) WACK phase to MSIX script
Local certification with WACK is optional and useful to anticipate if
the MSIX will be refused by Partner Center's online certification.
(Just to note: On Windows SDK, certification is not equal to signing.
It's more a checklist process to see if the package is suitable to run.)

To avoid needing the full script to be run with admin rights (which
would be scary) this feature only works with a bunch of requirements:
1. sudo for Windows (so Windows 11 24H2)...
2. enabled in normal (aka inline) mode...
3. in a Windows account in admin group

The 2nd and, specially, the last one are harsh but this is sudo's design:
https://github.com/microsoft/sudo/issues/108
https://github.com/microsoft/sudo/discussions/68
2024-10-13 15:40:39 +00:00
Jehan
e1f31247e2 app: Color Balance to work in HSLA/sRGB.
Running Color Balance on an image with profile was very slow.
This is because we have special conversion path for sRGB "R'G'B'" in
babl (since babl@90da256), but all the other color spaces are going
through the generic path which does the double conversion to linear RGB
then to 2.2 gamma. And that's slow.

I'm not 100% sure it's right, especially as I'm seeing some CLAMPing
going on (but I'm not sure if removing it is right either) which means
we will likely not cover the full target space in the end.

I'm letting it go because when we'll add proper version support to GEGL
ops, we will be able to improve the algorithm without breaking XCF files
with this filter.

At least now we don't have over-slow Color Balance.

As side improvements, I'm cleaning up a bit the code, which is mostly
micro-optimizations at this point.
2024-10-13 17:01:50 +02:00
Alx Sa
0b7c2d39f4 libgimpcolor: Remove GimpHSL and GimpRGB
This completes the GimpRGB API removal
project for the color space invasion.
Note that the GIMP_RGB_LUMINANCE macro is
temporarily moved to gimpcolor. It does not
require GimpRGB but was included in gimprgb.h.
2024-10-13 16:56:20 +02:00
Alx Sa
3cfadbf078 operations: Replace GimpHSL in Color Balance operation 2024-10-13 16:56:20 +02:00
Bruno
0a7119028f gitlab-ci: Use mirrored flatpak*.yml to stop pipeline fails due to sick infra
We are getting HTTP error 429 probably because it's a highly requested file,
and this is causing pipelines to fail at CI lint. Let's fix this with mirrors.
2024-10-13 11:34:47 -03:00
Tim Sabsch
9ea4120f78 Update German translation 2024-10-13 14:22:21 +00:00
Jehan
d28525e141 Issue #12146: default to HSV Hue for GimpColorSelect.
Commit abf0c1c272 fixed the inconsistency of showing "R" for RGB's Red
channel selected whereas the actually displayed selection UI was "H" for
HSV's Hue channel.
As a consequence of this fix, now we were indeed displayed "R". Yet
people got used to working with the Hue channel (and LC plane) for
at least a dozen years. Let's make "H" the officially displayed channel.
2024-10-13 15:38:36 +02:00
Alx Sa
41d417530e plug-ins: Re-center Animation Playback display
During the GAction port, we removed gtk_alignment_new () from the
Animation Playback plug-in as it was deprecated in GTK 3.14.
However, this caused the drawing area to be put on the left side of
the window.
This patch reimplements the alignment feature using gtk_widget_set_halign ()
and gtk_widget_set_valign (), to keep the animation in the center of the dialogue.
2024-10-13 03:44:20 +00:00
Alx Sa
d3dbcb1907 app/actions: Restrict destructive filters on layer groups
Resolves #12160
Currently, GEGL Graph and filters with Aux nodes can only be
applied destructively. Therefore, we need to add a restriction so
they can't be applied when a layer group is selected.
2024-10-13 02:25:14 +00:00
Alx Sa
4698c67290 libgimpwidgets: Convert more widgets to FINAL/DERIVABLE TYPE
These were missed earlier as they did not
have private structs in the .h file
2024-10-12 20:17:29 +00:00
Alx Sa
0f0b3a65be tools: Update existing filter when converted
Certain tools like Levels and Brightness-Contrast allow you
to convert it to another filter live. This happened by creating a new
tool, so if you were editing an existing filter, the connection was lost
and duplicate filters were created.
This patch copies any existing filter to the new tool and updates the
name and icon to the new filter type when saved.
2024-10-12 18:43:33 +00:00
Bruno
6b13a097ab build/linux: Bundle complete GTK and ISO locales as in Windows bundling script
Since the 'bund_usr' is now smater, we can have parity with Windows bundle.
2024-10-12 10:32:44 -03:00
Alx Sa
70cd0c7b77 plug-ins: Fix Curve Bend auto-preview
During the GimpProcedureDialog port, newly generated widgets were
connected to bender_global_notify (). However, GimpProcedureConfig was
connected to it rather than a GtkWidget, which caused the function to return
without updating since it did not have access to the BenderDialog object.
This patch connects the function to the individual rotate, smoothing, and
anti-aliasing widgets to resolve the issue.
2024-10-11 12:16:28 +00:00
Jordi Mas
eddaa13ad5 Update Catalan translation 2024-10-11 11:59:33 +02:00
Alx Sa
ec80baf414 app/core: Only restrict palette for indexed images
Moves gimp_palette_restrict_format () call to after check for
private->palette not being NULL, so it doesn't run for
RGB/Grayscale images.
2024-10-11 08:55:15 +00:00
Jehan
bf513fac4d NEWS: update. 2024-10-11 01:49:19 +02:00
Jehan
6fe83ee785 build: add the missing entry for the new Bengali language support.
Also add some header text as guidelines on how to fill in a new language
so that we don't have to search each time.
2024-10-11 01:40:19 +02:00
Jehan
be23a0573b build: also test missing langs in build/windows/installer/lang/iso_639_custom.xml
This file was added in commit 21ffb58903 to replace the list in
4_dist-gimp-inno.ps1. The older list used to be verified for missing
langs in the test-installer-langs.sh unit test, but the test was removed
and never replaced. This is why now when a new language is added and it
is missing in iso_639_custom.xml, it goes unnoticed until failing in
dist-installer-weekly job.
2024-10-11 01:40:19 +02:00
Bruno
be67c70a89 build/linux: Add "Image Graph" support to AppImage
To we properly bundle graphviz, the 'bund_usr' function was improved.
2024-10-10 09:29:29 -03:00
Jehan
5fc2d58ad4 libgimpwidget: clean out a forgotten signal method. 2024-10-10 11:50:56 +02:00
Jehan
a040dfd6e4 Issue #11339: color selection sliders don't always update for slow increments.
Rather than the previously reverted commit, the proper solution is:

* gimp_color_selector_set_color() must not test for perceptual identity
  because GimpColorSelector is too much of a generic class. In some
  case, such a test may be worth it to limit costly updates (in
  particular when it implies some rendering of color surfaces), but this
  would happen in specific subclasses.
* In GimpColorSelection, the GimpColorScales show numbers, so any change
  in them will likely trigger other scales to change as a side effect.
  Therefore when handling the "color-changed" signal on these scales,
  however small the change may be, we want to run the update.

Now removing this test in gimp_color_selector_set_color() also revealed
a serious bug which I fix in this commit, which is that the binding
between the "value" of a GimpLabelSpin with the "value" of its
adjustment was still triggering repeated property-setting, which was
enough to freeze the GUI for a while. The logic of using only the
GtkAdjustment's value as a source while also binding both properties was
not robust enough. Instead the GimpLabelSpin will now store its own
value and the binding will simply keep it in sync with the one in the
adjustment.

Note that this is also part of the solution for #10998, because it means
there were cases where the color displayed in scales of the color
selection dialog was not actually the color set as foreground or
background.
2024-10-10 11:50:56 +02:00
Jehan
079a68a920 Revert "libgimpwidgets: fix #11339 chroma slider fail on small increments"
This reverts commit bdddc94151.

This commit was not fixing the issue the proper way and was creating new
issues.

The real problem was that for very small increments at a time, a color
change could be perceptually identical to the previous color and
therefore not trigger color updates down to subclasses.
The reverted commit was trying to work around this by not updating the
GimpColorSelector color when it was perceptually identical (therefore
next check may be a bigger color distance), but this was definitely not
right. It was creating inconsistency in the stored color with the
actually selected one and that was the root for more issues.

See the next commit for a proper fix.

Oh and by the way, there was no leak, unlike what the reverted commit
message was saying. The old color was freed. ;-)
2024-10-10 11:50:56 +02:00
Jehan
abf0c1c272 libgimpwidgets: make sure that the selected channel is in sync with reality.
By default, the GimpColorSelect widget is set to show HSV with Hue
selected but we weren't selecting the channel which was defaulting to
"Red" of RGB. Therefore there was some inconsistency when first opening
the color selection dialog which was showing HSV colors on the left, yet
with "Red" selected on the right.

This fixes the inconsistency, which also allows parent or container code
to set the default they want (which is indeed RGB).
2024-10-10 11:50:56 +02:00
Jehan
b1616cfaaf libgimpwidgets: argh, silly bug. 2024-10-10 11:50:56 +02:00
Jehan
e8958e417c libgimpwidgets: show the model in the GimpColorSelect label.
Do not only show the space, but also the model. For instance both RGB
and HSV can have the same profiles.
As for LCH, we must not show any space (it is based on CIELAB).

Note that I use the string "Model: %s" which is already used in
libgimpcolor, so I am not breaking string freeze. The "%s - %s" string
though is not localized, even though ideally it should be (and possibly
even be a better joining string in English), but I don't want to break
string freeze for this.

This issue is part of the fix for #10998, more as a UX issue than a bug
per-se. Depending on how you were selecting a color, now you might
select it as HSV, LCh or some other model (this was **not** the case
before, even though the GUI was similar. Yet the stored color was always
RGB. Now it's actually "whatever you choose"). As a consequence, it is
possible that choosing a color in another model may convert to slightly
different numbers, especially within decimal places. I don't think it
was the main issue, but it certainly doesn't help. Now we may be making
clearer what color model is being used in the GimpColorSelect color
areas.
2024-10-10 11:50:56 +02:00
Jehan
d66df2aefe libgimpwidgets: do not set toggles visible when explicitly set not to…
… when changing the model.

Because of this, we had redundant toggles appearing in the Color
Selection dialog, in the GimpColorSelect tab.
2024-10-10 11:50:56 +02:00
Cheng-Chia Tseng
d607a71ba6 Update Chinese (Taiwan) translation 2024-10-10 03:40:58 +00:00
Cheng-Chia Tseng
2d64312474 Update Chinese (Taiwan) translation 2024-10-10 03:32:42 +00:00
lloyd konneker
46c9949b7e app:vectors: fix #12120 CRITICAL on shift-start action on a bezier Handle
This eliminates the CRITICAL, which was harmless anyway.

As discussed in the issue, there are more issues:

1. The "shift-start" action is not documented in the user manual.

2. The "shift-start" action quietly does nothing in the case
it has nothing to do.  Better GUI would be to disable the menu item in that case.

3.  The "shift-start" action is non-intuitive, even bizarre.
It could probably be eliminated.
I myself don't understand the use case, and confused it for Path>Reverse.

An alternative fix is to disable the menu item when a handle is the operand.
This fix is better because it gives the user more places to RMB a context menu,
and the context menu mutates less.

Probably needs backport to 2.10.
2024-10-09 11:40:12 +00:00
Alx Sa
8c080b220f plug-ins: Fix reset button on Gradient Flare
Gradient Flare still used gimp_dialog_run ()
for its GimpProcedureDialog, so the Reset
button was treated as Cancel. This fixes it
so that it's usable.
2024-10-08 16:58:20 -04:00
Alx Sa
8474606d55 plug-in: Prevent another segfault in Gradient Flare plug-in
Code that updates the main dialogue preview and the editing dialogue
preview were conflicting with each other, setting various strings to NULL.
This patch turns off the main dialogue preview updating code when the edit
dialogue is open, to prevent this overwriting behavior.
2024-10-08 20:47:57 +00:00
Tim Sabsch
12f5dd4d41 Update German translation 2024-10-08 18:15:04 +00:00
Tim Sabsch
fed8e016a9 Update German translation 2024-10-08 18:13:46 +00:00
Cheng-Chia Tseng
506523e243 Update Chinese (Taiwan) translation 2024-10-08 16:15:46 +00:00
Cheng-Chia Tseng
b13b965773 Update Chinese (Taiwan) translation 2024-10-08 16:06:37 +00:00
Cheng-Chia Tseng
8590871db6 Update Chinese (Taiwan) translation 2024-10-08 15:43:12 +00:00
Jehan
d41660136e app: review and fix previous commit.
* Do not force-clip effects with a mask. Otherwise when adding a filter,
  it initially renders fine (and can cross its input extents), but once
  applied, it's suddenly clipped. That's not what we want.
* Fix gimp_filter_stack_get_bounding_box() computation.
* Fix the crop_before area when there was a selection. We have in fact
  to start at 0×0 on input and only use width×height dimensions.
2024-10-08 16:08:12 +02:00
Alx Sa
59b7b6a5fb core: Use prior filter size for stack crops
Previously filters were cropped to the layer size in the
"crop_before" node. This was fine when we had destructive-only
filters, but now that we can multiple active layers, this causes
new layers to crop the prior ones if they're larger than the layer
(e.g. If gegl:drop-shadow goes out of the layer boundaries)

This patch sets the crop_before to the current sizes, then searches
the filter stack to see if there's a filter that needs a larger width
or height (or if it needs a smaller x or y values), then sets the crop
to that size. This crop update is also run when a filter is raised or
lowered.
2024-10-08 16:08:12 +02:00
Cheng-Chia Tseng
42f8a61923 Update Chinese (Taiwan) translation 2024-10-08 14:01:51 +00:00
Cheng-Chia Tseng
e4f94baaed Update Chinese (Taiwan) translation 2024-10-08 13:56:45 +00:00
Cheng-Chia Tseng
80e6138f13 Update Chinese (Taiwan) translation 2024-10-08 13:47:51 +00:00
Cheng-Chia Tseng
d007ab8c70 Update Chinese (Taiwan) translation 2024-10-08 13:41:23 +00:00
Cheng-Chia Tseng
ba8145315b Update Chinese (Taiwan) translation 2024-10-08 13:06:35 +00:00
Jehan
b93e50ef23 Issue #12126: Build broken since 741dc20b. 2024-10-08 01:10:53 +02:00
Jehan
cf3aa1b6b7 build, gimp-data: do not hardcode the build directory.
This fixes building with the option -Dwindows-installer=true. We should
**never** hardcode the build directory like what was done in this
script.

Also bumping gimp-data where some scripts had similar issues which were
only visible with -Dwindows-installer=true.
2024-10-08 00:52:53 +02:00
Alx Sa
afc0a6d15d actions,core,file: Copy inactive filters
Previously we used gimp_drawable_has_filters ()
to detect if a layer had any filters set.
However, this function only gets active
filters, leading to filters with their
visibility set to FALSE not being copied.
This patch checks the number of children
in the filter stack container instead to get
an accurate filter count.
2024-10-07 16:35:39 +00:00
Kolbjørn Stuestøl
1019574bcc Update Norwegian Nynorsk translation 2024-10-07 16:30:21 +00:00
Cheng-Chia Tseng
296afcc4a1 Update Chinese (Taiwan) translation 2024-10-07 14:42:35 +00:00
Cheng-Chia Tseng
b4766e22af Update Chinese (Taiwan) translation 2024-10-07 14:12:59 +00:00
Cheng-Chia Tseng
22f383914d Update Chinese (Taiwan) translation 2024-10-06 10:37:57 +00:00
Tim Sabsch
5c73482366 Update German translation 2024-10-06 08:42:00 +00:00
Tim Sabsch
0a1a9a5035 Update German translation 2024-10-06 08:40:15 +00:00
Rodrigo Lledó
93ada4eb3d Update Spanish translation 2024-10-05 22:18:19 +00:00
Rodrigo Lledó
048899c688 Update Spanish translation 2024-10-05 22:16:02 +00:00
Rodrigo Lledó
b4d4ed9dd6 Update Spanish translation 2024-10-05 22:11:12 +00:00
Rodrigo Lledó
db761817ca Update Spanish translation 2024-10-05 22:08:03 +00:00
Alx Sa
94a276973d app/tools: Add shortcuts for Paint Select modes
This patch ports the Add/Subtract mode
shortcuts from GimpSelectionTool to
GimpPaintSelectionTool, implementing
the unfinished gimp_paint_select_tool_modifier_key ()
function. The UI itself is left unchanged.
2024-10-05 14:54:20 +00:00
Cheng-Chia Tseng
4b499d0975 Update Chinese (Taiwan) translation 2024-10-05 12:34:30 +00:00
Cheng-Chia Tseng
d2360ac96f Update Chinese (Taiwan) translation 2024-10-05 12:25:17 +00:00
Cheng-Chia Tseng
bb4620abc1 Update Chinese (Taiwan) translation 2024-10-05 12:13:03 +00:00
Cheng-Chia Tseng
23ecae60a0 Update Chinese (Taiwan) translation 2024-10-05 11:09:49 +00:00
Cheng-Chia Tseng
25473b4dc7 Update Chinese (Taiwan) translation 2024-10-04 18:03:13 +00:00
Rupert
d4b1df9046 plug-ins: Fix 64bpp BMP loading 2024-10-04 07:41:20 -04:00
Martin
e0444990ba Update Slovenian translation 2024-10-03 21:43:42 +00:00
Jehan
849de6c87f NEWS: update. 2024-10-03 22:10:39 +02:00
Jehan
8e9a97672b app: fix wrong format restriction for indexed images.
When setting a new palette, we must not use the new palette format
restriction (especially if it has none!), but the indexed image's
format, which is unchanged anyway. So move the call to
gimp_palette_restrict_format() into gimp_image_colormap_update_formats()
and use the correct format to restrict to.

See: https://gitlab.gnome.org/GNOME/gimp/-/issues/12108#note_2238182
2024-10-03 13:52:29 +02:00
Andre Klapper
579b29f338 Map to Object filter: Fix incorrect section heading
Closes #12104
2024-10-03 10:26:33 +00:00
Alx Sa
67fd22d0c2 scripts: Port 'Set Colormap' to use gimp-image-set-palette
Resolves #12108
This use of gimp-image-set-colormap was missed during
the API change in 3bfda4f1.
2024-10-02 23:28:12 +00:00
Alx Sa
db0f68594a plug-ins: Add support for loading 64bpp BMPs
Adds support for loading BMPs with 64bpp.
Each channel uses 13 bits (2^13 max value),
so it's scaled to fit our 16 bit integer image mode.
2024-10-02 23:25:03 +00:00
Alx Sa
ff1a92b81e libgimpwidgets: Fix infinite loop on appending invalid input
gimp_size_entry_eevl_unit_resolver () loops through all valid units
to find a match for user's inputted value in GimpSizeEntry.
It runs until gimp_unit_get_by_id () returns NULL, where it does a
final check on GIMP_UNIT_PERCENT.
Due to a small logic error, we kept setting the GimpUnit to
gimp_unit_percent () each time it was NULL, so the loop ran forever.
Per Jehan, this patch breaks the logic up so that we terminate the
loop once the percent check fails.
2024-10-02 23:21:05 +00:00
Alx Sa
3eed201368 core: Scale filters with "output-extent" role
Some filters such as gegl:spiral have properties which limit
their width and height, separate from the gegl:crop nodes in
GimpDrawableFilter. As a result, they won't scale when the layer
or image is resized even if the crop is updated.

This patch checks if there's a "width" or "height" property with
the "output-extent" role in the filter, and updates those properties
to make sure it resizes correctly. Renders made from selections
are not modified, as the user specifically chose that size.
2024-10-01 10:45:30 +00:00
lillolollo
16006dae43 app: fix missing sentinel in function call warning
Building with clang i have "missing sentinel in function call" warning. The C callers to such functions use the C NULL definition (ie ((void*)0)), which is a valid sentinel. However the C++ NULL definition (ie 0L), is not a valid sentinel without an explicit cast to a pointer type.
2024-10-01 00:08:43 +00:00
Милош Поповић
88f615bccb Update Serbian (Latin) translation 2024-09-30 18:24:03 +00:00
Милош Поповић
d03434bdae Update Serbian translation 2024-09-30 18:22:33 +00:00
Jehan
f75569c9dd Issue #12096: fix Windows build.
Commit 5b981adc7f was not taking into account that on Windows, the
gimp_resource_select_*() functions were made invisible and still needed
to be in the def file.

So this makes the 2 functions technically still exposed in the binary
even though the functions stay officially private (they are not in
header) and people are not supposed to use them directly in plug-ins.
2024-09-30 17:12:34 +02:00
Jehan
741dc20bca tools: gen-languages must be compiled natively. 2024-09-30 17:12:34 +02:00
Kolbjørn Stuestøl
b961bf43f5 Update Norwegian Nynorsk translation 2024-09-30 13:17:48 +00:00
Kolbjørn Stuestøl
89c31344dd Update Norwegian Nynorsk translation 2024-09-30 13:12:43 +00:00
Kolbjørn Stuestøl
1234bc0ba4 Update Norwegian Nynorsk translation 2024-09-30 13:10:09 +00:00
Kolbjørn Stuestøl
eea2f35bbc Update Norwegian Nynorsk translation 2024-09-30 12:59:36 +00:00
Luming Zh
ab171900b0 Update Chinese (China) translation 2024-09-30 12:47:07 +00:00
Luming Zh
3884636656 Update Chinese (China) translation 2024-09-30 12:42:15 +00:00
Kolbjørn Stuestøl
36f5523465 Update Norwegian Nynorsk translation 2024-09-29 19:34:09 +00:00
Martin
69e4a581b4 Update Slovenian translation 2024-09-29 18:59:29 +00:00
Martin
48b5841414 Update Slovenian translation 2024-09-29 18:51:05 +00:00
Yuri Chornoivan
411b082663 Update Ukrainian translation 2024-09-29 16:55:20 +00:00
Yuri Chornoivan
d98fa4006f Update Ukrainian translation 2024-09-29 16:47:10 +00:00
Jehan
596ce11b5c libgimp, plug-ins: following up the renaming of GIMP_PDB_PROC_TYPE_EXTENSION…
… to GIMP_PDB_PROC_TYPE_PERSISTENT, let's rename some procedures.

s/gimp_plug_in_extension_enable/gimp_plug_in_persistent_enable/
s/gimp_plug_in_extension_process/gimp_plug_in_persistent_process/
s/gimp_procedure_extension_ready/gimp_procedure_persistent_ready/
2024-09-29 18:43:49 +02:00
Jehan
a9bc4c6c1b gimp-ux#93: GIMP_PDB_PROC_TYPE_EXTENSION renamed GIMP_PDB_PROC_TYPE_PERSISTENT.
Even though it's not public yet (and won't really be for GIMP 3.0), I
created a new concept of "GIMP Extension" (.gex files) which bundles
various types of data for GIMP, such as plug-ins but also brushes and
other resources, themes, icons, etc.

Having 2 different concepts named the same is confusing, especially
since one of them is not really self-explaining IMO (why are "always-ON"
plug-ins called "extensions"?). So even though this is the older
concept, and since we are anyway massively breaking the API for GIMP
3.0, let's rename this older concept. "Persistent Plug-Ins" is much more
self-defining.
2024-09-29 18:08:40 +02:00
Bruno
4a41b76411 build/linux: Update ghostscript, json-c and graphviz modules
Ported from: e499861f14
2024-09-29 12:58:47 -03:00
Cheng-Chia Tseng
7cd99865a1 Update Chinese (Taiwan) translation 2024-09-29 15:14:19 +00:00
Anders Jonsson
6c98bfdc8a script-fu: mark label for translation 2024-09-29 14:34:47 +00:00
Cheng-Chia Tseng
45b16f5215 Update Chinese (Taiwan) translation 2024-09-29 14:18:20 +00:00
Tim Sabsch
8b2120dac3 Update German translation 2024-09-29 13:07:45 +00:00
Alx Sa
1cfe27e73e app/widgets: Fix Fade visibility in Paint Dynamics Output Editor
The Fade curve is meant to use the widget's foreground color. The current
code detects this by checking if the curve's predefined color has an alpha
value of 0 - if it does, INPUT_COLOR (i) returns NULL and sends a NULL color
variable to gimp_curve_view_set_curve ().

However, since the GeglColor port, the "color" variable is an empty
GeglColor object rather than a pure NULL value. Thus, the line was always
drawn with the default GeglColor value which is difficult to see in light mode.

This patch adds a tertiary conditional statement so that a pure NULL is sent if
the alpha value is 0, rather than the color variable.
2024-09-29 11:22:26 +00:00
Jehan
c57c2dbbed NEWS: update. 2024-09-29 12:59:58 +02:00
Jehan
3f3c576399 libgimp: make GimpZoomPreview a final type. 2024-09-29 12:27:50 +02:00
Jehan
84b4f48432 libgimp: fix .def file indentation. 2024-09-29 12:27:50 +02:00
Jehan
5b981adc7f libgimp: make gimp_resource_select_*() API private. 2024-09-29 12:27:50 +02:00
Jehan
81fcb71209 libgimp: set 2 functions to GimpResourceChooser as private. 2024-09-29 12:27:50 +02:00
Jehan
eb07b7f8f8 libgimp: GimpProcBrowserDialog is a final type. 2024-09-29 12:27:50 +02:00
Jehan
16cfc9d681 libgimp: mark various private functions as G_GNUC_INTERNAL.
It may be more efficient this way on supported compilers.

Some of the private functions cannot be marked with this macro because
they are used across GIMP libraries (for instance some libgimp
functions are used in libgimpui, but are not meant to be public), while
they are not made public in headers. These are still considered private,
as far as API stability is concerned.
2024-09-29 12:27:50 +02:00
Jehan
12ad579843 libgimp: fix disabling various metadata export per Preferences.
Preferences > Image Import and Export tab has various Export Policies,
which are mostly for safety reasons. One may want to default at never
exporting specific metadata. This got broken and anyway the logic was
not good enough.

Now these policies are followed in interactive mode, unless an export
has already happened for this specific export plug-in on this specific
file (in this case, we reuse the last values). We don't want settings to
unexpectedly change in such a case.

In last-vals and non-interactive run-mode though, we don't follow the
Preferences policies, since in the former case, we want to reuse exactly
the same settings (e.g. we don't want an Export discarding metadata
which explicitly checked in the Export As) and in the latter case, it is
the developer's responsibility to set up expected options.
2024-09-29 12:27:50 +02:00
Jehan
68ee943200 libgimp: clean up the GimpImage's metadata API.
gimp_image_metadata_load_prepare(), gimp_image_metadata_load_finish()
and gimp_image_metadata_save_finish() are only ever used internally now,
so there is no need to expose them.

If we realize that we need them as public functions later, or someone
reports a valid use case, we can always bring them back later.

Also improves a bit various annotations.
2024-09-29 12:27:50 +02:00
Jehan
aa2527843b libgimp: use G_DECLARE_FINAL_TYPE() for GimpImageComboBox. 2024-09-29 12:27:50 +02:00
Jehan
9e0a75cd87 libgimp: improves docs and annotations for GimpImage's color profile API. 2024-09-29 12:27:50 +02:00
Jehan
993fae97df libgimp: make GimpDrawablePreview a final type. 2024-09-29 12:27:50 +02:00
Jehan
3051796f3e app, libgimp, pdb, plug-ins: merge gimp_channel_new() in libgimp and PDB.
Why have 2 functions if one is basically just redirecting to the other.
All we needed to do was to reorder the PDB args.
2024-09-29 12:27:49 +02:00
Jehan
bd287d6f89 libgimp, plug-ins: variosu gimp_*_chooser_new() should use specific type…
… for default value.

Don't use the generic GimpResource which implies that we could set any
GimpResource (which of course makes no sense).
2024-09-29 12:27:49 +02:00
Jehan
d49077569d libgimp: GimpAspectPreview can be declared as a final type. 2024-09-29 12:27:49 +02:00
Kolbjørn Stuestøl
9f17074ba6 Update Norwegian Nynorsk translation 2024-09-28 16:18:18 +00:00
Kolbjørn Stuestøl
a3ed688334 Update Norwegian Nynorsk translation 2024-09-28 15:47:52 +00:00
lloyd konneker
10bccee8b0 ScriptFu: test TinyScheme numerics
No changes except to tests.

Many tests of TinyScheme compliance to R5RS re numbers.

Tests issue 1049 "prints floats with commas" in non-English locale.
Some tests pass in English but fail in German.
Prepatory to a fix, so we know the fix works and doesn't break anything else.
2024-09-28 14:54:30 +00:00
Alx Sa
ee9bb99801 app/widgets, themes: Show Sample Point indexes in Default theme
The Default box.vertical style covers up
the Sample Point indexes that are drawn
with Cairo. This patch adds a style for the
GimpSamplePointEditor that sets its inner
box.vertical to transparent in order to
to make the indexes visible.
2024-09-28 13:42:08 +00:00
Tim Sabsch
7d53fdad9d Update German translation 2024-09-28 12:06:54 +00:00
Bruno
cf2893747d gitlab-ci, build: Do not bundle nor dist any Lua related files
Following 78665ca372

Since our official builds tends to be vanilla (only using meson
standard options), there is no need to shipping these lua files.

This commit can be reverted in the future if Lua is stable again.
2024-09-28 01:42:44 +00:00
Alx Sa
acebb4fa22 themes: Define symbolic icon colors for System theme
Symbolic layer tree icons are often invisible
when not selected on System themes in
light mode. This patch adds a CSS rule
to ensure the layer tree icons are visible
on light backgrounds.
2024-09-27 21:10:40 +00:00
lloyd konneker
771dd219f6 ScriptFu: rename script-fu-register-regular => -procedure
As suggested by reviewers, use a better word.
Regular denotes size.
Procedure is the same word used in the classes in the code.
Procedure denotes a general procedure, without specialization.

Renames only where visible externally by script authors.
Internally, some functions are still named "_regular".
That can be changed later as a style issue.
2024-09-27 14:35:50 +00:00
lloyd konneker
a5e191e209 ScriptFu: documents: edit the "author guide" re new registration functions 2024-09-27 14:35:50 +00:00
lloyd konneker
96e02122b8 ScriptFu: plugins: port to script-fu-register-regular
Ported all supported/shipped Scheme plugins in the repo
that formerly called script-fu-register.
No test plugins were ported.

The plugins now use the new dialog, GimpProcedureDialog.

These are the plugins that are not filters i.e. not GimpImageProcedure,
which were ported earlier to script-fu-register-filter.

The test plugin Demo>Sphere demonstrates that while script-fu-register
is now deprecated, it still works, showing the old dialog.

Misc bug fix to prior commits.

Misc porting of same plugins to v3 binding of PDB return values.

Misc fixes: invalid default font names, and deprecated PDB calls.
2024-09-27 14:35:50 +00:00
lloyd konneker
d0a6c4c758 ScriptFu: add Scheme language function script-fu-register-regular
Building on prior commits, with a few small fixes to them.

First demonstrable changes towards #12605.

Font map plugin is ported as a test case.

Old-style plugins using script-fu-register still work.
2024-09-27 14:35:50 +00:00
lloyd konneker
d361256977 ScriptFu: add methods for running regular procs
A chain of methods starting with the run_fun script_fu_run_regular_procedure.
To use GimpProcedureDialog for scripts that are not ImageProcedure.
2024-09-27 14:35:50 +00:00
lloyd konneker
a96211fcb7 ScriptFu: refactor script-fu-command
No functional changes.

    Extract methods to be in common with script_fu_fu_regular_proc
    i.e. to run a GimpProcedure instead of GimpImageProcedure
2024-09-27 14:35:50 +00:00
lloyd konneker
0a2b64352c ScriptFu: refactor script-fu-dialog
No functional changes.

Extract methods to be in common with script_fu_fu_regular_proc
i.e. to run a GimpProcedure instead of GimpImageProcedure
2024-09-27 14:35:50 +00:00
Cheng-Chia Tseng
16efc8adc2 Update Chinese (Taiwan) translation 2024-09-27 14:18:31 +00:00
Cheng-Chia Tseng
46c94cd1c5 Update Chinese (Taiwan) translation
(cherry picked from commit f713ac680f)
2024-09-27 14:14:01 +00:00
lloyd konneker
4ffc99b75d ScriptFu: fix 8463 obsolete SF-VALUE
Any third-party scripts using SF-VALUE will need porting.
2024-09-27 06:41:29 -04:00
Jehan
98b2216244 tools: fix another deprecation warning, this time in PyGObject.
Fixes:

> PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated.
> Please specify keyword(s) for "label" or use a class specific constructor.
> See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
2024-09-26 20:10:47 +02:00
Jehan
1726a6f89f tools: fix deprecated syntax.
This fixes a similar deprecation warning on various pieces of code:

> DeprecationWarning: Testing an element's truth value will always return True in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
>   samples = log.find ("samples") or empty_element
2024-09-26 19:49:47 +02:00
Jehan
05c86dad8a app: disallow GEGL graph as layer effect, except with an environment variable.
GEGL graph is a free-form effect which can just run any other effect. It
is very useful for GEGL operation developers, but it's dangerous because
it allows running any of the operations, even the ones which cannot be
run through a GUI in GIMP, or the ones otherwise forbidden as layer
effects. In particular, you could run some of the sink effects to
overwrite local files, even with a vanilla GIMP.

So by default, we forbid the GEGL Graph tool to be used as a
non-destructive effect, and we discard any gegl:gegl layer effect found
in a XCF. Yet we leave a way for developers to create and load a GEGL
Graph effect through an environment variable which can be discovered
through appropriate warnings (on XCF load) and tooltip (in GEGL Graph
dialog).
2024-09-26 15:16:51 +02:00
Jehan
6e88ac559e app: forbid GeglOperationSink as layer effects on XCF load.
As suggested by pippin, it would at least prevent loading XCF which
would override local files using default GEGL operations. Normally these
ops which writes to file cannot be created through the GUI, but a XCF
using one such op could easily be constructed.

Of course, this doesn't block third-party ops doing similar things
without being sink operation subclasses.
2024-09-26 14:08:28 +02:00
Jehan
9ee369690b libgimpbase: handle cases when fgets() may fail.
Fix:

> warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
2024-09-26 10:51:31 +02:00
Jehan
9e4ff0f62f app: oups, using the string after freeing it! 2024-09-25 22:09:34 +02:00
Jehan
2633291a55 app: don't try to convert mask when only the TRC changed.
E.g. changing from non-linear to linear without bit-depth change would
trigger a CRITICAL on mask conversion, because masks are always linear
anyway. Only the bit-depth change should trigger a conversion.
2024-09-25 22:03:05 +02:00
Jehan
4803c62201 app: make some radio actions not sensitive when selected.
Rather than showing actions as active when they'll just be no-op, make
these inactive.

There are more to fix this way, but these 2 had been really annoying me
for some time because they are very often run.
2024-09-25 21:29:53 +02:00
Jehan
f3cd852da8 app: return without doing anything when toggling the already active action. 2024-09-25 20:59:00 +02:00
Jehan
a38d3d3028 libgimp: fix some copy-paste bug.
Thanks to Alx for spotting this one!
2024-09-25 12:06:44 +02:00
ayesha akhtar
c8664bfdd6 Add Bengali translation 2024-09-25 02:34:47 +00:00
Alx Sa
01af0f78c8 app, libgimp, pdb: Fix generation warnings
On generating our PDB files, we were
getting warnings about uninitialized strings.
This is because descriptions and authors
had been left off three .pdb files. Adding
these in resolved the warnings.
A new PDB author entry was also added
for Idriss Fekir.
2024-09-24 22:56:44 +00:00
Jehan
33ec5b70b1 app, libgimp, pdb: fix our PDB script to try to interpret gi-docgen syntax.
Fixes:

> Possible unintended interpolation of @palette in string at /builds/GNOME/gimp/pdb/groups/image.pdb line 1692.
2024-09-24 23:29:33 +02:00
Robin Mehdee
479fb9501a Add Bengali translation 2024-09-24 17:26:16 +00:00
Yuri Chornoivan
3a0dd58b7f Update Ukrainian translation 2024-09-24 14:25:16 +00:00
Alx Sa
439a5c9831 scripts: Remove last use of SF-VALUE
This patch replaces SF-VALUE in burn-in-anim.scm with
SF-ADJUSTMENT, allowing us to deprecate and remove
SF-VALUE from the API.
2024-09-24 13:12:25 +00:00
Jehan
60a0a0e598 NEWS: fix latest NEWS update.
See: 8d5cd6f3d5 (note_2230413)
2024-09-24 12:18:48 +02:00
Luming Zh
f8bdb07d91 Update Chinese (China) translation 2024-09-24 01:36:45 +00:00
Jehan
8d5cd6f3d5 NEWS: update. 2024-09-23 21:43:39 +02:00
Martin
ad7264773e Update Slovenian translation 2024-09-23 19:05:46 +00:00
Tim Sabsch
cd44eeb778 Update German translation 2024-09-23 19:05:03 +00:00
Jacob Boerema
693817a424 app: add gexiv2 and exiv2 versions to crash data
For metadata related issues, it is often relevant to know the versions
of both gexiv2 and exiv2, so we add those here.
2024-09-23 18:24:48 +00:00
Jacob Boerema
f84e4ee04d plug-ins: fix failure to write IPTC TimeCreated
The IPTC TimeCreated tag does not allow fractions of a second, while
Xmp.Photoshop.DateCreated (which includes the time) does allow this.

In our metadata editor we base our date/time on the last value and then
synchronize it with the IPTC date and time values.
While doing that, we did not check if the seconds had a fractional part.

To fix this we first check for the presence of a fraction by checking
for a dot in the time string.
Complicating factor is that a timezone difference may follow that,
which we want to keep if present. So we check for that too and
concatenate the parts we want.
2024-09-23 13:37:29 -04:00
Jehan
151cb9c40c app, libgimp, pdb, plug-ins: rename gimp_palette_entry_[gs]et_*().
These function names look like they should be applied to a
GimpPaletteEntry, which is a type which doesn't exist in libgimp. This
naming is much more appropriate.
2024-09-23 18:37:27 +02:00
Jehan
1b7f8533ee libgimp, plug-ins: fix a case of not showing dialog.
Fix a generic case when gimp_window_set_transient() is called on an
already mapped window: the handle argument was missing.

The part in bmp-export though, in fact, I am still a bit at a loss.
Somehow calling gimp_window_set_transient() was making the dialog not
showing up at all, yet kinda blocking the bmp plug-in (waiting for a
response to the non-displayed dialog) and various features in the main
GIMP GUI too.
Calling gtk_widget_show() first, before setting transient was enough to
make the dialog finally work as it should, but this is really not ideal.
I compared to other cases in other plug-ins where the set_transient()
function was called before the dialog was shown and it is working fine.
I just cannot find the proper reason. So this will do for now.
2024-09-23 18:20:46 +02:00
Jehan
3bfda4f119 Issue #9477: remove gimp_image_[gs]et_colormap() from libgimp API.
They are now replaced by the more generic gimp_palette_[gs]et_colormap(),
hence making less of a particular concept of "image colormap". It's just
a palette attached to the image (and restricted to the image format).
2024-09-23 18:20:14 +02:00
Jehan
2e1bf0e44c plug-ins: get rid of all remaining usage of gimp_image_[gs]et_colormap().
When I see that we are just using R'G'B' format with no space
everywhere, I'm pretty sure some of this code must be wrong (even though
for some formats, maybe only sRGB is supported, I am guessing that for
some others, the palette may be in specific color spaces).
This will have to be improved with time.
2024-09-23 18:20:14 +02:00
Jehan
8fff258286 app: display in the set color space when a color dialog is not context-aware.
In particular, palette's colors will want to be shown in their own space
(which may in fact be the image's space, for indexed image's colormap;
or in various spaces for named palettes).
2024-09-23 14:33:50 +02:00
Jehan
c26ca2339a app: store GimpPalette in GimpImageUndo, not a raw colormap.
Also make sure gimp_data_copy() also copies the proper palette format
restriction and apply it when necessary (e.g. setting the stored
colormap which is done when popping an image undo).

Otherwise we were losing format/space information, which was corrupting
color space when undoing then redoing.
2024-09-23 14:33:50 +02:00
Jehan
16a2fc58ba libgimp: fixing "palette" libgimp API unit testing.
It was an equality because I think the conversion from palette format to
"RGBA float" should go through the exact same babl code path, however it
is done in the API. And that is the case on my machine where I get
indeed perfect equality. But apparently not on the CI.

Though I guess investigating further would not be a bad idea, let's
consider this a minor issue (as a general rule, comparing float with
epsilon is still a recommended software usage), and just add a comment.
2024-09-23 12:14:19 +02:00
Jehan
8344d7c331 tools: more portability fixes.
Apparently mktemp with busybox (and no GNU coreutils) requires mktemp
template to be XXXXXX.
Thanks to pippin for raising this issue.
2024-09-23 01:18:14 +02:00
Jehan
4b25148269 app, meson: disable GimpBacktrace on Linux without execinfo.h.
If execinfo.h was not found, do not try to compile gimpbacktrace-linux.c
because the backtrace() API is not optional there.

Also I'm further improving the meson summary, regarding "Dashboard
Backtraces". Rather than just yes/no to say if the traces are detailed,
let's go for finer-grained state, saying if the traces are completely
deactivated ("no", e.g. when execinfo.h is not found), or "rough" (when
libunwind and libbacktrace are not found) or "partially detailed" (one
of these is not found) and finally "detailed".
Also add info on missing dependency between parentheses to help
packagers find the proper dependencies to get to the "detailed" state.
2024-09-23 00:01:07 +02:00
Jehan
df8b8015f2 tools: --preserve-root --one-file-system are not portable options.
pippin had trouble with it when using busybox. So let's test for them
(assuming they will show up in a `rm --help`).
2024-09-23 00:01:06 +02:00
Jehan
9ad05ee6fa app, libgimp, pdb, plug-ins: change gimp_palette_set_colormap() to take a C array.
Similar to previous commit.
2024-09-23 00:01:06 +02:00
Jehan
c60512514c app, libgimp, pdb: change gimp_palette_get_colormap() to return a C array.
GBytes are a bit annoying to handle, so I'm renaming the PDB procedure
to a private _gimp_palette_get_bytes() instead, and making a wrapper
function which returns a C array and both the number of colors or number
of bytes. The latter is needed for introspection (otherwise the binding
can't know the size of the C array), but for the C API, both these
returned integers can be considered redundant (since one can be computed
from the oher), so only one at a time is mandatory.
2024-09-23 00:01:06 +02:00
Jehan
c3488ad0c5 plug-ins: port various plug-ins to gimp_palette_[gs]et_colormap() and …
… gimp_image_[gs]et_palette().
2024-09-22 23:26:33 +02:00
Jehan
9bd69498ca app, libgimp, pdb: new gimp_image_set_palette() procedure.
When we want to set a full palette based on an existing one, no need to
request the full colormap from core to libgimp then back. Just set the
palette which is nothing more than an empty shell around a resource ID.
2024-09-22 23:26:33 +02:00
Jehan
6a35118a8f app, libgimp, pdb: new gimp_palette_set_colormap() PDB procedure. 2024-09-22 23:26:33 +02:00
Jehan
f66c9c1996 app: fix circle dependency of data attached to an image.
I had this case with the palette of an indexed image which had its own
reference to the image. So the image would never be freed until the
palette is freed, while the palette is freed in GimpImage's dispose()
code.

Make this a weak reference from GimpData instead.
2024-09-22 23:26:33 +02:00
Jehan
78ee9f56d4 app: add a message on stderr when stray images are freed at exit.
This is not necessarily a core bug, so I can't put this message as a
WARNING or CRITICAL. It may just be a plug-in which left some image
over. Nevertheless it is still useful information for plug-in
developers, same as it can also help core developers to discover actual
core bugs (see next commit).
2024-09-22 23:26:33 +02:00
Jehan
537c3bb2c8 app: don't inhibit or uninhibit when there is no GtkApplication.
I had the case when gimp_exit_idle_cleanup_stray_images() would clean up
some images on exit, apparently after the GtkApplication is itself
already gone.
2024-09-22 23:26:33 +02:00
Jehan
d361ba4c9a app: do not run gimp_palette_view_select_entry() when there is no palette. 2024-09-22 23:26:33 +02:00
Jehan
4708609395 app, libgimp, pdb: new gimp_palette_get_colormap() function. 2024-09-22 23:26:33 +02:00
Jehan
aa31d22e9f app, libgimp*, pdb: new "format" type in the PDB.
We have a bunch of special-casing format passing through the PDB, but
either we were only passing the encoding, or else we were reconstructing
the full format through private intermediate functions. In the
space-invasion world, this is not right. Let's have a proper "format"
type for PDB which does all the relevant data-passing for us, once and
for all!

Note that I am creating a wrapper boxed type GimpBablFormat whose only
goal is to have recognizable GValue since Babl types don't have GType-s.
Moreover I'm not using the GeglParamSpecFormat either, because it just
uses pointers which again are a bit annoying in our various PDB code.
Having a simple boxed arg is better.
2024-09-22 23:26:33 +02:00
Jehan
94c7ca6809 plug-ins: support saving the history of commands.
Since I use the Python console a lot myself to test GIMP API, the
ability to recall previously ran commands is extremely useful. Let's
just add support for this as an AUX argument. This was already done in
the Script-fu console, now in the Python console too!
2024-09-22 23:26:33 +02:00
Jehan
85a686b8c5 libgimpconfig: do not add NULL to a GStrv.
gimp_scanner_parse_string() transforms the empty string into NULL, which
might be what we want elsewhere, but definitely not for GStrv since NULL
is the end flag for the string array.
2024-09-22 23:26:33 +02:00
Jacob Boerema
79faa06693 script-fu: fix failure to load SF_FILENAMEs on Windows
A path on Windows contains backslashes, which got interpreted as
escape sequences in script-fu when selecting a filename by the call
to g_string_append_printf.
This caused failures in e.g. Stencil Chrome after selecting an
environment map image.

Use script_fu_strescape to escape the filepath, so that we correctly
interpret the Windows path.

See also
https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1851#note_2225989
2024-09-22 17:34:09 +00:00
Cheng-Chia Tseng
c4fb7b128c Update Chinese (Taiwan) translation 2024-09-22 17:01:16 +00:00
Rodrigo Lledó
aff0e69036 Update Spanish translation 2024-09-22 15:50:51 +00:00
Cheng-Chia Tseng
93fd9ca75f Update Chinese (Taiwan) translation 2024-09-22 13:54:04 +00:00
Piotr Drąg
c5ab8d510d Update Polish translation 2024-09-22 14:41:00 +02:00
Bruno
b3b466dcbc gitlab-ci: Do not trigger crossbuilds anymore
febb2126 was proposed temporarely while we had hope of having a fix.
Now, we have !1860 (apparently 99% done) but the main maintainer of
crossbuilds refused to look at it because he is focused on core code
until 3.0 so, with this timeframe, the commit lost its reason to exist.

So, to avoid keeping runners work unnecessarelly with abandoned jobs,
let's not trigger them ('when: never') as I proposed on IRC months ago.
2024-09-22 07:44:41 -03:00
Jehan
f5804fa82b Issue #12063: CTRL+C handling breaks 32-bit build.
Should fix:

> error: passing argument 1 of 'SetConsoleCtrlHandler' from incompatible pointer type
2024-09-21 15:39:24 +00:00
Anders Jonsson
c812da7e23 Issue #8832: fix metadata string corrupted on Linux
On Linux the string for GPS coordinates was broken when the
string it was strtok:d from was freed. Move the free until we
have finished using the resulting string.
2024-09-21 14:12:52 +00:00
Alx Sa
0f8b586582 core, tools: Prevent selection from affecting NDE filter redraw
gimp_drawable_filter_apply () uses the current
selection as a boundary to draw/redraw a
filter. When editing a filter, if there's an
active selection created after the filter is
added, it interferes with the filter's redraw.

This patch adds a new gimp_drawable_filter_apply_with_mask ()
function, which can be called if we want
to use the existing filter's boundaries to
draw the new filter.
2024-09-21 13:33:31 +00:00
Cheng-Chia Tseng
94b5898aa0 Update Chinese (Taiwan) translation 2024-09-20 15:35:38 +00:00
Cheng-Chia Tseng
cfece57018 Update Chinese (Taiwan) translation 2024-09-20 15:19:26 +00:00
lloyd konneker
697efa72aa Plugins: fix old font defaults giving missing resource warnings
A plugin declaring a default font that is invalid warns at startup.
No such plugins should be installed by GIMP, even for a testing build.
2024-09-20 10:34:41 -04:00
lloyd konneker
b7376a57a7 ScriptFu: fix compiler warning "format string is not a string literal" 2024-09-20 10:58:50 +00:00
lloyd konneker
653cca0993 Plugins: Stain, convert to v3 ScriptFu binding of PDB return values
Easier to read, more canonical Scheme
2024-09-20 10:58:50 +00:00
lloyd konneker
eb57122365 Plugins: fix Stain plugin call to changed Distress Selection plugin
Symptom is "Arg 3 invalid or out of range".  Issue not formally reported.

Broke because Distress Selection plugin signature changed: arg Threshold type Int=>Float
2024-09-20 10:58:50 +00:00
lloyd konneker
f7f71ae292 ScriptFu: enhance error messages for range errors in calls to PDB
Refactor: extract methods for int and float range errors

Enhance by naming the called PDB procedure

This helps script authors find the location of an error.

These errors can occur either when first authoring a plugin,
when a user stresses a plugin in a way not previously tested,
or when a called PDB procedure or plugin changes an argument type or range.

Note that calls from SF scripts to other SF plugins
are not always via a PDB call and then not range checked.
2024-09-20 10:58:50 +00:00
Elle Stone
c03a4b6132 Make luma lighten only, darken only use linear blend mode
Issue #3471 Unexpected results from luma darken only blend mode

Having the blend mode be perceptual results in the unexpected
result that a color with a lower actual XYZ "Y" value - that's
also clearly visibly darker than the underlying layer - can be
considered as "lighter" than a color with a higher "Y" value.

Reviewer's (Jehan) note: this only changes the default's blend space,
but in fact, we should probably even make the blend space immutable for
these 2 layer modes because the algorithm doesn't make sense in
perceptual (see #3471). We are not doing this right now in order to
not break existing XCF files using these modes in perceptual. We'll have
to figure out later how to have an immutable blend space going forward
while allowing the broken blend space but only for existing XCF images.
2024-09-20 01:26:33 +02:00
Jehan
0a33ba5a69 app: implement Ctrl-C handling for Windows.
This should also fix the build on Windows wich fails with:

> ../app/app.c:537:7: error: call to undeclared function 'gimp_signal_private'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
2024-09-19 20:05:53 +02:00
Tim Sabsch
f9efe07df6 Update German translation 2024-09-19 15:21:25 +00:00
Jehan
1e866c433a meson: fix non-x86 builds.
The Aarch64 build failed with the following error because of a recent
change:

> ../meson.build:617:24: ERROR: Unknown variable "have_x86".
2024-09-19 15:04:20 +02:00
Jehan
998c65f4e2 NEWS: update. 2024-09-18 23:26:21 +02:00
Jehan
78665ca372 extensions: the lua binding (and its example plug-in) is now marked as experimental.
We have too many issues with the lua binding, so until someone finds a
solution, mark it officially as experimental.

See discussion in: https://gitlab.gnome.org/GNOME/gimp/-/issues/11895#note_2225885
2024-09-18 22:54:02 +02:00
Jehan
8f3931a45e app: continue running GIMP when run non-interactively without --quit.
Right now, running GIMP non-interactively (i.e. either as gimp-console
or with --no-interface) without --quit, the process was still exiting
immediately, yet not properly cleaning after itself. This is a
regression, since there used to be use cases with people wanting
long-running GIMP (for instance with a long-running plug-in waiting for
input through whatever inter-process communication method).

With this commit:

* GIMP now continues running when run non-interactively without --quit;
* It will catch SIGINT (typically Ctrl-C) and will quit cleanly when the
  signal happens.
* At the end of the normal process (processing command line options,
  such as opening images or running batch commands) and before going
  on-hold, it will display some info text saying that the process can be
  exited with SIGINT and informing that --quit exists if you were in
  fact intending to quit immediately after the normal process actions.
* This also fixes the "gimp_finalize: list of contexts not empty upon
  exit" WARNING we had when it was exiting without --quit (because of no
  proper cleanup).

Note that I add some CLI text which ideally should be localized. But
since we are in string freeze, I am letting them untranslated with a
TODO (also assuming CLI-using people have more chances being used to
English, which may be or not a wrong assumption; but anyway most people
don't read the terminal output, and people running GIMP
non-interactively are even less).
Since this was not just an enhancement but also really a regression fix,
I prefer to do this now despite the string freeze and lack of
localization.
2024-09-18 22:27:19 +02:00
Jehan
2d063d8876 app: add the exact GimpContext subtype for stale context at exit.
It helps a bit for debugging.
2024-09-18 22:14:23 +02:00
Tim Sabsch
7fed33ec84 Update German translation 2024-09-18 18:41:12 +00:00
lloyd konneker
d67676a48b Plugins: Decor>Stencil Chrome use v3 binding and style changes
No intended change to function.
Style changes for easier reading.

Use v3 binding of PDB returns (elide many car), TRUE=>#t, etc.

Also condense trailing right parens to one line
2024-09-18 11:34:18 -04:00
lloyd konneker
4f9a860569 Plugins: Decor>Stencil Chrome: relax image mode requirements (sensitivity)
Was "GRAY" without alpha.
Now "*" i.e. any image mode, w or w/o alpha.
The effect is more or less the same,
and should be exactly the same if the user submits a GRAY.
2024-09-18 11:34:18 -04:00
lloyd konneker
dd241e9c71 Plugin: Stencil Chrome: allow user not to choose a secondary image
When the user does not choose a file of a secondary image,
use a copy of the primary image as the secondary image.
Rather than throw an error.
The filter still has effects, if not quite the same as when user
chooses a secondary image that is not the primary image.
2024-09-18 11:34:18 -04:00
lloyd konneker
f4ae230e4d ScriptFu: fix handling of args for GFiles
Represent passed Gfile args having unknown files
or invalid GFile by an empty string.
Instead of by an error string.
A script can treat an empty string as a None choice of file,
or as a user error.
2024-09-18 11:34:18 -04:00
Yuri Chornoivan
0f96855613 Update Ukrainian translation 2024-09-18 06:55:31 +00:00
Luming Zh
269531123b Update Chinese (China) translation 2024-09-18 01:54:37 +00:00
Bruno
528df2143f build/windows: Comment .ps1 scripts regarding 'gimp-release' 2024-09-17 21:43:28 -03:00
Jehan
67bd7b677b plug-ins: "history" is supposed to be an aux argument.
This got mistakenly changed in commit 4bf5dc7b97.
2024-09-18 01:34:46 +02:00
lloyd konneker
d7f9c5e57e Fix #12044 broken build gcc14 incompatible pointers 2024-09-17 14:12:21 -04:00
Jehan
0bab4c356a meson: update the "Detailed backtraces" optional feature summary.
This was mixing 2 features: the debug on crash and performance logs in
the Dashboard dockable.

1. DrMingw is for debug on crash on Windows and has already a report in
   the meson summary. So I remove it from the test.
2. Linux specifically with libbacktrace and/or libunwind and Windows but
   only x86 (32/64) only are supported. Test updated.
3. Summary field updated to "Detailed backtraces (Dashboard)" for more
   clarity.
2024-09-17 19:10:06 +02:00
Martin
eb4d99b080 Update Slovenian translation 2024-09-17 15:15:03 +00:00
lloyd konneker
15ae108150 ScriptFu: fix defaults for script args of type Resource
Script authors declare defaults by name strings.
Which can be valid name, or empty string, or "from context".

ScriptFu declares formal arguments to the PDB,
either with a default GimpResource, or defaulting dynamically from context.

Works with both new-style dialogs (ProcedureDialog and ProcedureConfig)
or with old-style dialog (script-fu-interface.c)
2024-09-17 12:06:37 +00:00
Alx Sa
1513f41614 plug-ins: Restore drag arrows in Sample Colorize
This feature was broken during the initial
port to GimpProcedureConfig, due to the
Out Level parameters not being properly
clamped when interacted with. This patch
fixes the clamping and restores the call
to level_in_draw () to show the arrows.
It also sets the gamma widget's increments
to match 2.10's range.
2024-09-17 12:06:32 +00:00
Alx Sa
290e46b912 script-fu: Fix missing label in Distress Selection
Since the port to GimpProcedureDialog,
the Threshold label was not being shown
due to it accidentally having an invalid
tag, <-->.
This patch renames it to just "Threshold"
and updates the range to be clearer,
which was the purpose of the original
extended label.
2024-09-17 11:15:13 +00:00
Alexander Shopov
fde9567e58 Update Bulgarian translation 2024-09-17 07:17:57 +00:00
Alexander Shopov
339cb976c4 Update Bulgarian translation 2024-09-17 05:18:12 +00:00
Alexander Shopov
b0647c2365 Update Bulgarian translation 2024-09-17 04:46:23 +00:00
Alexander Shopov
ed39d83091 Update Bulgarian translation 2024-09-17 04:43:28 +00:00
Tim Sabsch
313770a0c1 Update German translation 2024-09-16 19:19:26 +00:00
Bruno
e898791a10 build/windows: Fix acidental revisions in scheduled pipelines
Some maintainers use the common pratice of evaluating variables to 1,
which breaks the revision detection code. Let's special case this.
2024-09-16 14:41:01 +00:00
Jehan
b5cbe4e9dc gitlab-ci, gimp-data: always test the install phase too.
See: https://gitlab.gnome.org/GNOME/gimp-data/-/issues/3
2024-09-16 12:04:29 +02:00
Bruno
ca9d57a417 build/windows: Generate checksums again in MSIX script
This fixes a regression introduced with bd288617
2024-09-15 17:19:44 -03:00
Jehan
537df7f9d8 gimp-data: update.
Two data-related bugs are fixed in the gimp-data repository.
2024-09-15 19:05:26 +02:00
Jehan
12370d7dab Issue #11808: The RGBA channels cannot be duplicated anymore or used with…
… the selection commands.
2024-09-15 17:14:37 +02:00
Jehan
d225d58a22 app: fixing "unused variable" warning.
The warning appeared as consequence of commit 281548a022 which made the
drawable variable (and consequently tool too) unused.
2024-09-15 17:03:16 +02:00
Bruno
aa10a33db9 build/linux: Sync with Beta manifest regarding imath, poppler, suitesparse and graphviz
Ported from: 1ddf27837b
2024-09-14 17:44:04 -03:00
Tim Sabsch
45e23b25a6 Update German translation 2024-09-14 19:21:45 +00:00
Alx Sa
281548a022 app/tools: Use existing filter's drawable to get filter stack
Resolves #12034

Previously, we used the Filter Tool's drawable when updating an
existing filter. However, if the user has a different layer selected than
what the edited filter is attached to, the edited filter is always put at
the top of the filter stack.
This patch retrieves the drawable from the existing filter itself, rather
than assuming the filter tool's drawable is the same one.
2024-09-14 02:10:29 +00:00
Kolbjørn Stuestøl
837d26cae4 Update Norwegian Nynorsk translation 2024-09-13 19:45:39 +00:00
Alx Sa
62c86a5e72 plug-ins: Replace GimpRGB in map-object 2024-09-13 12:32:34 +00:00
Alx Sa
4c11925433 operations: Remove GimpRGB from Gradient operation 2024-09-13 01:12:13 +00:00
Alx Sa
f8e04894ed libgimpcolor, operations, plug-ins: Replace GimpRGB in GimpAdaptiveSuperSample
GimpRGB replaced with gdouble arrays.
Note that some temporary intermediate
GimpRGBs objects were added, which will
be removed when map-object and
gimpoperationgradient are fully converted
in a separate commit.
2024-09-13 01:12:13 +00:00
Bruno
de529a940a build/windows: Make MSIX script less confusing in some sections 2024-09-12 19:55:17 +00:00
Alx Sa
165f616fb7 script-fu: Port image scripts to GimpProcedureDialog 2024-09-12 19:01:15 +00:00
Alan Mortensen
95c77cca78 Update Danish translation 2024-09-12 15:40:20 +00:00
Alan Mortensen
a3196e7227 Update Danish translation 2024-09-12 15:39:36 +00:00
Alan Mortensen
4fe1d6a37d Update Danish translation 2024-09-12 15:38:29 +00:00
Alan Mortensen
f2b8191fc6 Update Danish translation 2024-09-12 15:28:31 +00:00
Tim Sabsch
8ad744eb1b Update German translation 2024-09-12 07:22:15 +00:00
Alx Sa
63a4e8de56 libgimpbase, libgimpconfig: Remove unused GimpRGBs
d_color is no longer used in the codebase.
gimp_config_deserialize_rgb () has been
superseded by gimp_config_deserialize_color ().
2024-09-12 03:03:24 +00:00
Ekaterine Papava
56ee564527 Update Georgian translation 2024-09-12 01:25:19 +00:00
Tim Sabsch
78c1dd0bb3 Update German translation 2024-09-11 18:54:03 +00:00
Tim Sabsch
8c8c0fa958 Update German translation 2024-09-11 18:40:39 +00:00
Alx Sa
0d6754efd7 plug-ins: Remove GimpRGB from Lighting Effects plug-in 2024-09-11 14:33:24 +00:00
Jehan
b8712b27de Issue #12011: gimp-path-import-from-file etc. are misnamed. 2024-09-11 16:26:45 +02:00
Jehan
d0983a2bbd NEWS: update. 2024-09-11 15:44:07 +02:00
Jehan
41a2596d29 Issue #12021: Text editor Open and Clear buttons disabled and without icons.
Also remove "text-editor-toolbar" which was one of these fake actions
only used to represent submenus in the old action implementation.
2024-09-11 15:24:20 +02:00
Jehan
0c484ddcd3 Issue #3495: broken conversion when changing TRC.
When converting an image TRC (or a precision+TRC change), we used to
convert the profile to a linear (resp. sRGB TRC) variant or use the
builtin profile, which we'd set on the image.

Pippin is telling me that "it used to be that linear and non-linear
precision gave different results, rather than only about how things were
stored". Yet this is not needed anymore. Nowadays "RGBA foo" + any
profile is linear anyway, disregarding the profile's TRC.

Furthermore, this way, we don't lose the original TRC in a non-linear ->
linear -> non-linear roundtrip and we simplify the code, which fixes
such problems as shown in #3495 as a side effect.
2024-09-11 13:16:28 +02:00
Jehan
bceba808df plug-ins: allow running file-raw-data non-interactively.
The code was perfectly working already, yet we were blocking the
non-interactive case only to stop automatic runs, such as generating
thumbnails. The chosen solution is not perfect either as it would break
on the odd case where a given raw data file's expected dimensions were
the default. Yet it's a start.
2024-09-11 13:16:28 +02:00
Jehan
79d047141a plug-ins: fix s/bpp/bpc/ in "pixel-format" argument.
Fortunately I caught this one, because the string values of the
GimpChoice argument would have been part of the API and confusing bits
per pixel and per channel is not so good for a graphic program! 😅

Only places this was alright were the grayscale ones, with no alpha
(where there is only one channel, so bpc and bpp are the same). I
hesitated a lot of I should write BPC to be consistent with other args
or not. In the end, I stick to BPP there, since I find it somehow
clearer this way.

Luckily this doesn't break string freeze because there was no mention of
what the bit-sizes represent in the arg labels.
2024-09-11 13:16:28 +02:00
Stanislav Grinkov
8f5775ee0c display: Use label for GimpStatusComboBox width
We check the width of the zoom label (if it exists) and use it to size the
combobox's entry field. Otherwise, we default to the existing formula.
Also removes Windows special-casing for PERCENT_SPACING constant,
as Pango now uses harfbuzz on Windows as well.
2024-09-10 20:44:54 +00:00
Kolbjørn Stuestøl
32a87e5376 Update Norwegian Nynorsk translation 2024-09-10 17:50:00 +00:00
Kolbjørn Stuestøl
16cae6bff1 Update Norwegian Nynorsk translation 2024-09-10 17:46:59 +00:00
Kolbjørn Stuestøl
60bef97e76 Update Norwegian Nynorsk translation 2024-09-10 17:44:39 +00:00
Bruno
81db76ea30 build/windows: Make crossroad more persistent with MSYS2 servers
Crossroad have a tendency of failing due to internet disconnection.
Let's add code to retry the deps downloading to reduce failures.
2024-09-10 08:23:27 +00:00
Tim Sabsch
56b3272c7d Update German translation 2024-09-09 18:48:44 +00:00
Alx Sa
c8694485db operations: Revert legacy modes for performance
This patch temporarily reverts 02546da7,
due to performance issues with our use
of Babl. After 3.0, we'll try to improve
these operations so they can be more
color correct.
However, GimpRGB, GimpHSV, and GimpHSL are
replaced with double arrays.
2024-09-09 14:39:19 +00:00
Alx Sa
8138b1eaee operations: Create legacy GimpColor conversions
There are certain operations where we're
not yet getting sufficient performance with
Babl. For these legacy operations, we'll
use the original GimpHSV/HSL conversions
internally. This will allow us to replace
them in the future without plug-in
developers relying on them.
2024-09-09 14:39:19 +00:00
Jehan
0270fa5d7f app: do not rely on data name for identifying internal data.
The name for internal data may be localized. This is the case at least
for some dynamic gradients (Foreground to Background and others).
Nevertheless they have unique collection name. So let's simply rely on
this for internal data.
See point 2 in: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1830#note_2218014

I also change the standard alias fonts to also have unique collection
names. These seem to be the only other internal data which had no unique
collection until now, which is now fixed.
2024-09-09 13:45:14 +02:00
Bruno
9963543a01 gitlab-ci: Build with detailed stacktraces, maxflow, qoi and lua-lgi
This ensures that the devs who follows Debian instructions at gimp-web-devel
can build a full-featured GIMP and maybe we have a full-featured AppImage.
2024-09-09 10:51:52 +00:00
Bruno
a988084a97 build/linux: Refactor AppImage bundling script to easier maintenance
- Simplify three functions into 'bund_usr' (similar to 'bundle' in Win script)
- Add 'wipe_usr' function (similar to 'clean' in Win script)
- Verbose the steps of AppImage making
- Log (go)appimagetool bundling of deps (not only the the .appimage making)
- Change AppRun to be more clear about our .appimage compatibility

This refactoring is not perfect but is good enough to anyone understand
how our AppImage is made just reading the script.
2024-09-09 10:51:52 +00:00
Alx Sa
c1f6a8f217 libgimpcolor: Remove unneeded GimpRGB functions
As the Van Gogh LIC plug-in was the last
area of the code that used gimp_rgba_add ()
and gimp_rgba_multiply (), they can be
removed.
2024-09-08 23:32:54 +00:00
Alx Sa
7a77d6f338 plug-ins: Remove GimpRGB from Van Gogh LIC
Also, use linear RGBA for bilinear calculations per
discussion with Pippin and Jehan.
2024-09-08 23:32:54 +00:00
Bruno
898f8917ab build/linux: Sync with Beta manifest regarding IFF support
Ported from: 0acddb8909
2024-09-08 16:57:47 -03:00
Alx Sa
fc8194ccf3 plug-ins: Fix inverted logic in file-bmp
Resolves #12018

During the port to GimpProcedureDialog, we accidentally
inverted the set_sensitive () logic for using RLE and the
RGB format. RLE was being locked for indexed images while
the RGB format was being locked for RGB images.
This patch inverts the two conditions to fix the issue.
2024-09-08 18:51:05 +00:00
Alx Sa
b54a70af69 libgimpcolor, plug-ins: Replace gimp_bilinear_rgb/a()...
..with gimp_bilinear_rgb ().
This function takes in a double array of raw pixels,
a boolean to determine if the pixels have an alpha channel,
and a reference to return the final pixel to.
2024-09-08 15:00:49 +00:00
Alx Sa
74c272ce69 script-fu: Port lava.scm to GimpProcedureDialog
Resolves #10822

After improvements by Lloyd Konneker and Jehan,
Script-fu's implementation of GimpProcedureDialog retains
defaults for GimpResources.
This patch ports lava.scm to use the new API, and also switches
the default gradient to Incandescent.
2024-09-08 01:38:41 +00:00
Jehan
a92388c433 Issue #9270: Change GimpBrushSelect to choose only brush.
gimp_brushes_popup() was triggering a popup allowing to change not only
the brush, but also the "paint mode", the opacity and the spacing. As
far as I could see, this was used nowhere for the paint mode and
opacity.

As for the spacing, it looks like gfig was indeed getting this data,
except that the GimpBrushSelect was disabling the effect on this scale
by setting change_brush_spacing to FALSE when calling
gimp_brush_factory_view_new(), and even setting this to TRUE, it was not
working fine anyway. Rather than debugging this, let's simplify the API.
Such settings seems like additional paint settings which don't have to
be in the brush selection. If someone wants people to also select an
opacity, spacing or paint mode, it would be much more efficient to add
separate plug-in arguments for these.

Additionally, I fix GimpBrushFactoryView not to show the spacing scale
when change_brush_spacing was set to FALSE anyway. This is just a bogus
widget then, which can only confuse people.
2024-09-06 18:14:01 +02:00
Jehan
6cd39dc442 plug-ins: fix test-dialog after commit 75a50ce87b. 2024-09-06 17:33:49 +02:00
Jehan
f8d00b02a1 libgimp, libgimpbase: fix "gimp_param_spec_*()" return annotations. 2024-09-06 16:43:47 +02:00
Jehan
75a50ce87b app, libgimp, pdb, plug-ins: add ability to default to context for all resource args.
Also fixes the passing of the resource param definitions through PDB.
There was some weird assumption, with a comment, in commit 73733335c8
that this was unneeded, which meant that we were not able to properly
recreate the right param spec over the wire.
2024-09-06 16:33:24 +02:00
Alx Sa
6f8231eee6 app/file-data: Remove GimpRGB from file-data-gbr.c
Composite code also simplified since we only need to operate on
grayscale rather than 3 channels for RGB.
2024-09-05 21:21:37 +00:00
Jehan
7f9b8e8dbf plug-ins: fix typo and install rules for test-dialog. 2024-09-05 22:44:10 +02:00
Jehan
5ad829c1dc Issue #11999: GFig, Lava and Stain assert.
After commit #a7bc5f07, these plug-ins assert in local_grad_data_refresh().
A comment is clearly stating that the widget must be allocated, so make
sure that the callback is only connected at allocation.
2024-09-05 22:29:18 +02:00
Alx Sa
753980e514 plug-ins: Replaced deprecated gdk_pointer_grab()...
...in plug-ins/common/animation-play.c
We use gtk_seat_grab/ungrab() elsewhere in the codebase,
so it makes sense to port to that.
2024-09-05 16:16:59 +00:00
Alx Sa
80ed0268e3 plug-ins, operation: Remove uses of GimpHSL
GimpOperationHueSaturation did not do
conversions since the source was already
HSL, so its GimpHSL object was replaced
with a float array.
Van-Gogh plug-in's RGB -> HSL
conversion was replaced with an
HSL float Babl format with gegl_buffer_sample ().
2024-09-05 12:15:29 +00:00
Marco Ciampa
7b66d661ed Update Italian translation 2024-09-05 06:55:07 +00:00
Marco Ciampa
143ff66ad3 Update Italian translation 2024-09-05 06:50:46 +00:00
Alx Sa
118ae3a3db plug-ins: Replace GimpRGB in Page Curl plug-in
Since no conversion operations are performed, just getting the
RGBA values from the gradient and then using them, this replaces
GimpRGB and GimpRGB * with gdouble * equivalents.
2024-09-05 03:55:28 +00:00
Alx Sa
77b3635401 themes: Remove unused grid color in System theme
Per Anders Jonsson, removing this fixes
the issue with the grid colors on System
themes. As it does not work anyway
(the grid would be red if it did) and the
theme code is much better than it was
six years ago, lets remove it.
2024-09-05 02:08:06 +00:00
Anders Jonsson
4c2ff66bdd python: rename Vectors to Path
spyro-plus ran into errors since it called old names
containing Vectors. Fix this by changing to Path to
follow the current API.
2024-09-04 22:29:14 +00:00
Jehan
ba3da3d338 app, libgimp*, pdb: new GimpParamSpecObject abstract spec type.
This abstract spec type is basically a GParamSpecObject with a default
value. It will be used by various object spec with default values, such
as GimpParamSpecColor, GimpParamSpecUnit and all GimpParamSpecResource
subtypes. Also it has a duplicate() class method so that every spec type
can implement the proper way to duplicate itself.

This fixes the fact that in gimp_config_param_spec_duplicate(), all
unknown object spec types (because they are implemented in libgimp,
which is invisible to libgimpconfig) are just copied as
GParamSpecObject, hence losing default values and other parameters.

As a second enhancement, it also makes it easier to detect the object
spec types for which we have default value support in
gimp_config_reset_properties().

As a side fix, gimp_param_spec_color() now just always duplicates the
passed default color, making it hence much easier to avoid bugs when
reusing a GeglColor.
2024-09-04 22:34:49 +02:00
Jehan
a7bc5f07f2 libgimp: fix updating GimpResourceChooser's GUI when update comes from…
… a change in the config object (in the propwidget case).
2024-09-04 21:32:28 +02:00
Jehan
cb1f3b297c libgimp: various fixes for !10950 review.
- There is no reason whatsoever to make gimp_param_resource_value_set_default()
  a no-op on core side. Also remove the whole commenting on this basic
  function, especially as it's mostly wrong (why would core not use
  default values? Why would we not transfer ownership? That's the whole
  point of g_value_set_object() which increases the reference, hence
  transfer ownership to the new reference…)
- Also removes the comment on GimpParamResource which is just explaining
  basic GObject stuff and would only confuse contributors.
- Small indentation or coding-style fixes.
2024-09-04 21:32:28 +02:00
bootchk
73733335c8 libgimp: plugins: fix #10950 resource defaults not effective
Now you can declare a default value when declaring resource arguments to
a PDB procedure.

Add default behavior to GimpParamSpecResource.
Add field and override g_param_spec_value_set_default.

Fix the plugins that have resource arguments.
Some plugins temporarily use a hardcoded default instead of declared default.
ScriptFu plugins, TODO.

Misc fix to the test plugin for this case: test-dialog.py.
Dev>Demo>Test dialog...

TODO 10822 Lava plugin issue depends on this.

Note film.c fixed but still doesn't work.
2024-09-04 21:32:28 +02:00
Jehan
4dcf141739 libgimp: don't keep per-procedure proxies of ID objects.
As discussed in !1725, there is an init order issue, which is that you
cannot obtain any of these ID objects as long as the GimpProcedure is
not created. In particular, now that GimpResource arguments can have
defaults, we will want to query such resource in the create_procedure()
implementation of a plug-in (where the GimpProcedure is not running yet,
as we are defining it!).

Anyway I don't really see the point of these multiple-level hash tables
all storing a reference to the same object. Let's just store in the
GimpPlugIn's hash tables once and give the same reference to any
procedure (anyway we make it clear that these objects belong to libgimp
and must not be freed, so it's a bug all the same if someone frees
them). Then it also fixes the init order issue.
2024-09-04 21:32:13 +02:00
Kolbjørn Stuestøl
7fc7683cae Update Norwegian Nynorsk translation 2024-09-04 15:30:06 +00:00
Jehan
2f952932f3 libgimpconfig: fix leak.
As far as I understand, the created types are never "unregistered" and
will live in the process until it ends. It cannot even have a custom
class_finalize() (looking at g_type_register_static()'s code, a CRITICAL
is emitted if you try to provide a class_finalize() implementation).

So let's just free the allocated pspecs at the end of class_init()
instead.
2024-09-04 14:04:47 +02:00
Jehan
d7fadf9fe6 Issue #11988: GEGL param specs are not serialized anymore.
This is a regression brought with commits 9b5463b5c5 and f7aaba9fc9.
Technically the bug already existed, but it was brought to light after
the reordering of our param bit flags, because GEGL_PARAM_PAD_INPUT
(which is set on all op properties) and GIMP_PARAM_DONT_SERIALIZE are
now the same value. It used to be same as GIMP_CONFIG_PARAM_AGGREGATE,
which, by chance only, didn't have unfortunate consequence on
serialization, yet that was also a bug. The real fix is that we should
not propagate GEGL bit flags in our operation config types.
2024-09-04 13:48:03 +02:00
Alx Sa
3a0fb282a4 app/tools: Don't merge filters on layer groups
Resolves #11993
In !1319, we added the ability to merge down filters destructively
in the Filter Tool GUI. This accidentally allowed you to merge down
a filter on a layer group. This patch adds checks to prevent this
option from being used, in the same way we hide the option when
editing an existing layer effect.
2024-09-04 01:34:56 +00:00
Jehan
455f6f0954 libgimp: fix some broken indentation. 2024-09-03 19:15:28 +02:00
Jehan
e06cf3aee0 themes: fix the suggested-action and destructive-action classes.
We didn't have a "destructive-action" class anymore and the
"suggested-action" was hidden by further CSS rule, so it needed to be
moved down so that it gets precedence.

We used to have these as red and green buttons originally (e.g. pasting
as floating selection, the "New Layer" and "Anchor" were the suggested
actions, i.e. green, whereas "Delete Layer" was destructive, red). For
GIMP 3.0, we keep grayscale design. We'll see if this will change later,
but at least, now we have something again.
2024-09-03 19:14:38 +02:00
Sveinn í Felli
252d187dbc Update Icelandic translation 2024-09-03 11:44:20 +00:00
Alx Sa
ece9929996 app/widgets: Remove GimpRGB from gimpwidgets-utils.c
The colors are assumed to be sRGB since they come from a
pre-defined array and are used for the item color tags in the
GUI. This replaces the call to gimp_rgb_composite () with the
direct implementation of the GIMP_RGB_COMPOSITE_NORMAL
code.
It also ensures that only one call is made to gegl_color_set_rgba (),
rather than two if the color is inherited.
2024-09-03 03:24:10 +00:00
Alx Sa
fc7c3d0666 core: Update layer effect masks during conversion
We weren't updating the precision of layer effect masks when
converting the layer's precision. This patch updated with the
format from gimp_image_get_mask_format ().
Note that in the future, this code should be moved to
gimp_drawable_real_convert_type () once that function is used
in all the child classes of GimpDrawable.
2024-09-02 21:42:43 +00:00
Jordi Mas
5610ff3d0d Update Catalan translation 2024-09-02 17:29:50 +02:00
Alx Sa
b44687eb2f libgimpcolor, plugin: Remove gimp_rgb_luminance ()
This patch removes the two instances of
gimp_rgb_luminance_uchar () and one
instance of gimp_rgb_luminance () from
the codebase.
* plug-ins/common/checkerboard.c:
 Use gegl_color_get_pixel () to get the
 luminance value at the same time we're
 getting the RGBA value from the GeglColor.
 * plug-ins/gradient-flare/gradient-flare.c:
 Replace with GIMP_RGB_LUMINANCE ()
 macro, which does not use GimpRGB.
2024-09-02 02:41:47 +00:00
Alx Sa
fd091bc005 pdb: Check number of arguments for gimp_file_save ()
gimp_file_save () is used to save both XCF
and export formats like PNG. XCF does
not have a GimpExportOption parameter,
but we were unconditionally copying it.
This patch adds a check for this.
2024-09-01 18:29:04 +00:00
Yuri Chornoivan
7eec686585 Update Ukrainian translation 2024-09-01 18:26:05 +00:00
Luming Zh
a6aea06116 Update Chinese (China) translation 2024-09-01 13:31:11 +00:00
Alx Sa
9b917b8dfb themes: Define top menubar menu backgrounds
Previously, the "menuitem menuitem" style was cascading down
to the top menubar's subitems. This patch explicitly defines the
CSS to match the 2.10 style and prevent cascading.
2024-09-01 12:53:22 +00:00
Martin
1c8a3f36bb Update Slovenian translation 2024-09-01 12:26:26 +00:00
Sabri Ünal
f0ead675f3 Update Turkish translation 2024-09-01 11:56:52 +00:00
Sabri Ünal
b452f810bd Update Turkish translation 2024-09-01 11:56:40 +00:00
Sabri Ünal
e154a45919 Update Turkish translation 2024-09-01 11:56:30 +00:00
Sabri Ünal
a4caa08fee Update Turkish translation 2024-09-01 11:55:21 +00:00
Sabri Ünal
679041a4c2 Update Turkish translation 2024-09-01 11:54:17 +00:00
Sabri Ünal
f606ec151c Update Turkish translation 2024-09-01 11:44:32 +00:00
Cheng-Chia Tseng
291110f8e9 Update Chinese (Taiwan) translation 2024-09-01 09:55:45 +00:00
Cheng-Chia Tseng
f8b02429ab Update Chinese (Taiwan) translation 2024-09-01 09:26:58 +00:00
Cheng-Chia Tseng
22dbdcf355 Update Chinese (Taiwan) translation 2024-09-01 08:05:32 +00:00
Jehan
49b68fbf38 Issue #11725: do not try to uninhibit when inhibiting was not done by GIMP.
As noted by bootchk, docs of gtk_application_is_inhibited() says:

> Determines if any of the actions specified in flags are currently inhibited (possibly by another application).

The last part, between parentheses imply that it's possible for another
application to inhibit GIMP. So we should not rely on this function to
verify we inhibited the logout. Just check of we have an inhibition
cookie.
2024-09-01 01:15:10 +02:00
Jehan
03398391e4 libgimp, plug-ins: add a "parent-handle" argument to the metadata-editor.
This handle is one of the opaque window handles as returned by
gimp_dialog_get_native_handle() or gimp_progress_get_window_handle() and
therefore it works even across processes. Now any export procedure using
the GimpExportProcedureDialog will call "plug-in-metadata-editor" as a
transient window of itself when clicking the "Metadata (edit)" button.
In particular, the Metadata editor won't be hidden by mistake when
appearing or similar issues.

Nevertheless it only works for systems where we have a transient window
implementation (so far, only X11 and Wayland, since the Windows
implementation is currently commented out because of #10229, and we have
no macOS implementation).

Note though that setting destroy-with-parent doesn't work, most likely
because the GimpExportProcedureDialog is still waiting for the Metadata
editor procedure to return (commit 54d01b5a0b), otherwise we end up with
a bad state in GIMP Protocol.
A proper solution to this will likely be to create a temp procedure from
metadata-editor to request it to close from another plug-in.
2024-09-01 00:12:27 +02:00
Jehan
9b5463b5c5 libgimpbase, libgimpconfig: new GIMP_PARAM_DONT_SERIALIZE flag.
The purpose of this flag is to have some procedure arguments for which
you wish to ignore last values, or restored values. This may be needed
for arguments which are really volatile and likely won't survive a
session (or even from a run to another).
This will be used in my next commit.

Note: this is very close to GIMP_CONFIG_PARAM_IGNORE, except that this
latter is used for obsolete properties instead, so I felt that it may
not have been the best idea to mix these semantically different flag.
Also GIMP_CONFIG_PARAM_IGNORE properties are not serialized but they are
deserialized, which is not exactly what we want (in most case, it would
work the same, but it also means that if last-used values were to
contain some deprecated value for a property for which we added this
flag, there would be at least one run where a buggy behavior would
happen).
2024-09-01 00:12:27 +02:00
Jehan
f7aaba9fc9 app, libgimpbase, libgimpconfig: make our custom GParamFlags definitions…
… more robust.

GIMP_PARAM_NO_VALIDATE and GIMP_CONFIG_PARAM_DONT_COMPARE were the same
value, most likely because when GIMP_CONFIG_PARAM_DONT_COMPARE got added
(commit c5c807d191), the comment to keep in sync
libgimpbase/gimpparamspecs.h and libgimpconfig/gimpconfig-params.h was
missed.

Instead, since libgimpconfig can include libgimpbase, do the other way
around: first non-GLib param flags are in libgimpbase, then we add a
GIMP_PARAM_FLAG_SHIFT, then we increment from it in libgimpconfig, and
finally we increment from GIMP_CONFIG_PARAM_FLAG_SHIFT if ever we add
more flags in app/ (right now GIMP_SYMMETRY_PARAM_GUI is apparently the
only one, but this may change).
2024-09-01 00:12:27 +02:00
Jehan
f4fb6db331 libgimp: new gimp_window_set_transient_for() function.
This allows to easily set a window transient to any other, even from one
plug-in to another.
2024-09-01 00:12:27 +02:00
Alx Sa
ee81c82986 plug-ins: Fix double free crash in file-qoi
Same issue as cfcdb1e7
2024-08-31 20:07:34 +00:00
Alx Sa
a7cb3cb586 libscriptfu: Fix long warning on Windows
Replaces a string format of %ld with G_GSIZE_FORMAT
so that the value is converted properly on different platforms.
2024-08-31 19:28:02 +00:00
Alx Sa
cfcdb1e7bf plug-ins: Fix double free crash in file-heif
Resolves #11980
In 443947c6, the now unnecessary g_free (drawables) was
removed from heif_av1_export (). However, it was accidentally
left in heif_export (). This patch removes it to prevent a crash
from double freeing the drawables list.
2024-08-31 19:27:23 +00:00
Bruce Cowan
8beba7f5fc Update British English translation 2024-08-31 11:48:18 +00:00
Andi Chandler
3c57edcfd6 Update British English translation 2024-08-31 11:47:29 +00:00
Andi Chandler
d8d184c299 Update British English translation 2024-08-31 11:44:46 +00:00
Bruce Cowan
7343132b01 Update British English translation 2024-08-31 11:42:01 +00:00
Andi Chandler
bc85382c4a Update British English translation 2024-08-31 11:39:01 +00:00
Andi Chandler
e41cf303ed Update British English translation 2024-08-31 11:36:41 +00:00
Andi Chandler
a2adfbd408 Update British English translation 2024-08-31 10:56:49 +00:00
Jehan
54d01b5a0b Issue #9601: Export plugin crash on close after the edit metadata is open. 2024-08-30 19:19:51 +02:00
Seong-ho Cho
2f5264d296 Update Korean translation 2024-08-30 16:25:04 +00:00
Bruno
23bae9ab42 gitlab-ci, build: Move appimage code out of gitlab-ci and reduce verbosity
This should be enough to not "annoy" developers with repetitive ninja and
not too relevant appimagetool output. This makes easier to devs to look at
the runner log without needing to revert 9653e50e (the revert/split would
make us lose .appimage in some custom Deb pipelines and 50% of ccache hits).
2024-08-30 12:44:40 -03:00
Jehan
42f7a167c3 Issue #11922: Fatal error on closing main window when in export plug-in. 2024-08-30 17:10:30 +02:00
Alx Sa
8b57aabed2 display: Update View options after GimpDisplay updated
Previously, we called gimp_display_shell_appearance_update ()
which updates the "Show" settings in the View menu *before*
we had updated the Display object in GimpContext.
This meant that the wrong settings were being applied when
switching images.
This patch moves the call after we run gimp_context_set_display ()
to make sure we've got the right active Display.
2024-08-29 23:11:07 +00:00
Jehan
75978104de build: AppImage also uses appstreamcli to validate the AppStream data…
… so let's make a quick edit for our 'date="TODO"' trick.
2024-08-30 00:06:58 +02:00
Jehan
9368c8abdd desktop: fix AppStream validation with TODO release date.
As I recall, this is something we in fact used to have in gimp-2-10
branch and which we lost when switching from appstream-util to
appstreamcli validation tool (the later is now recommended, but it's
also less featureful, they don't even have a relax test!). So that was a
regression in the build system.

Note that it's not just not to have to put a date too early in our
AppStream metadata, but it's also that this way, we won't forget to
update it upon release (hence shipping with a wrong release data in
metadata). Indeed, when building a non-release version, date="TODO" will
pass the test, yet moving on to a point release version, the validation
test will now fail on a TODO date.
2024-08-29 23:19:58 +02:00
Jehan
6a465876ec app: do the quick exit on point releases, whether stable or unstable.
The other way around, we were going to have the quick'n dirty exit for
the whole 3.0 stable branch, which is obviously not what we want. We
want the clean exit for all developer builds, even within a stable
branch.
2024-08-29 18:26:38 +02:00
Jehan
10e8b5d0c1 Issue #11967: fix CRITICAL. 2024-08-29 16:46:27 +02:00
Jehan
5d4e271d5a desktop: add a <release> item for GIMP 3.0.0-RC1.
I had just forgotten to add it, though fortunately (or not) it doesn't
break string freeze because the <release> description fields are not
localized right now.
Cf. discussions in #8628 and this infrastructure report:
https://gitlab.gnome.org/Infrastructure/damned-lies/-/issues/473
2024-08-29 16:29:58 +02:00
Alx Sa
a4f9e7e89a widgets, themes: Define colors for GimpBlobEditor
The color for the nib handle is pulled from
the widget's background-color style.
However, this was not defined - so it was
always (0, 0, 0).
This patch adds a GimpBlobEditor CSS
class and defines the background and
border color for it to resolve the issue.
2024-08-29 13:30:39 +00:00
Jehan
67e10930df meson: add the extensions/ dir to look up for interp files at build time.
The lua.interp file is there. Lua plug-ins are not needed at build time,
except that when I had a non-supported interpreter as my system's `lua`
binary (see #11876), so calling in-build GIMP would startup the lua goat
exercise, get the error reported in #11876, and (this part is the real
problem), it would somehow freeze the in-build-gimp.sh script. I'm not
sure how exactly, the gimp-console would in fact end correctly (and
generate the image it is supposed to), but leaving around a lua process.

And somehow the script would not continue, it would not call any further
command line, nor would it even crash. So I just had a stuck build.
2024-08-29 14:59:38 +02:00
Anders Jonsson
a9cf2d7a3e desktop: change gimp20 to gimp30 for gettext
The real used value for gettext_package is
already changed in meson.build
2024-08-29 09:09:29 +00:00
Nils Philippsen
bf8ebe278a screenshot: Fix warning about unused shoot_type
Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-08-28 19:52:43 +00:00
Nils Philippsen
7419473ad0 file-fits: Remove no-op use-data-min-max
The functionality behind it was removed in commit
d4f420769c.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-08-28 19:52:43 +00:00
Nils Philippsen
0ea20b959b file-ps: Don’t use variable uninitialized
Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-08-28 19:52:43 +00:00
Jehan
f2d5ff446a app: clear more dangling weak pointers. 2024-08-28 21:25:33 +02:00
Jehan
c8c17a3509 app: remove a dangling weak pointer on an image.
This may have a reason for some memory-related crashes which happened
when color chooser dialogs were raised, e.g. in #11956.
2024-08-28 21:05:08 +02:00
Jehan
195bd5fc8e app: fix 2 g_object_weak_unref() calls. 2024-08-28 21:05:08 +02:00
Jehan
d1dd97559a meson: improve a bit lua detection and output.
In my OS, lua 5.1 binary is called 'lua-5.1' (with hyphen), so I add
this in the list. Also I improve the summary output to display the found
lua binary, which is useful for debugging and for packagers to know
which lua binary is being used (especially now that we install a
lua.interp, even on Linux).
2024-08-28 21:05:08 +02:00
Bruno
8351437da3 meson: Don't build Windows resources on Linux or macOS 2024-08-28 16:57:23 +00:00
Asier Sarasua Garmendia
25a0dd0f22 Update Basque translation 2024-08-28 16:07:21 +00:00
Asier Sarasua Garmendia
4ad7300a2c Update Basque translation 2024-08-28 16:07:16 +00:00
Asier Sarasua Garmendia
7f33bb298e Update Basque translation 2024-08-28 16:05:58 +00:00
lloyd konneker
cb1a46511a ScriptFu: fix #11954 err call PDB file-export-foo type GimpExportOption
GimpExportOptions is incomplete.
It exists so the API is stable.
For now, ScriptFu eat and ignore actual args,
binding to NULL, in calls to PDB procedures
file-export-foo having formal args of this type.

Unlikely that in the future ScriptFu will do anything else:
if a plugin needs export options, use another language.
The few file exporters used by existing ScriptFu scripts
(file-gbr-export and file-pat-export)
don't honor export options.
2024-08-28 09:35:38 -04:00
Bruno
0e245e86c1 build/linux: Always use latest commit in luajit and lua-lgi modules
luajit download server to tarballs stopped to work, which is expected,
since it was advised by the team in https://luajit.org/download.html:
"Please do not use obsolete versions from older tarballs or zip files.
Please remove any outdated links to these downloads — these links will
cease to work soon."

We also will not use the official git server since it does not support
all git clone features, which makes flatpak-builder cloning stage fail.

---

Regarding lua-lgi, we will not use the latest commit since seems that
our goat exercises or gobject-introspection or lua-lgi iteself is broken
since lua-lgi commit: 3f47eb57ef5a84be878ce33c15b7ff037059b08d
2024-08-28 11:16:57 +00:00
Bruno
d389068d5d build/linux: Update suitesparse module on flatpak manifest 2024-08-28 11:16:57 +00:00
Alx Sa
a9e6e6163d plug-ins: Increase GIH max size to GIMP_MAX_IMAGE_SIZE
Currently, the default maximum size of GIH cell-width and cell-height
is 1000. These values are increased to the current image size when
exporting via a GUI. However, it is not updated when overwritten or
exported without a GUI. If the cell-width or height was previously set
to a larger value than 1000, this throws a critical and resets the value to
1. This likely causes the "slow" exporting noted in #10816, since the cell
becomes 1x1 even for large images.

This patch sets the default value to GIMP_MAX_IMAGE_SIZE, so that
if run non-interactively, we don't run into issues with the image dimensions
going beyond the bounds of the parameter maximum.
2024-08-28 09:41:39 +00:00
Jehan
38c65a4b45 NEWS: update. 2024-08-28 00:42:07 +02:00
Asier Sarasua Garmendia
0040478762 Update Basque translation 2024-08-27 19:59:31 +00:00
Jehan
b9a6d8fc70 app: fix pasting into a channel.
It was made impossible to paste into a channel, as this was creating a
normal layer instead. We need to use floating selections when the pasted
target is a GimpChannel type.

Note that the UX is very ugly right now for these (except for the layer
mask case as I improved this a lot with commits 04810ec95e and
28457ce337), so I opened issue Teams/GIMP/Design/gimp-ux/89 to design
further evolutions.
2024-08-27 21:27:49 +02:00
Jehan
17b094ecc4 Issue #9600: CRITICAL when anchoring a floating selection to the image's selection. 2024-08-27 19:09:48 +02:00
Jehan
4e499810a5 Issue #11957: also ignore events when switching to MWM.
This is a follow-up of commit c5db158f58, where the flickering issue was
happening when creating new windows when already in multi-window mode. I
had the same issue again when I had several tabs opened in SWM and
switched to MWM. Then it would undraw displays to move them to their own
window. In the short time when this occurs, we don't want to process
events. So now I changed the "drawn" status when undrawing ("unrealize"
event) a shell.

I also changed the implementation of gimp_displays_accept_focus_events().
What we need is to check the active shell only of each window. In SWM in
particular, it is normal that non-visible tab shells get unrealized.
2024-08-27 17:37:00 +02:00
Jehan
7b669a9ac9 Revert "app: fix a random segmentation fault."
This reverts commit 77712347d1.

The fix was wrong. See #11962.
2024-08-27 16:04:29 +02:00
Bruno
60add9ac40 build/windows: Prepare MSIX versioning to RC1 and beyond
First, make the script versioning system able to detect release candidates.
Otherwise, we willn't be able to use the "GIMP.GIMPPreview" identity (that
was previously tied to GIMP_UNSTABLE var, which is not set to 1 on RCs).

---

This also fixes the pseudo-revision trick when we have a zeroed micro version,
which is the case of the release candidates and the first stable version.
The versioning now have a different aproach from 8c99efd7.
2024-08-27 13:43:33 +00:00
Jehan
90e96d800b Issue #11958: Critical when opening an image.
I had added an assert in commit 98ebe96c1f specifically to catch other
cases where we may have run gimp_ui_manager_update() with inconsistent
user context, and I failed to catch the obvious CRITICAL (the damn Error
Console was catching it!).
Anyway we had this other obvious case when creating new displays in
gui_display_create() which would trigger the ui update with still
inconsistent context.

Now I'm in fact wondering why GimpContext is simply not returning the
active GimpDisplay's image and connecting to the "image" property of set
display so that it's always synchronized. But since we are so close to
GIMP 3, and I don't want to do too important restructuration of code
(why did we do this complicated update in 2 parts? Maybe there was a
good reason…) at this point, I'll just do the simple skip for now and
look more closely at GimpContext implementation after the release.
2024-08-27 13:53:30 +02:00
Jehan
82c607d4a8 app, libgimp, pdb: support triple-backticks unformatted desc sections.
The previous PDB generation was losing pre-formatting inside
triple-backticked blocks. In particular we were losing indentation
(which was already ugly in C, but even syntactically wrong when
displaying Python code samples). And it was also making us add
double-newlines between every code lines, which was annoying.

This updated code now leaves triple-backticked sections as-is.

Unfortunately I was completely unable to do this by modifying the
existing functions, which were modifying the input arg in-place. So I
made them into functions returning the result. But then there is another
part of code (niceargs()) where changing array contents doesn't work
properly, and worse it seems to corrupt the array somehow (because I
have generation breakage in completely-different pieces of the PDB
generation code). I believe there is some passing-by reference/value
concepts in perl which I don't quite get (they use `&`, `\` and other
symbols and even searching for these, I don't quite understand how to
use them the right way) but I've spent already too much time on this. So
since I've got something working now by having duplicate functions, I'll
let someone else from the future, who knows better perl, re-merge these
functions if they know how.
2024-08-27 11:48:49 +02:00
Jehan
0fe66771da app, libgimp, pdb: fixing broken GIR links.
The 'help' field needs to be single-quoted so that @-values do not look
like perl variables, hence breaking GIR annotations.

Fixing:

> Possible unintended interpolation of @Gimp in string at /home/jehan/dev/src/gimp/pdb/groups/item.pdb line 64.
2024-08-27 00:26:59 +02:00
Jehan
d1c8e5efb9 app, libgimp, pdb: prettify the previous commit.
I double-checked the gi-docgen docs and realized the "Note:" were all on
the same line as previous text. I had forgotten it just removed one
newline. So if I want a new paragraph (double-newline in markdown), I
need 3 newlines in the pdb file.
2024-08-26 22:48:45 +02:00
Yuri Chornoivan
85c48a9a25 Update Ukrainian translation 2024-08-26 19:57:17 +00:00
Kolbjørn Stuestøl
8a4613cc63 Update Norwegian Nynorsk translation 2024-08-26 17:45:15 +00:00
Kolbjørn Stuestøl
925b80cc37 Update Norwegian Nynorsk translation 2024-08-26 17:38:38 +00:00
Kolbjørn Stuestøl
1ab55ba8b8 Update Norwegian Nynorsk translation 2024-08-26 15:38:49 +00:00
Marco Ciampa
3a6f2de90d Update Italian translation 2024-08-26 14:42:33 +00:00
Marco Ciampa
317a8b6424 Update Italian translation 2024-08-26 14:41:25 +00:00
Marco Ciampa
d50f7faa63 Update Italian translation 2024-08-26 14:41:17 +00:00
Marco Ciampa
e134866764 Update Italian translation 2024-08-26 14:41:04 +00:00
Kolbjørn Stuestøl
e8344b81da Update Norwegian Nynorsk translation 2024-08-26 13:35:30 +00:00
Jehan
890a3c715f Issue #10673: make clearer API docs for _id*() functions.
All the functions working with object's IDs are mostly internal. They
are still made public because they can be useful and are relevant in
specific use cases (i.e. using IDs to reference items in specific
widgets, such as drop-down lists, or when temporarily storing an item as
integer, etc.).
Yet it should be made clear that these usages are the exception rather
than the norm.
2024-08-26 15:03:24 +02:00
Kolbjørn Stuestøl
3ded3c47fe Update Norwegian Nynorsk translation 2024-08-26 11:52:01 +00:00
Jehan
98ebe96c1f Issue #10441: encoding conversion popup when changing from SWM to MWM. 2024-08-26 13:35:49 +02:00
Jehan
77712347d1 app: fix a random segmentation fault.
I had this one case at GIMP exit where destroying editor->selection
inside gimp_colormap_editor_set_context() was segfaulting, very likely
because the widget was already destroyed so the pointer was dangling.

Therefore set a weak pointer, and clear it in dispose, so that whatever
comes first at destruction time will reset the pointer to NULL.
2024-08-26 13:35:49 +02:00
Luming Zh
91741467c6 Update Chinese (China) translation 2024-08-26 11:11:53 +00:00
Jehan
c5db158f58 Issue #11957: ignore events on all display shell when one is being created.
This fixes a never-ending flickering blocking the GUI, until a manual
focus event (such as moving a window in front) breaks the infinite loop
of handling focus events.
2024-08-25 23:56:26 +02:00
Alx Sa
b728ecb9f2 plug-ins: Reduce initialization warnings on Windows
This patch initializes a number of variables
that are used in the PSD plug-in.
Otherwise, they display warnings in the
Windows pipelines.
2024-08-25 21:20:05 +00:00
Martin
3f57035a0a Update Slovenian translation 2024-08-25 21:14:46 +00:00
Anders Jonsson
bbb1607107 menus: fix Plug-In CamelCase
Followup to 34af64b70f

The menu definition in image-menu.ui.in.in didn't have the same
capitalization as in the plug-ins that uses it, so it was never
used, and would never be shown translated.
2024-08-25 20:47:51 +00:00
Asier Sarasua Garmendia
c2888b63ee Update Basque translation 2024-08-25 19:21:51 +00:00
Kolbjørn Stuestøl
3de4551155 Update Norwegian Nynorsk translation 2024-08-25 17:51:46 +00:00
Anders Jonsson
0c0ea8d8fd Update Swedish translation 2024-08-25 13:20:37 +00:00
Anders Jonsson
f7f77f239a Update Swedish translation 2024-08-25 13:19:22 +00:00
Cheng-Chia Tseng
cd345eede9 Update Chinese (Taiwan) translation 2024-08-25 09:35:35 +00:00
Jehan
91d90ff7f9 Issue #11950: lua version can be on stderr.
Though the output of `lua -v` is on stdout and was also on stdout by
default, even back with version 5.1, it turns out that lua's print
function was considered configurable back then. And this is very likely
why we now have this report of someone whose lua is on stderr.

So let's still look on stdout, then fallback to stderr it the format
doesn't match.
2024-08-25 00:12:45 +02:00
Jehan
49ce5c2aa5 app, libgimpwidgets, plug-ins: add tooltip arg to gimp_help_connect().
As Cheesequake noted in !1673, there may be cases where one would want
to run gimp_help_connect() while also setting a tooltip. So they also
run gimp_help_set_help_data(), even though the latter is implied by the
former. Worse, it makes the order matter too much because if you call
gimp_help_connect() after gimp_help_set_help_data(), the tooltip would
be removed.

Now the reason is that gimp_help_connect() was clearly made to be run on
windows whereas gimp_help_set_help_data() was for other widgets, which
usually don't need to react to F1. Yet the previous commit does add
F1-connect for the lock buttons, which kind of makes sense. So why not
just add this tooltip argument.

As a side fix, I am removing a bunch of gimp_help_connect() on each
button in the layers effect popover. Just run it once on the top
container.
2024-08-24 23:29:39 +02:00
cheesequake
aad228cfeb widgets: Set up help-ids properly
This patch adds gimp_help_connect () calls before
gImp_set_help_data () to set up F1 keybind to work
properly. It also adds lock_visibility_help_id to channel
view.

Resolves #11718
2024-08-24 23:20:23 +02:00
Bruno
f9c790c73f build/linux: Add REVISION support to Inno .PS1 script 2024-08-24 16:30:56 -03:00
Jehan
038ccfc1c1 plug-ins: removing a string because of an obvious typo.
Thanks to Anders for noticing this one! Sorry to translators if you
already worked on this and wondered what this AA was (answer: nothing
but a typo!).
2024-08-24 20:29:52 +02:00
Anders Jonsson
74bbe26918 Update Swedish translation 2024-08-24 12:49:29 +00:00
Alx Sa
5699102163 plug-ins: Fix TIFF Sketchbook layers import...
...when the height is larger than the width.
Due to a copy/paste error, the width was used
for both layer width and height. Since we only
had two sample files and both images were
wider than they were tall, this was not noticed.
2024-08-24 11:26:36 +00:00
Jehan
690391b985 app: fix layer filter copying.
Copying filters over from one image to a partial copy was broken on
multiple level by doing it on an additional loop, and assuming that the
originally selected layers and the newly created ones had the same
structure:

1. First the actually copied layers may be more numerous. For instance,
   we'd also copy parent layers. Typically copying a layer under a layer
   group, both the layer and its parent layer group would be in the clip
   image.
2. Second, because this structure may change, the assumptions made so
   that filters were not copied to the right image.
3. And as a last consequence, sometimes we could have crashes, assuming
   the same structure and therefore directly dereferencing a NULL
   pointer. I had such a crash when copy-pasting a layer group, while
   also selecting its children layers (though this crash also got hidden
   by my previous commit, but just by chance).

Instead just copy filters in the same time as layers are copied, so that
we can easily associate the filter from the correct original layer we
copied from.
2024-08-24 12:36:26 +02:00
Jehan
408c22dd70 app: copying a layer group implies copying all its children.
Similar to how cut already works, when we shift-click both a layer group
and its descendants, just drop the descendants. They are already
implied.
2024-08-24 12:36:26 +02:00
Sabri Ünal
1c1a26e82c Update Turkish translation 2024-08-24 06:22:31 +00:00
Luming Zh
58d7cd4dd4 Update Chinese (China) translation 2024-08-24 01:36:46 +00:00
Luming Zh
bfe5c8281e Update Chinese (China) translation 2024-08-24 01:14:19 +00:00
Ekaterine Papava
e89bb33408 Update Georgian translation 2024-08-23 04:51:42 +00:00
Alx Sa
c57bf3c6bd plug-ins: Fix GIH export crash due to selection-modes
Like ranks, the number of selection modes are defined by gihparams.dim.
However, we were unconditionally setting GimpProcedureConfig's
"selection-modes" parameter to the gihparams.selection array, which 
might have more elements than we had dimensions. This caused a crash.
This patch moves the selection-modes code into the check for
gihparams.dim > 0, and copies only the relevant values into a separate
array to set them.
2024-08-22 21:56:17 +00:00
Sveinn í Felli
3286dbb4f4 Update Icelandic translation 2024-08-22 17:05:06 +00:00
Sveinn í Felli
4542c0156e Update Icelandic translation 2024-08-22 13:27:28 +00:00
Sveinn í Felli
922358ab70 Update Icelandic translation 2024-08-22 12:17:37 +00:00
Alx Sa
c36b7d016f libgimpcolor, plug-ins: Remove GimpHSV
This patch replaces all instances of GimpHSV
in the codebase with babl implementations,
so that it can removed as part of the color
space invasion.
2024-08-21 18:57:50 +00:00
Yuri Chornoivan
99403fe5a3 Update Ukrainian translation 2024-08-21 18:08:53 +00:00
Luming Zh
8d00e4ce9f Update Chinese (China) translation 2024-08-20 23:57:57 +00:00
Bruno
8ac28cfbee build/windows: Warn about the fate of 32-bit
It's desirable to announce this with advance to not surprise anyone.
2024-08-20 20:39:17 +00:00
Martin
ba5cb3ab16 Update Slovenian translation 2024-08-20 14:57:01 +00:00
Cheng-Chia Tseng
1e8ee854c7 Update Chinese (Taiwan) translation 2024-08-20 13:23:23 +00:00
Cheng-Chia Tseng
5e8750e5db Update Chinese (Taiwan) translation 2024-08-20 13:18:23 +00:00
Alx Sa
5a03dff9d2 app, plug-ins: Fix warnings and typo
app/text/gimptextlayout.c gives warnings
on MSYS2 about xres and yres not being
initialized.
plug-ins/file-tiff/file-tiff-load.c gives
warnings about read_unit not being
initialized.
plug-ins/file-bmp/bmp.c has a typo on
the label of the rgbx-8888 option for
rgb-format.
2024-08-20 12:50:49 +00:00
Alx Sa
8dd7783fc2 plug-ins: Port more plug-ins to GimpChoice
This replaces most of the remaining
gimp_procedure_dialog_get_int_combo ()
parameters with defined GimpChoice
parameters.
The only exceptions are where we retrieve
the values from a library (such as file-aa)
or the integer value itself is intuitive
(such as bit-depth or rotation degree)
2024-08-20 11:34:16 +00:00
Bruno
d7806d92ec build/linux: Make flatpak maintainer instructions clearer
Some parts of the README got obscured or dated with time. Let's improve them:

- Remove redundant text about keeping GIMP buildable (it's already said on
  Cod. Style and Dev rights pages on gimp-web-devel, and not flatpak specific)
- Remove text about 1-hour timeout which isn't true according to my tests,
  specially after the improvements of splitted jobs and updated build options
- Reorder Anitya text to before "module dropping" text, it's linear this way
  ("module dropping" by checking runtime is last step of module cycle of life)
- Remove very confusing "flatpak run... gimp" line which was breaking the
  explanation flow about "module dropping" and it's not too useful since the
  manifest (which is only a bit different) can be acessed in-source with tags
- Changed title from "Mantaining the manifest" to "Mantaining the modules"
- Added not so clear "Versioning the flatpak" to separate it from other modules
  text. The title is not perfect, but at least make a needed pause on reading
2024-08-20 07:39:39 -03:00
Jehan
6ca0a78452 Issue #7497: Unable to drag layers in the layer list of another open project. 2024-08-20 12:38:09 +02:00
Bruno
18188dbb1c build/linux: Sync with Beta manifest regarding gexiv2 and exiv2 headers
Ported from: 37b173e3a9
and ac0069eb20

The reason for this change is because part of our API (babl, gegl and
gimp headers) directly links to gexiv2 then exiv2 headers so these two
should be provided, even if they aren't on babl/gegl/gimp namespaces.

This change is useful to beta. But, despite we not using extensions on
GIMP nightly to need these headers, doesn't hurt syncing this change.
Indeed, this commit clarify "why" we aren't cleaning these headers.
2024-08-20 10:33:10 +00:00
Cheng-Chia Tseng
21b4b80601 Update Chinese (Taiwan) translation 2024-08-20 04:51:03 +00:00
Cheng-Chia Tseng
1e92f26e92 Update Chinese (Taiwan) translation 2024-08-20 04:27:18 +00:00
Cheng-Chia Tseng
72f687b095 Update Chinese (Taiwan) translation 2024-08-20 04:22:03 +00:00
Luming Zh
c85ade03f3 Update Chinese (China) translation 2024-08-20 01:22:12 +00:00
Luming Zh
173e57b20e Update Chinese (China) translation 2024-08-20 00:59:09 +00:00
Bruno
76f174f839 build/windows: Simplify installer .PS1 script
This adds a bit more verbosity to the installer script while omitting some.

The version params (e.g. gimp_version) are dropped since now config.h is
mandatory (this is a natural conclusion of the generation of assets).
2024-08-19 23:58:05 +00:00
Jehan
8844e57a0c meson, app: depend on GEGL 0.4.49.
Main dev branch of GIMP always depends on the HEAD of babl and GEGL
anyway, but that's just so that we maybe have less people reporting GIMP
not building because they use a stable release version of GEGL (though
it won't take care of the case of people using an older 0.4.49 build
which also won't have the newer API).
2024-08-20 00:22:01 +02:00
Anders Jonsson
4808dcd4cc po-libgimp: update POTFILES.in 2024-08-19 21:39:16 +02:00
Yuri Chornoivan
6ae95ad7a8 Update Ukrainian translation 2024-08-19 18:44:43 +00:00
Yuri Chornoivan
b6e5ce6a22 Update Ukrainian translation 2024-08-19 18:29:32 +00:00
Alx Sa
3beb2e88ec widgets: Restore GTK2 tab scrolling behavior
In GTK2 and GIMP 2.10, you can use the mouse scroller to
switch between dockable tabs if you hover over the bar.
This behavior was removed from GtkNotebook in GTK3.
This patch follows other GTK3 applications in re-implementing
the behavior with a scroll-event callback.
2024-08-19 15:59:34 +00:00
Martin
e26271bae6 Update Slovenian translation 2024-08-19 15:47:37 +00:00
Jehan
cc02b5adad app: s/GIMP_MESSAGE_ERROR/GIMP_MESSAGE_WARNING/ as reported by schumaml. 2024-08-19 17:44:09 +02:00
Jehan
b5a0da63bc app: store versions of GEGL operations in XCF files.
I broke MR !1660 commits into 2 commits so that the strings are added
now (freeing this up for the upcoming string freeze), with this commit.

A next commit will be needed when we'll have the proper version update
infrastructure on GEGL side, because right now, all we can do when
filter versions don't match is ignoring the filter.
2024-08-19 17:23:26 +02:00
Nils Philippsen
c7e1b11bed libgimp: Use namespaced doc reference
Otherwise, building the devel docs errors out like this:

```
FAILED: devel-docs/reference/gimp/libgimp-3.0
...
WARNING: Unknown namespace ExportReturn
[enum@ExportReturn.EXPORT].
^~~~~~~~~~~~~~~~~~~~~~~~~~
```

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-08-19 16:16:31 +02:00
Jehan
5814d9ed30 NEWS: update. 2024-08-19 12:17:35 +02:00
Jehan
57f52ebf9a INSTALL: Python and PyGObject are mandatory dependencies now.
There are needed at build time because we run various Python scripts
through GIMP, and we made the Python 3 plug-ins non-optional now.

Thanks to Bruno for noticing this needed to be updated in INSTALL.
2024-08-19 11:39:27 +02:00
Jehan
a6bde0a21a plug-ins: fix a call after my commit in !1549. 2024-08-19 11:33:16 +02:00
Martin
442254f0ee Update Slovenian translation 2024-08-18 21:37:35 +00:00
Jehan
ddcaa99264 app, libgimp*, pdb, plug-ins: review and enhance MR !1549.
- Fix annotations for gimp_export_options_get_image() to make it
  actually introspectable with the GimpImage being both input and
  output. Even though the logic doesn't change much (the input image may
  be overriden or not), it doesn't matter for introspection because
  images are handled centrally by libgimp and therefore must not be
  freed. Actually deleting the image from the central list of images
  though remains a manual action depending on code logic, not some
  automatic action to be handled by binding engines.
- Add G_GNUC_WARN_UNUSED_RESULT to gimp_export_options_get_image()
  because ignoring the returned value is rarely a good idea (as you
  usually want to delete the image).
- Remove gimp_export_options_new(): we don't need this constructor
  because at this point, the best is to tell plug-in developers to just
  pass NULL everywhere. This leaves us free to create a more useful
  default constructor if needed, in the future. Main description for
  GimpExportOptions has also been updated to say this.
- Add a data_destroy callback for the user data passed in
  gimp_export_procedure_set_capabilities().
- Fixing annotations of 'export_options' object from pdb/pdb.pl: input
  args would actually be (nullable) and would not transfer ownership
  (calling code must still free the object). Return value's ownership on
  the other hand is fully transfered.
- Add C and Python unit testing for GimpExportOptions and
  gimp_export_options_get_image() in particular.
- Fix or improve various details.

Note that I have also considered for a long time changing the signature
of gimp_export_options_get_image() to return a boolean indicating
whether `image` had been replaced (hence needed deletion) or not. This
also meant getting rid of the GimpExportReturn enum. Right now it would
work because there are no third case, but I was considering the future
possibility that for instance we got some impossible conversion for some
future capability. I'm not sure it would ever happen; and for sure, this
is not desirable because it implies an export failure a bit late in the
workflow. But just in case, let's keep the enum return value. It does
not even make the using code that much more complicated (well just a
value comparison instead of a simple boolean test).
2024-08-18 22:46:47 +02:00
Alx Sa
bcdd4974bb core, pdb, plug-ins: Create GimpExportOptions class
This patch creates a GimpExportOptions class in both
libgimpbase and in libgimp. Currently it is a mostly empty
object, but it will be added to after 3.0 to allow for
additional export options (like resizing on export while
leaving the original image intact)

libgimp/gimpexport.c was removed, and most of its content
was copied into libgimp/gimpexportoptions.c. gimp_export_image ()
was replaced with gimp_export_options_get_image () in all
export plug-ins.

GimpExportProcedure has a new function to set the default
image capabilities for each plug-in on creation. It also sets up
a new callback function, which allows the options to respond to
user setting changes (such as toggling 'Save as Animation' in the
GIF or WEBP Plug-in).
2024-08-18 22:03:14 +02:00
Jehan
9a26d45793 app: fix leak.
Commit e0b778fe5a was not tested well enough. It was heavily leaking
objects passed through the PDB.
2024-08-18 22:01:08 +02:00
Kolbjørn Stuestøl
bf294c51f6 Update Norwegian Nynorsk translation 2024-08-18 19:14:47 +00:00
Kolbjørn Stuestøl
4d6bdd8037 Update Norwegian Nynorsk translation 2024-08-18 19:04:57 +00:00
Kolbjørn Stuestøl
33445c38d1 Update Norwegian Nynorsk translation 2024-08-18 18:59:03 +00:00
Kolbjørn Stuestøl
1405acefcd Update Norwegian Nynorsk translation 2024-08-18 18:38:15 +00:00
Kolbjørn Stuestøl
3867d3d0c9 Update Norwegian Nynorsk translation 2024-08-18 18:21:41 +00:00
Kolbjørn Stuestøl
06918f39dd Update Norwegian Nynorsk translation 2024-08-18 18:07:40 +00:00
Martin
a66d7064b8 Update Slovenian translation 2024-08-18 17:56:21 +00:00
Kolbjørn Stuestøl
eb21b30251 Update Norwegian Nynorsk translation 2024-08-18 17:48:04 +00:00
Jehan
8eb910f934 app: "selection-feather-radius" max value is 5250.0.
This is a followup of previous commit. As well diagnosed by Anders, this
value relies on "gegl:gaussian-blur" operation's argument's range.

Also adding a comment to make it easier for future developers seeing
this value.
2024-08-18 17:40:02 +00:00
Anders Jonsson
16fc6093ee app: lower the upper limit for feather selection
The real upper limit was 1500 from the standard deviation of
gegl:gaussian blur multiplied with a magic number 3.5,
see 586bb73293
2024-08-18 17:40:02 +00:00
Yuri Chornoivan
9b15108b34 Update Ukrainian translation 2024-08-18 16:45:41 +00:00
Jehan
31cf749f31 libgimp: also add a unit test of gimp_text_layer_new() with pixel unit.
This would help preventing any future regression.
2024-08-18 18:19:23 +02:00
Jehan
518052a105 app, pdb: gimp_text_layer_new() allows pixel unit.
As reported by NikcDC: 624e3772e9 (note_2199852)
2024-08-18 17:44:06 +02:00
Jehan
e0b778fe5a app: improve error message when passing out-of-range GimpUnit arguments. 2024-08-18 17:44:06 +02:00
bootchk
b5a8f46b37 pdb, libgimp: Fix return type of gimp-buffer-get-image-type
gimp-buffer-get-image-type returns the output of
gimp_babl_format_get_image_type (), which itself returns
a GimpImageType enum. However, the PDB claims that
it's a GimpImageBaseType enum instead. This patch fixes
the documentation to match the actual output enum type.
2024-08-17 23:23:51 -04:00
Jehan
d38362c9a0 meson, INSTALL: update optional packages list. 2024-08-17 21:16:00 +02:00
Jehan
59eeae66fd app, tools: fix build without iso-codes package. 2024-08-17 21:16:00 +02:00
Jehan
57d9f63ce4 plug-ins: fix mail crash when canceling the export.
Making sure that `g_free (mailcmd[0])` in the cleanup code does not
segfault on non-allocated memory.
2024-08-17 21:16:00 +02:00
Bruno
6840d70317 build/windows: Complete c95fe605cd 2024-08-17 14:49:57 -03:00
Bruno
8c99efd7a1 build/windows: Add pseudo REVISION support to MSIX dist script
Due to Partner Center restrictions, GIMP MSIX will have a special versioning:
{major}.{minor}.{micro}{revision}.0
2024-08-17 14:49:53 -03:00
Alx Sa
1f5a5812dd libgimpcolor: Remove unnecessary GimpRGB Cairo functions
gimp_cairo_set_source_rgb () and
gimp_cairo_set_source_rgba () are no longer
used in the code base, so let's remove them
as part of the move to GeglColor.
2024-08-17 14:37:10 +00:00
Jehan
70ef4bb507 Issue #10439: Recently Closed Docks shows empty submenu after reopening…
… closed docks.
2024-08-17 14:07:33 +02:00
Ekaterine Papava
9f74a79623 Update Georgian translation 2024-08-17 01:57:13 +00:00
Jehan
32d18f28e7 app: fix a crash when editing the shortcut not on an actual action.
Liam was hitting Backspace on "histogram" which is an action section and
would likely not return a proper GimpAction through
gimp_action_view_get_accel_action().

Therefore let's make sure we initialize properly the action to NULL.
2024-08-17 00:15:09 +02:00
Anders Jonsson
9807ea4834 po: update POTFILES.in 2024-08-16 19:51:08 +00:00
Alx Sa
4e0897f56d widgets: Fix bug loading tool presets in translated UIs
The submenu labels for tool-options-popup were
hardcoded as English in GimpToolOptionsEditor's calls
to the Save, Restore, and Delete Tool Presets buttons.
This meant that these menus always fail when called in
non-English UIs, since we compare the path name and
submenu labels to only load the correct submenu items.

This patch attaches the English labels to the submenu
object so that we can retrieve it for comparison in
gimp_menu_model_get_submodel ().
2024-08-16 15:15:20 -04:00
Jehan
e31087a1f0 Issue #9757: radio button menu items not correctly updating (on macOS). 2024-08-16 20:03:29 +02:00
Jehan
9d837cc771 Revert "libgimpcolor: fix call to cmsCreateProofingTransform()."
This reverts commit f7e7f396aa.

See issue #8269.
For GIMP 2.10, I'll just revert this commit so that we get back to pre-2.10.32
situation. ~~For 3.0, we'll try to do something better.~~

-> Let's delay improving the situation even for GIMP 3.0, in which case
it's better to at least keep the same render as for the 2.10 series and
avoid confusion. I'll take more time after release to study better the
situation and see what we should actually do.

(cherry picked from commit 2fd738bb3e)
2024-08-16 15:23:09 +02:00
Jacob Boerema
fd3d547338 app: fix #11612 CRITICAL no emission of signal "tool-changed"...
to stop for instance

When using the scale tool and the layer has a selection, then after
finishing the scaling we get a critical in the terminal like this:

(gimp-2.99.exe:31824): GLib-GObject-CRITICAL **: 18:22:05.689:
../glib-2.80.2/gobject/gsignal.c:1184: no emission of signal
 "tool-changed" to stop for instance '000002e8a0f91df0'

This commit moves the call to `g_signal_stop_emission_by_name` inside
the if active_tool != tool_type.
2024-08-16 11:05:53 +00:00
Jehan
5376c5f9d3 Issue #11908: unable to copy with no selection.
gimp_item_mask_bounds() does not actually return if there is intersected
contents between the item and the image's selection, but whether there
is a selection. So when it returns FALSE, it will also return the full
item's dimensions.
2024-08-16 12:53:44 +02:00
Bruno
706014eba4 gitlab-ci: Explain why we don't use 'matrix'
'matrix' would save a lot of code and facilitate maintenance but,
according to my tests in a branch that I already deleted, this
doesn't work for our needs considering GitLab CI limitations.
2024-08-15 21:56:32 -03:00
Alx Sa
816fb1c676 tools, libgimpwidgets: Connect SelectionOptions to icon size
This patch resizes the selection mode
icons based on the user's icon size
settings. It creates a new function in
gimpenumwidgets.c to update sizes,
then connects to GimpGuiConfig's icon
size update notifications in GimpSelectionOptions.
2024-08-15 19:07:14 +00:00
Jehan
ee2f86105c app: move "System Language" out of GIMP_L10N_LANGS_SIZE.
This is the only "language" from the list whose name is special and
should be localized at runtime, yet before we set any Preferences
language. It needs to be localized as the System Language itself which
will be run-dependant.

For instance, if your system is in French, it will be displayed as
"Langue système" but if you change your system to Korean, at next run,
it would show "시스템 언어". It is a per-run localization, independant
from the language selected in Preferences, and even less dependant from
build-time system language.
2024-08-15 20:57:02 +02:00
Jehan
7b274c1200 meson, build: verify for up-to-date gimp-data and warn otherwise. 2024-08-15 19:41:12 +02:00
Jehan
5b99177dad meson: shortcut meson not finding gimp-data/meson.build with a better error message.
As reported by pippin, when gimp-data submodule is not initialized,
meson configuration fails with:

> meson.build:1830:0: ERROR: Nonexistent build file 'gimp-data/meson.build'

This does not give a lot of info, and while the solution can also be
found in INSTALL.in (INSTALL in tarballs) and on developer website, it's
nicer if the build itself could give a clearer information.

Now it will say instead:

> ERROR: Problem encountered: gimp-data submodule not present. Run: git submodule update --init
2024-08-15 19:30:55 +02:00
Jehan
aba7316e34 tools: bind the "iso_639_3" gettext domain to iso-codes location…
… found at build-time.

It was working on a machine with default paths and system-installed
packages (e.g. a typical Linux distributions) but needs to be manually
set up e.g. on Windows.
2024-08-15 15:50:30 +02:00
Jehan
364f541336 tools: fix self-localization of languages for Windows.
Basically reusing the solution from commit 7ccfad1716.
2024-08-15 15:50:30 +02:00
Jehan
90fb84de26 tools: list supported languages with po/LINGUAS.
We can't rely on installed *.mo files anymore when this procedure is
done at build time.
2024-08-15 15:50:30 +02:00
Jehan
e7f62f69f3 tools: proper error handling for gen-languages.
In particular, we don't want the build to succeed when various obvious
issues occur, which may even end up in a successful-looking build (yet
with no proper language lists), like we had in !1597.
2024-08-15 15:50:30 +02:00
Jehan
8feb827e78 tools: gen-languages should always search from ISO_CODES_LOCATION.
This became a build step, not runtime one, therefore we don't care
anymore about relocation.
2024-08-15 15:50:30 +02:00
Jehan
b9fcb22877 build, tools: always use iso_639_3 gettext domain.
Also no need to bundle the iso_639 gettext domain anymore for runtime.
2024-08-15 15:50:30 +02:00
Bruno
143dfb709b build: Provide 'iso_639_3.mo' for language list in text tool options
This list is generated at runtime, unlike the one from preferences.
2024-08-15 15:50:30 +02:00
Jehan
965dd51e80 build: don't bundle iso_639.xml anymore.
Note that we still need the iso_639.mo files at runtime. Only the XML
files don't need to be parsed anymore at runtime (they are parsed at
build-time now).
2024-08-15 15:50:30 +02:00
Jehan
a106acd408 app, tools: localization for GimpLanguageStore languages must happen at runtime.
Unlike the GimpTranslationStore which can use a list of pre-localized
languages (each language in its own name), the GimpLanguageStore must be
displayed in the currently used locale.
2024-08-15 15:50:30 +02:00
Jehan
4d79e9db0b tools: only list languages with part 1 and part 2 codes or with a localization.
Our GimpTranslationStore contains self-localized names of all languages
we support.
As for GimpLanguageStore, it contains all known languages with their
name in the current locale. When moving to ISO 639-3 list, we had all
possible language, included ancient ones, extinct ones, and so on. With
the iso-codes installation on my machine, this meant a struct with 7910
languages! When showing the Text tool options for the first time, GIMP's
UI is frozen for a few seconds because of this, while it constructs the
GimpLanguageEntry making use of the GimpLanguageStore.

By only listing part 1 and part 2 languages (as well as the rare
languages which are not in these list yet which we still support, i.e.
right now only 'ckb' (Central Kurdish), see #11626), the list lowers to
189 languages, which is still good and are the main languages or
language families AFAIU. And now the Text tool options are constructed
instantly.
Note that this is in fact even less than when we were just using
iso_639.xml (I counted 487 languages stored there), but I believe it to
be enough for the usage we have in the Text tool.
2024-08-15 15:50:30 +02:00
Jehan
5f9083f251 app, tools: generate the language list at build-time.
Instead of always parsing the ISO-639 listing at each and every startup,
let's just generate the list of languages, their English name, and the
self-localized names as static struct.
This will just be much faster, and no worrying on the size of the XML
(or json) to parse.
2024-08-15 15:50:30 +02:00
Jacob Boerema
8838481d12 app: fix #11626 Language selection: name for ckb shows up as ???
We have translations for ckb (Central Kurdish), which is only
available in iso codes 639_3. For our language selection we only
parse 639(_2), which causes this language to show up as `??? (ckb)`.
This is of course not a good user experience since users need to know
that ckb is the abbreviation of their language.

We fix this by parsing `iso_639_3.xml` instead of `iso_639.xml`. This
works, but, since this file is a lot bigger, it takes a lot more time
(more than 1 second difference) to parse this.

Now, this is only done on startup, but this can certainly be a
noticeable delay.
2024-08-15 15:50:30 +02:00
Anders Jonsson
d92519a8e8 app, plug-ins: fix translatability of static strings
Fixes #10565
2024-08-15 12:01:41 +00:00
Nils Philippsen
1c3522802a plug-ins: Fix building TIFF loader on big endian
A recent addition to load layers in Sketchbook TIFFs contained a typo in
code specific to big endian machines, making it fail to build there,
which wasn’t caught in CI.

In addition to this fix, use the appropriately named macro to convert
from little endian to big endian.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-08-15 11:12:12 +00:00
Bruno
b4ad767296 build/linux: Sync with Beta manifest regarding openexr and imath (add libdeflate)
Ported from: 55fdadd10f
2024-08-15 11:09:48 +00:00
Jehan
51c8709e05 Issue #11906: action search followed by down arrow key stops responding…
… to keyboard input.

Removing a GtkBindingSet entry actually removes it from all GtkTreeView.
It's not limited to the ones contained in GimpContainerTreeView (which
makes sense, since it relies on the class) so it broke various
interactions across the software.

Let's just connect to signal key-press-event instead and block further
propagation. Not sure anyway why GTK has so many ways to handle key
interactions!

I'm also moving the implementation to GimpItemTreeView because this
enhanced keyboard handling is really about the items tree dockables
only, for the time being at least.
2024-08-15 12:32:48 +02:00
Yuri Chornoivan
9edb11ac5f Update Ukrainian translation 2024-08-14 18:11:53 +00:00
Anders Jonsson
0928fdb11d NEWS: fix typos 2024-08-14 14:30:13 +02:00
Luming Zh
256e0ca5a0 Update Chinese (China) translation 2024-08-14 08:06:02 +00:00
Luming Zh
60449b7c58 Update Chinese (China) translation 2024-08-14 07:56:19 +00:00
Martin
b3f667ba4b Update Slovenian translation 2024-08-13 23:55:22 +00:00
Jehan
03702154ad app: use gimp-image instead of dialog-question for default GimpViewable…
… icon name.

As akk was reporting on IRC, the huge question mark from the
dialog-question icon really makes it feel like it's an help button
(especially when used as an actual button, e.g. in GEGL filter generated
dialogs with aux inputs, when no viewable has been set as input yet).
2024-08-14 00:36:23 +02:00
Jehan
c28fa12148 app: auxiliary input pads should have nicer names as registered by the operation. 2024-08-13 22:32:44 +00:00
Alx Sa
7642e1f5da app/tools: Filters with aux nodes merged automatically
Currently we can't serialize GimpDrawable, which is necessary for us
to store filters with Aux Nodes. Therefore, they will automatically be
applied destructively as a workaround until we can.
2024-08-13 21:33:41 +00:00
Joachim Priesner
b3daeb12b5 libgimpwidgets: Fix stack buffer overrun
3833ab2b1d changed the type of "rgb" from
gdouble[3] to gfloat[3], but it should instead have changed the type of
"lch".

Resolves #11898.
2024-08-13 17:58:18 +00:00
Jehan
dd700544b4 NEWS: update. 2024-08-13 19:01:59 +02:00
Jehan
631a957f9a libgimp: have libgimpui depend on pdbgen.
There was a weird instance of build failure in CI when compiling one of
the libgimpui files. It could not find one of the PDB-generated
function:

> ../libgimp/gimpaspectpreview.c:329:19: error: call to undeclared function 'gimp_image_get_selection'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

My assumption is that as a multi-threaded build, this file was compiled
just at the same time as the PDB was generating it, and therefore it was
empty, hence a very bad timing creating a build failure.

As I recall, I created the bogus stamp file stamp-pdbgen.h specifically
for such race condition issues (because meson has no generic dependency
rule, so we can't just ask one job to wait for another). We were using
this bogus object as source to libgimp, but not libgimpui.

Hopefully this will fix the problem and it won't re-happen randomly.
2024-08-13 18:16:39 +02:00
Jehan
576554a0af app: Up/Down in GimpContainerTreeView should select items "visually".
layers-select-next/layers-select-previous don't work well as up/down
arrow behavior because they only work within each selected layer's
level. But historically (and that's what makes the most sense IMO, and
is the most expected behavior), up/down arrows would walk through the
layer list visually. I.e. that it would select next whatever is the next
layer displayed in the Layers dockable, even if it means selecting
children or going down one layer group level.

The 2 new actions "layers-select-flattened-previous" and
"layers-select-flattened-next" do this. Say you have this tree:

Layer 1
Layer 2
 | - Layer 3
 | - Layer 4
Layer 5

With the "flattened" actions, after Layer 2, there is Layer 3, and after
Layer 4, there is Layer 5… unless… Layer 2 (layer group) is collapsed.
In which case, after Layer 2 is Layer 5. This selection movement indeed
takes into account the state of the layer group expanders.

This makes the Up/Down arrows work similarly to how they used to work
with default GtkTreeView implementation, except that the logic now also
works well with multiple selected items.
2024-08-13 16:41:21 +02:00
Jehan
aee55ab25c Issue #11729: reword descriptions of "Select Previous|Next Layers" actions. 2024-08-13 12:54:27 +02:00
Jehan
583fbc6607 Revert "Issue #11729: Select Previous/Next Layers commands only select one layer."
This reverts commit 31df873d4c.

My commit was not wrong per-se (it didn't add any bug), but it was in
fact not useful either, and only adding a useless list copy for no good
reason.
I thought that action_select_object() was actually selecting objects,
but looking at implementation, it in fact doesn't. It only returns a
pointer to the object to select.
2024-08-13 12:54:27 +02:00
Jehan
5a51bfe868 app: update up/down PageUp/Down and Home/End behavior with multi-selection in mind.
This should likely eventually be re-specified in gimp-ux tracker,
especially as anyway we are planning on rewriting the GimpItemTreeView
from scratch.
But for now, this is better than the behavior where the arrow keys are
losing multi-item selections by default, and also the PageUp|Down
assigned actions are eaten away (as noted by Jacob in #11729).

Now we still don't go through to the PageUp|Down actions (in fact we do,
if we consider the default ones, but it's hardcoded, because after
careful consideration, I do indeed think that when such a tree view has
focus, the arrow and PageUp|Down buttons would have special meaning
anyway), even though I had a first version of this patch which did this.
We simply have much nicer hardcoded behavior!
2024-08-13 12:54:27 +02:00
Yuri Chornoivan
714e371830 Update Ukrainian translation 2024-08-12 16:38:28 +00:00
Jehan
31df873d4c Issue #11729: Select Previous/Next Layers commands only select one layer.
Somehow it works fine on my machine, but this is very likely the
culprit. gimp_image_get_selected_layers() returning directly the pointer
to selected layers, we should always make a copy before doing anything
which would change this selection!
2024-08-12 14:48:56 +02:00
Anders Jonsson
2da08995c3 Update Swedish translation 2024-08-12 12:28:00 +00:00
Lukas Oberhuber
deaa99cf08 meson: fix MacOS build
lua is not available on macOS currently and the lack of lack of the lua variable causes
the build to fail.
2024-08-12 10:48:50 +00:00
Martin
68462fb25e Update Slovenian translation 2024-08-12 10:30:07 +00:00
Anders Jonsson
5422c8829d script-fu: fix gettext extraction
Gettext treats #! in scheme files as a comment start
and needs a !# for the comment to end, otherwise it skips
the whole file.
2024-08-12 09:24:13 +00:00
Ekaterine Papava
3865c0993c Update Georgian translation 2024-08-12 04:31:02 +00:00
Ekaterine Papava
98211b09d5 Update Georgian translation 2024-08-12 04:28:31 +00:00
Ekaterine Papava
ac7e5d59c2 Update Georgian translation 2024-08-12 04:27:00 +00:00
Alx Sa
376bda8e38 app/display: Initialize rectange constraints
Resolves #11897.
The crop tool currently doesn't constrain
to the top-left of the layer when the
"Allow growing" option is turned off and
"Selected layers only" is turned on.
Instead, it always constrains to 0, 0.

When we converted to multi-layer select,
we added a loop to check the boundaries
of all selected layers. In this loop, we use
separate variables to get the offset and
then get the min of it and the current
min_x and min_y. However, those values
are initialized to 0, so they will always be
smaller if the layer is inside the canvas.

To fix this, before the loop we check if
there are any selected layers. If so, we
get the offset of the first layer and set
min_x and min_y to that value rather than
0, 0.
2024-08-11 19:51:06 +00:00
Bruno
aabfec824d build/linux: Sync with Beta manifest regarding graphviz
Ported from: 395358b517
2024-08-11 13:59:17 -03:00
Bruno
d351bbe283 build/linux: Sync with Beta manifest regarding gimp module
Ported from: 61050e962c
2024-08-11 12:18:21 -03:00
Alx Sa
979a3c3c32 plug-ins: Use pre-multiplied alpha for Lighting Effect's...
...bump map settings.
Currently, the Lighting Effect's bump map options uses
the RGB values of transparent pixels as part of its map.
As the Bump map filter does not do this, this patch tries
to make it consistent by using associated alpha for the
bump map Babl format to fix this.
2024-08-11 14:52:36 +00:00
Bruno
9c4425f0f0 build/linux: Sync with Beta manifest regarding libheif and x265
Ported from: 1690804247
2024-08-11 10:37:02 -03:00
Jordi Mas
89b14e1e1a Update Catalan translation 2024-08-11 15:35:04 +02:00
Luming Zh
273a633f24 Update Chinese (China) translation 2024-08-11 11:12:10 +00:00
Luming Zh
c777608a96 Update Chinese (China) translation 2024-08-11 11:07:05 +00:00
Martin
51c67d7fbe Update Slovenian translation 2024-08-11 10:40:13 +00:00
Martin
e4e8ee0a1e Update Slovenian translation 2024-08-11 10:37:33 +00:00
Bruno
89f7ddb2ca gitlab-ci: Change appimage comment following #6798
I and Jehan researched then concluded that reverse naming is NOT
the 'de facto' standard yet so the word "exotic" isn't appropriate.
2024-08-11 10:00:45 +00:00
Yuri Chornoivan
3a3a5f1c81 Update Ukrainian translation 2024-08-11 06:29:54 +00:00
Bruno
0310fbae15 devel-docs: Complete 063324cff0 2024-08-10 21:52:57 -03:00
Bruno
2eb4f579f1 build/linux: Sync with Beta manifest regarding suitesparse and openblas
Ported from: 537cbf411c
2024-08-10 20:31:23 -03:00
Alx Sa
a04befa65f plug-ins: Fix CRITICAL on Add Unit Dialog
Resolves #11892.
The new_unit_dialog () now initializes the default GimpUnit
to NULL instead of GIMP_UNIT_PIXEL. So we need to update the
check to prevent it from running when the user cancels the dialogue.
2024-08-10 23:21:36 +00:00
Jacob Boerema
3323988e9a plug-ins: be consistent and use Name in Add Unit
The name was changed from ID to Name in the Unit Editor, so it makes
sense to do the same for the Add Unit Dialog.
2024-08-10 17:51:36 -04:00
Jehan
34af64b70f extensions, plug-ins: fixing CamelCase on the "Plug-In Examples" items.
First of all: sorry to all translators who started working on these new
strings!

We use CamelCase for our titles, and in particular "Plug-In" is
capitalized with 'I'.

Furthermore, let's use understandable titles like "Plug-In Example in C"
and not just "In C", because while the short title works OK in the menu,
it makes for very broken action names in non-contextual parts of the
software, such as the action search.

Note that we in fact have a concept of short label for actions since
commit 89772351c9. I added support for it to GEGL actions (cf. commit
6dc5f6792e), and to a few core actions (e.g. commit ea1205f094).
Unfortunately I don't think I added an API yet for short label in
plug-ins. Maybe I'll add it soon. But for now, if we have to have a
single label, it should be long, so that it works in every situation.

P.S.: not sure if it's useful to keep documentation strings just
repeating the title, but for now, let's leave them.
2024-08-10 23:33:57 +02:00
Alx Sa
546e41c540 app/menus: Fix "vectors" group to "paths"
Resolves #11890.
The Selection Editor's "vectors" group was not renamed
to "paths" during the GimpPath API update. This caused it
to be registered to a non-existent group, thus crashing.
2024-08-10 20:32:25 +00:00
Yuri Chornoivan
4bae06c8b3 Update Ukrainian translation 2024-08-10 19:27:21 +00:00
Yuri Chornoivan
dc9b777343 Update Ukrainian translation 2024-08-10 19:24:07 +00:00
Kolbjørn Stuestøl
3dab84b5ef Update Norwegian Nynorsk translation 2024-08-10 16:46:42 +00:00
Kolbjørn Stuestøl
b7bc9ed732 Update Norwegian Nynorsk translation 2024-08-10 16:29:08 +00:00
Kolbjørn Stuestøl
04f41a9882 Update Norwegian Nynorsk translation 2024-08-10 16:25:59 +00:00
Kolbjørn Stuestøl
1e092dd969 Update Norwegian Nynorsk translation 2024-08-10 16:18:21 +00:00
Kolbjørn Stuestøl
09d273bc27 Update Norwegian Nynorsk translation 2024-08-10 15:40:04 +00:00
Kolbjørn Stuestøl
002a696b2e Update Norwegian Nynorsk translation 2024-08-10 15:34:12 +00:00
lloyd konneker
a5544af91d Translation: plugins: translate the Scheme example plugin
Since it will be distributed in a release.

Only translate the menu item and help.
Not translate dialog labels, they will only be read by plugin authors.
2024-08-10 14:58:58 +00:00
lloyd konneker
634f3d674f build: plugins: ensure test plugins not installed in stable version
Menu Filters>Development>Demos not appear in a stable version,
and not appear in unstable version unless buildtype==debug.
2024-08-10 14:58:58 +00:00
lloyd konneker
f0e09494e1 GUI: plugins: Move "Sphere.." example to menu "Plug-in Examples"
Also only ship "Hello World" in unstable release.
2024-08-10 14:58:58 +00:00
bootchk
fef971fa8d GUI: Rename menu Filters>Development>Goat exercises => Plug-in Examples
The old menu label was confusing to users.

Remove translatable strings having joke "goat" so translators not confused.

Move the goat plugins to the menu.

The items under the menu should all be example plugins.
The menu is in a release.

Test plugins should not be in this menu.
Test plugins should not ship in a stable release.

!!! Note that 2.10 does not ship with example plugins.
If we don't want 3.0 to ship stable build with example plugins,
then the meson.build for goat-exercises needs to change
and the menu removed entirely in menus/image-menu.ui.in.in.
2024-08-10 14:58:58 +00:00
Jordi Mas
3bec618d1b Fix in Catalan translation 2024-08-10 16:44:55 +02:00
Alx Sa
cdd5174055 tools: Add option for destructive filters
Adds a checkbox in the Filter tool so that
users can choose to apply a filter
destructively or non-destructively.
Currently only layers can have NDE effects
so it's not shown for masks and other
drawables.
Additionally, filters are moved to the top
or the bottom of the filter stack depending on
the setting (as destructive filters are applied
directly to the layer while NDE filters are
put on the top by default).
2024-08-10 13:47:42 +00:00
Martin
946a4d1af9 Update Slovenian translation 2024-08-10 13:36:09 +00:00
Anders Jonsson
5a9f76ca6b Update Swedish translation 2024-08-10 11:15:07 +00:00
Bruno
9e4cf76228 build/linux: Sync with Beta manifest regarding poppler
Ported from: 7a71694e85
2024-08-10 08:02:17 -03:00
Anders Jonsson
8c5f281047 Update Swedish translation 2024-08-10 10:26:53 +00:00
Yuri Chornoivan
0389fe8cda Update Ukrainian translation 2024-08-10 06:14:25 +00:00
Bruno
7c64f26caa build/windows, meson: Complete 93cc81281c 2024-08-10 00:59:53 +00:00
Luming Zh
d5cb5a67d8 Update Chinese (China) translation 2024-08-10 00:47:44 +00:00
Jehan
d0be4828ce app, pdb: improve cut error message and fix return value.
This fixes 2 issues:

1. Since gimp_edit_cut() uses gimp_edit_copy(), it had the same error
   message when no selected drawables were within the selection.
2. When there was a previously existing clipboard image, gimp_edit_cut()
   could return it as though the cut succeded, even when it did not.
2024-08-09 20:39:26 +02:00
Jehan
d5ff0360b1 app, libgimp, pdb: also tweak a bit gimp_edit_copy|cut() docs per…
… Lloyd comment in #10471.
2024-08-09 20:10:06 +02:00
Jehan
471a92e5ed Issue #10471: gimp_edit_copy(): doesn't behave like docs. 2024-08-09 19:52:05 +02:00
Jehan
3c388c78ac app: fixing bug created in commit cde861a0e6.
While other parts of the commits were fine, this specific change was
clearly me going too fast. This is the format for a printf() call.

Fixes:

> app/widgets/gimpimagepropview.c:461:50: warning: format ‘%a’ expects argument of type ‘double’, but argument 4 has type ‘const gchar *’ {aka ‘const char *’} [-Wformat=]
2024-08-09 19:29:55 +02:00
Kolbjørn Stuestøl
e9fd83c5ec Update Norwegian Nynorsk translation 2024-08-09 16:07:40 +00:00
Jehan
9c3884c605 meson: parse lua version when the binary is unversioned.
I had the case on my machine where `lua` was version 5.4.4 and the
lua-lgi test succeeded fine, but then the demo plug-in would fail to run
with the error message from #11876.

Let's parse the output of `lua -v` to detect the version ourselves and
therefore be able to output proper error messages for packagers not to
assume that the Lua interpreter they are using will work fine.
2024-08-09 17:12:44 +02:00
Bruno
1c08f08e97 build/linux: Sync with Beta manifest updating gexiv2 and exiv2
Ported from: 3772514155

Just to note, ALL the previous "Sync with..." commits were tested in flathub
and gnome-nightly flatpaks, and this actual one (and future ones will be) too.
2024-08-09 11:48:07 -03:00
Kolbjørn Stuestøl
108f1a2d24 Update Norwegian Nynorsk translation 2024-08-09 14:46:27 +00:00
Jehan
063324cff0 extensions: install the lua interpreter for all non-relocatable builds.
As discussed in #11876, the interp files work fine on Linux (and other
platforms) too, and this allows to properly redirect to the working
interpreter found at configure time, without touching the scripts'
shebang.
2024-08-09 16:31:00 +02:00
Kolbjørn Stuestøl
7fd75ee074 Update Norwegian Nynorsk translation 2024-08-09 14:24:35 +00:00
Bruno
7037297526 meson: Prevent broken lua plug-ins
See: https://gitlab.gnome.org/GNOME/gimp/-/issues/11876

For 3.0 we will support only Lua 5.1, since we need to figure out how
much of the Lua 5.1 API is compatible with newer versions (Lua minor
versions aren't like Python minor versions, there is API breakage so
plug-ins would be completely unreliable, this commit prevent this).

Also, change some files to not force luajit since it isn't mandatory.
2024-08-09 12:26:26 +00:00
Alx Sa
f5d14a5d66 plug-ins: Convert custom GFig icons to vectors
As in f9df9805, adds SVG versions of GFig
custom icons and conditionally uses them if
have_vector_icons is enabled. If not, we
fall back to the original PNG icons.

Also resolves #10012 by adding white
outlines around the thin dark lines to
make them more visible in dark mode.
2024-08-09 11:30:44 +00:00
Jehan
84471f397a Issue #5331: use the $XDG_CONFIG_HOME config folder unconditionally.
This is the pendant commit to the one I'm going to commit on the beta
branch for RC1. There in fact was a way to always use the
$XDG_CONFIG_HOME folder, unconditionally (and prevent the weird
inconsistencies of having config folder in .var for some flatpak
installations and in XDG folder for others).

See: https://github.com/flathub/org.gimp.GIMP/pull/287
2024-08-09 13:12:04 +02:00
Jehan
21ac02eabb Issue #11401: inexistent fonts folder in MSIX installation directory.
Apparentely `makeappx` tool deletes empty folders and MSIX runs with
system paths read-only. So calling g_file_make_directory_with_parents()
is just not enough.

Therefore when opening font folders recursively for font parsing, let's
just ignore the specific error of non-existing folders.
2024-08-09 12:53:37 +02:00
Alx Sa
649d121380 plug-ins: Load layers in Sketchbook TIFFs
This patch adds support for loading Sketchbook
TIFF layers.
Alias/Autodesk Sketchbook used metadata tags
to store information about layers. This is a
separate implementation compared to Adobe,
stored in TIFFTAG_ALIAS_LAYER_METADATA.
The first directory contains the image metadata
and the layers are stored in SubIFDs, using the
same metadata tag for layer-specific properties
such as opacity and visibility.
2024-08-09 01:03:44 +00:00
Jehan
2fcdae277b app: fix canvas' size request with a scale factor != 1.0.
This is a followup of commit f2d47ee53a.
I realized that the window's size was too big for the case when there is
an image as well because the scale factor of 1.0 was hardcoded. We now
use the scale factor from the display the shell is displayed on.
2024-08-09 01:53:02 +02:00
Jehan
93cc81281c Issue #11317: make Python plug-ins mandatory.
Unlike the other bindings (Lua, JS, Vala) where we only have a demo
plug-in, we actually have a bunch of interesting and useful Python
plug-ins.

Furthermore, we are running several Python scripts through GIMP during
our build (to generate a few images), so pygobject becomes a build
dependency anyway, even if it may not be a run dependency with
-Dpython=disabled.

This all becomes a bit confusing and in fact handling this case (of not
installing Python plug-ins) seems like an annoyance while we lose good
core plug-ins. So let's just make Python plug-ins mandatory. It's not
like Python is very controversial these days, and AFAWK, it is available
on every platform out there.
2024-08-09 01:01:58 +02:00
Jehan
f2d47ee53a app: fix too big canvas with small display.
I was testing with a 2560×1440 display, yet with ×2 scale factor, which
is kinda equivalent with 1280×720 for scaled dimensions code.
And so anyway the default size request for an empty canvas was far too
big (bigger than the work area in fact).

I'm now using small default. As for the 3:1 ratio comment, not sure
about it, since shell_width is in fact changed to -1, so it feels very
specific to someone's setup. But anyway… I left the comment.
2024-08-09 00:26:36 +02:00
Alx Sa
2286a447c1 libgimpwidgets, app/core: Fix babl formats to float
This patch converts the last instances of
non-RGBA color models from double to
float for babl formats.
2024-08-08 21:44:53 +00:00
Alx Sa
3833ab2b1d libgimpwidgets: Convert CIE LCH(ab) babl format to float
This patch converts the
few instances of CIE LCH(ab) double
to float to match babl's precision.
2024-08-08 19:25:07 +00:00
Alx Sa
ddfb4d4f73 plug-ins: Fix crash when editing Gradient Flare
As Lloyd Konneker noted, the calc.sflare_list was not being
accessed at the right location when the Edit Dialog preview of
the gradient was updated. The API page for g_list_free_full ()
recommends using g_steal_pointer () to ensure the head element
is not left dangling. This aligns with other usage in the GIMP codebase
and seems to stop the crash. Additional safety checks were
also added.
2024-08-08 11:10:45 +00:00
Bruno
c95fe605cd build/windows: Add verbosity to MSIX script
Now, some basic things will be output on runner and others saved in winsdk.log
2024-08-07 21:53:37 -03:00
Bruno
c748b3d286 build/windows: Make 'clean' function more silent
This improves bundling script after c808d13b.

No need to a waterfall of "(INFO): cleaning" outputs, one is enough.
2024-08-07 21:53:34 -03:00
Luming Zh
cb796c57d6 Update Chinese (China) translation 2024-08-08 00:52:18 +00:00
Jehan
bf62c41bc9 app: also rename <Vectors> to <Paths> menu. 2024-08-07 19:33:48 +02:00
Anders Jonsson
438209c30a app: rename vectors-popup to paths-popup
GIMP crashed in the Paths menu since the name wasn't changed everywhere.

Fixes #11881
2024-08-07 18:22:48 +02:00
Alx Sa
b11ea66cf0 menus: Add option for "Huge" Preview Size
The GIMP_VIEW_SIZE_ENORMOUS enum setting was missing from
the Preview Size menu. This patch adds it in so that users have a
preview size option between Extra Large and Enormous.
2024-08-07 12:42:02 +00:00
Yuri Chornoivan
eb0f82cd39 Update Ukrainian translation 2024-08-07 11:43:36 +00:00
Yuri Chornoivan
f39d43bd9e Update Ukrainian translation 2024-08-07 11:39:53 +00:00
Yuri Chornoivan
abe156a2a2 Update Ukrainian translation 2024-08-07 11:38:31 +00:00
Alx Sa
498042b66c tools, xcf: Don't load gegl:nop filters
In earlier development, we accidentally
allowed users to save gegl:nop filters.
Since they are valid operations, they were
not triggering our unsupported operations
delete code. This patch adds a second
check to see if the operation is a nop, and
deletes it as well.
This patch also adds a check to make sure
a filter is in the filter stack before reordering
it. This was revealed by the nop bug, so
it makes sense to patch both at once.
2024-08-07 02:14:12 +00:00
Luming Zh
9cd5bc3bca Update Chinese (China) translation 2024-08-07 01:41:17 +00:00
Luming Zh
0d3e735451 Update Chinese (China) translation 2024-08-07 01:36:18 +00:00
Luming Zh
7a7e7f686c Update Chinese (China) translation 2024-08-07 01:33:43 +00:00
Bruno
1f24aa5f7c build/windows: Move splitting script to its right dir
Following 0199faac and 884b05f1

It's clearer than ever that this is an installer-only thing
so let's move the script to the right place.
2024-08-06 17:52:01 +00:00
Jehan
b93c77d014 gimp-data: update to go forward with #5507. 2024-08-06 19:35:07 +02:00
Jehan
f325c27c93 Issue #11630: Improve Welcome Dialog height on small screens.
Improve the previous commit with a bit more subtlety:

* Try to get the proper monitor (if the the widget's window is already
  realized).
* While we try not to display too small an image (quarter of work area),
  we also try not to display it too big (third of the work area).
* After the image has been loaded and displayed, the dialog will likely
  reallocate to its finale size. When this happens, we should check if
  it's not higher than work area. Only then should we try to make the
  first page scrollable. Not only this, but we also queue the window for
  resize (otherwise it's too late, the window is already too big).
  This later point avoid having ugly scrollbars when unneeded (i.e. when
  the dialog is perfectly fitting within the work area).
2024-08-06 17:16:27 +02:00
Alx Sa
766e7325ff dialogs: Improve Welcome Dialog height on small screens
This patch makes the first page of the
Welcome Dialog scrollable vertically.
This should help reduce the screen height
for users with smaller screen sizes.
2024-08-06 17:16:09 +02:00
Bruno
5891854fa6 build/windows: Don't pollute source nor screen when installing Inno
Don't download Inno in-source and don't display annoying dialogs anymore
for better quality of life.
2024-08-06 13:27:03 +00:00
Bruno
1656a807d6 build/windows: Don't pollute source when creating installer
Until now, the installer script had a very invasive behavior of copying
things from _build. Let's stop this since it is extremely annoying.
2024-08-06 13:27:03 +00:00
Jehan
deea10ed82 libgimp: fixing python unit test for GimpUnit API. 2024-08-06 14:32:25 +02:00
Martin
c5119afc39 Update Slovenian translation 2024-08-06 11:26:00 +00:00
Martin
2d4c7e38b8 Update Slovenian translation 2024-08-06 11:25:13 +00:00
Martin
6fdfdebd17 Update Slovenian translation 2024-08-06 11:24:09 +00:00
Jehan
cde861a0e6 app, libgimpwidgets: fixing some obsolete unit format strings I missed. 2024-08-06 13:13:24 +02:00
Jehan
68242eb0cc libgimp: properly initialize GIMP_TYPE_UNIT.
Fixes:

> (file-png:318550): LibGimp-CRITICAL **: 12:44:57.852: gimp_gp_param_to_value: type name GimpUnit is not registered
2024-08-06 12:45:19 +02:00
Jehan
2a00a9e60a Issue #434: remove broken plural support for GimpUnit.
Rather than trying to implement full i18n plural support, we just remove
this failed attempt from the past. The fact is that to get proper
support, we'd basically need to reimplement a Gettext-like plural
definition syntax within our API, then ask people to write down this
plural definition for their language, then to write every plural form…
all this for custom units which only them will ever see!

Moreover code investigation shows that the singular form was simply
never used, and the plural form was always used (whatever the actual
unit value displayed).

As for the "identifier", this was a text which was never shown anywhere
(except in the unit editor) and for all built-in units, as well as
default unitrc units, it was equivalent to the English plural value.

So we now just have a unique name which is the "long label" to be used
everywhere in the GUI, and abbreviation will be basically the "short
label". That's it. No useless (or worse, not actually usable because it
was not generic internationalization) values anymore!
2024-08-06 11:39:57 +02:00
Jehan
a9af5509ab app: fix crashes after having closed Colors dockable.
Various signal handlers must be removed when the dockable is closed, by
using g_signal_connect_object() when relevant.
2024-08-06 11:39:57 +02:00
Bruno
64e44ca490 build/windows: Prevent contributors from bundling GIMP wrongly
This makes the bundling script an "extension" of the building script, similar
to what Cmake-based projects does on Windows. By the way, this is inline with
the recent changes which clarified that bundling is just a finalization of the
building process when a bundle is aimed. See: d09a2a6f, 2dc6f411 and 9d86492b
2024-08-05 15:16:47 +00:00
Martin
5f142dec44 Update Slovenian translation 2024-08-05 13:50:49 +00:00
Yuri Chornoivan
f6c02d3309 Update Ukrainian translation 2024-08-05 13:43:57 +00:00
Jehan
f75e0aa321 app: fix random crash when GimpColorHistory is finalized.
I encountered this one when closing GIMP. Issue #9591 seems to be the
same crash, though when just closing the Colors dockable. I fail to
reproduce willingly now, though it looks like the problem could happen
in some cases when the stored GimpContext is freed before
GimpColorHistory is freed.
Let's increment the reference to make sure the referenced object stays
alive as long the history is alive.
2024-08-05 13:20:44 +02:00
Jehan
970fc86548 meson: bump harfbuzz's minimum requirement to version 2.8.2.
Commit 81a68ae758 added usage of hb_blob_create_from_file_or_fail().

Since Debian bookworm has harfbuzz 6.0.0, this is not a big deal, but
the minimum requirement should still be bumped in our build scripts.
2024-08-05 12:36:57 +02:00
Jehan
d11e45967f po: mass fix changed gettext context: s/vectors-action/paths-action/
Normally we should avoid touching the Gettext files, but changing a
message context massively broke many strings in all languages. So I am
just reassigning the correct context (not touching any translations), by
running:

> sed 's/msgctxt "vectors-action"/msgctxt "paths-action"/g' -i po/*
2024-08-05 12:36:57 +02:00
Jehan
cb18908d15 app, menus: rename the files too.
I did it in 2 commits otherwise git has a hard time seeing the move+edit
as a file move and the `git show` on previous commit is much less
useful.
2024-08-05 12:08:59 +02:00
Jehan
d46d26933b app, menus: rename all "vectors-" actions to "paths-".
Though these are not as user-facing as other strings, the action names
still are somewhat user-facing. Let's rename them consistently with the
GUI and the API.

This commit also handles user config migration so that custom shortcuts
are not lost.
2024-08-05 12:08:59 +02:00
Alx Sa
6bbaaeb39e dialogs, gui, widgets: Connect GimpPrefsBox to icon size changes
Inspired by Mark Sweeney's work.
This patch allows the icons in the tree
view in Preferences Dialog to scale based
on user icon scale preferences.
Rather than add a GimpGuiConfig to
GimpPrefsBox, we make a call to style_updated ()
from the Preferences Dialog to signal a
change.
2024-08-04 12:55:58 +00:00
Luming Zh
86cf17e09c Update Chinese (China) translation 2024-08-04 11:28:39 +00:00
Luming Zh
8709628299 Update Chinese (China) translation 2024-08-04 11:18:21 +00:00
Luming Zh
afa3bb5a6a Update Chinese (China) translation 2024-08-04 11:12:42 +00:00
Idriss Fekir
73557d011b text: keep fonts usable if the current one becomes missing
If a font is being used and becomes missing all other fonts become
unusable, setting the fontconfig object to the pango fontmap
fixes this.
2024-08-04 11:02:09 +01:00
Idriss Fekir
fe32265b61 GimpText: Fix saving to xcf with text in an alias font
Alias fonts don't have a generated name, their alias name is used
instead. But the serialization code assumed that all fonts had a
generated name of the format "gimpfont%d" and this was causing a crash.
2024-08-04 11:02:09 +01:00
Idriss Fekir
81a68ae758 GimpFontFactory: More reliable font checking
check for font validity (whether it is usable by pango), using
harfbuzz instead of relying on file extentions.

We do this in the first place because pango when given a font it can't
support will look for the closest matching supported font, but we
iterate through all fonts, so that would create redundancy.
2024-08-04 11:02:09 +01:00
Idriss Fekir
cd26f49b7a GimpFont: Improve font matching with old XCF files
Compare the font file gotten from the PangoFont object
related to the PangoFontDescription rather than just comparing
font names. This Helps because when pango is given an unsupported
font (Type1 or Bitmap fonts) it choses the closest matching ttf/otf
font, but reports the name of the unsupported font.
2024-08-04 11:02:09 +01:00
Bruno
180f6e1aa0 build/windows: Install crossroad deps in gimp job too
I forgot about it in 101bcca329
2024-08-03 20:25:19 -03:00
Bruno
748908aaf0 gitlab-ci, build/windows: Use Universal variables in native gimp-console wrapper 2024-08-03 20:22:42 -03:00
Yuri Chornoivan
6f387d94b3 Update Ukrainian translation 2024-08-03 18:28:53 +00:00
Yuri Chornoivan
3536841667 Update Ukrainian translation 2024-08-03 18:27:24 +00:00
Yuri Chornoivan
d08d095b6f Update Ukrainian translation 2024-08-03 18:26:05 +00:00
Alx Sa
5161c53f3c libgimpwidgets: Make GimpPickButton a derivable type
Per Jehan, we should remove gimppickbutton-default.[ch] and
move the functions into gimppickbutton.c. Then we can
make the GimpPickButtonPrivate API actually private without
any additional public functions.
2024-08-03 18:24:46 +00:00
Alx Sa
0d112b2999 themes: Define background color for GtkToolBar
This widget is used primarily in plug-ins like GFig and IFS Compose
which have toolbar buttons. This patch explicitly defines the style to
prevent system theme leaks and too dark colors on Middle Gray theme.
2024-08-03 12:20:06 +00:00
Jehan
be0a4ab12a Issue #11828: Lock Path stroke not working as expected.
The "selected-layers-changed" signal was emitted while there were still
selected channels (which is an inconsistent state). And since
gimp_image_get_selected_drawables() returns selected channels first when
the image has any, vectors_actions_update() was using the previously
selected channel's lock information for deciding which actions to set
sensitive.
2024-08-03 13:34:17 +02:00
Martin
4bef89d0e5 Update Slovenian translation 2024-08-03 10:49:07 +00:00
Jehan
9f5db5c153 Issue #11828: reverting a string change in commit f036812a94.
This had already been handled in commit 8bd3d5e0bb, but somehow the old
name slipped back in commit f036812a94.
2024-08-03 12:45:50 +02:00
Martin
bd7bda57b1 Update Slovenian translation 2024-08-03 10:21:03 +00:00
Martin
805c6a3e8a Update Slovenian translation 2024-08-03 10:19:45 +00:00
Martin
76b264a607 Update Slovenian translation 2024-08-03 10:15:09 +00:00
Alx Sa
f759b17e45 libgimpwidgets: Reverting GimpPickButton for 80f09fac
Temporarily reverting as the private struct
is shared between various OS versions of
the object and needs to be accessible.
A different approach will be needed to resolve,
and until then, I'd like the Debian pipeline to
work properly.
2024-08-03 08:08:31 +00:00
Alx Sa
80f09fac59 libgimpwidgets: Finish converting classes to derivable type 2024-08-03 06:39:55 +00:00
Ekaterine Papava
c1a40a18d3 Update Georgian translation 2024-08-03 04:39:19 +00:00
Ekaterine Papava
aa269997d2 Update Georgian translation 2024-08-03 04:37:35 +00:00
Alx Sa
175b50ead5 libgimpthumb, app: Make gimpthumbnail attributes private
Move all public attributes of GimpThumbnail
from the header to a private struct in
GimpThumbnail.c. Also replace direct
access of these attributes in app/core and
app/widget with get/set calls.
2024-08-03 04:25:33 +00:00
Alx Sa
438bc4f229 libgimp, libgimpmodule, libgimpwidgets: Port more widgets to derivable type 2024-08-03 02:48:07 +00:00
Jehan
8d598ec3a3 NEWS: update. 2024-08-03 02:23:31 +02:00
Andre Klapper
be944b20c5 Rename "Intelligent Scissors" menu item to "Scissors Select"
Be consistent with tool dialog and tooltip.

Fixes #10793
2024-08-03 00:02:49 +00:00
Jehan
bc73232cd9 app, libgimpwidgets: fix CRITICAL on NULL GimpUnit.
I missed this one because it was using 0 instead of the GIMP_UNIT_PIXEL
macro. This was triggering CRITICALs when using the text tool.
2024-08-03 01:50:27 +02:00
Jehan
07196f371b Issue #11865: properly pass ui_meta() from GeglParamColor to GimpParamColor. 2024-08-03 01:50:27 +02:00
Anders Jonsson
9219c1eaba libgimp, plug-ins: update POTFILES.in 2024-08-02 23:02:36 +00:00
Jacob Boerema
0610f60014 libgimp: fix #11421 Some legacy filters have lost their Help button
Legacy plug-ins like Checkerboard (legacy) under Render Patterns lost
their Help button, although using F1 was still working.

Due to changes in how procedures are called, `gimp_dialog_constructed`
was called before the help-id was set.
The simplest way to fix this, is to call
 `G_OBJECT_CLASS (parent_class)->constructed (object);`
at a later time in `gimp_procedure_dialog_constructed` after we have
set the help-id there.
2024-08-02 20:50:29 +00:00
Jehan
f8fa0d056d libgimp: fix annotation. 2024-08-02 20:33:46 +02:00
Jehan
ea7e1bcc85 libgimpconfig: fixing resetting GeglColor and GimpUnit properties to default values.
After fixing GeglColor arguments in filters, I realized that these
parameters cannot even be resetted (button "Reset" of GEGL filters).
2024-08-02 19:25:33 +02:00
Jehan
318342039d Issue #11422: gimp_prop_widget_new_from_pspec: not supported: GeglParamColor
In all core code, transform GeglParamColor to GimpParamColor with alpha.
2024-08-02 18:44:00 +02:00
Alx Sa
048b2c437d libgimp, libgimpcolor, libgimpconfig: Convert to derivable types
Also converted GimpPreview and
GimpScrolledPreview as they are the
parents of several of these widgets.
2024-08-02 14:02:30 +00:00
Jehan
eb1e21f9f7 libgimpbase: some code cleanup I missed. 2024-08-02 15:47:08 +02:00
Jehan
6f4f1e8ccd libgimpbase: remove Returns annotation on function without return value!
Fixes:

> libgimpbase/gimpchoice.c:366: Warning: Gimp: gimp_choice_set_sensitive: invalid return annotation

Introspection step is now fully without any warning! \o/
2024-08-02 14:23:18 +02:00
Jehan
1add3343ad libgimpbase: removing wrong annotations.
I thought that such annotations would work and be useful to tell GIR that
a type is nothing more than a NULL-terminated array of a specific type.
But apparently GIR doesn't like these annotations and complain. So let's
just clean these out.

Fixes:

> ./../../../../../../dev/src/gimp/libgimpbase/gimpparamspecs.h:254: Warning: Gimp: unexpected annotation: array
> ../../../../../../../dev/src/gimp/libgimpbase/gimpparamspecs.h:254: Warning: Gimp: unexpected annotation: element-type
2024-08-02 14:18:44 +02:00
Jehan
624e3772e9 libgimp: new unit tests around GimpImage and item API.
Right now, it only tests a few API, such as creating an image, then a
text layer, then inserting it in the image.

This is a test to avoid regression bug after having fixed #9923 in a
previous commit.
2024-08-02 14:12:10 +02:00
Jehan
c1fec7809b meson: built-time run of GIMP should set GIMP3_SYSCONFDIR environment variable.
Without this, build-time GIMP cannot find the etc/ files unless GIMP is
installed. This becomes even more annoying now as I want to run tests
(for GimpUnit) depending on etc/unitrc contents.

This will also ensure that tests run properly in environments where the
etc/unitrc may have been modified.
2024-08-02 12:46:31 +02:00
Jehan
a92e694a19 libgimp: new unit tests for GimpUnit. 2024-08-02 12:14:54 +02:00
Jehan
d493f0537f Issue #8900 and #9923: reimplementing GimpUnit as a proper class.
This fixes all our GObject Introspection issues with GimpUnit which was
both an enum and an int-derived type of user-defined units *completing*
the enum values. GIR clearly didn't like this!

Now GimpUnit is a proper class and units are unique objects, allowing to
compare them with an identity test (i.e. `unit == gimp_unit_pixel ()`
tells us if unit is the pixel unit or not), which makes it easy to use,
just like with int, yet adding also methods, making for nicer
introspected API.

As an aside, this also fixes #10738, by having all the built-in units
retrievable even if libgimpbase had not been properly initialized with
gimp_base_init().
I haven't checked in details how GIR works to introspect, but it looks
like it loads the library to inspect and runs functions, hence
triggering some CRITICALS because virtual methods (supposed to be
initialized with gimp_base_init() run by libgimp) are not set. This new
code won't trigger any critical because the vtable method are now not
necessary, at least for all built-in units.

Note that GimpUnit is still in libgimpbase. It could have been moved to
libgimp in order to avoid any virtual method table (since we need to
keep core and libgimp side's units in sync, PDB is required), but too
many libgimpwidgets widgets were already using GimpUnit. And technically
most of GimpUnit logic doesn't require PDB (only the creation/sync
part). This is one of the reasons why user-created GimpUnit list is
handled and stored differently from other types of objects.

Globally this simplifies the code a lot too and we don't need separate
implementations of various utils for core and libgimp, which means less
prone to errors.
2024-08-02 10:46:38 +02:00
Alx Sa
f9df980585 plug-ins: Convert custom ImageMap icons to vectors
Adds SVG versions of ImageMap custom
icons and conditionally uses them if
have_vector_icons is enabled. If not, we
fall back to the original PNG icons.
Since ImageMap mixes custom and
stock icons, this keeps the icon size
consistent across the UI.

Per Denis Rangelov, tooltips for the
coordinates and area displays as well
as the shortcut menu were added.

Also, removes a reference to IMAP_ARROW
which no longer applies since that icon
was removed in favor of using the stock
cursor icon.
2024-08-02 00:01:55 +00:00
Bruno
75446c4316 gitlab-ci: Clarify a bit better Debian 'build' deps
Clang and others are not GIMP deps 'per se'. GCC also exists.
2024-08-01 19:12:05 -03:00
Bruno
101bcca329 gitlab-ci, build/windows: Separate (again) Debian and Crossroad deps
Despite the good intentions, 4f965557 makes Debian contributors who
follows gimp-web-devel instructions to download more deps than needed
and makes unclear what are the crossroad deps. Let's fix it.
2024-08-01 18:18:34 -03:00
Alx Sa
afce1c1f02 libgimpwidgets: Convert more gimpwidgets to derivable type
Continuation of work from 74e7e16e
2024-08-01 03:55:31 +00:00
Alx Sa
9b6e6effeb libgimpwidgets: Make GimpButton a derivable type 2024-07-30 19:04:53 +00:00
Bruno
f73bf7fb07 build/windows: Make sources downloading more neutral
This makes crossroad and msys2 scripts clone without the "_" prefix, which
will improve quality of life of most contributors that just clone them.

Just for consistency, also remove the "_" prefix from other pices of code.
2024-07-30 13:05:09 -03:00
Alx Sa
47c7bfba29 libgimp: Make GimpProgressBar a final type 2024-07-30 13:52:26 +00:00
Yuri Chornoivan
f543b2c799 Update Ukrainian translation 2024-07-30 11:58:04 +00:00
Bruno
bd28861785 build/windows: Refactor MSIX .ps1 a bit to not impose strict SDK or .msixbundle
The original script required a specific WinSDK version. Now, it autodetects.
This is useful if we need to move to another runner and welcome locally too.

Also, downloading the arm64 artifact was mandatory to get a x64 msix, which
is silly. Now, packagers are free to package to either arm64 or x64 alone.
This is useful locally but could be useful on CI too when some arch fail(?).
2024-07-29 18:45:01 -03:00
Alx Sa
60897f1700 plug-ins: Unreference image used in PSD metadata loading
Resolves #11313.
We reference JPEG and TIFF images when
we send them from their loading plug-ins
to the PSD plug-in for PSD formatted
metadata. We should remove this extra
reference when returning the image back
to its original loading plug-in.
2024-07-29 16:10:17 +00:00
Luming Zh
3b4b5e2479 Update Chinese (China) translation 2024-07-29 12:16:19 +00:00
Ekaterine Papava
c7e92ae43d Update Georgian translation 2024-07-29 04:31:54 +00:00
Alx Sa
74e7e16ec3 libgimpwidgets: Convert widgets to final/derived type
This patch converts libgimpwidgets with
no signals to be final or derived types.
The remaining widgets will be converted
in a subsequent patch.
2024-07-29 01:51:38 +00:00
Alx Sa
70ae12eb16 widgets, gui: Connect GimpToolBox to icon size changes
Inspired by Mark Sweeney's work.
This patch allows the active image, brush,
pattern, and gradient areas in the toolbox
to scale based on user icon scale
preferences.
Note that if the pattern itself is smaller
than the icon size, it currently won't scale
larger. This is a separate issue in the
renderer.
2024-07-28 13:25:51 +00:00
Martin
c1ec6a5c0b Update Slovenian translation 2024-07-28 13:11:09 +00:00
Anders Jonsson
f9711673b8 plug-ins: remove parenthesis in string 2024-07-28 12:16:32 +00:00
Bruno
87aabad121 build/linux: Clarify some flatpak scripts comments 2024-07-28 11:02:17 +00:00
Alx Sa
d73c71e861 libgimpcolor: Make GimpColorProfile a final type 2024-07-28 05:28:31 +00:00
Bruno
641f58b801 build/linux: Sync with beta manifest regarding mess
Ported from: b67fdab3bc
2024-07-27 21:43:13 -03:00
Yuri Chornoivan
e4643ba55c Update Ukrainian translation 2024-07-27 13:12:08 +00:00
Martin
79ffa712f5 Update Slovenian translation 2024-07-27 09:04:25 +00:00
Luming Zh
841e7ff7f3 Update Chinese (China) translation 2024-07-27 00:36:32 +00:00
Alx Sa
6effe7d38c plug-ins: Port int_combo properties to GimpChoice
web-page.c was left as additional font
sizes besides the GUI choices could be set
via a PDB call. The export plug-ins int
combos will be updated in a separate
merge request.
Additionally, the region choice in screenshot.c
was hidden on Windows since it does not
yet implement that option.
2024-07-26 18:56:53 +00:00
Alx Sa
acefb593c1 libgimpwidgets: Make GimpRuler a final type 2024-07-26 16:51:51 +00:00
Martin
08f6184e14 Update Slovenian translation 2024-07-26 16:26:43 +00:00
Alx Sa
b7532766ad plug-ins: Allow Zoom Out in ImageMap
This patch converts the image map
plug-in to use a floating point ratio rather
than an integer zoom factor. This allows
us to zoom out past the 1:1 ratio.
Additionally, it fixes the statusbar display
so that it shows 2:1 for zoomed in rather
than 1:2.
2024-07-26 13:33:51 +00:00
Luming Zh
c700e7d48f Update Chinese (China) translation 2024-07-26 12:58:51 +00:00
Bruno
12c2680c4f build/linux: Move 'suitesparse' to GEGL module
'suitesparse' is NOT a direct GIMP dependency!
2024-07-24 21:37:58 +00:00
Jehan
accc9011ed NEWS: update. 2024-07-24 19:14:50 +02:00
Bruno
c100b01031 build: Add support to running build scripts in their respective dirs
It's perfectly reasonable that someone can misunderstand the scripts info in
gimp-web-devel and try to run them not from git root but from their dirs. So,
let's add that possibility as a fallback (a pretty natural one by the way).

Also, change the error message to direct contributors to gimp-web-devel.
2024-07-24 15:37:10 +00:00
Jehan
cc17e3456c libgimpbase: make GimpMetadata a finale type. 2024-07-24 16:20:34 +02:00
Alx Sa
45f390ffc4 display, gui: Connect GimpDisplayShell to icon size changes
Inspired by Mark Sweeney's work.
This patch allows the four buttons on the
sides of the canvas (Zoom, Quick Mask,
Image Menu, and Navigation Image)
to resize based on the user's icon size
preferences.
2024-07-23 22:01:55 +00:00
Andrzej Hunt
fe26086e16 xcf: don't use potentially dangling pointer in xcf_load_layer_mask
layer_mask points to the original mask created by xcf_load_layer_mask. We copy
this pointer into channel, and xcf_load_channel_props can overwrite this
pointer and free the original mask. If this happens, layer_mask points to
the now-freed original mask, and should not be used.

Therefore we need to change later parts of xcf_load_layer_mask to use channel
instead of layer_mask. Additionally, we add a block and move layer_mask into
this block to guarantee that layer_mask cannot be used after it has
potentially been freed.

Adjustments by Jacob Boerema:
Follow GIMP's code style regarding variables, comment style and
position of braces

See also ASAN output below:

==5247==ERROR: AddressSanitizer: heap-use-after-free on address 0x615000010fd0 at pc 0x7f4e2dbbf31b bp 0x7ffca8a95cd0 sp 0x7ffca8a95cc8
READ of size 8 at 0x615000010fd0 thread T0
    #0 0x7f4e2dbbf31a in g_type_check_instance_cast /home/ahunt/git/glib/_build/../gobject/gtype.c:4117:26
    #1 0xb200fe in xcf_load_layer_mask /home/ahunt/git/gimp/app/xcf/xcf-load.c:2305:52
    #2 0xb18eea in xcf_load_layer /home/ahunt/git/gimp/app/xcf/xcf-load.c:2133:20
    #3 0xb13d91 in xcf_load_image /home/ahunt/git/gimp/app/xcf/xcf-load.c:499:15
    #4 0xb11deb in xcf_load_stream /home/ahunt/git/gimp/app/xcf/xcf.c:305:19
    #5 0x619dfd in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/app/fuzzers/xcf_fuzzer.c:50:17
    #6 0x51d364 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #7 0x506fe2 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:323:6
    #8 0x50d350 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:856:9
    #9 0x5373a2 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #10 0x7f4e2c84c349 in __libc_start_main (/lib64/libc.so.6+0x24349)
    #11 0x4e0779 in _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:120

0x615000010fd0 is located 336 bytes inside of 504-byte region [0x615000010e80,0x615000011078)
freed by thread T0 here:
    #0 0x5e8562 in free /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:127:3
    #1 0x7f4e2d76ce08 in g_free /home/ahunt/git/glib/_build/../glib/gmem.c:199:3
    #2 0x7f4e2d797a6b in g_slice_free1 /home/ahunt/git/glib/_build/../glib/gslice.c:1183:7
    #3 0x7f4e2dbb7b04 in g_type_free_instance /home/ahunt/git/glib/_build/../gobject/gtype.c:2008:5
    #4 0x7f4e2db8fe3a in g_object_unref /home/ahunt/git/glib/_build/../gobject/gobject.c:3604:11
    #5 0xb22fff in xcf_load_channel_props /home/ahunt/git/gimp/app/xcf/xcf-load.c:1738:13
    #6 0xb20037 in xcf_load_layer_mask /home/ahunt/git/gimp/app/xcf/xcf-load.c:2292:9
    #7 0xb18eea in xcf_load_layer /home/ahunt/git/gimp/app/xcf/xcf-load.c:2133:20
    #8 0xb13d91 in xcf_load_image /home/ahunt/git/gimp/app/xcf/xcf-load.c:499:15
    #9 0xb11deb in xcf_load_stream /home/ahunt/git/gimp/app/xcf/xcf.c:305:19
    #10 0x619dfd in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/app/fuzzers/xcf_fuzzer.c:50:17
    #11 0x51d364 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #12 0x506fe2 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:323:6
    #13 0x50d350 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:856:9
    #14 0x5373a2 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #15 0x7f4e2c84c349 in __libc_start_main (/lib64/libc.so.6+0x24349)

previously allocated by thread T0 here:
    #0 0x5e87cd in malloc /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x7f4e2d76ccf2 in g_malloc /home/ahunt/git/glib/_build/../glib/gmem.c:106:13
    #2 0x7f4e2d7972e0 in g_slice_alloc /home/ahunt/git/glib/_build/../glib/gslice.c:1072:11
    #3 0x7f4e2d7978ae in g_slice_alloc0 /home/ahunt/git/glib/_build/../glib/gslice.c:1098:18
    #4 0x7f4e2dbb6e0a in g_type_create_instance /home/ahunt/git/glib/_build/../gobject/gtype.c:1911:17
    #5 0x7f4e2db9215e in g_object_new_internal /home/ahunt/git/glib/_build/../gobject/gobject.c:1945:24
    #6 0x7f4e2db91d1f in g_object_new_valist /home/ahunt/git/glib/_build/../gobject/gobject.c:2288:16
    #7 0x7f4e2db90e8b in g_object_new /home/ahunt/git/glib/_build/../gobject/gobject.c:1788:12
    #8 0xdb69e0 in gimp_item_new /home/ahunt/git/gimp/app/core/gimpitem.c:723:10
    #9 0xce11c8 in gimp_drawable_new /home/ahunt/git/gimp/app/core/gimpdrawable.c:1067:14
    #10 0xddf5d8 in gimp_layer_mask_new /home/ahunt/git/gimp/app/core/gimplayermask.c:254:5
    #11 0xb1ffc5 in xcf_load_layer_mask /home/ahunt/git/gimp/app/xcf/xcf-load.c:2279:31
    #12 0xb18eea in xcf_load_layer /home/ahunt/git/gimp/app/xcf/xcf-load.c:2133:20
    #13 0xb13d91 in xcf_load_image /home/ahunt/git/gimp/app/xcf/xcf-load.c:499:15
    #14 0xb11deb in xcf_load_stream /home/ahunt/git/gimp/app/xcf/xcf.c:305:19
    #15 0x619dfd in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/app/fuzzers/xcf_fuzzer.c:50:17
    #16 0x51d364 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #17 0x506fe2 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:323:6
    #18 0x50d350 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:856:9
    #19 0x5373a2 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #20 0x7f4e2c84c349 in __libc_start_main (/lib64/libc.so.6+0x24349)

SUMMARY: AddressSanitizer: heap-use-after-free /home/ahunt/git/glib/_build/../gobject/gtype.c:4117:26 in g_type_check_instance_cast
Shadow bytes around the buggy address:
  0x0c2a7fffa1a0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2a7fffa1b0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2a7fffa1c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c2a7fffa1d0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2a7fffa1e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x0c2a7fffa1f0: fd fd fd fd fd fd fd fd fd fd[fd]fd fd fd fd fd
  0x0c2a7fffa200: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
  0x0c2a7fffa210: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c2a7fffa220: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2a7fffa230: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2a7fffa240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==5247==ABORTING
./crash-0507799c3e4291570e060f53332b58b8a96f95e5
2024-07-23 13:30:33 -04:00
Kolbjørn Stuestøl
62ab75661b Update Norwegian Nynorsk translation 2024-07-22 19:09:32 +00:00
Alx Sa
42300d9db0 dialogs, libgimpwidgets: Prevent wide dialogs due to image/profile name
Currently if your image history includes an
image with a long name, the Welcome
Dialog will stretch out to match its width.
If the color profile name is long, then the
color scales will also stretch out due to
the profile label.
This patch adds ellipses to the Welcome
Dialog and a scrollwindow to the
ColorScales to prevent this.
2024-07-22 16:32:47 +00:00
Luming Zh
21f74286db Update Chinese (China) translation 2024-07-22 12:34:43 +00:00
Luming Zh
0b6e9ade42 Update Chinese (China) translation 2024-07-22 11:02:57 +00:00
Yuri Chornoivan
04de26d379 Update Ukrainian translation 2024-07-22 05:56:49 +00:00
Martin
5f4c101935 Update Slovenian translation 2024-07-21 20:02:04 +00:00
Bruno
08294f9c34 build/linux: Sync with beta manifest regarding x265
Ported from ca5688bf6d

Just to note, we are already not using Assembly code
in 10bit and 12bit libraries. So, no feature dropped.

---

Also, little fixes to some dev docs regarding Clang.
2024-07-21 19:33:01 +00:00
Alx Sa
36f5956f3b plug-ins: Add warning about multi-layer indexed PSD export
Unlike GIMP, Photoshop does not support indexed images with
multiple layers. We have been silently merging layers down when
exporting to PSD, but this may be confusing to users.
This patch adds a label that notifies the user if they export an
indexed image with more than one layer.
2024-07-21 18:36:24 +00:00
Alx Sa
9d40d79e4a gui, widgets: Scale Swap & Default Color icons...
...based on icon size preferences.
Inspired by Mark Sweeney's work.
Since the icon size is based on a formula,
the CSS value determines the maximum
size rather than being used directly.
2024-07-21 03:05:43 +00:00
bootchk
4a50143ba6 Fix 9066 Encapsulate access to dock_columns of dock_window
Needs backport to 2.10

gimp_dock_windows_constructed creates a GimpDockColumns, a child widget,
and keeps a private reference to it at dock_window->p->dock_columns.
Then it connects the signal dock_columns.doc_removed to two callbacks:
gimp_dock_window_dock_removed() and gimp_dock_window_update_title().
gimp_dock_window_dock_removed() callback is called first and can
destroy the GimpDockWindow widget and its child widget GimpDockColumns.
Then gimp_dock_window_update_title is called
and tries to call dock_window->p->dock_columns.get_docks()
but it is already destroyed.

The fix is to nullify the internal pointer to dock_columns when destroyed,
and encapsulate access to dock_columns.get_docks so that it
returns a valid but empty list when dock_columns has already been destroyed.

Alternatively, you might be able to fix it by rearranging the order
of connections to dock-removed signal, but then the title would be wrong.

Another alternative might be to rethink the whole destruction sequence.
2024-07-20 21:26:59 +00:00
Bruno
a90ee6f196 build: Make infos, warnings and errors outputs consistent
This verbose style is inspired by 2_bundle-gimp-uni_dep.py
2024-07-20 21:09:47 +00:00
Bruno
617a49fa75 build: Slightly improve script comments to match gimp-web-devel
Also, fix an inconsistency in the local compatibility of flatpak deps script.
2024-07-20 21:09:47 +00:00
Bruno
e01973b911 build: Simplify all the arch stuff
The ARTIFACTS_SUFFIX is being dropped on building scripts because:

1) This will make possible to further simplify Installer scripts in other commit

2) There is no script that uses multi-arch _build/_install at same time on CI
   However, there are two use cases: to build Debian and flatpak; and, on Win,
   to build on CLANGARM64 and CLANG64 (?). But probably they are pretty niche.
   I suppose that people who build on Debian (or other dev-oriented distro)
   willn't want to mantain deps in two sys prefixes (pkg and GNOME runtime)
   + two gimp prefixes (out of sandbox and sandbox) due to huge storage use.
   Why someone would want to build with emulation on Win ARM64 I don't know.
   Anyway, people that know how to do this stuff probably can change the .sh.

3) When building locally, the contributor doesn't need to know the arch at all.
   Indeed, without this suffix, the scripts are inline with gimp-web-devel and
   prevent some first-sight confusion when reading them that I've seen on IRC.

4) These arch suffixes can be understood as '_install-*' being distributable
   which is not true. So, without this suffix we could make more clear
   what is a package (when GitLab fix the glob bug in 'expose_as' someday).

---

Despite .gitlab-ci.yml not being a script, it needed to be touched too
because cross scripts depends on Debian jobs due to gimp-data MR.
2024-07-20 21:09:47 +00:00
Bruno
25734cb579 build/linux: Make 'flatpak update' more consistent with other scripts
Like updating MSYS2, let's update GNOME runtime only in deps script.
2024-07-20 21:09:47 +00:00
Bruno
d5da1568f4 build/windows: Don't try to install deps again when local 2024-07-20 21:09:47 +00:00
Mark Sweeney
fa70b794e2 plug-ins: script-fu-paste-as-new-pattern, adjusted call to (file-pat-export) 2024-07-20 19:02:27 +00:00
Alx Sa
44a87140d5 scripts: Remove drawables argument from export calls
These PDB scripts were missed in 443947c6,
as noticed by Anders Jonsson.
A separate commit should fix the
call in paste-as-pattern.scm.
2024-07-20 18:35:41 +00:00
Andrzej Hunt
7d949423ed xcf-load: avoid use-after-free for layers with multiple PROP_ACTIVE_LAYER
If a given layer's properties contain multiple PROP_ACTIVE_LAYER entries, we
could add multiple entries for the same layer in info->selected_layers.

However, xcf_load_layer_props and xcf_load_layer both contain logic that
overwrites the layer pointer - they do take care of updating
info->selected_layers and and info->floating_sel (both of which could contain
or point to the current layer). Crucially, they both assume that
info->selected_layers can only contain this layer once - hence they only
remove it from the list once. This logic also frees the old layer because it
thinks that it's no longer in use.

But if we've added the original layer to selected_layers multiple times,
and then use the logic that overwrites layer, selected_layers will still
contain an invalid pointer to the now-freed original layer. Any later
code that tries to read info->selected_layers will hit a user-after-free.

Therefore we need to check if the current layer is already in the
selected_layers list, and avoid adding it again if it's already there.
(It also seems illogical to say that a layer is selected twice, but I'm
 focusing on the code-correctness aspect in my analysis.)

Adjustment by Jacob Boerema: the correct way to test that a value does
not exist in a list is to check for the value being negative. Also add
a message to warn users.

ASAN output:

==21241==ERROR: AddressSanitizer: heap-use-after-free on address 0x615000012150 at pc 0x000000d54dbf bp 0x7ffcf813bb60 sp 0x7ffcf813bb58
READ of size 8 at 0x615000012150 thread T0
    #0 0xd54dbe in gimp_image_set_selected_layers /home/ahunt/git/gimp/app/core/gimpimage.c:4743:7
    #1 0xb146c6 in xcf_load_image /home/ahunt/git/gimp/app/xcf/xcf-load.c:690:7
    #2 0xb1199b in xcf_load_stream /home/ahunt/git/gimp/app/xcf/xcf.c:305:19
    #3 0x619cad in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/app/fuzzers/xcf_fuzzer.c:35:17
    #4 0x51d2e4 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #5 0x506f62 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:323:6
    #6 0x50d2d0 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:856:9
    #7 0x537322 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #8 0x7f064a594349 in __libc_start_main (/lib64/libc.so.6+0x24349)
    #9 0x4e06f9 in _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:120

0x615000012150 is located 336 bytes inside of 504-byte region [0x615000012000,0x6150000121f8)
freed by thread T0 here:
    #0 0x5e84e2 in free /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:127:3
    #1 0x7f064b3f81c8 in g_free (/usr/lib64/libglib-2.0.so.0+0x581c8)
    #2 0x7f064b41133f in g_slice_free1 (/usr/lib64/libglib-2.0.so.0+0x7133f)
    #3 0x7f064b7015c0 in g_type_free_instance /usr/src/debug/glib2-2.62.6-lp152.2.3.1.x86_64/build/../gobject/gtype.c:1946
    #4 0xb187d8 in xcf_load_layer /home/ahunt/git/gimp/app/xcf/xcf-load.c:2146:3
    #5 0xb13997 in xcf_load_image /home/ahunt/git/gimp/app/xcf/xcf-load.c:504:15
    #6 0xb1199b in xcf_load_stream /home/ahunt/git/gimp/app/xcf/xcf.c:305:19
    #7 0x619cad in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/app/fuzzers/xcf_fuzzer.c:35:17
    #8 0x51d2e4 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #9 0x506f62 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:323:6
    #10 0x50d2d0 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:856:9
    #11 0x537322 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #12 0x7f064a594349 in __libc_start_main (/lib64/libc.so.6+0x24349)
    #13 0x4e06f9 in _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:120

previously allocated by thread T0 here:
    #0 0x5e874d in malloc /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x7f064b3f80c8 in g_malloc (/usr/lib64/libglib-2.0.so.0+0x580c8)
    #2 0x7f064b410da5 in g_slice_alloc (/usr/lib64/libglib-2.0.so.0+0x70da5)
    #3 0x7f064b411258 in g_slice_alloc0 (/usr/lib64/libglib-2.0.so.0+0x71258)
    #4 0x7f064b7011d5 in g_type_create_instance /usr/src/debug/glib2-2.62.6-lp152.2.3.1.x86_64/build/../gobject/gtype.c:1849
    #5 0x7f064b6e164f in g_object_new_internal /usr/src/debug/glib2-2.62.6-lp152.2.3.1.x86_64/build/../gobject/gobject.c:1827
    #6 0x7f064b6e354d in g_object_new_valist /usr/src/debug/glib2-2.62.6-lp152.2.3.1.x86_64/build/../gobject/gobject.c:2152
    #7 0x7f064b6e38c8 in g_object_new /usr/src/debug/glib2-2.62.6-lp152.2.3.1.x86_64/build/../gobject/gobject.c:1670
    #8 0xdb5b90 in gimp_item_new /home/ahunt/git/gimp/app/core/gimpitem.c:723:10
    #9 0xce0358 in gimp_drawable_new /home/ahunt/git/gimp/app/core/gimpdrawable.c:1067:14
    #10 0xddd8db in gimp_layer_new /home/ahunt/git/gimp/app/core/gimplayer-new.c:65:11
    #11 0xb182a6 in xcf_load_layer /home/ahunt/git/gimp/app/xcf/xcf-load.c:2027:11
    #12 0xb13997 in xcf_load_image /home/ahunt/git/gimp/app/xcf/xcf-load.c:504:15
    #13 0xb1199b in xcf_load_stream /home/ahunt/git/gimp/app/xcf/xcf.c:305:19
    #14 0x619cad in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/app/fuzzers/xcf_fuzzer.c:35:17
    #15 0x51d2e4 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #16 0x506f62 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:323:6
    #17 0x50d2d0 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:856:9
    #18 0x537322 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #19 0x7f064a594349 in __libc_start_main (/lib64/libc.so.6+0x24349)
    #20 0x4e06f9 in _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:120

SUMMARY: AddressSanitizer: heap-use-after-free /home/ahunt/git/gimp/app/core/gimpimage.c:4743:7 in gimp_image_set_selected_layers
Shadow bytes around the buggy address:
  0x0c2a7fffa3d0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2a7fffa3e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2a7fffa3f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c2a7fffa400: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2a7fffa410: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x0c2a7fffa420: fd fd fd fd fd fd fd fd fd fd[fd]fd fd fd fd fd
  0x0c2a7fffa430: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
  0x0c2a7fffa440: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c2a7fffa450: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2a7fffa460: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2a7fffa470: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==21241==ABORTING

( crash-f37f84bd7072e65348ca0e2c920d1e08165356fd )
2024-07-20 13:26:31 -04:00
Alx Sa
ff9f71e9a6 widgets: Connect GimpToolPresetEditor to icon size changes
Inspired by Mark Sweeney's work.
GimpToolPresetEditor has an icon next to its title which does
not react to icon size changes.
GimpToolPresetEditor's parent_instance, GimpEditor, already
has a "button-icon-size" CSS style which can be accessed in
its children. This patch adds signals to listen for icon size
changes and update the icon size accordingly.
2024-07-20 01:55:01 +00:00
Alx Sa
e4ae257ae7 dialogs: Retain XCF compression setting after export
Resolves #9105
The XCF compression setting is initially
set to FALSE. It was only updated from the
Save Dialog, so if the user exports then
compression is reset if they save the XCF
again.

This patch adds a condition on export
where we get the image's compression
setting, instead of always defaulting to
FALSE. This allows you to save and export
the same image without having to
re-enable the compression setting each
time.
2024-07-20 00:06:03 +00:00
Jacob Boerema
1f06286717 plug-ins, tga: don't crash when generating a huge amount of messages
A follow-up to the previous commits, that address the tga issues from
issue #11822.

On Windows, when using the error console for messages, a huge amount
of error messages, that can be generated with special fuzzed images,
like crash-f65fd5404bff32c1d9d10ee049d9c98d02bbbdc2.tga from
the above mentioned issue, can cause GIMP to crash.

Although this is most likely caused in the error console or its
dependencies, we should not let it cause problems here until that is
fixed. There is also no real need to generate a huge amount of similar
repeated error messages, so let's limit it to 10 per read line of input.
2024-07-19 14:42:17 -04:00
Andrzej Hunt
2ba35e5b3d tga: don't copy more bytes than necessary
We are trying to copy all bytes in the current row, which is the width times
the number of bytes per pixel (stored in info->bytes), not width times bits
per pixel.

Copying too much data allows certain inputs to induce a heap-buffer-buffer
overflow read, and probably also a write, see ASAN output below:

ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61d000008088 at pc 0x00000052be17 bp 0x7ffd8bbe8e20 sp 0x7ffd8bbe85e8
READ of size 16448 at 0x61d000008088 thread T0
    #0 0x52be16 in __asan_memcpy /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3
    #1 0x5641ca in read_line /home/ahunt/git/gimp/plug-ins/common/file-tga.c:982:7
    #2 0x560218 in ReadImage /home/ahunt/git/gimp/plug-ins/common/file-tga.c:1147:15
    #3 0x55f526 in load_image /home/ahunt/git/gimp/plug-ins/common/file-tga.c:646:11
    #4 0x56519b in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/plug-ins/common/file-tga_fuzzer.c:69:17
    #5 0x461624 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #6 0x460b2a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:505:3
    #7 0x462ec4 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:814:7
    #8 0x4630d9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:845:3
    #9 0x451686 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:906:6
    #10 0x47b662 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #11 0x7fdbd277c349 in __libc_start_main (/lib64/libc.so.6+0x24349)
    #12 0x424a39 in _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:120

0x61d000008088 is located 0 bytes to the right of 2056-byte region [0x61d000007880,0x61d000008088)
allocated by thread T0 here:
    #0 0x52ca8d in malloc /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x7fdbd37fccf2 in g_malloc /home/ahunt/git/glib/_build/../glib/gmem.c:106:13
    #2 0x56009b in ReadImage /home/ahunt/git/gimp/plug-ins/common/file-tga.c:1134:10
    #3 0x55f526 in load_image /home/ahunt/git/gimp/plug-ins/common/file-tga.c:646:11
    #4 0x56519b in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/plug-ins/common/file-tga_fuzzer.c:69:17
    #5 0x461624 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #6 0x460b2a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:505:3
    #7 0x462ec4 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:814:7
    #8 0x4630d9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:845:3
    #9 0x451686 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:906:6
    #10 0x47b662 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #11 0x7fdbd277c349 in __libc_start_main (/lib64/libc.so.6+0x24349)

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3 in __asan_memcpy
Shadow bytes around the buggy address:
  0x0c3a7fff8fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c3a7fff8fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c3a7fff8fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c3a7fff8ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c3a7fff9000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c3a7fff9010: 00[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3a7fff9020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3a7fff9030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3a7fff9040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3a7fff9050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3a7fff9060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==26560==ABORTING

crash-4b13aca1db7bb795a815431b86cc20284f3aa6da
2024-07-19 14:04:44 -04:00
Andrzej Hunt
723d383e57 tga: check for valid color ID in apply_colormap
A malformed colourmapped tga file could specify color IDs that are not
contained in the colourmap. Therefore we add some bounds checking to
ensure that we only use entries that actually exist.

We could completely give up on such files, but it's just as easy to fall
back to the first colour in the map in this case. However we can only
fall back to the first colour in the map IF the colourmap contains
at least one entry. Therefore we add an up-front check to verify that
colourmapped images actually do contain at least one entry.

Without this bounds-checking, it's possible to induce a heap-buffer-overflow
read in apply-colormap(), see ASAN output below:

ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61900002257c at pc 0x000000564f99 bp 0x7ffe65fdb040 sp 0x7ffe65fdb038
READ of size 1 at 0x61900002257c thread T0
    #0 0x564f98 in apply_colormap /home/ahunt/git/gimp/plug-ins/common/file-tga.c:901:23
    #1 0x56411a in read_line /home/ahunt/git/gimp/plug-ins/common/file-tga.c:975:7
    #2 0x560648 in ReadImage /home/ahunt/git/gimp/plug-ins/common/file-tga.c:1202:15
    #3 0x55f4ee in load_image /home/ahunt/git/gimp/plug-ins/common/file-tga.c:647:11
    #4 0x5653ab in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/plug-ins/common/file-tga_fuzzer.c:69:17
    #5 0x461624 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #6 0x460b2a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:505:3
    #7 0x462847 in fuzzer::Fuzzer::MutateAndTestOne() /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:745:19
    #8 0x4633d5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:883:5
    #9 0x451686 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:906:6
    #10 0x47b662 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #11 0x7fe76a5dc349 in __libc_start_main (/lib64/libc.so.6+0x24349)
    #12 0x424a39 in _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:120

0x61900002257c is located 0 bytes to the right of 1020-byte region [0x619000022180,0x61900002257c)
allocated by thread T0 here:
    #0 0x52ca8d in malloc /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x7fe76b65ccf2 in g_malloc /home/ahunt/git/glib/_build/../glib/gmem.c:106:13
    #2 0x55fdc6 in ReadImage /home/ahunt/git/gimp/plug-ins/common/file-tga.c:1049:26
    #3 0x55f4ee in load_image /home/ahunt/git/gimp/plug-ins/common/file-tga.c:647:11
    #4 0x5653ab in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/plug-ins/common/file-tga_fuzzer.c:69:17
    #5 0x461624 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #6 0x460b2a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:505:3
    #7 0x462847 in fuzzer::Fuzzer::MutateAndTestOne() /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:745:19
    #8 0x4633d5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:883:5
    #9 0x451686 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:906:6
    #10 0x47b662 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #11 0x7fe76a5dc349 in __libc_start_main (/lib64/libc.so.6+0x24349)

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/ahunt/git/gimp/plug-ins/common/file-tga.c:901:23 in apply_colormap
Shadow bytes around the buggy address:
  0x0c327fffc450: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c327fffc460: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c327fffc470: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c327fffc480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c327fffc490: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c327fffc4a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00[04]
  0x0c327fffc4b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c327fffc4c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c327fffc4d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c327fffc4e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c327fffc4f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==16309==ABORTING

( crash-f70628d4df7a65babc8e57d890425771a1d67e06 )
2024-07-19 14:00:42 -04:00
Andrzej Hunt
49755f085a tga: always convert colour-mapped images to RGBA if image claims to contain alpha
If the colourmap contains more than 256 items AND has alpha, it should always
be promoted to RGBA. Therefore we move the "if (info->alphaBits)" check into
the first if clause, to avoid accidentally demoting to RGB in this scenario.

Other parts of the tga parser assume that the destination array is RGBA
when alphaBits is not zero. For example, upsample() will always write 4 bytes
per pixel when alpha is set - (even if we only allocated 3 because we thought
we should use RGB). Erronously allocating only 3 bytes makes it easy to induce
a heap-buffer-overflow write, see ASAN output below. (apply_colormap makes the
same assumption and would probably do the same thing, but upsample is the
first location that we'd hit this issue.)

ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61700002ae00 at pc 0x000000563d97 bp 0x7ffde8677890 sp 0x7ffde8677888
WRITE of size 1 at 0x61700002ae00 thread T0
    #0 0x563d96 in upsample /home/ahunt/git/gimp/plug-ins/common/file-tga.c:830:15
    #1 0x560b59 in ReadImage /home/ahunt/git/gimp/plug-ins/common/file-tga.c
    #2 0x55f4ee in load_image /home/ahunt/git/gimp/plug-ins/common/file-tga.c:647:11
    #3 0x5652ab in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/plug-ins/common/file-tga_fuzzer.c:69:17
    #4 0x461624 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #5 0x460b2a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:505:3
    #6 0x462847 in fuzzer::Fuzzer::MutateAndTestOne() /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:745:19
    #7 0x4633d5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:883:5
    #8 0x451686 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:906:6
    #9 0x47b662 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #10 0x7fd894a94349 in __libc_start_main (/lib64/libc.so.6+0x24349)
    #11 0x424a39 in _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:120

0x61700002ae00 is located 0 bytes to the right of 768-byte region [0x61700002ab00,0x61700002ae00)
allocated by thread T0 here:
    #0 0x52ca8d in malloc /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x7fd895b14cf2 in g_malloc /home/ahunt/git/glib/_build/../glib/gmem.c:106:13
    #2 0x55fce9 in ReadImage /home/ahunt/git/gimp/plug-ins/common/file-tga.c:1039:26
    #3 0x55f4ee in load_image /home/ahunt/git/gimp/plug-ins/common/file-tga.c:647:11
    #4 0x5652ab in LLVMFuzzerTestOneInput /home/ahunt/git/gimp/plug-ins/common/file-tga_fuzzer.c:69:17
    #5 0x461624 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #6 0x460b2a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:505:3
    #7 0x462847 in fuzzer::Fuzzer::MutateAndTestOne() /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:745:19
    #8 0x4633d5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:883:5
    #9 0x451686 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:906:6
    #10 0x47b662 in main /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #11 0x7fd894a94349 in __libc_start_main (/lib64/libc.so.6+0x24349)

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/ahunt/git/gimp/plug-ins/common/file-tga.c:830:15 in upsample
Shadow bytes around the buggy address:
  0x0c2e7fffd570: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2e7fffd580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2e7fffd590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2e7fffd5a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c2e7fffd5b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c2e7fffd5c0:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c2e7fffd5d0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2e7fffd5e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2e7fffd5f0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2e7fffd600: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2e7fffd610: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==12179==ABORTING

( crash-f65fd5404bff32c1d9d10ee049d9c98d02bbbdc2 )
2024-07-19 13:56:16 -04:00
Alx Sa
d701b70336 pdb, libgimpbase: Rename GIMP_VECTORS_STROKE_TYPE...
...to GIMP_PATH_STROKE_TYPE as part of
the GimpVectors -> GimpPath API
update.
2024-07-19 15:07:43 +00:00
bootchk
3fbfb21cff libgimp: fix #11813 CRITICAL on NULL GimpObjectArray to plugin
We allow passing NULL gvalue for an empty GimpObjectArray, for convenience.
For example to plugin sel2path which doesn't use drawables.
But crossing the wire, create an empty GimpObjectArray
having an arbitrary type for elements.
2024-07-19 07:16:03 +00:00
Alx Sa
85c0d0d600 plug-ins: Port file-icns/file-ico to GimpProcedureDialog
Note that the widgets are still made
with GTK directly. The primary goal of this
initial port is to remove the last usage of
gimp_export_dialog_new (). Future work
will be needed as currently we can not
automatically generate widgets from
array parameters.
2024-07-19 02:29:38 +00:00
Cheesequake
6b611a4802 actions: move top and bottom item check code 2024-07-18 17:57:17 +00:00
Ekaterine Papava
c47b1d67d1 Update Georgian translation 2024-07-18 03:38:36 +00:00
Alx Sa
0a3613e48d actions: Rename return_if_no_vectors_list macro...
...to return_if_no_paths to match the
change to GimpPath as well as the format
of the layers and channels macro.
2024-07-17 23:25:48 +00:00
Luming Zh
a4e8f4e986 Update Chinese (China) translation 2024-07-17 10:11:18 +00:00
Martin
6eb24f5b65 Update Slovenian translation 2024-07-17 07:06:16 +00:00
Yuri Chornoivan
d23ad6c490 Update Ukrainian translation 2024-07-17 06:35:35 +00:00
Jacob Boerema
97df731de1 app: be consistent and use plural for multi-select path actions 2024-07-16 17:21:55 -04:00
Martin
5c4a8f08c4 Update Slovenian translation 2024-07-16 21:01:36 +00:00
Martin
33ffd7fa7f Update Slovenian translation 2024-07-16 20:59:16 +00:00
Rodrigo Lledó
ea110b1a8c Update Spanish translation 2024-07-16 19:39:43 +00:00
Alx Sa
f036812a94 libgimpwidgets, widgets: Fix icons on Path locks
The visibility lock icon and help ID was accidentally
left off the PathsTreeView set-up.
The Path Attributes also used the wrong icon to indicate
the paths were locked (compared to the one shown in the
Path Attributes dialogue).
2024-07-16 17:50:41 +00:00
Rodrigo Lledó
443f27b6ed Update Spanish translation 2024-07-16 17:46:53 +00:00
Rodrigo Lledó
d7d88aa2e5 Update Spanish translation 2024-07-16 17:07:47 +00:00
Cheesequake
afea82ed6c Issue #11809: Fix raise and lower actions for channels and paths 2024-07-16 15:21:44 +00:00
Luming Zh
711027a5ca Update Chinese (China) translation 2024-07-16 11:03:27 +00:00
bootchk
f4f71e4296 PDB: fix #11815 CRITCALS from defaulted args for gegl wrapper procs
Revise the tests that can't default the args.

Actual args default to the min value formal declared in the PDB.
The declared min value must correspond with declaration in GEGL.
2024-07-16 10:25:41 +00:00
Yuri Chornoivan
0dd05e6467 Update Ukrainian translation 2024-07-16 05:53:25 +00:00
Ekaterine Papava
3698a42ca2 Update Georgian translation 2024-07-16 03:52:25 +00:00
Alx Sa
ba635d83a7 pdb: Remove item_is_attached restriction from NDE filters
As of fcdddad2, the requirement for layers
to be attached before NDE filters can be
applied has been removed on app/core. 
This patch removes the restriction from 
the PDB call for filters as well.
2024-07-15 21:12:17 +00:00
bootchk
de9b1b5b10 ScriptFu: Testing: add test of PDB procedures wrapping GEGL filters 2024-07-15 16:16:02 -04:00
Alx Sa
bfd374ed1a plug-ins: Additional radio frame changes from d7a3a161
* file-sunras, sparkle, and fractal-explorer
were converted to use GimpChoice with
the RadioFrame setting
* Unnecessary store variables were
removed from hot and file-psp
2024-07-15 18:12:30 +00:00
Michael Schumacher
febb2126c9 gitlab-ci: allow gimp-win-x64-cross to fail until we have a fix for #11756 2024-07-15 17:58:39 +02:00
Bruno
48fc6b40b9 build/linux: Sync with beta manifest regarding appstream and xmu 2024-07-15 13:38:33 +00:00
Alx Sa
d8b984a4eb pdb: Add check for indexed image to gimp_image_get_colormap ()
The description promises that we return
NULL if the image is not in indexed mode,
but we didn't actually verify that it was
before continuing with the colormap
code. This patch adds that verification step.
2024-07-15 12:31:58 +00:00
bootchk
4ad5760aa9 Fix unreported Clang compile error from 899b4536
An obvious typo that is not caught by CI until the weekly clang build?
2024-07-15 12:28:15 +00:00
Rodrigo Lledó
1bdc3187aa Update Spanish translation 2024-07-15 11:54:14 +00:00
Alx Sa
d8892cde4f libgimpconfig: Let GimpGroupLayer params be copied
Resolves #11805
This patch adds GimpGroupLayer as a valid param to be copied.
This allows functions like gimp-group-layer-merge to work.
2024-07-15 11:20:11 +00:00
Yuri Chornoivan
546835fc65 Update Ukrainian translation 2024-07-15 06:07:49 +00:00
Yuri Chornoivan
1386760aca Update Ukrainian translation 2024-07-15 06:02:13 +00:00
Ekaterine Papava
f7c16a3897 Update Georgian translation 2024-07-15 03:47:16 +00:00
Ekaterine Papava
01d959814c Update Georgian translation 2024-07-15 03:42:38 +00:00
Alx Sa
899b45366e libgimp, plug-ins: Run gimp_export_image ()...
...in non-interactive cases.
gimp_export_image () handles various
tasks like rasterizing NDE filters. It only
runs in interactive cases however, so if the
users calls gimp-file-save the filters are
not exported.
Since Jehan removed the hidden dialogue
in 0dc9ff7c, we can now safely call
gimp_export_image () in all cases to make
image export more consistent. This step is
also preparation for setting up the new
API with GimpExportOptions.
2024-07-14 20:12:57 +00:00
Alexander Shopov
3cab898d61 Update Bulgarian translation 2024-07-14 19:44:33 +00:00
Alexander Shopov
e97c80c0f2 Update Bulgarian translation 2024-07-14 19:37:34 +00:00
Cheesequake
bdab00d04b Issue #11732: Fix Raise and Lower actions for Multi-Layer selections 2024-07-14 19:21:53 +00:00
Bruno
f1a69c3eae build/linux: Sync with beta manifest regarding debloating
The effect, however, will be subtle, since Flatpak 'cleanup' is broken:
https://github.com/flatpak/flatpak-builder/issues/14
2024-07-14 17:31:12 +00:00
Kolbjørn Stuestøl
d21436236c Update Norwegian Nynorsk translation 2024-07-14 16:08:37 +00:00
Kolbjørn Stuestøl
9bea933bca Update Norwegian Nynorsk translation 2024-07-14 15:55:08 +00:00
Kolbjørn Stuestøl
f0d027284c Update Norwegian Nynorsk translation 2024-07-14 15:33:12 +00:00
Kolbjørn Stuestøl
0ee3ac6cb0 Update Norwegian Nynorsk translation 2024-07-14 15:31:55 +00:00
bootchk
f8450c7ae3 fix #10590 libgimp: resource choosers using freed proxy
GimpPlugin improperly destroys proxies after each run of a temporary procedure.
A temporary procedure may pass reference to proxy to main procedure.
Proxies should live as long as the main procedure of a plugin,
or for an extension plugin, until only the extension main procedure
is on the procedure stack.  More discussion in the issue.

Extract method gimp_plug_in_proc_run.
Call it from two new methods: main_proc_run and temp_proc_run,
which do more e.g. cleanup.

Extract methods for cleanup, main_proc_cleanup and temp_proc_cleanup

Add method is_proc_stack_empty
2024-07-14 09:15:58 -04:00
Luming Zh
c5e7e56ed3 Update Chinese (China) translation 2024-07-14 11:03:43 +00:00
Luming Zh
0f67f4199e Update Chinese (China) translation 2024-07-14 10:48:38 +00:00
Martin
a43bc8c65c Update Slovenian translation 2024-07-14 09:34:20 +00:00
Martin
f5a870916e Update Slovenian translation 2024-07-14 09:16:31 +00:00
Alx Sa
d7a3a161e0 plug-ins: Use GimpProcedureDialog's Radio widget...
...from GimpChoice.
0b2d8fed let us display GimpChoice
options as IntRadioFrames. Therefore, we
can convert a number of plug-in parameters
that were being built manually to use
GimpChoice instead. This decreases the
amount of GUI code and makes the
non-interactive inputs more descriptive.
2024-07-14 04:12:26 +00:00
Alx Sa
f2699aaeeb app: Specify Levels meaning for translation
Some languages like Chinese use separate
words for Levels when referring to a color
scale versus a unit of measure. Currently
we group all of them together.
This patch distinguishes between Levels
as Color Scales versus "measurements" for
translation purposes.
2024-07-14 01:31:24 +00:00
Anders Jonsson
221f8ab14d plug-ins: fix pyconsole syntax for Python 3.12
With Python 3.12, every run of the Python console shows
a SyntaxWarning about invalid escape sequence unless the
string is marked as a raw string.
2024-07-13 20:09:25 +00:00
bootchk
2d0e741b1b SF tests: revise for renamed API procedures
vector(s) => path(s)
layer-group => group-layer

Add a few tests.

(script-fu-use-v3) in more tests, code becomes more terse.

Added some aliases in script-fu-compat.c for renamed procedures, for compatibility third party.
2024-07-13 15:00:58 -04:00
Alan Mortensen
61f7812378 Update Danish translation 2024-07-13 13:01:23 +00:00
Luming Zh
7f72eafe4c Update Chinese (China) translation 2024-07-13 12:16:27 +00:00
Jehan
7ff0a35f72 libgimp: GimpPDB and GimpPlugIn use G_DECLARE_(DERIVABLE|FINAL)_TYPE. 2024-07-13 12:24:49 +02:00
Jehan
d08f751626 libgimp, libgimpwidgets: use G_DECLARE_(DERIVABLE|FINAL)_TYPE macros for GimpProcedureDialog…
… and its subclasses, as well as for GimpDialog.
2024-07-13 12:24:49 +02:00
Jehan
9feaf02596 libgimp: use G_DECLARE_(DERIVABLE|FINAL)_TYPE macros for all Gimp*Procedure.
Though I am not fond of these macros for our core code (it makes the
code more cumbersome especially for using private data in derivable
types), this definitely makes sense for public API, since it would allow
easier modifications with less chances of messing API/ABI stability.
2024-07-13 12:24:49 +02:00
Alan Mortensen
eb5a44d8a7 Update Danish translation 2024-07-13 10:01:25 +00:00
Alx Sa
2e6938b3da app: Rename app/core GimpVectors vectors API...
...to path.
Changes the names of
gimp_vectors_* () API to
gimp_path[s]_* (). Renames related files
to [path] instead of [vectors], along with
relevant enums and functions.
2024-07-13 05:07:57 +00:00
Luming Zh
2d8d5e1e81 Update Chinese (China) translation 2024-07-12 08:42:25 +00:00
Alx Sa
e8df68fb65 libgimp, app, pdb: Rename GimpVectors to GimpPath
This commit renames the GimpVectors
object to GimpPath in both app/core and
in libgimp. It also renames the files
to gimppath.[ch] and updates the relevant
build and translation files.
There are still outstanding gimp_vectors_* ()
functions on the app side that need to be renamed
in a subsequent commit.
2024-07-12 06:16:25 +00:00
Martin
813277ebe4 Update Slovenian translation 2024-07-11 22:13:26 +00:00
Jordi Mas
aacd5f379f Update Catalan translation 2024-07-11 21:07:33 +02:00
Yuri Chornoivan
73128f88af Update Ukrainian translation 2024-07-11 18:33:17 +00:00
Rodrigo Lledó
89bafa50a6 Update Spanish translation 2024-07-11 15:37:36 +00:00
Anders Jonsson
bcbbb8b159 po: update POTFILES.in 2024-07-11 16:35:15 +02:00
bootchk
24554d7fe2 app/plugin fix #11407 PLUGIN_DEBUG_WRAP=all
So a tester can valgrind all plugins.
2024-07-11 13:29:57 +00:00
Luming Zh
20de1e0560 Update Chinese (China) translation 2024-07-11 13:08:16 +00:00
Alx Sa
7fe398ca1a display: Fix regression accidentally introduced 2024-07-11 01:38:13 +00:00
Alx Sa
d1af2efa95 vectors: Swap code files also 2024-07-11 01:17:49 +00:00
Alx Sa
5cd7c5c2f8 actions: Swapped text actions 2024-07-11 01:17:49 +00:00
Alx Sa
853f37bed9 app: Rename app/core GimpImage vectors API...
...to paths.
Similar to d0bdbdfd, but covering the
app/core versions of the API instead of
libgimp. Changes the names of
gimp_image_*_vectors () API to
gimp_image_*_path[s] ().
Also renames some related functions such
as gimp_image_pick_path (). The next step
will be to rename the gimp_vectors_* () to
gimp_path_* ().
2024-07-11 01:17:49 +00:00
Alx Sa
c1bd108bba widgets: Connect Configure this tab icon to icon size changes
Inspired by Mark Sweeney's work.
GimpDockbook's dockable tabs update whenever the icon size is
changed. However, the Configure this tab button icon does not,
so it always remains at 12px. This patch adds code to resize it to 75%
of the current tab icon's size, which mirrors the default relationship
of 12px to 16px. This allows the icon to grow when the icon size is
set to Large or Huge.
2024-07-10 10:03:32 +00:00
Bruno
9d86492b14 build: Make scripts numbering and storing consistent
The numbering is now inline with actual the order of jobs on CI
to make easier to understand what the numbers represent.
To understand why bundling is number 2 see: d09a2a6f and 2dc6f411

The storing of Windows scripts was changed to make easier to
call them, to better convey that they work outside CI and
to be consistent with other build/ subdirectories.
2024-07-10 00:04:03 +00:00
bootchk
0dae61772a Fix #11613 crash Wayland flatpak unreffing GBytes window handle
Refactor: extract method gimp_widget_free_native_handle.
This reduces duplication of code and encapsulates Wayland specific code.

Call the new function in more places.
This is expected to fix #11613 but it is hard to be sure
since the exact sequence of events in 11613 was never determined
and only reproduceable in some flatpak builds.

Calling the new function in more places also should eliminate leaks.
But I did not test there was a leak prior to this fix.
2024-07-09 17:48:53 +00:00
bootchk
bdddc94151 libgimpwidgets: fix #11339 chroma slider fail on small increments
In GimpColorSelector setter, don't change the model if perceptually same.
More than just don't emit changed, don't change the model value.

Also, fix leak by freeing old color.
2024-07-09 15:56:07 +00:00
bootchk
5cc187b597 Fix #9851 radio menu groups fail show any active item
End the radio group of a submenu when the submenu ends.
So subsequent radio menu items are in a new radio group.
2024-07-09 15:42:50 +00:00
Lukas Oberhuber
2341259f36 os-support: Remove mention of 2.10 2024-07-09 15:24:54 +00:00
Lukas Oberhuber
15f5adae0b os-support: Update MacOS supported platforms for GIMP 3.0 2024-07-09 14:57:57 +00:00
Bruno
d3ccac8d2f build/windows: Bundle 'share/poppler' again following 25701f6c 2024-07-09 14:36:14 +00:00
Alx Sa
b90b6bce00 pdb, libgimp: Rename libgimp GimpVectors vectors API...
...to paths
Follow-up to d0bdbdfd. Changes all
gimp_vectors_* () PDB to gimp_path_* ()
and renames relevant PDB files from
vectors to path.
The next step will be to rename
GimpVectors in libgimp to GimpPath,
removing the last (public) trace of it.
2024-07-08 23:39:51 +00:00
Jordi Mas
cdde11b19d Update Catalan translation 2024-07-08 17:19:31 +02:00
Alx Sa
00d07e028f libgimp: Fix gimp.def order 2024-07-08 02:22:57 +00:00
Alx Sa
d0bdbdfdf6 pdb, libgimp: Rename libgimp GimpImage vectors API...
...to paths

The first step in converting GimpVectors
to GimpPath. The PDB API for any
gimp_image_*_vectors () is now
gimp_image_*_paths ().
This commit only covers libgimp, and
the app/core versions will be renamed in
a following commit.
2024-07-08 02:09:42 +00:00
Bruno
40ecfd40ad Issue #11455: Split flatpak jobs
- Dependencies not present in GNOME runtime are now built in deps stage
  This makes easier to follow the progress of the overall pipeline and
  to know how much time was spent on each stage
  (like crossbuilds, the artifact size is brutal but only lasts 2 hours)

- babl and GEGL build now have output in GitLab runner, unlike others deps
  This makes clearer to spot if something goes wrong in these crucial deps

- GIMP is still built in its stage but now alone, like Debian and Windows
  This makes possible to retrigger only this job when runner errors occours,
  without needing to start monolithically the deps+gimp build from scratch

Also:

- babl, GEGL and GIMP now have meson-log.txt artifact like other builds

- dist job now have all commands self-contained on its script (needs to
  be merged to be tested according to my tests)
2024-07-07 21:46:52 +00:00
Jehan
dac11f11aa libgimp: add G_GNUC_WARN_UNUSED_RESULT to several functions.
Functions creating a new GeglBuffer should trigger a warning if the
result if unused, because this is potentially a big memory leak.

Similarly objects created by functions creating new layers should be
handled (usually by adding the layer to the image with
gimp_image_insert_layer()), because they also come with a buffer and
possibly quite some important memory leak.
2024-07-07 22:39:13 +02:00
Jehan
ebc4f9afab app, libgimp: initialize GimpGroupLayer.
If the type is not registered, g_type_from_name() is not able to find
the GType from the type name.

Fixes:

> gimp_gp_param_to_value: type name GimpGroupLayer is not registered

Also add a bit more type handling code.
2024-07-07 22:27:22 +02:00
Alx Sa
d10a8c357f plug-ins: Allow Python GUI resources to be empty
Resolves #11772
While ba79fd00 fixed the number of
arguments in the resource arguments,
setting them to False prevented the GUI
from opening if the gradient wasn't set.
This patch switches the value to True to
fix the problem.
2024-07-07 19:19:16 +00:00
Alx Sa
86ef74ae95 plug-ins, tests: Update Python plug-ins after b1736a67
Two instances of Gimp.Layer.group_new ()
were missed during the initial port.
2024-07-07 12:37:33 +00:00
Alx Sa
ba79fd00d3 plug-ins: Update Python plug-ins after 6d36d143
A new parameter was added to indicate if
it was okay to run without setting these
resource values.
2024-07-07 12:05:54 +00:00
Alx Sa
8e6fb3d0e4 pdb: Remove uchar type
Resolves #10855
Replaces the uchar arguments in
plug_in_exchange () with floats to better
match gegl:color-exchange's arguments.
Since this was the last plug-in that used
uchar, we also remove the datatype from
PDB.
2024-07-07 11:14:41 +00:00
Alexander Shopov
d213235d37 Update Bulgarian translation 2024-07-07 09:00:14 +00:00
Alexander Shopov
d69e8abfa6 Update Bulgarian translation 2024-07-07 08:54:55 +00:00
Jehan
fc3cfc7771 app, libgimp: oups, fixing some generated sources.
These were some last minute fixes in the PDB and it looks like I forgot
to amend commit b1736a6736 with these!
2024-07-07 10:43:51 +02:00
Jehan
87d89ba062 libgimp: some object's header cleanup.
Using G_DECLARE_*() macros everywhere, aligning functions, including the
parent class header…
2024-07-07 10:27:04 +02:00
Jehan
b1736a6736 app, libgimp, pdb, plug-ins: new GimpGroupLayer class in libgimp.
Also:

- renaming gimp_layer_group_new() to gimp_group_layer_new() in order to keep the
  same name as in core code (i.e. GimpGroupLayer, not GimpLayerGroup).
- renaming gimp_image_merge_layer_group() to gimp_group_layer_merge()
- new functions: gimp_procedure_add_group_layer_argument(),
  gimp_procedure_add_group_layer_aux_argument() and
  gimp_procedure_add_group_layer_return_value().

This can be tested, e.g. in Python with these calls:

```py
i = Gimp.get_images()[0]
g = Gimp.GroupLayer.new(i, "hello")
i.insert_layer(g, None, 1)
g2 = Gimp.GroupLayer.new(i, "world")
i.insert_layer(g2, g, 1)
g.merge()
```

This was work started long ago, stored in an old stash which I finally
finish now! :-)
2024-07-07 10:27:04 +02:00
Bruno
98d3956fef build/linux: Fix flatpak ignoring fork source code
See: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1670#note_2152565

This makes the NIGHTLY flatpak use the local GIMP source. This reduces the
internet usage and makes possible to generate .flatpak from every branch out
there, which turns the flatpak finally really useful to code development.

Of course, this makes impossible to run 'flatpak-builder NIGHTLY_manifest.json'
without cloning or downloading GIMP code, but this is not a regression since:

1) the NIGHTLY manifest is in-source to begin with, so same thing as our other
   building methods (except macOS), which runs over the code they are stored

2) the chances of someone downloading partial source code (the NIGHTLY manifest
   alone) so being unable to build are low since this file isn't too easy to find

3) even if someone do this and don't like, we are not violating flatpak building
   pratices since this option exists to be used (and will be in NIGHTLY only)
2024-07-06 13:08:47 -03:00
Jehan
703305d270 libgimp, gimp-data: now skipping the _list_ array functions.
In most bindings, they would just result in the same signature as the
_get_ variants (which people have been used to, since the GIMP 2
series). Also I was told that apparently in some bindings where this
would make a different signature, the (skip) annotation could be ignored
anyway.
2024-07-06 14:51:23 +02:00
Jehan
8b6d90700a libgimp, pdb, plug-ins: don't skip gimp_*get_*() API from GObject Introspection anymore.
The original reason to skip these was because the new _list_ API were
introspected basically to a similar function signature, except with a
useless return value, at least in pygobject binding where the list size
was also returned.
Though it seems that in fact, only the docstring was wrong. The real
signature was apparently already the same.
See: https://gitlab.gnome.org/GNOME/pygobject/-/issues/352

Therefore since the _get_ naming is more consistent compared to other
existing function, let's re-integrate the _get_ functions for array of
items or images.

This basically reverts commit 15ec254148.
2024-07-06 14:44:45 +02:00
Jehan
38946716f2 NEWS: update. 2024-07-06 14:44:45 +02:00
Jehan
ac030a0cd7 libgimp, plug-ins: make generic gimp_procedure_add_argument() private.
Same for gimp_procedure_add_aux_argument() and gimp_procedure_add_return_value().

We now have specific public functions for every supported type and it's
in fact much better to use them. The generic functions gave the feeling
that we could use any GParamSpec as procedure argument, whereas we in
fact depend on what the PDB support, and only these subtypes.
2024-07-06 14:44:45 +02:00
Jehan
6d36d143e8 libgimp, plug-ins: fix gimp_procedure_add_*_argument() where * is a resource type.
The correspondant param specs' fourth arg was a `none_ok` boolean, not a
type. Carry over this argument to the gimp_procedure_add_*() function.
2024-07-06 14:44:45 +02:00
Bruno
26645ab404 build/linux: Temporarily drop 'aalib'
It's failing badly even with the gcc trick.
I hope re-adding it soon with the MSYS2 patches.
2024-07-06 11:19:41 +00:00
Bruno
ad7ef08ea0 build/linux: Antecipate some Clang changes to properly work on aarch64
Despite we not building gimp nightly on aarch64 we need to sync with beta.

So, this updates to LLVM/Clang 18, which fixes 'gexiv2' and 'poppler'
problems with deps on that arch. 'json-c' and 'luajit'  were adjusted too
with the use of proper build options to fix errors.
2024-07-06 11:19:41 +00:00
Bruno
78c85f6f45 build/linux: Sync poppler, ghostscript and openblas with beta manifest 2024-07-06 11:19:41 +00:00
Alx Sa
ea63e99ab8 widgets: Cast GimpColorDialog to GtkWidget...
...when passing it in gimp_color_dialog_style_updated ().
This fixes a compiler error introduced in c5efa0b8 on
some Windows builds.
2024-07-05 11:43:40 +00:00
Fran Dieguez
a5c91110b4 Update Galician translation 2024-07-05 10:37:04 +00:00
Jehan
caffd09b5b libgimp, plug-ins: getting rid of gimp_procedure_add_*_from_property() functions.
These were created because of some limitation/bug in pygobject, which is
now much better worked around by having specific functions for every
argument type supported by the PDB.
2024-07-04 22:11:53 +02:00
Jehan
25701f6c1b Issue #11760: explain why poppler-data is a hard dependency. 2024-07-04 21:50:11 +02:00
cheesequake
8ebe9b090d core: Fix layer regeneration after crop undo
Resolves #10523
As we loop through every layer, we enable resizing
of the drawable on undo.
2024-07-03 11:26:55 +00:00
Luming Zh
8d3d408b14 Update Chinese (China) translation 2024-07-02 11:09:04 +00:00
Alx Sa
b3b32c7765 widgets: Disconnect gimp_color_editor_display_changed...
...when dockable is closed.
Resolves #11748

gimp_color_editor_display_changed () was still connected to
the user context when the Color dockable was closed. This
resulted in either a critical or crash if a new Color dockable
was opened or if the GIMP was closed. This patch should
cause the signal to be disconnected automatically when
the editor is destroyed.
2024-06-30 04:14:48 +00:00
Alx Sa
c5efa0b874 gui, widgets: Connect GimpColorNotebook to icon size changes
Inspired by Mark Sweeney's work.
GimpColorNotebook has existing code to
update the color selector tab icon sizes
via CSS. However, it was not set up to be
notified of icon size changes from the GUI.
Since GimpColorNotebook is in libgimpwidgets,
we call its style_updated () function from
the style_updated () functions of the two
widgets its created in - GimpColorEditor
and GimpColorDialog.
2024-06-29 20:10:26 +00:00
dimspingos
c31faab2c0 Updated Greek translation 2024-06-29 13:23:26 +03:00
Luming Zh
0a8bf6857d Update Chinese (China) translation 2024-06-29 00:09:41 +00:00
Joachim Priesner
35deb1eb30 dialogs: Don't escape underscores in Welcome Dialog recent files list
It seems unnecessary – at least on my system, files with underscores in
their names are shown with two underscores in the recent files list.
This patch fixes that.
2024-06-28 20:50:21 +00:00
Alexander Shopov
92b8670c21 Update Bulgarian translation 2024-06-28 05:15:59 +00:00
Anders Jonsson
7f9e819b50 Export histogram: fix blank lines on Windows
For the Python 3 case in issue #6096 following the
instructions of zjw and the Python 3 manual.
2024-06-27 21:21:30 +00:00
Alx Sa
87eadbf5d1 dialogs: Fix theme selection on reset
The Preference settings for themes and icon themes
are not directly connected to the property due to
the possibility of custom themes. Instead, we create
GtkListBoxes and load all the theme values. As a result,
when the preferences are reset, the row selection is not
updated.

This patch adds signals to the config object that update
the listbox selections when the Reset button is clicked.
The handler IDs are stored in the dialogue so that we
can remove them when the dialogue is closed.
2024-06-27 14:14:15 +00:00
Alx Sa
2bd598bcfd plug-ins: Fix crash in Export Histogram on file save
Resolves #11742
gimp_procedure_dialog_get_file_chooser () does not
work with GtkFileChooserAction.SAVE enums yet.
This was incorrectly left in by f5b7f734.
This patch removes the command to fix a crash.
2024-06-27 11:14:12 +00:00
Jacob Boerema
0c3bf56d83 app: fix help id for layer-lock-visibility is not set 2024-06-26 15:16:45 -04:00
Daniel
82fa7dccc1 Updated Spanish translation 2024-06-26 14:03:14 +02:00
Bruno
e59dec503e build/windows: Include only the bare minimum files to run TWAIN
As decided in #10922, 32-bit will be tolerated in 3.0 series because of TWAIN.
So, let's package only the bare minimum files to the 32-bit TWAIN plug-in work.

This reduces the final installation size by approximately 215MB.
2024-06-25 14:52:14 -03:00
Luming Zh
8a927753d9 Update Chinese (China) translation 2024-06-25 12:27:49 +00:00
Luming Zh
314e03a5ce Update Chinese (China) translation 2024-06-25 12:20:16 +00:00
Yuri Chornoivan
5af2599500 Update Ukrainian translation 2024-06-25 11:25:40 +00:00
Bruno
adda94e4d2 build/windows: Mimic 'AppVerName' against Inno pervasive behavior
It's a common pratice to tell the user what version is being installed
even if this is somewhat obvious (the user opened the installer, he
should know it). Many installers do this and Win MSIX installer too.

However, there is no sign in our Installer about what version is
being installed (the reused splash/intro image doesn't count because
it isn't always different at each micro or revision, and text is small).

---

To accomplish that feature, the Inno langs needed to be patched since
Inno actually forbidden to use that feature when we have a Welcome page.
https://groups.google.com/g/innosetup/c/w0sebw5YAeg

But 'UninstallAppFullTitle' from the following langs couldn't be patched:
- Japanese
- Lativian
2024-06-24 19:56:46 +00:00
Jacob Boerema
1e0be3d063 app: fix CI build failure core-enums.c is generated from core-enums.h
I only updated the mask strings to plural in core-enums.c, overlooking
that it is generated from core-enums.h.
So, update the same strings there after "desc".
2024-06-24 19:25:25 +00:00
Bruno
2450b93062 meson, build/linux: Fix 'sed' hell in Flatpak build
Thanks @Jehan for noticing the right fix, way better than !1281
and subsequent tortuous workarounds.
2024-06-24 17:39:46 +00:00
Bruno
e5b6dab298 build/windows: Merge '(INFO): moving DWARF...' with '(INFO): extracting...'
This makes easier to understand to where the .debug files are being moved.
2024-06-24 12:21:18 +00:00
Rodrigo Lledó
bf457a9fc8 Update Spanish translation 2024-06-24 12:09:37 +00:00
Rodrigo Lledó
75f42834f7 Update Spanish translation 2024-06-24 11:22:27 +00:00
Martin
bd1f0e4c36 Update Slovenian translation 2024-06-24 07:07:53 +00:00
Ekaterine Papava
4970f72044 Update Georgian translation 2024-06-24 03:37:25 +00:00
Bruno
51b2f2b037 build/windows: Silence 'glib-compile-schemas' in Crossroad Deps script
Wine always outputs an ugly warning, even the command running fine.
Some first-time contributors got confused about this on IRC.
2024-06-24 00:01:08 +00:00
Bruno
00e11df317 build/windows: Debloat 'share/locale' bundling
Only iso_639.mo is needed. This also reduces the bundle and installs in 15MB.
2024-06-23 23:38:49 +00:00
Ekaterine Papava
d46f15f253 Update Georgian translation 2024-06-23 23:24:07 +00:00
Jacob Boerema
51b444b846 app, actions: be consistent and use plural for layer moving ...
commands that work on multiple layers:
Raise Layer -> Raise Layers
Layer to Top -> Layers to Top
Lower Layer -> Lower Layers
Layer to Bottom -> Layers to Bottom
Also update the hint strings.
2024-06-23 19:05:01 -04:00
Martin
d875f09b51 Update Slovenian translation 2024-06-23 21:11:58 +00:00
Rodrigo Lledó
e928bc96c2 Update Spanish translation 2024-06-23 20:44:33 +00:00
Bruno
56269a68f6 build/windows: Add custom icon to the Installer setup
There are two approaches regarding the icon for Windows installers .exe:
1) same icon as the app: this give more identity, but creates confusion if
   you saved the installer in the same dir of the installed app shortcut.
   This approach is also confusing in the task bar (e.g.: running GIMP
   stable while installing GIMP unstable);
2) generic icon (e.g. a box, a cd) provided by the tool: more generic if
   you downloaded two installers generated by the same tool (ours is Inno)

I choose a middle ground and created a icon with: the app icon and an
"installer" symbol (a package box), which conveys the best of two words.

This also fixes the Inno inborn bug of the unninstaller with install icon.
2024-06-23 20:30:36 +00:00
Yuri Chornoivan
bc2917b1f3 Update Ukrainian translation 2024-06-23 18:57:03 +00:00
Jacob Boerema
5f41b4460c app, actions: be consistent and call Duplicate Layer -> Duplicate Layers
Since it works on multiple selected layers use the plural like we
also do in other similar cases.
2024-06-23 14:09:06 -04:00
Yuri Chornoivan
680d84292b Update Ukrainian translation 2024-06-23 17:24:29 +00:00
Alx Sa
9c46d0a689 libgimp: Use RGB/A u8 format for indexed color params
Resolves #11018.
Currently, babl formats are saved as strings when
passed as params. However, indexed palettes do not
use a "standard" encoding string but are created from
palettes (with a custom format). This results in an
error when we attempt to recreate the babl format from
the custom string encoding, as it doesn't exist at that
point.

This patch mitigates the problem by converting the indexed
color to RGB/A 8-bit when used in params. In the future when
indexed mode supports different color spaces and higher
precision, we will need to remove the hard coding. For now,
it solves the immediate problem.
2024-06-23 16:09:38 +00:00
Bruno
16dc7b4047 build/windows: Debloat 'lib/python3.11' bundling
After running almost all the py plug-ins, I noticed that few py modules and
pkgs are used to justify the need of a slightly faster build time with .pyc.
In the actual bloated status (with all .pyc), lib/python* is about 260 MB big.
With the bare minimum .pyc after the tests above, python*/ is less than 90.

So, let's purge the .pyc at bundling time (I'm not reinventing the wheel,
Krita do this too), which reduces the .zip bundles (so the Inno and MSIX
installs) in 170MB, the Installer .exe in 45MB and MSIX download in 60MB.

---

Let's also disable any .pyc generation, since GIMP installed with Inno in the
system-wide (aka admin) mode or installed with MSIX both doesn't handle well:
py plug-ins work but have CLI errors, unlike Inno user-mode and .zip bundle.
2024-06-23 14:09:22 +00:00
Martin
47edc69c6d Update Slovenian translation 2024-06-23 13:12:49 +00:00
Bruno
8a2ce9d16f build/windows: Make Installer's Language dialog automatic
Actually, the Language dialog is always displayed, which is not too good since:

1) This is inconsistent: the install mode dialog (to choose user or system)
   appears before using the system lang automatically. Even if Inno fix this:

2) This is tiring: depending on the context, the user can see up to 5 dialogs:
   SmartScreen (1) > Install mode (2) > installer lang (3) > dev warning (4)
   > SetupMutex (5): https://groups.google.com/g/innosetup/c/bkRtnHz2ygg

3) This is redundant: even if only 2 and 3 are displayed, why 2? Inno will
   auto select the sys lang, which the user understand to search GIMP for PC;

4) This is confusing: even the lang dialog message being clear, some users
   genuinely conclude that the selection will carry over to GIMP install like
   the old Adobe CS installer (#5515). !1628 makes more clear that not, but
   reducing confusion even more is a welcome plus considering points above.

So, let's use 'ShowLanguageDialog=auto'. That option ensures that the dialog
will NOT appear if the sys lang have a translation present in the installer,
which matches what every program does and even installers like Inkscape one.

If the lang isn't included in the installer, the dialog WILL appear so the
user can choose one which he is more fluent, being is a nice middle ground.
2024-06-22 21:53:25 +00:00
Jacob Boerema
6dbf144f6b app: add missing help ids for the text tool 2024-06-22 16:47:44 -04:00
Jacob Boerema
9c432f6505 app, actions: use consistent naming for Text to Path
In the main menu and layers dialog context menu it is called
`Text to Path`, let's use that same name in the text tool actions
instead of `Path from Text`.
2024-06-22 16:11:57 -04:00
Bruno
dfceba448f build/windows: Fix Inno wrong components size calc (part 1)
This solves an old bug that makes Inno report GIMP as being almost 1.8GB,
which is not true (it's 1.3GB at most). That was probably caused by the
overuse of components intersections (e.g.: gs + gimp, py + deps), which
Inno does not handle well (sometimes it not even displayed the cmp size).

TWAIN component is still reporting a wrong size since it's a totally
different beast, it will be fixed later.
2024-06-22 18:52:20 +00:00
Bruno
9b29cc35be build/windows: Reduce redundancy on [Files] flags 2024-06-22 18:52:20 +00:00
Jacob Boerema
a3ecca3487 app: fix some layer mask strings
Not all layer mask menu commands and help texts were updated to reflect
that they work on multiple masks.
Updates
- Apply Layer Mask -> Apply Layer Masks
- Delete Layer Mask -> Delete Layer Masks
- Their text hints and the one for Disable Layer Masks

Updates the undo strings, even though these don't seem to be used
anymore? Looks like undo always picks the menu command now.
2024-06-22 14:20:02 -04:00
Alx Sa
3842efd524 libgimpcolor: Remove GimpCMYK code
Part of the color space invasion API
updates. CMYK conversion should be
done through babl/GEGL now.
2024-06-21 16:00:18 +00:00
Bruno
04a9771c9c gitlab: Comment 'Contribution guidelines' in MR template
This is inline with our pratice in issue templates and it is welcome because
contributors who are subscribed to MRs can be annoyed by generic descs.
2024-06-21 15:06:29 +00:00
Bruno
d071d01666 Revert "build/linux: Drop 'cfitsio' for now due to security concerns"
This reverts commit d64cbf1993.

By the way, change to a more trustful source repo in the hope of working.
2024-06-21 14:20:39 +00:00
Alx Sa
26fe9713e1 modules: Remove last usage of GimpCMYK
It had actually been made unnecessary by 1c81c426.
This will allow for the full removal of GimpCMYK from
the codebase as part of the color space invasion.
2024-06-21 12:44:08 +00:00
Rodrigo Lledó
5f9e939e09 Update Spanish translation 2024-06-21 12:43:09 +00:00
Alx Sa
fcdddad2a7 core: Include NDE filters when opening as layers
Adds code to copy any NDE filters when
importing an .xcf file as layers in an
existing project.
This also requires removing the check
for the layer being attached to an image,
which historically made sense because
filter effects were immediately merged
down. Now that filters can exist separately
the check is no longer required.
2024-06-20 19:06:57 +00:00
Bruno
ebeef5d7ef build/linux: Move HEIC support to an extension
Ported from downstream (with proper adaptations):
3d7f13ff3c
2024-06-20 14:33:47 -03:00
Bruno
744abbbd6b build: Respect contributor's own GIMP_PREFIX
This makes the scripts less pervasive locally.
2024-06-20 16:20:11 +00:00
Yuri Chornoivan
990f9b7871 Update Ukrainian translation 2024-06-20 15:37:34 +00:00
Alx Sa
134100fb8a app/tools: Allow locked layers to be used as sources
GimpSourceTools like Clone and Heal use GimpPaintTool's
code for determining if they can work on a pixel-locked
layer. This means that they can not set a locked layer as a
source even though that would not affect the locked layer's
pixels.
This patch adds an additional condition to GimpPaintTool, to
allow operations if the tool is a GimpSourceTool AND only
Ctrl is held down. This allows the layer to be set as a source
while preventing it from being drawn on.
2024-06-20 13:13:47 +00:00
Nils Philippsen
05b470eba7 Fix gobject introspection references
Newer gi-docgen will fail otherwise.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-06-20 12:14:23 +00:00
Bruno
3ea2fd4e19 build/windows: Avoid bloated .mo in Crossbuild bundling
Since CROSSROAD_PREFIX have system and GIMP_PREFIX mixed, we shouldn't
rely on that folder to list the supported langs. Let's do it more smartly.
2024-06-20 12:10:02 +00:00
Bruno
5e500aeb78 Issue #11714: Temporary fix failing Flatpak builds 2024-06-20 08:03:22 -03:00
Jacob Boerema
d190c37a2c app: add missing help-id for layer effects
Note that this isn't enough for F1 to work, but that is a separate
issue.
I think that for now one help-id for all the layer effects is enough,
until we get a more final UI.
2024-06-19 13:42:49 -04:00
Bruno
d83c254ce1 meson: Clarify Lua state on Windows
lua-lgi now works with Lua 5.3 on Windows:
https://github.com/msys2/MINGW-packages/issues/21171

According to my tests, after installing lua53-lgi MSYS2 package,
lua5.3.exe tries to run the goat exercise (fails since the goat
uses different lua API). Anyway, lua5.1 isn't required per se.
2024-06-19 10:17:51 -03:00
Bruno
46698e25d5 build/windows: Clarify Installer optional params 2024-06-19 13:03:03 +00:00
Bruno
5c3620cbe7 build/windows: Move *associations.isi and *configoverride.isi to main .iss
Following c6634d66 and 09d6402a

These files are too small and aren't reused so no point keeping them modular.
Also, with them inside .iss we reduce the clutter in the installer/ folder.
2024-06-19 13:03:03 +00:00
Luming Zh
6762874412 Update Chinese (China) translation 2024-06-19 11:34:14 +00:00
Ekaterine Papava
49af594a69 Update Georgian translation 2024-06-19 03:52:23 +00:00
Bruno
3ee8c4e9a5 build/windows: Debloat 'share/glib-2.0' bundling
According to my tests, seems that only 'gschemas.compiled' is needed
2024-06-18 22:52:54 -03:00
Bruno
18187926cd build/windows: Bundle 'share/lua' again on Windows
Despite that folder mysteriously not being mandatory on Linux
(the contents are different), on Windows (in PCs without MSYS2)
this is required by a warning. So, partially reverts c808d13b
2024-06-18 22:52:38 -03:00
Bruno
a1cb43d977 build/linux: Add way to locally emulate flatpak CI building
This is useful to debugging only
2024-06-19 01:02:58 +00:00
Martin
f23b0744d7 Update Slovenian translation 2024-06-18 21:38:53 +00:00
Bruno
c7f7c5d147 build/windows: Direct Installer users to the specific updates page
The gimp.org main page was being used as the updates URL but the
downloads page is more direct, avoiding confusion with news or with
the stable big red button (remember: we also have dev installers).
2024-06-18 16:57:03 -03:00
Alx Sa
0ace660248 plug-ins: Fix crash with OpenEXR chroma images
The OpenEXR plugin was specifically set
to throw an exception if a chroma image
(Y/BY/RY) image was loaded.
This patch removes the exception and loads
the luminance channel only as a grayscale image,
which is how Krita currently handles it.
Future work is needed to properly convert the
chroma channels to import as a RGB(A) image.
2024-06-18 19:42:59 +00:00
Bruno
bb9716d609 build/linux: Enable colorful output under 'flatpak-builder'
Following 0f425554

Ninja and Cmake (which some modules use) supports colorful output.
To enable it, we need to set in the manifest due to the sandboxing.

See also: https://github.com/flatpak/flatpak-builder/issues/605
2024-06-18 16:09:05 -03:00
Bruno
d64cbf1993 build/linux: Drop 'cfitsio' for now due to security concerns
Temporarily drops 'cfitsio' which started weeks ago to change its hash.
In my tests, after "fixing" the hash, sometimes it alternates to another,
which breaks the build again. This is too hard to maintain and unsafe(?).
2024-06-18 14:58:07 -03:00
Bruno Lopes
3a54c37daa gitlab-ci, build/linux: Move Flatpak CI code to scripts that works
This will make easier to debug problems locally if needed and
have the potential to reduce the first barrier for Linux newbies.
2024-06-18 14:57:39 -03:00
Anders Jonsson
36f6b476f0 python: don't translate test plug-in
Following the note of 'no i18n' in the header
2024-06-18 11:13:06 +00:00
Rodrigo Lledó
1e48badea2 Update Spanish translation 2024-06-18 11:08:23 +00:00
Rodrigo Lledó
4deb132243 Update Spanish translation 2024-06-18 10:58:44 +00:00
Alx Sa
dc0449b05e widgets: Fix label background on Curves tool
Resolves #11702
In 2.10, the x/y label background on the Curves tool used
GtkStateType enums to get the widget's background color.
These enums were depreciated in GTK3, and during the
port the gdk_cairo_set_source_rgba() command was left
out. This resulted in the current line color being used instead,
making it hard to read the label in some instances.

This patch restores the Cairo color update command, using
the gridline color as an equivalent to the background color
from 2.10.
2024-06-17 13:05:38 +00:00
Alx Sa
9256a15363 widgets: Prevent image name from affecting the dialogue width
Resolves #7588
After the port to GTK3, the Filter dialogue's width started
to be affected the length of the image name. If the name
was very long, the filter dialogue would expand to fit it.

This patch encloses the image title label in a GtkScrolledWindow
with polices of EXTERNAL width and NEVER height. This ensures
there will not be a scrollbar, and the label will not influence the
width of the dialogue. A tooltip was added in case the user wants
to hover to see the full name.
2024-06-16 16:12:16 +00:00
Bruno
de556c0734 build/windows: Move Installer (fully) to Win32 Vista design
Following e93e0f49

This defaults 'Segoe UI' for Installer texts and for license's body. This
font is still used as the default in Windows 11 and even in online docs.

We are also bumping to 9 pt as outlined in the final Win32 guidelines:
https://learn.microsoft.com/en-us/windows/win32/uxguide/vis-fonts
I've done microscopic pixel checks and confirmed that this produces a Win32
compliant design, which renders kerning and spacing equal as 'Win + R' and
UWP Notepad (please note that some "legacier" Win32 apps renders different)

---

Also, change from Lucida Console to 'Consolas' (default console font since
at least Win8). Today it is Cascadia Mono but not included with Win 10.
2024-06-16 08:17:20 -03:00
Rodrigo Lledó
5da85f6a31 Update Spanish translation 2024-06-16 01:20:29 +00:00
Bruno
8315967735 build/windows: Little fix after b38d0455 2024-06-15 15:40:45 +00:00
cheesequake
fb4cd9aedc core: Fix drawable filter duplication
Resolves #11690
While exporting, the image is duplicated, in turn,
filters are also duplicated. This patch fixes the
duplication by also copying the parent
GimpFilter's properties.
2024-06-15 13:58:33 +00:00
Bruno
b38d0455c3 build/windows: Make clear crossbuild awful situation
Some contributors got confused about how to crossbuild on IRC. Let's help them.
2024-06-15 08:47:18 -03:00
Bruno
0397132184 gitlab-ci: Restore 'meson-log.txt' as artifact
Restores the build log artifact which was lost partly due to my fault.
The log is very useful in the rare cases of breaking the build system.
So, following our experience, let's save it for, at minimum:
- Native Linux
- Native Linux flatpak: will be adressed later in another commit
- Cross Win
- Native Win (aarch64)
2024-06-15 07:27:31 -03:00
Bruno
0f42555484 gitlab-ci, meson: Enable colored Clang output
This makes easier to spot warnings.
2024-06-15 00:34:54 +00:00
Bruno
fa26f20e9f gitlab-ci: Disable CI scripts 'debug mode'
If we were in the first days of our CI (so script bugs are common),
the scripts "debug mode" (bash -x) would be crucial, but we are not.

To be fair, running scripts in "debug mode" is pretty harmful today:
1) the produced logs consume our quota more and more (e.x.: adding a
   bit more complicated .sh function can double the output size); and
2) the long white logs tends to be specially hard to read by the way.
2024-06-15 00:34:54 +00:00
Bruno
c808d13b6e build/windows: Debloat a bit Windows bundling
This makes the output more complete but at the same time less
polluted regarding the bundling scripts (base, deps and sym).

---

Also, packaging scripts (inno and msix) were touched as consequence
of experiments about drop bundling, for saving space (~20MB), of:
- etc/gtk (MSYS2 don't build immodules)

- share/ghostscript (macOS .dmg don't package it)
- share/libthai (macOS .dmg don't package it)
- share/locale (???, decided to kept only gtk and iso-codes to test)
- share/man (installer don't package it, maybe because Windows can't open)
- share/poppler (macOS .dmg don't package it)

- bin/bzip2.exe (???)
- bin/gdk-pixbuf-query-loaders.exe (loaders.cache already bundled)
- bin/gspawn*.exe. (???)

- share/gir-1.0 (installer don't package it)
- share/lua (???)
- share/vala (installer don't package it)

The "???" ones seems to not be used according to my local tests. If
they are, a bug will appear so we will be able to know, comment in
the script (for maximum clarity towards the future) then revert.
2024-06-15 00:34:54 +00:00
Martin
08701da730 Update Slovenian translation 2024-06-14 20:08:50 +00:00
Yuri Chornoivan
a69cb1be2f Update Ukrainian translation 2024-06-14 19:17:31 +00:00
Luming Zh
be0a6dfb12 Update Chinese (China) translation 2024-06-14 08:35:26 +00:00
Ekaterine Papava
7f2f3e7e99 Update Georgian translation 2024-06-14 03:51:00 +00:00
Ekaterine Papava
4058db1f70 Update Georgian translation 2024-06-14 03:48:16 +00:00
Alx Sa
bac368af0b libgimp: Remove GIMP_PROC_* macros
These have been replaced with
gimp_procedure_*_argument () functions.
2024-06-13 23:17:48 +00:00
Alx Sa
4bf5dc7b97 plug-ins: Port argument macros to functions
With the new API introduced int d1c4457f,
we next need to port all plug-ins using
the argument macros to functions.
This will allow us to remove the macros
as part of the 3.0 API clean-up.
2024-06-13 23:17:48 +00:00
Yuri Chornoivan
0de33a0462 Update Ukrainian translation 2024-06-12 17:36:08 +00:00
Bruno Lopes
21ffb58903 Issue #811: Make each language a component for the Installer
In the process, make the Installer localization process less 'masochist'
(in other words: less manual). The custom '.xml' was the only way since
the iso-codes, Dammed Lies and Inno namings don't match.
2024-06-12 11:38:36 -03:00
Alx Sa
0be5db0b77 widgets: Allow deleting inactive filters
Resolves #11687
Previously gimp_drawable_has_filters () was used to check
if a drawable had filters before deleting them. However,
this function actually only checks if there's an active filter -
if filters are attached but set to invisible, this returns false.
This mean that you could not delete filters if they were
invisible.
This patch switches to using gimp_container_have () instead
as it checks if the filter is in the drawable's filter stack.
2024-06-12 13:44:21 +00:00
Luming Zh
d4046c24ed Update Chinese (China) translation 2024-06-12 12:10:09 +00:00
Martin
389b6d98b4 Update Slovenian translation 2024-06-11 21:11:02 +00:00
Anders Jonsson
ef91ab25eb python: remove accelerator in title bar 2024-06-11 20:22:15 +00:00
Martin
7ee8558033 Update Slovenian translation 2024-06-11 19:48:52 +00:00
Jacob Boerema
3fc861e186 tips: remove tip about dynamic keyboard shortcuts
Since dynamic keyboard shortcuts are not available anymore, remove
the obsolete tip about it.
2024-06-11 14:57:24 -04:00
Yuri Chornoivan
128e99f76b Update Ukrainian translation 2024-06-11 18:27:29 +00:00
Alx Sa
f5b7f734e2 python: Minor enhancements to python plug-ins
* colorxhtml.py was converted to use
GimpProcedureDialog. A new aux
argument was added so that a widget
could be created in the GUI. The text
field and the file widgets were made
to be sensitive to the source-file bool to
better indicate to the user which one will
be used.

* palette-sort.py now uses babl instead of
colormath libraries to get CIE LAB and
CIE LCH(ab) values. This means all users
will be able to sort by those options even
if the colormath library isn't installed.

* histogram-export.py's out-format
widget was converted to a radio frame
as it is in 2.10.
2024-06-11 17:17:41 +00:00
Martin
2a8e75de6a Update Slovenian translation 2024-06-11 15:33:33 +00:00
Alx Sa
d00aacfea2 libgimpwidgets: Fix Procedure Browser description size
Currently when you open the Procedure Browser, part of the
description text is off-screen.
This patch changes the values for the GtkPaned panels so that
the description is completely visible horizontally. It also makes
the vertical scrollbar conditional on the widget height rather
than always showing.
2024-06-11 15:00:00 +00:00
Alx Sa
2260e8bbe8 core: Fix palette error handling
Resolves #11679
The loading code for ASE, ACB, and ACO palettes
set any errors with g_prefix_error (). However, the
error object is NULL at that point for those palettes.
Therefore, a NULL error object is returned to
palette_import_make_palette () which then tries to
access its attributes. This resulted in a crash.
This patch fixes the issue by using g_set_error () for
those three formats instead.
2024-06-11 12:43:39 +00:00
Marco Ciampa
e576ac421d Update Italian translation 2024-06-11 06:45:13 +00:00
Yuri Chornoivan
3107eb61a8 Update Ukrainian translation 2024-06-11 06:38:24 +00:00
Anders Jonsson
5841e9f8af python: translation fixes
Followup to 292cb01fc2,
taking care of remaining untranslated strings and a stray
accelerator in a tooltip.
2024-06-10 20:58:39 +00:00
Yuri Chornoivan
19a94fa4ba Update Ukrainian translation 2024-06-10 18:51:55 +00:00
Alx Sa
292cb01fc2 python: Port arguments code to use functions
This patch ports the first-party Python plug-ins
to use the new argument API.
This restores the ability to add dropdown menus from
enums and Gimp.Choice parameters, and also allows
defaults to be set for custom datatypes like Gegl.Color.
2024-06-10 15:22:02 +00:00
Alx Sa
d1c4457fa3 libgimp: Convert gimpprocedure-params macros to functions
In order for Python plug-ins to be able
to create custom parameters like
GeglColor and GimpChoice, we need to
create actual functions rather than
using macros. A subsequent commit
will update all plug-ins to use them.
2024-06-10 15:22:02 +00:00
Alx Sa
ceb9747e23 libgimpwidgets: New API to check system animation status
Ports the animation code started in e13cc635
to an independent gimp_widget_animation_enabled()
function. This allows plug-in authors to
also conditionally turn off animations if
the user's system settings say to do so.

The function is applied to the About
Dialogue animation as well as two Easter
Egg animations:
* Wilber's eyes blinking after 23 minutes
on an empty canvas
* Wilber's eyes following the mouse after
a certain sequence of tools is clicked
2024-06-10 13:47:25 +00:00
Bruno
c02160a949 build/windows: No need to download Inno Korean translation
It is shipped with Inno by default in version 6.3.
2024-06-09 18:26:02 -03:00
Bruno
2f74496ebf build/windows: No need to add BOM anymore
Inno Installer 6.3 added support to UTF-8 *.isl files without a BOM
2024-06-09 18:21:27 -03:00
Bruno
8e576fb741 build/windows: Add fractional scaling to Installer Intro (actually End) image
Following a1ce459a
2024-06-09 16:58:03 +00:00
Cheesequake
22c59503b5 app/tools: Fix Filter GUI when expanding vertically,
Resolves #11656
Since e4b1f37e, Filter Tool widgets above the Blend
Mode frame do not expand vertically when the dialogue
is resized.
This especially impacts GeglGraph, as you can no longer
increase the text area to see more graph code.
This patch resolves the issue by adding a GtkExpander
to the GUI so that it allows the inner area to resize
vertically.
2024-06-09 15:02:48 +00:00
Yuri Chornoivan
f2c14573c3 Update Ukrainian translation 2024-06-09 14:58:34 +00:00
Yuri Chornoivan
19e0a45e60 Update Ukrainian translation 2024-06-09 14:53:46 +00:00
Luming Zh
843faff192 Update Chinese (China) translation 2024-06-09 12:55:24 +00:00
Luming Zh
18b659dd12 Update Chinese (China) translation 2024-06-09 12:43:43 +00:00
Anders Jonsson
a8e2c4e663 Update Swedish translation 2024-06-09 10:47:11 +00:00
Bruno
a3621cecca images/logo: Reduce size of Installer right-top icon
Following 6276d9d7

Reasons are explained in gimp-data commit message.
2024-06-09 02:39:30 +00:00
Jehan
61eca5d05b plug-ins: fix scale value in file-pdf-load. 2024-06-09 03:18:21 +02:00
Jehan
cca637135b app, libgimp, pdb, plug-ins: fix failure to set plug-in as transient.
While setting a plug-in as transient usually worked, it was failing in
cases the plug-in's progress bar was not initialized (i.e. if
progress_init() was not called before setting the dialog transient).

This commit stores the calling display, core side too (libgimp side, the
plug-in already had the calling display ID information), and we use this
when a GimpProgress has not been created yet.
2024-06-08 21:54:21 +02:00
Martin
e710457b4c Update Slovenian translation 2024-06-08 19:22:17 +00:00
Martin
81a16c4f9a Update Slovenian translation 2024-06-08 19:21:19 +00:00
Alexander Shopov
3fdbea6804 Update Bulgarian translation 2024-06-08 17:38:37 +00:00
Jehan
221bdd61c6 libgimp, plug-ins: GimpVectorLoadProcedureDialog will have thumbnail and…
… native dimensions/ratio display by default.

Also adding gimp_vector_load_procedure_extract_dimensions() public
function allowing plug-ins to query the native size or ratio of a vector
file.
2024-06-08 18:58:06 +02:00
Jehan
a4bb3a48a2 libgimp: reimplement gimp_procedure_run_config() for public usage.
Previous gimp_procedure_run_config() was in fact only good for private usage
inside the various run() methods for the different GimpProcedure subtypes. The
problem with this implementation is that the returned config object is not
complete. For instance, for a GimpLoadProcedure, the "run-mode" and "file"
properties are not part of the config object so you cannot call a
GimpLoadProcedure with any of the gimp_procedure_run*() functions.

Note: we had some working usage, e.g. in file-openraster, but only because it
was running the load procedure as a GimpPDBProcedure whose returned config
object was indeed always complete!

As a consequence, I rename gimp_procedure_run_config() as an internal-only
function _gimp_procedure_create_run_config() and I create a new
gimp_procedure_run_config() which always return a full config with all
arguments.
2024-06-08 18:58:06 +02:00
Jehan
5bcc6bfe52 libgimp: disengage pixel density from dimensions in GimpResolutionEntry.
It was a bad idea to bind width/height with pixel density. These are separate
things. You may want to set specific pixel dimensions while keeping a given
resolution.

Moreover I am now properly storing aspect ratio in the widget, otherwise with
integer computation, we are just losing too much precision and the ratio is in
fact changing constantly as you change dimensions.
2024-06-08 18:58:06 +02:00
Jehan
5784d1eba6 plug-ins: port file-pdf-load to the new GimpVectorLoadProcedure logic. 2024-06-08 18:58:06 +02:00
Jehan
3d25182ea7 libgimp: "Reset to Factory Defaults" resets to extracted size.
The bogus 0×0 default values for width×height properties are only because we
don't know the real native size of the image. Once we have computed it, we can
change the param spec defaults, so that hitting "Reset to Factory Defaults" sets
width, height and resolution to the actual file's default values (if resolution
is not a metadata in the format, which is apparently the case for all vector
formats we currently support, then 300.0 stays the default resolution).
2024-06-08 18:58:06 +02:00
Jehan
7f2b54db1f plug-ins: port file-ps to new GimpVectorLoadProcedure logic. 2024-06-08 18:58:06 +02:00
Jehan
48babeab3d plug-ins: port to the updated GimpVectorLoadProcedure logic. 2024-06-08 18:58:06 +02:00
Jehan
39ea23ed52 app, libgimp, plug-ins: improve GimpVectorLoadProcedure workflow.
I'm moving the logic of choosing a correct default for width/height by adding an
"extract dimensions" callback in the procedure. The logic is that every vector
format out there should likely have metadata either for pixel dimensions or
physical dimensions, or at the very least for no-unit dimensions (ratio only).

Vector load procedures will have to implement only the extraction of such data
in a callback called by GIMP but not how to act upon them, so that we have a
common logic for all vector images.

I am implementing this callback first in the SVG plug-in, moving all the code
to extract dimensions (and improving it) in this callback.

Also I am deleting "file-svg-load-thumb" procedure. I could simply reimplement
it using the same code, but it looks to me like this is very useless for vector
formats to have a specific thumbnail procedure (unless it were to use very
specific metadata for faster result). This is vector data, just ask it directly
at the proper bounding box size.
2024-06-08 18:58:06 +02:00
Jehan
b0d1668594 desktop: sync AppStream metadata after GIMP 2.10.38 release. 2024-06-06 21:12:32 +02:00
Jehan
a73881478c libgimpwidgets: new gimp_int_radio_frame_set_title().
This new function allows to set a title with mnemonic.

But also it properly sets the frame label as the mnemonic widget for the
radio buttons, otherwise the mnemonic is mostly bogus and doesn't
actually give focus to the editable widgets (i.e. the radio group).
2024-06-06 21:08:08 +02:00
Jehan
0b2d8fedc3 libgimp, libgimpwidgets: ability to generate a GimpIntRadioFrame for GimpChoice arguments.
This includes a new function gimp_prop_choice_radio_frame_new() which
creates GimpIntRadioFrame from GimpChoice properties.

GimpChoice GimpProcedure arguments are still creating a combo box by
default, but it is now possible to override this default behavior to get
a radio frame by calling first:

```C
gimp_procedure_dialog_get_widget (dialog, "arg-name", GIMP_TYPE_INT_RADIO_FRAME);
```
2024-06-06 20:20:30 +02:00
Bruno
12707592c2 build/windows: Add 'libxslt' to unified deps list
Some package stopped to need 'libxslt' out of nowhere.
Don't know when and why that happened, best I found was:
c3a5cacbaf
2024-06-06 14:07:10 +00:00
Alx Sa
6be4e7029a plug-ins: Use combobox in histogram-export
Currently, we can not use Gimp.Choice as a parameter type for
Python plug-ins. This means that we're using a string instead for
the "output-format" parameter, which creates a textbox in the GUI.

This patch manually creates a GimpStringComboBox in the GUI and
syncs it with the "output-format" string parameter. Once Gimp.Choice
can be used in Python, we should be able to swap this out without
impacting plug-in developers (since it would also take in a string)
2024-06-06 04:54:05 +00:00
Bruno
a8b9bedf3c Issue #5146: Change Installer ProductInfo in revisions
This allows better versioning control by ITs.
2024-06-05 20:33:16 -03:00
Bruno
fb5474ae4d Issue #4053: Add "*default_bin" support on Windows and enable it
Almost every program have a non-versioned .exe on Windows. MSYS2 does this too.
2024-06-05 11:51:14 -03:00
Alx Sa
29bb5b3608 dialogs: Respect Windows Show Animation option
Building on d25d8778, this patch checks the Window
"Show Animation" option and uses it to determine
if the About Dialogue animations should be active.
2024-06-05 12:49:20 +00:00
Alx Sa
d25d877899 dialogs: Respect MacOS Reduced Motion option
e13cc635 uses gtk-enable-animation to determine whether
the more dynamic motion animation should be used for the
About Dialog credits. However, gtk-enable-animation does
not take into account the MacOS preferences.
This patch adds a check for this value using NSWorkspace's
accessibilityDisplayShouldReduceMotion boolean. Since the
value is TRUE on MacOS if the user wants animations turned
off, the boolean is inverted.
2024-06-04 16:46:01 +00:00
Bruno
a2bd501cee build/windows: Move Store assets generation to gimp-data
gimp-data is the correct place, along with the installer assets.
2024-06-04 16:29:59 +00:00
Bruno
1a70eba570 Revert "build/windows: generate a default XCF file to be copied by Windows"
This reverts commit 085d8a02b5.

For some reason, Windows doesn't allow us to use that feature
(confirmed this after using the version from the Store itself,
not the .msixbundle)
2024-06-04 16:29:59 +00:00
Jehan
349191b8ab Issue #10406: get rid completely of the animated authors list when…
… "Reduce Animation" is checked.

This is an alternate version for commit e13cc63525.
Instead of proposing a simpler animation (fade-in/out instead of wave
animation), let's just completely get rid of the whole thing when
someone enabled an accessibility option saying that long animated
contents are basically disturbing to them, which is how I understand
additional issue #11647.

In fact, reading Mozilla docs about such option:
https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#user_preferences
… they even mention vestibular motion disorders, which seem pretty
serious and would make our About dialog quite uncomfortable.

I tried to experiment with just showing a part of the authors list, then
ending on a link text to the Credits tab after a few second, but it
didn't feel that interesting nor useful. Anyway the whole animated
widget is redundant with said Credits tab, and therefore more on the
"fancy" side of things than on the useful one. Hence let's make simple:
if someone configure their OS saying that animated elements are a
discomfort, let's just get rid of useless ones! Done!
2024-06-04 17:25:37 +02:00
Alx Sa
5bd293340f dialogs: Redesign Welcome Dialogue options layout
Currently, the additional customization
options are laid out horizontally.
Depending on the translation, this might
cause the dialogue window to become
much wider.

This patch converts those options to
GtkSwitch and puts them in a column.
prefs_switch_add () was modified to also
return the GtkSwitch object, so we could
bind its active property for the icon
override property.
2024-06-04 01:57:51 +00:00
Bruno
fad40afe45 build/windows: Organize *gimp3264.iss [Code] to not look like Assembly
The installer is probably the most complex packaging format so one of the
biggest examples of packaging love over the years into it in our repo.
But the readability of installer scripts... leave a lot to be desired.

Now, the main script is organized following the order of installer pages
with some comments. This will make easier to future contributors work
(but this commit probably isn't perfect since it's a big change to read)
2024-06-03 16:42:13 -03:00
Bruno
09d6402a5b build/windows: Update Installer dir code following latest changes 2024-06-03 06:49:22 -03:00
Alexandre Prokoudine
14250debdd Update Russian translation 2024-06-03 01:34:27 +02:00
Ekaterine Papava
1ccc31648f Update Georgian translation 2024-06-02 21:17:07 +00:00
Kolbjørn Stuestøl
ffc9f85f48 Update Norwegian Nynorsk translation 2024-06-02 19:50:46 +00:00
Kolbjørn Stuestøl
ceb982225e Update Norwegian Nynorsk translation 2024-06-02 19:48:32 +00:00
Alx Sa
e13cc63525 dialogs: Reduce About Dialog animations if requested
The About Dialog shows authors names using motion effects.
Since this is done with Cairo, it does not respect the
"gtk-enable-animations" setting or OSX's "Reduced Motion"
option.

This patch retrieves the "gtk-enable-animations" value.
If it is set to false, then the simple fade-in effect is used
for author names in place of the motion effects.
2024-06-02 02:05:24 +00:00
Bruno Lopes
57012174fb build/windows: Don't allow multiple Installers at same time
We have counter measures to avoid installing while gimp opened at 'prep time',
but until now none for the installer itself. Let's fix it with SetupMutex.

The final UX is just less worse (than today): the user needs first to select a
language, then only after this the dialog about two installer will be prompt.
Seems that Inno devs willn't fix: https://github.com/jrsoftware/issrc/pull/461
2024-06-01 20:42:06 +00:00
Alx Sa
6d1db0d7d5 plug-ins: Fix crash in Van Gogh plug-in
As noted by Wormnest, if the effect-image drawable is
smaller than the source image, the Van Gogh plug-in crashes.
This is because the source image's dimensions were being
used to traverse the effect-image drawable in rgb_to_hsl ().
This patch fixes the nested for loop to use the correct
width and height values as limits.
2024-06-01 17:33:41 +00:00
Alx Sa
b6c69ad9cd plug-ins: Set default image for Van Gogh
Unlike 2.10, the Van Gogh plug-in does not set the effect image
to the current layer by default. This means that if you don't set
it yourself, the plug-in does nothing.
This patch restores the 2.10 behavior by passing the drawable
to the plug-in dialogue and setting it by default with
gimp_drawable_chooser_set_drawable ().
2024-06-01 16:39:08 +00:00
Bruno Lopes
a91599c454 build/linux: Reduce bashisms on AppImage script 2024-06-01 16:27:20 +00:00
Bruno
796005216d build/windows: Very small clean-up to PowerShell scripts 2024-06-01 13:47:35 +00:00
Bruno Lopes
375782fd64 gitlab-ci: Use LLD linker in Debian and Flatpak jobs
Following 55427487 and 85ed2847

It is a bit unusual to use 'clang' + 'GNU ld' combo.
Also, lld is advertised to be way faster.
2024-06-01 11:28:21 +00:00
Bruno Lopes
884b05f168 gitlab-ci, build/windows: Move back split of 32-bit symbols to gimp job
Following 0199faac

We use arm64 runners for the installer job to avoid queues, but...
llvm-objcopy is well know to lack parity and one sympthom is the
'invalid SymbolTableIndex' warning when handling x86 debug symbols.
2024-06-01 10:57:24 +00:00
Bruno Lopes
2f49ff0810 build/windows: Offer option to launch GIMP after install
This commit just makes the installer display a (unchecked) checkbox, like Win
pkg manager (WinGet) so it's doesn't change the actual behavior. It also don't
break string freeze since the .isl string already exists and have translations.

The benefit to some users is having one less click to launch GIMP: [checkbox] >
[close]; instead of: [close] > [start menu icon] > [gimp in 'recommendations'].
2024-06-01 10:53:14 +00:00
Luming Zh
e5ac62990d Update Chinese (China) translation 2024-06-01 02:38:30 +00:00
Nils Philippsen
ffa8be0351 plug-ins: Fix parameter type in psd_read_len()
The function expects *data to be 64bit wide which is incidentally true
on some architectures but not others. Make it explicit (and portable).

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-05-31 23:04:54 +00:00
Yuri Chornoivan
4f0333b60d Update Ukrainian translation 2024-05-31 17:25:43 +00:00
Alx Sa
1426701143 scriptfu, tools: Allow off-canvas guides in more places
Resolves #10609

Continuing from 1759174d, this patch
removes the on-canvas restrictions for
guides from the New Guide dialogue and
the Measure Tool's guide creation feature.
2024-05-31 12:03:44 +00:00
Martin
bb65b1aca1 Update Slovenian translation 2024-05-31 07:06:33 +00:00
Alx Sa
e9f2e9012f plug-ins: Port file-tiff-load to GimpProcedureDialog
Note that GimpPageSelector is still added
manually as there is no GimpProcedureDialog 
equivalent yet.
2024-05-31 04:34:51 +00:00
Marco Ciampa
583dfbd8a3 Update Italian translation 2024-05-30 16:12:17 +00:00
Marco Ciampa
d497188ec3 Update Italian translation 2024-05-30 16:12:06 +00:00
Marco Ciampa
38223a5d6e Update Italian translation 2024-05-30 16:11:56 +00:00
Alan Mortensen
3ce095edd6 Update Danish translation 2024-05-30 15:16:50 +00:00
lillolollo
a21b18bbec app/widgets: Fix deprecated code in GimpToolBox
Replaces gtk_widget_show () with gtk_widget_set_visible ()
and replaces margin-left/margin-right with margin-start and
margin-end properties.
2024-05-29 13:43:17 +00:00
Luming Zh
05bbcc81d0 Update Chinese (China) translation 2024-05-29 12:41:31 +00:00
Bruno Lopes
9a4d46f077 build/windows: Don't generate .interp files for Native .zip bundles
Following 59b62c33
2024-05-29 10:43:39 +00:00
Alx Sa
83141ba62d actions, plug-ins: Minor clean-up and warning fix
*In file-pnm, format_name is no longer
used due to changes in exporting
functions. This was creating a warning
about an unused variable.

*In 519f301c, an attempt to add a
short-key for MacOS Settings was left in.
It did not work because "comma" should
be spelled out rather than using ",". This
patch removes the accelerator.
2024-05-28 16:16:29 +00:00
Jehan
e2748a2e4f NEWS: update. 2024-05-28 15:33:28 +02:00
Bruno Lopes
cb8c8711a6 build/windows: Enable GEGL dev docs building on Windows
This is not broken according to my tests but babl is.
2024-05-28 13:32:03 +00:00
Marco Ciampa
a1a22afe1b Update Italian translation 2024-05-28 12:56:13 +00:00
Bruno Lopes
2e748ddbfc build/windows: Make crossroad GIMP script work locally
Following fdc2f080.
2024-05-28 09:39:16 +00:00
Bruno Lopes
00af02fa19 build/windows: Make crossroad Deps script work locally
Following fdc2f080.

Also, do some cleanups.
2024-05-28 09:39:16 +00:00
Alx Sa
394ca66037 plug-ins: Fix issue with drawing Cylinder face
Resolves #11617

When we ported Map Object to GimpProcedure API,
the wrong index was set for the Cylinder's bottom face.
As a result, the top and bottom faces both appeared on the top.
This patch fixes the array index to the right value.
2024-05-27 18:50:36 +00:00
Jacob Boerema
aab6f4eab8 modules: fix CI failure in gimp-win-x86 job
Our gimp-win-x86 job fails with the following error:
../modules/gimpinputdevicestore-dx.c:207:28: error: passing argument 2
 of 'GetModuleHandleExW' from incompatible pointer type
 [-Wincompatible-pointer-types]

Fairly Recent the call to `GetModuleHandleEx` was changed to
`GetModuleHandleExW`. This new call expects a wide char pointer
instead of a char pointer.
So replace it with the wide variant (LPCWSTR). Since in this call
an address is actually expected, the actual contents don't need to
be a wide string.
2024-05-27 13:32:54 -04:00
Alx Sa
1759174d9d pdb: Allow off-canvas guides with Script-fu
Commit 015f4946 allowed guides to be
placed off-canvas in the GUI. However,
the restrictions were not removed from
the Script-fu implementation.
This patch fixes the Script-fu parameters
and conditional checks to match the
GUI implementation.
2024-05-27 15:42:10 +00:00
Marco Ciampa
fb94e576df Update Italian translation 2024-05-27 14:58:25 +00:00
Marco Ciampa
c62ef5eb12 Update Italian translation 2024-05-27 14:58:22 +00:00
Martin
d32d8d9ccf Update Slovenian translation 2024-05-27 12:26:22 +00:00
Marco Ciampa
94e57486a0 Small fixies in Italian translation 2024-05-27 12:23:17 +02:00
Jacob Boerema
85561c7ff0 libgimp: fix #6126 Invalid charset: InvalidCharsetId
Some apps that write EXIF metadata, forgot to add the charset to
certain tags that require it. The main case is Exif.Photo.UserComment.
This caused us to show a warning about an invalid charset, in addition
to not showing it in our Metdata Viewer.

We fix this by reading the raw data for that tag when we encounter the
above error. The raw data is then validated as utf-8 and converted
to a string if valid.

We then resave this tag to our metadata to force it to have the
correct charset; that way we don't have to do any checking in other
places in our code.

Note: there are a few other tags that also use a charset. We may have
to check those too, eventually.
2024-05-26 14:46:20 -04:00
Bruno Lopes
3ad39c3866 gitlab-ci: Expose .flatpak as artifact from the distribution job
Completing d09a2a6f, since the dist job wasn't added to MR pipelines that time

Note: this doesn't change the actual behavior. The job will upload to nightly
repo only when triggered from schedule pipelines. I repeat, nothing changed.

What is new is that the .flatpak bundle now is an artifact from dist job, since:
- Despite the name, it isn't a real bundle, so no need to be only in gimp stage
- In dist, it reduces storage use because only the .flatpak file lasts 8 days,
  not the .tar and other files from gimp job which lasts 2 days (5495483c)
2024-05-26 13:48:28 -03:00
Bruno Lopes
445def2109 gitlab-ci: Align again the logical operator '&&' in dev-docs 2024-05-26 10:50:32 -03:00
Alx Sa
c8049f2ed5 app/tools: Fix editing custom NDE filters
Resolves #11211

The code that moves the temporary "editing" filter
when modifying an NDE filter was not being run
on custom GIMP filters like Curves. This meant that
editing Curves would always place the temporary
"editing" filter at the top of the filter stack, giving
an incorrect preview of what the changes would do.

This patch moves the reorder code from being in
gimp_filter_tool_create_filter () to being in
gimp_filter_tool_set_config (), which always runs
when any filter is created.

This change also fixes a separate issue where the
filter mask would not be copied over for Curves.
2024-05-26 12:37:47 +00:00
Yuri Chornoivan
965bd8daa2 Update Ukrainian translation 2024-05-26 06:03:16 +00:00
Bruno Lopes
ed97f08d0b build/windows: Delete Splash images from 2.9 era not used anymore
They should have been deleted by !1373 but there were so many things to
do that it is completely natural that these two files went unnoticed.
2024-05-25 17:44:22 -03:00
Bruno Lopes
e93e0f49a0 build/windows: Move Inno installer to 'modern' style
This style mimics the color scheme used by Win32 applications since Vista (and
still used in Win11). The all grey scheme ended in XP. Let's move on.

But we will keep the actual window size and without being able to resize since
these two Inno features (WizardSizePercent and WizardResizable) are broken.

(The progress bar was changed too to conform with the defaults and uninstaller)
2024-05-25 19:15:54 +00:00
Alx Sa
a28b1bad14 plug-ins: Update Darktable API check
Darktable 4.6 updated the version output format to conform
to standards. This broke the regex check that GIMP uses to
test if Darktable is installed. The developers of Darktable
have added a new --gimp flag for us to use for checking
support. This patch updates our check code to use this
API first, then fallback on the original regex code if a
version of Darktable before 4.6 is installed.
2024-05-25 17:59:37 +00:00
Bruno Lopes
c7d271d892 build/windows: Silence Inno warnings regarding langs
We have no control over lang teams. No reason to keep the output polluted.
2024-05-25 07:44:57 -03:00
Bruno Lopes
f34f55dd65 build/windows: Organize Installer [Setup] to make some sense 2024-05-25 07:44:49 -03:00
Bruno Lopes
6276d9d777 build/windows: Drop hardcoded Installer right-top icon
Now, the icon is generated from the (new) logo .svg in gimp-data.
Also, it now have full HiPPI (aka fractional scaling) support.
2024-05-24 16:22:23 -03:00
Bruno Lopes
a1ce459a1b build/windows: Drop hardcoded Intro image from 2.9 (pre-2.10) series
Now, the image is generated from splash image in gimp-data
2024-05-24 12:16:07 -03:00
Bruno Lopes
c6634d66ff build/windows: Make Installer versioning vars more neutral
Now, the installer files match the meson config.h naming:
'gimp_version', 'gimp_app_version' and 'gimp_api_version'.
"devel" was replaced by meson 'gimp_unstable' too.

util_version was dropped since it lost its utility.
2024-05-24 13:22:03 +00:00
Bruno Lopes
2758965731 meson: Optimize DWARF symbols to Dr. Mingw 2024-05-24 13:11:18 +00:00
Bruno Lopes
0199faac2c gitlab-ci, build: Make DWARF (.debug) symbols splitting an Installer only script
Splitted .debug are not needed by crossbuilds, and breaks .msix certification.
2024-05-24 13:11:18 +00:00
Bruno Lopes
dc21fb7601 meson, build: Disable CodeView (.pdb) generation and bundling for now
1) Right now, MS Partner Center doesn't tell us if the .pdb bunbled as .appxsym
are fine and we only have "Unknow" dumps in the Health page from MS Par. Cen.

My theory, according to my tests with 'SymChk', 'PDBCopy' and 'llvm-pdbutil',
is that this is happening because .pdb from clang or gcc are not "perfect", but
I really have no proof to afirm this, since Partner Center tell us nothing
about them, and we don't even know if the .appxsym were uploaded to begin with.

---

2) The compiler can't generate DWARF (.debug*) symbols when generating .pdb,
which breaks debugging in DrMingw and even lldb according to my tests.
(This is not a fault of the .pdb format but a circumstance: our debuggers
only support DWARF, which is the format already used by MSYS2 packages)

---

So, the .pdb will return probably only in the potential vcpkg transition.
2024-05-24 13:11:18 +00:00
Alx Sa
742ec5689d widgets: Block removing tool-based NDE filters
Currently, messing with filters that are
being managed by tools (like Warp or
Gradient) causes crashes. For now, we'll
prevent removing NDE filters which are
tool-based, and revist after 3.0 is released.
2024-05-22 19:59:40 +00:00
Bruno Lopes
edddb83784 build/windows: Fixes and cleanup to native scripts
Previous changes broken local building courtesy and probably DirectInput too.
Noticed that the universal variables can not work in some contexts, fixed.

Also, done some little cleanups.
2024-05-21 22:59:44 +00:00
Cheesequake
e4b1f37e4e tools: Improve Filter Tool UI for Blending Options...
...by having it stay in the same position when expanded
and closed rather than moving to the bottom afterwards.
2024-05-21 19:15:43 +00:00
Alx Sa
acf2756e4a widgets: Update image display on imageview select
In the Image Dockable, clicking on an image will update the layers and 
navigation views. However, the actual canvas image will not update
unless you double-click the item.
This adds a select_item function so the canvas is updated on a single 
click as well.
2024-05-21 17:31:05 +00:00
Idriss Fekir
4a174206af text: Fix loading XCFs with XLFD fonts 2024-05-21 17:19:33 +01:00
Alx Sa
5f38c37b98 tools, core: Don't stroke/fill paths on pixel locked layers
Resolves #11568

Currently, the Stroke/Fill Paths options on
the Path tool disregard the Pixel Locked
flag for layers. This patch resolves this as
follows:

* On the Paths tool, the Stroke/Fill button
does not pull up a dialogue if a single
layer is selected and it's pixel locked.
* If multiple layers are selected, only those
that are not pixel-locked have the Fill/Stroke
applied to them.

In both cases, a warning is also displayed.
2024-05-21 12:57:55 +00:00
Niels De Graef
36c201e426 libgimpwidget: Mark gimpcolorscale as introspectable
There's no seemingly good reason for it not to be introspected, so let's
add it to the files. This also fixes an issue where the documentation
for it is not properly generated.
2024-05-21 10:08:07 +02:00
Niels De Graef
5efb05825c meson: Undef GIM_DISABLE_DEPRECATED on GIR
By defining `GIMP_DISABLE_DEPRECATED` when creating the GObject
Introspection file, we're actually not (or only partially) generating
some of the documentation of some files that are marked as deprecated.

One example that should now properly generate documentation is
`GimpFileEntry`.
2024-05-21 10:01:48 +02:00
Martin
9acd62a0fa Update Slovenian translation 2024-05-20 13:52:09 +00:00
Rodrigo Lledó
bf66900493 Update Spanish translation 2024-05-19 16:44:50 +00:00
Rodrigo Lledó
291e049df5 Update Spanish translation 2024-05-19 16:14:40 +00:00
Rodrigo Lledó
74673f431a Update Spanish translation 2024-05-19 15:49:02 +00:00
Rodrigo Lledó
61f75b3541 Update Spanish translation 2024-05-19 15:41:26 +00:00
Rodrigo Lledó
cf717f4add Update Spanish translation 2024-05-19 15:23:41 +00:00
Rodrigo Lledó
1f95fc8e05 Update Spanish translation 2024-05-19 14:07:02 +00:00
Rodrigo Lledó
5567b67de5 Update Spanish translation 2024-05-19 13:12:41 +00:00
Luming Zh
ed070d10b7 Update Chinese (China) translation 2024-05-19 11:08:57 +00:00
Luming Zh
691e96bb10 Update Chinese (China) translation 2024-05-19 11:04:32 +00:00
Balázs Úr
e4fd431970 Update Hungarian translation 2024-05-19 10:01:09 +00:00
Balázs Úr
88eb404ab3 Update Hungarian translation 2024-05-19 09:55:32 +00:00
Yuri Chornoivan
f5f99bdfdd Update Ukrainian translation 2024-05-19 06:45:04 +00:00
Alx Sa
519f301c65 actions: Use Settings rather than Preferences on MacOS
Per Lukas Oberhuber, Preferences should be called Settings
on MacOS, as it was before the GTK3 menu port.
2024-05-19 02:12:44 +00:00
Alx Sa
47dde0580a libgimpwidgets: Fix formatting from 8adcc0cd
Some minor code style issues remained 
that I missed in 8adcc0cd.
After further reflection, I also converted
the code to be a private/internal function.
gimp_prop_check_button_new () should
cover the majority of GtkCheckButtons,
and the function is currently only used
to fix the size of those widgets. We could
revisit it as a public function in the
future if more use cases are found.
2024-05-19 02:10:23 +00:00
Rodrigo Lledó
5a4afd39eb Update Spanish translation 2024-05-19 01:20:57 +00:00
Rodrigo Lledó
ef405918f8 Update Spanish translation 2024-05-18 23:49:43 +00:00
Rodrigo Lledó
86465e4aff Update Spanish translation 2024-05-18 21:41:39 +00:00
Mark Sweeney
8adcc0cdcb libgimpwidgets: Fix GUI twitching due to bold label sizing
Resolves #10026

Selecting a checkbutton makes the label bold. This increases the
width of its label, and if it's the longest item in a box, this
causes minor "twitching" and resizing of the dialogue.
This patch calculates the size of the label when bold and then
requests the label width be set accordingly to resolve the issue.
2024-05-18 21:33:51 +00:00
Alx Sa
e51a128acd text: Update font property to GimpFront
Resolves #11550
The import code for X Logical Font Description fontnames
was not updated to use GimpFont instead of strings.
This caused crashes when we tried to set GimpFont properties
with gchars. This patch updates the code to create a new
GimpFont object from the font name string.
Additionally, it increases the read length by one, as we were losing
the last character of each field as it was split on the "-" character.
2024-05-17 14:47:29 +00:00
Marco Ciampa
bed62a077c Updated Italian translation 2024-05-17 12:12:52 +02:00
Andre Klapper
dff524d7e6 pdb: Update URL for GLib API docs 2024-05-17 09:12:14 +02:00
Bruno Lopes
75f59c7602 gitlab-ci: Remove unnoticed keyword by fdc2f080 2024-05-16 14:00:46 -03:00
Oleg Kapitonov
7ccfad1716 app: Fix localization language in Windows 2024-05-16 16:42:47 +00:00
Alx Sa
4de7c7defb themes: Removing padding constraints on GimpToolDialog
Resolves Issue #9955.
GimpToolDialog CSD buttons were being singled out to only
have padding of 2px. This was inconsistent with other dialogues
without this constraint. Since the larger padding style seems to
be preferred, we'll remove the constraint for GimpToolDialog
CSD buttons.
2024-05-16 15:49:10 +00:00
Bruno Lopes
fdc2f080a8 gitlab-ci, build/windows: Make crossroad scripts self-contained
This make them easier to understand and to run local, as we do with native ones

(They can't be run local yet, further changes will try to acomplish this a bit)
2024-05-16 10:05:38 -03:00
Bruno Lopes
26e2f693dc build/windows: Enable .pdb bundling in x86 (32-bit)
Following 8cf688ac. Since GCC 14 was finally released with this feature.
Clang have it for years in advance so no change is needed for arm64 and x64.
2024-05-15 21:20:36 -03:00
Bruno Lopes
36ce192a53 build/windows: Reduce some bashisms on Windows scripts 2024-05-16 00:02:25 +00:00
Bruno Lopes
b42b18de24 gitlab-ci: Re-enable pkg caching for deps-*cross job
Reintroduce pkg caching for crossroad. The possibility of using it is one
in thousands since we don't have distributed cache, but it's better than
rely totally on MSYS2 mirrors, which can be be extremely sick sometimes.
2024-05-15 19:29:07 -03:00
Rodrigo Lledó
e59231d659 Update Spanish translation 2024-05-14 15:52:07 +00:00
Alx Sa
bcf5697289 themes: Define GtkListBox row styles
Resolves #11531

GtkListBox's CSS was previously defined, but GtkListBoxRow
did not inherit those values. This patch explicitly defines this
so we do not have system theme leaks.
2024-05-14 15:13:49 +00:00
Alx Sa
aa30b40fee core, xcf: Prevent copying tool-based NDE filters
For now, we can't keep certain GEGL ops
like Gradient as NDE filters, since they are
connected to tools. If the layer is copied
or saved as an .XCF while the tool is still
active, it attempts to save it and causes a
crash.
This patch adds a check to make sure the
copied filter has been commited and that
it's not a tool-based NDE filter before
being copied. It also adds some NULL
checks where gimp_drawable_filter_duplicate
is used to prevent NULL from being
added to the filter stack.
2024-05-14 04:05:06 +00:00
Nils Philippsen
29fda469d1 meson: Detect Lua 5.4 and fall back to plain name
Lua-lgi works with Lua 5.4 meanwhile which is the only implementation on
some architectures.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-05-13 23:49:42 +02:00
Alexander Shopov
f35a0bb3be Update Bulgarian translation 2024-05-13 20:54:10 +00:00
Alexander Shopov
fa9ceb4411 Update Bulgarian translation 2024-05-13 20:47:04 +00:00
Kolbjørn Stuestøl
fcbe556704 Update Norwegian Nynorsk translation 2024-05-13 19:35:03 +00:00
Luming Zh
f3711e9750 Update Chinese (China) translation 2024-05-13 11:28:37 +00:00
Luming Zh
19bac162de Update Chinese (China) translation 2024-05-13 11:18:01 +00:00
Luming Zh
9b16976879 Update Chinese (China) translation 2024-05-13 11:12:55 +00:00
Luming Zh
49a2b7eb3d Update Chinese (China) translation 2024-05-13 11:08:42 +00:00
Alx Sa
d9125c58f9 libgimp: Fix description of gimp_export_image ()
As noted by Anders Jonsson, the wrong parameter description
was removed when the API was updated. Other aspects of the
descriptions were also updated to account for the change.
2024-05-12 15:26:29 +00:00
Alx Sa
1bb515eb64 plug-ins: Fix call to internal GIH export after 443947c6
After 443947c6, the image layers were being passed as a
GList to the internal GIH export code rather than GimpDrawable
pointers.
2024-05-12 11:38:53 +00:00
Alexander Shopov
0471439ed4 Update Bulgarian translation 2024-05-12 07:58:13 +00:00
Alexander Shopov
ba04867d71 Update Bulgarian translation 2024-05-11 14:18:06 +00:00
Alexander Shopov
dd128d2748 Update Bulgarian translation 2024-05-11 14:05:41 +00:00
Alexander Shopov
bf60369e74 Update Bulgarian translation 2024-05-11 14:02:09 +00:00
Niels De Graef
c2971f000a libgimpwidgets: Add missing GIR annotations 2024-05-11 15:30:45 +02:00
Niels De Graef
d44a9c942b libgimpmath: Add missing (out) annotations 2024-05-11 15:01:23 +02:00
Niels De Graef
f08aca656d libgimpcolor: Add missing (out) in gimpcolorprofile 2024-05-11 14:46:10 +02:00
Niels De Graef
2bc7ec8ef6 libgimpbase: Add GIR annotation for memsize deserialize
The memsize argument was missing an `(out)` argument
2024-05-11 14:40:38 +02:00
Niels De Graef
c15c180eab libgimpconfig: Fix gimpconfigwriter GIR annotation
Make sure to mark the data argument in `gimp_config_writer_data()` as an
array.
2024-05-11 14:34:32 +02:00
Rodrigo Lledó
8038cc1d62 Update Spanish translation 2024-05-11 11:48:53 +00:00
Ekaterine Papava
1b29e77c17 Update Georgian translation 2024-05-11 03:09:37 +00:00
Rodrigo Lledó
ac4de97855 Update Spanish translation 2024-05-10 23:55:39 +00:00
Rodrigo Lledó
f15a605ed9 Update Spanish translation 2024-05-10 21:47:25 +00:00
Bruno Lopes
bad250429c build/linux: Fix stuck AppImage
* Since the appimage is for testing purposes, let's use system 'libc'
* Hardcode python path since the wildcard wasn't expanding misteriously
* Improve system theme recognition making way simpler
2024-05-08 22:02:23 +00:00
Jordi Mas
5556735d22 Update Catalan translation 2024-05-08 18:50:11 +02:00
Rodrigo Lledó
735ca5a1ab Update Spanish translation 2024-05-06 21:05:35 +00:00
Rodrigo Lledó
6ccb043873 Update Spanish translation 2024-05-06 20:49:43 +00:00
Michael Schumacher
aff33e2d18 gitlab: Add url to the Duplicate candidate report search for both open and closed reports.
This may help to reduce the number of duplicate reports we get about some (temporarily) frequently reported issues, like the current crash
happening since GLib 2.79/2.80, or the crash happening with older GIMP versions on macOS Sonoma.

This won't be perfect because not everyone will use or read the template, or notice the url in it, or use the url to find and check the
reports, but I count on it getting more known than right now.
2024-05-05 22:48:05 +00:00
Simon Budig
1b142eb604 app: don't leak the GeglColor in GimpPaletteEntries. 2024-05-06 00:35:51 +02:00
Simon Budig
e0564ae69d libgimpwidgets: don't leak dest_profile 2024-05-06 00:35:51 +02:00
Simon Budig
32336a2350 app: avoid uninitialized memory for color names 2024-05-06 00:35:51 +02:00
Yuri Chornoivan
12c13f0f11 Update Ukrainian translation 2024-05-05 17:42:42 +00:00
Simon Budig
6877a3cd43 app: use the logical rectangle for positioning the splash text.
This avoids jiggeling baselines for texts with/without descenders.
2024-05-05 16:55:41 +02:00
Martin
f1a2bbb1cc Update Slovenian translation 2024-05-05 08:42:48 +00:00
Jacob Boerema
64b9a00484 plug-ins, ci: add basic support for junit reports for...
file plug-in testing.
The name and location of the xml results will be the same as for the
log file, but with the extension replaced by .xml.

Just some basic support is added which adds failed testcases when
a plug-in has a failure result, which should be the most common
case of failures.
Not all cases where we make errors in our test setup will generate
failed testcases yet, although they should show up in the number of
failures.
Disabled tests won't show up as skipped tests.
We also don't track time.
2024-05-04 19:06:38 +00:00
Anders Jonsson
dfae02038a libgimp: make vector load strings translatable 2024-05-04 13:17:39 +00:00
Daniel Novomeský
b8eea758d7 plug-ins: JPEG XL half-float import support 2024-05-04 04:58:28 +00:00
Hugo Carvalho
01858bd0de Update Portuguese translation 2024-05-03 21:46:31 +00:00
Alx Sa
3260299f4a libgimp, plug-ins: Remove n_drawables parameter from gimp_file_save () 2024-05-03 15:22:39 +00:00
Alx Sa
443947c6aa plug-ins: Remove n_drawables parameter
Port all plug-ins to retrieve the layers
directly from the image rather than
having them passed in. This resolves some
issues with introspection and sets the
foundation for future API work.
2024-05-03 15:22:39 +00:00
Alx Sa
bb3c28689a libgimp, plug-ins: Remove GIMP_EXPORT_CANCEL
Per Jehan, as of 0dc9ff7c we can't
cancel gimp_export_image, so we can
safely remove this enum.
2024-05-03 15:22:39 +00:00
Bruno Lopes
e96494d5a3 build/linux: Re-enable ccache in Flatpak builds
The move to Clang in 85ed2847 didn't take into account caching,
Now, this is fixed or, better saying, reintroduced(?): e545116b

Also, flatpak-builder output was confined to the .log file to make
possible checking the end of the CI output, which was being cut.
2024-05-02 08:58:29 -03:00
Marco Ciampa
254d4270e6 Updated Italian translation 2024-05-01 16:41:18 +02:00
bootchk
3a4d6387b3 ScriptFu: TinyScheme: fix closing of ports
Formerly, closing a port cleared all the attribute bits.
Then the port was not disposed of properly (leaked memory)
when the port was garbage collected.

Now, closing a port only clears the direction bits.
The kind of port is still known for a closed port.

Add test script for file port methods of Scheme.
2024-05-01 12:08:46 +00:00
Bruno Lopes
17ae809fd6 gitlab-ci: Fix Installer job using cache 2024-04-30 18:01:29 +00:00
Bruno Lopes
91811c4638 gitlab-ci: Improve the order of beginning of .yml
Pure cosmetical change to more linear reading. This makes related Keywords
more closer to each other.
2024-04-30 18:01:29 +00:00
Bruno Lopes
aef0348229 gitlab-ci: More little fixes regarding 'file-plug-in-tests' 2024-04-30 18:01:29 +00:00
Bruno Lopes
e2b77df5a2 gitlab-ci: Update cppcheck exclude dirs
To follow the latest changes (e.g. cross 32-bit drop).
2024-04-30 18:01:29 +00:00
Rodrigo Lledó
9f5e8604ca Update Spanish translation 2024-04-30 15:30:35 +00:00
Rodrigo Lledó
71ad6425bd Update Spanish translation 2024-04-30 15:29:12 +00:00
Rodrigo Lledó
b5a13b7cc8 Update Spanish translation 2024-04-30 15:26:36 +00:00
Alx Sa
0b171e9bae core: Copy NDE filters in layer group children
Resolves #10765
This allows us to retain any filters that a
layer group's children might have when
copied or exported. They were previously
lost when the group layer was duplicated.
Note that an OR condition was added to
GimpDrawableFilter creation, to allow
one to be created if the layer was 
attached to a parent layer rather than the
image.
2024-04-29 20:51:36 +00:00
Bruno Lopes
59b62c3355 build/windows: Make possible to execute Win cross artifact without the wrapper
The wrapper, like in native artifact, exists just for avoid searching the exe.
But, if the user wanted, wasn't possible to execute gimp-*.exe directly since
the wrapper was needed to generate loaders.cache. Now, loaders.cache are built.
2024-04-29 15:51:33 +00:00
Bruno Lopes
bf0671dac2 build/windows: Make clear that our Windows builds are not incomplete
This improves the gimp.cmd wrapper wording a bit to not need the README
anymore. Our dev site was improved some time ago to clarify this:
the Windows builds aren't not incomplete if run correctly (under MSYS2)

Also, add cleanup commands to make the .typelib wizardy less invasive.
2024-04-29 15:51:33 +00:00
Bruno Lopes
649f0c7747 build/windows: Update 'project_subdir' in gimp.cmd wrapper following 973c2dd7 2024-04-29 15:51:33 +00:00
Rodrigo Lledó
99d29f0345 Update Spanish translation 2024-04-29 11:48:35 +00:00
Cheesequake
10cc33b28e widgets: Deleting effects now deletes the selected effect instead of the topmost effect
Resolves #11404
Since the GimpContainer selected function automatically updates which filter is the
"active" selected filter, we can remove the code that sets it to NULL after a filter
is deleted. This fixes a bug where the top effect was always deleted in subsequent
attempts rather than the highlighted one.
A now unnecessary gimp_drawable_remove_last_filter () function was also removed.
2024-04-29 11:34:59 +00:00
Bruno Lopes
b080180955 gitlab-ci: Little changes in 'file-plug-in-tests' for consistency
Some details went unnoticed by me when reviewing the MR,
so Jacob authorized me to fix them separately.
2024-04-28 23:34:06 +00:00
Bruno Lopes
f7c5c5a6e0 build/windows: Update 'project_subdir' in MSIX following 973c2dd7
Also, drops manual removing of test plug-ins since they willn't be
installed at build time for stable versions, I suppose.
2024-04-28 19:05:18 -03:00
Bruno Lopes
e53d6df611 build/windows: Add 'GIMP.GIMPPreview' identity for testing purposes
Without this, Partner Center refuses the .MSIX by not matching the
entry Identity and DisplayName (which isn't the same as the stable).

Also, rework the naming of the .msix's to be more Microsoft-ish
2024-04-28 17:55:22 -03:00
Alan Mortensen
ef62625c27 Update Danish translation 2024-04-28 16:28:41 +00:00
Alan Mortensen
f80353e8ee Update Danish translation 2024-04-28 16:28:00 +00:00
Bruno Lopes
0a2433c062 build/linux: Fix failing Flatpak jobs due to old path 2024-04-28 14:24:48 +00:00
Yuri Chornoivan
6075afd70d Update Ukrainian translation 2024-04-28 05:58:56 +00:00
Jacob Boerema
97671dbab7 plug-ins, tests: fix #11408 test-file-plug-ins: permission error ...
for gimp-tests.log

On Linux we may not have permission to create a log at our default
location, so we need to check for that.

First we should not init the log when our plug-in is asked for info.
Only create it when we actually run the import or export tests.

Second, try to catch the permission error and write a message either
in GIMP or in the terminal for non-interactive.
2024-04-27 22:46:02 +00:00
Martin
b5c6b48bee Update Slovenian translation 2024-04-27 21:49:18 +00:00
Bruno Lopes
7503dd449a build/windows: Add 'qoi' back to the unified deps list
Following 93722e81. I forgot adding into the list
2024-04-27 16:37:05 -03:00
Jacob Boerema
5def9ffd09 plug-ins: don't crash file export tests when sections is None 2024-04-27 13:10:18 -04:00
Bruno Lopes
93722e81b5 build/windows: Remove a bit of actually dead code in msys2 scripts
This commit is mostly a little cleanup:
- Reduce redundancy in Local compatibility layer regarding build commands,
  which partily reverts !1171 regarding buggy "ninja && ninja install"
- Reduce redundancy of some variables (MSYS_PREFIX and GIMP_DISTRIB)
- Remove manual QOI install since MSYS2 granted a exception in the win32 drop

This commit also reverts 7cca69cd, a fix from the autotools era that isn't
actually needed according to my tests in CI.
2024-04-27 17:00:43 +00:00
Alx Sa
b283d9fe08 plug-ins: Port file-ps to GimpChoice
Resolves #9946
2024-04-27 16:49:31 +00:00
Martin
e1cc217057 Update Slovenian translation 2024-04-26 21:36:55 +00:00
Martin
76bf9174ad Update Slovenian translation 2024-04-26 21:34:49 +00:00
Yuri Chornoivan
510b557fc8 Update Ukrainian translation 2024-04-26 19:58:04 +00:00
Yuri Chornoivan
ac56004fd0 Update Ukrainian translation 2024-04-26 19:49:25 +00:00
Yuri Chornoivan
62f94d8746 Update Ukrainian translation 2024-04-26 19:44:08 +00:00
Sabri Ünal
bc6dbf87d6 Update Turkish translation 2024-04-26 17:31:21 +00:00
Sabri Ünal
339db86473 Update Turkish translation 2024-04-26 17:29:06 +00:00
Jacob Boerema
3478e1c00f plug-ins: add file-plug-in testing framework
Copied over from the original separate work in:
https://gitlab.gnome.org/Wormnest/gimp-file-plugin-tests
After that further improved and changed and added more file format
tests.

Added meson.build files to integrate it in our build, but we do not
install it for releases.
2024-04-26 12:28:47 -04:00
Rodrigo Lledó
44225ef1c0 Update Spanish translation 2024-04-26 12:11:08 +00:00
Jordi Mas
628a8d1f5b Update Catalan translation 2024-04-26 13:53:07 +02:00
Alx Sa
9a4d365d59 core: Copy correct filters to new layers
Should resolve #11392

In dfb26f37, the NDE filters in the copied image are
retrieved with gimp_image_get_layer_iter (). This works
fine for single layer images or when all the layers are copied
at once. However, if a subset is copied then the filters are always
copied starting from the top level of the image. This can result
in an incorrect filter being copied to the wrong layer.
To fix this, we get the filters from the provided drawables list
instead. This matches the number of layers in the copied
image exactly, since it was used to create the copied image.
2024-04-26 04:17:08 +00:00
Martin
9f1a099202 Update Slovenian translation 2024-04-25 19:59:07 +00:00
Bruno Lopes
ab4267d620 gitlab-ci: Fix custom builds being interrupted
This regression was added by c064148a and it's similar to fb7a9954. Now, that
we are using 'interruptible: false' in custom rules, this is probably fixed.

Also, organize a bit better some pipelines with official GitLab .yml wizardy.
I was hesitating to use "<<: *" since this creates a new layer of complexity,
but this was the better way and the trick have a distinct marking by the way.
2024-04-25 19:03:12 +00:00
Anders Jonsson
d83cf4d9b6 plug-ins: fix typo in file-raw-data 2024-04-25 18:18:38 +02:00
Ekaterine Papava
c28f63f119 Update Georgian translation 2024-04-25 14:51:19 +00:00
Alx Sa
ed557ad2bd plug-ins: Typo correction from 1247c8ba 2024-04-25 14:49:21 +00:00
Ekaterine Papava
596619d928 Update Georgian translation 2024-04-25 14:46:30 +00:00
Ekaterine Papava
62b3df3aa5 Update Georgian translation 2024-04-25 14:45:09 +00:00
Ekaterine Papava
81975732c0 Update Georgian translation 2024-04-25 14:43:10 +00:00
Alx Sa
62cdbfbafa plug-ins: Port file-jpeg to GimpChoice parameters 2024-04-25 14:04:23 +00:00
bootchk
20b19b960e ScriptFu: fix #10307 plugin call display not effective
This benefits script authors and testers of ScriptFu.

Now a call to (display "foo") in a plugin goes to the terminal where GIMP started.
Whether interactive or in batch mode.

Make TS errors go to an error port instead of the output port.

Tool plugins: Console, Eval, Server get error messages from the error port.
TextConsole not changed. Tools behave per new doc "ScriptFu Tools" at dev web site.

Driveby fix of SF Server: send whole message instead of byte by byte.

Driveby comments and more semantic checking of set-output-port in TS.

Add test plugin test-display.scm
2024-04-25 12:51:00 +00:00
Alx Sa
1247c8ba2e plug-ins: Port file-raw-data parameters to GimpChoice
In addition, this restores the palette options for HGT import
that were accidentally removed from 2.10. Mnemonics
were also added to parameters which were missing them
earlier.
2024-04-25 12:40:42 +00:00
Jehan
973c2dd710 meson: fixing the datadir/libdir/sysconfdir.
As noticd by Bruno, the meson port is inconsistent with our 2.10
autotools build here too (and therefore our data path standards).
Fixing.
2024-04-25 01:13:38 +02:00
Jehan
9d93160de6 Issue #11384: new Image automatically uses comment from active image. 2024-04-25 00:20:32 +02:00
Bruno Lopes
b494944f2f build: Add pedagogic README towards 'gimp-macos-build' repo
It's not obvious (when browsing in the repo) where the macOS files are.
Now, that we have one folder per OS, this became desirable for clarity.
2024-04-24 22:02:32 +00:00
Martin
9406b61a05 Update Slovenian translation 2024-04-24 21:31:47 +00:00
Jehan
c40dc612a5 tools: update the rm command for macOS.
Hopefully now the CI jobs can run?!
2024-04-24 23:31:05 +02:00
Martin
16d15dccf2 Update Slovenian translation 2024-04-24 21:30:11 +00:00
Anders Jonsson
80b7727770 Update POTFILES.in 2024-04-24 22:32:03 +02:00
Jehan
4e8f7c5be6 tools: fix in-build-gimp.sh on macOS.
This should hopefully fix:

> realpath: /Users/circleci/macports-gimp3-arm64/var/macports/build/_Users_circleci_project_ports_graphics_gimp3/gimp3/work/build/.GIMP3-build-config-: No such file or directory

Though it's harder to verify because of the "Intel macOS resource brownouts"
going on on CircleCI infra, and only x86_64 runners allowed me to SSH to them.
But I think that's the right fix seeing the error.
2024-04-24 21:57:15 +02:00
Jehan
55b5e14f69 plug-ins: port file-wmf-load to GimpVectorLoadProcedure.
The preview widget is a bit stretched, though at least I fix the contents to be
distorted (instead, the preview is fine but we've got black-filled parts
around). I'm not focusing on it because anyway, I'm not sure either if the
preview is that important, or (if it is) whether we should not just integrate it
as part of GimpVectorLoadProcedureDialog, i.e. for every vector images.
2024-04-24 21:57:15 +02:00
Martin
ecec798548 Update Slovenian translation 2024-04-24 19:32:10 +00:00
Bruno Lopes
5495483c76 gitlab-ci: Unify artifacts 'expire_in' time a bit more rationally
For our two "development" sub-stages, the expiration is as follows:
The 'dependencies' stage artifacts continues to expire in 2 hours.
Now, all 'gimp' ones expires in 2 days (to avoid time zone limbo).

For "stage"/tests and "production"/dist, the expire time depends
on the source of the CI pipeline. If the artifact is oriented to a
'short-span' source (e.g. MRs and commits), it expires in 2 days.
If is oriented to a 'LONG-span' one (e.g. web, schedule), 8 days
(we choose 8 to have a +1 day artifact just in case if something
goes wrong in the weekly schedule day, which isn't rare actually).
2024-04-24 18:35:56 +00:00
Jehan
390340b433 app: fix cases of missing data directories by always trying to mkdir them.
This happens in particular for in-build runs (or when using
GIMP3_DIRECTORY environment variable on an empty directory). In any
case, I don't see why we wouldn't try and create a directory which was
configured for data storage.
2024-04-24 19:48:59 +02:00
Jehan
3fbf34dabc meson: fails to compile with -Dpython=disabled flag.
We compile GObject-Introspection anyway (except for cross-builds, where
anyway we don't rely on local Python scripts), so even if not installing
the Python plug-ins, still use them locally.
2024-04-24 19:48:59 +02:00
Alx Sa
106706ca31 plug-ins: Fix IFS color updates
Resolves #11176

After the initial color space invasion, changing colors in the IFS color
transformation section no longer affected the image. It seems that
ifsD->*_cmap->color held the actual color selected by the user, but
this value was not making it into elements[ifsD->current_element]->v.*_color.
This patch connects the *_cmap->color values to the functions used
to draw the image on the screen.
2024-04-24 16:05:32 +00:00
bootchk
283ec65d79 ScriptFu: build: "stable release" not install test framework or test plugins
meson.build exclude subdirs script-fu/test/
and script-fu/scripts/test
on a stable release.
2024-04-24 14:32:53 +00:00
bootchk
60a584f91a ScriptFu: move test plugins and install more in unstable build
Move test plugins from /scripts to /scripts/test.
POTFILES.skip that directory.

Add a readme to scripts dir.

Revise readme in scripts/test

Rename test9.scm which tests the new byte type support in Scheme.
Install it in unstable build, it is an important test,
long and sophisticated.

Install contactsheet.scm as a test plugin in unstable build.
See test/meson.build for comments about its issue.
2024-04-24 14:32:53 +00:00
bootchk
deb4dc8190 Plugins: GUI: Fix redundant Clothify plugins
Formerly, both Clothify and "Clothify v3" are installed
in menu Filters>Artistic.
They are duplicates.

Clothify is the original using the old-style, homegrown interface.
"Clothify v3" is new-style, GimpProcedureDialog interface.

Both are marked for translation.
Only Clothify (v2) is translated (in potfiles.in)
"Clothify v3" is not translated (in potfiles.skip)
This commit does not break string freeze.

Moves "Clothify v3" to Demos menu.
It only installs in an unstable build.
The new is installed in unstable only for comparison with the old.

FUTURE: when no string freeze:
Swap the new and the old.
Move "Clothify v3" clothify-v3.scm to potfiles.in
and move "Clothify" clothify.scm to potfiles.skip.
Swap the menu items, so the user doesn't see "v3."
2024-04-24 14:32:53 +00:00
Jehan
25b9f677b1 libgimp: fix libgimp introspection.
- Fix a few broken references and an inconsistent argument name.
- Add the new headers in the introspectable header list.
- Add a few missing class descriptions for GimpProcedure and subclasses.
2024-04-24 16:05:41 +02:00
Jehan
dd6acc86fb libgimp: new fill_start() and fill_end() class method for GimpProcedureDialog.
Instead of filling default GUI for a specific type of plug-in procedure in
fill_list(), we add 2 methods:

* fill_start() is ensured to run once (and only once) before any fill_list()
  code runs.
* fill_end() is ensured to run once (and only once) after all fill_list() ran.

This takes care of 2 kind of GUI bugs which we could have:

1. First if no explicit fill were run (i.e. neither gimp_procedure_dialog_fill()
   nor gimp_procedure_dialog_fill_list() were ever run), then the default
   interface would not be added to the dialog. Yet this case could happen when
   we don't want anything else but the default GUI (this will be the case in the
   upcoming file-wmf-load GUI).
2. Second if at the opposite, you fill several times fill functions (I hadn't
   thought of this, but noticed some already started to do this in our ported
   plug-ins), we obviously don't want the default GUI to be added several times
   either.
2024-04-24 15:50:22 +02:00
Alx Sa
9a2774f7f9 libgimp: Fix casing in documentation 2024-04-24 11:34:01 +00:00
Jehan
c22515e0b7 plug-ins: port file-ps and file-svg to GimpVectorLoadProcedure. 2024-04-24 01:16:46 +02:00
Jehan
a931f4c93e plug-ins: port file-pdf-load to GimpVectorLoadProcedure and…
… GimpVectorLoadProcedureDialog.
2024-04-24 01:16:46 +02:00
Jehan
bed41ea3c0 libgimp: new GimpVectorLoadProcedureDialog widget.
As expected, it is made to reuse shared code for every GimpVectorLoadProcedure.
In particular, they all need to choose dimensions to load at, so we are sharing
a same GimpResolutionEntry widget logic everywhere now.

I am in fact still very unsure about the code logic for this widget by the way
for these reasons:

* It still puts too much emphasis on the "resolution" (pixel density) part,
  which makes people believe it's important, while they should in fact choose
  the pixel dimensions most of the time and not care about the pixel density.
* Right now we can't break ratio (which in fact was already impossible in most
  vector format plug-ins we had). Do we want to add a chain and allow this?
* If we consider the pixel density as the one we want to set the document with
  (which may not be the same thing as the one from when we load the document),
  we also want to break link between width/height dimensions and pixel density.
  Right now we can't (updating one field updates the others too).
* There is always this issue of precision with pixel density vs. pixel
  dimensions because we don't necessarily find the same values when computing
  from one side to another because of lack of precision and this confuses
  people.
* Finally there is the question of multi-page documents (e.g. PDF) where the
  chosen dimensions are the document dimensions whereas each page may have a
  different size which has to be recomputed independently and this got me
  off-by-one errors. I think I'll need to review a bit the logic, but I'll do
  once I've ported all the vector format load plug-ins first to see the most
  common usages.
2024-04-24 01:16:46 +02:00
Jehan
3a3f67ef95 libgimp: re-promote GimpResolutionEntry in its own file and improve its API.
The code comes from plug-ins/common/file-pdf-load.c and apparently it used to be
in libgimpwidgets (very long ago). I'm copying it to its own file and massively
improve the code (depending on property binding which makes the behavior much
more robust).

Still I left it as private because I don't want to say the API is finale without
having tested it a bit more. But eventually we should make it public for
plug-ins to use it directly too. When this happens, it should get back to
libgimpwidgets.
2024-04-24 01:16:46 +02:00
Jehan
768f871bc7 app, libgimp, pdb: new GimpVectorLoadProcedure class.
It's still basic but will help to share code for support of various vector-able
formats, such as the logic for dimensioning them, but also the generated GUI.

Not only this, but we are paving the way for the link layers (though it'll be
after GIMP 3, we want plug-in procedures' API to stay stable) by giving a way
for a plug-in procedure to advertize a vector format support. This way, the core
will know when a source file is vector and can be directly reloaded at any
target size (right now, in my MR for link layers, the list of "vector" formats
is hardcoded, which is not reliable).
2024-04-24 01:16:46 +02:00
Martin
c363991cad Update Slovenian translation 2024-04-23 21:58:44 +00:00
cheesequake
5c646830a5 Fixes #11338: Layers do not teleport to the bottom of the list if dragged onto the headers 2024-04-24 00:23:40 +05:30
Yuri Chornoivan
6c6ad24119 Update Ukrainian translation 2024-04-23 17:32:39 +00:00
Anders Jonsson
83dee0e43a app: translate link labels and tooltip in Welcome dialog 2024-04-23 14:57:25 +00:00
Bruno Lopes
f40ecca648 gitlab-ci, build: Enable ccache for win crossbuilds
Due to design, crossroad install everything in the same prefix. So, let's
drop the pkg caching (.cache) and reuse ccache path inherited from .default.
2024-04-23 14:08:55 +00:00
Alx Sa
47aabfc93a core, libgimpcolor: CMKY & HSL to float
Continuing 32d64ab1, this converts the
few instances of CMYK and HSL/A double
to float to match babl's precision.
2024-04-23 13:38:59 +00:00
Bruno Lopes
bffe62d43e gitlab-ci, build: Drop custom "CI_*" variables
Let's figure out what job is running using the predefined GitLab variables.
2024-04-23 13:20:29 +00:00
Yuri Chornoivan
1420e60f45 Update Ukrainian translation 2024-04-23 13:20:11 +00:00
bootchk
7b37d5bee8 GUI: Eliminate menu Filters>Development>Script-Fu>Test
Only affects unstable build.

Move remaining items to Demos.
They have names like "Test foo."
They only install on an unstable build.

The ScriptFu>Test menu is only in an unstable release.
It is untranslated.

The ScriptFu menus don't need to be so deep.
The Demos menu is an appropriate place for test plugins.

If the Demos menu is not in the stable release and translated,
Gimp creates the Demos menu and it is untranslated.
2024-04-23 07:57:32 -04:00
bootchk
f64115d3b2 Plugins: GUI: Move HelloWorld and Sphere plugin menu items to Demos menu.
The "Sphere" plugin demonstrate all the widgets for arguments of a plugin.
Only its menu label is translated.

The "Hello World" plugin demonstrates an independently interpreted SF plugin.
It has no translations, even of its menu label.

Formerly in ..ScriptFu>Test menu.

They still are installed even in a stable release.
If we don't want 3.0 stable to ship with demos,
need more changes to meson.build.

They are akin to the goat exercise plugins.
These plugins are expected to ship with the goat plugins in a stable build.
!!! But 2.10 did not ship with any demo plugins in stable build.

There are duplicate "Sphere" (v2) and "Sphere v3" plugins.

Does not break string freeze.

The new-style "Sphere v3" plugin moves to Demos.
It will be installed with stable build.
No translations will change.

"Sphere" (v2) will only be installed in an unstable build.

FUTURE: we should translate Hello World and Sphere v3.
If they are to ship as demos, their GUI should be translated.

FUTURE: low priority we could rename "Sphere v3" to just Sphere,
and Sphere to "Sphere v2" so there is no conflict.
2024-04-23 11:46:48 +00:00
Bruno Lopes
42356db4b4 gitlab-ci, build: Clarify DWARF debug symbols "extraction"
Partially reverts af79bbe0 (regarding .debug "extraction" in cross builds)

Now, we call the split debug script from the main bundling script, which makes
similar to our macOS .app bundling script. This cleans a bit of code in .yml
and make things clearer to the mere mortals in the scripts.
2024-04-23 07:53:48 -03:00
bootchk
c5c0976ed7 app: GUI: Delete root menu "Test", move its item to Demos
Its contents is a test plugin, "Test dialog".
I am responsible for it, and it is ugly, even in unstable.
Is only installed in an unstable build.

We need a convention that menu items for plugins named like "Test foo"
should only be installed in unstable build,
and should require no translations.

Note that if the Demos menu does not exist,
Gimp creates it, and it is not translated,
but only present in an unstable build.
2024-04-22 16:06:38 -04:00
Bruno Lopes
8ef4b40c8c build/windows: Fix Installer after native x64 and arm64 TWAIN drop
Native arm64 and x64 TWAIN binaries are not built anymore. No need to
discard at dist time what doesn't exist. (32-bit TWAIN not affected)

Also, start to using our own ARM64 runners to do the dist. This is more
reliable since the shared x64 runners can (and indeed) cause long queue.
2024-04-22 18:52:25 +00:00
Jacob Boerema
b3f8ad3eea libgimp: fix #11382 oversized export dialog with long comment
When there is a very long comment shown in the export dialog, the
dialog expands horizontally. Possibly making it wider than your screen
instead of wrapping the text.

Let's set word wrapping for the text view. That way the text will
wrap at a reasonable length and use the multiline text view instead
of just the first line.
2024-04-22 13:26:29 -04:00
Jürgen Benvenuti
5569e40b8c Update German translation 2024-04-22 17:16:15 +00:00
Alan Mortensen
44a3d88802 Update Danish translation 2024-04-22 16:38:14 +00:00
Alan Mortensen
5bf2bb901e Update Danish translation 2024-04-22 16:36:30 +00:00
Martin
290d5ccd67 Update Slovenian translation 2024-04-22 14:19:28 +00:00
Bruno Lopes
28ba5d6918 gitlab-ci: Silence universal variables
They were generating a distracting output in CLANG* shells, as noted by
@lillolollo in a comment from MR: Infrastructure/gimp-web-devel!65

In the process, make AppImage and Windows (native) scripts use these
variables, without hardcoding the same variables from .yml anymore.
2024-04-22 13:22:31 +00:00
bootchk
55cc32e7f4 ScriptFu: Plugins: fix #11346 broken "Export Palette" plugin.
Fix ScriptFu, CRITICAL handling filename args user-entered in old-style interface.

Fix plugin, changes to API re Resource i.e. Palette and Colormap

Add message giving mangled name of output file.

Driveby minor refactoring of plugin.

Driveby cleanup, remove old email addresses.

Driveby use script-fu-use-v3 binding to PDB.
2024-04-22 06:17:13 -04:00
Alx Sa
c691bd2a0b actions: Prevent crash due to non-existent editors
Resolves #10914

Some dockables such as "gimp-pattern-editor" and
"gimp-mybrush-editor" are listed as Editors even though
we don't yet have dedicated GimpDataEditors for them.
This causes problems when using certain features like
duplicating. To resolve for now, we check if
gimp_window_strategy_show_dockable_dialog () returns a
valid GimpDataEditor before trying to use it.
Per Jehan, we also verify that an edit button exists
and is visible before we try to call the edit command.
2024-04-22 01:24:36 +00:00
Jehan
2f9881c03f build, tools, gimp-data: removing gimp_exe_config_dir from the root meson.build.
Creating a temporary config directory for the in-build GIMP (run as a tool or
for unit-testing) is not done as a build target anymore, but in the
in-build-gimp.sh script as a unique temp directory, then cleaned out on exit.
This has a few advantages:

- It is properly cleaned out once the build ends (instead of leaving a full
  config dir as trash inside the build dir).
- It is not reused from one build to another (with risk of carrying bugs and
  issues over).
- Every use of the in-build GIMP will have its own config directory, and in
  particular when they are called in parallel.

As a side update, make sure that all `gimp_exe` runs depend on
`gimp_exe_depends`.
2024-04-21 20:43:29 -03:00
Jehan
a54253db04 build, gimp-data: all 'file-*-save' plug-in procedures got renamed to 'file-*-export'. 2024-04-21 18:18:44 -03:00
Bruno Lopes
a56cfc9080 build/windows: add UTF-8 support to non MS Store manifest
This is recommended by Microsoft for "*nix apps" and adding it to the
.exe manifest will avoid disparity between MSIX and other versions
(e.g. CI crossbuilds and CI native builds/installer/local builds).
2024-04-21 18:18:44 -03:00
Bruno Lopes
3f0532ba86 app, devel-docs: add a bit of MS Store documentation
See also: Infrastructure/gimp-web-devel!46
2024-04-21 18:18:35 -03:00
Jehan
a9c8420368 build/windows: fix submodule checkout failure
Bruno note: This commit was repurposed after ad132ad0.

---

For some reason, on the Windows/Aarch64 runners only, submodule updates fails
with:

> + git submodule update --init
> From https://gitlab.gnome.org/GNOME/gimp-data
>  * branch            d1041a4d97871c85538938872d0ace69d2fc44c2 -> FETCH_HEAD
> error: Your local changes to the following files would be overwritten by checkout:
>         images/README.md
>         images/logo/meson.build
>         images/meson.build

The big question was: why are there edits to begin with? This is supposed to be
a brand new clone!
After a bit of investigation, it turns out that the whole files have incorrect
EOL endings (a `git diff` returns every possible lines in the whole
repositories, but `git diff --ignore-cr-at-eol` returns nothing). It looks like
this breaks the submodule update.
2024-04-21 18:15:32 -03:00
Jehan
194eaf1312 build/windows: drop plug-ins .ico (it is now generated by gimp-data) 2024-04-21 18:15:32 -03:00
Jehan
b41fe61698 build/windows: generate fileicon .png's for MS Store and drop .ico
Also update the gimp.rc and delete the committed fileicon.ico now that
gimp-data generates this file the same way as these PNG fileicon-s.
2024-04-21 18:15:32 -03:00
Jehan
085d8a02b5 build/windows: generate a default XCF file to be copied by Windows
Attribute uap4:ShellNewFileName is meant as a template file to be copied when
someone initiate the Shell "New" command (via the Explorer context menu).
2024-04-21 18:15:31 -03:00
Bruno Lopes
4c968d9aa0 meson, build/windows: generate AppList, StoreLogo and *Tile .png's
Most of the work in this commit is by @Jehan.

These icons are used only by the .msix (MS Store) distribution of GIMP.

Some legacy icons are used only by Windows 10 and need to have smaller logo
than full image dimensions, so let's not use colorsvg2png. We just pass the
dimensions to use by configuring variants of the same base script.
2024-04-21 18:15:31 -03:00
Bruno Lopes
37045e477b gitlab-ci, build/windows: Add MS Store job to CI
The new dist job can produce two artifacts: a *.msixupload file
ready for submission and/or a *.msixbundle only for testing.

See the commit about the script for more details.
2024-04-21 18:15:18 -03:00
Jehan
8cf688ac16 meson, build/windows: generate .pdb (CodeView) debug symbols
This makes possible to debug with DIA SDK, if wanted by the developer.
Also, this is needed to create .appxsym files for MS Store debugging.

Ideally meson should be able to install for us, but apparently it doesn't.
See https://github.com/mesonbuild/meson/issues/12977
2024-04-21 18:13:47 -03:00
Bruno Lopes
184e2704a4 build/windows: Add MS Store dist script
Adds PowerShell script and proper manifest for making .msixupload
(only for releases) and/or .msixbundle (always, for testing).

As authorized by Jehan, 32-bit willn't be supported. The reasons are:
1. 32-bit is going to die when WIA plug-in is done. This can hurt reviews
2. 32-bit is being restricted in ARM64 version. This causes disparity
3. 32-bit is generating a big footprint. "This is bad for the environment"
   To be clear: we are discarding most of 32-bit artifact (see point 1)
   and what could not (TWAIN for x64 only, point 2) almost doubles .msix.

There is one small circumstantial reason too:
4. 32-bit wouldn't have .pdb even after GCC 14 because bins have same name
   as x64, and MS don't allow multiarch debug symbols in the same .appxsym
2024-04-21 18:12:38 -03:00
Jacob Boerema
9d133add5b build: openjpeg dependency was missing
Both in our Debian and Windows deps the openjpeg dependency was
missing, so let's add it back.
2024-04-21 12:40:41 -04:00
Jehan
c65aca8b17 plug-ins: rename various '*-save.[ch]' files to '*-export.[ch]'.
Though it's not visible and could happily wait for after GIMP 3 release, this
was annoying when grepping. Just did a quick cleanup.

I also removed gimprc.common which is a forgotten remnant from the autotools
build.
2024-04-21 16:48:58 +02:00
Alx Sa
32d64ab1c9 core, widgets: Convert HSV/A to float
Per Pippin, the only color model that can
have double precision is RGB/A.
Therefore, we need to switch all others to
use float instead. This patch converts the
HSV and HSVA double babl formats.
2024-04-21 03:42:27 +00:00
Bruno Lopes
2dc6f41114 gitlab-ci, build: Use 'bundling' naming instead of 'packaging'
As hinted in d09a2a6f

We now use the word 'bundle' to signify "program files in the same prefix"
(e.g. .appimage, .zip, .app). This is in line with our source and dev-docs
(just take a search in the repo). So, appimage and windows scripts changed.

The word 'package' normally means "program files distributed for install in
the same prefix or not" (e.g. .deb, .msi, .dmg). This is in line with CMake
naming of some commands, but meson prefers to call 'dist', which we use more.

So, this partly reverts some things of GNOME/gimp!1171 and reinforce others
for even more "rationality" in the overall build structure of GIMP.
2024-04-20 22:32:46 -03:00
Bruno Lopes
b1c25ca5dc gitlab-ci: Clarify some CI-wide variables 2024-04-20 23:23:39 +00:00
Jehan
0dc9ff7c06 libgimp: clean out the "interactive" intermediate dialog which was hidden…
… since forever anyway!

GIMP used to have a second export dialog, a generically generated one, appearing
either before or after (depending on when gimp_export_image() was called) the
custom export dialog implemented by the plug-in code. This has been hidden deep
in code since forever (since version 2.8.0 in fact, I believe) and only kept
hidden behind an environment variable "GIMP_INTERACTIVE_EXPORT". I don't think
we'll ever revive this, so let's clean up.

In fact, not one, but in worst case even 2 more dialogs were hidden behind this
variable! The first dialog (confirm_save_dialog()) was a confirmation when the
selected drawable was a layer mask or a channel (and not a layer). Most export
code don't even seem to care about the selected drawables anymore anyway (cf.
issue #7370), except with gimp_file_save() non-interactively (issue #8855),
which is a real mess of inconsistency anyway.

The second dialog (export_dialog()) was listing the various actions to do on a
copy of the image to help the plug-in (e.g. merge layers/flatten image, etc.)
and possibly give choices to some of these actions. Though there is definitely
no reason to request this kind of thing anymore, especially for a short-lasting
image copy, the list of action could still be interesting in the future, not as
information of what is going to be done, but as information of the kind of data
loss of the exported format. I could imagine we want to be able to reuse such
information for generating types of data loss per format in the export dialog,
in particular in the context of my long-term export workflow refactoring (from
which resizing before export such as #2531 are part of, but the whole
refactoring project is much wider).

In the whole discussion of #5858, there will be the question on whether we don't
want plug-ins to be directly given a "ready-to-use" image depending on
capabilities they advertized in create_procedure().
2024-04-21 00:16:27 +02:00
Jehan
b4f84dfd8f NEWS: update. 2024-04-20 23:51:53 +02:00
Alx Sa
7abcc97c6a modules: Swap ColorWheel to HSV float
Should resolve #11370

Per Pippin, HSV double is not a valid
color model for babl. We need to change
to HSV float to resolve the warning when
selecting colors on the Color Wheel.
2024-04-20 21:31:58 +00:00
Bruno Lopes
0c32125f1c gitlab-ci: Fix duplicate merge and push pipelines
This is a well know problem documented in GitLab docs that happens when
the CI isn't properly configured that was causing double pipelines in MRs.
Let's fix it, and reduce some redundancy.
2024-04-20 20:50:04 +00:00
Jehan
ef314804c4 Issue #11361: building fails on macOS.
This line should have never been pushed (in commit a78c41d2a3), my bad! It was
an early (extremely ugly and bad!) attempt to try and have the bindings see the
libraries another way than using DYLD_LIBRARY_PATH (which was instead resolved
with commit 3e980d5ad4).

This omission went unnoticed until I add `set -e` very likely as this failed
command would stop the script in failure.
2024-04-20 20:17:59 +02:00
Jehan
d661e8efb1 libgimpcolor: gimprgb-parse finally deleted.
- gimp_rgb_list_names() ported as gimp_color_list_names() using NUL-terminated
  GimpColorArray.
- GimpColorHexEntry uses the new function (and is therefore now GimpRGB free!).
- gimp_rgb_parse_name() deleted as it's unused since my previous commit.

With all this, gimprgb-parse.c is now deleted from the repository! \o/
2024-04-20 20:04:32 +02:00
Jehan
b31a465a9e plug-ins: port ifs-compose to GeglColor. 2024-04-20 20:04:32 +02:00
Bruno Lopes
6428e51f2a gitlab-ci: Move 'analysis' stage to a more "mainstream" position
I suppose the intention of having this stage at the end was to make clear: no
job depends on it. However, this place is not common or ideal but one of two:
1) before building, which is more linear; or 2) after building (the choosen)
even if this isn't dynamic analysis (tests), since they are both related and
some compilers and build systems do static analysis. Anyway, not after dist.

The new place is a bit  more clear to devs used at "build, test, deploy" praxis
and maybe will be now better noticed by the existing devs before distributing.
It's not perfect, since I explained above that there are two places/approaches.

Obviously, the stage continues to be OPTIONAL to pass, nothing was changed.

---

Also, dropped the deprecated "only:" (in clang-format job) in favor of "rules:"
and made the artifacts paths of clang-format and cppcheck more consistent.
2024-04-20 17:35:45 +00:00
Jehan
0f9b08c37e libgimpcolor: more GimpRGB-based functions are now unused. 2024-04-20 16:10:32 +02:00
bootchk
2914fd40ff ScriptFu: Test: maintenance, fix tests broken by changes to Gimp, add tests.
Fix tests broken by changes to gimp_data, wilber.png=>gimp-logo.png

Uncomment failing tests whose issue was fixed.

Remove calls to deprecated functions.

Make more test files use v3 binding script-fu-use-v3

Compare floats relatively by epsilon.

Add some missing tests.
2024-04-20 08:25:35 -04:00
Alx Sa
a0d040bddc libgimp: GimpSaveProcedure to GimpExportProcedure
This patch continues porting save API to
export for the 3.0 release.
2024-04-20 07:50:42 -04:00
Jehan
62ab8e2604 libgimp, libgimpcolor: make real unit test of old (compiled but unused) …
… test-color-parser.c file.

The file libgimpcolor/test-color-parser.c was compiled but never actually called
by the build. Now that we have a nice infrastructure to test libgimp API, I am
moving it there with the new format. Doing this also allowed me to discover some
bugs in CSS parsing, as well as discover Python binding was failing here (cf.
the few previous commits).

Only one test is disabled so far, the one where 4 digits are used per channel in
hexadecimal notation: "#64649595eded". This format simply doesn't appear
anywhere in the spec, and also the result values in the samples listing don't
even fit. So far, I'm just unsure what to do with it, if we want to keep this
support (of some kind of higher precision hex notation, but not specified, so is
it even used by anyone?) or not.

All the other tests just work in both C and Python!
2024-04-20 12:39:52 +02:00
Jehan
106d18605a libgimpcolor, app: gimp_color_parse_(css|hex|name)() renamed with _substring() suffix.
New functions with the same name as these functions are created, except without
the length argument (i.e. it's equivalent to calling these with -1).

The reason for this is that using strings with a length variant which may be
negative to switch to NUL-terminated strings are not bindable. At least in our
case, when testing in Python, the input string ended up as corrupted garbage and
GObject Introspection docs warns about such interfaces:

> In particular, avoid functions taking a const char * with a signed length that
> can be set to a negative value to let the function compute the string length
> in bytes. These functions are hard to bind, and require manual overrides.

(see: https://gi.readthedocs.io/en/latest/writingbindableapis.html#strings)

So instead, I create a simple version which runs on NUL-terminated strings only
and which is bound, whereas unbinding the generic length-version (making it
C-only, or maybe usable in some other bindings which ignore the (skip)
annotation; apparently some do this).
2024-04-20 12:37:20 +02:00
Jehan
d51cde85c1 plug-ins: script-fu is now GimpRGB-free. 2024-04-20 12:06:41 +02:00
Jehan
6a85efe92c libgimpcolor: gimp_rgb_parse_hex() is also unused. 2024-04-20 03:41:27 +02:00
Jehan
9f205ca63e libgimpcolor: fix CSS parsing.
- "transparent" is now recognized. It was forgotten (probably because on the
  GimpRGB interface, we separated the API in a _rgb_ and a _rgba_ variant).
- rgba() and hsla() formats are now fixed (implementation was there but the
  function names were not recognized.
- Adding some comment about limitations of the hexadecimal notation (we don't
  support the alpha channel which is now in the CSS specs, while we also support
  some non-specified variant with every channel on 3 or 4 digits) for future
  work.
2024-04-20 03:03:41 +02:00
Bruno Lopes
685fe6c0c5 data: Restrict 'default.env' to relocatable builds
The lack of distinction after 975c1891 was causing crashes in local builds.
2024-04-19 22:25:18 +00:00
Jehan
fde0b27754 plug-ins: add missing include.
This fixes:

> plug-ins/script-fu/script-fu-refresh.c:70:1: warning: no previous declaration for ‘script_fu_register_refresh_procedure’ [-Wmissing-declarations]
2024-04-19 23:58:18 +02:00
Jehan
0d39458d8d libgimpcolor: remove all gimp_rgb_*() utilities not in use anymore. 2024-04-19 23:58:18 +02:00
Martin
d23fd3fc9d Update Slovenian translation 2024-04-19 21:43:37 +00:00
Jehan
2b27feb2fd app, libgimp*, modules, pdb, plug-ins: new GimpParamColor.
This is meant to obsolete GeglParamColor with at least an additional argument
has_alpha which we need in GIMP. It allows to advertize when a parameter wants
an opaque color, which in particular means we know when displaying a GUI to pick
colors with alpha or not.
2024-04-19 23:25:13 +02:00
Jehan
cbb333c220 app: accept a NULL default color in plug-ins.
Our pluginrc code is already able to output NULL for a default NULL color, but
reading was failing with the following error:

> GIMP-Error: Error while parsing '/home/jehan/.config/GIMP/2.99/pluginrc' in line 289: unexpected identifier 'NULL', expected number (integer) - fatal parse error

Let's support reading such a value now, especially as for Python plug-ins, we
are not even able to add a default value to GeglColor arguments (cf. previous
commit).
2024-04-19 19:13:53 +02:00
Jehan
634fe62f74 Issue #11319: support GeglColor as generic GParamObject of type GeglColor.
In some binding (e.g. Python), we have not found how to create GeglParamColor
specs for PDB procedures, so we use GParamObject specs with `GeglColor`
object_type. Have our code handle both variants.

Fixes:

> GIMP-WARNING: _gimp_gp_param_def_to_param_spec: GParamSpec type unsupported 'GeglParamColor'

Of course such generic spec won't have any future option which we may add to a
dedicated param spec (and despite adding code to handle a default value, adding
a default color still doesn't work according to tests).
2024-04-19 19:13:53 +02:00
Yuri Chornoivan
642f12639a Update Ukrainian translation 2024-04-19 14:53:51 +00:00
Jehan
e7b7efafe9 app, libgimpcolor: no GValue GimpRGB anymore! 2024-04-19 14:42:08 +02:00
Jehan
a50759cda8 app, libgimp*, pdb, plug-ins: remove GimpRGB support in GIMP protocol.
There are no plug-ins which uses GimpRGB for procedure argument, nor is there
any base PDB procedure. We don't pass this type anymore through from/to
core/plug-ins. So let's clean the whole code out as a next step to get rid of
GimpRGB from our codebase!
2024-04-19 14:34:22 +02:00
Anders Jonsson
70b8e49e01 script-fu: fix calls to gimp-context-set-[pattern/brush]
Like in e31de151fa
these now need to work on an object rather than a name.
2024-04-19 12:37:45 +02:00
Alx Sa
97d6aa5904 widgets: Close Layer Effects popover when changing images
Resolves #11347

In multi-window mode, it is possible to change images without
causing the layer effects popover to close. This results in the prior
image's layer effects being shown over the new image, which is
confusing. This patch causes the popover to automatically close
when the image is changed to prevent this problem.
2024-04-19 01:58:56 +00:00
Bruno Lopes
9653e50e5f gitlab-ci, build: Unify Debian jobs and add AppImage artifact
AppImage is pretty fast to make, like the win crossbuild; and portable,
being very appropriate to do quick tests on Linux when pushing to git.

The overall organization of Debian jobs was changed to take advantage
of this and make things less complicated (but less clear at first sight).
I reinforce that this was the most efficent way to make the AppImage.
2024-04-18 20:54:49 -03:00
Jehan
df915494d1 gitlab-ci: hack-fix the broken job gimp-flatpak-x64.
This fix doesn't feel right. The whole point of having a generated manifest from
the build was to use it for our flatpak job (through job dependency). Right now,
it has been rendered useless. We must either re-implement the proper job
dependency or find another way to fill the proper "command" with the right
version (maybe just a standalone script to be used in Gitlab CI and which we
could tell about to people who wish to build the nightly flatpak themselves).

Anyway for now, it should do as I don't want to spend too long on this. It
should fix this error in the log generated as artefact of the "gimp-flatpak-x64"
job:

> ../build/flatpak/meson.build:6:2: ERROR: File org.gimp.GIMP-nightly.json.in does not exist.
2024-04-18 23:40:30 +00:00
Jehan
a9814c9e51 build: syncing dependencies with the beta flatpak.
Syncing dependencies back and forth with the current branch, preparing for 3.0.0
RC1 release: https://github.com/flathub/org.gimp.GIMP/pull/287
2024-04-18 23:40:30 +00:00
Alx Sa
e31de151fa scripts: Use GimpFont object in Render Font Map
Resolves #11354

Due to improvements in the text API, we have to pass a GimpFont
object as the last parameter of gimp-text-get-extents-font rather
than just a String.
2024-04-18 23:06:31 +00:00
Jordi Mas
26e116d9b1 Update Catalan translation 2024-04-18 22:23:21 +02:00
Bruno Lopes
975c1891ae data: Generate .env files at build time
These files has been generated by the installer scripts for historical reasons.
Now that we have full-blown local builds and the upcoming MS Store version,
this pervasive pratice can't continue since it creates disparity between builds.
2024-04-18 19:04:25 +00:00
Alx Sa
094ae8eec3 themes: Apply 77ee80f3 to generic spinbuttons
Resolves #11337
2024-04-18 18:57:37 +00:00
Alx Sa
77ee80f329 themes: Removing more instances of -gtk-icon-shadow
Per Bruno Lopes, we should extend aefdb84b to also cover
dropdown box arrows and GimpSpinScale buttons.
2024-04-18 18:06:35 +00:00
Sveinn í Felli
8b181f9925 Update Icelandic translation 2024-04-18 17:51:07 +00:00
Jacob Boerema
a367dec2f8 plug-ins: fix #10787 Page Setup warning/critical
When closing the Page Setup dialog we had warnings and criticals in
the terminal.
The cause for this was that we were looking for the temp procedure
to notify the print plug-in. However, this temp procedure is only
installed if the print plug-in is running, not when running the
Page Setup directly, in which case it is not needed.

We now check if the procedure is valid (meaning the print plug-in is
running) before calling the temp notify procedure.
2024-04-18 12:43:08 -04:00
Sveinn í Felli
bcf30d6c2f Update Icelandic translation 2024-04-18 16:42:49 +00:00
Sveinn í Felli
f04e01aa41 Update Icelandic translation 2024-04-18 16:41:08 +00:00
Alx Sa
ad5e612a1c plug-ins: Fix palette_sort after GeglColorPort
Resolves #11324

Similar to 403af188, we needed to update function calls
that assumed they were receiving a GimpRGB struct rather
than a GeglColor object. Future plans including adding Gegl
functions to retrieve HSV and HSL automatically, rather than
using gegl_color_get_bytes().
2024-04-18 15:42:27 +00:00
Jehan
2434c41a12 app, plug-ins: renaming the file-*-save-internal procs to file-*-export-internal. 2024-04-18 16:02:00 +02:00
Jehan
94853968b3 libgimp: also update unit testing for GimpColorArray.
Making sure not only that the PDB passes correctly the number of colors, but
taking one random color in the array and verifying it is correct.
2024-04-18 16:00:42 +02:00
Jehan
9f149ef3a2 app, libgimp*, plug-ins: get rid of GimpRGB arrays now that we have GeglColor arrays. 2024-04-18 16:00:42 +02:00
Anders Jonsson
2e536b6df1 plug-ins: change file-[gbr/gih/pat]-save to export
Fixes some scripts, followup to
c92cf7e8f2
2024-04-18 12:28:53 +00:00
megakite
e961ff0fe2 app/menus: update tool options menu while initializing menus 2024-04-18 10:22:11 +00:00
Alx Sa
403af1880f plug-ins: Fix GeglColor port of palette-offset
Removes an index that was needed to GimpRGB, but no longer
valid now that gimp_palette_entry_get_color () returns a GeglColor
object. Also, fixed an issue in Interactive Mode where the first
valid palette would be used for every other attempt, no matter which
palette you clicked on.
2024-04-18 04:02:48 +00:00
Alx Sa
dbbdbb45e1 core: Fix filter mask when copied to new image
Switch to using gimp_item_convert ()
instead of gimp_item_duplicate () so that
the filter mask can be properly associated
with a new image when copy/pasted.
2024-04-18 02:25:14 +00:00
Alx Sa
dfb26f37e7 core: Allow copy/pasting NDE filters
Previously, filters were lost when copying
individual layers. This patch copies them
to the clipboard image on cut or copy,
then copies them back to the pasted
image.
It also fixes an issue where filters would
be merged down if a selection was
copied instead of the entire layer.
2024-04-18 02:25:14 +00:00
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
Alx Sa
437cb6b366 plug-ins: Use correct colormap in Flame
Resolves #11292

Since the GimpProcedureDialog port, the "settings-data"
parameter has been used to save and load the selected
color map. However, the parameter was not being updated
when the user switched colormaps in the GUI - therefore, it
always used the "Custom Gradient" option.
This patch updates the "settings-data" parameter after the
change to resolve the issue.
2024-04-13 22:42:01 +00:00
Bruno Lopes
28c65b8a5f gitlab-ci: Drop x86 (aka 32-bit) cross builds for Windows
This isn't directly related with #10922 and does NOT affect 32-bit support.

After talk with @Jehan, author of 'crossroad' and main dev of crossbuilds,
we decided that the x86 crossroad builds can be dropped by these reasons:

1) 32-bit crossbuilds weren't being built. They are used since c8ec0ae7 but
after the native 32-bit builds they ended in a state that they are the only
pipeline that isn't automatically triggered in any way, a complete limbo.

2) 32-bit crossbuilds weren't being autonomous. They are not working fine
with wine32 so the win-x64-cross artifact is a 'need' and now debian-x64,
so we were spending way more time fixing than using the 32-bit cross jobs
(sometimes the 32-bit cross jobs are just broken and we even noticed).
We have other jobs not autonomous but they don't have additional bugs
like not being able to build with .mng and .wmf (32-bit cross only bugs).

---

The x64 crossbuilds will continue to be supported. They are very useful to
develop on Linux, and test MRs on Windows. I'm an assiduous user of them :)
2024-04-13 18:25:47 +00:00
Alx Sa
1f2ce6fe58 plug-ins: Fix Flame crash on interactive run
Resolves #11283

In the GUI, set_flame_preview () is connected to GimpProcedureConfig's
"notify" signal. However it is not disconnected afterwards, so it runs again
after the plug-in is finished and the "setting-data" parameter is updated.
Since the preview area no longer exists, this causes a crash.
This patch resolves the issue by storing the callback ID and then disconnecting
after the GUI is closed.
2024-04-13 17:23:45 +00:00
Bruno Lopes
694e4f382c gitlab-ci: Remove unnecessary manual _ccache/ folder creation
This was added in a22393a6 and e96b751e, following old 2_build-gimp-msys2.sh.
But, according to my tests (local and in the CI, in both Debian and Windows),
meson creates this in setup time so the manual folder creation is redundant.
2024-04-13 16:44:36 +00:00
Bruno Lopes
28f893293a gitlab-ci: Reduce redundancy on Windows cross jobs (take 3)
Following 2c2e779f and 70886e55.
2024-04-13 15:51:32 +00:00
Yuri Chornoivan
9be2e641d1 Update Ukrainian translation 2024-04-13 15:48:39 +00:00
Anders Jonsson
3f0120578d plug-ins: fix duplicate Brightness labels in Flame 2024-04-13 14:37:19 +00:00
Jordi Mas
3d5ce372f9 Update Catalan translation 2024-04-13 15:52:50 +02:00
Bruno Lopes
2c2e779f92 gitlab-ci: Reduce redundancy on Windows cross jobs (take 2)
Following 129c1637a9
2024-04-13 10:00:56 -03:00
Bruno Lopes
bc8ef7998c gitlab-ci: Remove paradoxical redundancy on Windows native jobs
a22393a6 introduced redundancy while removing redundancy
2024-04-13 10:40:21 +00:00
Anders Jonsson
d7c693cc57 Update Swedish translation 2024-04-13 10:04:24 +00:00
Alx Sa
2ee847d8d0 actions: Hide Preview Size dockable option if not needed
Resolves #11250

In 2.10, we explicitly hid "dockable-preview-size-menu", the submenu
for Preview Size, if there were no previews to set sizes for in the
dockable dialogue. In 2.99, this code was removed as part of the
GAction port and code clean-up.
As a result, the Preview Size submenu is always visible even if the
options have no effect on the display. To restore the 2.10 behavior,
we set each Preview Size option's visibility. If all options are hidden,
the submenu does not appear.
2024-04-13 01:43:31 +00:00
Bruno Lopes
129c1637a9 gitlab-ci: Reduce redundancy on Windows cross jobs (take 1)
Our crossroad jobs are too "sensible" and prone to broke so let's go gradually.
2024-04-12 22:02:52 -03:00
Bruno Lopes
dcaaf8a48b gitlab-ci: Overall cosmetic change following e96b751e
Also, drops 'apt-cache' caching since after some experimenting with !1171
this proved to be of little use; and reorganize some dist and analysis jobs.
2024-04-12 21:57:29 +00:00
Guntupalli Karunakar
b35a105f99 Add Hindi translation 2024-04-12 16:36:24 +00:00
Bruno Lopes
e96b751e35 gitlab-ci: Reduce redundancy on Debian native jobs
* Move common things to the new .default section extensible for all jobs
* Reorganize order of job elements to be way more consistent and rational:
  from general (pipeline/rules) to specific (job artifacts) in a liner way
* The order of rules was changed to be a bit more easier to understand
- Drops 'dependencies' which is redudant, and 'needs' have more options
- Drop apt-cache which lost use and it is sometimes troublesome to cache
+ First try to boost the use of ccache in all build jobs, when possible
+ Fix the problem of non-failing jobs introduced by GNOME/gimp!1171
2024-04-12 16:05:42 +00:00
Jehan
9a353b9db9 libgimpwidgets: fix undeclared identifier.
Build for macOS on CI breaks with:

> ../gimp3-2.99.19/libgimpwidgets/gimppickbutton-quartz.c:210:45: error: use of undeclared identifier 'monitor_profile'
>       space = gimp_color_profile_get_space (monitor_profile,
2024-04-12 12:24:53 +02:00
Jehan
ef9de3c263 app: initialize font to NULL.
In case there are no fonts loaded (which may happen in particular when starting
with --no-fonts), we need to make sure that font is initialized to NULL so that
we can return the standard GimpFont object and not a broken pointer.

Thanks to Idriss for the additional diagnosis, which would hopefully complete
commit 5dc86277e6 and take care of #11219.
2024-04-12 12:23:00 +02:00
Martin
0df73ade6c Update Slovenian translation 2024-04-11 20:05:28 +00:00
Bruno Lopes
a22393a67e gitlab-ci: Reduce redundancy on Windows native jobs
This commit uses definitions and references to reduce repetition of CI code.
Some people (like the GitLab devs?) prefer (almost imposes) this to be done in
multiple .yml's using 'worfklow:' but this makes the CI way more complicated
and very slow to read. So, let's just keep simple in one human readable file.

---
Other changes are:
- The custom native arch pipelines now they always generate a .zip package.
  This helps to ensure that everything is in place and facilitate testing;
- The pacman update (-Syyuu) was removed since it is auto done by runners;
- The ccache config was moved to .yml. This does NOT affect local builds
  since meson saves ccache by default for user in '%LocalAppData%/ccache'.
2024-04-11 19:02:49 +00:00
Cheesequake
702d5e1e80 Issue #11071: Changed detailed_signal from "map" to "realize" to enable opening animations 2024-04-11 14:59:15 +00:00
Bruno Lopes
4652022368 gitlab-ci: Expose job artifacts in UI
Makes a bit easier to newcomers download the main artifacts in MRs.
(This feature doesn't support variables or wildcards in paths)
2024-04-11 07:42:13 -03:00
Yuri Chornoivan
c7b2bacbe2 Update Ukrainian translation 2024-04-11 10:28:06 +00:00
Jehan
5dc86277e6 app: set font factory as GimpFont class member regardless of fonts being loaded.
Previous code would only set the class member when we were actually
loading fonts, so we ended with code paths where the member was NULL.

Fixes:

> GIMP-CRITICAL: gimp_container_get_n_children: assertion 'GIMP_IS_CONTAINER (container)' failed

It should hopefully also fix #11219 (though I couldn't reproduce this
failure).
2024-04-11 12:15:59 +02:00
Jehan
3001c2d523 plug-ins: fix include.
This will fix the following warnings:

[1/30] Compiling C object plug-ins/script-fu/libscriptfu/libgimp-scriptfu-3.0.so.0.9900.19.p/script-fu-version.c.o
../../../../../../../greenmarmot/gimp/plug-ins/script-fu/libscriptfu/script-fu-version.c:49:1: warning: no previous declaration for ‘begin_interpret_v3_dialect’ [-Wmissing-declarations]
   49 | begin_interpret_v3_dialect (void)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../greenmarmot/gimp/plug-ins/script-fu/libscriptfu/script-fu-version.c:55:1: warning: no previous declaration for ‘begin_interpret_v2_dialect’ [-Wmissing-declarations]
   55 | begin_interpret_v2_dialect (void)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../greenmarmot/gimp/plug-ins/script-fu/libscriptfu/script-fu-version.c:62:1: warning: no previous declaration for ‘begin_interpret_default_dialect’ [-Wmissing-declarations]
   62 | begin_interpret_default_dialect (void)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../greenmarmot/gimp/plug-ins/script-fu/libscriptfu/script-fu-version.c:69:1: warning: no previous declaration for ‘is_interpret_v3_dialect’ [-Wmissing-declarations]
   69 | is_interpret_v3_dialect (void)
      | ^~~~~~~~~~~~~~~~~~~~~~~
2024-04-11 10:47:20 +02:00
lillolollo
9f86d6b8d0 libgimpwidgets: Replace deprecated CGColorSpaceCopyICCProfile with CGColorSpaceCopyICCData 2024-04-11 01:28:16 +00:00
Alx Sa
49c820e620 dialogs: Use error variable in Welcome Dialog
Resolves #11256

A GError variable was created but not passed to
file_open_with_display () when opening recent files.
As a result, if an error did occur the variable would be
used while it was still NULL. This patch fixes this
by passing a reference to error as the last parameter
of file_open_with_display ().
2024-04-11 01:25:42 +00:00
Anders Jonsson
8e8d2dd4c4 plug-ins: mark DDS progress strings as translatable 2024-04-10 15:30:00 +00:00
Jacob Boerema
5bda6e0623 plug-ins: fix failure to load certain mipmapped DDS images
We compute the size of the mipmapped layers wrong. We assume that
width, height are always exactly a power of 2, which is the normal case
for dds images. See issue #11256.

Since other sizes are possible, we adjust this by computing the width
times height times bytes per pixel of the current mimmap level.
2024-04-09 13:33:36 -04:00
Alx Sa
f346b1783b widgets: Disable DrawableChooser if no layer/channel selected
Resolves #11075

In the DrawableChooser pop-up, choosing an image without
also picking a layer or channel causes the pop-up not to
reappear on subsequent attempts to click it. This is because
the callback is only recreated when the drawable is updated,
and choosing just an image does not update the drawable.
For 3.0, we'll set the Okay button to insensitive unless a layer
or channel is picked.
2024-04-09 12:51:30 +00:00
Alx Sa
f726efba76 Don't convert to float before storing...
...in GeglColor. Just use the "u8" format.
2024-04-09 00:48:35 +00:00
Alx Sa
cc74d40769 libgimpwidgets: Port GimpPickButton to GeglColor
Also have "color-picked" signal send a
GeglColor object rather than GimpRGB.
2024-04-09 00:48:35 +00:00
Jacob Boerema
97e29cb7f6 plug-ins: some improvements to Photoshop layer reading code
I added a few improvements to how we load the Photoshop layers:
- When included from TIFF, we forgot to decrease the data_length for
the parts we already read.
- Also when included from TIFF, we need to skip the global layer mask
info.
- The block length for the layer data needs to be a multiple of 4.
- Catch an invalid data condition where block_len is greater than
total_len. This could cause a change total_len to a very large
value, so protect against that.
2024-04-08 18:07:33 -04:00
Jacob Boerema
c4de209322 plug-ins: incorrect size of Photoshop metadata in TIFF
When loading Photoshop metadata from TIFF images, the size of the data
in the temp file was often incorrect.
This happens because run_mode is usually GIMP_RUN_INTERACTIVE when
run from within GIMP. In interactive mode, the last saved config values
take precedence over the ones set in the function call, which is not
what we want in this case.
We would prefer to use interactive here, because then we can show a
dialog with a list of unsupported Photoshop features that were found
inside the image.
For now, we will use GIMP_RUN_NONINTERACTIVE and accept that we can't
do that at this time. This way we will at least have the correct values
when processing the Photoshop data.
2024-04-08 18:07:32 -04:00
Jacob Boerema
61614a39ca plug-ins: fix reading Photoshop clipping path
The clipping path values are all 2 bytes, but we were only reading in
1 byte for each value. In addition to that, the path_flatness_fixed
value was not converted to the correct Endian representation.

Since these values are usually 0 and get clamped to valid values, this
went unnoticed until now.
2024-04-08 18:07:31 -04:00
Jehan
adb479a63e plug-ins: fix warnings in recent libscriptfu commits.
Fixes 2 such warnings:

> warning: format ‘%i’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]

As well as:

> warning: conversion lacks type at end of format [-Wformat=]

And:

> warning: no previous declaration for ‘reset_output_port_struct’ [-Wmissing-declarations]
2024-04-08 20:43:27 +02:00
Jehan
378e80408d meson: share a same environment for all usages of self-built GIMP
In particular GIMP used for unit-testing, or in other cases as a build tool,
from the non-installed binaries, can use a same meson `env` object.
2024-04-08 20:30:51 +02:00
bootchk
9a2de135ee ScriptFu: fix #10698 and other issues with script progress
Fix unreported issue that new-style dialog using GimpProcedureDialog
does not display progress.

Change progress reporting to use app's status bar, for all scripts,
old and new style.
As before, report progress whenever a script calls a PDB procedure,
by putting the procedure name in the status bar.

Eliminate progress bar widget from old-style script dialog.
Since it was failing on Wayland, and since it is inconsitent
with new style dialog using GimpProcedureDialog.
2024-04-08 11:27:13 -04:00
Alx Sa
23807a3aa3 plug-ins: Port sparkle to GeglColor
Also remove one instance of GimpRGB in
cml-explorer. The remainder requires a
different approach to optimize the filter.
2024-04-07 23:17:12 +00:00
Alx Sa
0ec02a4fa9 libgimpwidgets: Fix CRITICAL when no monitor profile is set
Resolves #11246

On Windows, a CRITICAL was being repeatedly thrown if you
didn't have a monitor profile set. This is because we were trying to
pass a NULL value to g_utf16_to_utf8 () whenever we needed to
convert a GeglColor.
This patch fixes it by checking if the monitor profile filename is NULL
before trying to convert it.
2024-04-07 12:52:24 +00:00
Alx Sa
841d926f4b themes: Prevent .text-button from overwriting radio button background
Resolves #11244

GtkRadioButtons can also have the .text-button CSS class set. This class was overwriting
the radiobutton background color, making it appear dark and box-like.
This adds a specific radiobutton.text-button definition to ensure the background color
is consistent (as we had to do with checkbutton.text-button)
2024-04-07 00:06:52 +00:00
bootchk
2df7874216 ScriptFu: hide "Refresh Scripts"
It is broken and throws critical, see #10596.

Expedient to hide it instead of fixing it, to not block 3.0rc1.

As discussed in #10652, a user can simply restart GIMP instead.
"Refresh Scripts" is a poor design, a bandaid.
There are plans for better alternatives to install/remove scripts.

The MR for #10652 shows the reason it throws critical,
and could fix it,
but completing the MR requires time we don't have.
Note the MR is not on these files, but on core plugin machinery.

The change is to extract functions to a separate file,
and still build them, but not call them or link them.
They also are not translated while not being called.

Eventually, the extracted files can be deleted (or restored when they work.)
There is other related cruft that needs deletion in scheme-wrapper.c.
2024-04-06 14:33:13 -04:00
bootchk
0b9ec0e8b9 ScriptFu: TinyScheme: add call-with-output-string etc to dialect
Add canonical/idiomatic functions call-with-output-string,
call-with-input-string, any->string to the library init.scm.
Since they are useful, especially in test scripts and frameworks.

Remove their definitions from test scripts and test frameworks.

Also comment out failing test in test script string-escape.scm.
2024-04-06 13:43:33 +00:00
bootchk
bf59bf026b ScriptFu: TinyScheme: revise tests of byte operations
Redefine call-with-output-string etc. in the test script: test9.scm
Other fixes to the test script.

Improve logging of no memory condition for string-ports

Fix bug freeing ports that have been closed.
When ports are closed, string-port code was treating them as string-ports.
2024-04-06 13:43:33 +00:00
bootchk
d8e5d694d3 ScriptFu: TinyScheme: major revision and fix bugs string-port
Fix #11040 and #9495 bugs with unicode in string-ports

Fix other unreported bugs with allocations and garbage collection of string-ports.

Obsolete open-input-output-string, a string port of kind input-ouput is no longer supported
and the function actually opens a string-port of kind input which cannot be written.

Comments and Gimp style in the original TinyScheme code, now in string-port.c

Revise tests of string-port.

Update TinyScheme README: Discuss more thoroughly the ancestry, and changes from upstream.
2024-04-06 13:43:33 +00:00
bootchk
b32be06502 ScriptFu: TinyScheme: refactor string-port
Extract pseudo class string-port methods to separate file.

No functional changes intended.

Style changes not complete: anticipate further bug fixes and styling.
2024-04-06 13:43:33 +00:00
bootchk
96da006e4a ScriptFu: TinyScheme: delete unused functions for string-ports 2024-04-06 13:43:33 +00:00
Bruno Lopes
06b18b9c58 themes: Fix title bar mode (following 879cec87)
After the referenced commit, the title bar became to tall. This was
due to lack of testing. Now, both title bar and header bar are 36px.
2024-04-06 09:26:10 -03:00
Luca Bacci
d7228727d7 QuitDialog: disconnect signal handler on dialog destroy
...rather than finalize.

Fixes #10785
2024-04-04 20:18:56 +00:00
Jehan
1c2472a092 libgimpbase: support multiarch folders for binary relocability on Linux.
This is not seen on all distributions (mostly on Debian-based ones in my
experience), but some distributions install libraries in a second-level
directory under prefix (e.g. lib/x86_64-linux-gnu/ instead of lib/ or lib64/)
whereas our prefix-guessing code for relocatable builds harcoded moving up from
1 level.

This new heuristic will assume that if the leaf directory is neither bin/ nor
starting with `lib`, then it's likely a multiarch folder and we must move up
once more to find the prefix folder.

This should also fix the problem encountered by Bruno for the current work on a
potential official AppImage.
2024-04-04 22:10:58 +02:00
Jehan
1387d4d081 NEWS: update. 2024-04-04 18:15:23 +02:00
Alx Sa
0e3f34206a libgimpwidgets: Prevent FileChooser widget from crashing
We dereference "file" twice in gimp_prop_file_chooser_button_callback(),
once in the GIMP_IS_PARAM_SPEC_CONFIG_PATH () condition and then
at the end of the function. This is likely due to a similar structure in 2.10,
which did not have a second condition.
As a result, any Gegl filter which had a file property would crash if set from
a GUI. The first g_object_unref() is removed so we only dereference "file"
once.
2024-04-04 15:23:27 +00:00
Anders Jonsson
134c354a9e app, pdb, plug-ins: lower Spread limit for Distort
Distort can call plug-in-spread with Spread of 1000 which causes an error.
This limits it to 512 which is the highest allowed by gegl:noise-spread
2024-04-04 12:04:12 +00:00
Alx Sa
d0d63efac9 themes: Define box-shadow for tooltips on System theme
Applying cc120f1b to the System theme as well, so that the issue
is resolved for both.
2024-04-03 20:37:59 +00:00
Alx Sa
cc120f1bd9 themes: Define box-shadow for tooltips
Resolves #9795

(Solution provided by Andreas G, @uriesk)
Some system themes provide errant values for tooltip
box-shadows which cause flickering effects.
This patch defines the tooltip box-shadow to 0px to
prevent the issue.
2024-04-03 13:38:01 +00:00
cheesequake
63a134a2b2 Issue #11021: cairo-ARGB32 uses "associated alpha", so changed the new formats accordingly. 2024-04-03 03:12:12 +05:30
Nathan Follens
e34b5d3267 Update Dutch translation 2024-04-02 18:28:51 +00:00
Alx Sa
c44941ae28 core: Resize filters with group layers
Resolves #11054

NDE Filters clip to the size of the layer when
applied. Group layers get their dimensions from
the largest layers under them, so an empty
layer has dimensions of 0 by 0. This means a
filter applied when the layer group is empty will
be clipped to 0 by 0 as well.
This patch adds code to refresh the filter's crop
whenever the group layer is resized by a
layer being added or removed.
2024-04-02 16:36:46 +00:00
Bruno Lopes
70886e554f Partially reverts 9d279a60 and 4f965557
These commits introduced sensible drawbacks in our CI file organization.
Some of them I already commented in the MR but was "ignored" back then
probably due to the complexity of the MR. So, the let's revert:
- Unecessary repetition of libomp installation (4 times, now 1)
- Unecessary repetition of submodule initialization (6 times, now 4)
- Creation of new variables in the hope of more clarity. But,
  they aren't consistent with the gimp-web-devel instructions
  nor with other systems variables. This is terrible to undestand.
  Please, let's not reinvent the wheel since this is a bad example to
  packagers, since they tends to isolation and overly-engineering.

Also, made some little adjustments that I should have done in previous MR.

---

This MR was splitted. Even more simplification will be done in the future.
2024-04-02 11:55:33 +00:00
Alx Sa
10eb615eff widgets: Port gimp_get_color_tag_color ()...
...to accept GeglColor paramaters instead
of GimpRGB. This function is used to draw
the layer/channel color tags.
Note that a temporary GimpRGB was left
to use with gimp_rgb_composite ().
It will be replaced once that function is
also converted to use GeglColor.
2024-04-02 04:00:50 +00:00
Bruno Lopes
2f2027b757 gitlab-ci, build: Unify variables following gimp-web-devel
We should avoid disparity with the build instructions since
contributors will look at the CI files. See:
Infrastructure/gimp-web-devel!54 and Infrastructure/gimp-web-devel!65
2024-04-01 19:01:52 -03:00
Juliano de Souza Camargo
45198023bb Update Brazilian Portuguese translation 2024-04-01 12:42:02 +00:00
Ekaterine Papava
4e43e0ab07 Update Georgian translation 2024-04-01 03:14:45 +00:00
Anders Jonsson
3daaad08d4 app, pdb: raise limit for wavelength argument to Waves plug-in 2024-03-31 17:36:24 +00:00
Alx Sa
c17548f01c xcf: Save/load NDE filter clipping setting
752f0fb4 did not fix saving/loading filters
in .xcf files. To do this, a new function to
retrieve the clip setting was added to
gimpdrawablefilters.c, and then used to
save the value in xcf-save.c. The existing
set_clip function was used in xcf-load.c,
just like in 752f0fb4.
2024-03-31 17:30:00 +00:00
Nathan Follens
3749b23a6c Update Dutch translation 2024-03-31 15:31:01 +00:00
Martin
7aff667ac0 Update Slovenian translation 2024-03-31 15:20:47 +00:00
Alx Sa
752f0fb43d core: Copy filter clipping setting
Resolves #10997
When filters are duplicated for export, the clip property was
not being copied over. This caused filters that go outside the
layer boundaries (like Drop Shadow and Long Shadow) to be
clipped incorrectly. 
The simple fix was to copy over the clip value when the new
filter was duplicated.
2024-03-31 15:15:39 +00:00
Alx Sa
99e0446dfd libgimpcolor: Port gimp_cairo_checkerboard_create ()...
to GeglColor.
2024-03-31 01:09:45 +00:00
Martin
796ff8233d Update Slovenian translation 2024-03-30 22:38:03 +00:00
2010 changed files with 578290 additions and 465172 deletions

View File

@@ -9,15 +9,22 @@ BasedOnStyle: GNU
AlignAfterOpenBracket: Align
AlignArrayOfStructures: Left
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveDeclarations: Consecutive
AlignConsecutiveMacros: Consecutive
AlignConsecutiveAssignments: AcrossComments
AlignConsecutiveDeclarations: AcrossComments
AlignConsecutiveBitFields: AcrossComments
AlignConsecutiveMacros: AcrossComments
AlignEscapedNewlines: Left
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakAfterReturnType: AllDefinitions
BinPackParameters: false
BinPackArguments: true
# Uncomment when our CI uses LLVM 20.
# See: https://github.com/llvm/llvm-project/issues/117830
# BinPackParameters: AlwaysOnePerLine
BreakBeforeBinaryOperators: None
BreakBeforeBraces: GNU
BreakBeforeTernaryOperators: false
IndentWidth: 2
PointerAlignment: Right
UseTab: Never

2
.gitignore vendored
View File

@@ -1,2 +0,0 @@
# Meson
/compile_commands.json

File diff suppressed because it is too large Load Diff

View File

@@ -3,13 +3,21 @@ This is the default template for bug reports.
For feature requests or performance issues, please switch instead to the appropriate template in the "Choose a template" list.
It is important that you fill all the fields of the template.
There are a few issues we get reports about quite frequently. If you want to check if what you have encountered is among these, please see:
https://gitlab.gnome.org/GNOME/gimp/-/issues/?sort=updated_desc&state=all&label_name%5B%5D=Duplication%20target&first_page_size=100
**Code of Conduct**: "Be considerate and respectful" is our main rule.
E.g. avoid negative emotional writing which only generates more upsetting
interactions. Thanks!
-->
### Environment/Versions
- GIMP version:
- GIMP version number:
- Package: <!--[flatpak? Installer from gimp.org? If another installer, tell us where from] (write it after the > symbol)-->
- Operating System: <!--[Windows? macOS? Linux? All?] (write it after the > symbol) -->
- Operating System: <!--[Windows? macOS? Linux? All? Add OS versions too] (write it after the > symbol) -->
- (if Linux) Display system: <!--[X11? Wayland? Which compositor and version?] (write it after the > symbol) -->
<!--Note: bug reporters are expected to have verified the bug still exists
either in the last stable version of GIMP or on updated development code
@@ -18,7 +26,7 @@ either in the last stable version of GIMP or on updated development code
### Description of the bug
<!--Please describe your issue with details.
Add screenshot or other files if needed.(write it after the > symbol)-->
Add full (not cropped) screenshots or other files if needed.(write it after the > symbol)-->
### Reproduction

View File

@@ -3,8 +3,11 @@
### Description of the feature
<!-- Please describe your feature with details. Also:
- If the feature is UI-related, add screenshots, mockups or videos;
- If the feature is about some standard or API, link relevant resources;
- If the feature is UI-related, please DO NOT REPORT HERE but on
gimp-ux: https://gitlab.gnome.org/Teams/GIMP/Design/gimp-ux/-/issues;
- If the feature is about some image file format on GIMP, first check if it
is not already listed on https://developer.gimp.org/core/standards/images,
then you can make the request, ideally linking relevant resources (e.g. specs);
- If you have a patch, see: https://developer.gimp.org/core/submit-patch/ -->
### Use cases

View File

@@ -1,4 +1,4 @@
Contribution guidelines:
<!-- Contribution guidelines:
- Follow our coding style, which is mostly the GNU coding style
with some specificities: see [Coding Style](https://developer.gimp.org/core/coding_style/).
@@ -8,8 +8,5 @@ Contribution guidelines:
- Check the following option when making your request:
"*Allow commits from members who can merge to the target branch.*"
- Enable the container registry for your repository by following this
documentation, but enabling the feature instead of disabling it
(unlike what the docs says, Container Registry is disabled by default
on our Gitlab instance):
https://docs.gitlab.com/ee/user/packages/container_registry/#disable-the-container-registry-for-a-project
- No AI-generated contents allowed (neither code nor text, images…).
Only human created works please! -->

View File

@@ -0,0 +1,167 @@
#!/bin/bash
source .gitlab/search-common-ancestor.sh
diff=$(git diff -U0 --no-color "${newest_common_ancestor_sha}" -- '*.build' '*.py' | grep -E '^\+[^+]' | sed 's/^+//')
#List of commonly used utilities on Unix world
#See the context: https://gitlab.gnome.org/GNOME/gimp/-/issues/11385
coreutils_array=(
".sh"
"'sh'"
"'bash'"
"'\['"
"'arch'"
"'awk'"
"'b2sum'"
"'base32'"
"'base64'"
"'basename'"
"'basenc'"
"'cat'"
"'chcon'"
"'chgrp'"
"'chmod'"
"'chown'"
"'chroot'"
"'cksum'"
"'cmp'"
"'comm'"
"'cp'"
"'csplit'"
"'cut'"
"'date'"
"'dd'"
"'df'"
"'diff'"
"'dir'"
"'dircolors'"
"'dirname'"
"'du'"
"'echo'"
"'env'"
"'expand'"
"'expr'"
"'factor'"
"'false'"
"'find'"
"'fmt'"
"'fold'"
"'gkill'"
"'grep'"
"'groups'"
"'head'"
"'hostid'"
"'hostname'"
"'id'"
"'install'"
"'join'"
"'link'"
"'ln'"
"'logname'"
"'ls'"
"'md5sum'"
"'mkdir'"
"'mkfifo'"
"'mknod'"
"'mktemp'"
"'mv'"
"'nice'"
"'nl'"
"'nohup'"
"'nproc'"
"'numfmt'"
"'od'"
"'paste'"
"'pathchk'"
"'pinky'"
"'pr'"
"'printenv'"
"'printf'"
"'ptx'"
"'pwd'"
"'readlink'"
"'realpath'"
"'rm'"
"'rmdir'"
"'runcon'"
"'sed'"
"'seq'"
"'sha1sum'"
"'sha224sum'"
"'sha256sum'"
"'sha384sum'"
"'sha512sum'"
"'shred'"
"'shuf'"
"'sleep'"
"'sort'"
"'split'"
"'stat'"
"'stdbuf'"
"'stty'"
"'sum'"
"'sync'"
"'tac'"
"'tail'"
"'tee'"
"'test'"
"'timeout'"
"'touch'"
"'tr'"
"'true'"
"'truncate'"
"'tsort'"
"'tty'"
"'uname'"
"'unexpand'"
"'uniq'"
"'unlink'"
"'users'"
"'vdir'"
"'wc'"
"'who'"
"'whoami'"
"'yes'"
)
for coreutil in "${coreutils_array[@]}"; do
if echo "$diff" | grep -q "$coreutil"; then
found_coreutils+=" $coreutil"
fi
done
if [ "$found_coreutils" ]; then
echo -e '\033[31m(ERROR)\033[0m: Seems that you are trying to add an Unix-specific dependency to be called by Meson.'
echo " Please, port to Python (which is crossplatform), your use of:${found_coreutils}."
fi
#Limited list of commonly used utilities on Windows world
ntutils_array=(
".bat"
".cmd"
".ps1"
"'cmd'"
"'powershell'"
)
for ntutil in "${ntutils_array[@]}"; do
if echo "$diff" | grep -q "$ntutil"; then
found_ntutils+=" $ntutil"
fi
done
if [ "$found_ntutils" ]; then
echo -e '\033[31m(ERROR)\033[0m: Seems that you are trying to add a NT-specific dependency to be called by Meson.'
echo " Please, port to Python (which is crossplatform), your use of:${found_ntutils}."
fi
if [ "$found_coreutils" ] || [ "$found_ntutils" ]; then
exit 1
fi
echo 'Meson .build files are alright regarding crossplatform.'
exit 0

View File

@@ -24,13 +24,13 @@ git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%
# fall back to `${CI_DEFAULT_BRANCH}` or `${CI_COMMIT_BRANCH}` respectively
# otherwise.
# add mr-origin
git remote add mr-origin ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}
# add patch-origin
git remote add patch-origin ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL:-${CI_PROJECT_URL}}
source_branch="${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-${CI_COMMIT_BRANCH}}"
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" mr-origin "${source_branch}" &> ./fetch_origin.log
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" patch-origin "${source_branch}" &> ./fetch_origin.log
newest_common_ancestor_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "upstream/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}") <(git rev-list --first-parent "mr-origin/${source_branch}") | head -1)
newest_common_ancestor_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "upstream/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}") <(git rev-list --first-parent "patch-origin/${source_branch}") | head -1)
if [ -z "${newest_common_ancestor_sha}" ]; then
echo "Couldnt find common ancestor with upstream main branch. This typically"
echo "happens if you branched from main a long time ago. Please update"

View File

@@ -61,6 +61,7 @@ The following people have contributed code to GIMP:
Jay Cox
Kevin Cozens
Jeremiah Darais
Shubham Daule
Michael Deal
Alexia Death
Brian Degenhardt
@@ -81,6 +82,7 @@ The following people have contributed code to GIMP:
Morton Eriksen
Larry Ewing
Dirk Farin
Idriss Fekir
Pedro Alonso Ferrer
Nick Fetchak
Piotr Filiciak
@@ -170,6 +172,7 @@ The following people have contributed code to GIMP:
Tobias Lenz
Frederic Leroy
Raph Levien
Bruno Lopes
Wing Tung Leung
Dave Lichterman
Adrian Likins
@@ -352,7 +355,9 @@ The following people have contributed art to GIMP:
Karl La Rocca
Andreas Nilsson
Ville Pätsi
Denis Rangelov
Mike Schaeffer
Sevenix
Carol Spears
Klaus Staedtler
Jakub Steiner

View File

@@ -1,12 +1,12 @@
---------------------------------------
--------------------------------------
Installation instructions for GIMP @GIMP_APP_VERSION@
---------------------------------------
--------------------------------------
There are some basic steps to building and installing GIMP.
GIMP @GIMP_APP_VERSION@ replaces earlier GIMP 2.99.x versions. It is advised to
GIMP @GIMP_APP_VERSION@ replaces earlier GIMP 2.10.x versions. It is advised to
uninstall them before installing GIMP @GIMP_APP_VERSION@. Since libgimp* libraries
and data are all versionned anyway, it is possible to keep your older
and data are all versioned anyway, it is possible to keep your older
GIMP 2.x installation in parallel to GIMP @GIMP_APP_VERSION@ on a same prefix.
GIMP @GIMP_APP_VERSION@ is not backward compatible with GIMP 2.10 and earlier
@@ -37,8 +37,10 @@ help in that regard:
******************************************************************
1. You need to have installed a recent version of pkg-config (>= @GIMP_PKGCONFIG_VERSION@) available
from https://www.freedesktop.org/software/pkgconfig/.
1. You need to have installed a recent version of pkg-config available from:
https://www.freedesktop.org/software/pkgconfig/
The compatible pkgconf utility would also work.
2. You need gettext version 0.19.8 or newer. Older versions did not have support yet
@@ -101,10 +103,15 @@ help in that regard:
be installed. All these libraries are required dependencies.
8. For metadata access GIMP requires the gexiv2 @GEXIV2_REQUIRED_VERSION@ or newer library.
It is hosted at: https://wiki.gnome.org/Projects/gexiv2
It is hosted at: https://gitlab.gnome.org/GNOME/gexiv2/
9. libpng, libjpeg, libtiff, librsvg and lcms are hard dependencies
that can not be disabled.
that can not be disabled. poppler is also a hard dependency because
PDF is too common nowadays for it to be an option (at least for
import); and poppler-data (CJK and Cyrillic support in PDF) is also
required because no languages should be considered "second class
citizen". If we support PDF, let's support it properly, i.e.
exhaustively.
There might be some issues with librsvg, based on the fact newer
versions are in Rust which is not buildable on all platforms. Yet
@@ -168,7 +175,7 @@ help in that regard:
For HTTP support (and many other schemes), on Linux at least, you
should install `gvfs`:
https://wiki.gnome.org/Projects/gvfs
https://gitlab.gnome.org/GNOME/gvfs/
It is unclear whether `gvfs` can be built and installed on other
platforms such as Windows and macOS.
@@ -193,10 +200,22 @@ help in that regard:
https://github.com/strukturag/libheif
Make sure you build libheif with libde265 and libx265 support (for
respectively decoding and encoding of HEVC, i.e. HEIC files), and
libaom decoder and encoder (for AV1, i.e. AVIF files), otherwise
the plug-in is mostly useless.
GIMP supports several HEIF variants (different coding formats in
the HEIF container), so you should make sure you build libheif with
proper encoders and decoders for these:
* HEIC: e.g. libde265 and libx265 support (for
respectively decoding and encoding of HEVC).
* AVIF: e.g. libaom decoder and encoder (for AV1 encoding and
decoding), prefered over rav1e.
* HEJ2: OpenJPEG (for JPEG2000 inside HEIF).
If you don't compile libheif with the correct flags (see libheif
README which has a table of supported codecs), the plug-in is
mostly useless.
If HEIF support doesn't look like it works on relocatable
environments, the environment variable LIBHEIF_PLUGIN_PATH may be
what you are looking for.
15. GObject Introspection requires the following dependencies to be
built and installed with introspection as well: babl, cairo,
@@ -240,6 +259,8 @@ help in that regard:
GTK @GTK_REQUIRED_VERSION@
gvfs (on Linux)
HarfBuzz @HARFBUZZ_REQUIRED_VERSION@
json-glib @JSON_GLIB_REQUIRED_VERSION@
libarchive
libbzip2
libjpeg
liblzma @LIBLZMA_REQUIRED_VERSION@
@@ -252,6 +273,8 @@ help in that regard:
mypaint-brushes-1.0
pangocairo @PANGO_REQUIRED_VERSION@
poppler-data @POPPLER_DATA_REQUIRED_VERSION@
PyGObject
Python @PYTHON3_REQUIRED_VERSION@
zlib
22. Summary of optional packages:
@@ -260,11 +283,13 @@ help in that regard:
cairo-pdf @CAIRO_PDF_REQUIRED_VERSION@ PDF export
cfitsio - FITS
iso-codes - Language selection
ExcHndl - Crash logs on Windows with Dr. MinGW
gs - ghostscript
libaa - ASCII art
libheif @LIBHEIF_REQUIRED_VERSION@ HEIF
libheif @LIBHEIF_REQUIRED_VERSION@ HEIF (HEIC, AVIF)
libilbm - Amiga IFF/ILBM
libjxl @LIBJXL_REQUIRED_VERSION@ JPEG XL
libmng - MNG
libwebp @WEBP_REQUIRED_VERSION@ WebP (built with --enable-libwebpmux and --enable-libwebpdemux)
libwmf @WMF_REQUIRED_VERSION@ WMF
@@ -284,12 +309,19 @@ help in that regard:
sendmail for sending emails if --with-sendmail enabled
gdb or lldb for our new bug-reporting dialog
"gegl:matting-levin" GEGL operation for alternative matting engine
Python @PYTHON3_REQUIRED_VERSION@ and PyGObject for Python 3 plug-ins
GJS for Javascript plug-ins
LuaJIT and LGI for Lua plug-ins
dot for "Show Image Graph" (unstable branches)
xdg-desktop-portal implemented for your desktop for various D-Bus API (screenshot, color-picking…)
24. Summary of experimental or unmaintained dependencies:
Lua 5.1 (or LuaJIT) and LGI: Lua plug-in example is disabled by
default because of stability issues with the Lua binding.
Webkit-GTK @WEBKITGTK_REQUIRED_VERSION@: the Help Browser and Webpage
plug-ins are disabled for lack of maintenance and issues with
Webkit-GTK
Generic instructions for configuring and compiling auto-configured
@@ -299,9 +331,9 @@ compilation and installation output is not shown.
% tar xvf gimp-@GIMP_VERSION@.tar.xz # unpack the sources
% cd gimp-@GIMP_VERSION@ # change to the toplevel directory
% meson _build # `configure' step
% ninja -C _build # build GIMP
% ninja -C _build install # install GIMP
% meson setup _build # `configure' step
% ninja -C _build # build GIMP
% ninja -C _build install # install GIMP
The `configure' step examines your system, and adapts GIMP to run on
@@ -325,9 +357,10 @@ These are:
a convenience for developers.
-Dgimpdir=DIR. This option changes the default directory GIMP uses to
search for its configuration files from ~/.config/GIMP/@GIMP_APP_VERSION@ (the
directory .config/GIMP/@GIMP_APP_VERSION@ in the user's home directory) to
~/.config/DIR/@GIMP_APP_VERSION@.
search for its configuration files from $XDG_CONFIG_HOME/GIMP/@GIMP_APP_VERSION@/
(per XDG Base Directory Specification, $XDG_CONFIG_HOME defaults to
the directory .config/ in the user's home directory) to
$XDG_CONFIG_HOME/DIR/@GIMP_APP_VERSION@/.
If DIR is an absolute path, the directory will be changed to DIR.
-Dshmem-type=[none|sysv|posix|win32|auto]. This option allows you to
@@ -366,10 +399,6 @@ These are:
-Dgi-docgen=enabled|disabled This option controls whether the libgimp
C API references will be created using gi-docgen.
-Dg-ir-doc=true This option controls whether the libgimp API
references for some binding languages will be created using
g-ir-doc-tool and yelp-build.
-Denable-multiproc=false This option allows you to disable support for
multiple processors. It is enabled by default.
@@ -386,14 +415,11 @@ These are:
gimp-console binary to be built in addition to the standard binary.
gimp-console is useful for command-line batch mode or as a server.
-Dpython=false If for some reason you don't want to install the
Python plug-ins, you can use -Dpython=false.
-Djavascript=false If for some reason you don't want to install the
-Djavascript=disabled If for some reason you don't want to install the
JavaScript plug-ins, you can use -Djavascript=false.
-Dlua=false If for some reason you don't want to install the
Lua plug-ins, you can use -Dlua=false.
-Dlua=true Lua binding is experimental because of stability issues.
You may test the feature by enabling it.
-Dvala-plugins=disabled If for some reason you don't want to install the
Vala plug-ins, you can use -Dvala-plugins=disabled.
@@ -419,73 +445,53 @@ was successful you should be able to run `gimp'.
When configure fails
======================
The configuration step uses pkg-config, a tool that replaces the old foo-config
scripts. The most recent version is available from
https://www.freedesktop.org/software/pkgconfig/
'configure' tries to compile and run a short GTK program. There are
several reasons why this might fail:
* pkg-config could not find the file 'gtk+-3.0.pc' that gets installed
with GTK. (This file is used to get information about where GTK+ is
installed.)
Fix: Either make sure that this file is in the path where pkg-config
looks for it (try 'pkg-config --debug' or add the location of
gtk+-3.0.pc to the environment variable PKG_CONFIG_PATH before running
configure.
* Libraries you installed are not found when you attempt to start GIMP.
The details of how to fix this problem will depend on the system:
On Linux and other systems using ELF libraries, add the directory to
holding the library to /etc/ld.so.conf or to the environment variable
LD_LIBRARY_PATH, and run 'ldconfig'.
On other systems, it may be necessary to encode this path
into the executable, by setting the LDFLAGS environment variable
before running configure. For example:
LDFLAGS="-R/home/joe/lib" ./configure
or
LDFLAGS="-Wl,-rpath -Wl,/home/joe/lib" ./configure
* An old version of the GTK libraries was found instead of
your newly installed version. This commonly happens if a
binary package of GTK was previously installed on your system,
and you later compiled GTK from source.
Fix: Remove the old libraries and include files. If you are afraid
that removing the old libraries may break other packages supplied by
your distributor, you can try installing GLib, GTK and other
libraries in a different prefix after setting the environment
variable PKG_CONFIG_LIBDIR to point to lib/pkgconfig/ in that new
prefix so that it does not try to read the *.pc files from the
default directory (/usr/lib/pkgconfig). However, removing the old
packages is often the easier solution.
The most important is to read the error output displayed by meson, as it
will very likely tell you the exact problem.
A detailed log of the meson output is written to the file meson-logs/meson-log.txt.
This may help diagnose problems.
The configuration step verify that various tools are installed, such as:
C and C++ compilers, pkg-config or pkgconf (tools that replaces the old
foo-config scripts), and more. Make sure these are installed.
When meson configure fails on plug-ins
======================================
Then it will try to search for various libraries, by looking up a `.pc`
file (used to get information on installation details). For instance if
pkg-config could not find the file 'gtk+-3.0.pc' that gets installed
with GTK, verify that the development package of GTK+3 is installed or
that you have a version equal or higher than the required version.
There are some GIMP plug-ins that need additional third-party libraries
installed on your system. For example to compile the plug-ins that load
and save JPEG, PNG or TIFF files you need the related libraries and header
files installed, otherwise you'll get a message that plug-in xyz will not
be built.
If you installed a supported version of a dependency but the configure
step still cannot find it, you may need to add the location of the .pc
file to the environment variable PKG_CONFIG_PATH before running meson
setup.
If you are sure that those libraries are correctly installed, but configure
fails to detect them, the following might help:
When you use custom installation prefixes for dependencies, you will
likely need to set more environment variables, such as LD_LIBRARY_PATH
or GI_TYPELIB_PATH, either for the configuration to succeed, the build
itself or to start GIMP at all.
Please check out our building tutorial for more in-depth details:
Set your LDFLAGS environment variable to look for the library in a certain
place, e.g. if you are working in a bash shell you would say:
export LDFLAGS="-L<path_to_library> -L<path_to_another_one>"
before you run configure.
https://developer.gimp.org/core/setup/build/
Set your CPPFLAGS environment variable to look for the header file in a
certain place, e.g. if you are working in a bash shell you would say:
export CPPFLAGS="-I<path_to_header_file> -I<path_to_another_one>"
before you run meson.
About optional features
=======================
When the configure step succeeds, it will display a summary of which
optional features or plug-ins will be installed.
There are some GIMP features, in particular for the support of more
recent or less used image formats, that need additional third-party
libraries installed on your system. You need the related libraries and
header files installed for these, otherwise the compiled GIMP will be a
minimal version without these features.
Once you installed them, run the following command to trigger a
reconfiguration:
% ninja reconfigure
Verify that the optional features you wanted are now shown as `true`,
otherwise follow similar advices than above to make sure they are
visible to your setup.

2732
NEWS

File diff suppressed because it is too large Load Diff

3519
NEWS.pre-3-0 Normal file

File diff suppressed because it is too large Load Diff

16
README
View File

@@ -1,16 +1,14 @@
------------------------------
GNU Image Manipulation Program
2.99 Development Branch
3.0 Stable Branch
------------------------------
This is an unstable development release, an intermediate state on the
way to the next stable release: GIMP 3.0. GIMP 2.99 may or may not do
what you expect. Save your work early and often. If you want a stable
version, please use GIMP 2.10 instead.
This is a stable release in the GIMP 3.0 series.
If you think you found a bug in this version, please make sure that it
hasn't been reported earlier and that it is not just new stuff that is
still being worked on and obviously not quite finished yet.
still being worked on and obviously not quite finished yet. If neither
of these, please report it!
If you want to hack on GIMP, please read the file devel-docs/README.md.
For detailed installation instructions, see the file INSTALL.
@@ -24,7 +22,7 @@ GIMP's home page is at:
https://www.gimp.org/
Please be sure to visit this site for information, documentation,
tutorials, news, etc. All things GIMP-ish are available from there.
tutorials, news, etc. All things GIMP-ish are available from there.
The latest version of GIMP can be found at:
@@ -81,11 +79,11 @@ also included in that page.
The look of GIMP's interface can be customized like any other GTK+ app
by editing files in `${XDG_CONFIG_HOME}/gtk-3.0/` (settings.ini and
gtk.css in particular) or by using "themes" (ready-made customizations).
Additionally, GIMP reads `${XDG_CONFIG_HOME}/GIMP/2.99/gimp.css` so you
Additionally, GIMP reads `${XDG_CONFIG_HOME}/GIMP/3.0/gimp.css` so you
can have settings that only apply to GIMP.
You can also manually change the keybindings to any of your choice by
editing: `${XDG_CONFIG_HOME}/GIMP/2.99/shortcutsrc`.
editing: `${XDG_CONFIG_HOME}/GIMP/3.0/shortcutsrc`.
Have fun,

View File

@@ -19,13 +19,13 @@ GIMP is different
not one catalog but many. For a full translation of GIMP's UI, you
will have to add translations for the following catalogs:
po/gimp20.po -- the core
po-libgimp/gimp20-libgimp.pot -- the libgimp library
po-plugins/gimp20-std-plugins.pot -- the C plug-ins
po-python/gimp20-python.pot -- the pygimp plug-ins
po-script-fu/gimp20-script-fu.pot -- the script-fu scripts
po-tips/gimp20-tips.pot -- the startup tips
po-windows-installer/gimp20-windows-installer.pot -- the windows installer
po/gimp30.pot -- the core
po-libgimp/gimp30-libgimp.pot -- the libgimp library
po-plugins/gimp30-std-plugins.pot -- the C plug-ins
po-python/gimp30-python.pot -- the pygimp plug-ins
po-script-fu/gimp30-script-fu.pot -- the script-fu scripts
po-tips/gimp30-tips.pot -- the startup tips
po-windows-installer/gimp30-windows-installer.pot -- the windows installer
If you are looking for the translations of gimp-perl, please note that
gimp-perl has been moved into it's own git module called

View File

@@ -23,9 +23,18 @@ gimp_debug_tool = executable('gimp-debug-tool' + exec_ver,
install_dir: gimp_debug_tool_dir
)
if enable_default_bin and meson.version().version_compare('>=0.61.0')
install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimp_debug_tool.full_path()),
install_dir: gimp_debug_tool_dir
)
if enable_default_bin
if not platform_windows
install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimp_debug_tool.full_path()),
install_dir: gimp_debug_tool_dir)
install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, '-@0@'.format(api_version_major)),
pointing_to: fs.name(gimp_debug_tool.full_path()),
install_dir: gimp_debug_tool_dir)
else
meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))',
gimp_debug_tool.full_path(), get_option('prefix'), fs.name(gimp_debug_tool.name()).replace(exec_ver, '.exe'))
meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))',
gimp_debug_tool.full_path(), get_option('prefix'), fs.name(gimp_debug_tool.name()).replace(exec_ver, '-@0@.exe'), api_version_major.to_string())
endif
endif

View File

@@ -36,7 +36,9 @@ typedef enum
GIMP_ACTION_SELECT_SKIP_PREVIOUS = -8,
GIMP_ACTION_SELECT_SKIP_NEXT = -9,
GIMP_ACTION_SELECT_PERCENT_PREVIOUS = -10,
GIMP_ACTION_SELECT_PERCENT_NEXT = -11
GIMP_ACTION_SELECT_PERCENT_NEXT = -11,
GIMP_ACTION_SELECT_FLAT_PREVIOUS = -12,
GIMP_ACTION_SELECT_FLAT_NEXT = -13,
} GimpActionSelectType;
typedef enum

View File

@@ -28,6 +28,7 @@
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpitem.h"
#include "core/gimptooloptions.h"
#include "core/gimptoolinfo.h"
@@ -80,6 +81,7 @@
#include "mypaint-brushes-actions.h"
#include "palette-editor-actions.h"
#include "palettes-actions.h"
#include "paths-actions.h"
#include "patterns-actions.h"
#include "plug-in-actions.h"
#include "quick-mask-actions.h"
@@ -93,7 +95,6 @@
#include "tool-preset-editor-actions.h"
#include "tools-actions.h"
#include "vector-toolpath-actions.h"
#include "vectors-actions.h"
#include "view-actions.h"
#include "windows-actions.h"
@@ -238,9 +239,9 @@ static const GimpActionFactoryEntry action_groups[] =
{ "vector-toolpath", N_("Path Toolpath"), GIMP_ICON_PATH,
vector_toolpath_actions_setup,
vector_toolpath_actions_update },
{ "vectors", N_("Paths"), GIMP_ICON_PATH,
vectors_actions_setup,
vectors_actions_update },
{ "paths", N_("Paths"), GIMP_ICON_PATH,
paths_actions_setup,
paths_actions_update },
{ "view", N_("View"), GIMP_ICON_VISIBLE,
view_actions_setup,
view_actions_update },
@@ -729,6 +730,91 @@ action_select_object (GimpActionSelectType select_type,
select_index = gimp_container_get_child_index (container, current) + 10;
break;
case GIMP_ACTION_SELECT_FLAT_PREVIOUS:
/* XXX We only support this case and the next for GimpItem
* containers.
*/
g_return_val_if_fail (GIMP_IS_ITEM (current), NULL);
select_index = gimp_container_get_child_index (container, current) - 1;
if (select_index < 0)
{
GimpItem *parent = gimp_item_get_parent (GIMP_ITEM (current));
if (parent)
return GIMP_OBJECT (parent);
else
return current;
}
else
{
GimpObject *prev;
GimpContainer *prev_container;
prev = gimp_container_get_child_by_index (container, select_index);
while ((prev_container = gimp_viewable_get_children (GIMP_VIEWABLE (prev))) != NULL)
{
if (gimp_viewable_get_expanded (GIMP_VIEWABLE (prev)))
{
gint n_prev_children;
n_prev_children = gimp_container_get_n_children (prev_container);
if (n_prev_children > 0)
{
select_index = n_prev_children - 1;
container = prev_container;
prev = gimp_container_get_child_by_index (container, select_index);
continue;
}
}
break;
}
}
break;
case GIMP_ACTION_SELECT_FLAT_NEXT:
{
GimpContainer *current_container;
g_return_val_if_fail (GIMP_IS_ITEM (current), NULL);
if ((current_container = gimp_viewable_get_children (GIMP_VIEWABLE (current))) != NULL &&
gimp_viewable_get_expanded (GIMP_VIEWABLE (current)) &&
gimp_container_get_n_children (current_container) > 0)
{
select_index = 0;
container = current_container;
}
else
{
select_index = gimp_container_get_child_index (container, current) + 1;
if (select_index >= n_children)
{
while (TRUE)
{
GimpItem *parent;
GimpContainer *parent_container;
gint n_parent_children;
parent = gimp_item_get_parent (GIMP_ITEM (current));
if (parent == NULL)
break;
parent_container = gimp_item_get_container (parent);
n_parent_children = gimp_container_get_n_children (parent_container);
if (gimp_container_get_child_index (parent_container, GIMP_OBJECT (parent)) + 1 < n_parent_children)
{
container = parent_container;
select_index = gimp_container_get_child_index (parent_container, GIMP_OBJECT (parent)) + 1;
break;
}
current = GIMP_OBJECT (parent);
}
}
}
}
break;
default:
if ((gint) select_type >= 0)
select_index = (gint) select_type;
@@ -737,6 +823,7 @@ action_select_object (GimpActionSelectType select_type,
break;
}
n_children = gimp_container_get_n_children (container);
select_index = CLAMP (select_index, 0, n_children - 1);
return gimp_container_get_child_by_index (container, select_index);

View File

@@ -109,10 +109,10 @@ void action_message (GimpDisplay *display,
if (! channels) \
return
#define return_if_no_vectors_list(image,list,data) \
#define return_if_no_paths(image,paths,data) \
return_if_no_image (image,data); \
list = gimp_image_get_selected_vectors (image); \
if (! list) \
paths = gimp_image_get_selected_paths (image); \
if (! paths) \
return

View File

@@ -20,6 +20,7 @@
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
@@ -125,7 +126,7 @@ buffers_paste_as_new_image_cmd_callback (GimpAction *action,
GIMP_OBJECT (buffer),
context);
gimp_create_display (context->gimp, new_image,
GIMP_UNIT_PIXEL, 1.0,
gimp_unit_pixel (), 1.0,
G_OBJECT (gimp_widget_get_monitor (widget)));
g_object_unref (new_image);
}

View File

@@ -273,6 +273,8 @@ channels_actions_update (GimpActionGroup *group,
gint n_channels = 0;
gboolean have_prev = FALSE; /* At least 1 selected channel has a previous sibling. */
gboolean have_next = FALSE; /* At least 1 selected channel has a next sibling. */
gboolean first_selected = FALSE; /* First channel is selected */
gboolean last_selected = FALSE; /* Last channel is selected */
if (image)
{
@@ -302,14 +304,16 @@ channels_actions_update (GimpActionGroup *group,
if (list)
{
if (gimp_item_get_index (list->data) == 0)
first_selected = TRUE;
if (gimp_item_get_index (list->data) == n_channels - 1)
last_selected = TRUE;
if (g_list_previous (list))
have_prev = TRUE;
if (g_list_next (list))
have_next = TRUE;
}
if (have_prev && have_next)
break;
}
}
}
@@ -324,9 +328,9 @@ channels_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("channels-duplicate", !fs && (n_selected_channels > 0 || component));
SET_SENSITIVE ("channels-delete", !fs && n_selected_channels > 0);
SET_SENSITIVE ("channels-raise", !fs && n_selected_channels > 0 && have_prev);
SET_SENSITIVE ("channels-raise", !fs && n_selected_channels > 0 && have_prev && !first_selected);
SET_SENSITIVE ("channels-raise-to-top", !fs && n_selected_channels > 0 && have_prev);
SET_SENSITIVE ("channels-lower", !fs && n_selected_channels > 0 && have_next);
SET_SENSITIVE ("channels-lower", !fs && n_selected_channels > 0 && have_next && !last_selected);
SET_SENSITIVE ("channels-lower-to-bottom", !fs && n_selected_channels > 0 && have_next);
SET_SENSITIVE ("channels-selection-replace", !fs && (n_selected_channels > 0 || component));

View File

@@ -232,7 +232,15 @@ channels_raise_cmd_callback (GimpAction *action,
index = gimp_item_get_index (iter->data);
if (index > 0)
raised_channels = g_list_prepend (raised_channels, iter->data);
{
raised_channels = g_list_prepend (raised_channels, iter->data);
}
else
{
gimp_image_flush (image);
g_list_free (raised_channels);
return;
}
}
gimp_image_undo_group_start (image,
@@ -240,7 +248,7 @@ channels_raise_cmd_callback (GimpAction *action,
ngettext ("Raise Channel",
"Raise Channels",
g_list_length (raised_channels)));
raised_channels = g_list_reverse (raised_channels);
for (iter = raised_channels; iter; iter = iter->next)
gimp_image_raise_item (image, iter->data, NULL);
@@ -304,7 +312,15 @@ channels_lower_cmd_callback (GimpAction *action,
layer_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
index = gimp_item_get_index (iter->data);
if (index < g_list_length (layer_list) - 1)
lowered_channels = g_list_prepend (lowered_channels, iter->data);
{
lowered_channels = g_list_prepend (lowered_channels, iter->data);
}
else
{
gimp_image_flush (image);
g_list_free (lowered_channels);
return;
}
}
gimp_image_undo_group_start (image,
@@ -367,7 +383,6 @@ channels_duplicate_cmd_callback (GimpAction *action,
GimpImage *image = NULL;
GList *channels;
GimpChannel *parent = GIMP_IMAGE_ACTIVE_PARENT;
return_if_no_channels (image, channels, data);
if (GIMP_IS_COMPONENT_EDITOR (data))
{
@@ -376,6 +391,8 @@ channels_duplicate_cmd_callback (GimpAction *action,
const gchar *desc;
gchar *name;
return_if_no_image (image, data);
component = GIMP_COMPONENT_EDITOR (data)->clicked_component;
gimp_enum_get_value (GIMP_TYPE_CHANNEL_TYPE, component,
@@ -399,6 +416,8 @@ channels_duplicate_cmd_callback (GimpAction *action,
GList *new_channels = NULL;
GList *iter;
return_if_no_channels (image, channels, data);
channels = g_list_copy (channels);
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_CHANNEL_ADD,

View File

@@ -305,19 +305,19 @@ context_foreground_hue_cmd_callback (GimpAction *action,
{
GimpContext *context;
GeglColor *color;
gdouble pixel[3];
gfloat pixel[3];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
color = gegl_color_duplicate (gimp_context_get_foreground (context));
gegl_color_get_pixel (color, babl_format_with_space ("HSV double", NULL), pixel);
pixel[0] = action_select_value (select_type,
pixel[0],
0.0, 1.0, 1.0,
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV double", NULL), pixel);
gegl_color_get_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
pixel[0] = (gfloat) action_select_value (select_type,
pixel[0],
0.0, 1.0, 1.0,
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
gimp_context_set_foreground (context, color);
g_object_unref (color);
}
@@ -329,19 +329,19 @@ context_foreground_saturation_cmd_callback (GimpAction *action,
{
GimpContext *context;
GeglColor *color;
gdouble pixel[3];
gfloat pixel[3];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
color = gegl_color_duplicate (gimp_context_get_foreground (context));
gegl_color_get_pixel (color, babl_format_with_space ("HSV double", NULL), pixel);
pixel[1] = action_select_value (select_type,
pixel[1],
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV double", NULL), pixel);
gegl_color_get_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
pixel[1] = (gfloat) action_select_value (select_type,
pixel[1],
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
gimp_context_set_foreground (context, color);
g_object_unref (color);
}
@@ -353,19 +353,19 @@ context_foreground_value_cmd_callback (GimpAction *action,
{
GimpContext *context;
GeglColor *color;
gdouble pixel[3];
gfloat pixel[3];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
color = gegl_color_duplicate (gimp_context_get_foreground (context));
gegl_color_get_pixel (color, babl_format_with_space ("HSV double", NULL), pixel);
pixel[2] = action_select_value (select_type,
pixel[2],
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV double", NULL), pixel);
gegl_color_get_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
pixel[2] = (gfloat) action_select_value (select_type,
pixel[2],
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
gimp_context_set_foreground (context, color);
g_object_unref (color);
}
@@ -377,19 +377,19 @@ context_background_hue_cmd_callback (GimpAction *action,
{
GimpContext *context;
GeglColor *color;
gdouble pixel[3];
gfloat pixel[3];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
color = gegl_color_duplicate (gimp_context_get_background (context));
gegl_color_get_pixel (color, babl_format_with_space ("HSV double", NULL), pixel);
pixel[0] = action_select_value (select_type,
pixel[0],
0.0, 1.0, 1.0,
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV double", NULL), pixel);
gegl_color_get_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
pixel[0] = (gfloat) action_select_value (select_type,
pixel[0],
0.0, 1.0, 1.0,
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
gimp_context_set_background (context, color);
g_object_unref (color);
}
@@ -401,19 +401,19 @@ context_background_saturation_cmd_callback (GimpAction *action,
{
GimpContext *context;
GeglColor *color;
gdouble pixel[3];
gfloat pixel[3];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
color = gegl_color_duplicate (gimp_context_get_background (context));
gegl_color_get_pixel (color, babl_format_with_space ("HSV double", NULL), pixel);
pixel[1] = action_select_value (select_type,
pixel[1],
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV double", NULL), pixel);
gegl_color_get_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
pixel[1] = (gfloat) action_select_value (select_type,
pixel[1],
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
gimp_context_set_background (context, color);
g_object_unref (color);
}
@@ -425,19 +425,19 @@ context_background_value_cmd_callback (GimpAction *action,
{
GimpContext *context;
GeglColor *color;
gdouble pixel[3];
gfloat pixel[3];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
color = gegl_color_duplicate (gimp_context_get_background (context));
gegl_color_get_pixel (color, babl_format_with_space ("HSV double", NULL), pixel);
pixel[2] = action_select_value (select_type,
pixel[2],
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV double", NULL), pixel);
gegl_color_get_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
pixel[2] = (gfloat) action_select_value (select_type,
pixel[2],
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
gimp_context_set_background (context, color);
g_object_unref (color);
}
@@ -719,7 +719,7 @@ context_brush_radius_cmd_callback (GimpAction *action,
radius = action_select_value (select_type,
radius,
min_radius, 4000.0, min_radius,
min_radius, GIMP_BRUSH_GENERATED_MAX_RADIUS, min_radius,
0.1, 1.0, 10.0, 0.05, FALSE);
gimp_brush_generated_set_radius (generated, radius);

View File

@@ -111,6 +111,9 @@ dashboard_log_record_cmd_callback (GimpAction *action,
GtkWidget *label;
GtkWidget *spinbutton;
GtkWidget *toggle;
GDateTime *datetime;
gchar *timestamp;
gchar *default_filename;
dialog = gtk_file_chooser_dialog_new (
"Record Performance Log", NULL, GTK_FILE_CHOOSER_ACTION_SAVE,
@@ -168,8 +171,19 @@ dashboard_log_record_cmd_callback (GimpAction *action,
GTK_FILE_CHOOSER (dialog), info->folder, NULL);
}
datetime = g_date_time_new_now_local ();
/* Since Windows doesn't allow colons in filenames,
* we use ISO 8601 basic format for the timestamp */
timestamp = g_date_time_format (datetime, "%Y%m%dT%H%M%SZ");
default_filename = g_strdup_printf ("gimp-performance-%s.log",
timestamp);
g_date_time_unref (datetime);
g_free (timestamp);
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog),
"gimp-performance.log");
default_filename);
g_free (default_filename);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), hbox);
@@ -248,7 +262,7 @@ dashboard_log_record_cmd_callback (GimpAction *action,
G_CALLBACK (gtk_true),
NULL);
gimp_help_connect (dialog, gimp_standard_help_func,
gimp_help_connect (dialog, NULL, gimp_standard_help_func,
GIMP_HELP_DASHBOARD_LOG_RECORD, NULL, NULL);
dialogs_attach_dialog (G_OBJECT (dashboard), LOG_RECORD_KEY, dialog);

View File

@@ -116,11 +116,15 @@ data_new_cmd_callback (GimpAction *action,
if (data)
{
GtkWidget *edit_button;
gimp_context_set_by_type (context,
gimp_data_factory_view_get_children_type (view),
GIMP_OBJECT (data));
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
edit_button = gimp_data_factory_view_get_edit_button (view);
if (edit_button && gtk_widget_get_visible (edit_button))
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
}
}
}
@@ -148,11 +152,15 @@ data_duplicate_cmd_callback (GimpAction *action,
if (new_data)
{
GtkWidget *edit_button;
gimp_context_set_by_type (context,
gimp_data_factory_view_get_children_type (view),
GIMP_OBJECT (new_data));
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
edit_button = gimp_data_factory_view_get_edit_button (view);
if (edit_button && gtk_widget_get_visible (edit_button))
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
}
}
}
@@ -286,6 +294,7 @@ data_edit_cmd_callback (GimpAction *action,
{
GdkMonitor *monitor = gimp_widget_get_monitor (GTK_WIDGET (view));
GtkWidget *dockable;
GtkWidget *editor = NULL;
dockable =
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (context->gimp)),
@@ -295,7 +304,10 @@ data_edit_cmd_callback (GimpAction *action,
g_variant_get_string (value,
NULL));
gimp_data_editor_set_data (GIMP_DATA_EDITOR (gtk_bin_get_child (GTK_BIN (dockable))),
data);
if (dockable)
editor = gtk_bin_get_child (GTK_BIN (dockable));
if (editor && GIMP_IS_DATA_EDITOR (editor))
gimp_data_editor_set_data (GIMP_DATA_EDITOR (editor), data);
}
}

View File

@@ -307,8 +307,13 @@ gint n_dialogs_dockable_actions = G_N_ELEMENTS (dialogs_dockable_actions);
static const GimpStringActionEntry dialogs_toplevel_actions[] =
{
{ "dialogs-preferences", GIMP_ICON_PREFERENCES_SYSTEM,
#if defined(PLATFORM_OSX)
NC_("dialogs-action", "_Settings..."),
NC_("dialogs-action", "_Settings..."),
#else
NC_("dialogs-action", "_Preferences"),
NC_("dialogs-action", "_Preferences"),
#endif
{ NULL },
NC_("dialogs-action", "Open the preferences dialog"),
"gimp-preferences-dialog",

View File

@@ -276,6 +276,17 @@ dockable_actions_update (GimpActionGroup *group,
SET_ACTIVE ("dockable-lock-tab", locked);
/* Submenus become invisible if all options inside them are hidden. */
SET_VISIBLE ("dockable-preview-size-gigantic", view_size != -1);
SET_VISIBLE ("dockable-preview-size-enormous", view_size != -1);
SET_VISIBLE ("dockable-preview-size-huge", view_size != -1);
SET_VISIBLE ("dockable-preview-size-extra-large", view_size != -1);
SET_VISIBLE ("dockable-preview-size-large", view_size != -1);
SET_VISIBLE ("dockable-preview-size-medium", view_size != -1);
SET_VISIBLE ("dockable-preview-size-small", view_size != -1);
SET_VISIBLE ("dockable-preview-size-extra-small", view_size != -1);
SET_VISIBLE ("dockable-preview-size-tiny", view_size != -1);
if (view_size != -1)
{
if (view_size >= GIMP_VIEW_SIZE_GIGANTIC)

View File

@@ -198,13 +198,13 @@ static const GimpEnumActionEntry edit_paste_actions[] =
NC_("edit-action", "Paste as _Floating Data"), NULL, { NULL },
NC_("edit-action", "Paste the content of the clipboard as Floating Data"),
GIMP_PASTE_TYPE_FLOATING, FALSE,
GIMP_HELP_EDIT_PASTE },
GIMP_HELP_EDIT_PASTE_FLOAT },
{ "edit-paste-float-in-place", GIMP_ICON_EDIT_PASTE,
NC_("edit-action", "Paste as Floa_ting Data In Place"), NULL, { NULL },
NC_("edit-action", "Paste the content of the clipboard as Floating Data at its original position"),
GIMP_PASTE_TYPE_FLOATING_IN_PLACE, FALSE,
GIMP_HELP_EDIT_PASTE }
GIMP_HELP_EDIT_PASTE_FLOAT_IN_PLACE }
};
static const GimpEnumActionEntry edit_fill_actions[] =

View File

@@ -37,10 +37,11 @@
#include "core/gimplayer.h"
#include "core/gimplayer-new.h"
#include "core/gimplayermask.h"
#include "core/gimplist.h"
#include "core/gimpimage.h"
#include "core/gimpimage-undo.h"
#include "vectors/gimpvectors-import.h"
#include "vectors/gimppath-import.h"
#include "widgets/gimpclipboard.h"
#include "widgets/gimphelp-ids.h"
@@ -280,7 +281,7 @@ edit_copy_cmd_callback (GimpAction *action,
return_if_no_drawables (image, drawables, data);
copy = gimp_edit_copy (image, drawables, action_data_get_context (data),
&error);
FALSE, &error);
if (copy)
{
@@ -402,7 +403,7 @@ edit_paste_cmd_callback (GimpAction *action,
GIMP_PASTE_TYPE_NEW_LAYER :
GIMP_PASTE_TYPE_NEW_LAYER_IN_PLACE;
edit_paste (display, converted_type, merged, FALSE);
edit_paste (display, converted_type, merged, TRUE);
}
g_list_free (drawables);
@@ -433,7 +434,7 @@ edit_paste_as_new_image_cmd_callback (GimpAction *action,
if (image)
{
gimp_create_display (gimp, image, GIMP_UNIT_PIXEL, 1.0,
gimp_create_display (gimp, image, gimp_unit_pixel (), 1.0,
G_OBJECT (gimp_widget_get_monitor (widget)));
g_object_unref (image);
}
@@ -655,10 +656,10 @@ edit_paste (GimpDisplay *display,
if (svg)
{
if (gimp_vectors_import_buffer (image, svg, svg_size,
TRUE, FALSE,
GIMP_IMAGE_ACTIVE_PARENT, -1,
NULL, NULL))
if (gimp_path_import_buffer (image, svg, svg_size,
TRUE, FALSE,
GIMP_IMAGE_ACTIVE_PARENT, -1,
NULL, NULL))
{
gimp_image_flush (image);
}
@@ -718,6 +719,7 @@ edit_paste (GimpDisplay *display,
merged, x, y, width, height)))
{
gimp_image_set_selected_layers (image, pasted_layers);
g_list_free (pasted_layers);
gimp_image_flush (image);
}

View File

@@ -128,14 +128,14 @@ error_console_save_cmd_callback (GimpAction *action,
G_CALLBACK (gtk_true),
NULL);
gimp_help_connect (dialog, gimp_standard_help_func,
gimp_help_connect (dialog, NULL, gimp_standard_help_func,
GIMP_HELP_ERRORS_DIALOG, NULL, NULL);
}
gtk_window_present (GTK_WINDOW (console->file_dialog));
#ifdef G_OS_WIN32
gimp_window_set_title_bar_theme (console->gimp, console->file_dialog, FALSE);
gimp_window_set_title_bar_theme (console->gimp, console->file_dialog);
#endif
}

View File

@@ -309,14 +309,34 @@ file_actions_update (GimpActionGroup *group,
if (export)
{
gchar *label = file_actions_create_label (_("Export to %s"), export);
GimpAction *action;
gchar *label = file_actions_create_label (_("Export to %s"),
export);
gimp_action_group_set_action_label (group, "file-export", label);
action = gimp_action_group_get_action (group, "file-export");
g_object_set (action,
"ellipsize", PANGO_ELLIPSIZE_MIDDLE,
"max-width-chars", 40,
NULL);
g_free (label);
}
else if (show_overwrite)
{
gchar *label = file_actions_create_label (_("Over_write %s"), source);
GimpAction *action;
gchar *label = file_actions_create_label (_("Over_write %s"),
source);
gimp_action_group_set_action_label (group, "file-overwrite", label);
action = gimp_action_group_get_action (group, "file-overwrite");
g_object_set (action,
"ellipsize", PANGO_ELLIPSIZE_MIDDLE,
"max-width-chars", 40,
NULL);
g_free (label);
}
else
@@ -381,11 +401,13 @@ file_actions_last_opened_update (GimpContainer *container,
label = g_strdup_printf (_("Open \"%s\""), escaped);
g_object_set (action,
"label", label,
"short-label", escaped,
"tooltip", name,
"visible", TRUE,
"viewable", imagefile,
"label", label,
"short-label", escaped,
"tooltip", name,
"visible", TRUE,
"viewable", imagefile,
"ellipsize", PANGO_ELLIPSIZE_MIDDLE,
"max-width-chars", 40,
NULL);
g_free (label);
@@ -395,10 +417,12 @@ file_actions_last_opened_update (GimpContainer *container,
else
{
g_object_set (action,
"label", name,
"tooltip", NULL,
"visible", FALSE,
"viewable", NULL,
"label", name,
"tooltip", NULL,
"visible", FALSE,
"viewable", NULL,
"ellipsize", PANGO_ELLIPSIZE_MIDDLE,
"max-width-chars", 40,
NULL);
}

View File

@@ -841,7 +841,7 @@ file_revert_confirm_response (GtkWidget *dialog,
new_image = file_open_image (gimp, gimp_get_user_context (gimp),
GIMP_PROGRESS (display),
file, FALSE, NULL,
file, 0, 0, FALSE, NULL,
GIMP_RUN_INTERACTIVE,
&status, NULL, &error);

View File

@@ -804,7 +804,6 @@ filters_actions_setup (GimpActionGroup *group)
g_free (action_name);
action_name = g_strdup_printf ("filters-%s-%d", formatted_op_name, i++);
}
g_free (formatted_op_name);
title = gegl_operation_class_get_key (op_class, "title");
op_name = op_class->name;
@@ -824,6 +823,13 @@ filters_actions_setup (GimpActionGroup *group)
entry.value = op_class->name;
entry.help_id = GIMP_HELP_TOOL_GEGL;
if (gegl_operation_class_get_key (op_class, "gimp:menu-path") &&
g_str_has_prefix (op_class->name, "gegl:"))
/* We automatically create an help ID from the operation name
* for all core GEGL operations with a menu path key.
*/
entry.help_id = formatted_op_name;
gimp_action_group_add_string_actions (group, "filters-action",
&entry, 1,
filters_apply_interactive_cmd_callback);
@@ -856,6 +862,7 @@ filters_actions_setup (GimpActionGroup *group)
g_free (label);
g_free (action_name);
g_free (formatted_op_name);
}
g_object_set_data_full (G_OBJECT (group),
@@ -954,7 +961,7 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-bayer-matrix", writable);
SET_SENSITIVE ("filters-bloom", writable);
SET_SENSITIVE ("filters-brightness-contrast", writable);
SET_SENSITIVE ("filters-bump-map", writable);
SET_SENSITIVE ("filters-bump-map", writable && !is_group);
SET_SENSITIVE ("filters-c2g", writable && !gray);
SET_SENSITIVE ("filters-cartoon", writable);
SET_SENSITIVE ("filters-channel-mixer", writable);
@@ -976,7 +983,7 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-difference-of-gaussians", writable);
SET_SENSITIVE ("filters-diffraction-patterns", writable);
SET_SENSITIVE ("filters-dilate", writable && !is_group);
SET_SENSITIVE ("filters-displace", writable);
SET_SENSITIVE ("filters-displace", writable && !is_group);
SET_SENSITIVE ("filters-distance-map", writable);
SET_SENSITIVE ("filters-dropshadow", writable && alpha);
SET_SENSITIVE ("filters-edge", writable && !is_group);
@@ -991,8 +998,8 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-focus-blur", writable);
SET_SENSITIVE ("filters-fractal-trace", writable);
SET_SENSITIVE ("filters-gaussian-blur", writable);
SET_SENSITIVE ("filters-gaussian-blur-selective", writable);
SET_SENSITIVE ("filters-gegl-graph", writable);
SET_SENSITIVE ("filters-gaussian-blur-selective", writable && !is_group);
SET_SENSITIVE ("filters-gegl-graph", writable && !is_group);
SET_SENSITIVE ("filters-grid", writable);
SET_SENSITIVE ("filters-high-pass", writable);
SET_SENSITIVE ("filters-hue-chroma", writable);
@@ -1003,7 +1010,7 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-invert-value", writable && !is_group);
SET_SENSITIVE ("filters-image-gradient", writable);
SET_SENSITIVE ("filters-kaleidoscope", writable);
SET_SENSITIVE ("filters-lens-blur", writable);
SET_SENSITIVE ("filters-lens-blur", writable && !is_group);
SET_SENSITIVE ("filters-lens-distortion", writable);
SET_SENSITIVE ("filters-lens-flare", writable);
SET_SENSITIVE ("filters-levels", writable);
@@ -1034,7 +1041,7 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-noise-spread", writable);
SET_SENSITIVE ("filters-normal-map", writable);
SET_SENSITIVE ("filters-offset", writable);
SET_SENSITIVE ("filters-oilify", writable);
SET_SENSITIVE ("filters-oilify", writable && !is_group);
SET_SENSITIVE ("filters-panorama-projection", writable);
SET_SENSITIVE ("filters-photocopy", writable);
SET_SENSITIVE ("filters-pixelize", writable);
@@ -1068,7 +1075,7 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-tile-seamless", writable);
SET_SENSITIVE ("filters-unsharp-mask", writable);
SET_SENSITIVE ("filters-value-propagate", writable);
SET_SENSITIVE ("filters-variable-blur", writable);
SET_SENSITIVE ("filters-variable-blur", writable && !is_group);
SET_SENSITIVE ("filters-video-degradation", writable);
SET_SENSITIVE ("filters-vignette", writable);
SET_SENSITIVE ("filters-waterpixels", writable);
@@ -1259,12 +1266,26 @@ filters_actions_history_changed (Gimp *gimp,
sensitive = gimp_action_get_sensitive (actual_action, NULL);
g_object_set (action,
"visible", TRUE,
"sensitive", sensitive,
"procedure", proc,
"label", label,
"icon-name", gimp_viewable_get_icon_name (GIMP_VIEWABLE (proc)),
"tooltip", gimp_procedure_get_blurb (proc),
/* It is very important that "visible" is set at the
* end, because the docs says that:
*
* > "notify" signals are queued and only emitted (in reverse order) after all properties have been set.
*
* If "visible" is set before "label" in particular,
* we end up in the inconsistent situation where the
* "visible" callbacks have not been run yet, so
* menus don't have the corresponding item whereas
* the action already shows as visible. In
* particular, g_menu_model_items_changed() may
* crash on an empty item list in GIMP_GTK_MENUBAR
* codepath.
*/
"visible", TRUE,
NULL);
}

View File

@@ -277,7 +277,17 @@ filters_run_procedure (Gimp *gimp,
display);
}
if (success)
if (success &&
(! GIMP_IS_GEGL_PROCEDURE (procedure) ||
/* XXX GimpGeglProcedure made for filter-editing are
* short-lived and should not be added to history. I'm not
* sure it makes sense UX-wise anyway ("used" filters are for
* first calls, not edits).
* If ever we decide to change this UX logic, some code logic
* changes are needed too. Cf. crash report #12576 and my
* (Jehan's) technical comment in there..
*/
! gimp_gegl_procedure_is_editing_filter (GIMP_GEGL_PROCEDURE (procedure))))
gimp_filter_history_add (gimp, procedure);
gimp_value_array_unref (args);

View File

@@ -48,6 +48,12 @@
#include "core/gimpsettings.h"
#include "core/gimptoolinfo.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpstringaction.h"
#include "widgets/gimpuimanager.h"
#include "tools/gimpoperationtool.h"
#include "tools/tool_manager.h"
@@ -64,6 +70,7 @@ static gint64 gimp_gegl_procedure_get_memsize (GimpObject *object,
static gchar * gimp_gegl_procedure_get_description (GimpViewable *viewable,
gchar **tooltip);
static const gchar * gimp_gegl_procedure_get_help_id (GimpProcedure *procedure);
static const gchar * gimp_gegl_procedure_get_menu_label (GimpProcedure *procedure);
static gboolean gimp_gegl_procedure_get_sensitive (GimpProcedure *procedure,
GimpObject *object,
@@ -103,6 +110,7 @@ gimp_gegl_procedure_class_init (GimpGeglProcedureClass *klass)
viewable_class->default_icon_name = "gimp-gegl";
viewable_class->get_description = gimp_gegl_procedure_get_description;
proc_class->get_help_id = gimp_gegl_procedure_get_help_id;
proc_class->get_menu_label = gimp_gegl_procedure_get_menu_label;
proc_class->get_sensitive = gimp_gegl_procedure_get_sensitive;
proc_class->execute = gimp_gegl_procedure_execute;
@@ -153,6 +161,41 @@ gimp_gegl_procedure_get_description (GimpViewable *viewable,
return g_strdup (gimp_procedure_get_label (procedure));
}
static const gchar *
gimp_gegl_procedure_get_help_id (GimpProcedure *procedure)
{
GimpGeglProcedure *proc = GIMP_GEGL_PROCEDURE (procedure);
GList *managers;
GimpActionGroup *group;
const gchar *help_id = NULL;
managers = gimp_ui_managers_from_name ("<Image>");
group = gimp_ui_manager_get_action_group (managers->data, "filters");
if (procedure->help_id)
{
return procedure->help_id;
}
else if (group)
{
GList *actions;
GList *iter;
actions = gimp_action_group_list_actions (group);
for (iter = actions; iter; iter = iter->next)
if (GIMP_IS_STRING_ACTION (iter->data) &&
g_strcmp0 (GIMP_STRING_ACTION (iter->data)->value, proc->operation) == 0)
{
help_id = gimp_action_get_help_id (iter->data);
break;
}
g_list_free (actions);
}
return help_id == NULL ? GIMP_HELP_TOOL_GEGL : help_id;
}
static const gchar *
gimp_gegl_procedure_get_menu_label (GimpProcedure *procedure)
{
@@ -210,10 +253,11 @@ gimp_gegl_procedure_execute (GimpProcedure *procedure,
GObject **drawables;
GObject *config;
image = g_value_get_object (gimp_value_array_index (args, 1));
n_drawables = g_value_get_int (gimp_value_array_index (args, 2));
drawables = gimp_value_get_object_array (gimp_value_array_index (args, 3));
config = g_value_get_object (gimp_value_array_index (args, 4));
image = g_value_get_object (gimp_value_array_index (args, 1));
drawables = g_value_get_boxed (gimp_value_array_index (args, 2));
config = g_value_get_object (gimp_value_array_index (args, 3));
n_drawables = gimp_core_object_array_get_length ((GObject **) drawables);
if (n_drawables == 1)
{
@@ -254,7 +298,7 @@ gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
const gchar *tool_name;
run_mode = g_value_get_enum (gimp_value_array_index (args, 0));
settings = g_value_get_object (gimp_value_array_index (args, 4));
settings = g_value_get_object (gimp_value_array_index (args, 3));
if (! settings &&
(run_mode != GIMP_RUN_INTERACTIVE ||
@@ -265,7 +309,7 @@ gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
GType config_type;
GimpContainer *container;
config_type = G_VALUE_TYPE (gimp_value_array_index (args, 4));
config_type = G_VALUE_TYPE (gimp_value_array_index (args, 3));
container = gimp_operation_config_get_container (gimp, config_type,
(GCompareFunc)
@@ -292,7 +336,7 @@ gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
{
GimpValueArray *return_vals;
g_value_set_object (gimp_value_array_index (args, 4), settings);
g_value_set_object (gimp_value_array_index (args, 3), settings);
return_vals = gimp_procedure_execute (procedure, gimp, context, progress,
args, NULL);
gimp_value_array_unref (return_vals);
@@ -376,6 +420,11 @@ gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
gimp_procedure_get_help_id (procedure));
}
/* For custom GIMP operations, we need to set the existing filter to edit
* before initializing so it doesn't create a separate filter. */
if (gegl_procedure->filter)
GIMP_FILTER_TOOL (active_tool)->existing_filter = gegl_procedure->filter;
tool_manager_initialize_active (gimp, display);
/* For GIMP-specific GEGL operations, we need to copy over the
@@ -384,7 +433,6 @@ gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
{
GeglNode *node;
GIMP_FILTER_TOOL (active_tool)->existing_filter = gegl_procedure->filter;
gimp_filter_set_active (GIMP_FILTER (gegl_procedure->filter), FALSE);
node = gimp_drawable_filter_get_operation (gegl_procedure->filter);
@@ -457,7 +505,7 @@ gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
GimpProcedure *
gimp_gegl_procedure_new (Gimp *gimp,
GimpDrawableFilter *filter,
GimpDrawableFilter *filter_to_edit,
GimpRunMode default_run_mode,
GimpObject *default_settings,
const gchar *operation,
@@ -483,7 +531,7 @@ gimp_gegl_procedure_new (Gimp *gimp,
gegl_procedure = GIMP_GEGL_PROCEDURE (procedure);
gegl_procedure->filter = filter;
gegl_procedure->filter = filter_to_edit;
gegl_procedure->operation = g_strdup (operation);
gegl_procedure->default_run_mode = default_run_mode;
gegl_procedure->menu_label = g_strdup (menu_label);
@@ -514,17 +562,11 @@ gimp_gegl_procedure_new (Gimp *gimp,
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-drawables",
"N drawables",
"The number of drawables",
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_object_array ("drawables",
"Drawables",
"Input drawables",
GIMP_TYPE_DRAWABLE,
GIMP_PARAM_READWRITE));
gimp_param_spec_core_object_array ("drawables",
"Drawables",
"Input drawables",
GIMP_TYPE_DRAWABLE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_object ("settings",
"Settings",
@@ -534,3 +576,11 @@ gimp_gegl_procedure_new (Gimp *gimp,
return procedure;
}
gboolean
gimp_gegl_procedure_is_editing_filter (GimpGeglProcedure *procedure)
{
g_return_val_if_fail (GIMP_IS_GEGL_PROCEDURE (procedure), FALSE);
return (procedure->filter != NULL);
}

View File

@@ -57,15 +57,16 @@ struct _GimpGeglProcedureClass
GType gimp_gegl_procedure_get_type (void) G_GNUC_CONST;
GimpProcedure * gimp_gegl_procedure_new (Gimp *gimp,
GimpDrawableFilter *filter,
GimpRunMode default_run_mode,
GimpObject *default_settings,
const gchar *operation,
const gchar *name,
const gchar *menu_label,
const gchar *tooltip,
const gchar *icon_name,
const gchar *help_id);
GimpProcedure * gimp_gegl_procedure_new (Gimp *gimp,
GimpDrawableFilter *filter_to_edit,
GimpRunMode default_run_mode,
GimpObject *default_settings,
const gchar *operation,
const gchar *name,
const gchar *menu_label,
const gchar *tooltip,
const gchar *icon_name,
const gchar *help_id);
gboolean gimp_gegl_procedure_is_editing_filter (GimpGeglProcedure *procedure);
#endif /* __GIMP_GEGL_PROCEDURE_H__ */

View File

@@ -630,26 +630,16 @@ gradient_editor_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("gradient-editor-load-left-09", left_editable);
SET_SENSITIVE ("gradient-editor-load-left-10", left_editable);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[0]);
SET_COLOR ("gradient-editor-load-left-01", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[1]);
SET_COLOR ("gradient-editor-load-left-02", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[2]);
SET_COLOR ("gradient-editor-load-left-03", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[3]);
SET_COLOR ("gradient-editor-load-left-04", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[4]);
SET_COLOR ("gradient-editor-load-left-05", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[5]);
SET_COLOR ("gradient-editor-load-left-06", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[6]);
SET_COLOR ("gradient-editor-load-left-07", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[7]);
SET_COLOR ("gradient-editor-load-left-08", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[8]);
SET_COLOR ("gradient-editor-load-left-09", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[9]);
SET_COLOR ("gradient-editor-load-left-10", color, TRUE);
SET_COLOR ("gradient-editor-load-left-01", editor->saved_colors[0], TRUE);
SET_COLOR ("gradient-editor-load-left-02", editor->saved_colors[1], TRUE);
SET_COLOR ("gradient-editor-load-left-03", editor->saved_colors[2], TRUE);
SET_COLOR ("gradient-editor-load-left-04", editor->saved_colors[3], TRUE);
SET_COLOR ("gradient-editor-load-left-05", editor->saved_colors[4], TRUE);
SET_COLOR ("gradient-editor-load-left-06", editor->saved_colors[5], TRUE);
SET_COLOR ("gradient-editor-load-left-07", editor->saved_colors[6], TRUE);
SET_COLOR ("gradient-editor-load-left-08", editor->saved_colors[7], TRUE);
SET_COLOR ("gradient-editor-load-left-09", editor->saved_colors[8], TRUE);
SET_COLOR ("gradient-editor-load-left-10", editor->saved_colors[9], TRUE);
SET_SENSITIVE ("gradient-editor-save-left-01", gradient);
SET_SENSITIVE ("gradient-editor-save-left-02", gradient);
@@ -662,26 +652,16 @@ gradient_editor_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("gradient-editor-save-left-09", gradient);
SET_SENSITIVE ("gradient-editor-save-left-10", gradient);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[0]);
SET_COLOR ("gradient-editor-save-left-01", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[1]);
SET_COLOR ("gradient-editor-save-left-02", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[2]);
SET_COLOR ("gradient-editor-save-left-03", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[3]);
SET_COLOR ("gradient-editor-save-left-04", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[4]);
SET_COLOR ("gradient-editor-save-left-05", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[5]);
SET_COLOR ("gradient-editor-save-left-06", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[6]);
SET_COLOR ("gradient-editor-save-left-07", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[7]);
SET_COLOR ("gradient-editor-save-left-08", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[8]);
SET_COLOR ("gradient-editor-save-left-09", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[9]);
SET_COLOR ("gradient-editor-save-left-10", color, TRUE);
SET_COLOR ("gradient-editor-save-left-01", editor->saved_colors[0], TRUE);
SET_COLOR ("gradient-editor-save-left-02", editor->saved_colors[1], TRUE);
SET_COLOR ("gradient-editor-save-left-03", editor->saved_colors[2], TRUE);
SET_COLOR ("gradient-editor-save-left-04", editor->saved_colors[3], TRUE);
SET_COLOR ("gradient-editor-save-left-05", editor->saved_colors[4], TRUE);
SET_COLOR ("gradient-editor-save-left-06", editor->saved_colors[5], TRUE);
SET_COLOR ("gradient-editor-save-left-07", editor->saved_colors[6], TRUE);
SET_COLOR ("gradient-editor-save-left-08", editor->saved_colors[7], TRUE);
SET_COLOR ("gradient-editor-save-left-09", editor->saved_colors[8], TRUE);
SET_COLOR ("gradient-editor-save-left-10", editor->saved_colors[9], TRUE);
SET_SENSITIVE ("gradient-editor-right-color-fixed", editable);
SET_SENSITIVE ("gradient-editor-right-color-foreground", editable);
@@ -741,26 +721,16 @@ gradient_editor_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("gradient-editor-load-right-09", right_editable);
SET_SENSITIVE ("gradient-editor-load-right-10", right_editable);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[0]);
SET_COLOR ("gradient-editor-load-right-01", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[1]);
SET_COLOR ("gradient-editor-load-right-02", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[2]);
SET_COLOR ("gradient-editor-load-right-03", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[3]);
SET_COLOR ("gradient-editor-load-right-04", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[4]);
SET_COLOR ("gradient-editor-load-right-05", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[5]);
SET_COLOR ("gradient-editor-load-right-06", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[6]);
SET_COLOR ("gradient-editor-load-right-07", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[7]);
SET_COLOR ("gradient-editor-load-right-08", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[8]);
SET_COLOR ("gradient-editor-load-right-09", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[9]);
SET_COLOR ("gradient-editor-load-right-10", color, TRUE);
SET_COLOR ("gradient-editor-load-right-01", editor->saved_colors[0], TRUE);
SET_COLOR ("gradient-editor-load-right-02", editor->saved_colors[1], TRUE);
SET_COLOR ("gradient-editor-load-right-03", editor->saved_colors[2], TRUE);
SET_COLOR ("gradient-editor-load-right-04", editor->saved_colors[3], TRUE);
SET_COLOR ("gradient-editor-load-right-05", editor->saved_colors[4], TRUE);
SET_COLOR ("gradient-editor-load-right-06", editor->saved_colors[5], TRUE);
SET_COLOR ("gradient-editor-load-right-07", editor->saved_colors[6], TRUE);
SET_COLOR ("gradient-editor-load-right-08", editor->saved_colors[7], TRUE);
SET_COLOR ("gradient-editor-load-right-09", editor->saved_colors[8], TRUE);
SET_COLOR ("gradient-editor-load-right-10", editor->saved_colors[9], TRUE);
SET_SENSITIVE ("gradient-editor-save-right-01", gradient);
SET_SENSITIVE ("gradient-editor-save-right-02", gradient);
@@ -773,26 +743,16 @@ gradient_editor_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("gradient-editor-save-right-09", gradient);
SET_SENSITIVE ("gradient-editor-save-right-10", gradient);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[0]);
SET_COLOR ("gradient-editor-save-right-01", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[1]);
SET_COLOR ("gradient-editor-save-right-02", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[2]);
SET_COLOR ("gradient-editor-save-right-03", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[3]);
SET_COLOR ("gradient-editor-save-right-04", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[4]);
SET_COLOR ("gradient-editor-save-right-05", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[5]);
SET_COLOR ("gradient-editor-save-right-06", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[6]);
SET_COLOR ("gradient-editor-save-right-07", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[7]);
SET_COLOR ("gradient-editor-save-right-08", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[8]);
SET_COLOR ("gradient-editor-save-right-09", color, TRUE);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &editor->saved_colors[9]);
SET_COLOR ("gradient-editor-save-right-10", color, TRUE);
SET_COLOR ("gradient-editor-save-right-01", editor->saved_colors[0], TRUE);
SET_COLOR ("gradient-editor-save-right-02", editor->saved_colors[1], TRUE);
SET_COLOR ("gradient-editor-save-right-03", editor->saved_colors[2], TRUE);
SET_COLOR ("gradient-editor-save-right-04", editor->saved_colors[3], TRUE);
SET_COLOR ("gradient-editor-save-right-05", editor->saved_colors[4], TRUE);
SET_COLOR ("gradient-editor-save-right-06", editor->saved_colors[5], TRUE);
SET_COLOR ("gradient-editor-save-right-07", editor->saved_colors[6], TRUE);
SET_COLOR ("gradient-editor-save-right-08", editor->saved_colors[7], TRUE);
SET_COLOR ("gradient-editor-save-right-09", editor->saved_colors[8], TRUE);
SET_COLOR ("gradient-editor-save-right-10", editor->saved_colors[9], TRUE);
SET_SENSITIVE ("gradient-editor-flip", editable);
SET_SENSITIVE ("gradient-editor-replicate", editable);

View File

@@ -112,7 +112,7 @@ gradients_save_as_pov_ray_cmd_callback (GimpAction *action,
g_object_ref (gradient),
G_CONNECT_SWAPPED);
gimp_help_connect (dialog, gimp_standard_help_func,
gimp_help_connect (dialog, NULL, gimp_standard_help_func,
GIMP_HELP_GRADIENT_SAVE_AS_POV, NULL, NULL);
dialogs_attach_dialog (G_OBJECT (gradient),
@@ -122,7 +122,7 @@ gradients_save_as_pov_ray_cmd_callback (GimpAction *action,
gtk_window_present (GTK_WINDOW (dialog));
#ifdef G_OS_WIN32
gimp_window_set_title_bar_theme (context->gimp, dialog, FALSE);
gimp_window_set_title_bar_theme (context->gimp, dialog);
#endif
}

View File

@@ -85,7 +85,7 @@ static const GimpActionEntry image_actions[] =
NC_("image-action", "_Soft-proof Profile..."), NULL, { NULL },
NC_("image-action", "Set the soft-proofing profile"),
image_softproof_profile_cmd_callback,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
GIMP_HELP_IMAGE_SOFT_PROOF_PROFILE_ASSIGN },
{ "image-color-profile-save", NULL,
NC_("image-action", "_Save Color Profile to File..."), NULL, { NULL },
@@ -176,7 +176,7 @@ static const GimpToggleActionEntry image_toggle_actions[] =
NC_("image-action", "Use black point compensation for soft-proofing"),
image_softproof_bpc_cmd_callback,
TRUE,
GIMP_HELP_VIEW_COLOR_MANAGEMENT }
GIMP_HELP_IMAGE_SOFT_PROOF_BLACK_POINT }
};
static const GimpRadioActionEntry image_convert_base_type_actions[] =
@@ -299,25 +299,25 @@ static const GimpRadioActionEntry image_softproof_intent_actions[] =
NC_("image-action", "_Perceptual"), NULL, { NULL },
NC_("image-action", "Soft-proofing rendering intent is perceptual"),
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
GIMP_HELP_IMAGE_SOFT_PROOF_RENDERING_INTENT },
{ "image-softproof-intent-relative-colorimetric", NULL,
NC_("image-action", "_Relative Colorimetric"), NULL, { NULL },
NC_("image-action", "Soft-proofing rendering intent is relative colorimetric"),
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
GIMP_HELP_IMAGE_SOFT_PROOF_RENDERING_INTENT },
{ "image-softproof-intent-saturation", NULL,
NC_("image-action", "_Saturation"), NULL, { NULL },
NC_("image-action", "Soft-proofing rendering intent is saturation"),
GIMP_COLOR_RENDERING_INTENT_SATURATION,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
GIMP_HELP_IMAGE_SOFT_PROOF_RENDERING_INTENT },
{ "image-softproof-intent-absolute-colorimetric", NULL,
NC_("image-action", "_Absolute Colorimetric"), NULL, { NULL },
NC_("image-action", "Soft-proofing rendering intent is absolute colorimetric"),
GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC,
GIMP_HELP_VIEW_COLOR_MANAGEMENT }
GIMP_HELP_IMAGE_SOFT_PROOF_RENDERING_INTENT }
};
@@ -381,19 +381,34 @@ void
image_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *image = action_data_get_image (data);
gboolean is_indexed = FALSE;
gboolean is_u8_gamma = FALSE;
gboolean is_double = FALSE;
gboolean aux = FALSE;
gboolean lp = FALSE;
gboolean sel = FALSE;
gboolean groups = FALSE;
gboolean profile_srgb = FALSE;
gboolean profile_hidden = FALSE;
gboolean profile = FALSE;
gboolean s_bpc = FALSE;
Gimp *gimp = action_data_get_gimp (data);
GimpImage *image = action_data_get_image (data);
GimpComponentType component_type = GIMP_COMPONENT_TYPE_U8;
GimpTRCType trc = GIMP_TRC_LINEAR;
gboolean is_indexed = FALSE;
gboolean is_u8_gamma = FALSE;
gboolean is_double = FALSE;
gboolean aux = FALSE;
gboolean lp = FALSE;
gboolean sel = FALSE;
gboolean groups = FALSE;
gboolean profile_srgb = FALSE;
gboolean profile_hidden = FALSE;
gboolean profile = FALSE;
gboolean s_bpc = FALSE;
if (gimp)
{
GimpContext *context = gimp_get_user_context (gimp);
/* The discrepancy may happens when a new image just got opened
* and context was not fully updated yet. We just skip the actions
* update. There will soon be more events triggering it with
* consistent context.
*/
if (! context || image != gimp_context_get_image (context))
return;
}
#define SET_LABEL(action,label) \
gimp_action_group_set_action_label (group, action, (label))
#define SET_SENSITIVE(action,condition) \
@@ -409,8 +424,6 @@ image_actions_update (GimpActionGroup *group,
const gchar *action = NULL;
GimpImageBaseType base_type;
GimpPrecision precision;
GimpComponentType component_type;
GimpTRCType trc;
base_type = gimp_image_get_base_type (image);
precision = gimp_image_get_precision (image);
@@ -530,17 +543,17 @@ image_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("image-softproof-black-point-compensation", image);
SET_ACTIVE ("image-softproof-black-point-compensation", s_bpc);
SET_SENSITIVE ("image-convert-u8", image);
SET_SENSITIVE ("image-convert-u16", image && !is_indexed);
SET_SENSITIVE ("image-convert-u32", image && !is_indexed);
SET_SENSITIVE ("image-convert-half", image && !is_indexed);
SET_SENSITIVE ("image-convert-float", image && !is_indexed);
SET_SENSITIVE ("image-convert-double", image && !is_indexed);
SET_SENSITIVE ("image-convert-u8", image && component_type != GIMP_COMPONENT_TYPE_U8);
SET_SENSITIVE ("image-convert-u16", image && !is_indexed && component_type != GIMP_COMPONENT_TYPE_U16);
SET_SENSITIVE ("image-convert-u32", image && !is_indexed && component_type != GIMP_COMPONENT_TYPE_U32);
SET_SENSITIVE ("image-convert-half", image && !is_indexed && component_type != GIMP_COMPONENT_TYPE_HALF);
SET_SENSITIVE ("image-convert-float", image && !is_indexed && component_type != GIMP_COMPONENT_TYPE_FLOAT);
SET_SENSITIVE ("image-convert-double", image && !is_indexed && component_type != GIMP_COMPONENT_TYPE_DOUBLE);
SET_VISIBLE ("image-convert-double", is_double);
SET_SENSITIVE ("image-convert-linear", image && !is_indexed);
SET_SENSITIVE ("image-convert-non-linear", image);
SET_SENSITIVE ("image-convert-perceptual", image && !is_indexed);
SET_SENSITIVE ("image-convert-linear", image && !is_indexed && trc != GIMP_TRC_LINEAR);
SET_SENSITIVE ("image-convert-non-linear", image && trc != GIMP_TRC_NON_LINEAR);
SET_SENSITIVE ("image-convert-perceptual", image && !is_indexed && trc != GIMP_TRC_PERCEPTUAL);
SET_SENSITIVE ("image-color-profile-use-srgb", image && (profile || profile_hidden));
SET_ACTIVE ("image-color-profile-use-srgb", image && profile_srgb);

View File

@@ -136,12 +136,12 @@ static void image_resize_callback (GtkWidget *dialog,
GimpContext *context,
gint width,
gint height,
GimpUnit unit,
GimpUnit *unit,
gint offset_x,
gint offset_y,
gdouble xres,
gdouble yres,
GimpUnit res_unit,
GimpUnit *res_unit,
GimpFillType fill_type,
GimpItemSet layer_set,
gboolean resize_text_layers,
@@ -151,18 +151,18 @@ static void image_print_size_callback (GtkWidget *dialog,
GimpImage *image,
gdouble xresolution,
gdouble yresolution,
GimpUnit resolution_unit,
GimpUnit *resolution_unit,
gpointer user_data);
static void image_scale_callback (GtkWidget *dialog,
GimpViewable *viewable,
gint width,
gint height,
GimpUnit unit,
GimpUnit *unit,
GimpInterpolationType interpolation,
gdouble xresolution,
gdouble yresolution,
GimpUnit resolution_unit,
GimpUnit *resolution_unit,
gpointer user_data);
static void image_merge_layers_callback (GtkWidget *dialog,
@@ -185,8 +185,8 @@ static void image_softproof_profile_callback (GtkWidget *dialo
/* private variables */
static GimpUnit image_resize_unit = GIMP_UNIT_PIXEL;
static GimpUnit image_scale_unit = GIMP_UNIT_PIXEL;
static GimpUnit *image_resize_unit = NULL;
static GimpUnit *image_scale_unit = NULL;
static GimpInterpolationType image_scale_interp = -1;
static GimpPalette *image_convert_indexed_custom_palette = NULL;
@@ -657,7 +657,7 @@ image_resize_cmd_callback (GimpAction *action,
{
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
if (image_resize_unit != GIMP_UNIT_PERCENT)
if (image_resize_unit != gimp_unit_percent ())
image_resize_unit = gimp_display_get_shell (display)->unit;
dialog = resize_dialog_new (GIMP_VIEWABLE (image),
@@ -786,7 +786,7 @@ image_scale_cmd_callback (GimpAction *action,
if (! dialog)
{
if (image_scale_unit != GIMP_UNIT_PERCENT)
if (image_scale_unit != gimp_unit_percent ())
image_scale_unit = gimp_display_get_shell (display)->unit;
if (image_scale_interp == -1)
@@ -1364,12 +1364,12 @@ image_resize_callback (GtkWidget *dialog,
GimpContext *context,
gint width,
gint height,
GimpUnit unit,
GimpUnit *unit,
gint offset_x,
gint offset_y,
gdouble xres,
gdouble yres,
GimpUnit res_unit,
GimpUnit *res_unit,
GimpFillType fill_type,
GimpItemSet layer_set,
gboolean resize_text_layers,
@@ -1386,7 +1386,7 @@ image_resize_callback (GtkWidget *dialog,
GimpProgress *progress;
gdouble old_xres;
gdouble old_yres;
GimpUnit old_res_unit;
GimpUnit *old_res_unit;
gboolean update_resolution;
g_object_set (config,
@@ -1448,7 +1448,7 @@ image_print_size_callback (GtkWidget *dialog,
GimpImage *image,
gdouble xresolution,
gdouble yresolution,
GimpUnit resolution_unit,
GimpUnit *resolution_unit,
gpointer data)
{
gdouble xres;
@@ -1479,11 +1479,11 @@ image_scale_callback (GtkWidget *dialog,
GimpViewable *viewable,
gint width,
gint height,
GimpUnit unit,
GimpUnit *unit,
GimpInterpolationType interpolation,
gdouble xresolution,
gdouble yresolution,
GimpUnit resolution_unit,
GimpUnit *resolution_unit,
gpointer user_data)
{
GimpProgress *progress = user_data;

View File

@@ -20,6 +20,7 @@
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
@@ -88,7 +89,7 @@ images_new_view_cmd_callback (GimpAction *action,
if (image && gimp_container_have (container, GIMP_OBJECT (image)))
{
gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0,
gimp_create_display (image->gimp, image, gimp_unit_pixel (), 1.0,
G_OBJECT (gimp_widget_get_monitor (GTK_WIDGET (editor))));
}
}

View File

@@ -55,12 +55,9 @@ items_actions_setup (GimpActionGroup *group,
}
else
{
GeglColor *color;
GimpRGB rgb;
GeglColor *color = gegl_color_new ("none");
gimp_get_color_tag_color (value->value, &rgb, FALSE);
color = gegl_color_new (NULL);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), &rgb);
gimp_get_color_tag_color (value->value, color, FALSE);
gimp_action_group_set_action_color (group, action, color, FALSE);
g_object_unref (color);
}
@@ -77,14 +74,14 @@ items_actions_update (GimpActionGroup *group,
GEnumClass *enum_class;
GEnumValue *value;
gchar action[32];
gboolean visible = FALSE;
gboolean has_color_tag = FALSE;
gboolean visible = FALSE;
gboolean has_color_tag = FALSE;
gboolean lock_content = TRUE;
gboolean can_lock_content = FALSE;
gboolean lock_position = TRUE;
gboolean can_lock_position = FALSE;
GimpRGB tag_color;
GList *iter;
GeglColor *tag_color = gegl_color_new ("none");
GList *iter;
for (iter = items; iter; iter = iter->next)
{
@@ -116,8 +113,9 @@ items_actions_update (GimpActionGroup *group,
has_color_tag = (has_color_tag ||
gimp_get_color_tag_color (gimp_item_get_color_tag (item),
&tag_color, FALSE));
tag_color, FALSE));
}
g_object_unref (tag_color);
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)

View File

@@ -92,7 +92,7 @@ static const GimpActionEntry layers_actions[] =
GIMP_HELP_LAYER_NEW },
{ "layers-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
NC_("layers-action", "D_uplicate Layer"), NULL, { "<primary><shift>D", NULL },
NC_("layers-action", "D_uplicate Layers"), NULL, { "<primary><shift>D", NULL },
NC_("layers-action",
"Create duplicates of selected layers and add them to the image"),
layers_duplicate_cmd_callback,
@@ -105,26 +105,26 @@ static const GimpActionEntry layers_actions[] =
GIMP_HELP_LAYER_DELETE },
{ "layers-raise", GIMP_ICON_GO_UP,
NC_("layers-action", "_Raise Layer"), NULL, { NULL },
NC_("layers-action", "Raise this layer one step in the layer stack"),
NC_("layers-action", "_Raise Layers"), NULL, { NULL },
NC_("layers-action", "Raise the selected layers one step in the layer stack"),
layers_raise_cmd_callback,
GIMP_HELP_LAYER_RAISE },
{ "layers-raise-to-top", GIMP_ICON_GO_TOP,
NC_("layers-action", "Layer to _Top"), NULL, { NULL },
NC_("layers-action", "Move this layer to the top of the layer stack"),
NC_("layers-action", "Layers to _Top"), NULL, { NULL },
NC_("layers-action", "Move the selected layers to the top of the layer stack"),
layers_raise_to_top_cmd_callback,
GIMP_HELP_LAYER_RAISE_TO_TOP },
{ "layers-lower", GIMP_ICON_GO_DOWN,
NC_("layers-action", "_Lower Layer"), NULL, { NULL },
NC_("layers-action", "Lower this layer one step in the layer stack"),
NC_("layers-action", "_Lower Layers"), NULL, { NULL },
NC_("layers-action", "Lower the selected layers one step in the layer stack"),
layers_lower_cmd_callback,
GIMP_HELP_LAYER_LOWER },
{ "layers-lower-to-bottom", GIMP_ICON_GO_BOTTOM,
NC_("layers-action", "Layer to _Bottom"), NULL, { NULL },
NC_("layers-action", "Move this layer to the bottom of the layer stack"),
NC_("layers-action", "Layers to _Bottom"), NULL, { NULL },
NC_("layers-action", "Move the selected layers to the bottom of the layer stack"),
layers_lower_to_bottom_cmd_callback,
GIMP_HELP_LAYER_LOWER_TO_BOTTOM },
@@ -275,7 +275,7 @@ static const GimpToggleActionEntry layers_toggle_actions[] =
{ "layers-mask-disable", NULL,
NC_("layers-action", "_Disable Layer Masks"), NULL, { NULL },
NC_("layers-action", "Dismiss the effect of the layer mask"),
NC_("layers-action", "Dismiss the effect of the layer masks"),
layers_mask_disable_cmd_callback,
FALSE,
GIMP_HELP_LAYER_MASK_DISABLE },
@@ -321,6 +321,12 @@ static const GimpRadioActionEntry layers_blend_space_actions[] =
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
NULL },
{ "layers-blend-space-rgb-non-linear", NULL,
NC_("layers-action", "RGB (from color profile)"), NULL, { NULL },
NC_("layers-action", "Layer Blend Space: RGB (from color profile)"),
GIMP_LAYER_COLOR_SPACE_RGB_NON_LINEAR,
NULL },
{ "layers-blend-space-rgb-perceptual", NULL,
NC_("layers-action", "RGB (perceptual)"), NULL, { NULL },
NC_("layers-action", "Layer Blend Space: RGB (perceptual)"),
@@ -342,6 +348,12 @@ static const GimpRadioActionEntry layers_composite_space_actions[] =
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
NULL },
{ "layers-composite-space-rgb-non-linear", NULL,
NC_("layers-action", "RGB (from color profile)"), NULL, { NULL },
NC_("layers-action", "Layer Composite Space: RGB (from color profile)"),
GIMP_LAYER_COLOR_SPACE_RGB_NON_LINEAR,
NULL },
{ "layers-composite-space-rgb-perceptual", NULL,
NC_("layers-action", "RGB (perceptual)"), NULL, { NULL },
NC_("layers-action", "Layer Composite Space: RGB (perceptual)"),
@@ -442,13 +454,13 @@ static const GimpEnumActionEntry layers_color_tag_actions[] =
static const GimpEnumActionEntry layers_mask_apply_actions[] =
{
{ "layers-mask-apply", NULL,
NC_("layers-action", "Apply Layer _Mask"), NULL, { NULL },
NC_("layers-action", "Apply the effect of the layer mask and remove it"),
NC_("layers-action", "Apply Layer _Masks"), NULL, { NULL },
NC_("layers-action", "Apply the effect of the layer masks and remove them"),
GIMP_MASK_APPLY, FALSE,
GIMP_HELP_LAYER_MASK_APPLY },
{ "layers-mask-delete", GIMP_ICON_EDIT_DELETE,
NC_("layers-action", "Delete Layer Mas_k"), NULL, { NULL },
NC_("layers-action", "Delete Layer Mas_ks"), NULL, { NULL },
NC_("layers-action", "Remove layer masks and their effect"),
GIMP_MASK_DISCARD, FALSE,
GIMP_HELP_LAYER_MASK_DELETE }
@@ -528,14 +540,30 @@ static const GimpEnumActionEntry layers_select_actions[] =
{ "layers-select-previous", NULL,
NC_("layers-action", "Select _Previous Layers"), NULL, { "Prior", NULL },
NC_("layers-action", "Select the layers above the current layers"),
NC_("layers-action",
"Select the layers above each currently selected layer. "
"Layers will not be selected outside their current group level."),
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
GIMP_HELP_LAYER_PREVIOUS },
{ "layers-select-next", NULL,
NC_("layers-action", "Select _Next Layers"), NULL, { "Next", NULL },
NC_("layers-action", "Select the layers below the current layers"),
NC_("layers-action",
"Select the layers below each currently selected layer. "
"Layers will not be selected outside their current group level."),
GIMP_ACTION_SELECT_NEXT, FALSE,
GIMP_HELP_LAYER_NEXT },
{ "layers-select-flattened-previous", NULL,
NC_("layers-action", "Select Previous Layers (flattened view)"), NULL, { NULL },
NC_("layers-action", "Select the layers above each currently selected layer"),
GIMP_ACTION_SELECT_FLAT_PREVIOUS, FALSE,
GIMP_HELP_LAYER_PREVIOUS },
{ "layers-select-flattened-next", NULL,
NC_("layers-action", "Select Next Layers (flattened view)"), NULL, { NULL },
NC_("layers-action", "Select the layers below each currently selected layer"),
GIMP_ACTION_SELECT_FLAT_NEXT, FALSE,
GIMP_HELP_LAYER_NEXT }
};
@@ -737,6 +765,9 @@ layers_actions_update (GimpActionGroup *group,
gboolean last_mode = FALSE;
gboolean first_mode = FALSE;
gboolean first_selected = FALSE; /* First layer is selected */
gboolean last_selected = FALSE; /* Last layer is selected */
gboolean have_masks = FALSE; /* At least 1 selected layer has a mask. */
gboolean have_no_masks = FALSE; /* At least 1 selected layer has no mask. */
gboolean have_groups = FALSE; /* At least 1 selected layer is a group. */
@@ -838,6 +869,11 @@ layers_actions_update (GimpActionGroup *group,
{
GList *next_visible;
if (gimp_item_get_index (iter2->data) == 0)
first_selected = TRUE;
if (gimp_item_get_index (iter2->data) == n_layers - 1)
last_selected = TRUE;
if (g_list_previous (iter2))
have_prev = TRUE;
@@ -896,6 +932,8 @@ layers_actions_update (GimpActionGroup *group,
action = "layers-blend-space-auto"; break;
case GIMP_LAYER_COLOR_SPACE_RGB_LINEAR:
action = "layers-blend-space-rgb-linear"; break;
case GIMP_LAYER_COLOR_SPACE_RGB_NON_LINEAR:
action = "layers-blend-space-rgb-non-linear"; break;
case GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL:
action = "layers-blend-space-rgb-perceptual"; break;
default:
@@ -911,6 +949,8 @@ layers_actions_update (GimpActionGroup *group,
action = "layers-composite-space-auto"; break;
case GIMP_LAYER_COLOR_SPACE_RGB_LINEAR:
action = "layers-composite-space-rgb-linear"; break;
case GIMP_LAYER_COLOR_SPACE_RGB_NON_LINEAR:
action = "layers-composite-space-rgb-non-linear"; break;
case GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL:
action = "layers-composite-space-rgb-perceptual"; break;
default:
@@ -982,9 +1022,9 @@ layers_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("layers-select-previous", n_selected_layers > 0 && !fs && !ac && have_prev);
SET_SENSITIVE ("layers-select-next", n_selected_layers > 0 && !fs && !ac && have_next);
SET_SENSITIVE ("layers-raise", n_selected_layers > 0 && !fs && !ac && have_prev);
SET_SENSITIVE ("layers-raise", n_selected_layers > 0 && !fs && !ac && have_prev && !first_selected);
SET_SENSITIVE ("layers-raise-to-top", n_selected_layers > 0 && !fs && !ac && have_prev);
SET_SENSITIVE ("layers-lower", n_selected_layers > 0 && !fs && !ac && have_next);
SET_SENSITIVE ("layers-lower", n_selected_layers > 0 && !fs && !ac && have_next && !last_selected);
SET_SENSITIVE ("layers-lower-to-bottom", n_selected_layers > 0 && !fs && !ac && have_next);
SET_VISIBLE ("layers-anchor", fs && !ac);
@@ -1016,10 +1056,12 @@ layers_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("layers-blend-space-auto", n_selected_layers && bs_mutable);
SET_SENSITIVE ("layers-blend-space-rgb-linear", n_selected_layers && bs_mutable);
SET_SENSITIVE ("layers-blend-space-rgb-non-linear", n_selected_layers && bs_mutable);
SET_SENSITIVE ("layers-blend-space-rgb-perceptual", n_selected_layers && bs_mutable);
SET_SENSITIVE ("layers-composite-space-auto", n_selected_layers && cs_mutable);
SET_SENSITIVE ("layers-composite-space-rgb-linear", n_selected_layers && cs_mutable);
SET_SENSITIVE ("layers-composite-space-rgb-non-linear", n_selected_layers && cs_mutable);
SET_SENSITIVE ("layers-composite-space-rgb-perceptual", n_selected_layers && cs_mutable);
SET_SENSITIVE ("layers-composite-mode-auto", n_selected_layers && cm_mutable);

View File

@@ -58,12 +58,12 @@
#include "core/gimpprogress.h"
#include "text/gimptext.h"
#include "text/gimptext-vectors.h"
#include "text/gimptext-path.h"
#include "text/gimptextlayer.h"
#include "vectors/gimppath.h"
#include "vectors/gimppath-warp.h"
#include "vectors/gimpstroke.h"
#include "vectors/gimpvectors.h"
#include "vectors/gimpvectors-warp.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpdock.h"
@@ -148,23 +148,23 @@ static void layers_scale_callback (GtkWidget *dialog,
GimpViewable *viewable,
gint width,
gint height,
GimpUnit unit,
GimpUnit *unit,
GimpInterpolationType interpolation,
gdouble xresolution,
gdouble yresolution,
GimpUnit resolution_unit,
GimpUnit *resolution_unit,
gpointer user_data);
static void layers_resize_callback (GtkWidget *dialog,
GimpViewable *viewable,
GimpContext *context,
gint width,
gint height,
GimpUnit unit,
GimpUnit *unit,
gint offset_x,
gint offset_y,
gdouble unused0,
gdouble unused1,
GimpUnit unused2,
GimpUnit *unused2,
GimpFillType fill_type,
GimpItemSet unused3,
gboolean unused4,
@@ -177,8 +177,8 @@ static gint layers_mode_index (GimpLayerMode layer_mode
/* private variables */
static GimpUnit layer_resize_unit = GIMP_UNIT_PIXEL;
static GimpUnit layer_scale_unit = GIMP_UNIT_PIXEL;
static GimpUnit *layer_resize_unit = NULL;
static GimpUnit *layer_scale_unit = NULL;
static GimpInterpolationType layer_scale_interp = -1;
@@ -271,6 +271,9 @@ layers_edit_attributes_cmd_callback (GimpAction *action,
layer = layers->data;
if (gimp_layer_is_floating_sel (layer))
return;
#define EDIT_DIALOG_KEY "gimp-layer-edit-attributes-dialog"
dialog = dialogs_get_dialog (G_OBJECT (layer), EDIT_DIALOG_KEY);
@@ -657,7 +660,15 @@ layers_raise_cmd_callback (GimpAction *action,
index = gimp_item_get_index (iter->data);
if (index > 0)
raised_layers = g_list_prepend (raised_layers, iter->data);
{
raised_layers = g_list_prepend (raised_layers, iter->data);
}
else
{
gimp_image_flush (image);
g_list_free (raised_layers);
return;
}
}
gimp_image_undo_group_start (image,
@@ -665,6 +676,8 @@ layers_raise_cmd_callback (GimpAction *action,
ngettext ("Raise Layer",
"Raise Layers",
g_list_length (raised_layers)));
raised_layers = g_list_reverse (raised_layers);
for (iter = raised_layers; iter; iter = iter->next)
gimp_image_raise_item (image, iter->data, NULL);
@@ -728,7 +741,15 @@ layers_lower_cmd_callback (GimpAction *action,
layer_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
index = gimp_item_get_index (iter->data);
if (index < g_list_length (layer_list) - 1)
lowered_layers = g_list_prepend (lowered_layers, iter->data);
{
lowered_layers = g_list_prepend (lowered_layers, iter->data);
}
else
{
gimp_image_flush (image);
g_list_free (lowered_layers);
return;
}
}
gimp_image_undo_group_start (image,
@@ -800,7 +821,8 @@ layers_duplicate_cmd_callback (GimpAction *action,
_("Duplicate layers"));
for (iter = layers; iter; iter = iter->next)
{
GimpLayer *new_layer;
GimpLayer *new_layer;
GimpContainer *filters;
new_layer = GIMP_LAYER (gimp_item_duplicate (GIMP_ITEM (iter->data),
G_TYPE_FROM_INSTANCE (iter->data)));
@@ -813,10 +835,12 @@ layers_duplicate_cmd_callback (GimpAction *action,
gimp_layer_get_parent (iter->data),
gimp_item_get_index (iter->data),
TRUE);
gimp_drawable_enable_resize_undo (GIMP_DRAWABLE (new_layer));
new_layers = g_list_prepend (new_layers, new_layer);
/* Import any attached layer effects */
if (gimp_drawable_has_filters (GIMP_DRAWABLE (iter->data)))
filters = gimp_drawable_get_filters (GIMP_DRAWABLE (iter->data));
if (gimp_container_get_n_children (filters) > 0)
{
GList *filter_list;
GimpContainer *filters;
@@ -835,11 +859,14 @@ layers_duplicate_cmd_callback (GimpAction *action,
gimp_drawable_filter_duplicate (GIMP_DRAWABLE (new_layer),
old_filter);
gimp_drawable_filter_apply (filter, NULL);
gimp_drawable_filter_commit (filter, TRUE, NULL, FALSE);
if (filter != NULL)
{
gimp_drawable_filter_apply (filter, NULL);
gimp_drawable_filter_commit (filter, TRUE, NULL, FALSE);
gimp_drawable_filter_layer_mask_freeze (filter);
g_object_unref (filter);
gimp_drawable_filter_layer_mask_freeze (filter);
g_object_unref (filter);
}
}
}
}
@@ -920,11 +947,47 @@ layers_merge_group_cmd_callback (GimpAction *action,
for (iter2 = layers; iter2; iter2 = iter2->next)
{
if (iter->data == iter2->data)
continue;
/* Do not merge a layer when we already merge one of its
* ancestors.
*/
if (gimp_viewable_is_ancestor (iter2->data, iter->data))
break;
/* Do not merge a layer which has a little sister (same
* parent and smaller index) or a little cousin (one of
* its ancestors is a little sister) of a pass-through
* group layer.
* These will be rendered and merged through the
* pass-through by definition.
*/
if (gimp_viewable_get_children (GIMP_VIEWABLE (iter2->data)) &&
gimp_layer_get_mode (iter2->data) == GIMP_LAYER_MODE_PASS_THROUGH)
{
GimpLayer *pass_through_parent = gimp_layer_get_parent (iter2->data);
GimpLayer *cousin = iter->data;
gboolean ignore = FALSE;
do
{
GimpLayer *cousin_parent = gimp_layer_get_parent (cousin);
if (pass_through_parent == cousin_parent &&
gimp_item_get_index (GIMP_ITEM (iter2->data)) < gimp_item_get_index (GIMP_ITEM (cousin)))
{
ignore = TRUE;
break;
}
cousin = cousin_parent;
}
while (cousin != NULL);
if (ignore)
break;
}
}
if (iter2 == NULL)
@@ -976,7 +1039,7 @@ layers_delete_cmd_callback (GimpAction *action,
removed_layers = g_list_copy (layers);
/* Removing children layers (they will be removed anyway by removing
* the parent.
* the parent).
*/
for (iter = removed_layers; iter; iter = iter->next)
{
@@ -1041,7 +1104,7 @@ layers_text_to_vectors_cmd_callback (GimpAction *action,
return_if_no_layers (image, layers, data);
/* TODO: have the proper undo group. */
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_VECTORS_IMPORT,
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_PATHS_IMPORT,
_("Add Paths"));
for (iter = layers; iter; iter = iter->next)
{
@@ -1049,16 +1112,16 @@ layers_text_to_vectors_cmd_callback (GimpAction *action,
if (GIMP_IS_TEXT_LAYER (layer))
{
GimpVectors *vectors;
gint x, y;
GimpPath *path;
gint x, y;
vectors = gimp_text_vectors_new (image, GIMP_TEXT_LAYER (layer)->text);
path = gimp_text_path_new (image, GIMP_TEXT_LAYER (layer)->text);
gimp_item_get_offset (GIMP_ITEM (layer), &x, &y);
gimp_item_translate (GIMP_ITEM (vectors), x, y, FALSE);
gimp_item_translate (GIMP_ITEM (path), x, y, FALSE);
gimp_image_add_vectors (image, vectors,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
gimp_image_add_path (image, path,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
gimp_image_flush (image);
}
}
@@ -1074,26 +1137,26 @@ layers_text_along_vectors_cmd_callback (GimpAction *action,
GList *layers;
GList *paths;
GimpLayer *layer;
GimpVectors *vectors;
GimpPath *path;
return_if_no_layers (image, layers, data);
return_if_no_vectors_list (image, paths, data);
return_if_no_paths (image, paths, data);
if (g_list_length (layers) != 1 || g_list_length (paths) != 1)
return;
layer = layers->data;
vectors = paths->data;
layer = layers->data;
path = paths->data;
if (GIMP_IS_TEXT_LAYER (layer))
{
gdouble box_width;
gdouble box_height;
GimpVectors *new_vectors;
gdouble offset;
gdouble box_width;
gdouble box_height;
GimpPath *new_path;
gdouble offset;
box_width = gimp_item_get_width (GIMP_ITEM (layer));
box_height = gimp_item_get_height (GIMP_ITEM (layer));
new_vectors = gimp_text_vectors_new (image, GIMP_TEXT_LAYER (layer)->text);
new_path = gimp_text_path_new (image, GIMP_TEXT_LAYER (layer)->text);
offset = 0;
switch (GIMP_TEXT_LAYER (layer)->text->base_dir)
@@ -1109,7 +1172,7 @@ layers_text_along_vectors_cmd_callback (GimpAction *action,
{
GimpStroke *stroke = NULL;
while ((stroke = gimp_vectors_stroke_get_next (new_vectors, stroke)))
while ((stroke = gimp_path_stroke_get_next (new_path, stroke)))
{
gimp_stroke_rotate (stroke, 0, 0, 270);
gimp_stroke_translate (stroke, 0, box_width);
@@ -1119,13 +1182,12 @@ layers_text_along_vectors_cmd_callback (GimpAction *action,
break;
}
gimp_path_warp_path (path, new_path, offset);
gimp_vectors_warp_vectors (vectors, new_vectors, offset);
gimp_item_set_visible (GIMP_ITEM (new_path), TRUE, FALSE);
gimp_item_set_visible (GIMP_ITEM (new_vectors), TRUE, FALSE);
gimp_image_add_vectors (image, new_vectors,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
gimp_image_add_path (image, new_path,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
gimp_image_flush (image);
}
}
@@ -1159,7 +1221,10 @@ layers_resize_cmd_callback (GimpAction *action,
if (GIMP_IS_IMAGE_WINDOW (data))
display = action_data_get_display (data);
if (layer_resize_unit != GIMP_UNIT_PERCENT && display)
if (layer_resize_unit == NULL)
layer_resize_unit = gimp_unit_pixel ();
if (layer_resize_unit != gimp_unit_percent () && display)
layer_resize_unit = gimp_display_get_shell (display)->unit;
dialog = resize_dialog_new (GIMP_VIEWABLE (layer),
@@ -1234,7 +1299,10 @@ layers_scale_cmd_callback (GimpAction *action,
if (GIMP_IS_IMAGE_WINDOW (data))
display = action_data_get_display (data);
if (layer_scale_unit != GIMP_UNIT_PERCENT && display)
if (layer_scale_unit == NULL)
layer_scale_unit = gimp_unit_pixel ();;
if (layer_scale_unit != gimp_unit_percent () && display)
layer_scale_unit = gimp_display_get_shell (display)->unit;
if (layer_scale_interp == -1)
@@ -2472,11 +2540,11 @@ layers_scale_callback (GtkWidget *dialog,
GimpViewable *viewable,
gint width,
gint height,
GimpUnit unit,
GimpUnit *unit,
GimpInterpolationType interpolation,
gdouble xresolution, /* unused */
gdouble yresolution, /* unused */
GimpUnit resolution_unit,/* unused */
GimpUnit *resolution_unit,/* unused */
gpointer user_data)
{
GimpDisplay *display = GIMP_DISPLAY (user_data);
@@ -2533,12 +2601,12 @@ layers_resize_callback (GtkWidget *dialog,
GimpContext *context,
gint width,
gint height,
GimpUnit unit,
GimpUnit *unit,
gint offset_x,
gint offset_y,
gdouble unused0,
gdouble unused1,
GimpUnit unused2,
GimpUnit *unused2,
GimpFillType fill_type,
GimpItemSet unused3,
gboolean unused4,

View File

@@ -59,6 +59,8 @@ libappactions_sources = [
'palette-editor-commands.c',
'palettes-actions.c',
'palettes-commands.c',
'paths-actions.c',
'paths-commands.c',
'patterns-actions.c',
'plug-in-actions.c',
'plug-in-commands.c',
@@ -85,8 +87,6 @@ libappactions_sources = [
'tools-commands.c',
'vector-toolpath-actions.c',
'vector-toolpath-commands.c',
'vectors-actions.c',
'vectors-commands.c',
'view-actions.c',
'view-commands.c',
'window-actions.c',

462
app/actions/paths-actions.c Normal file
View File

@@ -0,0 +1,462 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "core/gimpchannel.h"
#include "core/gimpcontainer.h"
#include "core/gimpimage.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpwidgets-utils.h"
#include "actions.h"
#include "items-actions.h"
#include "paths-actions.h"
#include "paths-commands.h"
#include "gimp-intl.h"
static const GimpActionEntry paths_actions[] =
{
{ "paths-edit", GIMP_ICON_TOOL_PATH,
NC_("paths-action", "Edit Pa_th"), NULL, { NULL },
NC_("paths-action", "Edit the active path"),
paths_edit_cmd_callback,
GIMP_HELP_TOOL_VECTORS },
{ "paths-edit-attributes", GIMP_ICON_EDIT,
NC_("paths-action", "_Edit Path Attributes..."), NULL, { NULL },
NC_("paths-action", "Edit path attributes"),
paths_edit_attributes_cmd_callback,
GIMP_HELP_PATH_EDIT },
{ "paths-new", GIMP_ICON_DOCUMENT_NEW,
NC_("paths-action", "_New Path..."), NULL, { NULL },
NC_("paths-action", "Create a new path..."),
paths_new_cmd_callback,
GIMP_HELP_PATH_NEW },
{ "paths-new-last-values", GIMP_ICON_DOCUMENT_NEW,
NC_("paths-action", "_New Path with last values"), NULL, { NULL },
NC_("paths-action", "Create a new path with last used values"),
paths_new_last_vals_cmd_callback,
GIMP_HELP_PATH_NEW },
{ "paths-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
NC_("paths-action", "D_uplicate Paths"), NULL, { NULL },
NC_("paths-action", "Duplicate these paths"),
paths_duplicate_cmd_callback,
GIMP_HELP_PATH_DUPLICATE },
{ "paths-delete", GIMP_ICON_EDIT_DELETE,
NC_("paths-action", "_Delete Paths"), NULL, { NULL },
NC_("paths-action", "Delete the selected paths"),
paths_delete_cmd_callback,
GIMP_HELP_PATH_DELETE },
{ "paths-merge-visible", NULL,
NC_("paths-action", "Merge _Visible Paths"), NULL, { NULL }, NULL,
paths_merge_visible_cmd_callback,
GIMP_HELP_PATH_MERGE_VISIBLE },
{ "paths-raise", GIMP_ICON_GO_UP,
NC_("paths-action", "_Raise Paths"), NULL, { NULL },
NC_("paths-action", "Raise the selected paths"),
paths_raise_cmd_callback,
GIMP_HELP_PATH_RAISE },
{ "paths-raise-to-top", GIMP_ICON_GO_TOP,
NC_("paths-action", "Raise Paths to _Top"), NULL, { NULL },
NC_("paths-action", "Raise the selected paths to the top"),
paths_raise_to_top_cmd_callback,
GIMP_HELP_PATH_RAISE_TO_TOP },
{ "paths-lower", GIMP_ICON_GO_DOWN,
NC_("paths-action", "_Lower Paths"), NULL, { NULL },
NC_("paths-action", "Lower the selected paths"),
paths_lower_cmd_callback,
GIMP_HELP_PATH_LOWER },
{ "paths-lower-to-bottom", GIMP_ICON_GO_BOTTOM,
NC_("paths-action", "Lower Paths to _Bottom"), NULL, { NULL },
NC_("paths-action", "Lower the selected paths to the bottom"),
paths_lower_to_bottom_cmd_callback,
GIMP_HELP_PATH_LOWER_TO_BOTTOM },
{ "paths-fill", GIMP_ICON_TOOL_BUCKET_FILL,
NC_("paths-action", "Fill Pat_hs..."), NULL, { NULL },
NC_("paths-action", "Fill the paths"),
paths_fill_cmd_callback,
GIMP_HELP_PATH_FILL },
{ "paths-fill-last-values", GIMP_ICON_TOOL_BUCKET_FILL,
NC_("paths-action", "Fill Paths"), NULL, { NULL },
NC_("paths-action", "Fill the paths with last values"),
paths_fill_last_vals_cmd_callback,
GIMP_HELP_PATH_FILL },
{ "paths-stroke", GIMP_ICON_PATH_STROKE,
NC_("paths-action", "Stro_ke Paths..."), NULL, { NULL },
NC_("paths-action", "Paint along the paths"),
paths_stroke_cmd_callback,
GIMP_HELP_PATH_STROKE },
{ "paths-stroke-last-values", GIMP_ICON_PATH_STROKE,
NC_("paths-action", "Stro_ke Paths"), NULL, { NULL },
NC_("paths-action", "Paint along the paths with last values"),
paths_stroke_last_vals_cmd_callback,
GIMP_HELP_PATH_STROKE },
{ "paths-copy", GIMP_ICON_EDIT_COPY,
NC_("paths-action", "Co_py Paths"), NULL, { NULL }, NULL,
paths_copy_cmd_callback,
GIMP_HELP_PATH_COPY },
{ "paths-paste", GIMP_ICON_EDIT_PASTE,
NC_("paths-action", "Paste Pat_h"), NULL, { NULL }, NULL,
paths_paste_cmd_callback,
GIMP_HELP_PATH_PASTE },
{ "paths-export", GIMP_ICON_DOCUMENT_SAVE,
NC_("paths-action", "E_xport Paths..."), NULL, { NULL }, NULL,
paths_export_cmd_callback,
GIMP_HELP_PATH_EXPORT },
{ "paths-import", GIMP_ICON_DOCUMENT_OPEN,
NC_("paths-action", "I_mport Path..."), NULL, { NULL }, NULL,
paths_import_cmd_callback,
GIMP_HELP_PATH_IMPORT }
};
static const GimpToggleActionEntry paths_toggle_actions[] =
{
{ "paths-visible", GIMP_ICON_VISIBLE,
NC_("paths-action", "Toggle Path _Visibility"), NULL, { NULL }, NULL,
paths_visible_cmd_callback,
FALSE,
GIMP_HELP_PATH_VISIBLE },
{ "paths-lock-content", GIMP_ICON_LOCK_CONTENT,
NC_("paths-action", "L_ock Strokes of Path"), NULL, { NULL }, NULL,
paths_lock_content_cmd_callback,
FALSE,
GIMP_HELP_PATH_LOCK_STROKES },
{ "paths-lock-position", GIMP_ICON_LOCK_POSITION,
NC_("paths-action", "L_ock Position of Path"), NULL, { NULL }, NULL,
paths_lock_position_cmd_callback,
FALSE,
GIMP_HELP_PATH_LOCK_POSITION }
};
static const GimpEnumActionEntry paths_color_tag_actions[] =
{
{ "paths-color-tag-none", GIMP_ICON_EDIT_CLEAR,
NC_("paths-action", "None"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Clear"),
GIMP_COLOR_TAG_NONE, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "paths-color-tag-blue", NULL,
NC_("paths-action", "Blue"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Blue"),
GIMP_COLOR_TAG_BLUE, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "paths-color-tag-green", NULL,
NC_("paths-action", "Green"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Green"),
GIMP_COLOR_TAG_GREEN, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "paths-color-tag-yellow", NULL,
NC_("paths-action", "Yellow"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Yellow"),
GIMP_COLOR_TAG_YELLOW, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "paths-color-tag-orange", NULL,
NC_("paths-action", "Orange"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Orange"),
GIMP_COLOR_TAG_ORANGE, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "paths-color-tag-brown", NULL,
NC_("paths-action", "Brown"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Brown"),
GIMP_COLOR_TAG_BROWN, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "paths-color-tag-red", NULL,
NC_("paths-action", "Red"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Red"),
GIMP_COLOR_TAG_RED, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "paths-color-tag-violet", NULL,
NC_("paths-action", "Violet"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Violet"),
GIMP_COLOR_TAG_VIOLET, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "paths-color-tag-gray", NULL,
NC_("paths-action", "Gray"), NULL, { NULL },
NC_("paths-action", "Path Color Tag: Set to Gray"),
GIMP_COLOR_TAG_GRAY, FALSE,
GIMP_HELP_PATH_COLOR_TAG }
};
static const GimpEnumActionEntry paths_to_selection_actions[] =
{
{ "paths-selection-replace", GIMP_ICON_SELECTION_REPLACE,
NC_("paths-action", "Paths to Sele_ction"), NULL, { NULL },
NC_("paths-action", "Path to selection"),
GIMP_CHANNEL_OP_REPLACE, FALSE,
GIMP_HELP_PATH_SELECTION_REPLACE },
{ "paths-selection-from-paths", GIMP_ICON_SELECTION_REPLACE,
NC_("paths-action", "Selection Fr_om Paths"), NULL, { "<shift>V", NULL },
NC_("paths-action", "Replace selection with paths"),
GIMP_CHANNEL_OP_REPLACE, FALSE,
GIMP_HELP_PATH_SELECTION_REPLACE },
{ "paths-selection-add", GIMP_ICON_SELECTION_ADD,
NC_("paths-action", "_Add Paths to Selection"), NULL, { NULL },
NC_("paths-action", "Add paths to selection"),
GIMP_CHANNEL_OP_ADD, FALSE,
GIMP_HELP_PATH_SELECTION_ADD },
{ "paths-selection-subtract", GIMP_ICON_SELECTION_SUBTRACT,
NC_("paths-action", "_Subtract Paths from Selection"), NULL, { NULL },
NC_("paths-action", "Subtract paths from selection"),
GIMP_CHANNEL_OP_SUBTRACT, FALSE,
GIMP_HELP_PATH_SELECTION_SUBTRACT },
{ "paths-selection-intersect", GIMP_ICON_SELECTION_INTERSECT,
NC_("paths-action", "_Intersect Paths with Selection"), NULL, { NULL },
NC_("paths-action", "Intersect paths with selection"),
GIMP_CHANNEL_OP_INTERSECT, FALSE,
GIMP_HELP_PATH_SELECTION_INTERSECT }
};
static const GimpEnumActionEntry paths_selection_to_paths_actions[] =
{
{ "paths-selection-to-path", GIMP_ICON_SELECTION_TO_PATH,
NC_("paths-action", "Selecti_on to Path"),
NC_("paths-action", "To _Path"), { NULL },
NC_("paths-action", "Selection to path"),
FALSE, FALSE,
GIMP_HELP_SELECTION_TO_PATH },
{ "paths-selection-to-path-advanced", GIMP_ICON_SELECTION_TO_PATH,
NC_("paths-action", "Selection to Path (_Advanced)"), NULL, { NULL },
NC_("paths-action", "Advanced options"),
TRUE, FALSE,
GIMP_HELP_SELECTION_TO_PATH }
};
static const GimpEnumActionEntry paths_select_actions[] =
{
{ "paths-select-top", NULL,
NC_("paths-action", "Select _Top Path"), NULL, { NULL },
NC_("paths-action", "Select the topmost path"),
GIMP_ACTION_SELECT_FIRST, FALSE,
GIMP_HELP_PATH_TOP },
{ "paths-select-bottom", NULL,
NC_("paths-action", "Select _Bottom Path"), NULL, { NULL },
NC_("paths-action", "Select the bottommost path"),
GIMP_ACTION_SELECT_LAST, FALSE,
GIMP_HELP_PATH_BOTTOM },
{ "paths-select-previous", NULL,
NC_("paths-action", "Select _Previous Path"), NULL, { NULL },
NC_("paths-action", "Select the path above the current path"),
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
GIMP_HELP_PATH_PREVIOUS },
{ "paths-select-next", NULL,
NC_("paths-action", "Select _Next Path"), NULL, { NULL },
NC_("paths-action", "Select the path below the current path"),
GIMP_ACTION_SELECT_NEXT, FALSE,
GIMP_HELP_PATH_NEXT }
};
void
paths_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group, "paths-action",
paths_actions,
G_N_ELEMENTS (paths_actions));
gimp_action_group_add_toggle_actions (group, "paths-action",
paths_toggle_actions,
G_N_ELEMENTS (paths_toggle_actions));
gimp_action_group_add_enum_actions (group, "paths-action",
paths_color_tag_actions,
G_N_ELEMENTS (paths_color_tag_actions),
paths_color_tag_cmd_callback);
gimp_action_group_add_enum_actions (group, "paths-action",
paths_to_selection_actions,
G_N_ELEMENTS (paths_to_selection_actions),
paths_to_selection_cmd_callback);
gimp_action_group_add_enum_actions (group, "paths-action",
paths_selection_to_paths_actions,
G_N_ELEMENTS (paths_selection_to_paths_actions),
paths_selection_to_paths_cmd_callback);
gimp_action_group_add_enum_actions (group, "paths-action",
paths_select_actions,
G_N_ELEMENTS (paths_select_actions),
paths_select_cmd_callback);
items_actions_setup (group, "paths");
}
void
paths_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *image = action_data_get_image (data);
GList *selected_path = NULL;
gint n_selected_paths = 0;
gint n_paths = 0;
gboolean mask_empty = TRUE;
gboolean dr_writable = FALSE;
gboolean dr_children = FALSE;
gboolean have_prev = FALSE; /* At least 1 selected path has a previous sibling. */
gboolean have_next = FALSE; /* At least 1 selected path has a next sibling. */
gboolean first_selected = FALSE; /* First channel is selected */
gboolean last_selected = FALSE; /* Last channel is selected */
if (image)
{
GList *drawables;
GList *iter;
n_paths = gimp_image_get_n_paths (image);
mask_empty = gimp_channel_is_empty (gimp_image_get_mask (image));
selected_path = gimp_image_get_selected_paths (image);
n_selected_paths = g_list_length (selected_path);
for (iter = selected_path; iter; iter = iter->next)
{
GList *paths_list;
GList *iter2;
paths_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
iter2 = g_list_find (paths_list, iter->data);
if (iter2)
{
if (gimp_item_get_index (iter2->data) == 0)
first_selected = TRUE;
if (gimp_item_get_index (iter2->data) == n_paths - 1)
last_selected = TRUE;
if (g_list_previous (iter2))
have_prev = TRUE;
if (g_list_next (iter2))
have_next = TRUE;
}
}
drawables = gimp_image_get_selected_drawables (image);
if (g_list_length (drawables) == 1)
{
dr_writable = ! gimp_item_is_content_locked (GIMP_ITEM (drawables->data), NULL);
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawables->data)))
dr_children = TRUE;
}
g_list_free (drawables);
}
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
SET_SENSITIVE ("paths-edit", n_selected_paths == 1);
SET_SENSITIVE ("paths-edit-attributes", n_selected_paths == 1);
SET_SENSITIVE ("paths-new", image);
SET_SENSITIVE ("paths-new-last-values", image);
SET_SENSITIVE ("paths-duplicate", n_selected_paths > 0);
SET_SENSITIVE ("paths-delete", n_selected_paths > 0);
SET_SENSITIVE ("paths-merge-visible", n_paths > 1);
SET_SENSITIVE ("paths-raise", n_selected_paths > 0 && have_prev && !first_selected);
SET_SENSITIVE ("paths-raise-to-top", n_selected_paths > 0 && have_prev);
SET_SENSITIVE ("paths-lower", n_selected_paths > 0 && have_next && !last_selected);
SET_SENSITIVE ("paths-lower-to-bottom", n_selected_paths > 0 && have_next);
SET_SENSITIVE ("paths-copy", n_selected_paths > 0);
SET_SENSITIVE ("paths-paste", image);
SET_SENSITIVE ("paths-export", n_selected_paths > 0);
SET_SENSITIVE ("paths-import", image);
SET_SENSITIVE ("paths-selection-to-path", image && !mask_empty);
SET_SENSITIVE ("paths-selection-to-path-advanced", image && !mask_empty);
SET_SENSITIVE ("paths-fill", n_selected_paths > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("paths-fill-last-values", n_selected_paths > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("paths-stroke", n_selected_paths > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("paths-stroke-last-values", n_selected_paths > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("paths-selection-replace", n_selected_paths > 0);
SET_SENSITIVE ("paths-selection-from-paths", n_selected_paths > 0);
SET_SENSITIVE ("paths-selection-add", n_selected_paths > 0);
SET_SENSITIVE ("paths-selection-subtract", n_selected_paths > 0);
SET_SENSITIVE ("paths-selection-intersect", n_selected_paths > 0);
SET_SENSITIVE ("paths-select-top", n_selected_paths > 0 && have_prev);
SET_SENSITIVE ("paths-select-bottom", n_selected_paths > 0 && have_next);
SET_SENSITIVE ("paths-select-previous", n_selected_paths > 0 && have_prev);
SET_SENSITIVE ("paths-select-next", n_selected_paths > 0 && have_next);
#undef SET_SENSITIVE
#undef SET_ACTIVE
items_actions_update (group, "paths", selected_path);
}

View File

@@ -15,13 +15,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __VECTORS_ACTIONS_H__
#define __VECTORS_ACTIONS_H__
#ifndef __PATHS_ACTIONS_H__
#define __PATHS_ACTIONS_H__
void vectors_actions_setup (GimpActionGroup *group);
void vectors_actions_update (GimpActionGroup *group,
gpointer data);
void paths_actions_setup (GimpActionGroup *group);
void paths_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __VECTORS_ACTIONS_H__ */
#endif /* __PATHS_ACTIONS_H__ */

1052
app/actions/paths-commands.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,109 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PATHS_COMMANDS_H__
#define __PATHS_COMMANDS_H__
void paths_edit_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_edit_attributes_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_new_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_new_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_raise_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_raise_to_top_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_lower_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_lower_to_bottom_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_duplicate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_merge_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_to_selection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_selection_to_paths_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_fill_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_fill_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_stroke_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_stroke_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_copy_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_paste_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_export_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_import_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_lock_content_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_lock_position_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_color_tag_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __PATHS_COMMANDS_H__ */

View File

@@ -117,9 +117,7 @@ plug_in_actions_update (GimpActionGroup *group,
{
GimpPlugInProcedure *proc = list->data;
if (proc->menu_label &&
! proc->file_proc &&
proc->image_types_val)
if (proc->menu_label && ! proc->file_proc)
{
GimpProcedure *procedure = GIMP_PROCEDURE (proc);
gboolean sensitive;

View File

@@ -84,7 +84,7 @@ plug_in_run_cmd_callback (GimpAction *action,
switch (procedure->proc_type)
{
case GIMP_PDB_PROC_TYPE_EXTENSION:
case GIMP_PDB_PROC_TYPE_PERSISTENT:
args = procedure_commands_get_run_mode_arg (procedure);
break;

View File

@@ -24,6 +24,8 @@
#include "actions-types.h"
#include "operations/gimpoperationsettings.h"
#include "core/gimp.h"
#include "core/gimpimage.h"
#include "core/gimpdrawable.h"
@@ -193,31 +195,20 @@ procedure_commands_get_items_args (GimpProcedure *procedure,
return NULL;
}
}
else if (gimp_value_array_length (args) > n_args + 1 &&
G_IS_PARAM_SPEC_INT (procedure->args[n_args]) &&
GIMP_IS_PARAM_SPEC_OBJECT_ARRAY (procedure->args[n_args + 1]))
else if (GIMP_IS_PARAM_SPEC_CORE_OBJECT_ARRAY (procedure->args[n_args]))
{
GimpItem **items = NULL;
gint n_items;
GList *iter;
gint i;
n_items = g_list_length (items_list);
items = g_new0 (GimpItem *, n_items + 1);
for (iter = items_list, i = 0; iter; iter = iter->next, i++)
items[i] = iter->data;
g_value_set_int (gimp_value_array_index (args, n_args++),
n_items);
if (items_list)
{
GList *iter;
gint i;
items = g_new (GimpItem *, n_items);
for (iter = items_list, i = 0; iter; iter = iter->next, i++)
items[i] = iter->data;
}
gimp_value_set_object_array (gimp_value_array_index (args, n_args++),
GIMP_TYPE_ITEM,
(GObject **) items, n_items);
g_value_set_boxed (gimp_value_array_index (args, n_args++), (GObject **) items);
g_free (items);
}
@@ -298,31 +289,21 @@ procedure_commands_get_display_args (GimpProcedure *procedure,
return NULL;
}
}
else if (gimp_value_array_length (args) > n_args + 1 &&
G_IS_PARAM_SPEC_INT (procedure->args[n_args]) &&
GIMP_IS_PARAM_SPEC_OBJECT_ARRAY (procedure->args[n_args + 1]))
else if (GIMP_IS_PARAM_SPEC_CORE_OBJECT_ARRAY (procedure->args[n_args]))
{
GimpDrawable **drawables = NULL;
gint n_drawables;
GList *iter;
gint i;
n_drawables = g_list_length (drawables_list);
g_value_set_int (gimp_value_array_index (args, n_args++),
n_drawables);
drawables = g_new0 (GimpDrawable *, n_drawables + 1);
for (iter = drawables_list, i = 0; iter; iter = iter->next, i++)
drawables[i] = iter->data;
if (drawables_list)
{
GList *iter;
gint i;
drawables = g_new (GimpDrawable *, n_drawables);
for (iter = drawables_list, i = 0; iter; iter = iter->next, i++)
drawables[i] = iter->data;
}
gimp_value_set_object_array (gimp_value_array_index (args, n_args++),
GIMP_TYPE_DRAWABLE,
(GObject **) drawables, n_drawables);
g_value_set_boxed (gimp_value_array_index (args, n_args++), (GObject **) drawables);
g_free (drawables);
}
@@ -330,9 +311,13 @@ procedure_commands_get_display_args (GimpProcedure *procedure,
}
}
/* Some filters have a settings object (see filters_settings_actions
* list), which we want to pass around, but we don't want to pass
* other types of object data.
*/
if (gimp_value_array_length (args) > n_args &&
g_type_is_a (G_PARAM_SPEC_VALUE_TYPE (procedure->args[n_args]),
GIMP_TYPE_OBJECT))
GIMP_TYPE_OPERATION_SETTINGS))
{
g_value_set_object (gimp_value_array_index (args, n_args), settings);
n_args++;

View File

@@ -20,6 +20,7 @@
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
@@ -53,19 +54,19 @@
static void select_feather_callback (GtkWidget *widget,
gdouble size,
GimpUnit unit,
GimpUnit *unit,
gpointer data);
static void select_border_callback (GtkWidget *widget,
gdouble size,
GimpUnit unit,
GimpUnit *unit,
gpointer data);
static void select_grow_callback (GtkWidget *widget,
gdouble size,
GimpUnit unit,
GimpUnit *unit,
gpointer data);
static void select_shrink_callback (GtkWidget *widget,
gdouble size,
GimpUnit unit,
GimpUnit *unit,
gpointer data);
static void select_float (GimpAction *action,
GVariant *value,
@@ -157,7 +158,7 @@ select_feather_cmd_callback (GimpAction *action,
gimp_standard_help_func,
GIMP_HELP_SELECTION_FEATHER,
_("Feather selection by"),
config->selection_feather_radius, 0, 32767, 3,
config->selection_feather_radius, 0, 5250, 3,
gimp_display_get_shell (display)->unit,
MIN (xres, yres),
FALSE,
@@ -502,7 +503,7 @@ select_stroke_last_vals_cmd_callback (GimpAction *action,
static void
select_feather_callback (GtkWidget *widget,
gdouble size,
GimpUnit unit,
GimpUnit *unit,
gpointer data)
{
GimpImage *image = GIMP_IMAGE (data);
@@ -522,7 +523,7 @@ select_feather_callback (GtkWidget *widget,
radius_x = config->selection_feather_radius;
radius_y = config->selection_feather_radius;
if (unit != GIMP_UNIT_PIXEL)
if (unit != gimp_unit_pixel ())
{
gdouble xres;
gdouble yres;
@@ -548,7 +549,7 @@ select_feather_callback (GtkWidget *widget,
static void
select_border_callback (GtkWidget *widget,
gdouble size,
GimpUnit unit,
GimpUnit *unit,
gpointer data)
{
GimpImage *image = GIMP_IMAGE (data);
@@ -574,7 +575,7 @@ select_border_callback (GtkWidget *widget,
radius_x = ROUND (config->selection_border_radius);
radius_y = ROUND (config->selection_border_radius);
if (unit != GIMP_UNIT_PIXEL)
if (unit != gimp_unit_pixel ())
{
gdouble xres;
gdouble yres;
@@ -601,7 +602,7 @@ select_border_callback (GtkWidget *widget,
static void
select_grow_callback (GtkWidget *widget,
gdouble size,
GimpUnit unit,
GimpUnit *unit,
gpointer data)
{
GimpImage *image = GIMP_IMAGE (data);
@@ -616,7 +617,7 @@ select_grow_callback (GtkWidget *widget,
radius_x = ROUND (config->selection_grow_radius);
radius_y = ROUND (config->selection_grow_radius);
if (unit != GIMP_UNIT_PIXEL)
if (unit != gimp_unit_pixel ())
{
gdouble xres;
gdouble yres;
@@ -640,7 +641,7 @@ select_grow_callback (GtkWidget *widget,
static void
select_shrink_callback (GtkWidget *widget,
gdouble size,
GimpUnit unit,
GimpUnit *unit,
gpointer data)
{
GimpImage *image = GIMP_IMAGE (data);
@@ -660,7 +661,7 @@ select_shrink_callback (GtkWidget *widget,
radius_x = ROUND (config->selection_shrink_radius);
radius_y = ROUND (config->selection_shrink_radius);
if (unit != GIMP_UNIT_PIXEL)
if (unit != gimp_unit_pixel ())
{
gdouble xres;
gdouble yres;

View File

@@ -36,11 +36,6 @@
static const GimpActionEntry text_editor_actions[] =
{
{ "text-editor-toolbar", GIMP_ICON_EDIT,
NC_("text-editor-action", "Text Editor Toolbar"),
NULL, { NULL }, NULL, NULL,
GIMP_HELP_TEXT_EDITOR_DIALOG },
{ "text-editor-load", GIMP_ICON_DOCUMENT_OPEN,
NC_("text-editor-action", "Open"), NULL, { NULL },
NC_("text-editor-action", "Load text from file"),

View File

@@ -49,47 +49,47 @@ static const GimpActionEntry text_tool_actions[] =
{ "text-tool-cut", GIMP_ICON_EDIT_CUT,
NC_("text-tool-action", "Cu_t"), NULL, { "<primary>X", NULL }, NULL,
text_tool_cut_cmd_callback,
NULL },
GIMP_HELP_TEXT_TOOL_CUT },
{ "text-tool-copy", GIMP_ICON_EDIT_COPY,
NC_("text-tool-action", "_Copy"), NULL, { "<primary>C", NULL }, NULL,
text_tool_copy_cmd_callback,
NULL },
GIMP_HELP_TEXT_TOOL_COPY },
{ "text-tool-paste", GIMP_ICON_EDIT_PASTE,
NC_("text-tool-action", "_Paste"), NULL, { "<primary>V", NULL }, NULL,
text_tool_paste_cmd_callback,
NULL },
GIMP_HELP_TEXT_TOOL_PASTE },
{ "text-tool-delete", GIMP_ICON_EDIT_DELETE,
NC_("text-tool-action", "_Delete"), NULL, { NULL }, NULL,
text_tool_delete_cmd_callback,
NULL },
GIMP_HELP_TEXT_TOOL_DELETE },
{ "text-tool-load", GIMP_ICON_DOCUMENT_OPEN,
NC_("text-tool-action", "_Open text file..."), NULL, { NULL }, NULL,
text_tool_load_cmd_callback,
NULL },
GIMP_HELP_TEXT_TOOL_OPEN_TEXT_FILE },
{ "text-tool-clear", GIMP_ICON_EDIT_CLEAR,
NC_("text-tool-action", "Cl_ear"), NULL, { NULL },
NC_("text-tool-action", "Clear all text"),
text_tool_clear_cmd_callback,
NULL },
GIMP_HELP_TEXT_TOOL_CLEAR },
{ "text-tool-text-to-path", GIMP_ICON_PATH,
NC_("text-tool-action", "_Path from Text"), NULL, { NULL },
NC_("text-tool-action", "Text to _Path"), NULL, { NULL },
NC_("text-tool-action",
"Create a path from the outlines of the current text"),
text_tool_text_to_path_cmd_callback,
NULL },
GIMP_HELP_TEXT_TOOL_TEXT_TO_PATH },
{ "text-tool-text-along-path", GIMP_ICON_PATH,
NC_("text-tool-action", "Text _along Path"), NULL, { NULL },
NC_("text-tool-action",
"Bend the text along the currently active path"),
text_tool_text_along_path_cmd_callback,
NULL }
GIMP_HELP_TEXT_TOOL_TEXT_ALONG_PATH }
};
static const GimpRadioActionEntry text_tool_direction_actions[] =
@@ -97,32 +97,32 @@ static const GimpRadioActionEntry text_tool_direction_actions[] =
{ "text-tool-direction-ltr", GIMP_ICON_FORMAT_TEXT_DIRECTION_LTR,
NC_("text-tool-action", "From left to right"), NULL, { NULL }, NULL,
GIMP_TEXT_DIRECTION_LTR,
NULL },
GIMP_HELP_TEXT_TOOL_DIRECTION_LTR },
{ "text-tool-direction-rtl", GIMP_ICON_FORMAT_TEXT_DIRECTION_RTL,
NC_("text-tool-action", "From right to left"), NULL, { NULL }, NULL,
GIMP_TEXT_DIRECTION_RTL,
NULL },
GIMP_HELP_TEXT_TOOL_DIRECTION_RTL },
{ "text-tool-direction-ttb-rtl", GIMP_ICON_FORMAT_TEXT_DIRECTION_TTB_RTL,
NC_("text-tool-action", "Vertical, right to left (mixed orientation)"), NULL, { NULL }, NULL,
GIMP_TEXT_DIRECTION_TTB_RTL,
NULL },
GIMP_HELP_TEXT_TOOL_DIRECTION_TTB_RTL },
{ "text-tool-direction-ttb-rtl-upright", GIMP_ICON_FORMAT_TEXT_DIRECTION_TTB_RTL_UPRIGHT,
NC_("text-tool-action", "Vertical, right to left (upright orientation)"), NULL, { NULL }, NULL,
GIMP_TEXT_DIRECTION_TTB_RTL_UPRIGHT,
NULL },
GIMP_HELP_TEXT_TOOL_DIRECTION_TTB_RTL_UP },
{ "text-tool-direction-ttb-ltr", GIMP_ICON_FORMAT_TEXT_DIRECTION_TTB_LTR,
NC_("text-tool-action", "Vertical, left to right (mixed orientation)"), NULL, { NULL }, NULL,
GIMP_TEXT_DIRECTION_TTB_LTR,
NULL },
GIMP_HELP_TEXT_TOOL_DIRECTION_TTB_LTR },
{ "text-tool-direction-ttb-ltr-upright", GIMP_ICON_FORMAT_TEXT_DIRECTION_TTB_LTR_UPRIGHT,
NC_("text-tool-action", "Vertical, left to right (upright orientation)"), NULL, { NULL }, NULL,
GIMP_TEXT_DIRECTION_TTB_LTR_UPRIGHT,
NULL }
GIMP_HELP_TEXT_TOOL_DIRECTION_TTB_LTR_UP }
};
@@ -172,7 +172,7 @@ text_tool_actions_update (GimpActionGroup *group,
if (g_list_length (layers) == 1)
text_layer = gimp_item_is_text_layer (GIMP_ITEM (layers->data));
paths = gimp_image_get_selected_vectors (image);
paths = gimp_image_get_selected_paths (image);
text_sel = gimp_text_tool_get_has_text_selection (text_tool);

View File

@@ -44,24 +44,24 @@ static const GimpActionEntry vector_toolpath_actions[] =
{ "vector-toolpath-delete-anchor", GIMP_ICON_PATH,
NC_("vector-toolpath-action", "_Delete Anchor"), NULL, { NULL }, NULL,
vector_toolpath_delete_anchor_cmd_callback,
NULL },
GIMP_HELP_PATH_TOOL_DELETE_ANCHOR },
{ "vector-toolpath-shift-start", GIMP_ICON_PATH,
NC_("vector-toolpath-action", "Shift S_tart"), NULL, { NULL }, NULL,
vector_toolpath_shift_start_cmd_callback,
NULL },
GIMP_HELP_PATH_TOOL_SHIFT_START },
{ "vector-toolpath-insert-anchor", GIMP_ICON_PATH,
NC_("vector-toolpath-action", "_Insert Anchor"), NULL, { NULL }, NULL,
vector_toolpath_insert_anchor_cmd_callback,
NULL },
GIMP_HELP_PATH_TOOL_INSERT_ANCHOR },
{ "vector-toolpath-delete-segment", GIMP_ICON_PATH,
NC_("vector-toolpath-action", "Delete _Segment"), NULL, { NULL }, NULL,
vector_toolpath_delete_segment_cmd_callback,
NULL },
GIMP_HELP_PATH_TOOL_DELETE_SEGMENT },
{ "vector-toolpath-reverse-stroke", GIMP_ICON_PATH,
NC_("vector-toolpath-action", "_Reverse Stroke"), NULL, { NULL }, NULL,
vector_toolpath_reverse_stroke_cmd_callback,
NULL }
GIMP_HELP_PATH_TOOL_REVERSE_STROKE }
};

View File

@@ -1,458 +0,0 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "core/gimpchannel.h"
#include "core/gimpcontainer.h"
#include "core/gimpimage.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpwidgets-utils.h"
#include "actions.h"
#include "items-actions.h"
#include "vectors-actions.h"
#include "vectors-commands.h"
#include "gimp-intl.h"
static const GimpActionEntry vectors_actions[] =
{
{ "vectors-edit", GIMP_ICON_TOOL_PATH,
NC_("vectors-action", "Edit Pa_th"), NULL, { NULL },
NC_("vectors-action", "Edit the active path"),
vectors_edit_cmd_callback,
GIMP_HELP_TOOL_VECTORS },
{ "vectors-edit-attributes", GIMP_ICON_EDIT,
NC_("vectors-action", "_Edit Path Attributes..."), NULL, { NULL },
NC_("vectors-action", "Edit path attributes"),
vectors_edit_attributes_cmd_callback,
GIMP_HELP_PATH_EDIT },
{ "vectors-new", GIMP_ICON_DOCUMENT_NEW,
NC_("vectors-action", "_New Path..."), NULL, { NULL },
NC_("vectors-action", "Create a new path..."),
vectors_new_cmd_callback,
GIMP_HELP_PATH_NEW },
{ "vectors-new-last-values", GIMP_ICON_DOCUMENT_NEW,
NC_("vectors-action", "_New Path with last values"), NULL, { NULL },
NC_("vectors-action", "Create a new path with last used values"),
vectors_new_last_vals_cmd_callback,
GIMP_HELP_PATH_NEW },
{ "vectors-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
NC_("vectors-action", "D_uplicate Paths"), NULL, { NULL },
NC_("vectors-action", "Duplicate these paths"),
vectors_duplicate_cmd_callback,
GIMP_HELP_PATH_DUPLICATE },
{ "vectors-delete", GIMP_ICON_EDIT_DELETE,
NC_("vectors-action", "_Delete Path"), NULL, { NULL },
NC_("vectors-action", "Delete this path"),
vectors_delete_cmd_callback,
GIMP_HELP_PATH_DELETE },
{ "vectors-merge-visible", NULL,
NC_("vectors-action", "Merge _Visible Paths"), NULL, { NULL }, NULL,
vectors_merge_visible_cmd_callback,
GIMP_HELP_PATH_MERGE_VISIBLE },
{ "vectors-raise", GIMP_ICON_GO_UP,
NC_("vectors-action", "_Raise Path"), NULL, { NULL },
NC_("vectors-action", "Raise this path"),
vectors_raise_cmd_callback,
GIMP_HELP_PATH_RAISE },
{ "vectors-raise-to-top", GIMP_ICON_GO_TOP,
NC_("vectors-action", "Raise Path to _Top"), NULL, { NULL },
NC_("vectors-action", "Raise this path to the top"),
vectors_raise_to_top_cmd_callback,
GIMP_HELP_PATH_RAISE_TO_TOP },
{ "vectors-lower", GIMP_ICON_GO_DOWN,
NC_("vectors-action", "_Lower Path"), NULL, { NULL },
NC_("vectors-action", "Lower this path"),
vectors_lower_cmd_callback,
GIMP_HELP_PATH_LOWER },
{ "vectors-lower-to-bottom", GIMP_ICON_GO_BOTTOM,
NC_("vectors-action", "Lower Path to _Bottom"), NULL, { NULL },
NC_("vectors-action", "Lower this path to the bottom"),
vectors_lower_to_bottom_cmd_callback,
GIMP_HELP_PATH_LOWER_TO_BOTTOM },
{ "vectors-fill", GIMP_ICON_TOOL_BUCKET_FILL,
NC_("vectors-action", "Fill Pat_hs..."), NULL, { NULL },
NC_("vectors-action", "Fill the paths"),
vectors_fill_cmd_callback,
GIMP_HELP_PATH_FILL },
{ "vectors-fill-last-values", GIMP_ICON_TOOL_BUCKET_FILL,
NC_("vectors-action", "Fill Paths"), NULL, { NULL },
NC_("vectors-action", "Fill the paths with last values"),
vectors_fill_last_vals_cmd_callback,
GIMP_HELP_PATH_FILL },
{ "vectors-stroke", GIMP_ICON_PATH_STROKE,
NC_("vectors-action", "Stro_ke Paths..."), NULL, { NULL },
NC_("vectors-action", "Paint along the paths"),
vectors_stroke_cmd_callback,
GIMP_HELP_PATH_STROKE },
{ "vectors-stroke-last-values", GIMP_ICON_PATH_STROKE,
NC_("vectors-action", "Stro_ke Paths"), NULL, { NULL },
NC_("vectors-action", "Paint along the paths with last values"),
vectors_stroke_last_vals_cmd_callback,
GIMP_HELP_PATH_STROKE },
{ "vectors-copy", GIMP_ICON_EDIT_COPY,
NC_("vectors-action", "Co_py Paths"), NULL, { NULL }, NULL,
vectors_copy_cmd_callback,
GIMP_HELP_PATH_COPY },
{ "vectors-paste", GIMP_ICON_EDIT_PASTE,
NC_("vectors-action", "Paste Pat_h"), NULL, { NULL }, NULL,
vectors_paste_cmd_callback,
GIMP_HELP_PATH_PASTE },
{ "vectors-export", GIMP_ICON_DOCUMENT_SAVE,
NC_("vectors-action", "E_xport Paths..."), NULL, { NULL }, NULL,
vectors_export_cmd_callback,
GIMP_HELP_PATH_EXPORT },
{ "vectors-import", GIMP_ICON_DOCUMENT_OPEN,
NC_("vectors-action", "I_mport Path..."), NULL, { NULL }, NULL,
vectors_import_cmd_callback,
GIMP_HELP_PATH_IMPORT }
};
static const GimpToggleActionEntry vectors_toggle_actions[] =
{
{ "vectors-visible", GIMP_ICON_VISIBLE,
NC_("vectors-action", "Toggle Path _Visibility"), NULL, { NULL }, NULL,
vectors_visible_cmd_callback,
FALSE,
GIMP_HELP_PATH_VISIBLE },
{ "vectors-lock-content", GIMP_ICON_LOCK_CONTENT,
NC_("vectors-action", "L_ock Strokes of Path"), NULL, { NULL }, NULL,
vectors_lock_content_cmd_callback,
FALSE,
GIMP_HELP_PATH_LOCK_STROKES },
{ "vectors-lock-position", GIMP_ICON_LOCK_POSITION,
NC_("vectors-action", "L_ock Position of Path"), NULL, { NULL }, NULL,
vectors_lock_position_cmd_callback,
FALSE,
GIMP_HELP_PATH_LOCK_POSITION }
};
static const GimpEnumActionEntry vectors_color_tag_actions[] =
{
{ "vectors-color-tag-none", GIMP_ICON_EDIT_CLEAR,
NC_("vectors-action", "None"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Clear"),
GIMP_COLOR_TAG_NONE, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-blue", NULL,
NC_("vectors-action", "Blue"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Blue"),
GIMP_COLOR_TAG_BLUE, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-green", NULL,
NC_("vectors-action", "Green"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Green"),
GIMP_COLOR_TAG_GREEN, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-yellow", NULL,
NC_("vectors-action", "Yellow"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Yellow"),
GIMP_COLOR_TAG_YELLOW, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-orange", NULL,
NC_("vectors-action", "Orange"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Orange"),
GIMP_COLOR_TAG_ORANGE, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-brown", NULL,
NC_("vectors-action", "Brown"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Brown"),
GIMP_COLOR_TAG_BROWN, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-red", NULL,
NC_("vectors-action", "Red"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Red"),
GIMP_COLOR_TAG_RED, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-violet", NULL,
NC_("vectors-action", "Violet"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Violet"),
GIMP_COLOR_TAG_VIOLET, FALSE,
GIMP_HELP_PATH_COLOR_TAG },
{ "vectors-color-tag-gray", NULL,
NC_("vectors-action", "Gray"), NULL, { NULL },
NC_("vectors-action", "Path Color Tag: Set to Gray"),
GIMP_COLOR_TAG_GRAY, FALSE,
GIMP_HELP_PATH_COLOR_TAG }
};
static const GimpEnumActionEntry vectors_to_selection_actions[] =
{
{ "vectors-selection-replace", GIMP_ICON_SELECTION_REPLACE,
NC_("vectors-action", "Paths to Sele_ction"), NULL, { NULL },
NC_("vectors-action", "Path to selection"),
GIMP_CHANNEL_OP_REPLACE, FALSE,
GIMP_HELP_PATH_SELECTION_REPLACE },
{ "vectors-selection-from-vectors", GIMP_ICON_SELECTION_REPLACE,
NC_("vectors-action", "Selection Fr_om Paths"), NULL, { "<shift>V", NULL },
NC_("vectors-action", "Replace selection with paths"),
GIMP_CHANNEL_OP_REPLACE, FALSE,
GIMP_HELP_PATH_SELECTION_REPLACE },
{ "vectors-selection-add", GIMP_ICON_SELECTION_ADD,
NC_("vectors-action", "_Add Paths to Selection"), NULL, { NULL },
NC_("vectors-action", "Add paths to selection"),
GIMP_CHANNEL_OP_ADD, FALSE,
GIMP_HELP_PATH_SELECTION_ADD },
{ "vectors-selection-subtract", GIMP_ICON_SELECTION_SUBTRACT,
NC_("vectors-action", "_Subtract Paths from Selection"), NULL, { NULL },
NC_("vectors-action", "Subtract paths from selection"),
GIMP_CHANNEL_OP_SUBTRACT, FALSE,
GIMP_HELP_PATH_SELECTION_SUBTRACT },
{ "vectors-selection-intersect", GIMP_ICON_SELECTION_INTERSECT,
NC_("vectors-action", "_Intersect Paths with Selection"), NULL, { NULL },
NC_("vectors-action", "Intersect paths with selection"),
GIMP_CHANNEL_OP_INTERSECT, FALSE,
GIMP_HELP_PATH_SELECTION_INTERSECT }
};
static const GimpEnumActionEntry vectors_selection_to_vectors_actions[] =
{
{ "vectors-selection-to-vectors", GIMP_ICON_SELECTION_TO_PATH,
NC_("vectors-action", "Selecti_on to Path"),
NC_("vectors-action", "To _Path"), { NULL },
NC_("vectors-action", "Selection to path"),
FALSE, FALSE,
GIMP_HELP_SELECTION_TO_PATH },
{ "vectors-selection-to-vectors-advanced", GIMP_ICON_SELECTION_TO_PATH,
NC_("vectors-action", "Selection to Path (_Advanced)"), NULL, { NULL },
NC_("vectors-action", "Advanced options"),
TRUE, FALSE,
GIMP_HELP_SELECTION_TO_PATH }
};
static const GimpEnumActionEntry vectors_select_actions[] =
{
{ "vectors-select-top", NULL,
NC_("vectors-action", "Select _Top Path"), NULL, { NULL },
NC_("vectors-action", "Select the topmost path"),
GIMP_ACTION_SELECT_FIRST, FALSE,
GIMP_HELP_PATH_TOP },
{ "vectors-select-bottom", NULL,
NC_("vectors-action", "Select _Bottom Path"), NULL, { NULL },
NC_("vectors-action", "Select the bottommost path"),
GIMP_ACTION_SELECT_LAST, FALSE,
GIMP_HELP_PATH_BOTTOM },
{ "vectors-select-previous", NULL,
NC_("vectors-action", "Select _Previous Path"), NULL, { NULL },
NC_("vectors-action", "Select the path above the current path"),
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
GIMP_HELP_PATH_PREVIOUS },
{ "vectors-select-next", NULL,
NC_("vectors-action", "Select _Next Path"), NULL, { NULL },
NC_("vectors-action", "Select the vector below the current path"),
GIMP_ACTION_SELECT_NEXT, FALSE,
GIMP_HELP_PATH_NEXT }
};
void
vectors_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group, "vectors-action",
vectors_actions,
G_N_ELEMENTS (vectors_actions));
gimp_action_group_add_toggle_actions (group, "vectors-action",
vectors_toggle_actions,
G_N_ELEMENTS (vectors_toggle_actions));
gimp_action_group_add_enum_actions (group, "vectors-action",
vectors_color_tag_actions,
G_N_ELEMENTS (vectors_color_tag_actions),
vectors_color_tag_cmd_callback);
gimp_action_group_add_enum_actions (group, "vectors-action",
vectors_to_selection_actions,
G_N_ELEMENTS (vectors_to_selection_actions),
vectors_to_selection_cmd_callback);
gimp_action_group_add_enum_actions (group, "vectors-action",
vectors_selection_to_vectors_actions,
G_N_ELEMENTS (vectors_selection_to_vectors_actions),
vectors_selection_to_vectors_cmd_callback);
gimp_action_group_add_enum_actions (group, "vectors-action",
vectors_select_actions,
G_N_ELEMENTS (vectors_select_actions),
vectors_select_cmd_callback);
items_actions_setup (group, "vectors");
}
void
vectors_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *image = action_data_get_image (data);
GList *selected_vectors = NULL;
gint n_selected_vectors = 0;
gint n_vectors = 0;
gboolean mask_empty = TRUE;
gboolean dr_writable = FALSE;
gboolean dr_children = FALSE;
gboolean have_prev = FALSE; /* At least 1 selected path has a previous sibling. */
gboolean have_next = FALSE; /* At least 1 selected path has a next sibling. */
if (image)
{
GList *drawables;
GList *iter;
n_vectors = gimp_image_get_n_vectors (image);
mask_empty = gimp_channel_is_empty (gimp_image_get_mask (image));
selected_vectors = gimp_image_get_selected_vectors (image);
n_selected_vectors = g_list_length (selected_vectors);
for (iter = selected_vectors; iter; iter = iter->next)
{
GList *vectors_list;
GList *iter2;
vectors_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
iter2 = g_list_find (vectors_list, iter->data);
if (iter2)
{
if (g_list_previous (iter2))
have_prev = TRUE;
if (g_list_next (iter2))
have_next = TRUE;
}
if (have_prev && have_next)
break;
}
drawables = gimp_image_get_selected_drawables (image);
if (g_list_length (drawables) == 1)
{
dr_writable = ! gimp_item_is_content_locked (GIMP_ITEM (drawables->data), NULL);
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawables->data)))
dr_children = TRUE;
}
g_list_free (drawables);
}
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
SET_SENSITIVE ("vectors-edit", n_selected_vectors == 1);
SET_SENSITIVE ("vectors-edit-attributes", n_selected_vectors == 1);
SET_SENSITIVE ("vectors-new", image);
SET_SENSITIVE ("vectors-new-last-values", image);
SET_SENSITIVE ("vectors-duplicate", n_selected_vectors > 0);
SET_SENSITIVE ("vectors-delete", n_selected_vectors > 0);
SET_SENSITIVE ("vectors-merge-visible", n_vectors > 1);
SET_SENSITIVE ("vectors-raise", n_selected_vectors > 0 && have_prev);
SET_SENSITIVE ("vectors-raise-to-top", n_selected_vectors > 0 && have_prev);
SET_SENSITIVE ("vectors-lower", n_selected_vectors > 0 && have_next);
SET_SENSITIVE ("vectors-lower-to-bottom", n_selected_vectors > 0 && have_next);
SET_SENSITIVE ("vectors-copy", n_selected_vectors > 0);
SET_SENSITIVE ("vectors-paste", image);
SET_SENSITIVE ("vectors-export", n_selected_vectors > 0);
SET_SENSITIVE ("vectors-import", image);
SET_SENSITIVE ("vectors-selection-to-vectors", image && !mask_empty);
SET_SENSITIVE ("vectors-selection-to-vectors-advanced", image && !mask_empty);
SET_SENSITIVE ("vectors-fill", n_selected_vectors > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("vectors-fill-last-values", n_selected_vectors > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("vectors-stroke", n_selected_vectors > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("vectors-stroke-last-values", n_selected_vectors > 0 &&
dr_writable &&
!dr_children);
SET_SENSITIVE ("vectors-selection-replace", n_selected_vectors > 0);
SET_SENSITIVE ("vectors-selection-from-vectors", n_selected_vectors > 0);
SET_SENSITIVE ("vectors-selection-add", n_selected_vectors > 0);
SET_SENSITIVE ("vectors-selection-subtract", n_selected_vectors > 0);
SET_SENSITIVE ("vectors-selection-intersect", n_selected_vectors > 0);
SET_SENSITIVE ("vectors-select-top", n_selected_vectors > 0 && have_prev);
SET_SENSITIVE ("vectors-select-bottom", n_selected_vectors > 0 && have_next);
SET_SENSITIVE ("vectors-select-previous", n_selected_vectors > 0 && have_prev);
SET_SENSITIVE ("vectors-select-next", n_selected_vectors > 0 && have_next);
#undef SET_SENSITIVE
#undef SET_ACTIVE
items_actions_update (group, "vectors", selected_vectors);
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,109 +0,0 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __VECTORS_COMMANDS_H__
#define __VECTORS_COMMANDS_H__
void vectors_edit_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_edit_attributes_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_new_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_new_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_raise_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_raise_to_top_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_lower_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_lower_to_bottom_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_duplicate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_merge_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_to_selection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_selection_to_vectors_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_fill_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_fill_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_stroke_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_stroke_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_copy_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_paste_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_export_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_import_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_lock_content_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_lock_position_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_color_tag_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void vectors_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __VECTORS_COMMANDS_H__ */

View File

@@ -91,7 +91,7 @@ static const GimpActionEntry view_actions[] =
view_zoom_fit_in_cmd_callback,
GIMP_HELP_VIEW_ZOOM_FIT_IN },
{ "view-zoom-fill", GIMP_ICON_ZOOM_FIT_BEST,
{ "view-zoom-fill", GIMP_ICON_VIEW_ZOOM_FILL,
NC_("view-action", "Fi_ll Window"), NULL, { NULL },
NC_("view-action", "Adjust the zoom ratio so that the entire window is used"),
view_zoom_fill_cmd_callback,
@@ -146,9 +146,9 @@ static const GimpActionEntry view_actions[] =
NC_("view-action",
"Reset color management to what's configured in preferences"),
view_color_management_reset_cmd_callback,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
GIMP_HELP_VIEW_COLOR_MANAGEMENT_RESET },
{ "view-shrink-wrap", GIMP_ICON_ZOOM_FIT_BEST,
{ "view-shrink-wrap", GIMP_ICON_VIEW_SHRINK_WRAP,
NC_("view-action", "Shrink _Wrap"), NULL, { "<primary>J", NULL },
NC_("view-action", "Reduce the image window to the size of the image display"),
view_shrink_wrap_cmd_callback,
@@ -183,21 +183,21 @@ static const GimpToggleActionEntry view_toggle_actions[] =
NC_("view-action", "Use color management for this view"),
view_color_management_enable_cmd_callback,
TRUE,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
GIMP_HELP_VIEW_COLOR_MANAGE_VIEW },
{ "view-color-management-softproof", NULL,
NC_("view-action", "_Proof Colors"), NULL, { NULL },
NC_("view-action", "Use this view for soft-proofing"),
view_color_management_softproof_cmd_callback,
FALSE,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
GIMP_HELP_VIEW_SOFT_PROOF_VIEW },
{ "view-display-black-point-compensation", NULL,
NC_("view-action", "_Black Point Compensation"), NULL, { NULL },
NC_("view-action", "Use black point compensation for image display"),
view_display_bpc_cmd_callback,
TRUE,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
GIMP_HELP_VIEW_SOFT_PROOF_BLACK_POINT },
{ "view-softproof-gamut-check", NULL,
NC_("view-action", "_Mark Out Of Gamut Colors"), NULL, { NULL },
@@ -205,7 +205,7 @@ static const GimpToggleActionEntry view_toggle_actions[] =
"be represented in the target color space"),
view_softproof_gamut_check_cmd_callback,
FALSE,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
GIMP_HELP_VIEW_MARK_OUT_OF_GAMUT },
{ "view-show-selection", NULL,
NC_("view-action", "Show _Selection"), NULL, { "<primary>T", NULL },
@@ -522,25 +522,25 @@ static const GimpRadioActionEntry view_display_intent_actions[] =
NC_("view-action", "_Perceptual"), NULL, { NULL },
NC_("view-action", "Display rendering intent is perceptual"),
GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
GIMP_HELP_VIEW_SOFT_PROOF_RENDERING_INTENT },
{ "view-display-intent-relative-colorimetric", NULL,
NC_("view-action", "_Relative Colorimetric"), NULL, { NULL },
NC_("view-action", "Display rendering intent is relative colorimetric"),
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
GIMP_HELP_VIEW_SOFT_PROOF_RENDERING_INTENT },
{ "view-display-intent-saturation", NULL,
NC_("view-action", "_Saturation"), NULL, { NULL },
NC_("view-action", "Display rendering intent is saturation"),
GIMP_COLOR_RENDERING_INTENT_SATURATION,
GIMP_HELP_VIEW_COLOR_MANAGEMENT },
GIMP_HELP_VIEW_SOFT_PROOF_RENDERING_INTENT },
{ "view-display-intent-absolute-colorimetric", NULL,
NC_("view-action", "_Absolute Colorimetric"), NULL, { NULL },
NC_("view-action", "Display rendering intent is absolute colorimetric"),
GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC,
GIMP_HELP_VIEW_COLOR_MANAGEMENT }
GIMP_HELP_VIEW_SOFT_PROOF_RENDERING_INTENT }
};
static const GimpEnumActionEntry view_padding_color_actions[] =

View File

@@ -451,6 +451,11 @@ windows_actions_update_display_accels (GimpActionGroup *group)
gchar *tooltip;
gchar *accel;
g_object_set (action,
"ellipsize", PANGO_ELLIPSIZE_MIDDLE,
"max-width-chars", 40,
NULL);
if (i < 9)
accel = gtk_accelerator_name (GDK_KEY_1 + i, GDK_MOD1_MASK);
else

131
app/app.c
View File

@@ -44,6 +44,7 @@
#undef GIMP_DISABLE_DEPRECATED /* for compat enums */
#include "libgimpbase/gimpbase.h"
#define GIMP_DISABLE_DEPRECATED
#include "libgimpbase/gimpbase-private.h"
#include "libgimpconfig/gimpconfig.h"
#include "core/core-types.h"
@@ -87,23 +88,22 @@ static void app_init_update_noop (const gchar *text1,
gdouble percentage);
static void app_activate_callback (GimpCoreApp *app,
gpointer user_data);
static void app_restore_after_callback (Gimp *gimp,
GimpInitStatusFunc status_callback);
static gboolean app_exit_after_callback (Gimp *gimp,
gboolean kill_it,
GApplication *app);
#ifdef G_OS_WIN32
static BOOL app_quit_on_ctrl_c (DWORD ctrl_type);
#else
static void app_quit_on_ctrl_c (gint sig_num);
#endif
#if 0
/* left here as documentation how to do compat enums */
GType gimp_convert_dither_type_compat_get_type (void); /* compat cruft */
#endif
/* local variables */
static GObject *initial_monitor = NULL;
/* public functions */
void
@@ -299,14 +299,6 @@ app_run (const gchar *full_prog_name,
/* initialize lowlevel stuff */
gimp_gegl_init (gimp);
/* Connect our restore_after callback before gui_init() connects
* theirs, so ours runs first and can grab the initial monitor
* before the GUI's restore_after callback resets it.
*/
g_signal_connect_after (gimp, "restore",
G_CALLBACK (app_restore_after_callback),
NULL);
g_signal_connect_after (gimp, "exit",
G_CALLBACK (app_exit_after_callback),
app);
@@ -359,6 +351,7 @@ app_activate_callback (GimpCoreApp *app,
GimpInitStatusFunc update_status_func = NULL;
const gchar **filenames;
const gchar *current_language;
const gchar *system_lang_l10n = NULL;
gchar *prev_language = NULL;
GError *font_error = NULL;
gint batch_retval;
@@ -369,9 +362,15 @@ app_activate_callback (GimpCoreApp *app,
gimp_core_app_set_exit_status (app, EXIT_SUCCESS);
/* Language was already initialized. I call this again only to get the
* actual language information and the "System Language" string
* localized in the actual system language.
*/
current_language = language_init (NULL, &system_lang_l10n);
#ifndef GIMP_CONSOLE_COMPILATION
if (! gimp->no_interface)
update_status_func = gui_init (gimp, gimp_app_get_no_splash (GIMP_APP (app)), GIMP_APP (app), NULL);
update_status_func = gui_init (gimp, gimp_app_get_no_splash (GIMP_APP (app)),
GIMP_APP (app), NULL, system_lang_l10n);
#endif
if (! update_status_func)
@@ -385,10 +384,7 @@ app_activate_callback (GimpCoreApp *app,
g_object_get (gimp->edit_config,
"prev-language", &prev_language,
NULL);
/* Language was already initialized. I call this again only to get the
* actual language information.
*/
current_language = language_init (NULL);
gimp->query_all = (prev_language == NULL ||
g_strcmp0 (prev_language, current_language) != 0);
g_free (prev_language);
@@ -428,7 +424,7 @@ app_activate_callback (GimpCoreApp *app,
NULL,
file,
gimp_core_app_get_as_new (app),
initial_monitor,
NULL,
&status, &error);
if (image)
{
@@ -483,7 +479,7 @@ app_activate_callback (GimpCoreApp *app,
file_open_from_command_line (gimp, file,
gimp_core_app_get_as_new (app),
initial_monitor);
NULL);
g_object_unref (file);
}
@@ -518,20 +514,29 @@ app_activate_callback (GimpCoreApp *app,
*/
gimp_exit (gimp, TRUE);
}
}
static void
app_restore_after_callback (Gimp *gimp,
GimpInitStatusFunc status_callback)
{
gint dummy;
/* Getting the display name for a -1 display returns the initial
* monitor during startup. Need to call this from a restore_after
* callback, because before restore(), the GUI can't return anything,
* after after restore() the initial monitor gets reset.
*/
g_free (gimp_get_display_name (gimp, -1, &initial_monitor, &dummy));
else
#ifndef GIMP_CONSOLE_COMPILATION
if (gimp->no_interface)
#endif
{
/* In console version or GUI version with no interface, we keep
* running when --quit was not set. For instance, there could be
* an always-ON plug-in (GIMP_PDB_PROC_TYPE_PERSISTENT) which is
* set up to receive commands for GIMP.
*/
#ifdef G_OS_WIN32
SetConsoleCtrlHandler ((PHANDLER_ROUTINE) app_quit_on_ctrl_c, TRUE);
#else
gimp_signal_private (SIGINT, app_quit_on_ctrl_c, 0);
#endif
g_printf ("\n== %s ==\n%s\n\n%s\n",
/* TODO: localize when string freeze is over. */
"INFO",
"GIMP is now running as a background process. "
"You can quit anytime with Ctrl-C (SIGINT).",
"If you wanted to quit immediately instead, call GIMP with --quit.");
g_application_hold (G_APPLICATION (app));
}
}
static gboolean
@@ -542,28 +547,40 @@ app_exit_after_callback (Gimp *gimp,
if (gimp->be_verbose)
g_print ("EXIT: %s\n", G_STRFUNC);
/*
* In stable releases, we simply call exit() here. This speeds up
* the process of quitting GIMP and also works around the problem
* that plug-ins might still be running.
*
* In unstable releases, we shut down GIMP properly in an attempt
* to catch possible problems in our finalizers.
*/
#ifdef GIMP_UNSTABLE
g_application_quit (G_APPLICATION (app));
#else
gimp_gegl_exit (gimp);
gegl_exit ();
exit (gimp_core_app_get_exit_status (GIMP_CORE_APP (app)));
#endif
return FALSE;
}
#ifdef G_OS_WIN32
static BOOL
app_quit_on_ctrl_c (DWORD ctrl_type)
{
gboolean handled = FALSE;
if (ctrl_type == CTRL_C_EVENT)
{
GApplication *app = g_application_get_default ();
Gimp *gimp;
g_application_release (app);
gimp = gimp_core_app_get_gimp (GIMP_CORE_APP (app));
gimp_exit (gimp, TRUE);
handled = TRUE;
}
return handled;
}
#else
static void
app_quit_on_ctrl_c (gint sig_num)
{
GApplication *app = g_application_get_default ();
Gimp *gimp;
g_application_release (app);
gimp = gimp_core_app_get_gimp (GIMP_CORE_APP (app));
gimp_exit (gimp, TRUE);
}
#endif

View File

@@ -446,16 +446,12 @@ dump_describe_param (GParamSpec *param_spec)
param_spec->name);
}
if (GIMP_IS_PARAM_SPEC_RGB (param_spec))
if (GIMP_IS_PARAM_SPEC_COLOR (param_spec))
{
if (gimp_param_spec_rgb_has_alpha (param_spec))
values =
"The color is specified in the form (color-rgba red green blue "
"alpha) with channel values as floats in the range of 0.0 to 1.0.";
if (gimp_param_spec_color_has_alpha (param_spec))
values = "The color is specified as opaque GeglColor (any Alpha channel is ignored).";
else
values =
"The color is specified in the form (color-rgb red green blue) "
"with channel values as floats in the range of 0.0 to 1.0.";
values = "The color is specified as GeglColor.";
}
else if (GIMP_IS_PARAM_SPEC_MEMSIZE (param_spec))
{
@@ -510,9 +506,18 @@ dump_describe_param (GParamSpec *param_spec)
}
else if (GIMP_IS_PARAM_SPEC_UNIT (param_spec))
{
values =
"The unit can be one inches, millimeters, points or picas plus "
"those in your user units database.";
if (gimp_param_spec_unit_pixel_allowed (param_spec) && gimp_param_spec_unit_percent_allowed (param_spec))
values = "The unit can be one inches, millimeters, points or picas plus "
"those in your user units database. Pixel And Percent units are allowed too.";
else if (gimp_param_spec_unit_pixel_allowed (param_spec))
values = "The unit can be one inches, millimeters, points or picas plus "
"those in your user units database. Pixel unit is allowed too.";
else if (gimp_param_spec_unit_percent_allowed (param_spec))
values = "The unit can be one inches, millimeters, points or picas plus "
"those in your user units database. Percent unit is allowed too.";
else
values = "The unit can be one inches, millimeters, points or picas plus "
"those in your user units database.";
}
else if (g_type_is_a (param_spec->value_type, GIMP_TYPE_CONFIG))
{

View File

@@ -45,6 +45,7 @@ gimp_config_file_copy (const gchar *source,
const gchar *dest,
const gchar *old_options_pattern,
GRegexEvalCallback update_callback,
GimpCopyPostProcess post_process_callback,
gpointer user_data,
GError **error)
{
@@ -191,6 +192,31 @@ gimp_config_file_copy (const gchar *source,
fclose (sfile);
if (post_process_callback)
{
gchar* write_bytes;
size_t write_len;
write_bytes = post_process_callback (user_data);
write_len = strlen (write_bytes);
if (fwrite (write_bytes, 1, write_len, dfile) < write_len)
{
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
_("Error writing '%s': %s"),
gimp_filename_to_utf8 (dest), g_strerror (errno));
if (old_options_regexp)
g_regex_unref (old_options_regexp);
g_free (write_bytes);
fclose (dfile);
return FALSE;
}
g_free (write_bytes);
}
if (fclose (dfile) == EOF)
{
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
@@ -227,7 +253,7 @@ gimp_config_file_backup_on_error (GFile *file,
path = g_file_get_path (file);
backup = g_strconcat (path, "~", NULL);
success = gimp_config_file_copy (path, backup, NULL, NULL, NULL, error);
success = gimp_config_file_copy (path, backup, NULL, NULL, NULL, NULL, error);
if (success)
g_message (_("There was an error parsing your '%s' file. "

View File

@@ -22,10 +22,14 @@
#define __GIMP_CONFIG_FILE_H__
typedef gchar * (* GimpCopyPostProcess) (gpointer user_data);
gboolean gimp_config_file_copy (const gchar *source,
const gchar *dest,
const gchar *old_options_regexp,
GRegexEvalCallback update_callback,
GimpCopyPostProcess post_process_callback,
gpointer user_data,
GError **error);

View File

@@ -710,7 +710,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
"quick-mask-color",
"Quick mask color",
QUICK_MASK_COLOR_BLURB,
red,
TRUE, red,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_IMPORT_PROMOTE_FLOAT,
@@ -1141,8 +1141,11 @@ gimp_core_config_set_property (GObject *object,
core_config->last_revision = g_value_get_int (value);
break;
case PROP_LAST_KNOWN_RELEASE:
g_clear_pointer (&core_config->last_known_release, g_free);
core_config->last_known_release = g_value_dup_string (value);
if (core_config->last_known_release != g_value_get_string (value))
{
g_clear_pointer (&core_config->last_known_release, g_free);
core_config->last_known_release = g_value_dup_string (value);
}
break;
case PROP_CONFIG_VERSION:
g_clear_pointer (&core_config->config_version, g_free);

View File

@@ -422,7 +422,7 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass)
"channel-new-color",
"Default new channel color and opacity",
CHANNEL_NEW_COLOR_BLURB,
half_transparent,
TRUE, half_transparent,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_STRING (object_class, PROP_VECTORS_NEW_NAME,
@@ -457,14 +457,14 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass)
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_VECTORS_IMPORT_MERGE,
"path-import-merge",
"Default merge imported vectors",
"Default merge imported path",
VECTORS_IMPORT_MERGE_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_VECTORS_IMPORT_SCALE,
"path-import-scale",
"Default scale imported vectors",
"Default scale imported path",
VECTORS_IMPORT_SCALE_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
@@ -473,7 +473,13 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass)
"selection-feather-radius",
"Selection feather radius",
SELECTION_FEATHER_RADIUS_BLURB,
0.0, 32767.0, 5.0,
/* NOTE: the max value is the max value of
* "std-dev-x|y" arguments in operation
* "gegl:gaussian-blur", multiplied by magic
* number 3.5 (see gimp_gegl_apply_feather())
* code).
*/
0.0, 5250.0, 5.0,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SELECTION_FEATHER_EDGE_LOCK,
@@ -592,9 +598,9 @@ gimp_dialog_config_finalize (GObject *object)
g_clear_pointer (&config->color_profile_path, g_free);
g_clear_pointer (&config->layer_new_name, g_free);
g_clear_pointer (&config->channel_new_name, g_free);
g_clear_pointer (&config->vectors_new_name, g_free);
g_clear_pointer (&config->vectors_export_path, g_free);
g_clear_pointer (&config->vectors_import_path, g_free);
g_clear_pointer (&config->path_new_name, g_free);
g_clear_pointer (&config->path_export_path, g_free);
g_clear_pointer (&config->path_import_path, g_free);
g_clear_object (&config->fill_options);
g_clear_object (&config->stroke_options);
@@ -736,30 +742,30 @@ gimp_dialog_config_set_property (GObject *object,
break;
case PROP_VECTORS_NEW_NAME:
if (config->vectors_new_name)
g_free (config->vectors_new_name);
config->vectors_new_name = g_value_dup_string (value);
if (config->path_new_name)
g_free (config->path_new_name);
config->path_new_name = g_value_dup_string (value);
break;
case PROP_VECTORS_EXPORT_PATH:
if (config->vectors_export_path)
g_free (config->vectors_export_path);
config->vectors_export_path = g_value_dup_string (value);
if (config->path_export_path)
g_free (config->path_export_path);
config->path_export_path = g_value_dup_string (value);
break;
case PROP_VECTORS_EXPORT_ACTIVE_ONLY:
config->vectors_export_active_only = g_value_get_boolean (value);
config->path_export_active_only = g_value_get_boolean (value);
break;
case PROP_VECTORS_IMPORT_PATH:
if (config->vectors_import_path)
g_free (config->vectors_import_path);
config->vectors_import_path = g_value_dup_string (value);
if (config->path_import_path)
g_free (config->path_import_path);
config->path_import_path = g_value_dup_string (value);
break;
case PROP_VECTORS_IMPORT_MERGE:
config->vectors_import_merge = g_value_get_boolean (value);
config->path_import_merge = g_value_get_boolean (value);
break;
case PROP_VECTORS_IMPORT_SCALE:
config->vectors_import_scale = g_value_get_boolean (value);
config->path_import_scale = g_value_get_boolean (value);
break;
case PROP_SELECTION_FEATHER_RADIUS:
@@ -933,24 +939,24 @@ gimp_dialog_config_get_property (GObject *object,
break;
case PROP_VECTORS_NEW_NAME:
g_value_set_string (value, config->vectors_new_name);
g_value_set_string (value, config->path_new_name);
break;
case PROP_VECTORS_EXPORT_PATH:
g_value_set_string (value, config->vectors_export_path);
g_value_set_string (value, config->path_export_path);
break;
case PROP_VECTORS_EXPORT_ACTIVE_ONLY:
g_value_set_boolean (value, config->vectors_export_active_only);
g_value_set_boolean (value, config->path_export_active_only);
break;
case PROP_VECTORS_IMPORT_PATH:
g_value_set_string (value, config->vectors_import_path);
g_value_set_string (value, config->path_import_path);
break;
case PROP_VECTORS_IMPORT_MERGE:
g_value_set_boolean (value, config->vectors_import_merge);
g_value_set_boolean (value, config->path_import_merge);
break;
case PROP_VECTORS_IMPORT_SCALE:
g_value_set_boolean (value, config->vectors_import_scale);
g_value_set_boolean (value, config->path_import_scale);
break;
case PROP_SELECTION_FEATHER_RADIUS:

View File

@@ -87,14 +87,14 @@ struct _GimpDialogConfig
gchar *channel_new_name;
GeglColor *channel_new_color;
gchar *vectors_new_name;
gchar *path_new_name;
gchar *vectors_export_path;
gboolean vectors_export_active_only;
gchar *path_export_path;
gboolean path_export_active_only;
gchar *vectors_import_path;
gboolean vectors_import_merge;
gboolean vectors_import_scale;
gchar *path_import_path;
gboolean path_import_merge;
gboolean path_import_scale;
gdouble selection_feather_radius;
gboolean selection_feather_edge_lock;

View File

@@ -115,7 +115,6 @@ static void
gimp_display_config_class_init (GimpDisplayConfigClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpRGB xor_rgb = { 0, 0, 0, 0 };
GeglColor *color = gegl_color_new (NULL);
object_class->finalize = gimp_display_config_finalize;
@@ -143,7 +142,7 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
"transparency-custom-color1",
_("Transparency custom color 1"),
TRANSPARENCY_CUSTOM_COLOR1_BLURB,
color,
FALSE, color,
GIMP_PARAM_STATIC_STRINGS);
gegl_color_set_pixel (color, babl_format ("R'G'B'A double"), GIMP_CHECKS_CUSTOM_COLOR2);
@@ -151,7 +150,7 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
"transparency-custom-color2",
_("Transparency custom color 2"),
TRANSPARENCY_CUSTOM_COLOR2_BLURB,
color,
FALSE, color,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_INT (object_class, PROP_SNAP_DISTANCE,
@@ -379,12 +378,12 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_IGNORE);
GIMP_CONFIG_PROP_RGB (object_class, PROP_XOR_COLOR,
"xor-color",
NULL, NULL,
FALSE, &xor_rgb,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_IGNORE);
GIMP_CONFIG_PROP_COLOR (object_class, PROP_XOR_COLOR,
"xor-color",
NULL, NULL,
FALSE, color,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_IGNORE);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_PERFECT_MOUSE,
"perfect-mouse",

View File

@@ -234,7 +234,7 @@ gimp_display_options_class_init (GimpDisplayOptionsClass *klass)
"padding-color",
"Padding color",
CANVAS_PADDING_COLOR_BLURB,
white,
FALSE, white,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_PADDING_IN_SHOW_ALL,
@@ -381,7 +381,7 @@ gimp_display_options_fullscreen_class_init (GimpDisplayOptionsFullscreenClass *k
"padding-color",
"Padding color",
CANVAS_PADDING_COLOR_BLURB,
black,
FALSE, black,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_PADDING_IN_SHOW_ALL,

View File

@@ -51,7 +51,6 @@ enum
PROP_MOVE_TOOL_CHANGES_ACTIVE,
PROP_FILTER_TOOL_MAX_RECENT,
PROP_FILTER_TOOL_USE_LAST_SETTINGS,
PROP_FILTER_TOOL_SHOW_COLOR_OPTIONS,
PROP_TRUST_DIRTY_FLAG,
PROP_SAVE_DEVICE_STATUS,
PROP_DEVICES_SHARE_TOOL,
@@ -165,13 +164,6 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_FILTER_TOOL_SHOW_COLOR_OPTIONS,
"filter-tool-show-color-options",
"Show advanced color options in filters",
FILTER_TOOL_SHOW_COLOR_OPTIONS_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_TRUST_DIRTY_FLAG,
"trust-dirty-flag",
"Trust dirty flag",
@@ -246,7 +238,7 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_RESTORE_ACCELS,
"restore-accels",
"Restore acclerator",
"Restore accelerator",
RESTORE_ACCELS_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
@@ -632,9 +624,6 @@ gimp_gui_config_set_property (GObject *object,
case PROP_FILTER_TOOL_USE_LAST_SETTINGS:
gui_config->filter_tool_use_last_settings = g_value_get_boolean (value);
break;
case PROP_FILTER_TOOL_SHOW_COLOR_OPTIONS:
gui_config->filter_tool_show_color_options = g_value_get_boolean (value);
break;
case PROP_TRUST_DIRTY_FLAG:
gui_config->trust_dirty_flag = g_value_get_boolean (value);
break;
@@ -819,9 +808,6 @@ gimp_gui_config_get_property (GObject *object,
case PROP_FILTER_TOOL_USE_LAST_SETTINGS:
g_value_set_boolean (value, gui_config->filter_tool_use_last_settings);
break;
case PROP_FILTER_TOOL_SHOW_COLOR_OPTIONS:
g_value_set_boolean (value, gui_config->filter_tool_show_color_options);
break;
case PROP_TRUST_DIRTY_FLAG:
g_value_set_boolean (value, gui_config->trust_dirty_flag);
break;

View File

@@ -45,7 +45,6 @@ struct _GimpGuiConfig
gboolean move_tool_changes_active;
gint filter_tool_max_recent;
gboolean filter_tool_use_last_settings;
gboolean filter_tool_show_color_options;
gboolean trust_dirty_flag;
gboolean save_device_status;
gboolean devices_share_tool;

View File

@@ -553,7 +553,7 @@ _("Chooses the color scheme variant of the theme.")
"Sets the theme search path."
#define ICON_THEME_BLURB \
"The name of the icon theme to use."
_("The name of the icon theme to use.")
#define OVERRIDE_THEME_ICON_SIZE_BLURB \
_("Override theme-set icon sizes.")

View File

@@ -246,41 +246,11 @@ output_unknown_token (const gchar *key,
}
/* minimal dummy units implementation */
static const gchar *
unit_get_identifier (GimpUnit unit)
{
switch (unit)
{
case GIMP_UNIT_PIXEL:
return "pixels";
case GIMP_UNIT_INCH:
return "inches";
case GIMP_UNIT_MM:
return "millimeters";
case GIMP_UNIT_POINT:
return "points";
case GIMP_UNIT_PICA:
return "picas";
default:
return NULL;
}
}
static gint
unit_get_number_of_units (void)
{
return GIMP_UNIT_END;
}
static void
units_init (void)
{
GimpUnitVtable vtable;
vtable.unit_get_number_of_units = unit_get_number_of_units;
vtable.unit_get_identifier = unit_get_identifier;
/* Empty dummy units implementation */
GimpUnitVtable vtable = { 0 };
gimp_base_init (&vtable);
}

View File

@@ -504,7 +504,7 @@ gimp_dirty_mask_get_type (void)
{ GIMP_DIRTY_ITEM, "GIMP_DIRTY_ITEM", "item" },
{ GIMP_DIRTY_ITEM_META, "GIMP_DIRTY_ITEM_META", "item-meta" },
{ GIMP_DIRTY_DRAWABLE, "GIMP_DIRTY_DRAWABLE", "drawable" },
{ GIMP_DIRTY_VECTORS, "GIMP_DIRTY_VECTORS", "vectors" },
{ GIMP_DIRTY_PATH, "GIMP_DIRTY_PATH", "path" },
{ GIMP_DIRTY_SELECTION, "GIMP_DIRTY_SELECTION", "selection" },
{ GIMP_DIRTY_ACTIVE_DRAWABLE, "GIMP_DIRTY_ACTIVE_DRAWABLE", "active-drawable" },
{ GIMP_DIRTY_ALL, "GIMP_DIRTY_ALL", "all" },
@@ -521,7 +521,7 @@ gimp_dirty_mask_get_type (void)
{ GIMP_DIRTY_ITEM, "GIMP_DIRTY_ITEM", NULL },
{ GIMP_DIRTY_ITEM_META, "GIMP_DIRTY_ITEM_META", NULL },
{ GIMP_DIRTY_DRAWABLE, "GIMP_DIRTY_DRAWABLE", NULL },
{ GIMP_DIRTY_VECTORS, "GIMP_DIRTY_VECTORS", NULL },
{ GIMP_DIRTY_PATH, "GIMP_DIRTY_PATH", NULL },
{ GIMP_DIRTY_SELECTION, "GIMP_DIRTY_SELECTION", NULL },
{ GIMP_DIRTY_ACTIVE_DRAWABLE, "GIMP_DIRTY_ACTIVE_DRAWABLE", NULL },
{ GIMP_DIRTY_ALL, "GIMP_DIRTY_ALL", NULL },
@@ -1192,7 +1192,7 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE, "GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE", "group-image-item-remove" },
{ GIMP_UNDO_GROUP_IMAGE_ITEM_REORDER, "GIMP_UNDO_GROUP_IMAGE_ITEM_REORDER", "group-image-item-reorder" },
{ GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, "GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE", "group-image-layers-merge" },
{ GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, "GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE", "group-image-vectors-merge" },
{ GIMP_UNDO_GROUP_IMAGE_PATHS_MERGE, "GIMP_UNDO_GROUP_IMAGE_PATHS_MERGE", "group-image-paths-merge" },
{ GIMP_UNDO_GROUP_IMAGE_QUICK_MASK, "GIMP_UNDO_GROUP_IMAGE_QUICK_MASK", "group-image-quick-mask" },
{ GIMP_UNDO_GROUP_IMAGE_GRID, "GIMP_UNDO_GROUP_IMAGE_GRID", "group-image-grid" },
{ GIMP_UNDO_GROUP_IMAGE_COLORMAP_REMAP, "GIMP_UNDO_GROUP_IMAGE_COLORMAP_REMAP", "group-image-colormap-remap" },
@@ -1228,7 +1228,7 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_GROUP_PAINT, "GIMP_UNDO_GROUP_PAINT", "group-paint" },
{ GIMP_UNDO_GROUP_PARASITE_ATTACH, "GIMP_UNDO_GROUP_PARASITE_ATTACH", "group-parasite-attach" },
{ GIMP_UNDO_GROUP_PARASITE_REMOVE, "GIMP_UNDO_GROUP_PARASITE_REMOVE", "group-parasite-remove" },
{ GIMP_UNDO_GROUP_VECTORS_IMPORT, "GIMP_UNDO_GROUP_VECTORS_IMPORT", "group-vectors-import" },
{ GIMP_UNDO_GROUP_PATHS_IMPORT, "GIMP_UNDO_GROUP_PATHS_IMPORT", "group-paths-import" },
{ GIMP_UNDO_GROUP_MISC, "GIMP_UNDO_GROUP_MISC", "group-misc" },
{ GIMP_UNDO_IMAGE_TYPE, "GIMP_UNDO_IMAGE_TYPE", "image-type" },
{ GIMP_UNDO_IMAGE_PRECISION, "GIMP_UNDO_IMAGE_PRECISION", "image-precision" },
@@ -1274,9 +1274,9 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_CHANNEL_ADD, "GIMP_UNDO_CHANNEL_ADD", "channel-add" },
{ GIMP_UNDO_CHANNEL_REMOVE, "GIMP_UNDO_CHANNEL_REMOVE", "channel-remove" },
{ GIMP_UNDO_CHANNEL_COLOR, "GIMP_UNDO_CHANNEL_COLOR", "channel-color" },
{ GIMP_UNDO_VECTORS_ADD, "GIMP_UNDO_VECTORS_ADD", "vectors-add" },
{ GIMP_UNDO_VECTORS_REMOVE, "GIMP_UNDO_VECTORS_REMOVE", "vectors-remove" },
{ GIMP_UNDO_VECTORS_MOD, "GIMP_UNDO_VECTORS_MOD", "vectors-mod" },
{ GIMP_UNDO_PATH_ADD, "GIMP_UNDO_PATH_ADD", "path-add" },
{ GIMP_UNDO_PATH_REMOVE, "GIMP_UNDO_PATH_REMOVE", "path-remove" },
{ GIMP_UNDO_PATH_MOD, "GIMP_UNDO_PATH_MOD", "path-mod" },
{ GIMP_UNDO_FS_TO_LAYER, "GIMP_UNDO_FS_TO_LAYER", "fs-to-layer" },
{ GIMP_UNDO_TRANSFORM_GRID, "GIMP_UNDO_TRANSFORM_GRID", "transform-grid" },
{ GIMP_UNDO_PAINT, "GIMP_UNDO_PAINT", "paint" },
@@ -1304,7 +1304,7 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE, NC_("undo-type", "Remove item"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_ITEM_REORDER, NC_("undo-type", "Reorder item"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, NC_("undo-type", "Merge layers"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, NC_("undo-type", "Merge paths"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_PATHS_MERGE, NC_("undo-type", "Merge paths"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_QUICK_MASK, NC_("undo-type", "Quick Mask"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_GRID, NC_("undo-type", "Grid"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_COLORMAP_REMAP, NC_("undo-type", "Colormap remapping"), NULL },
@@ -1323,8 +1323,8 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_GROUP_ITEM_RESIZE, NC_("undo-type", "Resize item"), NULL },
{ GIMP_UNDO_GROUP_LAYER_ADD, NC_("undo-type", "Add layer"), NULL },
{ GIMP_UNDO_GROUP_LAYER_ADD_ALPHA, NC_("undo-type", "Add alpha channel"), NULL },
{ GIMP_UNDO_GROUP_LAYER_ADD_MASK, NC_("undo-type", "Add layer mask"), NULL },
{ GIMP_UNDO_GROUP_LAYER_APPLY_MASK, NC_("undo-type", "Apply layer mask"), NULL },
{ GIMP_UNDO_GROUP_LAYER_ADD_MASK, NC_("undo-type", "Add layer masks"), NULL },
{ GIMP_UNDO_GROUP_LAYER_APPLY_MASK, NC_("undo-type", "Apply layer masks"), NULL },
{ GIMP_UNDO_GROUP_LAYER_REMOVE_ALPHA, NC_("undo-type", "Remove alpha channel"), NULL },
{ GIMP_UNDO_GROUP_LAYER_LOCK_ALPHA, NC_("undo-type", "Lock/Unlock alpha channels"), NULL },
{ GIMP_UNDO_GROUP_LAYER_OPACITY, NC_("undo-type", "Set layers opacity"), NULL },
@@ -1340,7 +1340,7 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_GROUP_PAINT, NC_("undo-type", "Paint"), NULL },
{ GIMP_UNDO_GROUP_PARASITE_ATTACH, NC_("undo-type", "Attach parasite"), NULL },
{ GIMP_UNDO_GROUP_PARASITE_REMOVE, NC_("undo-type", "Remove parasite"), NULL },
{ GIMP_UNDO_GROUP_VECTORS_IMPORT, NC_("undo-type", "Import paths"), NULL },
{ GIMP_UNDO_GROUP_PATHS_IMPORT, NC_("undo-type", "Import paths"), NULL },
{ GIMP_UNDO_GROUP_MISC, NC_("undo-type", "Plug-In"), NULL },
{ GIMP_UNDO_IMAGE_TYPE, NC_("undo-type", "Image type"), NULL },
{ GIMP_UNDO_IMAGE_PRECISION, NC_("undo-type", "Image precision"), NULL },
@@ -1379,16 +1379,16 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_TEXT_LAYER, NC_("undo-type", "Text layer"), NULL },
{ GIMP_UNDO_TEXT_LAYER_MODIFIED, NC_("undo-type", "Text layer modification"), NULL },
{ GIMP_UNDO_TEXT_LAYER_CONVERT, NC_("undo-type", "Convert text layer"), NULL },
{ GIMP_UNDO_LAYER_MASK_ADD, NC_("undo-type", "Add layer mask"), NULL },
{ GIMP_UNDO_LAYER_MASK_REMOVE, NC_("undo-type", "Delete layer mask"), NULL },
{ GIMP_UNDO_LAYER_MASK_APPLY, NC_("undo-type", "Apply layer mask"), NULL },
{ GIMP_UNDO_LAYER_MASK_SHOW, NC_("undo-type", "Show layer mask"), NULL },
{ GIMP_UNDO_LAYER_MASK_ADD, NC_("undo-type", "Add layer masks"), NULL },
{ GIMP_UNDO_LAYER_MASK_REMOVE, NC_("undo-type", "Delete layer masks"), NULL },
{ GIMP_UNDO_LAYER_MASK_APPLY, NC_("undo-type", "Apply layer masks"), NULL },
{ GIMP_UNDO_LAYER_MASK_SHOW, NC_("undo-type", "Show layer masks"), NULL },
{ GIMP_UNDO_CHANNEL_ADD, NC_("undo-type", "New channel"), NULL },
{ GIMP_UNDO_CHANNEL_REMOVE, NC_("undo-type", "Delete channel"), NULL },
{ GIMP_UNDO_CHANNEL_COLOR, NC_("undo-type", "Channel color"), NULL },
{ GIMP_UNDO_VECTORS_ADD, NC_("undo-type", "New path"), NULL },
{ GIMP_UNDO_VECTORS_REMOVE, NC_("undo-type", "Delete path"), NULL },
{ GIMP_UNDO_VECTORS_MOD, NC_("undo-type", "Path modification"), NULL },
{ GIMP_UNDO_PATH_ADD, NC_("undo-type", "New path"), NULL },
{ GIMP_UNDO_PATH_REMOVE, NC_("undo-type", "Delete path"), NULL },
{ GIMP_UNDO_PATH_MOD, NC_("undo-type", "Path modification"), NULL },
{ GIMP_UNDO_FS_TO_LAYER, NC_("undo-type", "Floating selection to layer"), NULL },
{ GIMP_UNDO_TRANSFORM_GRID, NC_("undo-type", "Transform grid"), NULL },
{ GIMP_UNDO_PAINT, NC_("undo-type", "Paint"), NULL },

View File

@@ -262,7 +262,7 @@ typedef enum /*< pdb-skip >*/
GIMP_DIRTY_ITEM = 1 << 4,
GIMP_DIRTY_ITEM_META = 1 << 5,
GIMP_DIRTY_DRAWABLE = 1 << 6,
GIMP_DIRTY_VECTORS = 1 << 7,
GIMP_DIRTY_PATH = 1 << 7,
GIMP_DIRTY_SELECTION = 1 << 8,
GIMP_DIRTY_ACTIVE_DRAWABLE = 1 << 9,
@@ -541,7 +541,7 @@ typedef enum /*< pdb-skip >*/
GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE, /*< desc="Remove item" >*/
GIMP_UNDO_GROUP_IMAGE_ITEM_REORDER, /*< desc="Reorder item" >*/
GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, /*< desc="Merge layers" >*/
GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, /*< desc="Merge paths" >*/
GIMP_UNDO_GROUP_IMAGE_PATHS_MERGE, /*< desc="Merge paths" >*/
GIMP_UNDO_GROUP_IMAGE_QUICK_MASK, /*< desc="Quick Mask" >*/
GIMP_UNDO_GROUP_IMAGE_GRID, /*< desc="Grid" >*/
GIMP_UNDO_GROUP_IMAGE_COLORMAP_REMAP, /*< desc="Colormap remapping" >*/
@@ -560,8 +560,8 @@ typedef enum /*< pdb-skip >*/
GIMP_UNDO_GROUP_ITEM_RESIZE, /*< desc="Resize item" >*/
GIMP_UNDO_GROUP_LAYER_ADD, /*< desc="Add layer" >*/
GIMP_UNDO_GROUP_LAYER_ADD_ALPHA, /*< desc="Add alpha channel" >*/
GIMP_UNDO_GROUP_LAYER_ADD_MASK, /*< desc="Add layer mask" >*/
GIMP_UNDO_GROUP_LAYER_APPLY_MASK, /*< desc="Apply layer mask" >*/
GIMP_UNDO_GROUP_LAYER_ADD_MASK, /*< desc="Add layer masks" >*/
GIMP_UNDO_GROUP_LAYER_APPLY_MASK, /*< desc="Apply layer masks" >*/
GIMP_UNDO_GROUP_LAYER_REMOVE_ALPHA, /*< desc="Remove alpha channel" >*/
GIMP_UNDO_GROUP_LAYER_LOCK_ALPHA, /*< desc="Lock/Unlock alpha channels" >*/
GIMP_UNDO_GROUP_LAYER_OPACITY, /*< desc="Set layers opacity" >*/
@@ -577,7 +577,7 @@ typedef enum /*< pdb-skip >*/
GIMP_UNDO_GROUP_PAINT, /*< desc="Paint" >*/
GIMP_UNDO_GROUP_PARASITE_ATTACH, /*< desc="Attach parasite" >*/
GIMP_UNDO_GROUP_PARASITE_REMOVE, /*< desc="Remove parasite" >*/
GIMP_UNDO_GROUP_VECTORS_IMPORT, /*< desc="Import paths" >*/
GIMP_UNDO_GROUP_PATHS_IMPORT, /*< desc="Import paths" >*/
GIMP_UNDO_GROUP_MISC, /*< desc="Plug-In" >*/
GIMP_UNDO_GROUP_LAST = GIMP_UNDO_GROUP_MISC, /*< skip >*/
@@ -621,16 +621,16 @@ typedef enum /*< pdb-skip >*/
GIMP_UNDO_TEXT_LAYER, /*< desc="Text layer" >*/
GIMP_UNDO_TEXT_LAYER_MODIFIED, /*< desc="Text layer modification" >*/
GIMP_UNDO_TEXT_LAYER_CONVERT, /*< desc="Convert text layer" >*/
GIMP_UNDO_LAYER_MASK_ADD, /*< desc="Add layer mask" >*/
GIMP_UNDO_LAYER_MASK_REMOVE, /*< desc="Delete layer mask" >*/
GIMP_UNDO_LAYER_MASK_APPLY, /*< desc="Apply layer mask" >*/
GIMP_UNDO_LAYER_MASK_SHOW, /*< desc="Show layer mask" >*/
GIMP_UNDO_LAYER_MASK_ADD, /*< desc="Add layer masks" >*/
GIMP_UNDO_LAYER_MASK_REMOVE, /*< desc="Delete layer masks" >*/
GIMP_UNDO_LAYER_MASK_APPLY, /*< desc="Apply layer masks" >*/
GIMP_UNDO_LAYER_MASK_SHOW, /*< desc="Show layer masks" >*/
GIMP_UNDO_CHANNEL_ADD, /*< desc="New channel" >*/
GIMP_UNDO_CHANNEL_REMOVE, /*< desc="Delete channel" >*/
GIMP_UNDO_CHANNEL_COLOR, /*< desc="Channel color" >*/
GIMP_UNDO_VECTORS_ADD, /*< desc="New path" >*/
GIMP_UNDO_VECTORS_REMOVE, /*< desc="Delete path" >*/
GIMP_UNDO_VECTORS_MOD, /*< desc="Path modification" >*/
GIMP_UNDO_PATH_ADD, /*< desc="New path" >*/
GIMP_UNDO_PATH_REMOVE, /*< desc="Delete path" >*/
GIMP_UNDO_PATH_MOD, /*< desc="Path modification" >*/
GIMP_UNDO_FS_TO_LAYER, /*< desc="Floating selection to layer" >*/
GIMP_UNDO_TRANSFORM_GRID, /*< desc="Transform grid" >*/
GIMP_UNDO_PAINT, /*< desc="Paint" >*/
@@ -781,11 +781,11 @@ typedef enum /*< pdb-skip, skip >*/
{
GIMP_ITEM_TYPE_LAYERS = 1 << 0,
GIMP_ITEM_TYPE_CHANNELS = 1 << 1,
GIMP_ITEM_TYPE_VECTORS = 1 << 2,
GIMP_ITEM_TYPE_PATHS = 1 << 2,
GIMP_ITEM_TYPE_ALL = (GIMP_ITEM_TYPE_LAYERS |
GIMP_ITEM_TYPE_CHANNELS |
GIMP_ITEM_TYPE_VECTORS)
GIMP_ITEM_TYPE_PATHS)
} GimpItemTypeMask;

View File

@@ -163,6 +163,7 @@ typedef struct _GimpTagCache GimpTagCache;
/* drawable objects */
typedef struct _GimpDrawable GimpDrawable;
typedef struct _GimpDrawableFilterMask GimpDrawableFilterMask;
typedef struct _GimpChannel GimpChannel;
typedef struct _GimpLayerMask GimpLayerMask;
typedef struct _GimpSelection GimpSelection;

View File

@@ -54,6 +54,7 @@
#include "gimptoolpreset.h"
#include "gimptoolpreset-load.h"
#include "text/gimpfont.h"
#include "text/gimpfontfactory.h"
#include "gimp-intl.h"
@@ -198,6 +199,7 @@ gimp_data_factories_init (Gimp *gimp)
"font-path");
gimp_object_set_static_name (GIMP_OBJECT (gimp->font_factory),
"font factory");
gimp_font_class_set_font_factory (GIMP_FONT_FACTORY (gimp->font_factory));
gimp->tool_preset_factory =
gimp_data_loader_factory_new (gimp,

View File

@@ -31,6 +31,9 @@
#include "gimpbuffer.h"
#include "gimpcontext.h"
#include "gimpdrawable-edit.h"
#include "gimpdrawable-filters.h"
#include "gimpdrawablefilter.h"
#include "gimperror.h"
#include "gimpgrouplayer.h"
#include "gimpimage.h"
#include "gimpimage-duplicate.h"
@@ -82,7 +85,8 @@ gimp_edit_cut (GimpImage *image,
if (layers_only)
{
gchar *undo_label;
gchar *undo_label;
gboolean success = TRUE;
undo_label = g_strdup_printf (ngettext ("Cut Layer", "Cut %d Layers",
g_list_length (drawables)),
@@ -132,24 +136,30 @@ gimp_edit_cut (GimpImage *image,
/* Remove layers from source image. */
for (iter = drawables; iter; iter = iter->next)
gimp_image_remove_layer (image, GIMP_LAYER (iter->data),
TRUE, NULL);
if (! gimp_layer_is_floating_sel (iter->data))
gimp_image_remove_layer (image, GIMP_LAYER (iter->data),
TRUE, NULL);
g_list_free (drawables);
}
else
{
/* With selection, a cut is similar to a copy followed by a clear. */
gimp_edit_copy (image, drawables, context, error);
for (iter = drawables; iter; iter = iter->next)
if (! GIMP_IS_GROUP_LAYER (iter->data))
gimp_drawable_edit_clear (GIMP_DRAWABLE (iter->data), context);
if (gimp_edit_copy (image, drawables, context, TRUE, error))
{
for (iter = drawables; iter; iter = iter->next)
if (! GIMP_IS_GROUP_LAYER (iter->data))
gimp_drawable_edit_clear (GIMP_DRAWABLE (iter->data), context);
}
else
{
success = FALSE;
}
}
gimp_image_undo_group_end (image);
return GIMP_OBJECT (gimp_get_clipboard_image (image->gimp));
return success ? GIMP_OBJECT (gimp_get_clipboard_image (image->gimp)) : NULL;
}
else
{
@@ -173,6 +183,7 @@ GimpObject *
gimp_edit_copy (GimpImage *image,
GList *drawables,
GimpContext *context,
gboolean copy_for_cut,
GError **error)
{
GList *iter;
@@ -193,7 +204,21 @@ gimp_edit_copy (GimpImage *image,
}
/* Only accept multiple drawables for layers. */
g_return_val_if_fail (g_list_length (drawables) == 1 || drawables_are_layers, NULL);
if (g_list_length (drawables) > 1 && ! drawables_are_layers)
{
if (error)
{
if (copy_for_cut)
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("Cannot cut because multiple channels "
"are selected."));
else
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("Cannot copy because multiple channels "
"are selected."));
}
return NULL;
}
if (drawables_are_layers)
{
@@ -203,13 +228,65 @@ gimp_edit_copy (GimpImage *image,
*/
GimpImage *clip_image;
GimpChannel *clip_selection;
GList *remove = NULL;
GeglRectangle selection_bounds;
gboolean has_selection = FALSE;
for (iter = drawables; iter; iter = iter->next)
{
gint x1;
gint y1;
gint x2;
gint y2;
if (! gimp_item_mask_bounds (iter->data, &x1, &y1, &x2, &y2) ||
(x1 != x2 && y1 != y2))
break;
}
if (iter == NULL)
{
if (error)
{
if (copy_for_cut)
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("Cannot cut because the selected region is empty."));
else
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("Cannot copy because the selected region is empty."));
}
return NULL;
}
drawables = g_list_copy (drawables);
for (iter = drawables; iter; iter = iter->next)
{
GList *iter2;
for (iter2 = drawables; iter2; iter2 = iter2->next)
{
if (iter2 == iter)
continue;
if (gimp_viewable_is_ancestor (iter2->data, iter->data))
{
/* When copying a layer group, all its children come
* with anyway.
*/
remove = g_list_prepend (remove, iter);
break;
}
}
}
for (iter = remove; iter; iter = iter->next)
drawables = g_list_delete_link (drawables, iter->data);
g_list_free (remove);
clip_image = gimp_image_new_from_drawables (image->gimp, drawables, TRUE, TRUE);
gimp_container_remove (image->gimp->images, GIMP_OBJECT (clip_image));
gimp_set_clipboard_image (image->gimp, clip_image);
g_object_unref (clip_image);
g_list_free (drawables);
clip_selection = gimp_image_get_mask (clip_image);
if (! gimp_channel_is_empty (clip_selection))
@@ -262,10 +339,14 @@ gimp_edit_copy (GimpImage *image,
}
g_list_free (all_items);
/* We need to keep the image size as-is, because even after cropping
* layers to selection, their offset stay important for in-place paste
* variants. Yet we also need to store the dimensions where we'd have
* cropped the image for the "Paste as New Image" action.
gimp_image_undo_disable (clip_image);
gimp_image_resize_to_layers (clip_image, context, NULL, NULL, NULL,
NULL, NULL);
gimp_image_undo_enable (clip_image);
/* We need to store the original offsets before the image was
* resized, in order to move it into the correct location for
* in-place pasting.
*/
g_object_set_data (G_OBJECT (clip_image),
"gimp-edit-new-image-x",
@@ -273,15 +354,10 @@ gimp_edit_copy (GimpImage *image,
g_object_set_data (G_OBJECT (clip_image),
"gimp-edit-new-image-y",
GINT_TO_POINTER (selection_bounds.y));
g_object_set_data (G_OBJECT (clip_image),
"gimp-edit-new-image-width",
GINT_TO_POINTER (selection_bounds.width));
g_object_set_data (G_OBJECT (clip_image),
"gimp-edit-new-image-height",
GINT_TO_POINTER (selection_bounds.height));
}
/* Remove selection from the clipboard image. */
gimp_channel_clear (clip_selection, NULL, FALSE);
g_object_unref (clip_image);
return GIMP_OBJECT (gimp_get_clipboard_image (image->gimp));
}
@@ -430,8 +506,38 @@ gimp_edit_paste_get_tagged_layers (GimpImage *image,
"gimp-image-copied-layer"));
if (copied)
{
GimpContainer *filters;
layer = GIMP_LAYER (gimp_item_convert (GIMP_ITEM (iter->data),
image, layer_type));
filters = gimp_drawable_get_filters (GIMP_DRAWABLE (iter->data));
if (gimp_container_get_n_children (filters) > 0)
{
GList *filter_list;
for (filter_list = GIMP_LIST (filters)->queue->tail;
filter_list;
filter_list = g_list_previous (filter_list))
{
if (GIMP_IS_DRAWABLE_FILTER (filter_list->data))
{
GimpDrawableFilter *old_filter = filter_list->data;
GimpDrawableFilter *filter;
filter = gimp_drawable_filter_duplicate (GIMP_DRAWABLE (layer), old_filter);
if (filter != NULL)
{
gimp_drawable_filter_apply (filter, NULL);
gimp_drawable_filter_commit (filter, TRUE, NULL, FALSE);
gimp_drawable_filter_layer_mask_freeze (filter);
g_object_unref (filter);
}
}
}
}
returned_layers = g_list_prepend (returned_layers, layer);
switch (paste_type)
@@ -862,11 +968,12 @@ gimp_edit_paste (GimpImage *image,
gint viewport_height)
{
GList *layers;
gboolean use_offset = FALSE;
gint layers_bbox_x = 0;
gint layers_bbox_y = 0;
gint offset_y = 0;
gint offset_x = 0;
gboolean use_offset = FALSE;
gint layers_bbox_x = 0;
gint layers_bbox_y = 0;
gint offset_y = 0;
gint offset_x = 0;
GType drawables_type = G_TYPE_NONE;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (GIMP_IS_IMAGE (paste) || GIMP_IS_BUFFER (paste), NULL);
@@ -875,6 +982,32 @@ gimp_edit_paste (GimpImage *image,
{
g_return_val_if_fail (GIMP_IS_DRAWABLE (iter->data), NULL);
g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (iter->data)), NULL);
g_return_val_if_fail (gimp_item_get_image (GIMP_ITEM (iter->data)) == image, NULL);
g_return_val_if_fail (drawables_type == G_TYPE_NONE || G_OBJECT_TYPE (iter->data) == drawables_type, NULL);
drawables_type = G_OBJECT_TYPE (iter->data);
/* Currently we can only paste to channels (named channels, layer
* masks, selection, etc.) as floating.
*/
if (GIMP_IS_CHANNEL (iter->data))
{
switch (paste_type)
{
case GIMP_PASTE_TYPE_NEW_LAYER:
case GIMP_PASTE_TYPE_NEW_LAYER_OR_FLOATING:
case GIMP_PASTE_TYPE_NEW_MERGED_LAYER_OR_FLOATING:
paste_type = GIMP_PASTE_TYPE_FLOATING;
break;
case GIMP_PASTE_TYPE_NEW_LAYER_IN_PLACE:
case GIMP_PASTE_TYPE_NEW_LAYER_OR_FLOATING_IN_PLACE:
case GIMP_PASTE_TYPE_NEW_MERGED_LAYER_OR_FLOATING_IN_PLACE:
paste_type = GIMP_PASTE_TYPE_FLOATING_IN_PLACE;
break;
default:
break;
}
}
}
if (merged && GIMP_IS_IMAGE (paste))
@@ -928,7 +1061,16 @@ gimp_edit_paste (GimpImage *image,
if (gimp_edit_paste_is_in_place (paste_type))
{
if (GIMP_IS_BUFFER (paste))
offset_x = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (paste),
"gimp-edit-new-image-x"));
offset_y = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (paste),
"gimp-edit-new-image-y"));
if (offset_x != 0 || offset_y != 0)
{
use_offset = TRUE;
}
else if (GIMP_IS_BUFFER (paste))
{
GimpBuffer *buffer = GIMP_BUFFER (paste);
@@ -967,35 +1109,9 @@ gimp_edit_paste_as_new_image (Gimp *gimp,
g_return_val_if_fail (GIMP_IS_IMAGE (paste) || GIMP_IS_BUFFER (paste), NULL);
if (GIMP_IS_IMAGE (paste))
{
gint offset_x;
gint offset_y;
gint new_width;
gint new_height;
offset_x = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (paste),
"gimp-edit-new-image-x"));
offset_y = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (paste),
"gimp-edit-new-image-y"));
new_width = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (paste),
"gimp-edit-new-image-width"));
new_height = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (paste),
"gimp-edit-new-image-height"));
image = gimp_image_duplicate (GIMP_IMAGE (paste));
if (new_width > 0 && new_height > 0)
{
gimp_image_undo_disable (image);
gimp_image_resize (image, context,
new_width, new_height,
-offset_x, -offset_y,
NULL);
gimp_image_undo_enable (image);
}
}
image = gimp_image_duplicate (GIMP_IMAGE (paste));
else if (GIMP_IS_BUFFER (paste))
{
image = gimp_image_new_from_buffer (gimp, GIMP_BUFFER (paste));
}
image = gimp_image_new_from_buffer (gimp, GIMP_BUFFER (paste));
return image;
}

View File

@@ -26,6 +26,7 @@ GimpObject * gimp_edit_cut (GimpImage *image,
GimpObject * gimp_edit_copy (GimpImage *image,
GList *drawables,
GimpContext *context,
gboolean copy_for_cut,
GError **error);
GimpBuffer * gimp_edit_copy_visible (GimpImage *image,
GimpContext *context,

View File

@@ -339,7 +339,7 @@ gimp_get_display_window_id (Gimp *gimp,
GimpDisplay *
gimp_create_display (Gimp *gimp,
GimpImage *image,
GimpUnit unit,
GimpUnit *unit,
gdouble scale,
GObject *monitor)
{

View File

@@ -57,7 +57,7 @@ struct _GimpGui
GBytes * (* display_get_window_id) (GimpDisplay *display);
GimpDisplay * (* display_create) (Gimp *gimp,
GimpImage *image,
GimpUnit unit,
GimpUnit *unit,
gdouble scale,
GObject *monitor);
void (* display_delete) (GimpDisplay *display);
@@ -127,7 +127,7 @@ GBytes * gimp_get_display_window_id (Gimp *gimp,
GimpDisplay *display);
GimpDisplay * gimp_create_display (Gimp *gimp,
GimpImage *image,
GimpUnit unit,
GimpUnit *unit,
gdouble scale,
GObject *monitor);
void gimp_delete_display (Gimp *gimp,

View File

@@ -206,11 +206,7 @@ gimp_g_value_get_memsize (GValue *value)
}
else if (G_VALUE_HOLDS_BOXED (value))
{
if (GIMP_VALUE_HOLDS_RGB (value))
{
memsize += sizeof (GimpRGB);
}
else if (GIMP_VALUE_HOLDS_MATRIX2 (value))
if (GIMP_VALUE_HOLDS_MATRIX2 (value))
{
memsize += sizeof (GimpMatrix2);
}
@@ -221,7 +217,7 @@ gimp_g_value_get_memsize (GValue *value)
}
else if (GIMP_VALUE_HOLDS_ARRAY (value) ||
GIMP_VALUE_HOLDS_INT32_ARRAY (value) ||
GIMP_VALUE_HOLDS_FLOAT_ARRAY (value))
GIMP_VALUE_HOLDS_DOUBLE_ARRAY (value))
{
GimpArray *array = g_value_get_boxed (value);

View File

@@ -46,126 +46,30 @@
* or the GTokenType they would have expected but didn't get.
*/
static GTokenType gimp_unitrc_unit_info_deserialize (GScanner *scanner,
Gimp *gimp);
static GTokenType gimp_unitrc_unit_info_deserialize (GScanner *scanner,
Gimp *gimp);
static GimpUnit * gimp_units_get_user_unit (gint unit_id);
static Gimp *the_unit_gimp = NULL;
static gint
gimp_units_get_number_of_units (void)
{
return _gimp_unit_get_number_of_units (the_unit_gimp);
}
static gint
gimp_units_get_number_of_built_in_units (void)
{
return GIMP_UNIT_END;
}
static GimpUnit
gimp_units_unit_new (gchar *identifier,
gdouble factor,
gint digits,
gchar *symbol,
gchar *abbreviation,
gchar *singular,
gchar *plural)
{
return _gimp_unit_new (the_unit_gimp,
identifier,
factor,
digits,
symbol,
abbreviation,
singular,
plural);
}
static gboolean
gimp_units_unit_get_deletion_flag (GimpUnit unit)
{
return _gimp_unit_get_deletion_flag (the_unit_gimp, unit);
}
static void
gimp_units_unit_set_deletion_flag (GimpUnit unit,
gboolean deletion_flag)
{
_gimp_unit_set_deletion_flag (the_unit_gimp, unit, deletion_flag);
}
static gdouble
gimp_units_unit_get_factor (GimpUnit unit)
{
return _gimp_unit_get_factor (the_unit_gimp, unit);
}
static gint
gimp_units_unit_get_digits (GimpUnit unit)
{
return _gimp_unit_get_digits (the_unit_gimp, unit);
}
static const gchar *
gimp_units_unit_get_identifier (GimpUnit unit)
{
return _gimp_unit_get_identifier (the_unit_gimp, unit);
}
static const gchar *
gimp_units_unit_get_symbol (GimpUnit unit)
{
return _gimp_unit_get_symbol (the_unit_gimp, unit);
}
static const gchar *
gimp_units_unit_get_abbreviation (GimpUnit unit)
{
return _gimp_unit_get_abbreviation (the_unit_gimp, unit);
}
static const gchar *
gimp_units_unit_get_singular (GimpUnit unit)
{
return _gimp_unit_get_singular (the_unit_gimp, unit);
}
static const gchar *
gimp_units_unit_get_plural (GimpUnit unit)
{
return _gimp_unit_get_plural (the_unit_gimp, unit);
}
void
gimp_units_init (Gimp *gimp)
{
GimpUnitVtable vtable;
GimpUnitVtable vtable = { 0 };
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (the_unit_gimp == NULL);
the_unit_gimp = gimp;
vtable.unit_get_number_of_units = gimp_units_get_number_of_units;
vtable.unit_get_number_of_built_in_units = gimp_units_get_number_of_built_in_units;
vtable.unit_new = gimp_units_unit_new;
vtable.unit_get_deletion_flag = gimp_units_unit_get_deletion_flag;
vtable.unit_set_deletion_flag = gimp_units_unit_set_deletion_flag;
vtable.unit_get_factor = gimp_units_unit_get_factor;
vtable.unit_get_digits = gimp_units_unit_get_digits;
vtable.unit_get_identifier = gimp_units_unit_get_identifier;
vtable.unit_get_symbol = gimp_units_unit_get_symbol;
vtable.unit_get_abbreviation = gimp_units_unit_get_abbreviation;
vtable.unit_get_singular = gimp_units_unit_get_singular;
vtable.unit_get_plural = gimp_units_unit_get_plural;
vtable.get_user_unit = gimp_units_get_user_unit;
gimp_base_init (&vtable);
gimp->user_units = NULL;
gimp->n_user_units = 0;
gimp->user_units = NULL;
}
void
@@ -173,7 +77,10 @@ gimp_units_exit (Gimp *gimp)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
gimp_user_units_free (gimp);
gimp_base_exit ();
g_list_free_full (gimp->user_units, g_object_unref);
gimp->user_units = NULL;
}
@@ -186,8 +93,8 @@ enum
UNIT_DIGITS,
UNIT_SYMBOL,
UNIT_ABBREV,
UNIT_SINGULAR,
UNIT_PLURAL
UNIT_SINGULAR, /* Obsoleted in GIMP 3.0. */
UNIT_PLURAL /* Obsoleted in GIMP 3.0. */
};
void
@@ -292,7 +199,7 @@ gimp_unitrc_save (Gimp *gimp)
{
GimpConfigWriter *writer;
GFile *file;
gint i;
GList *iter;
GError *error = NULL;
g_return_if_fail (GIMP_IS_GIMP (gimp));
@@ -319,49 +226,38 @@ gimp_unitrc_save (Gimp *gimp)
if (!writer)
return;
/* save user defined units */
for (i = _gimp_unit_get_number_of_built_in_units (gimp);
i < _gimp_unit_get_number_of_units (gimp);
i++)
for (iter = gimp->user_units; iter; iter = iter->next)
{
if (_gimp_unit_get_deletion_flag (gimp, i) == FALSE)
GimpUnit *unit = iter->data;
if (gimp_unit_get_deletion_flag (unit) == FALSE)
{
gchar buf[G_ASCII_DTOSTR_BUF_SIZE];
gimp_config_writer_open (writer, "unit-info");
gimp_config_writer_string (writer,
_gimp_unit_get_identifier (gimp, i));
gimp_unit_get_name (unit));
gimp_config_writer_open (writer, "factor");
gimp_config_writer_print (writer,
g_ascii_dtostr (buf, sizeof (buf),
_gimp_unit_get_factor (gimp, i)),
gimp_unit_get_factor (unit)),
-1);
gimp_config_writer_close (writer);
gimp_config_writer_open (writer, "digits");
gimp_config_writer_printf (writer,
"%d", _gimp_unit_get_digits (gimp, i));
"%d", gimp_unit_get_digits (unit));
gimp_config_writer_close (writer);
gimp_config_writer_open (writer, "symbol");
gimp_config_writer_string (writer,
_gimp_unit_get_symbol (gimp, i));
gimp_unit_get_symbol (unit));
gimp_config_writer_close (writer);
gimp_config_writer_open (writer, "abbreviation");
gimp_config_writer_string (writer,
_gimp_unit_get_abbreviation (gimp, i));
gimp_config_writer_close (writer);
gimp_config_writer_open (writer, "singular");
gimp_config_writer_string (writer,
_gimp_unit_get_singular (gimp, i));
gimp_config_writer_close (writer);
gimp_config_writer_open (writer, "plural");
gimp_config_writer_string (writer,
_gimp_unit_get_plural (gimp, i));
gimp_unit_get_abbreviation (unit));
gimp_config_writer_close (writer);
gimp_config_writer_close (writer);
@@ -382,7 +278,7 @@ static GTokenType
gimp_unitrc_unit_info_deserialize (GScanner *scanner,
Gimp *gimp)
{
gchar *identifier = NULL;
gchar *name = NULL;
gdouble factor = 1.0;
gint digits = 2.0;
gchar *symbol = NULL;
@@ -391,7 +287,7 @@ gimp_unitrc_unit_info_deserialize (GScanner *scanner,
gchar *plural = NULL;
GTokenType token;
if (! gimp_scanner_parse_string (scanner, &identifier))
if (! gimp_scanner_parse_string (scanner, &name))
return G_TOKEN_STRING;
token = G_TOKEN_LEFT_PAREN;
@@ -411,7 +307,7 @@ gimp_unitrc_unit_info_deserialize (GScanner *scanner,
{
case UNIT_FACTOR:
token = G_TOKEN_FLOAT;
if (! gimp_scanner_parse_float (scanner, &factor))
if (! gimp_scanner_parse_double (scanner, &factor))
goto cleanup;
break;
@@ -434,6 +330,11 @@ gimp_unitrc_unit_info_deserialize (GScanner *scanner,
break;
case UNIT_SINGULAR:
/* UNIT_SINGULAR and UNIT_PLURAL are deprecated. We still
* support reading them if they exist to stay backward
* compatible with older unitrc, in which case, we use
* UNIT_PLURAL on behalf of the name.
*/
token = G_TOKEN_STRING;
if (! gimp_scanner_parse_string (scanner, &singular))
goto cleanup;
@@ -466,19 +367,18 @@ gimp_unitrc_unit_info_deserialize (GScanner *scanner,
if (g_scanner_peek_next_token (scanner) == token)
{
GimpUnit unit = _gimp_unit_new (gimp,
identifier, factor, digits,
symbol, abbreviation,
singular, plural);
GimpUnit *unit = _gimp_unit_new (gimp,
plural && strlen (plural) > 0 ? plural : name,
factor, digits, symbol, abbreviation);
/* make the unit definition persistent */
_gimp_unit_set_deletion_flag (gimp, unit, FALSE);
gimp_unit_set_deletion_flag (unit, FALSE);
}
}
cleanup:
g_free (identifier);
g_free (name);
g_free (symbol);
g_free (abbreviation);
g_free (singular);
@@ -486,3 +386,20 @@ gimp_unitrc_unit_info_deserialize (GScanner *scanner,
return token;
}
/**
* gimp_units_get_user_unit:
* @unit_id:
*
* This function will return the user-created GimpUnit with ID @unit_id.
*/
static GimpUnit *
gimp_units_get_user_unit (gint unit_id)
{
g_return_val_if_fail (the_unit_gimp != NULL, NULL);
g_return_val_if_fail (unit_id >= GIMP_UNIT_END && unit_id != GIMP_UNIT_PERCENT, NULL);
unit_id -= GIMP_UNIT_END;
return g_list_nth_data (the_unit_gimp->user_units, unit_id);
}

View File

@@ -71,10 +71,12 @@ struct _GimpUserInstall
gint scale_factor;
const gchar *migrate;
gboolean migrate;
GimpUserInstallLogFunc log;
gpointer log_data;
GHashTable *accels;
};
typedef enum
@@ -118,7 +120,8 @@ gimp_user_install_items[] =
static gboolean user_install_detect_old (GimpUserInstall *install,
const gchar *gimp_dir);
static gchar * user_install_old_style_gimpdir (void);
static gchar * user_install_old_style_gimpdir (void);
static gchar * user_install_flatpak_gimpdir (gint minor);
static void user_install_log (GimpUserInstall *install,
const gchar *format,
@@ -135,13 +138,15 @@ static gboolean user_install_file_copy (GimpUserInstall *install,
const gchar *source,
const gchar *dest,
const gchar *old_options_regexp,
GRegexEvalCallback update_callback);
GRegexEvalCallback update_callback,
GimpCopyPostProcess post_process_callback);
static gboolean user_install_dir_copy (GimpUserInstall *install,
gint level,
const gchar *source,
const gchar *base,
const gchar *update_pattern,
GRegexEvalCallback update_callback);
GRegexEvalCallback update_callback,
GimpCopyPostProcess post_process_callback);
static gboolean user_install_create_files (GimpUserInstall *install);
static gboolean user_install_migrate_files (GimpUserInstall *install);
@@ -157,6 +162,7 @@ gimp_user_install_new (GObject *gimp,
install->gimp = gimp;
install->verbose = verbose;
install->accels = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
user_install_detect_old (install, gimp_directory ());
@@ -214,16 +220,28 @@ gimp_user_install_run (GimpUserInstall *install,
dirname = g_filename_display_name (gimp_directory ());
if (install->migrate)
user_install_log (install,
_("It seems you have used GIMP %s before. "
"GIMP will now migrate your user settings to '%s'."),
install->migrate, dirname);
{
gchar *verstring;
/* TODO: these 2 strings should be merged into one, but it was not
* possible to do it at implementation time, in order not to break
* string freeze.
*/
verstring = g_strdup_printf ("%d.%d", install->old_major, install->old_minor);
user_install_log (install,
_("It seems you have used GIMP %s before. "
"GIMP will now migrate your user settings to '%s'."),
verstring, dirname);
g_free (verstring);
}
else
user_install_log (install,
_("It appears that you are using GIMP for the "
"first time. GIMP will now create a folder "
"named '%s' and copy some files to it."),
dirname);
{
user_install_log (install,
_("It appears that you are using GIMP for the "
"first time. GIMP will now create a folder "
"named '%s' and copy some files to it."),
dirname);
}
g_free (dirname);
@@ -245,6 +263,7 @@ gimp_user_install_free (GimpUserInstall *install)
g_return_if_fail (install != NULL);
g_free (install->old_dir);
g_hash_table_destroy (install->accels);
g_slice_free (GimpUserInstall, install);
}
@@ -267,7 +286,7 @@ static gboolean
user_install_detect_old (GimpUserInstall *install,
const gchar *gimp_dir)
{
gchar *dir = g_strdup (gimp_dir);
gchar *dir = g_strconcat (gimp_dir, "ZZZ", NULL);
gchar *version;
gboolean migrate = FALSE;
@@ -275,34 +294,103 @@ user_install_detect_old (GimpUserInstall *install,
if (version)
{
gint i;
gint major;
gint minor;
g_snprintf (version, 5, "%d.XY", 2);
for (i = (GIMP_MINOR_VERSION & ~1); i >= 0; i -= 2)
for (major = 3; major >= 2; major--)
{
/* we assume that GIMP_APP_VERSION is in the form '2.x' */
g_snprintf (version + 2, 3, "%d", i);
gint max_minor;
migrate = g_file_test (dir, G_FILE_TEST_IS_DIR);
g_snprintf (version, 5, "%d.XY", major);
if (migrate)
switch (major)
{
#ifdef GIMP_UNSTABLE
g_printerr ("gimp-user-install: migrating from %s\n", dir);
#endif
install->old_major = 2;
install->old_minor = i;
case 3:
max_minor = GIMP_MINOR_VERSION;
break;
case 2:
max_minor = 10;
break;
default:
g_return_val_if_reached (FALSE);
}
for (minor = (max_minor & ~1); minor >= 0; minor -= 2)
{
/* we assume that GIMP_APP_VERSION is in the form '2.x' */
g_snprintf (version + 2, 3, "%d", minor);
migrate = g_file_test (dir, G_FILE_TEST_IS_DIR);
if (migrate)
{
install->old_major = 2;
install->old_minor = minor;
break;
}
#ifdef G_OS_UNIX
if (minor == 10)
{
/* This is special-casing for GIMP 2.10 as flatpak where
* we had this weird inconsistency: depending on whether a
* previous $XDG_CONFIG_HOME/GIMP/ folder was found or
* not, the config folder would be either inside, or would
* be in $HOME/.var/<etc> as other flatpak (see #5331).
* For GIMP 3, even the flatpak will always be in
* $XDG_CONFIG_HOME. But then we want a migration to still
* find the previous config folder.
* If one was found in $XDG_CONFIG_HOME, it is used in
* priority. Then ~/.var/ is used a fallback, if found.
*/
gchar *flatpak_dir = user_install_flatpak_gimpdir (minor);
if (flatpak_dir)
/* This first test is for finding a 2.10 flatpak config
* dir from a non-flatpak GIMP 3+.
*/
migrate = g_file_test (flatpak_dir, G_FILE_TEST_IS_DIR);
if (! migrate && g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS))
{
/* Now we check /var/config/GIMP because this is where
* local ~/.var/ is mounted inside the sandbox.
* So this second test is for finding a 2.10 flatpak
* config dir from a flatpak GIMP 3+.
*/
g_free (flatpak_dir);
flatpak_dir = g_build_filename ("/var/config/GIMP/", version, NULL);
migrate = g_file_test (flatpak_dir, G_FILE_TEST_IS_DIR);
}
if (migrate)
{
install->old_major = 2;
install->old_minor = minor;
g_free (dir);
dir = flatpak_dir;
break;
}
else
{
g_free (flatpak_dir);
}
}
#endif
}
}
}
install->migrate = migrate;
if (migrate)
{
install->old_dir = dir;
install->migrate = (const gchar *) version;
#ifdef GIMP_UNSTABLE
g_printerr ("gimp-user-install: migrating from %s\n", dir);
#endif
}
else
{
@@ -358,6 +446,27 @@ user_install_old_style_gimpdir (void)
return gimp_dir;
}
static gchar *
user_install_flatpak_gimpdir (gint minor)
{
const gchar *home_dir = g_get_home_dir ();
gchar *version = g_strdup_printf ("2.%d", minor);
gchar *gimp_dir = NULL;
if (home_dir)
/* AFAIK (after researching flatpak docs, and searching the web),
* the ~/.var/ directory is hardcoded and cannot be modified by an
* environment variable.
*/
gimp_dir = g_build_filename (home_dir,
".var/app/org.gimp.GIMP/config/GIMP/",
version, NULL);
g_free (version);
return gimp_dir;
}
static void
user_install_log (GimpUserInstall *install,
const gchar *format,
@@ -416,7 +525,8 @@ user_install_file_copy (GimpUserInstall *install,
const gchar *source,
const gchar *dest,
const gchar *old_options_regexp,
GRegexEvalCallback update_callback)
GRegexEvalCallback update_callback,
GimpCopyPostProcess post_process_callback)
{
GError *error = NULL;
gboolean success;
@@ -425,7 +535,9 @@ user_install_file_copy (GimpUserInstall *install,
gimp_filename_to_utf8 (dest),
gimp_filename_to_utf8 (source));
success = gimp_config_file_copy (source, dest, old_options_regexp, update_callback, install, &error);
success = gimp_config_file_copy (source, dest, old_options_regexp,
update_callback, post_process_callback,
install, &error);
user_install_log_error (install, &error);
@@ -508,6 +620,7 @@ user_update_menurc_over20 (const GMatchInfo *matched_value,
gchar *accel_match = g_match_info_fetch (matched_value, 3);
gchar *ignore_match = g_match_info_fetch (matched_value, 4);
gchar *new_action_name = NULL;
gboolean accel_variant = FALSE;
if (strlen (ignore_match) == 0)
{
@@ -537,17 +650,29 @@ user_update_menurc_over20 (const GMatchInfo *matched_value,
* since GIMP 2.4, changed for 2.10 in commit 0bdb747.
*/
else if (g_str_has_prefix (action_match, "tools-value-1-"))
new_action_name = g_strdup ("tools-opacity-");
new_action_name = g_strdup_printf ("tools-opacity-%s", action_match + 14);
else if (g_str_has_prefix (action_match, "tools-value-2-"))
new_action_name = g_strdup_printf ("tools-size-%s", action_match + 14);
else if (g_str_has_prefix (action_match, "tools-value-3-"))
new_action_name = g_strdup_printf ("tools-aspect-%s", action_match + 14);
else if (g_str_has_prefix (action_match, "tools-value-4-"))
new_action_name = g_strdup_printf ("tools-angle-%s", action_match + 14);
else if (g_strcmp0 (action_match, "vectors-path-tool") == 0)
new_action_name = g_strdup ("vectors-edit");
else if (g_strcmp0 (action_match, "tools-blend") == 0)
new_action_name = g_strdup ("tools-gradient");
else if (g_strcmp0 (action_match, "vectors-path-tool") == 0)
new_action_name = g_strdup ("paths-edit");
/* Following the s/GimpVectors/GimpPath/ renaming to be more
* consistent with the GUI, we also rename all the action names.
* Since GIMP 3.0, commit XXXX.
*/
else if (g_strcmp0 (action_match, "vectors-selection-from-vectors") == 0)
new_action_name = g_strdup ("paths-selection-from-paths");
else if (g_str_has_prefix (action_match, "vectors-selection-to-vectors"))
new_action_name = g_strdup_printf ("paths-selection-to-path%s",
action_match + strlen ("vectors-selection-to-vectors"));
else if (g_str_has_prefix (action_match, "vectors-"))
new_action_name = g_strdup_printf ("paths-%s", action_match + 8);
/* view-rotate-reset became view-reset and new view-rotate-reset and
* view-flip-reset actions were created. See commit 15fb4a7be0.
*/
@@ -557,19 +682,62 @@ user_update_menurc_over20 (const GMatchInfo *matched_value,
/* select-float became select-cut-float in 3.0 (select-copy-float added). */
else if (g_strcmp0 (action_match, "select-float") == 0)
new_action_name = g_strdup ("select-cut-float");
/* edit-paste-as-new-layer* actions removed in 3.0.0 (commit
* 2c4f91f585) because the default edit-paste pastes as new layer.
*
* XXX I realize though that it's not a perfect equivalent: if a
* layer mask exists, edit-paste would still create a floating
* mask (unlike old edit-paste-as-new-layer which was always
* creating a new layer). Should we reintroduce
* edit-paste-as-new-layers* actions?
*
* There exists edit-paste-merged too (introduced in 143496af22)
* but it has the same caveats of possibly creating floating
* items.
*/
else if (g_strcmp0 (action_match, "edit-paste-as-new-layer") == 0)
new_action_name = g_strdup ("edit-paste");
else if (g_strcmp0 (action_match, "edit-paste-as-new-layer-in-place") == 0)
new_action_name = g_strdup ("edit-paste-in-place");
/* These actions had an -accel variant which got removed in commit
* 71c8ff1f21. Since we cannot know if both variants were given a
* custom shortcut when processing per-line, we temporarily store
* them all and will do a second pass allowing us to store one or
* both shortcuts if needed.
*/
else if (g_str_has_suffix (action_match, "-accel") ||
g_strcmp0 (action_match, "view-zoom-out") == 0 ||
g_strcmp0 (action_match, "view-zoom-in") == 0 ||
g_strcmp0 (action_match, "view-zoom-16-1") == 0 ||
g_strcmp0 (action_match, "view-zoom-8-1") == 0 ||
g_strcmp0 (action_match, "view-zoom-4-1") == 0 ||
g_strcmp0 (action_match, "view-zoom-2-1") == 0 ||
g_strcmp0 (action_match, "view-zoom-1-1") == 0)
accel_variant = TRUE;
if (new_action_name == NULL)
new_action_name = g_strdup (action_match);
if (g_strcmp0 (comment_match, ";") == 0)
g_string_append (new_value, "# ");
{
g_string_append (new_value, "# ");
}
else if (accel_variant)
{
g_hash_table_insert (install->accels, action_match, accel_match);
action_match = NULL;
accel_match = NULL;
}
if (strlen (accel_match) > 0)
g_string_append_printf (new_value, "(action \"%s\" \"%s\")",
new_action_name, accel_match);
else
g_string_append_printf (new_value, "(action \"%s\")",
new_action_name);
if (action_match)
{
if (strlen (accel_match) > 0)
g_string_append_printf (new_value, "(action \"%s\" \"%s\")",
new_action_name, accel_match);
else
g_string_append_printf (new_value, "(action \"%s\")",
new_action_name);
}
}
g_free (comment_match);
@@ -581,6 +749,97 @@ user_update_menurc_over20 (const GMatchInfo *matched_value,
return FALSE;
}
gchar *
user_update_post_process_menurc_over20 (gpointer user_data)
{
GString *string = g_string_new (NULL);
GimpUserInstall *install = (GimpUserInstall *) user_data;
static gchar * gimp_2_accels[][3] =
{
{ "view-zoom-out", "minus", "KP_Subtract" },
{ "view-zoom-in", "plus", "KP_Add" },
{ "view-zoom-16-1", "5", "KP_5" },
{ "view-zoom-8-1", "4", "KP_4" },
{ "view-zoom-4-1", "3", "KP_3" },
{ "view-zoom-2-1", "2", "KP_2" },
{ "view-zoom-1-1", "1", "KP_1" }
};
for (gint i = 0; i < G_N_ELEMENTS (gimp_2_accels); i++)
{
const gchar *action = gimp_2_accels[i][0];
gchar *action_variant = g_strconcat (action, "-accel", NULL);
gchar *accel;
gchar *accel_variant;
accel = g_hash_table_lookup (install->accels, action);
accel_variant = g_hash_table_lookup (install->accels, action_variant);
if (accel != NULL && strlen (accel) > 0 &&
accel_variant != NULL && strlen (accel_variant) > 0)
{
g_string_append_printf (string, "\n(action \"%s\" \"%s\" \"%s\")",
action, accel, accel_variant);
}
else if (accel != NULL)
{
if (strlen (accel) > 0)
{
if (accel_variant == NULL)
g_string_append_printf (string, "\n(action \"%s\" \"%s\" \"%s\")", action, accel, gimp_2_accels[i][2]);
else
g_string_append_printf (string, "\n(action \"%s\" \"%s\")", action, accel);
}
else if (accel_variant != NULL)
{
if (strlen (accel_variant) > 0)
g_string_append_printf (string, "\n(action \"%s\" \"%s\")", action, accel_variant);
else
g_string_append_printf (string, "\n(action \"%s\")", action);
}
else
{
g_string_append_printf (string, "\n(action \"%s\" \"%s\")", action, gimp_2_accels[i][2]);
}
}
else if (accel_variant != NULL)
{
if (strlen (accel_variant) > 0)
{
g_string_append_printf (string, "\n(action \"%s\" \"%s\" \"%s\")", action, accel_variant, gimp_2_accels[i][1]);
}
else
{
g_string_append_printf (string, "\n(action \"%s\" \"%s\")", action, gimp_2_accels[i][1]);
}
}
g_free (action_variant);
}
return g_string_free (string, FALSE);
}
#define TEMPLATERC_UPDATE_PATTERN \
"\\(precision (.*)-gamma\\)"
static gboolean
user_update_templaterc (const GMatchInfo *matched_value,
GString *new_value,
gpointer data)
{
gchar *original = g_match_info_fetch (matched_value, 0);
gchar *match = g_match_info_fetch (matched_value, 1);
/* GIMP_PRECISION_*_GAMMA removed in GIMP 3.0.0 (commit 2559138931). */
g_string_append_printf (new_value, "(precision %s-non-linear)", match);
g_free (original);
g_free (match);
return FALSE;
}
#define CONTROLLERRC_UPDATE_PATTERN \
"\\(map \"(scroll|cursor)-[^\"]*\\bcontrol\\b[^\"]*\""
@@ -693,9 +952,12 @@ user_update_sessionrc (const GMatchInfo *matched_value,
}
#define GIMPRC_UPDATE_PATTERN \
"\\(show-tooltips [^)]*\\)" "|" \
"\\(theme [^)]*\\)" "|" \
"^ *\\(.*-path \".*\"\\) *$" "|" \
"\\(style solid\\)"
"\\(style solid\\)" "|" \
"\\(precision (.*)-gamma\\)" "|" \
"\\(filter-tool-show-color-options [^)]*\\)"
static gboolean
user_update_gimprc (const GMatchInfo *matched_value,
@@ -711,9 +973,24 @@ user_update_gimprc (const GMatchInfo *matched_value,
*/
g_string_append (new_value, "(style fg-color)");
}
else if (g_str_has_prefix (match, "(precision "))
{
gchar *precision_match = g_match_info_fetch (matched_value, 1);
/* GIMP_PRECISION_*_GAMMA removed in GIMP 3.0.0 (commit 2559138931). */
g_string_append_printf (new_value, "(precision %s-non-linear)", precision_match);
g_free (precision_match);
}
else
{
/* Do not migrate show-tooltips GIMP < 3.0. Cf. #1965. */
/* Do not migrate paths and themes from GIMP < 3.0. */
/* Do not migrate the advanced color options which was the gamma
* hack removed for GIMP 3.0. Cf. #12577.
*/
}
g_free (match);
@@ -799,9 +1076,10 @@ user_update_tool_presets (const GMatchInfo *matched_value,
* well as "toolrc" (but this one is skipped anyway).
*/
#define CONTEXTRC_UPDATE_PATTERN \
"gimp-blend-tool" "|" \
"dynamics \"Dynamics Off\"" "|" \
"\\(dynamics-expanded yes\\)"
"gimp-blend-tool" "|" \
"dynamics \"Dynamics Off\"" "|" \
"\\(dynamics-expanded yes\\)" "|" \
"\\(color-options-expanded [^)]*\\)"
static gboolean
user_update_contextrc_over20 (const GMatchInfo *matched_value,
@@ -822,6 +1100,10 @@ user_update_contextrc_over20 (const GMatchInfo *matched_value,
{
/* This option just doesn't exist anymore. */
}
else if (g_str_has_prefix (match, "(color-options-expanded "))
{
/* This option was removed with the gamma-hack. Cf. #12577. */
}
else
{
g_message ("(WARNING) %s: invalid match \"%s\"", G_STRFUNC, match);
@@ -838,7 +1120,8 @@ user_install_dir_copy (GimpUserInstall *install,
const gchar *source,
const gchar *base,
const gchar *update_pattern,
GRegexEvalCallback update_callback)
GRegexEvalCallback update_callback,
GimpCopyPostProcess post_process_callback)
{
GDir *source_dir = NULL;
GDir *dest_dir = NULL;
@@ -889,7 +1172,8 @@ user_install_dir_copy (GimpUserInstall *install,
success = user_install_file_copy (install, name, dest,
update_pattern,
update_callback);
update_callback,
post_process_callback);
if (! success)
{
g_free (name);
@@ -899,7 +1183,8 @@ user_install_dir_copy (GimpUserInstall *install,
else
{
user_install_dir_copy (install, level + 1, name, dirname,
update_pattern, update_callback);
update_pattern, update_callback,
post_process_callback);
}
g_free (name);
@@ -949,7 +1234,7 @@ user_install_create_files (GimpUserInstall *install)
gimp_sysconf_directory (), G_DIR_SEPARATOR,
gimp_user_install_items[i].name);
if (! user_install_file_copy (install, source, dest, NULL, NULL))
if (! user_install_file_copy (install, source, dest, NULL, NULL, NULL))
return FALSE;
break;
}
@@ -995,8 +1280,9 @@ user_install_migrate_files (GimpUserInstall *install)
if (g_file_test (source, G_FILE_TEST_IS_REGULAR))
{
const gchar *update_pattern = NULL;
GRegexEvalCallback update_callback = NULL;
const gchar *update_pattern = NULL;
GRegexEvalCallback update_callback = NULL;
GimpCopyPostProcess post_process_callback = NULL;
/* skip these files for all old versions */
if (strcmp (basename, "documents") == 0 ||
@@ -1026,13 +1312,19 @@ user_install_migrate_files (GimpUserInstall *install)
goto next_file;
break;
default:
update_pattern = MENURC_OVER20_UPDATE_PATTERN;
update_callback = user_update_menurc_over20;
update_pattern = MENURC_OVER20_UPDATE_PATTERN;
update_callback = user_update_menurc_over20;
post_process_callback = user_update_post_process_menurc_over20;
/* menurc becomes shortcutsrc in 3.0. */
new_dest = "shortcutsrc";
new_dest = "shortcutsrc";
break;
}
}
else if (strcmp (basename, "templaterc") == 0)
{
update_pattern = TEMPLATERC_UPDATE_PATTERN;
update_callback = user_update_templaterc;
}
else if (strcmp (basename, "controllerrc") == 0)
{
update_pattern = CONTROLLERRC_UPDATE_PATTERN;
@@ -1055,7 +1347,8 @@ user_install_migrate_files (GimpUserInstall *install)
new_dest ? new_dest : basename);
user_install_file_copy (install, source, dest,
update_pattern, update_callback);
update_pattern, update_callback,
post_process_callback);
}
else if (g_file_test (source, G_FILE_TEST_IS_DIR))
{
@@ -1088,7 +1381,7 @@ user_install_migrate_files (GimpUserInstall *install)
update_callback = user_update_tool_presets;
}
user_install_dir_copy (install, 0, source, gimp_directory (),
update_pattern, update_callback);
update_pattern, update_callback, NULL);
}
next_file:

View File

@@ -193,7 +193,7 @@ gimp_get_default_language (const gchar *category)
return lang;
}
GimpUnit
GimpUnit *
gimp_get_default_unit (void)
{
#if defined (HAVE__NL_MEASUREMENT_MEASUREMENT)
@@ -202,10 +202,10 @@ gimp_get_default_unit (void)
switch (*((guchar *) measurement))
{
case 1: /* metric */
return GIMP_UNIT_MM;
return gimp_unit_mm ();
case 2: /* imperial */
return GIMP_UNIT_INCH;
return gimp_unit_inch ();
}
#elif defined (G_OS_WIN32)
@@ -222,15 +222,15 @@ gimp_get_default_unit (void)
switch ((guint) measurement)
{
case 0: /* metric */
return GIMP_UNIT_MM;
return gimp_unit_mm ();
case 1: /* imperial */
return GIMP_UNIT_INCH;
return gimp_unit_inch ();
}
}
#endif
return GIMP_UNIT_MM;
return gimp_unit_mm ();
}
gchar **
@@ -745,31 +745,54 @@ gimp_file_is_executable (GFile *file)
gchar *
gimp_file_get_extension (GFile *file)
{
gchar *uri;
gint uri_len;
gchar *ext = NULL;
gint search_len;
GFileInfo *info;
gchar *basename;
gint basename_len;
gchar *ext = NULL;
gint search_len;
g_return_val_if_fail (G_IS_FILE (file), NULL);
uri = g_file_get_uri (file);
uri_len = strlen (uri);
/* Certain cloud providers return a blob name rather than the
* actual file with g_file_get_uri (). Since we don't check
* the magic numbers for remote files, we can't open it. The
* actual name is stored as "display-name" in all cases, so we
* use that instead. */
info = g_file_query_info (file,
G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME,
0, NULL, NULL);
if (g_str_has_suffix (uri, ".gz"))
search_len = uri_len - 3;
else if (g_str_has_suffix (uri, ".bz2"))
search_len = uri_len - 4;
else if (g_str_has_suffix (uri, ".xz"))
search_len = uri_len - 3;
if (info != NULL)
basename =
g_file_info_get_attribute_as_string (info,
G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME);
else
search_len = uri_len;
basename = g_file_get_basename (file);
ext = g_strrstr_len (uri, search_len, ".");
g_clear_object (&info);
/* When making a temporary file for saving/exporting, we may not
* have the display-name yet, so let's fallback to the URI */
if (! basename)
basename = g_file_get_uri (file);
basename_len = strlen (basename);
if (g_str_has_suffix (basename, ".gz"))
search_len = basename_len - 3;
else if (g_str_has_suffix (basename, ".bz2"))
search_len = basename_len - 4;
else if (g_str_has_suffix (basename, ".xz"))
search_len = basename_len - 3;
else
search_len = basename_len;
ext = g_strrstr_len (basename, search_len, ".");
if (ext)
ext = g_strdup (ext);
g_free (uri);
g_free (basename);
return ext;
}
@@ -1281,7 +1304,7 @@ gimp_create_image_from_buffer (Gimp *gimp,
NULL /* same image */);
gimp_image_add_layer (image, layer, NULL, -1, FALSE);
gimp_create_display (gimp, image, GIMP_UNIT_PIXEL, 1.0, NULL);
gimp_create_display (gimp, image, gimp_unit_pixel (), 1.0, NULL);
/* unref the image unconditionally, even when no display was created */
g_object_add_weak_pointer (G_OBJECT (image), (gpointer) &image);

View File

@@ -40,7 +40,7 @@
gint gimp_get_pid (void);
guint64 gimp_get_physical_memory_size (void);
gchar * gimp_get_default_language (const gchar *category);
GimpUnit gimp_get_default_unit (void);
GimpUnit * gimp_get_default_unit (void);
gchar ** gimp_properties_append (GType object_type,
gint *n_properties,

View File

@@ -63,6 +63,7 @@
#include "gimpgradient.h"
#include "gimpidtable.h"
#include "gimpimage.h"
#include "gimpimage-metadata.h"
#include "gimpimagefile.h"
#include "gimplist.h"
#include "gimpmarshal.h"
@@ -103,34 +104,36 @@ enum
};
static void gimp_constructed (GObject *object);
static void gimp_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_dispose (GObject *object);
static void gimp_finalize (GObject *object);
static void gimp_constructed (GObject *object);
static void gimp_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_dispose (GObject *object);
static void gimp_finalize (GObject *object);
static gint64 gimp_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_real_initialize (Gimp *gimp,
GimpInitStatusFunc status_callback);
static void gimp_real_restore (Gimp *gimp,
GimpInitStatusFunc status_callback);
static gboolean gimp_real_exit (Gimp *gimp,
gboolean force);
static void gimp_real_initialize (Gimp *gimp,
GimpInitStatusFunc status_callback);
static void gimp_real_restore (Gimp *gimp,
GimpInitStatusFunc status_callback);
static gboolean gimp_real_exit (Gimp *gimp,
gboolean force);
static void gimp_global_config_notify (GObject *global_config,
GParamSpec *param_spec,
GObject *edit_config);
static void gimp_edit_config_notify (GObject *edit_config,
GParamSpec *param_spec,
GObject *global_config);
static void gimp_global_config_notify (GObject *global_config,
GParamSpec *param_spec,
GObject *edit_config);
static void gimp_edit_config_notify (GObject *edit_config,
GParamSpec *param_spec,
GObject *global_config);
static gboolean gimp_exit_idle_cleanup_stray_images (Gimp *gimp);
G_DEFINE_TYPE (Gimp, gimp, GIMP_TYPE_OBJECT)
@@ -244,10 +247,11 @@ gimp_init (Gimp *gimp)
gimp->images = gimp_list_new_weak (GIMP_TYPE_IMAGE, FALSE);
gimp_object_set_static_name (GIMP_OBJECT (gimp->images), "images");
gimp->next_guide_id = 1;
gimp->next_sample_point_id = 1;
gimp->image_table = gimp_id_table_new ();
gimp->item_table = gimp_id_table_new ();
gimp->next_guide_id = 1;
gimp->next_sample_point_id = 1;
gimp->image_table = gimp_id_table_new ();
gimp->item_table = gimp_id_table_new ();
gimp->drawable_filter_table = gimp_id_table_new ();
gimp->displays = g_object_new (GIMP_TYPE_LIST,
"children-type", GIMP_TYPE_OBJECT,
@@ -370,8 +374,6 @@ gimp_dispose (GObject *object)
g_clear_object (&gimp->edit_config);
g_clear_object (&gimp->config);
gimp_contexts_exit (gimp);
g_clear_object (&gimp->image_new_last_template);
G_OBJECT_CLASS (parent_class)->dispose (object);
@@ -426,6 +428,7 @@ gimp_finalize (GObject *object)
g_clear_object (&gimp->clipboard_image);
g_clear_object (&gimp->displays);
g_clear_object (&gimp->item_table);
g_clear_object (&gimp->drawable_filter_table);
g_clear_object (&gimp->image_table);
g_clear_object (&gimp->images);
g_clear_object (&gimp->plug_in_manager);
@@ -449,7 +452,9 @@ gimp_finalize (GObject *object)
G_STRFUNC, g_list_length (gimp->context_list));
for (list = gimp->context_list; list; list = g_list_next (list))
g_printerr ("stale context: %s\n", gimp_object_get_name (list->data));
g_printerr ("stale context: %s (of type %s)\n",
gimp_object_get_name (list->data),
g_type_name (G_TYPE_FROM_INSTANCE (list->data)));
g_list_free (gimp->context_list);
gimp->context_list = NULL;
@@ -489,6 +494,7 @@ gimp_get_memsize (GimpObject *object,
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->image_table), 0);
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->item_table), 0);
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->drawable_filter_table), 0);
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->displays), gui_size);
@@ -891,8 +897,7 @@ void
gimp_exit (Gimp *gimp,
gboolean force)
{
gboolean handled;
GList *image_iter;
gboolean handled;
g_return_if_fail (GIMP_IS_GIMP (gimp));
@@ -906,17 +911,11 @@ gimp_exit (Gimp *gimp,
if (handled)
return;
/* Get rid of images without display. We do this *after* handling the
* usual exit callbacks, because the things that are torn down there
* might have references to these images (for instance GimpActions
* in the UI manager).
*/
while ((image_iter = gimp_get_image_iter (gimp)))
{
GimpImage *image = image_iter->data;
gimp_contexts_exit (gimp);
g_object_unref (image);
}
g_idle_add_full (G_PRIORITY_LOW,
(GSourceFunc) gimp_exit_idle_cleanup_stray_images,
gimp, NULL);
}
GList *
@@ -1038,12 +1037,17 @@ gimp_create_image (Gimp *gimp,
GimpPrecision precision,
gboolean attach_comment)
{
GimpImage *image;
GimpImage *image;
GimpMetadata *metadata;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
image = gimp_image_new (gimp, width, height, type, precision);
metadata = gimp_metadata_new ();
gimp_image_set_metadata (image, metadata, FALSE);
g_object_unref (metadata);
if (attach_comment)
{
const gchar *comment;
@@ -1237,3 +1241,31 @@ gimp_get_temp_file (Gimp *gimp,
return file;
}
static gboolean
gimp_exit_idle_cleanup_stray_images (Gimp *gimp)
{
GList *image_iter;
while (g_main_context_pending (NULL))
g_main_context_iteration (NULL, TRUE);
/* Get rid of images without display. We do this *after* handling the
* usual exit callbacks and any other pending event, because the
* things that are torn down there might have references to these
* images, for instance GimpActions in the UI manager, or some plug-in
* which was still running and had to get killed in gimp_exit() (cf. #11922).
*/
while ((image_iter = gimp_get_image_iter (gimp)))
{
GimpImage *image = image_iter->data;
/* TODO: localize after string freeze. */
g_printerr ("INFO: a stray image seems to have been left around by a plug-in: \"%s\"",
gimp_image_get_display_name (image));
g_object_unref (image);
}
return G_SOURCE_REMOVE ;
}

View File

@@ -69,7 +69,6 @@ struct _Gimp
guint busy_idle_id;
GList *user_units;
gint n_user_units;
GimpParasiteList *parasites;
@@ -89,6 +88,7 @@ struct _Gimp
guint32 next_sample_point_id;
GimpIdTable *image_table;
GimpIdTable *item_table;
GimpIdTable *drawable_filter_table;
GimpContainer *displays;
gint next_display_id;

View File

@@ -22,7 +22,7 @@
#define __GIMP_BACKTRACE_BACKEND_H__
#ifdef __gnu_linux__
#if defined (__gnu_linux__) && defined (HAVE_EXECINFO_H)
# define GIMP_BACKTRACE_BACKEND_LINUX
#elif defined (G_OS_WIN32) && defined (ARCH_X86)
# define GIMP_BACKTRACE_BACKEND_WINDOWS

View File

@@ -905,9 +905,10 @@ gimp_brush_load_abr_brush_v6 (GDataInputStream *input,
width, height, depth, compress);
#endif
if (width < 1 || width > 10000 ||
height < 1 || height > 10000 ||
depth < 1 || depth > 1 ||
if (width < 1 || width > 10000 ||
height < 1 || height > 10000 ||
(compress && depth != 1) ||
(! compress && (depth < 1 || depth > 2)) ||
G_MAXSIZE / width / height / depth < 1)
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
@@ -952,13 +953,43 @@ gimp_brush_load_abr_brush_v6 (GDataInputStream *input,
/* not compressed - read raw bytes as brush data */
gsize bytes_read;
if (! g_input_stream_read_all (G_INPUT_STREAM (input),
mask, size,
&bytes_read, NULL, error) ||
bytes_read != size)
if (depth == 1)
{
g_object_unref (brush);
return NULL;
if (! g_input_stream_read_all (G_INPUT_STREAM (input),
mask, size,
&bytes_read, NULL, error) ||
bytes_read != size)
{
g_object_unref (brush);
return NULL;
}
}
else if (depth == 2)
{
/* TODO: For now, convert to 8 bit representation */
guchar *mask_f = g_new0 (guchar, width * height * depth);
if (! g_input_stream_read_all (G_INPUT_STREAM (input),
mask_f, size,
&bytes_read, NULL, error) ||
bytes_read != size)
{
g_object_unref (brush);
g_free (mask_f);
return NULL;
}
for (gint i = 0; i < size; i += 2)
{
guint16 *temp = (guint16 *) &mask_f[i];
gfloat temp_f = (gfloat) GUINT16_FROM_LE (temp[0]);
temp_f = CLAMP (temp_f / G_MAXUINT16, 0.0, 1.0);
mask[i / 2] = (guchar) (temp_f * 255);
}
g_free (mask_f);
}
}
else

View File

@@ -31,8 +31,11 @@
#include "gimpbuffer.h"
#include "gimpbrush-private.h"
#include "gimpbrushclipboard.h"
#include "gimpchannel.h"
#include "gimpcontext.h"
#include "gimpimage.h"
#include "gimppickable.h"
#include "gimpselection.h"
#include "gimptempbuf.h"
#include "gimp-intl.h"
@@ -203,7 +206,8 @@ gimp_brush_clipboard_changed (Gimp *gimp,
GimpBrush *brush)
{
GimpObject *paste;
GeglBuffer *buffer = NULL;
GeglBuffer *buffer = NULL;
gboolean unref_buffer = FALSE;
gint width;
gint height;
@@ -214,8 +218,37 @@ gimp_brush_clipboard_changed (Gimp *gimp,
if (GIMP_IS_IMAGE (paste))
{
GimpContext *context = gimp_get_user_context (gimp);
gimp_pickable_flush (GIMP_PICKABLE (paste));
buffer = gimp_pickable_get_buffer (GIMP_PICKABLE (paste));
if (context)
{
GimpChannel *mask = gimp_image_get_mask (GIMP_IMAGE (paste));
if (! gimp_channel_is_empty (mask))
{
GList *pickables;
gint offset_x;
gint offset_y;
pickables = g_list_prepend (NULL, GIMP_IMAGE (paste));
buffer = gimp_selection_extract (GIMP_SELECTION (mask),
pickables, context,
FALSE, FALSE, FALSE,
&offset_x, &offset_y,
NULL);
g_list_free (pickables);
unref_buffer = TRUE;
}
else
{
buffer = gimp_pickable_get_buffer (GIMP_PICKABLE (paste));
}
}
else
{
buffer = gimp_pickable_get_buffer (GIMP_PICKABLE (paste));
}
}
else if (GIMP_IS_BUFFER (paste))
{
@@ -280,6 +313,9 @@ gimp_brush_clipboard_changed (Gimp *gimp,
gimp_temp_buf_get_data (brush->priv->pixmap),
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
}
if (unref_buffer)
g_object_unref (buffer);
}
else
{

View File

@@ -141,7 +141,9 @@ gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass)
g_object_class_install_property (object_class, PROP_RADIUS,
g_param_spec_double ("radius", NULL,
_("Brush Radius"),
0.1, 4000.0, 5.0,
GIMP_BRUSH_GENERATED_MIN_RADIUS,
GIMP_BRUSH_GENERATED_MAX_RADIUS,
5.0,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
@@ -733,7 +735,7 @@ gimp_brush_generated_set_radius (GimpBrushGenerated *brush,
{
g_return_val_if_fail (GIMP_IS_BRUSH_GENERATED (brush), -1.0);
radius = CLAMP (radius, 0.0, 32767.0);
radius = CLAMP (radius, GIMP_BRUSH_GENERATED_MIN_RADIUS, GIMP_BRUSH_GENERATED_MAX_RADIUS);
if (brush->radius != radius)
{

View File

@@ -32,6 +32,10 @@
#define GIMP_BRUSH_GENERATED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_BRUSH_GENERATED, GimpBrushGeneratedClass))
/* When changing these values, also update it in pdb/groups/brush.pdb */
#define GIMP_BRUSH_GENERATED_MIN_RADIUS 0.1
#define GIMP_BRUSH_GENERATED_MAX_RADIUS 4000.0
typedef struct _GimpBrushGeneratedClass GimpBrushGeneratedClass;
struct _GimpBrushGenerated

View File

@@ -511,18 +511,18 @@ gimp_buffer_get_resolution (GimpBuffer *buffer,
void
gimp_buffer_set_unit (GimpBuffer *buffer,
GimpUnit unit)
GimpUnit *unit)
{
g_return_if_fail (GIMP_IS_BUFFER (buffer));
g_return_if_fail (unit > GIMP_UNIT_PIXEL);
g_return_if_fail (GIMP_IS_UNIT (unit));
buffer->unit = unit;
}
GimpUnit
GimpUnit *
gimp_buffer_get_unit (GimpBuffer *buffer)
{
g_return_val_if_fail (GIMP_IS_BUFFER (buffer), GIMP_UNIT_PIXEL);
g_return_val_if_fail (GIMP_IS_BUFFER (buffer), gimp_unit_pixel ());
return buffer->unit;
}

View File

@@ -42,7 +42,7 @@ struct _GimpBuffer
gdouble resolution_x;
gdouble resolution_y;
GimpUnit unit;
GimpUnit *unit;
GimpColorProfile *color_profile;
GimpColorProfile *format_profile;
@@ -80,8 +80,8 @@ gboolean gimp_buffer_get_resolution (GimpBuffer *buffer,
gdouble *resolution_y);
void gimp_buffer_set_unit (GimpBuffer *buffer,
GimpUnit unit);
GimpUnit gimp_buffer_get_unit (GimpBuffer *buffer);
GimpUnit *unit);
GimpUnit * gimp_buffer_get_unit (GimpBuffer *buffer);
void gimp_buffer_set_color_profile (GimpBuffer *buffer,
GimpColorProfile *profile);

View File

@@ -37,7 +37,7 @@
#include "gimpimage-new.h"
#include "gimplayer.h"
#include "vectors/gimpvectors.h"
#include "vectors/gimppath.h"
typedef struct
@@ -492,7 +492,7 @@ gimp_channel_combine_buffer (GimpChannel *mask,
* their opacity, mode, visibility, etc. properties within the image
* (similar as if a "merge visible" had been applied to the image then
* the resulting layer used alone).
* If @items contain channels or vectors, they will be added as a set
* If @items contain channels or paths, they will be added as a set
* (i.e. as a single item which is an union of other items). E.g. an
* combine in GIMP_CHANNEL_OP_INTERSECT mode does not intersect all
* @items with each other and @channel. It first adds-alike all @items
@@ -518,7 +518,7 @@ gimp_channel_combine_items (GimpChannel *mask,
{
g_return_if_fail (GIMP_IS_LAYER (iter->data) ||
GIMP_IS_CHANNEL (iter->data) ||
GIMP_IS_VECTORS (iter->data));
GIMP_IS_PATH (iter->data));
if (items_image == NULL)
items_image = gimp_item_get_image (iter->data);

View File

@@ -43,8 +43,8 @@
#include "gimppickable-contiguous-region.h"
#include "gimpscanconvert.h"
#include "vectors/gimppath.h"
#include "vectors/gimpstroke.h"
#include "vectors/gimpvectors.h"
#include "gimp-intl.h"
@@ -279,24 +279,24 @@ gimp_channel_select_polygon (GimpChannel *channel,
}
void
gimp_channel_select_vectors (GimpChannel *channel,
const gchar *undo_desc,
GimpVectors *vectors,
GimpChannelOps op,
gboolean antialias,
gboolean feather,
gdouble feather_radius_x,
gdouble feather_radius_y,
gboolean push_undo)
gimp_channel_select_path (GimpChannel *channel,
const gchar *undo_desc,
GimpPath *vectors,
GimpChannelOps op,
gboolean antialias,
gboolean feather,
gdouble feather_radius_x,
gdouble feather_radius_y,
gboolean push_undo)
{
const GimpBezierDesc *bezier;
g_return_if_fail (GIMP_IS_CHANNEL (channel));
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (channel)));
g_return_if_fail (undo_desc != NULL);
g_return_if_fail (GIMP_IS_VECTORS (vectors));
g_return_if_fail (GIMP_IS_PATH (vectors));
bezier = gimp_vectors_get_bezier (vectors);
bezier = gimp_path_get_bezier (vectors);
if (bezier && bezier->num_data > 4)
{

View File

@@ -79,9 +79,9 @@ void gimp_channel_select_polygon (GimpChannel *channel,
gdouble feather_radius_x,
gdouble feather_radius_y,
gboolean push_undo);
void gimp_channel_select_vectors (GimpChannel *channel,
void gimp_channel_select_path (GimpChannel *channel,
const gchar *undo_desc,
GimpVectors *vectors,
GimpPath *vectors,
GimpChannelOps op,
gboolean antialias,
gboolean feather,

View File

@@ -87,7 +87,6 @@ gimp_container_filter (GimpContainer *container,
if (GIMP_IS_LIST (result))
gimp_list_reverse (GIMP_LIST (result));
return result;
}
@@ -138,7 +137,6 @@ gimp_container_filter_by_name (GimpContainer *container,
return result;
}
gchar **
gimp_container_get_filtered_name_array (GimpContainer *container,
const gchar *regexp)
@@ -169,3 +167,38 @@ gimp_container_get_filtered_name_array (GimpContainer *container,
return NULL;
}
}
GimpObject **
gimp_container_get_filtered_array (GimpContainer *container,
const gchar *regexp)
{
GimpObject **retval = NULL;
GimpContainer *weak = NULL;
GError *error = NULL;
g_return_val_if_fail (GIMP_IS_CONTAINER (container), NULL);
if (regexp != NULL && strlen (regexp) > 0)
weak = gimp_container_filter_by_name (container, regexp, &error);
if (error == NULL)
{
GList *list;
GList *iter;
gint i;
list = GIMP_LIST (weak ? weak : container)->queue->head;
retval = g_new0 (GimpObject *, g_list_length (list) + 1);
for (iter = list, i = 0; iter; iter = iter->next, i++)
retval[i] = iter->data;
}
else
{
g_warning ("%s", error->message);
g_error_free (error);
}
g_clear_object (&weak);
return retval;
}

View File

@@ -22,16 +22,17 @@
#define __GIMP_CONTAINER_FILTER_H__
GimpContainer * gimp_container_filter (GimpContainer *container,
GimpObjectFilterFunc filter,
gpointer user_data);
GimpContainer * gimp_container_filter_by_name (GimpContainer *container,
const gchar *regexp,
GError **error);
GimpContainer * gimp_container_filter (GimpContainer *container,
GimpObjectFilterFunc filter,
gpointer user_data);
GimpContainer * gimp_container_filter_by_name (GimpContainer *container,
const gchar *regexp,
GError **error);
gchar ** gimp_container_get_filtered_name_array
(GimpContainer *container,
const gchar *regexp);
gchar ** gimp_container_get_filtered_name_array (GimpContainer *container,
const gchar *regexp);
GimpObject ** gimp_container_get_filtered_array (GimpContainer *container,
const gchar *regexp);
#endif /* __GIMP_CONTAINER_FILTER_H__ */

Some files were not shown because too many files have changed in this diff Show More