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

Compare commits

...

1168 Commits

Author SHA1 Message Date
Jehan
aef2100361 Issue #9463: select back the previous tool when halting a layer effect.
This implies both when canceling or committing a filter.

Part of the fix is that we don't store filter tools as part of the tool
history, which means that when we swap back to the previous tool, the
filter tool info is dropped as though we never went through it. This
way, filter tools don't actually look as other tools (even though they
technically still are, since this is how we can implement canvas
interaction for some of the filters).
2025-09-23 01:01:16 +02:00
Jehan
d651d6c666 app: move the tool swapping code to tool manager and action to tools-action.
Per review, let's avoid having all the tools history in every
GimpContext.

Also a further commit will work on special-casing filter tools, which is
why we are storing up to 3 tool infos, instead of only 2.
2025-09-23 00:37:44 +02:00
Jehan
2afe449b3d Bug 373060 - allow to easily switch to last used tool.
New action "Last Tool" ("context-tools-swap"), defaulted to <shift>X.
Thanks to Damien de Lemeny for the original patch and Alexander Hämmerle
for the test case in test-ui.c.
2025-09-23 00:37:44 +02:00
Jehan
789d82355c app, pdb: "Add Layer Mask" dialog asks whether to edit mask immediately.
While there are cases when you want to edit the mask straight away (this is
often the case when starting with a white or black mask), in many other cases,
the mask may be already as you want it per its initialization (e.g. when
initializing with a channel, selection, the alpha channel, etc.).

Until now, the Add Mask dialog was always switching to the "Edit Layer Mask"
mode by default, which forced an additional unneeded click each time you created
a mask (and were in a case where you initialize the mask as you want it
directly).

Now adding "Edit mask immediately" feature in the "Add Layer Mask dialog":

* It's checked by default to keep historical behavior.
* As most other dialogs, the last value is remembered, allowing people with
  repetitive workflow not to have to repeatedly set the settings each and every
  time.
* This default is also visible and settable in Preferences > Interface > Dialog
  Defaults.
2025-09-22 22:04:32 +02:00
Bruno Lopes
82cb3ae6fe gitlab: Print filenames in meson_health 2025-09-22 16:02:24 -03:00
Bruno Lopes
1a7f673b7d gitlab: Check gimp-data submodule too on meson-health job 2025-09-22 11:19:43 -03:00
Gabriele Barbero
8f57d4bdff gui: fix quit lose unsaved changes macOS
When quitting the application using "Quit" from the dock's right-click menu,
GIMP does not follow our standard quit procedure. Instead, macOS forces the
application to close, which may result in losing unsaved changes.

By adding a delegate that intercepts the applicationShouldTerminate call,
we ensure our quit code is used, preventing macOS from handling the shutdown
directly.
2025-09-22 13:29:52 +00:00
Jehan
aa9e437d42 tools: better logic for the splash image text.
Change of series must always have their own splash image (which will
stay the same within the whole series).
Development releases though will have a new splash image most of the
time (but it is not mandatory).

See rule edicted in commit Infrastructure/gimp-web-devel@061f544.
2025-09-22 12:39:23 +02:00
Jehan
ec4daa643e tools: use release news alias URL.
While we don't know the accurate URL of every release before
publication, we now know the alias it will have in the shape:
https://www.gimp.org/release/<version>

Cf. commit Infrastructure/gimp-web@bca40810
2025-09-22 12:30:08 +02:00
Bruno Lopes
308963c271 build/linux: Don't allow openjph update on Flatpak
It have broken includes starting with 0.23.0
2025-09-21 22:43:54 -03:00
Bruno Lopes
4d0fef9482 build/linux: Update graphviz module to 14.0.0 2025-09-21 22:41:14 -03:00
Bruno Lopes
d5f3fa77db build/linux: Improve bund_usr check added in 5bc2f26c 2025-09-21 21:37:25 -03:00
Jehan
dbf0c39bb3 app: use more recent harfbuzz API.
hb_ft_font_lock_face() (and unlock) exists since harfbuzz 2.6.5 and our
current requirement for this dependency is 2.8.2.

Fixes this compilation warning:

> app/text/gimpfont.c:1196:3: warning: ‘hb_ft_font_get_face’ is deprecated: Use 'hb_ft_font_get_ft_face' instead [-Wdeprecated-declarations]
>  1196 |   face = hb_ft_font_get_face (hb_font);
2025-09-22 00:43:11 +02:00
Bruno Lopes
56f72c24ba build/windows: Add .pdb bundling condition after bundle() improvement 2025-09-21 18:17:22 -03:00
Jehan
a0676125a1 app: fix build warning on Windows.
Fixes following warning, seen on CI:

> ./app/dialogs/about-dialog.c:549:7: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
2025-09-21 22:46:48 +02:00
Bruno Lopes
c472800eae build/windows: Do not build exiv2 on 32-bit since it uses ancient MSVCRT 2025-09-21 16:33:12 -03:00
Bruno Lopes
63b4d69e48 build/linux: Drop --permissive mode introduced in 5bc2f26c
It was an awful design of mine.
2025-09-21 14:44:11 -03:00
Jehan
70bf795dfb libgimp: avoiding a build warning on Windows.
Seen in the CI:

> ../libgimp/gimpui.c:406:1: warning: 'gimp_ui_get_foreign_window' defined but not used [-Wunused-function]
2025-09-21 19:18:30 +02:00
Bruno Lopes
a7c4320312 build/windows: Stop Windows script if bundle target do not exist 2025-09-21 11:32:17 -03:00
Bruno Lopes
5bc2f26cb0 build/linux: Stop AppImage script if bund_usr target do not exist 2025-09-20 20:31:24 -03:00
Lukas Oberhuber
cacb8d2035 clipboard: Fix #14639
This is the recommended fix from Gtk to use our own mime type rather than depend on a mimetype
that has a different expectation of payload.

This means drag and drop of colors uses `application/x-geglcolor` rather than `application/x-color` which expects an RGBA color rather than a structure.
2025-09-21 00:06:15 +01:00
Aurimas Černius
c8ed51bb52 Update Lithuanian translation 2025-09-20 20:39:03 +00:00
Sabri Ünal
264a65e0b3 Update Turkish translation 2025-09-20 15:29:10 +00:00
Alx Sa
e27353216c plug-ins: Fix display lag in Small Tiles
Resolves #14932

In Small Tiles, we update the preview whenever
the number of segments slider is dragged. However,
while we reacted to the slider moving, we actually grab
the number from the GimpProcedureConfig object.
As a result, there's a lag between the signal firing and the
config object updating, so we don't grab the latest change.
This patch alters the signal to run when "notify::num-tiles"
is called, resulting in the update function having the updated
number.
2025-09-20 15:21:45 +00:00
Sabri Ünal
49fc3ad0bd Update Turkish translation 2025-09-20 09:05:26 +00:00
Sabri Ünal
5b71d1a10d Update Turkish translation 2025-09-20 06:37:52 +00:00
Lukas Oberhuber
06bcef3273 macos plugins: Improves dock icon flashing from #12150
This means additional icons don't stick around. However, this is the easy workaround to turning everything into a proper plugin with .plist files.
2025-09-20 00:10:06 +01:00
Bruno Lopes
17b23b6f26 build/windows: Fix submission info code after Microsoft guys feedback
Thanks to https://github.com/kswanny and https://github.com/knangunu.
2025-09-19 09:23:23 -03:00
Bruno Lopes
413114f9d0 gitlab: Print message when 'branches-check' job have no errors 2025-09-18 07:49:10 -03:00
Bruno Lopes
c2f0afb4bd gitlab: Fix master exception on branches check 2025-09-17 22:38:24 -03:00
Bruno Lopes
b945d77ed7 gitlab: Do not check for master branch 2025-09-17 22:33:33 -03:00
Bruno Lopes
7c04605d14 gitlab: Add job to warn about "dead" branches
It is quite common for we developers (me included) to forget to
delete already merged branches. Let's fix this mess with a job.
2025-09-17 22:27:06 -03:00
Jehan
25edb3cc64 libgimpbase: let's use a stable version for "Since:" annotation. 2025-09-17 22:20:57 +02:00
Bruno Lopes
b773c3ac48 build/windows: Complete dirty 32-bit exiv2 workaround 2025-09-17 15:58:29 -03:00
Bruno Lopes
9551519f23 build/windows: Extremely dirty workaround for 32-bit sake 2025-09-17 15:51:39 -03:00
Bruno Lopes
a9d2700631 build/windows: More self_build organization to support MINGW32 2025-09-17 15:14:42 -03:00
Bruno Lopes
5375ca63d5 build/windows: Fix remaining Clang-oriented options of self_build on MINGW32 2025-09-17 14:45:33 -03:00
Bruno Lopes
78acdd8882 build/windows: Fix typo on Clang color check 2025-09-17 14:18:31 -03:00
Bruno Lopes
b5dda733dc build/windows: Fix failing build due to Clang color on MINGW32 2025-09-17 14:13:31 -03:00
Bruno Lopes
e17567d001 build/windows: Build exiv2 with Meson so make the .dll name expected by gexiv2 2025-09-17 09:30:32 -03:00
Bruno Lopes
4a0ea33bc5 build/windows: Uncomment .pdb installing on Meson mode of self_build function 2025-09-17 09:25:58 -03:00
Bruno Lopes
a2d106e3fa build/windows: Build exiv2 with setlocale patch 2025-09-17 07:36:03 -03:00
Jehan
4ebd340688 NEWS: update. 2025-09-17 12:30:14 +02:00
Bruno Lopes
15f047f6c0 build/windows: Restore comments on 2_bundle-gimp-uni_sym.py 2025-09-16 13:30:19 -03:00
Bruno Lopes
484d0fbcf4 build/linux: Fix PostScript support on Snap with proper env var 2025-09-16 12:10:24 -03:00
Bruno Lopes
b70186bc99 build/linux: Bundle needed files for PostScript support on AppImage 2025-09-16 12:10:21 -03:00
Marco Ciampa
4a656a1db0 Updated Italian translation 2025-09-16 15:26:56 +02:00
Anders Jonsson
cb565344e9 Issue #14878: fix missing spin boxes in Map to Object plug-in
Light position spin boxes in Map to Object could be missing
or shown when they shouldn't be due to reuse of a variable.

Fixes #14878
2025-09-16 10:37:02 +00:00
Bruno Lopes
c8971ac2ae build/windows: Try to fix failing .patch download on @creiter runners 2025-09-16 07:12:16 -03:00
Bruno Lopes
3ec63979d8 build/windows: Make possible to apply remote .patch on self builds 2025-09-15 21:00:09 -03:00
Bruno Lopes
c72e36c6a2 gitlab-ci, build/windows: Fix broken env after 5ccc5252 2025-09-15 19:21:45 -03:00
Bruno Lopes
5ccc525281 build/windows: Add colored output and .pdb support for Cmake self builds 2025-09-15 14:40:29 -03:00
Jehan
84eaa94842 plug-ins: align with __attribute__ keyword.
The bug in old Bugzilla #138357 report was happening on icc on ia64 with
-no-gcc option. It does look like after all these years, this is still a
GCC attribute, but we use the same attributes on babl and GEGL code. So
to be fair, it'd be useless to only forbid using it on GIMP code. And
that makes for much less ugly code.

Note that C11 has _Alignas() and C23 alignas() specifiers. These are
standard, but we are typically still more into C99 code. Let's see if we
move on to C11 some day… But for now, let's use __attribute__.

Also I am unsure how much this issue is still relevant nowadays. Maybe
even without specified alignment, it would now work fine with icc on
IA-64. 🤷
Or maybe it really doesn't matter that much because Itanium has been
discontinued in 2019, though I guess existing hardware will still be
around for a bit longer.
2025-09-15 19:36:29 +02:00
Alx Sa
bc7cc0b698 path: Update SVG tag when exporting paths
Per Martin Owens of Inkscape and Jonathan Watt,
one of the SVG specification editors
(https://jwatt.org/svg/authoring/#doctype-declaration),
we should not export the DTD with the GimpPath SVG.
This patch also adds an explicit SVG version to the
<svg> tag.
2025-09-15 17:28:33 +00:00
Alx Sa
602300ec8e pdb, app, libgimp, libgimpconfig: Stroke/Fill Vector Layer PDB
This patch adds additional API for setting the stroke/fill
properties of vector layers. You can now set/get color, stroke
width and stroke style via the PDB. Pattern get/set API is not
yet implemented.

This patch also updates a missing parameter check for GimpVectorLayer
in gimp_config_param_spec_duplicate (), and adds additional API
in /app to make it easier to safely retrieve GimpVectorLayerOptions.
2025-09-15 14:14:46 +00:00
Sabri Ünal
64e276c3b5 Update Turkish translation 2025-09-15 12:12:02 +00:00
Marco Ciampa
96394377e6 Fix in Italian translation 2025-09-15 09:52:28 +02:00
Juliano de Souza Camargo
a926e013da Update Brazilian Portuguese translation 2025-09-14 13:03:24 +00:00
Kolbjørn Stuestøl
2d74278860 Update Norwegian Nynorsk translation 2025-09-13 17:03:47 +00:00
Kolbjørn Stuestøl
e1e4c0f400 Update Norwegian Nynorsk translation 2025-09-13 16:59:09 +00:00
Bruno Lopes
5fc3c29f5c build/windows: Fix custom build options not being passed to Meson and Cmake 2025-09-13 09:32:37 -03:00
Nathan Follens
de4fb3470c Update Dutch translation 2025-09-12 23:30:17 +00:00
Nathan Follens
ddfce634a8 Update Dutch translation 2025-09-12 23:30:05 +00:00
Bruno Lopes
527f4964fe build/linux: Update ghostscript module to 10.06.0
Synced from: 5ce8488408
2025-09-12 10:59:05 -03:00
Bruno Lopes
be2e47114d build/windows: Forgot '-and' in previous commit 2025-09-12 07:51:36 -03:00
Bruno Lopes
11b81e25a4 build/windows: Only use meson in pure Meson built dependencies 2025-09-12 07:44:26 -03:00
Jehan
4ca05cb38d app: fix crash when json parsing fails.
The argument is already a URI, not a GFile.
2025-09-11 23:31:03 +02:00
Jehan
bb9aad1e87 app: fix crash on invalid previously picked layer.
This happened to our artist in residency. She had a crash when
gimp_image_pick_layer() was apparently run with a non-NULL yet invalid
previously_picked layer. So let's make sure that we clear the stored
item pointer when the object gets finalized.
2025-09-11 23:31:03 +02:00
Bruno Lopes
4dceeb174a libgimp: Only list gio_specific on Glib 2.86 and newer
Since GioUnix-2.0 namespaces were buggy in previous versions
2025-09-11 12:16:34 -03:00
Jehan
9819457f31 meson: add deprecation warnings on GLib and GTK/GDK API usages.
I discover GLIB_VERSION_MIN_REQUIRED and GLIB_VERSION_MAX_ALLOWED. The
former will make so that we won't have deprecation warnings anymore if
ever we use a function which has been deprecated recently (as long as it
was not deprecated at the minimum required version). The latter will
make so that we get deprecation warnings for any function added after
the minimum required version.

Note that ideally both should be at the same version, but since we have
a bunch of GLIB_CHECK_VERSION() protected conditional code, we would get
compilation warnings even on correctly protected code. So just keep the
small discrepancy until we can finally bump our minimum requirement.

Also add the equivalent macros for GTK/GDK.
2025-09-11 16:23:57 +02:00
Jehan
7c947ef1af app, libgimpbase, plug-ins: deprecate GimpPixPipe.
This really feels like internal API which we'd want to keep private (and
used by core plug-ins only).

Also as Jacob noticed, it's not even included in libgimpbase/gimpbase.h
so plug-ins wishing to use this API need to include this file
specifically anyway (but the header is still installed and the API is
introspected).

Since we cannot remove these functions now that GIMP 3 was published,
for API stability, I am only deprecating them both in the C API with
macros and in the bindings with GObject Introspection annotations.
Therefore any third-party plug-in developer trying to use these
functions in a plug-in will get build-time or run-time warnings.

Then when we'll move on to GIMP 4 development, we can remove the
deprecation and simply make this file private-only use instead.
2025-09-11 16:23:57 +02:00
Ekaterine Papava
03beda6e2a Update Georgian translation 2025-09-11 10:56:59 +00:00
Bruno Lopes
a7d867c8bc libgimp: List gio_specific as dependency for .typelib
This is required starting with Glib 2.86.0.
2025-09-11 07:44:38 -03:00
Jehan
6584f92748 NEWS: update. 2025-09-10 18:42:17 +02:00
Kolbjørn Stuestøl
593f0abf09 Update Norwegian Nynorsk translation 2025-09-10 15:22:52 +00:00
Kolbjørn Stuestøl
a734b4a3a4 Update Norwegian Nynorsk translation 2025-09-10 15:21:39 +00:00
Estecka
0fd280db5c Issue #14777: Fix bad axis centering on zoom-out.
This was simply caused by two variables having been swapped.

Gimp 2 used to work properly because there were two separate mix-ups that
cancelled each other: one in the function arguments, and one in the code
itself. Gimp 3 had fixed the error in the arguments, but not in the code,
thus enabling the bug.
2025-09-09 17:44:55 +00:00
Nathan Follens
443d0a2f7b Update Dutch translation 2025-09-09 16:09:04 +00:00
Nathan Follens
ed01c1b7f4 Update Dutch translation 2025-09-09 16:08:54 +00:00
Nathan Follens
904f283932 Update Dutch translation 2025-09-09 16:08:39 +00:00
Bruno Lopes
9026d18039 app: Make possible to append _NT_SYMBOL_PATH 2025-09-09 12:57:46 -03:00
Sabri Ünal
8a5825b66f Update Turkish translation 2025-09-09 14:53:26 +00:00
Cheesequake
71caf7eb05 Issue #13746: change incorrect variable to check for changes in y-axis 2025-09-08 14:41:41 -03:00
Yuri Chornoivan
bf6092c728 Update Ukrainian translation 2025-09-08 14:06:30 +00:00
luming zh
6d74a880f9 Update Chinese (China) translation 2025-09-08 08:59:29 +00:00
Martin
1a953c5c73 Update Slovenian translation 2025-09-08 08:28:52 +00:00
Balázs Meskó
1564efb519 Update Hungarian translation 2025-09-08 06:38:12 +00:00
Alx Sa
3e96397770 dialogs: Add palette format filters to import dialog
GIMP supports importing a number of palette formats
such as Adobe Swatch Exchange and SwatchBooker.
However, this is not immediately apparent from the import
palette dialogue.
This patch adds the currently supported palette formats as
filters in the dialogue, both to let users hide irrelevant files from
view and to highlight which formats we support.
2025-09-08 01:40:41 +00:00
Alx Sa
c8cf2219ce libgimpbase, libgimpwidgets, tools, app: Remove warnings
This patch fixes a few (mostly Windows-specific) warnings on build.
* Hides functions like gimp_get_foreign_window () and variables
like transient_set that aren't used in Windows.
* Changes hollow_g_shell_quote () to not return a const gchar *,
since the value it returns is actually not const.
* Cast update_interval to double to remove warning about mixing
enums and doubles in division.
2025-09-07 18:41:13 +00:00
luming zh
2865aa7f03 Update Chinese (China) translation 2025-09-07 00:30:17 +00:00
Bruno Lopes
013f9c7f0c build/windows: Fix prefixes priority in libraries bundling 2025-09-06 19:46:50 -03:00
Bruno Lopes
8ea6e4031e build/windows: Add support to Cmake builds on self_build function
This can be useful in the future if we need to build some dependency that
does not use Meson (hope we will not need that but anyway)
2025-09-06 18:39:06 -03:00
Bruno Lopes
69359a16c1 build/linux: Update openexr module to 3.4.0 and add openjph module
Synced from: 4318fbbef2
2025-09-06 16:31:38 -03:00
Alx Sa
4d84ac748b Issue #12012: Don't require GUI for C source and HTML export 2025-09-06 19:25:57 +00:00
Bruno Lopes
1dcc8585ef gitlab-ci: Move from unmaintained Kaniko to Buildah
Closes: #14796

There is no other doable option than Buildah. I also tested the
other Kaniko alternatives pointed by GitLab documentation which
were Docker-in-Docker and Buildkit but none worked unprivileged.

Regression: our logs will be a bit more noisy compared to Kaniko.
See: https://github.com/containers/buildah/issues/6362
2025-09-06 16:05:40 -03:00
cheesequake
8a3fb8c08e Issue #14763: Clean new images whether linked layers or not.
Moving the gimp_image_undo_free and gimp_image_clean_all
functions outside the link layer check prevents the image getting
dirty. Hence, closing a new linked layer image without changes
doesn't open a save changes dialog anymore.
2025-09-06 17:33:58 +00:00
Bruno Lopes
4509ec92f5 build/windows: Revert wrongly pushed change 2025-09-06 14:33:52 -03:00
Bruno Lopes
ee43316839 meson: Fix .pdb installation condition on Linux and macOS 2025-09-06 14:17:57 -03:00
Alx Sa
0782b9166b display: Guard private->initial_monitor when NULL
On some systems, it is possible for gimp_image_window_switch_page ()
to be signaled when private->initial_monitor has been set to NULL but
we don't yet have a GtkWindow. This eventually produces a CRITICAL
when gimp_dialog_factory_add_foreign () is run with a NULL monitor.

This patch adds a condition so that gimp_image_window_session_update ()
is not run with a NULL monitor in those cases.
2025-09-06 16:01:07 +00:00
Gabriele Barbero
5a34856e38 core: fix wrong if condition in gimp_drawable_duplicate
Probably a typo: the wrong control variable was used in the if statement.
This caused a segfault when duplicating a drawable if new_filter was NULL.
2025-09-06 17:04:51 +02:00
Bruno Lopes
9ec28cec54 app: Fix stuck debug dialog on Xorg (X11) too 2025-09-06 10:45:04 -03:00
Bruno Lopes
d6d959c6c9 app: Add margin around buttons of gimpcriticaldialog
The dialog was inconsistent. Let's fix that.
2025-09-06 10:42:35 -03:00
Marco Ciampa
83c18ee0f2 Fix of frame term in Italian translation 2025-09-06 14:40:32 +02:00
Marco Ciampa
5a5e0b6fee Little fix in Italian translation 2025-09-06 14:18:56 +02:00
Cristian Secară
acf0920d82 Update Romanian translation 2025-09-06 11:56:07 +00:00
Jehan
58efcf6312 app: fix dropping a dockable above/below the only dock in a dockbook.
There is no bug report that I know of as it was reported directly by
Aryeom. When a dock had only a single dockbook, if we tried to move one
of the dockable to the above or below target areas, it would fail.

The reason is that we were not counting the dockables correctly so the
code thought we were trying to move from a dockbook containing a single
dockable (single tab).
2025-09-06 12:35:52 +02:00
Cristian Secară
e3c8910da7 Update Romanian translation 2025-09-06 09:46:06 +00:00
Alevtina Karashokova
01c1949dd5 Update Russian translation 2025-09-05 11:34:57 +00:00
Alx Sa
599a6c7afe core: Fix Lab & CMYK ACB palette import
Converts the babl formats for Adobe Color Book
Lab and CMYK formats to "float", to prevent a crash
when accessing u8 Lab colors that have negative values
and CMYK colors that are too dark.
2025-09-05 11:02:13 +00:00
Jehan
16bb162894 menus: add specific link layer actions in Layer menu. 2025-09-05 12:44:02 +02:00
Bruno Lopes
65258d6183 build/linux: Update poppler module to 25.09.1 2025-09-04 20:21:08 -03:00
Gabriele Barbero
6e80f98390 plug-ins: use a temporary image to get the buffer...
...with filters during Recompose

Previously, get_buffer_with_filters() inserted and removed a temporary
copy of a layer in the original image. This caused the image to appear
modified, adding entries in the undo history and prompting the user to save
changes, even though the image itself was not actually changed.

This patch modifies the function to create a temporary image and perform
the layer insert operation there. Filters are applied as before,
but the original image remains untouched, avoiding unwanted undo entries
and mark the image as modified.
2025-09-04 20:05:22 +02:00
Yuri Chornoivan
e18eaff1dc Update Ukrainian translation 2025-09-04 16:11:49 +00:00
luming zh
a4c780f6c9 Update Chinese (China) translation 2025-09-04 09:31:58 +00:00
Martin
0665e3fb5c Update Slovenian translation 2025-09-04 08:59:22 +00:00
Ekaterine Papava
9f9bf1003d Update Georgian translation 2025-09-04 07:17:19 +00:00
Ekaterine Papava
8b560f835e Update Georgian translation 2025-09-04 07:01:30 +00:00
Marco Ciampa
2a9eb5aa66 Small fix in Italian translation 2025-09-04 08:43:57 +02:00
Alx Sa
002b22c150 plug-ins: Fix ZDI-CAN-27793
GIMP ILBM File Parsing Stack-based Buffer Overflow
Remote Code Execution Vulnerability

Adds a check to file-iff.c to ensure the palette_size is
between 0 and 256.
2025-09-04 04:45:43 +00:00
luming zh
d27c580144 Update Chinese (China) translation 2025-09-04 02:28:31 +00:00
Bruno Lopes
4738472fcd tools: Drop bashisms on milestones info fetching 2025-09-03 21:13:34 -03:00
Jacob Boerema
4eb106f2bf plug-ins: fix ZDI-CAN-27823
GIMP XWD File Parsing Heap-based Buffer Overflow Remote Code Execution
Vulnerability.

Check offset in colormap is valid before writing to it.

Closes #14814
2025-09-03 18:38:53 -04:00
Alx Sa
53b18653bc plug-ins: Fix ZDI-CAN-27836
ZDI-CAN-27836: GIMP FF File Parsing Integer Overflow
Remote Code Execution Vulnerability

This patch increases the row_size data type to gsize and checks if it
would overflow based on the width given. It also makes sure the image
size does not exceed GIMP's image size limits.
2025-09-03 22:10:34 +00:00
Anders Jonsson
2012eef75c plug-ins: remove doubled word in dicom string 2025-09-03 23:03:07 +02:00
Jacob Boerema
fb31ddf322 plug-ins: fix ZDI-CAN-27878
GIMP WBMP File Parsing Integer Overflow Remote Code Execution
Vulnerability

We recently fixed one instance of not upgrading the size, but forgot
the other. Fix that here by casting to (gsize). While we're at it,
also add a warning, when reading more data fails unexpectedly.

Closes #14812
2025-09-03 15:25:55 -04:00
Jacob Boerema
0f309f9a8d plug-ins: fix dicom plug-in ZDI-CAN-27863
GIMP DCM File Parsing Heap-based Buffer Overflow Remote Code Execution
Vulnerability

This adds more safety checks and sets actual GError's instead of just
calling gimp_quit.

Closes #14811
2025-09-03 13:34:36 -04:00
Jehan
05e90b1cde app: optimize the detection of filters with aux input.
As reported by Liam, apparently for someone with a lot of filters, these
node creations just to check the aux input may add up noticeable time on
boot (it may also depend on the OS too? I didn't have any noticeable
delay personally).

Unfortunately we cannot know the presence of an aux input just with
class introspection because they can be registered by the op at runtime.

This optimization is therefore twofold:

* Since we know which filters have an aux input among all the ones with
  hardcoded actions, we also hardcode this data. It means we only do the
  actual check on non-hardcoded operations (third-party filters but also
  GEGL operations which are not specifically listed in our code).
* I only do these checks once, stored by name in a hash table, because
  filters_actions_setup() is actually run several times (for different
  menus).

This should improve startup time a lot for people who experienced this
delay.
2025-09-03 18:38:16 +02:00
Marco Ciampa
e4cb1e485e Small fix in Italian translation 2025-09-03 17:40:45 +02:00
Jehan
03f7cf58b8 tools: also parse milestone infos automatically. 2025-09-03 16:18:14 +02:00
Alx Sa
5f4329d324 plug-ins: Fix ZDI-CAN-27684
Prevent overflow attack by checking if
output >= max, not just output > max.
2025-09-03 13:41:10 +00:00
lillolollo
1a144f35a6 plug-ins: fix file-exr warning and a possible memory leak 2025-09-03 12:59:39 +00:00
Bruno Lopes
8287302b50 build/linux: Update Poppler to 25.09 and manually disable awful -DENABLE_GPGME
Ported from: a125318890
2025-09-03 09:38:43 -03:00
Marco Ciampa
98dbff1e99 Updated Italian translation 2025-09-02 21:14:26 +02:00
Bruno Lopes
53a1d07ffd tools: Remove last bashisms in new release-stats.sh
'paste' is a bit opaque but at least more portable.
2025-09-02 16:08:53 -03:00
Bruno Lopes
0191e0a485 tools: Drop bashisms on new release-stats.sh versioning evaluation 2025-09-02 15:53:58 -03:00
Anders Jonsson
fc4eb6730c plug-ins: add missing include to fix build 2025-09-02 20:02:01 +02:00
Bruno Lopes
459090836a gitlab-ci: Use 'ref:' on flatpak_ci_initiative.yml for CI safety
Not making use of 'ref:' makes GitLab fetch the latest version of
the *initiative.yml with the latest fixes and such. That would
not be a problem and even desirable maintenance-wise but that
allows GNOME to add anything on our .gitlab-ci.yml at any time.

This is hard to debug and can break our CI. For example,
see: https://gitlab.gnome.org/GNOME/citemplates/-/issues/35.
2025-09-02 14:58:12 -03:00
Jehan
81c844d2ca tools: tweak script so that it outputs statistics in release news format.
Though most of the stats we were pulling came from this, let's format it
exactly how we have done in many latest release news.
Also add automatic stats pulling too of our many side repositories.
2025-09-02 19:08:48 +02:00
Jehan
51ba945eb1 plug-ins: add reminder to obsolete scripts in favor of proper Script-fu plug-ins.
Closure of #10652 made me realize we should probably leave a warning
reminder.
2025-09-02 19:08:48 +02:00
Marco Ciampa
87def70e1e Updated Italian translation 2025-09-02 17:39:32 +02:00
Aleksandr Prokudin
35257782ca Update Russian translation 2025-09-02 02:35:51 +02:00
Balázs Úr
238718b667 Update Hungarian translation 2025-09-01 20:30:02 +00:00
Balázs Úr
95cbadd277 Update Hungarian translation 2025-09-01 14:01:03 +00:00
Athmane MOKRAOUI
88d6dfea04 Update Kabyle translation 2025-09-01 10:52:51 +00:00
luming zh
6b1834ec9e Update Chinese (China) translation 2025-08-31 23:46:06 +00:00
luming zh
10319fc883 Update Chinese (China) translation 2025-08-31 23:41:43 +00:00
Jehan
624f049e66 Post-release version bump to 3.1.5. 2025-09-01 00:35:08 +02:00
Bruno Lopes
0c5e5c0094 build/windows: Remove last remnant of $GIMP_BASE on Installer script
This completes 87101276
2025-08-31 16:22:30 -03:00
Jehan
50978f18b6 Release GIMP 3.1.4. 2025-08-31 19:24:36 +02:00
Bruno Lopes
cb4316d07a gitlab-ci: Always use the Debian image of our Registry
Some jobs were using the Debian image from Docker Hub registry:
- meson-health
- clang-format
- cppcheck
- sources-debian
- dev-docs
- dist-appimage-weekly

The reason was that we don't need a bigger image suited for builds
($CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}), but
it relied entirely on luck. If we push too much commits in a day, it
could surpass the Docker Hub limit. So, let's use our own image always.
2025-08-31 13:28:53 -03:00
Jehan
a530892fb5 desktop: update release date. 2025-08-31 18:05:14 +02:00
Jehan
ad3ec69183 NEWS: update.
Forgotten new libgimp/PDB API.
2025-08-31 17:49:24 +02:00
Jehan
6c1c497ce0 libgimpwidgets: fix build warning.
This fixes the following warning when compiling with CLang:

> libgimpwidgets/gimppropwidgets.c:3961:11: warning: variable 'unit_type' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
>  3961 |       if (pspec_unit && GIMP_IS_PARAM_SPEC_UNIT (pspec_unit))

If a unit property name is set, it must be a valid unit property. Let's
check, output a CRITICAL and return NULL otherwise.
2025-08-31 17:49:24 +02:00
Jehan
b1e52381f5 libgimp*, plug-ins: add and use new GIMP_WARNING_API_BREAK() macro.
This macro will generate a #warning message when we'll move on to 3.99
series (which means we will be on our way to GIMP 4). And it will become
an #error message on 4.0.0, hence preventing us from releasing unless we
actually resolve all these warnings.

Resolution may mean actually breaking the API/ABI, or just deciding that
it's not a good idea in the end, or finding another solution. But
something will have to be decided.

Please everyone use this macro when you discover issues where it looks
like we could improve the API (in a breaking way) so that we don't
forget when approaching GIMP 4 (pushing further the improvement).

Updating the 2 place where I was already using a GIMP_CHECK_VERSION()
with #warning, and adding a new usage in the compose plug-in, per
discussion in MR !2424.
2025-08-31 17:49:24 +02:00
Bruno Lopes
27a89a0c8a build/linux: Update exiv2 module to 0.28.7 2025-08-31 12:50:42 -03:00
Jehan
a636aea98d Issue #14781: Moving link layers freezes GIMP.
Though I can't reproduce on Linux, the performance log seems to show we
spend too much time inside filters_actions_update(). Instead of creating
nodes at each update, let's just store the information about which
filter action has pad, since this should not change within the timespan
of a given session.
2025-08-31 11:56:51 -03:00
Bruno Lopes
62727a654c build/windows: Always run 'pacman -Suy' on 'gimp-win' job
Runners do not remember the MSYS2 repo cache between jobs since
they are not relying on any Docker caching.

The problem is that GIMP could link to different lib versions than
babl and GEGL, but that is the way local shell executors work anyway.
2025-08-31 11:58:09 -03:00
Yuri Chornoivan
2e05a4b1d9 Update Ukrainian translation 2025-08-31 14:41:16 +00:00
Alx Sa
0faa10ddd6 plug-ins: Remove metadata on J2K and PSB export
Exiv2 does not yet support metadata export for PSB
and J2K export. For now, we will turn off the metadata
options when exporting in these formats.
2025-08-31 13:22:28 +00:00
Yuri Chornoivan
d16fe453b6 Update Ukrainian translation 2025-08-31 12:50:56 +00:00
Kolbjørn Stuestøl
e5c04e449e Update Norwegian Nynorsk translation 2025-08-31 12:33:19 +00:00
Bruno Lopes
8a3603828b gimp-data: Bump commit to reduce RAM usage on icon scripts 2025-08-31 08:46:38 -03:00
Martin
4b252bddec Update Slovenian translation 2025-08-31 11:29:34 +00:00
Martin
b42ba20657 Update Slovenian translation 2025-08-31 11:21:00 +00:00
Anders Jonsson
c5ddbf5732 Update Swedish translation 2025-08-31 10:26:13 +00:00
Anders Jonsson
1e5be02d8c Update Swedish translation 2025-08-31 09:43:47 +00:00
Alx Sa
cf9d39c3d7 plug-ins: Fix Recompose for YCbCr decomposed images
The strings used in decompose.c's "decompose-type" do not match
the values of compose_type for YCbCr values. This means that when
using non-interactive Recompose, there's no match and the Recompose
fails. We'll need to wait until the next API break to fix the strings.
For now, we will do additional checks if the normal compose_type check
fails and also compare the four YCbCr types from Decompose.
2025-08-31 01:53:28 +00:00
Jehan
1365b8a08b NEWS: update. 2025-08-30 22:30:57 +02:00
Jehan
51ffd78d2a gimp-data: bump to fix Windows 32-bit build job. 2025-08-30 21:47:46 +02:00
Ondřej Míchal
d985b9b377 app: Align edit tool button with text entry
The button for opening the edit panel for editing a brush / gradient /
pressure curves looks misaligned because it is added to the end of the
horizontal box and its icon is aligned to the end of the button instead
of its center.

This adds puts the text entry and the edit button into the same
horizontal box and fixes the image alignment.
2025-08-30 19:10:02 +00:00
Liam Quin (ankh/demib0y/barefootliam)
760ef381fe fix crash on build or startup if extensions file does not exist 2025-08-30 18:41:03 +00:00
Corentin Noël
19e230e9cb plug-ins: Allow for more specific print settings with portals
In the case the "create-custom-widget" signal is not emitted (typically when
using the print portal), it is necessary to open a second dialog to fine-tune
the print settings.
2025-08-30 15:41:49 +00:00
Bruno Lopes
04622852fa build/linux: Update exiv2 module to 0.28.6
Ported from 91e327ab7a
2025-08-30 10:28:51 -03:00
Bruno Lopes
2f6b75913b Issue #14461: build/linux: Patch mypaint-brushes module with 'gridmap'
Alex's patch from https://github.com/mypaint/mypaint-brushes/pull/7

Since mypaint project is long time gone, we need to patch ourserves.
2025-08-30 10:25:03 -03:00
Jehan
883498916a desktop: update release date. 2025-08-30 14:01:22 +02:00
Jehan
8e2a0381d7 app: generalize code for filter action sensitivity.
Remove most of the per-action special-casing. This won't scale, and in
fact it already doesn't work well with all generated actions from GEGL
operations. Considering that any third-party operation will generate an
action too, this just can't work.

Instead we know that:

- Filters on group, vector and link layers must always be run
  non-destructively.
- Non-interactive filters are always run destructively and therefore
  cannot be run on group, vector or link layers.
- GEGL graph as well, unless a specific environment is set.
- All operations with auxiliary inputs cannot be run non-destructively
  (yet) either and therefore must also be deactivated on these layer
  types.

A few more actions are still special-cased (in particular regarding
being used on grayscale drawable or on formats with an alpha channel),
though it would be nice if we could generalize these somehow eventually
too.
2025-08-30 13:58:02 +02:00
Jehan
c732dfd4ca gimp-data: new splash image. 2025-08-30 13:00:18 +02:00
Jehan
38c379cd92 app: properly forbid paint tools to draw on link layers and forbid…
… filter tools to merge filters, both on link and vector layers.
2025-08-30 10:12:17 +02:00
Jehan
9a780bc7d4 app: missing break!
Argh! This got broken in commit 6e91826865.
2025-08-30 09:46:06 +02:00
Jehan
db18d739e5 app: cleanly downgrade link layers with NULL links.
This will be a bit more robust to potentially invalid files with a NULL
link.
2025-08-30 09:42:15 +02:00
Jehan
2c44689fe2 app, po: localize various strings which were blocked by string freeze. 2025-08-30 09:15:28 +02:00
Bruno Lopes
cc4821ffcb build/windows: Make $store_changelog handle <li demo=""> 2025-08-29 09:05:59 -03:00
Jehan
35b972c854 app, desktop: update demo tour for vector layers. 2025-08-29 13:15:24 +02:00
Asier Saratsua Garmendia
2a3d54bee9 Update Basque translation 2025-08-29 09:15:18 +00:00
Asier Saratsua Garmendia
c0d2a7fadd Update Basque translation 2025-08-29 08:47:23 +00:00
Asier Saratsua Garmendia
a5aaed7929 Update Basque translation 2025-08-29 08:22:22 +00:00
Jehan
4ed035affd gimp-data: bump to fix building with old librsvg (#14544). 2025-08-28 23:33:49 +02:00
Jehan
44d90a389e NEWS: update. 2025-08-28 23:20:44 +02:00
Jehan
4f3aee5e83 Issue #14759: link layers (of vector files) initial dimensions will fill…
… the whole canvas while keeping aspect ratio of the source image.

The previous dimensions were not entirely "out of the blue" since they
were taken from the file, but very often dimensions from vector images
are kinda bogus (apart from aspect ratio, they don't mean much) anyway.

Now we will just fill the canvas box by default.

When changing the source file of an existing link layer though (through
Link Layer properties), the dimensions will be within the current layer
bounding box.

Also I realized that we need to also store the link width/height in the
XCF because the buffer width/height may not be right (in case a
transform matrix was applied). This commit therefore breaks XCF file
with link layers made in the last 2 days. Since we have not made even a
dev release, it's probably fine to do this and not bump the XCF version.
2025-08-28 23:13:03 +02:00
Jehan
9519901150 libgimp, plug-ins: implement loading SVG breaking aspect ratio.
Previous implementation was always keeping ratio. If the width/height
argument were of a different aspect, librsvg simply fits the image with
original aspect within the box. Now we will appropriately scale
differently on both dimensions to have the image fill the whole box.

Note that this doesn't work with librsvg before 2.46.0 (not that it's
not possible, just that I haven't looked at how it should be implemented
there (which would be a different implementation anyway since there is
no cairo step).

Finally I add a build warning for when we'll prepare for GIMP 4, as the
pixel density arg needs to be split in 2 (each dimension can have its
own PPI), even though this is not really needed right now.
2025-08-28 23:13:03 +02:00
Jehan
d8712a525b plug-ins: fix compilation with librsvg < 2.46.0.
Note that it's not actually tested with an old librsvg, but only forcing
this code path with a new librsvg and fixing the compilation
errors/warnings which are outputted.
2025-08-28 23:13:03 +02:00
Jacob Boerema
640fb89f13 libgimpbase: improve parasite API documentation 2025-08-28 16:00:56 -04:00
Jacob Boerema
24ca35625b app: add "..." to Fill/Stroke command
Since it opens a dialog it should have ... at the end
2025-08-28 13:18:32 -04:00
Jacob Boerema
769b911018 app: add help ids for vector layer commands 2025-08-28 13:17:16 -04:00
Jacob Boerema
84b450b7bd app: Give Open as Link Layer it's own help id
Each menu command should have its own help id, so we define a new
help id for opening a link layer.
2025-08-28 12:18:05 -04:00
Bruno Lopes
4ec1368af9 build/linux: Remove 'x-checker-data' while not on stable Ghostscript
Following faf0fd74
2025-08-28 12:16:14 -03:00
Alx Sa
520aeacd8c widgets: Follow theme mode on Critical Dialog (Win)
Following the improvement in fe4cbb65, the Critical Dialogue
uses the native titlebar in Windows. This means it no longer
adapts to dark and light mode automatically.
Since we don't want GimpCriticalDialog to be dependent on
internal GIMP code, this patch copies over the fallback code
in gimp_window_set_title_bar_theme () (which sets the title bar
based on the background color) when the dialogue is realized.
2025-08-28 03:50:21 +00:00
Bruno Lopes
0fb3c8bb67 gimp-data: Bump commit again to drop UNIX-only EX_SOFTWARE 2025-08-27 22:01:38 -03:00
Bruno Lopes
1f0f8d1a2c gimp-data: Bump gimp-data to reduce stuckness on Windows 2025-08-27 21:46:59 -03:00
Bruno Lopes
be667ac007 app/core: Declare libarchive dependency introduced by 6597dabe
Otherwise, the '-I' param will not be set and Apple Clang will
fail on exotic environments like Homebrew on
which not everything is in the common 'includedir'.
2025-08-27 16:38:10 -03:00
Jehan
16a1283f07 Issue #14758: link layers resize can not be undone. 2025-08-27 19:36:02 +02:00
Jehan
1f79e4314e Issue #14760: fix wrong offset when scaling a link layer.
This commit also makes the scaling detection a bit more forgiving to
"imperfect" scale matrix by using an epsilon low enough that it probably
won't make much of a big difference, transform-wise, while it would make
a big difference quality-wise.
2025-08-27 19:35:56 +02:00
Jacob Boerema
55627934c5 plug-ins: add more file plug-in loading tests
Adds a few tga, j2k, wbmp and wmf tests.
2025-08-27 11:11:32 -04:00
Alx Sa
61c67d012b plug-ins: Fix CRITICALs and GUI issues in file-ps
Resolves #14761 (and other issues)
* Clears out the selection on GimpPageSelector on load so
that it does not try to "redraw" areas when the dialogue is closed
* Fixes layout on load dialogue to better match 2.10 (and use less
vertical space)
* Now that we have a unit property, replace the call to
gimp_label_string_widget_get_widget () with a direct connection to
changes in the config's "unit". This both fixes a CRITICAL caused by
setting a signal on a non-existent object, and restores the function
that adjusts the dimensions when the unit is changed from inches to
millimeters and back.
2025-08-27 13:02:59 +00:00
Ondřej Míchal
faf0fd7401 build/linux: Re-add ghostscript using a new release candidate
This is not a full new release but we might as well test the new
release-candidate to see if it fixes the build issues with GCC 15.

Partially reverts 4ae861f5ac
2025-08-27 09:39:49 -03:00
Gabriele Barbero
eeeaca928b tools: implement shortcuts in text tool...
...for toggle bold/italic/underline.

This commit adds support for common formatting shortcuts in the Text Tool:
- Ctrl+B: Toggle bold
- Ctrl+I: Toggle italic
- Ctrl+U: Toggle underline
2025-08-27 11:21:51 +00:00
Jehan
73979309ab po: add new localized source files.
Thanks to Anders for reminding me!
2025-08-27 11:34:04 +02:00
Jehan
97bf7e1bfa app: rework load/save of link layers.
- We now bump to XCF version 25 since vector layers were implemented in
  XCF 24.
- Fix some now broken code in saving/loading, also rename
  PROP_LINK_LAYER_DATA to simply PROP_LINK_LAYER and use the generic
  gimp_layer_from_layer() which I created in commit afb8867bce and is
  also used for text and vector layers.
- Add a PROP_TRANSFORM layer property. It is separate from
  PROP_LINK_LAYER because I will likely reuse this for other (all even)
  types of layers as well.
2025-08-27 11:34:04 +02:00
Jehan
95f1d768c3 app: link layers must still have a converted buffer.
Otherwise we may end up with discrepancy such as layers having a u8
buffer on a u16 image.
2025-08-27 11:34:04 +02:00
Jehan
66cdecb0fa app, menus, pdb: new file-open-as-link-layers action.
Revert the logic of opening all files as link layers back into loading
their current content as normal layers.
Instead just add a new action dedicated to open images as link layers
and add it to the File menu.

Per UX discussions with Aryeom.
2025-08-27 11:34:04 +02:00
Jehan
8280058c5a app: properly reapply the transform matrix after link layer source updated.
Also make sure that a link layer duplicate shows the proper contents
too!
2025-08-27 11:34:04 +02:00
Jehan
2821dbab58 app: add generic support for less destructive transform tools.
This commit will make all transform tools run on a link layer cumulate
their transform matrix on top of the previous transform steps. It means
that as long as you don't edit the pixels another way (e.g. with a paint
tool), all your transformations will apply as a single transformation.

For instance it means that applying several transform tool steps on a
monitored link layer will be less destructive than applying the exact
same transformations on the exact same "normal" layer contents.
Even scaling an image to 1x1 then back to a big size will work very
fine!

Note nevertheless the following limitations in current implementation:

* The link layer with transformations will still show as a standard link
  layer. Nothing says it has transformation applied on it right now.
* To drop transformations applied on a link layer, you have to discard
  the link info, then monitor the link again. A specific action in the
  contextual menu could be worth it.
* This should work with all transform tools (scale, rotation, unified,
  perspective, 3D, even Warp…) but it won't work for the Flip tool, nor
  will it work for the Transform actions. I will need to implement
  GimpItem's rotate(), flip() and resize() methods next.
* The layer mask would still be destructively transformed (I have not
  made any tests with layer masks yet, but this should be done next
  too).
* I think that the "scaled-only" property is now meaningless. It is now
  being replaced by the presence of the GimpMatrix3. Nevertheless I have
  still not removed this property.
* The load/save code has not been redone yet to include all these
  changes.

The kind of caveats we'd have to know about (and which are not planned
for change, because it's just how it is):

* Any intermediate interpolation methods are dropped when cumulating
  transform steps. Only the last interpolation is stored. This is
  because anyway the interpolation is only there as the best algorithm
  where we visually see the less quality loss. Applying several
  transformations as a single matrix will always be visually better than
  applying several matrices (whatever the intermediate interpolation
  methods chosen).
* This only works with the "Adjust" clipping method (basically no
  clipping) because 2 transform steps with clipping won't produce the
  same result as the multiplied matrix with clipping. It means that
  applying a transform with clipping will downgrade your link layer to
  being a normal layer.
  The only issue I have with this is how to best convey that clipping is
  a major setting setting here, which disables our less-destructive
  abilities. Right now, people will just have to "know" it.
* Vector link layers in particular will have 2 levels of
  non/less-destructivity transforms. In particular any scaling (both
  through "Scale Image", "Scale Layers" and transform tools — since I
  added code to detect a matrix doing only scaling and optionally
  translation) done **first** will be completely non-destructive since
  we will simply reload the original vector source at the right
  dimensions. Any other kind of transforms will be appended through the
  cumulative matrix, as raster link layers. This also includes scaling
  done **after** other transforms, since we cannot easily move the
  scaling first (matrix multiplication is not commutative). This second
  level of scaling will therefore be *less* destructive, but still
  destructive.
  It is possible eventually to improve the whole thing if we add some
  day the ability to request loading a vector image with a transform
  matrix (it will then be up to each vector format plug-in to support
  this feature or not).

Note: it could be argued that this whole implementation could in fact be
moved over to base layers, since it would allow also less-destructivity
when applying multiple transformations in a row. We would only merge
results once we edit pixels more directly.
But I think that it's not a bad idea to experiment with this new code in
the link layer. Eventually I may likely move this to the parent
GimpLayer if no blocking issues are found.
2025-08-27 11:34:04 +02:00
Jehan
7c7587bb2d app: replace #ifndef/#define macros by #pragma once. 2025-08-27 11:34:04 +02:00
Jehan
3e5fce27cb app: move logic to know if a link layer is being monitored to GimpLink.
Instead of keeping a "modified" property in GimpLinkLayer, we just check
if the link is being monitored. It's also a better wording because we
may "discard the link information" without actually modifying the layer
pixels.

Also I now actually shut down the file monitoring process. This can be a
bit expensive so when we don't need it, let's really free the
GFileMonitor.

This commit also fixes scaling of link layer (which got broken along the
way) and improves the undo code.

Note: I'll probably want to modify the XCF flags, but let's do this in
the end, depending on further changes too.
2025-08-27 11:34:04 +02:00
Jehan
4128c789f9 app: more efficient GimpLink rendering.
We now re-render a link (by loading its file) immediately upon setting
the new file, i.e. during the calls of gimp_link_new() or
gimp_link_set_file(). As part of this change:

* A GimpLink now stores a GeglBuffer. And this is changed each time a
  file change happens (per the GFileMonitor). In particular that also
  means that gimp_link_get_buffer() does not reload the image file at
  each call for no reasons, and gimp_link_is_broken() does not have a
  `recheck` argument either. This is much more efficient.
* These 2 functions also have a GimpProgress and GError now. We use this
  among other things to pass on a specific GimpProgress object. In
  particular, the image file dialogs now show correct loading
  progression again.
* As a general rule, the code is less confusing as we don't have to
  wonder whether a GimpLink is ready. We can assume it always is, from
  now on.

Note that gimp_link_duplicate() does not trigger a reload of the image
file. Since we assume that the source GimpLink is supposed to be
up-to-date already, we just copy its buffer as-is as an optimization.
2025-08-27 11:34:04 +02:00
Jehan
0b8397ff56 app: "Discard Links" and undo should trigger thumbnail update.
Even if no actual drawable change may have happen, let's manually
trigger an "update" signal, hence triggering thumbnail updates too, but
also contextual menu update in the Layers dockable.
2025-08-27 11:34:04 +02:00
Jehan
9b0f426fbd app: all images (except remote files, XCF and compressed XCF) opened as links.
This is still mostly a test of workflow. It is based on the idea that
link layers are normal yet enhanced layers: eventually we should be able
to have some improved less-destructive scaling/rotation (even without
NDE transform effects); you can manually drop the link anytime anyway
(hence getting back to the good old fully destructive workflow); any
pixel editing automatically drops the link too.

Now this still raises quite a lot of questions:

* The link can be confusing to people used to the old way and they may
  not realize that editing the original file separately would also
  update the render in this file (which may not be what they wanted;
  maybe they just wanted to grab a snapshot of this file at a given
  time).
* You could also want to link XCF files.
* You could also want to link remote files (especially in a controlled
  network environment).
* Linked images are currently taken as a whole; we definitely want layer
  support to handle multi-layer image formats (so that you could link
  only a single layer, or a collection of layers; do we want to be able
  to edit visibility of linked layers separately too? Would be neat). So
  how would we handle automatic linking when opening a file? Maybe we
  just reproduce the layer structure as link layers (one link layer
  monitoring only one layer from the linked file)?

Anyway this is work-in-progress, UX-wise.
2025-08-27 11:34:04 +02:00
Jehan
674939e225 app, libgimpbase, pdb: rework layer dialog.
This commit changes the following:

- It's now possible to set whether to store an absolute or relative path
  when editing link layer properties.
- New layer dialog doesn't propose an "Image link" fill type anymore.
  Link layers won't be created this way (see in a future commit).
2025-08-27 11:34:04 +02:00
Jehan
a60487aedd app: link layers can now be stored with relative or absolute paths.
By default, we set them as relative paths. This seems like the more
practical and allows for relocatable folders when one work with project
folders containing all their assets.

We don't have yet a way to set this to being absolute path, but it will
come in a further commit.
2025-08-27 11:34:04 +02:00
Jehan
2dac66d979 app: fix gimp_link_layer_duplicate() for modified link layers. 2025-08-27 11:34:04 +02:00
Jehan
f4a2158458 app: scale linked raster images back from source file.
Unless other types of edits have been done on a link layer (e.g.
painting), we avoid quality loss by multiple scaling of raster link
layers by always re-scaling from the source file.
2025-08-27 11:34:04 +02:00
Jehan
28bf061f4d app: properly handle vector images as link layers.
This commit was edited after GIMP 3.0, now that we have dedicated
support for loading vector images with GimpVectorLoadProcedure.

- By default, when loaded as GimpLinkLayer, vector images are loaded at
  a size so that they are exactly contained in the image.
- When scaled with Scale Layer dialog, link layers of type vector are
  re-loaded from the source file to always stay perfectly crisp.
2025-08-27 11:34:03 +02:00
Jehan
0b5aa01bb9 app: more rebasing after GIMP 3.0 release. 2025-08-27 11:34:03 +02:00
Jehan
f45244f991 app: fix branch after rebasing.
return_if_no_layer() doesn't exist anymore. The 2 layers actions are now
multi-layer aware.
2025-08-27 11:34:03 +02:00
Jehan
39185d43ba app: GimpLink should emit "changed" signal idly.
Even though G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT should normally
happen when we are *probably* at the last change of a set of changes,
the keyword is clearly *probably* as I had 5 or 6 of these events when
saving a single image.

There is no need for our link layer to reload a same image that many
times in under a second. Instead, just emit our "changed" signal in an
idly source to avoid uselessly duplicating events.
2025-08-27 11:34:03 +02:00
Jehan
6c86e80019 app: port branch to meson. 2025-08-27 11:34:03 +02:00
Jehan
3e6fed839a app: salvage link layers of dimension 0.
Similar to commit 06be074650, but now for
link layers. Their dimension are also determined by their contents so
anyway let's be more resistant from some forms of file corruption.
2025-08-27 11:34:03 +02:00
Jehan
6e91826865 app: add saving/loading of link layers. 2025-08-27 11:34:03 +02:00
Jehan
20083bcabe app: new link layers.
These are layers who content depends on another source (right now only
an external image). This can be useful when for instance working at
several people on a single artwork, hence being able to load new
versions of an image without even touching anything in the XCF (for
instance, say you draw an animated character while someone else is
taking care of the background).

Similarly to what we do for text layers, once you start modifying the
contents, it turns into a "normal" layer. The link information is still
available though, so it is possible to revert to the monitoring state
with the menu item "Monitor Linked Image" which appear when a link layer
became a normal layer.

This is not finale as I'm still experimenting. In particular, I have not
implemented XCF saving/loading yet for this new layer type.
2025-08-27 11:34:03 +02:00
Jehan
ac63b1d8fb app: new GimpLink object.
A GimpLink is just a class monitoring an image file and sending a
"changed" signal when it changes. This will be used to implement link
layers, whose contents is based on an external file.
This is only a simple first version. Future versions may also allow to
monitor specific layers in an image file, or a layer in the same XCF
image which you'd want to link instead of duplicating it.
2025-08-27 11:34:03 +02:00
Asier Saratsua Garmendia
d1dca0a881 Update Basque translation 2025-08-27 08:00:58 +00:00
Asier Sarasua Garmendia
8a771a2a51 Update Basque translation 2025-08-27 07:54:51 +00:00
Ondřej Míchal
33f6117539 plug-ins/filter-browser: Remove Pippins's copyright
This note was relevant when the plug-in used GEGL code for collecting
available GEGL operations. This is no longer the case and thus the
copyright can be dropped.
2025-08-26 23:50:37 +00:00
Jehan
b80a2341cf NEWS: update. 2025-08-27 00:07:12 +02:00
Cristian Secară
3ad4b063b0 Update Romanian translation 2025-08-26 18:40:05 +00:00
Ekaterine Papava
de2b54faa6 Update Georgian translation 2025-08-24 11:49:21 +00:00
Alx Sa
30d31ac709 widgets: Auto-update fill/stroke editor colors
When creating a GimpFillEditor or GimpStrokeEditor with
edit-context == TRUE, a color button is created next to the
foreground/background option. However, the color of the
item associated with the button doesn't change until the
user confirms it in the corresponding dialogue. This prevents
"live-previewing" color changes on vector layers or text outlines.

This patch adds a call to gimp_color_button_set_update () when the
color buttons are created in GimpFillEditor (which GimpStrokeEditor
inherits from). This allows live-previewing on vector layer fill/stroke
and text outlines, as we currently support with text color from the
tool options.
2025-08-23 16:23:50 +00:00
Bruno Lopes
5d308e9ed9 build/windows: Explain the purpose of the bundling script 2025-08-22 21:28:52 -03:00
Bruno Lopes
e52b49e0a3 build/windows: Prevent *bundle*sym.py script from being called outside Meson 2025-08-22 20:50:15 -03:00
Bruno Lopes
565804f26e meson: Complete fae39c79 regarding bug_report_url placement 2025-08-22 20:00:18 -03:00
Bruno Lopes
c734c0f33f build/linux: Make bund_usr function more robust on AppImage script 2025-08-22 19:55:31 -03:00
Jacob Boerema
1a96fb55f9 libgimp: Modernize setting "Exif.Image.DateTime"
by using g_date_time_format, and additionally also set the timezone
(even though using that is less common in Exif, it can't hurt for us
to add it).
2025-08-22 15:16:49 -04:00
Jacob Boerema
922e409045 libgimp: fix XMP modification date separators
Similar to issue #14731, when exporting we incorrectly set
the date/month/year separators to : instead of -.

This commit fixes that.
2025-08-22 15:14:20 -04:00
Jacob Boerema
3211ab1408 libgimp: fix #14644 Wrong comment synchronized with metadata
On export, when synchronizing the comment with the metadata equivalents,
we did not consider that the comment could have been changed in the
export dialog comment field. In fact, we already updated the metadata
before that happened in gimp_image_metadata_save_prepare.

To fix that
- We remove it from the above mentioned function, since that is too
early.
- Add the (possibly) updated comment to the exported_image as a
comment parasite so that we can access the updated value, but only
when synchronizing metadata is allowed, and saving comments is enabled.
- Synchronize the comment, taken from the parasite, with its metadata
counterparts in gimp_image_metadata_save_filter, but only when
synchronizing is allowed and saving comments is enabled.

Note that due to this the synchronized metadata comments are only
visible in the exported file. The metadata in the opened image is
not updated.
2025-08-22 15:12:23 -04:00
Alx Sa
2c91604509 pdb, libgimp: Add PDB get/set for fade-length and fade-repeat
This patch adds PDB functions to get and set the PaintOptions
fade-length and fade-repeat properties. This settings can be
used together with gimp_context_set_emulate_brush_dynamics ()
to further control how the paint strokes are drawn in a script
or plug-in.
2025-08-22 17:43:40 +00:00
Jacob Boerema
f02910d00f libgimpbase: fix #14731 incorrect day/month separators in XMP metadata
In 6b10cce6 I introduced setting created date/time metadata for new
images. However, I made a mistake there by using : instead of - between
year, month and day for the XMP metadata tags.

This commit fixes that.
2025-08-22 12:31:48 -04:00
Bruno Lopes
2346acbfc2 devel-docs: Add macOS versioning instructions too
And a bit of space because the file was getting hard to read
2025-08-22 10:12:08 -03:00
Bruno Lopes
7764eab3f6 devel-docs: Mention min-support key of content/gimp_versions.json 2025-08-22 09:55:52 -03:00
Bruno Lopes
ca43c6f20c build/windows: Make "etc\ssl\" part of Python component on Installer 2025-08-22 09:47:48 -03:00
Bruno Lopes
05cde48a3e build/linux: 'xdg-email' works on Snap package 2025-08-22 09:38:04 -03:00
Asier Saratsua Garmendia
4bf7ed4265 Update Basque translation 2025-08-22 05:48:50 +00:00
Asier Saratsua Garmendia
0aa7af0f11 Update Basque translation 2025-08-22 05:43:22 +00:00
Ekaterine Papava
d2beafd0e9 Update Georgian translation 2025-08-22 04:00:52 +00:00
Luming Zh
fa683ca0ce Update Chinese (China) translation 2025-08-22 01:17:25 +00:00
Luming Zh
4fa0a63ca4 Update Chinese (China) translation 2025-08-22 01:05:56 +00:00
Bruno Lopes
d2720dca0c Issue #14722: Bundle cert.pem for internet connection on Python
Closes #14722

Python internal/standard libraries like 'urllib' (present on all
packages we distribute like AppImage and DMG) requires that.
2025-08-21 19:28:54 -03:00
Martin
d72bc4704e Update Slovenian translation 2025-08-21 19:18:40 +00:00
Yuri Chornoivan
eb30705545 Update Ukrainian translation 2025-08-21 18:50:37 +00:00
Bruno Lopes
807e263b87 gimp-data: Bump commit 2025-08-21 14:52:09 -03:00
Bruno Lopes
fae39c792d meson: Move '-Dbug-report-url' message to more visible place
The reasioning is at: 137bf019
2025-08-21 12:15:26 -03:00
Bruno Lopes
3290dd9b8f Revert "meson: Move '-Dbug-report-url' message to the bottom to be more visible"
This reverts commit 137bf01928 pushed by
accident.
2025-08-21 12:11:38 -03:00
Bruno Lopes
137bf01928 meson: Move '-Dbug-report-url' message to the bottom to be more visible
While I checked that all the "main" downstreamers make use of it
(ArchLinux, Fedora, Ubuntu, Debian, Ubuntu, MSYS2, macports),
it is so hidden that we can't guarantee anyone will
actually see it in the future in the middle of many lines.
2025-08-21 12:07:05 -03:00
Bruno Lopes
8f895aaa8c gitlab-ci, devel-docs: Add instructions on maintaining DEB_VERSION 2025-08-21 11:52:38 -03:00
Bruno Lopes
b4952addb9 gitlab-ci: Do not generate developer docs on AppImage
We already do not build them on Flatpak and Snap, since
the debian-nonreloc job is enough to test that on Linux.
2025-08-21 11:28:40 -03:00
Bruno Lopes
5856941814 meson: Fix false positive in xdg-email check
And do not output a warning since it is never avaiable on Windows.
2025-08-21 11:25:52 -03:00
Bruno Lopes
1e5639a47d meson: Drop arbitrary libsocket check introduced since Meson port
It is present since 2.99.2 tag but nothing makes use of 'HAVE_LIBSOCKET'.
2025-08-21 09:07:15 -03:00
Bruno Lopes
e8b6f05659 gitlab-ci: Remove redundancy on Store job rules 2025-08-21 07:42:03 -03:00
Michael Natterer
6eaf357af9 app: make GimpViewRenderer::border_type and ::border_color private 2025-08-21 08:15:42 +02:00
Bruno Lopes
da16988ee0 build/windows: Fix 'ARM64' typo in TWAIN defines of Installer script 2025-08-20 16:56:08 -03:00
Bruno Lopes
f9809354d5 Issue #14716: app: Set PATH to prevent DLL Hell on Windows
Closes: #14716

This ports the macOS trick to avoid loading binaries from the host.

SetDllDirectory (and its modern counterpart AddDllDirectory) are
not enough since we do not have control about all processes.
2025-08-20 16:51:21 -03:00
Bruno Lopes
ad03d6c94a build/linux: Update imath module to 3.2.1 2025-08-20 14:22:54 -03:00
Bruno Lopes
f6704a84fa build/linux: Remove dangling .patch files after org.gimp.GIMP.HEIC drop
x265 is not being built anymore since eefc2bea
2025-08-20 14:21:20 -03:00
Anders Jonsson
5c35946c51 plug-ins: make filter browser labels translatable 2025-08-20 14:47:24 +02:00
Bruno Lopes
6245e4ee70 .gitlab: Add comment telling how to generate packages on MRs 2025-08-20 09:24:49 -03:00
Bruno Lopes
0c6d7c15bc build/windows: Reorganize MSIX script messages to be consistent with Installer 2025-08-20 07:07:37 -03:00
Michael Natterer
0d7cea41ad app: remove gimp_view_renderer_set_border_color(). Instead, add values
STYLE_FG and STYLE_BG to enum GimpViewBorderType, where FG uses the
actual style FG, and BG is simply transparent. Default to STYLE_FG
instead of BLACK (which is BLACK's actual intention).  Also, don't
leak all GeglColors of all view renderers.
2025-08-20 10:18:39 +02:00
Jordi Mas
c63d7bc226 Fixes to Catalan translation 2025-08-20 04:41:42 +02:00
Bruno Lopes
3d14a2652d gitlab-ci: Drop -x86 suffix on Installer jobs in favor of -eol
This fixes the redundancy with [win32-ps, mingw32].
2025-08-19 20:22:06 -03:00
Bruno Lopes
8993939008 gitlab-ci: Make possible to create .exe installer and .msix outside GNOME/gimp
This fixes the windows-aarch64 runner blocking contributors (not devs) CI on,
for example, MRs. Now, a x64-only artifact can be created in such cases.
2025-08-19 19:17:50 -03:00
Nathan Follens
3c85dfe6e9 Update Dutch translation 2025-08-19 17:52:06 +00:00
Martin
96be4a79d3 Update Slovenian translation 2025-08-19 17:34:01 +00:00
Kolbjørn Stuestøl
381bee5dbb Update Norwegian Nynorsk translation 2025-08-19 17:00:16 +00:00
Kolbjørn Stuestøl
0f12dcc772 Update Norwegian Nynorsk translation 2025-08-19 16:45:43 +00:00
Yuri Chornoivan
293300cafd Update Ukrainian translation 2025-08-19 15:49:02 +00:00
Yuri Chornoivan
898ab7c9c6 Update Ukrainian translation 2025-08-19 15:41:02 +00:00
Bruno Lopes
f3a8e0c041 gitlab-ci: Explain why sources and dev-docs are not run in MRs 2025-08-19 11:00:29 -03:00
Bruno Lopes
2b779c6a11 gitlab-ci: Simplify a bit environment variables on Dockerfile
We aren't using them from ENVIRON so that is no need to replicate.
2025-08-19 10:38:12 -03:00
Bruno Lopes
735ae9f123 gitlab-ci: Set WORKDIR on debian jobs Dockerfile 2025-08-19 10:24:40 -03:00
Michael Natterer
09203bb93e app: rename GIMP_VIEW_BG_USE_STYLE to GIMP_VIEW_BG_STYLE 2025-08-19 15:19:23 +02:00
Bruno Lopes
1d5a1c9972 gitlab-ci: Remove some dangling GIMP_CI_* variables
They are never used, specially (by redundancy) the ones
of jobs which are already triggered on commits.
2025-08-19 09:57:33 -03:00
Michael Natterer
fb04b7cb8f app: get rid of GimpViewRenderer's separate "icon_surface", and get
rid of implicit knowledge about the surface's scale factor.

- render everything to renderer->surface
- pass the widget scale factor around explicitely when rendering
  to the surface
- when drawing the surface to the widget, get the scale factor from
  the surface itself.
2025-08-19 14:35:58 +02:00
Bruno Lopes
6fe919c6e2 gitlab-ci: Drop debian -x64 suffix on non-Appimage jobs in favor of -nonreloc
It is a bit too long and not the ideal naming but with the new one we avoid
the -x64 arch suffix which feels redundant due to the [x86_64_v3] added by GL
2025-08-19 08:53:30 -03:00
Bruno Lopes
1c7a43a021 gitlab-ci: Drop WORKSHOP_OPTION var in unstable series
It was introduced in 74a05bc9 but we are not stable anymore
2025-08-19 08:18:17 -03:00
Alx Sa
4b67eb9cd0 paths, tools: Prevent CRITICAL when discarding empty vector layer
Resolves #14705
The path tool prevents creating a vector layer from an empty path.
However, the menu option "Path to Vector Layers" does not have this check.
This patch updates the check to constrain it to just one path.
Additionally, it adds a check for the path being NULL before trying to use
it in g_set_object ().
2025-08-19 00:10:22 -04:00
Bruno Lopes
baa5e0690e build/windows: Little improvement to config_clean.h comment 2025-08-18 19:47:00 -03:00
Bruno Lopes
ffa2946b18 build/windows: Change $a64_bundle to $arm64_bundle on MSIX script
This new naming is consistent with the Installer script.
2025-08-18 19:41:07 -03:00
Bruno Lopes
8710127641 build/windows: Add optional one-arch support to Windows installer
This removes the old custom DIR/DDIR code from the era of the
installer was built locally. Now, it will refer to bundles so
making the .exe installer based on the bundles available,
not enforcing the developer to download all bundles anymore.

We will not use such new facility on CI since we distribute an
universal installer with all arches since 2.8 for good reasons.
This will not change, we will continue to create multi-arch .exe.

The main advantage is locally. Now the .iss script can
recognize at ISCC build time the bundles on the machine,
to create, for example, an one-arch installer. This is very
fast and practival for local hacking the installer scripts.

Of course, this also makes the installer script powerful and
consistent with all other dist scripts which already can do
one-arch packages (appimage, flatpak, snap and msix).
2025-08-18 16:54:19 -03:00
Bruno Lopes
cfb1b539f2 build/windows: Organize tookit section of Installer script to be consistent 2025-08-18 16:53:08 -03:00
Anders Jonsson
11b35908fa app: add missing context to make translations be used
gimp_action_group_add_actions has a loop that expected all strings
to have a context since msg_context was set. Without a context
the original string was used.
2025-08-18 20:56:57 +02:00
Bruno Lopes
6ddb33135c build/windows: Add comment about parity with MSIX on Installer scripts 2025-08-18 15:44:00 -03:00
Bruno Lopes
125e355c44 build/windows, devel-docs: The minimum Windows version is actually 10.0.18362.0
DWMWA_USE_IMMERSIVE_DARK_MODE and activeCodePage were introduced on "1903"
The Store version manifest was already using this as minimum version since
day 1, so the commit just extends that minimum version to the Installer.

While is unlikely that users will be affected, we can revert this commit if:
1) LTSC/LTSB users report on tracker that is not possible to install GIMP;
2) we confirm that GIMP works on this machine even with that incompatible API.
2025-08-18 15:10:27 -03:00
Aleksandr Prokudin
edc6f5a4b1 Update Russian translation 2025-08-18 19:37:41 +02:00
Bruno Lopes
246d73de04 build/windows: Drop absurd custom translation of WindowsVersionNotSupported
This have nothing to do with the OS build version but mostly with the
OS arch. Yeah, the original Inno string is obscure but at least not false.
2025-08-18 14:13:44 -03:00
Michael Natterer
c2195a24ca app: redo preview backgrounds completely
While there is a style "background color", the idea of a "widget
background color" is completely bogus, the widget background can be a
gradient or whatever.

- Get rid of "background" in GimpViewable's preview API, only leave the
  "foreground color" there for things like brushes or fonts.
- In GimpViewRenderer, add the background types to be used to class and
  instance, so each renderer type can choose what it needs.
- Render all previews to alpha surfaces, and do the background
  for all renderers generically in gimp_view_renderer_real_draw(),
  then render the preview surface on top of it.
2025-08-18 14:05:54 +02:00
Bruno Lopes
977bcae71e build/windows: Make Inno source section more simple (again) 2025-08-18 07:49:56 -03:00
Marco Ciampa
31293376ee Small fix in Italian translation 2025-08-18 10:01:13 +02:00
Bruno Lopes
42e72b29c1 build/windows: Clarify meson.build file of Installer lang files 2025-08-17 18:36:21 -03:00
Anders Jonsson
31a267a8f1 po: update POTFILES.in 2025-08-17 22:48:28 +02:00
Bruno Lopes
193cf720c6 build/windows: Make self_build function work with every meson project 2025-08-17 15:02:15 -03:00
Yuri Chornoivan
94dcb39659 Update Ukrainian translation 2025-08-17 14:56:10 +00:00
Ekaterine Papava
af6bb31f89 Update Georgian translation 2025-08-17 10:27:35 +00:00
Ekaterine Papava
fe10197298 Update Georgian translation 2025-08-17 10:20:49 +00:00
Martin
e67068d92f Update Slovenian translation 2025-08-17 08:56:01 +00:00
Alx Sa
54f39cef6d core: Add 3.2 to version_string
With vector layers, gimp_image_get_xcf_version () needs
a case 24 to set the version string to 3.2.
2025-08-16 23:44:09 -04:00
Jehan
ada86282de app: reimplement saving/loading of vector layers and bump to XCF 24.
We now have a proper PROP_VECTOR_LAYER property in the XCF which will
store the various data relevant to vector layers.
This also fixes saving this new type of layers at all, since it was
broken in MR !773.
2025-08-16 23:44:09 -04:00
Jehan
afb8867bce app: make gimp_text_layer_from_layer() into a generic gimp_layer_from_layer().
This same code will also be usable for GimpVectorLayer and
GimpLinkLayer. It was made generic so that we don't copy the same code
over and over.
Now it also supports the case when the layer to copy was already added
to the image, which is going to be necessary for GimpVectorLayer.
2025-08-17 02:20:19 +00:00
Jehan
9f17f97198 app: small cleanup in GimpVectorLayer.
- Some coding style bugs.
- Factorize setting vector layer options into
  gimp_vector_layer_set_vector_options(), making sure all code paths to
  update the options do the same thing.
- Ceil the vector layer size since stroke width is a double. C rounds
  towards zero, which means we may still have too small buffer.
2025-08-17 02:20:19 +00:00
Jehan
41a464cb9a app: move functions to look up GimpData into core.
These functions should not be for the PDB only. The core will soon need
these too (e.g. to load resources linked from a XCF file).

So gimp_pdb_get_data_factory() is moved to gimp_get_data_factory() in
Gimp class. And gimp_pdb_get_data_factory_item() is moved to
gimp_data_factory_get_data() in GimpDataFactory class.
2025-08-17 02:20:19 +00:00
Jehan
4a93a04a6b app: move GeglColor handling code in their own function and properly…
… take care of the NULL value.

Up until now, the NULL color was simply not stored in the XCF. I.e. we
had a FILTER_PROP_COLOR argument type (under PROP_FILTER_ARGUMENT) whose
data was just… nothing.

Now we'll just always store a 0 uint32 (just like we do for NULL
string). On load though, we'll continue recognizing both nothing (thanks
to the payload size) or zero.
2025-08-17 02:20:19 +00:00
Alx Sa
a1cd2a2588 path, tools, pdb: UX updates to vector layers
This patch improves vector layer UX based on feedback.
In summary:
* Makes vector layer editable from the Path tool
* Adds initial PDB for creating vector layers in scripts
* Size vector layers to the path size, rather than image
* Transform tools utilize the path for resizing
* Path tool automatically selects vector layer path
2025-08-17 02:20:19 +00:00
Henk Boom
60ed90e10a vectors: Implement vector layers from GSoC 2006
Ports the work done by Hendrik Boom, Martin Nordholts, Gilles Rochefort,
and Jacob Boerema to Gimp 2.99/3.0.
2025-08-17 02:20:19 +00:00
Alx Sa
03443ffcc1 text: Don't call size_changed when typing
This patch provides a temporary fix for issue
14442. Currently, gimp_drawable_size_changed ()
is called whenever a drawable's size changes (like by
scaling, rotating, resizing, etc). When called, it resizes
filters to the layer's new width and height.
Unfortunately, it is currently also called when typing new
text, as that changes the layer size too. This causes filters
like Drop Shadow to be cut-off because they originally
extended outside the bounds of the layer.

This patch checks if the layer has been rasterized - if it hasn't,
then size_changed () is not called. As stated, this is a temporary
fix for GIMP 3.1.4, and will likely be replaced with a more
permanent fix for GIMP 3.2
2025-08-17 01:33:14 +00:00
Bruno Lopes
4f6036e3e6 build/windows: Remove redundant error check on Windows deps script 2025-08-16 22:28:48 -03:00
Bruno Lopes
20d37cbe45 build/windows: Improve native error catching on .ps1 scripts 2025-08-16 22:16:47 -03:00
Luming Zh
949f9b586b Update Chinese (China) translation 2025-08-17 00:12:32 +00:00
Luming Zh
ee50e5f1c7 Update Chinese (China) translation 2025-08-17 00:06:19 +00:00
Martin
4fb5857123 Update Slovenian translation 2025-08-16 22:57:54 +00:00
Martin
53f714f8bc Update Slovenian translation 2025-08-16 22:44:05 +00:00
lillolollo
52ffd75330 Issue #14689: Add translation context for Extensions
Extensions is used both for file extensions and for
GIMP's planned Extension format. This patch adds translation
context so translators know which one we're referring to.
2025-08-16 19:54:31 +00:00
Anders Jonsson
6a7911655b po-*: update POTFILES.in
Add the new filter browser to POTFILES.in of po-plug-ins.

POTFILES.skip of po-python and po-script-fu also needed
updating to ignore the new subfolder under plug-ins.
2025-08-16 18:29:38 +02:00
Martin
522d73a922 Update Slovenian translation 2025-08-16 15:10:30 +00:00
Yuri Chornoivan
a5d282fc80 Update Ukrainian translation 2025-08-16 14:23:53 +00:00
Bruno Lopes
87f670b5d1 gitlab-ci: Update Pipeline types summary with meson-health and appimage
This documents meson-health and appimage

Also, remove the speed comments because these pipelines will
run automatically regardless of the developer intention.
2025-08-16 10:37:23 -03:00
Philipp Kiemle
0022e9738e Update German translation 2025-08-16 13:13:50 +00:00
Bruno Lopes
634dd304d7 meson: Do not check for DirectX SDK in hardcoded MSVC dirs
MSYS2 provides the same needed library so let's just find it properly.

Note: even when we do have MSVC support we should never hardcode .build
files. Setting paths to be searched on MSVC is the job of LIB env var.
2025-08-16 09:56:16 -03:00
lillolollo
d0af548894 plug-ins: Fix memory leaks in file-gif-load.c 2025-08-16 12:38:05 +00:00
Jordi Mas
a8934067a9 Update Catalan translation 2025-08-16 11:51:38 +02:00
Bruno Lopes
3b11006eed build/windows: Replace f333aa35 text regarding MSIX <> EXE parity 2025-08-15 21:51:07 -03:00
Bruno Lopes
f333aa354b build/windows: Make clearer that the MSIX should be identical to the Installer 2025-08-15 21:32:52 -03:00
Bruno Lopes
9a118dd887 build/windows: Remove some empty lines on Windows build scripts 2025-08-15 21:20:41 -03:00
Marco Ciampa
f5518cd69a Updated Italian translation 2025-08-15 23:52:49 +02:00
Bruno Lopes
0570ea2b0b gitlab-ci: More ccache remnants cleanup on Windows builds 2025-08-15 18:41:21 -03:00
Bruno Lopes
891e55829c gitlab-ci: Remove $UMFPACK var from crossbuilds era 2025-08-15 18:38:05 -03:00
Kolbjørn Stuestøl
b43e4df63f Update Norwegian Nynorsk translation 2025-08-15 20:06:28 +00:00
Bruno Lopes
a6545f3511 meson: Add option to generate DWARF symbols on Windows
By default, it is evaluated to CodeView since this is the format we
use on .exe installer and .msix for many reasons (see git log).

However, some people may not use standard debugging tools for
Windows but, for example, GDB, so they need DWARF symbols since
GDB debugger (and the GCC toolchain) have limited Windows support.
2025-08-15 14:56:16 -03:00
Yuri Chornoivan
b4eda82a93 Update Ukrainian translation 2025-08-15 17:52:26 +00:00
Anders Jonsson
3f13511015 plug-ins: make JPEG 2000 codestream title translatable 2025-08-15 18:31:32 +02:00
lillolollo
d261d466e9 app/core prevent memory leak 2025-08-15 12:08:30 -04:00
Yuri Chornoivan
162725bd8c Update Ukrainian translation 2025-08-15 16:08:27 +00:00
Jacob Boerema
3d91452507 plug-ins: fix issues in wbmp discovered in coverity 2025-08-15 11:59:10 -04:00
Bruno Lopes
d8a264283b build/linux: Take AppStream metadata for Snap package
Like the Flatpak and, at a lesser extent, AppImage.
2025-08-15 10:34:31 -03:00
Bruno Lopes
bb1d96528d build/linux: Update Snap README regarding babl and GEGL tagging 2025-08-15 10:34:11 -03:00
Alx Sa
ede124ff85 tools: Fix crash in passthrough composited preview
Resolves #13087
We use gimp_layer_get_effective_mode () to retrieve
a simplified layer mode for optimization purposes
(e.g. if it's effectively NORMAL, we can do less processing).
GimpTransformGridTool used this function when the user
requests Composited Preview to only apply transforms to
individual layers in a group if absolutely necessary.
This means that sometimes, it returns NORMAL instead of
PASS_THROUGH depending on the number and types of
layers in the group.

Since 71aff497, when we remove a filter we also update the
effective mode of the group layer. However, this leads to an
infinite loop scenario where the effective mode change causes
the TransformGridTool to repeatedly remove and add a filter
until GIMP crashes.

This patch changes the gimp_transform_grid_tool_add_filter ()
check to always get the actual mode rather than the effective mode.
This prevents the effective mode change from causing an infinite loop,
but does mean that we now always apply transforms to all layers of the
group even if the composite preview would work fine.
2025-08-15 06:03:13 +00:00
Alx Sa
aa9aa9e489 core, plug-ins: Fix bugs noted by Coverity scan
Fixes the following warnings from Coverity:
* file-paa.c: Casts "width" to guint32 to prevent overflow.
  Also, fix checks so that RGBA_8888 textures will be read.
* file-png.c: Free variables if APNG is not fully loaded
* file-seattle-filmworks.c: Verify fseek () doesn't exceed
  length of file
* file-tim.c: Casts "width" to guint32 to prevent overflow
* guillotine.c: Free "file" if image creation fails
* gimpitem.c: Initialize offset_x/y to 0 to remove warning
2025-08-15 03:38:27 +00:00
Bruno Lopes
f890c5ab68 build/windows: Rely on output (not on error code) on 'msix_trust' check 2025-08-14 22:46:34 -03:00
Bruno Lopes
9eee96328b build/linux: appimagetool now supports specifying .appimage path on .zsync
See: https://github.com/AppImage/appimagetool/pull/111
2025-08-14 21:44:15 -03:00
Jacob Boerema
634ebf97e7 plug-ins: fix overwriting sketchbook tiff group layer mode
in the tiff loader
Found with the coverity scan.
2025-08-14 18:58:03 -04:00
Bruno Lopes
79a92ce439 build/linux: Use $CRAFT_PART_INSTALL for libheif plugins detection on Snap
$CRAFT_STAGE was being used but that is wrong since nothing is staged yet.
$CRAFT_PART_INSTALL is the right place where the packages are available.
2025-08-14 19:32:22 -03:00
Bruno Lopes
eefc2bea1a build/linux: Drop org.gimp.*.HEIC in favor of org.freedesktop.*.codecs-extra
See: https://github.com/flathub/org.gimp.GIMP/issues/414
2025-08-14 19:32:19 -03:00
Bruno Lopes
f7cfd4ef39 gitlab-ci: Catch gimp-flatpak-builder.log artifact
Otherwise we don't know what happened in GIMP build. It
is too verbose to output on GitLab runner console due to
flatpak-builder awful messages about .debug stripping.
2025-08-14 19:25:02 -03:00
Bruno Lopes
0c1963ca7c build/linux: Only submit snaps to Snap Store on releases 2025-08-14 19:21:30 -03:00
Bruno Lopes
0868cf3cd3 build/linux: More fixes to the README 2025-08-14 16:21:24 -03:00
Bruno Lopes
bb26b9f81d build/linux: Fix some typos on Snap README 2025-08-14 16:19:15 -03:00
Bruno Lopes
052eb474cc build/linux: Add Snap maintenance README like Flatpak and MSIX
But, right now, the "## Stable and Development releases"
section is not applicable due to the pass over being WIP:
https://github.com/snapcrafters/gimp/issues/447
2025-08-14 16:16:17 -03:00
Jehan
abf026fc54 plug-ins: add a pygimp.interp on macOS too. 2025-08-14 17:28:34 +00:00
Bruno Lopes
9bf03bc8f6 build/windows: Bump MaxVersionTested on AppxManifest to 10.0.26100.0 (24H2)
I have been using the MSIX on that version since some time without problems.
2025-08-14 13:23:42 -03:00
Bruno Lopes
202ae26c80 build/windows: WinSDK package name on winget don't have the revision digit 2025-08-14 13:21:50 -03:00
Bruno Lopes
973ae3eef2 build/windows: On WinSDK not found message, recommend to install MaxVersionTested 2025-08-14 13:12:32 -03:00
Bruno Lopes
b04841d993 build/windows: Print error message when WinSDK is not found by MSIX script 2025-08-14 12:53:36 -03:00
Bruno Lopes
437ba0aa46 gitlab-ci: Remove redundancy on dist-flatpak-weekly rules 2025-08-14 11:58:19 -03:00
Michael Natterer
caa0df8e22 app: use GipmRow for the recent files on the welcome dialog. Enables
correct aspect ratios and popup previews, and removes lots of code.
2025-08-14 16:53:02 +02:00
Michael Natterer
5b765fc665 app: enable popup previews on GimpImagefile 2025-08-14 16:53:02 +02:00
Bruno Lopes
f5fa753dc2 gitlab-ci: Remove crossbuilds remnants on cppcheck 2025-08-14 11:30:57 -03:00
Bruno Lopes
d59c230560 gitlab-ci: Remove bogus cache: comment on deps-flatpak
For the same reason of 3e958583 this will not work.
And even if we manage to have it configured for
containers in the future, it would be slow like b51f2b52.
2025-08-14 11:02:26 -03:00
Bruno Lopes
3e9585839e gitlab-ci: Remove bogus cache: key on file-plug-in-tests
GNOME Infra does not enable local caching and
we don't have distributed/remote caching either.
2025-08-14 10:57:39 -03:00
Bruno Lopes
a6b09d8029 gitlab-ci: Do not pull whole repo on Snap job (since we don't use Launchpad)
Following: 5da4b890
2025-08-14 10:47:19 -03:00
Bruno Lopes
56a5dea720 gitlab-ci: Test reducing Snap builds timeout to 20min
Seems we not need more than that even in the deps stage.
2025-08-14 10:42:49 -03:00
Anders Jonsson
c3079a7ad4 Update Swedish translation 2025-08-14 12:48:46 +00:00
Aleksandr Prokudin
50e96b181f Update Russian translation 2025-08-14 14:09:55 +02:00
Alx Sa
c35abbe090 plug-ins: Fix signed JPEG 2000 import
Our JPEG 2000 plug-in assumed all imported images
are unsigned - however, it's possible to store signed data
as well.
This patch adds a check to see if the image has the `sgnd`
flag set to TRUE. If so, we offset the signed data to get it
into the unsigned range before converting to an image.
2025-08-14 05:27:26 +00:00
Alx Sa
6211ec8d2c plug-ins: Revert b98fe0c3
Resolves #14412
While b98fe0c3 resolved issue 10133,
it broke exporting text layers as text on
single layers, since they would be merged
beforehand. This patch reverts the change
until we find a solution that resolves both
problems.
2025-08-14 05:00:09 +00:00
Bruno Lopes
1730c62187 build/windows: Add comment inside *_sym.py script explaning its situation
While it is already explained on meson.build, it is desirable to
explain inside the script too in the case someone browse the files.
2025-08-13 22:16:03 -03:00
Bruno Lopes
ff157df094 build/windows: Reorder Win bundling script to be consistent with AppImage
The AppImage script organization is way more clear to understand what is
needed to make a GIMP bundle so let's reproduce here with adaptations.
2025-08-13 22:13:42 -03:00
Bruno Lopes
03172b7196 build/windows: Put (not used) Lua below Python on bundling script 2025-08-13 22:13:38 -03:00
Anders Jonsson
e5260cd60f Update Swedish translation 2025-08-14 00:59:54 +00:00
Bruno Lopes
56838c1194 build/windows: Remove random empty line on Win bundling script 2025-08-13 20:25:53 -03:00
Jehan
841b5ddfb9 AUTHORS: update. 2025-08-14 01:15:04 +02:00
Jehan
0d50753cca Revert (partly) "app, pdb, libgimp: use "#pragma once" instead of:"
This reverts commit 246f9d284f.

This only reverts the part modifying libgimp* headers. All the part
switching to #pragma once in app/ was kept. See #14668.
2025-08-14 00:59:16 +02:00
Jehan
6cc054ee4e Revert "pdb, libgimp: more #pragma once, and formatting cleanup"
This reverts commit be3597e3c7.

See https://gitlab.gnome.org/GNOME/gimp/-/issues/14668
2025-08-14 00:54:55 +02:00
Jehan
bbb0be8413 Revert "libgimpwidgets: #pragma once, and formatting and ordering"
This reverts commit c71661bf24.

See https://gitlab.gnome.org/GNOME/gimp/-/issues/14668
2025-08-14 00:54:52 +02:00
Jehan
92c096d699 Revert "libgimpmath: #pragma once"
This reverts commit 74bf171611.

See https://gitlab.gnome.org/GNOME/gimp/-/issues/14668
2025-08-14 00:54:50 +02:00
Jehan
9308de3137 Revert "libgimpconfig: #pragma once, and some formatting"
This reverts commit 47a8ab5a66.

See https://gitlab.gnome.org/GNOME/gimp/-/issues/14668
2025-08-14 00:54:28 +02:00
Jehan
946a362d9b Revert "libgimpbase: #pragma once"
This reverts commit 06cd254954.

GObject Introspection tools somehow fail to introspect some macros in a
very bizarre way. See issue #14668.

I thought #pragma once was somewhat standard, but it turns out it's not.
And Wikipedia even stays about this:

> While #pragma once is available in most modern compilers, its
> implementation is tricky and might not always be reliable.

Anyway clearly it's not reliable at least regarding GIR tools. I believe
we should hold up on using #pragma once at the very least within our
libgimp* libraries. It is probably fine for app/ or plug-ins/ where we
don't need to introspect anything (and so far we haven't had any
compilation mishap because of this preprocessing directive).
2025-08-14 00:03:26 +02:00
Jehan
decc8dec6c desktop: prepare AppStream metadata for GIMP 3.1.4. 2025-08-13 19:41:32 +02:00
Jehan
048c86ffcf app: properly escape characters which need to be.
This fixes handling of text with for instance an ampersand (as in the
next AppStream release note listing).
2025-08-13 19:41:32 +02:00
Jehan
8470ec8b10 libgimpbase: add a #warning to be activated when we move on to GIMP 4.
The name GIMP_METADATA_SAVE_UPDATE does feel a bit ugly but we need to
keep the GIMP_METADATA_SAVE_ prefix, otherwise we would break the GIR
bindings. cf. commit 27fead082a.

Make a warning for ourselves to happen when we are closing onto GIMP 4.
Then we can make a decision whether or not we want to rename this enum
value.
2025-08-13 19:41:32 +02:00
Jehan
f35cc4693c NEWS: update. 2025-08-13 19:41:32 +02:00
Bruno Lopes
632cbd9ed3 build/windows: Drop 'replacesameversion' in favor of 'ignoreversion' on Inno 6.5.0
They are now mutually exclusive.
2025-08-13 13:32:51 -03:00
Bruno Lopes
5b97d96349 build/windows: From Inno 6.5.0, 'is' (Icelandic) language is unofficial 2025-08-13 13:32:48 -03:00
Bruno Lopes
b24fc1b74b build/windows: Go back to latest Inno since the Task Dialog is fixed on 6.5.0
Reverts: 8a6a6516

See: 9e493a15d9/whatsnew.htm (L243)
2025-08-13 13:31:54 -03:00
Bruno Lopes
ebec92aec7 build/windows: Add comment about purpose of each list in all-deps-uni.txt 2025-08-13 08:23:45 -03:00
Jordi Mas
861e406393 Update Catalan translation 2025-08-13 08:14:40 +02:00
Gabriele Barbero
b65bd2bd4c widgets: ignore GDK_MOD2_MASK when...
...remapping shortcuts with GDK_META_MASK

On macOS, the Command key is GDK_META_MASK. But when setting a shortcut,
GDK_MOD2_MASK is added too. This extra modifier makes it hard to check
if the shortcut is already in use. GIMP sees it as a different combination,
even if it's really the same. Now, when GDK_META_MASK is used, we remove
GDK_MOD2_MASK. This helps GIMP detect existing shortcuts correctly
and avoid duplicates.
2025-08-13 03:22:57 +00:00
Bruno Lopes
2e12de6747 build/linux: Change collapsible section ID to the more technical '*_submission'
We already use '*_submission' on the MSIX script.

Submission is the first act, the one which we trigger on CI.
The publishing is done by the store (Flathub or Snap Store).
2025-08-12 22:38:49 -03:00
Michael Natterer
9f789e68d5 app, tools, plug-ins: more #pragma once, and formatting cleanup where
I noticed the need.
2025-08-13 01:48:40 +02:00
Jordi Mas
6124b56b3e Update Catalan translation 2025-08-12 23:29:41 +02:00
Bruno Lopes
839064a6c6 build, gitlab-ci: Drop last ccache shenanigans
Let's prioritize reproducibility over small performance gains,
specially when we have too many packages do deal with.
2025-08-12 16:33:32 -03:00
Bruno Lopes
56cc7e363b build/linux, gitlab-ci: Change .flatpak-builder artifact naming to be more consistent 2025-08-12 16:25:31 -03:00
Bruno Lopes
aee3bd23d6 build/linux: Restore comment of '--destructive-mode'/host mode on Snap script
It was on the env section before the remote-build drop. Let's restore it and
move to the build section which is more appropriate.
2025-08-12 16:07:16 -03:00
Gabriele Barbero
c3d01854b3 dialogs: use core actions for opening images and new files
This commit changes the welcome dialog to use core actions for opening
images and new file. This allows to avoid code duplication.
2025-08-12 18:03:54 +00:00
Gabriele Barbero
d932d02fbe dialogs: implement shortcuts in the Welcome Dialog
This commit adds support for activating user-defined keyboard shortcuts in the Welcome Dialog to:
- Create a new file
- Open a file
- Open one of the 10 most recent files
2025-08-12 18:03:54 +00:00
Kolbjørn Stuestøl
4255227fff Update Norwegian Nynorsk translation 2025-08-12 16:01:37 +00:00
Bruno Lopes
a87ee3c241 build/linux: Add check to ensure we use the right 'snapcraft-rocks' image
If the container image don't have the base snap required by
snapcraft.yaml, it will naturally fail.
2025-08-12 12:21:40 -03:00
Michael Natterer
124993d770 app: GimpRow: don't ref the viewable, use a weak ref instead. 2025-08-12 15:45:16 +02:00
Michael Natterer
ff9a14b7d0 app: fix gimp_viewable_has_preview() to look at both the get_preview()
*and* get_pixbuf() methods. Fixes #14657.
2025-08-12 15:01:39 +02:00
Michael Natterer
f96a7192cd app: add GimpRowFilter and GimpRowDrawableFilter and port the filters
popover to GimpContainerListView.
2025-08-12 11:58:29 +02:00
Bruno Lopes
d4aac4a3e5 build/linux: Rework deps installation message on Snap script
The new text is more alike to the flatpak one, which
should make easier to understand both scripts.
2025-08-11 22:20:51 -03:00
Bruno Lopes
5da4b89002 build/linux: Make Snap on GNOME runners (not on Launchpad)
Now can make snaps 3x faster on CI without snapcraft remote-build.
2025-08-11 22:13:23 -03:00
Bruno Lopes
b960be9735 build/linux: Remove redundant plugs: in favor of 'gnome' Snap extension
See: https://documentation.ubuntu.com/snapcraft/stable/reference/extensions/gnome-extension/
2025-08-11 13:11:45 -03:00
Michael Natterer
2d57b1764d app: GimpRowSettings: forgot to remove some junk. 2025-08-11 16:39:30 +02:00
Michael Natterer
6651d4eb7f app: GimpRow's icon always exists, no need for if (priv->icon). 2025-08-11 16:23:54 +02:00
Michael Natterer
795cf081cc app: use a GimpContainerListView in the layer options dialog. 2025-08-11 16:09:35 +02:00
Michael Natterer
7fad4ad323 app: remove some #if 0'ed junk from GimpContainerListView, but leave
some there as a reminder.
2025-08-11 14:47:18 +02:00
Michael Natterer
9e2b378414 app: remove unused member from struct GimpContainerIconView 2025-08-11 14:41:23 +02:00
Michael Natterer
92e68453df app: set the container last in all GimpContainerView constructors, to
avoid traversing the just-filled view when "context" or "view-size"
changes.
2025-08-11 14:38:02 +02:00
Michael Natterer
c114e96096 app: gimp_container_view_set_container(): standardize a g_return_if_fail() 2025-08-11 14:37:25 +02:00
Michael Natterer
b4e27fbf83 app: create GimpRow with the view size of its GimpContainerView 2025-08-11 12:13:58 +02:00
Michael Natterer
33dfccde51 app: add GimpRowSeparator and GimpRowSettings and port
GimpSettingsEditor to GimpContainerListView.

The separator currently doesn't draw anything, maybe it needs some
CSS.
2025-08-11 12:07:11 +02:00
Michael Natterer
2f87f8e51e app: GimpRowDeviceInfo: add missing dot in comment 2025-08-11 12:06:00 +02:00
Gabriele Barbero
6574f6ff30 display: avoid critical on master devices
When the device is of type GDK_DEVICE_TYPE_MASTER, calling
gdk_device_get_vendor_id() and gdk_device_get_product_id() fails and
triggers a CRITICAL warning. This commit avoids invoking these functions
on master devices, where failure is guaranteed.
See #14219
2025-08-11 09:55:17 +02:00
Cristian Secară
92150e07ba Update Romanian translation 2025-08-10 19:23:19 +00:00
Cristian Secară
37ff61d0ac Update Romanian translation 2025-08-10 19:10:22 +00:00
Cristian Secară
d0d4c769e3 Update Romanian translation 2025-08-10 18:57:29 +00:00
Cristian Secară
aa0a25d82a Update Romanian translation 2025-08-10 18:44:49 +00:00
Cristian Secară
cb13ce0da3 Update Romanian translation 2025-08-10 17:45:05 +00:00
Yuri Chornoivan
f520df6f4a Update Ukrainian translation 2025-08-10 14:25:42 +00:00
Alx Sa
3a2d9c477e core: Set alpha value for image palette imports
Resolves #14649
After the Color Space Invasion, we retrieve the color format
from the palette when creating palettes from images. However,
gimp_palette_import_create_image_palette () still only receives
RGB values. Thus, the palette can store RGBA values without the
alpha, thus defaulting it to a random alpha value. This can cause
issues when using the palette to make a gradient or other instances
where the alpha value is reintroduced.
This patch checks if the format has an alpha channel, and if so, sets
the alpha to 255. Future work can be done to make the image palette
conversion less RGB-specific.
2025-08-10 13:58:25 +00:00
Cristian Secară
261f407008 Update Romanian translation 2025-08-10 13:53:12 +00:00
Cristian Secară
d9b9a7f8bd Update Romanian translation 2025-08-10 13:48:38 +00:00
Cristian Secară
4514e61fd1 Update Romanian translation 2025-08-10 13:33:35 +00:00
Luming Zh
e3b58d5180 Update Chinese (China) translation 2025-08-10 11:16:42 +00:00
Luming Zh
67dcac45ef Update Chinese (China) translation 2025-08-10 11:11:07 +00:00
Yuri Chornoivan
2a106339c5 Update Ukrainian translation 2025-08-09 18:55:00 +00:00
Jacob Boerema
27fead082a libgimp: fix #14641 After new metadata code, all edge builds are failing...
at devel-docs

Due to me using an enum name that only ended in one word instead of
the other enums also adding `SAVE_`, the enum values in the gir
scanner were assigned a double name, causing API breakage and a
failure to build the documentation.

So, let's conform to the other enums and change the name of our
enum to `GIMP_METADATA_SAVE_UPDATE`.
2025-08-09 13:33:47 -04:00
Anders Jonsson
2265f823fd Update Swedish translation 2025-08-09 16:29:27 +00:00
Anders Jonsson
8d598c1c52 Update Swedish translation 2025-08-09 15:18:02 +00:00
Bruno Lopes
c72fe4ef11 gitlab-ci: Change forward slashes to backslashes on script: of Windows jobs
Merely cosmetical change to align with the OS design.
2025-08-09 09:45:14 -03:00
Bruno Lopes
3bf6aaa0fa build/linux: Update imath and graphviz flatpak modules
Synced from: e6c69021e3
2025-08-09 09:10:01 -03:00
Kolbjørn Stuestøl
1b49b83078 Update Norwegian Nynorsk translation 2025-08-09 12:05:38 +00:00
Michael Natterer
35383741f1 app: GimpContainerListView: preserve the selected items across
GimpContainer::reorder().
2025-08-09 12:42:33 +02:00
Michael Natterer
b49f4a3631 app: gimp_layer_stack_reorder(): use the passed old_index instead of
remembering it before chaining up.
2025-08-09 08:54:36 +02:00
Bruno Lopes
d5d6b5e726 build/linux: Add comment about why we don't use config.h on Snap dist 2025-08-08 22:38:28 -03:00
Bruno Lopes
771fcb576f build/linux: Add some sub comments on flatpak dist tools section 2025-08-08 22:18:16 -03:00
Bruno Lopes
0f91efa3d5 build/linux: Clarify files/repo section comment on Flatpak dist script 2025-08-08 22:11:35 -03:00
Bruno Lopes
bf03d71ad2 build/linux: Fix .snap path on 'snapcraft upload' command 2025-08-08 22:08:34 -03:00
Martin
943e418055 Update Slovenian translation 2025-08-08 22:40:50 +00:00
Martin
228a0f9e72 Update Slovenian translation 2025-08-08 22:36:17 +00:00
Bruno Lopes
855d07193b build/linux: Remove exit check on flatpak dist
Let's hope this fixes the bug.
2025-08-08 19:20:24 -03:00
Martin
bca8540d40 Update Slovenian translation 2025-08-08 21:52:12 +00:00
Alx Sa
3969c002ee plug-ins: Reduce Raw Data load dialogue height
Currently, all Raw Data parameters are displayed in a column
when loading. This can cause the dialogue to go off-screen on
displays with smaller heights.
This patch adjusts the dialogue to be a two-column layout, similar
to some of our legacy plug-ins, to reduce the chance of the options
going off-screen.
2025-08-08 20:52:25 +00:00
Bruno Lopes
6645f245cb build/linux: Hopefully bug of only aarch64 being distributed due to exit code 2025-08-08 17:37:27 -03:00
Bruno Lopes
d22ae667e0 Revert "build/linux: Debug flatpak dist"
This reverts commit f0ff4a9098.

I was able to debug. The bug was fixed with 19e83a0e
2025-08-08 17:34:44 -03:00
Bruno Lopes
4a9b98fc05 Revert "build/linux: build-update-repo is arch-specific"
This reverts commit 7e280c9b58.

Seems it is not arch-specific. The error we were experiencing was due to
the bug fixed in 19e83a0e.
2025-08-08 17:31:57 -03:00
Bruno Lopes
19e83a0eb5 build/linux: Fix wrong extraction of repo*.tar 2025-08-08 15:58:26 -03:00
Jacob Boerema
877d5b0c1a app, libgimp, libgimpbase: Add preference to allow saving and updating extra metadata
Closes #5856 - provide a way to export images without adding or
changing any metadata.
Handles issue #3490 together with !2367. The latter makes sure that
an image comment when present is favored over similar metadata tags.

This commit makes sure that when you disable the preference to
update metadata automatically, it does not synchronize the
image comment with similar metadata tags (possibly overwriting other
metadata), it does not update the modification date, and does not
add or update software and change history metadata.

This adds a metadata preference (enabled by default) that on export
determines whether we add and update some non essential metadata.

When this setting is disabled, we only touch the metadata that we
cannot avoid (e.g. updating size, presence of thumbnail, etc.).
2025-08-08 13:41:19 -04:00
Jacob Boerema
8e11b1bfb4 libgimp: fix handling of "charset=" in comments
The charset=[ascii|InvalidCharsetId] comment originates from broken
handling in exiv2 of Exif.Photo.UserComment. However, due to the way
we (or possibly other programs) write comments, this could have
propagated to the generic image comment and to the
Exif.Image.ImageDescription metadata tag.

By adding a check for an existing comment first, the metadata tags
were not necessarily checked anymore.

To fix this in all cases we need to unconditionally read and interpret
the comment and both metadata tags.
We move handling of charset=InvalidCharsetId to the already existing
function gimp_image_metadata_interpret_comment by adding some
parameters and call this function for all three cases.
2025-08-08 13:08:28 -04:00
Jacob Boerema
780e848120 libgimp: favor existing image comment instead of
always loading comment from metadata

I noticed that if there was text in one of the metadata tags that we
consider equivalent to the image comment, the first one of those
always took precedence over an actual image comment that an image
may have.

Let's change that to only use metadata comments if the image didn't
have a comment set. So, if present, load the gimp-comment parasite
and set that as comment. If not present, we try to load a comment
from metadata.
2025-08-08 13:08:28 -04:00
Bruno Lopes
f0ff4a9098 build/linux: Debug flatpak dist
This can be only debugged on master
2025-08-08 13:38:42 -03:00
Michael Natterer
e9b2b1ad7b app: add "gint old_index" argument to GimpContainer::reorder() 2025-08-08 17:02:32 +02:00
Bruno Lopes
7e280c9b58 build/linux: build-update-repo is arch-specific 2025-08-08 11:57:15 -03:00
Michael Natterer
007e8e6615 app: G_DECLARE_DERIVABLE_TYPE(GimpContainerListView) 2025-08-08 15:56:36 +02:00
Michael Natterer
d65d55d64a app: add dummy API gimp_container_list_view_set_search_entry() and
use it in GimpContainerPopup. Fixes #14613 but only the crash, the
feature is missing.
2025-08-08 15:48:29 +02:00
Michael Natterer
b85f517c22 app: GimpContainer: insert() was not emitting GListModel::items-changed.
Also add an empty default implementation of reorder() for unconditional
upchaining.
2025-08-08 12:16:53 +02:00
Michael Natterer
7f70656c05 app: GimpRow: guard against the row being destroyed during a rename
(happens on sorted containers). Rename member variables involved in
renaming to "rename_...".
2025-08-08 12:13:26 +02:00
Michael Natterer
b89ae68d07 app: GimpDeviceEditor: fix whitespace 2025-08-08 12:12:13 +02:00
Bruno Lopes
e1b2b44f3b build/linux: Fix typo in flatmanager_text variable evaluation 2025-08-08 06:23:56 -03:00
Bruno Lopes
34285d4459 build/linux: Fix build-bundle on gimp job after
a6544047
2025-08-07 21:59:30 -03:00
Bruno Lopes
0f09167e50 build/linux: Fix lack of desktop icon when running Snap 2025-08-07 20:54:34 -03:00
Bruno Lopes
fa19794d74 build/linux: Add comment about 'dot' situation on snapcraft.yaml 2025-08-07 19:02:19 -03:00
Alx Sa
bf096c5174 plug-ins: Restore support for HRZ Slow Scan Television Images
We use to have a separate hrz.c plug-in for reading these files. It was
removed in 76a5689f.
Since HRZ is a raw 8 bit RGB image with a few extra constraints, it makes
sense to include it as an option in our Raw Data plug-in alongside HGT.
2025-08-07 21:38:46 +00:00
Bruno Lopes
1ec86c7d6a build/linux: Fix for glib_networking_works test on Snap 2025-08-07 13:39:12 -03:00
Michael Natterer
bd33d8dd7e app: switch GimpDeviceEditor to GimpContainerListView, and add a
GimpRow subclass for GimpDeviceInfo objects.
2025-08-07 17:38:52 +02:00
Michael Natterer
170bd79572 app: formatting in GimpDeviceInfo 2025-08-07 17:38:52 +02:00
Marco Ciampa
b7163f0715 Small italian translation fix 2025-08-07 17:28:41 +02:00
Michael Natterer
1a9bea59f1 app: GimpFilteredContainer: update sort_func when the src container's
sort_func changes.
2025-08-07 16:24:22 +02:00
Bruno Lopes
3c02c8bcb7 build/linux: Remove bogus pygimp.interp creation on Snap 2025-08-07 10:47:38 -03:00
Bruno Lopes
a65440478c build/linux: Fix local distribution of .flatpak 2025-08-07 09:59:04 -03:00
Michael Natterer
211d415f1c app: prepare GimpRow for subclassing: add protected accessors for its
child widgets, and more virtual functions.
2025-08-07 14:44:50 +02:00
Bruno Lopes
a960e8f4d1 gitlab-ci: Fix flatpak builds being interrupted 2025-08-07 09:33:16 -03:00
Bruno Lopes
56e8275690 build/linux: Add 'snapcraft pack' code on local snaps 2025-08-07 09:23:10 -03:00
Bruno Lopes
c25418f38a build/linux: Fix 'if not can_import_heic and not can_import_avif' test on Snap
Similar to c860ffe2 but now for build-time.
2025-08-07 08:41:20 -03:00
Bruno Lopes
effedb9248 build/linux: Print more debug info on Snap dist: name, track and gimp_version
That completes a3aca3c1 making the snap script just like the other ones but
it differs on the way to get GIMP_UNSTABLE since we don't have access to
the GIMP's config.h file after building with snapcraft remote-build.
2025-08-07 08:00:04 -03:00
Bruno Lopes
f157206146 build/linux: License snapcraft.yaml under GPL-3.0+
Like all other build files in this repo
2025-08-07 06:19:08 -03:00
Bruno Lopes
59ab053ab9 build/linux: Fix libheif comment on Snapcraft (it is HEJ2 not J2K)
So, in commits c860ffe2 and 2e5ac18d you should read HEJ2
2025-08-07 06:05:19 -03:00
Michael Natterer
04fa596dd1 app: move part of the freeze/thaw logic back from cruft to
GimpContainerView to the "refresh" logic of selecting the same item
works again.
2025-08-07 10:35:58 +02:00
Michael Natterer
f767cdb771 app: in gimp_container_thaw(), emit GimpContainer::thaw after
GListModel::items-changed so views are refilled before running their
"thaw" logic.
2025-08-07 10:35:58 +02:00
Michael Natterer
8766a228af app: move more API to gimpcontainerview-cruft.[ch] and make
gimpcontainerview.c cruft-free.
2025-08-07 10:35:58 +02:00
Alx Sa
d58b17cb10 libgimpwidgets: No decimal for u8 RGB color selector
This patch uses the is_u8 variable in GimpColorScales's
create_group () function to conditionally set decimals to
0 when creating u8 RGB color selectors.
This change will help further distinguish between the 0...00
and 0..255 views in the Color Selectors. It will also better
convey to users that u8 is an integer value rather than a
floating point.
2025-08-07 04:05:48 +00:00
Ekaterine Papava
4e0dd10341 Update Georgian translation 2025-08-07 03:32:18 +00:00
Alx Sa
494f3a1452 plug-ins: Add import support for Seattle Filmworks photos
This patch allows GIMP to import two formats created by
Seattle Filmworks. The earliest format SFW93A, and the most
common format SFW94A. Both formats are essentially mangled
JPEGs, though mangled in different ways.

Thanks to Loren Amelang for providing sample images and
information about the format!
2025-08-07 02:12:36 +00:00
Bruno Lopes
2e5ac18d78 build/linux: Do not plug with useless ffmpeg content snap
libheif from GNOME SDK Snap can't directly use codecs from ffmpeg due
to the use of plugin system (plugins on LIBHEIF_PLUGIN_PATH) at build time.

Also, even if it could (by custom building, which I don't plan to do),
codecs like libde265/x265 are always present in GNOME runtime Snap
(unlike GNOME runtime flatpak) so there is no way of not installing them.
2025-08-06 21:10:00 -03:00
Bruno Lopes
c860ffe2a8 build/linux: Fix AVIF, HEIC and J2K support on Snap package
The GNOME SDK Snap have only AVIF and HEIC decoding plugins,
no AVIF or HEIC encoding plugins and no J2K at all. So,
let's complete the support with 'build-packages:'.
2025-08-06 20:17:09 -03:00
Alx Sa
9a1984a707 libgimpwidgets: Use arrows for GimpSpinScale cursors
The "grabbing" cursor currently used is quite large on
newer versions of GTK3, and makes it difficult for users
to see where they're grabbing. This patch switches to
using "pointer" cursor for hovering over the slider area,
and "col-resize" when actually moving the slider.
It also reverts padding changes in CSS so that the progress
bar aligns with the place the user clicks. Padding is added
in Cairo for the label, though the number entry is now
flush against the input buttons.
2025-08-06 18:19:36 +00:00
Yuri Chornoivan
d2a7586b67 Update Ukrainian translation 2025-08-06 17:43:21 +00:00
Bruno Lopes
863152f1af build/linux: Add comment about wreid libexpat1-dev situation on Snap 2025-08-06 11:53:41 -03:00
Bruno Lopes
d6766cc374 build/linux: Update libheif Flatpak module to 1.20.2
Synced from 93db928805
2025-08-06 10:36:01 -03:00
Luming Zh
629d9ebe67 Update Chinese (China) translation 2025-08-06 11:49:37 +00:00
Bruno Lopes
687382b98d build/linux: Move build-bundle code back to 3_dist-gimp-flatpakbuilder.sh
This makes more clear that making .flatpak is a dist stuff while
maintaining the multiarch support introduced in caf46017.
2025-08-06 08:03:54 -03:00
Cristian Secară
a2c6667c69 Update Romanian translation 2025-08-06 06:28:45 +00:00
Gabriele Barbero
e9090f9b55 libgimpwidgets: enable expression parser for GimpSizeEntry
This commit allows the "reference value" spinbuttons in GimpSizeEntry
to accept and evaluate mathematical expressions, just like the main
value fields. The GimpEevl parser is now attached to both value and
reference value spinbuttons.
2025-08-05 23:43:30 +00:00
Bruno Lopes
f989b4f50c build/linux: Add comment about libaa1-dev too on snapcraft.yaml
Following cdcdda4060

This one of the packages that it is on SDK snap but incompletely.
2025-08-05 20:14:45 -03:00
Ekaterine Papava
7e68ad6ffd Update Georgian translation 2025-08-05 23:12:34 +00:00
Ekaterine Papava
836cabe0a6 Update Georgian translation 2025-08-05 23:06:38 +00:00
Bruno Lopes
a65d7a64a2 build/linux: Better support for local Snap builds 2025-08-05 19:21:44 -03:00
Bruno Lopes
ba31ef35d4 build/linux: Remove redundant libopenexr
It is already provided at runtime by GNOME 46 snap
2025-08-05 18:41:07 -03:00
Bruno Lopes
778f81984f build/linux: Remove redundant libappstream-dev
It is already provided by the GNOME 46 SDK snap
2025-08-05 18:04:43 -03:00
Bruno Lopes
ba60cab0a6 build/linux: Set -Dlibdir on Snap building
On my tests, this is needed locally.
2025-08-05 18:04:41 -03:00
Bruno Lopes
cdcdda4060 build/linux: Add comments on packages that are also on GNOME SDK Snap 2025-08-05 18:04:37 -03:00
Bruno Lopes
98a1009c4a build/linux: Reduce redundancy of 'build-environment' on snapcraft.yaml 2025-08-05 18:04:30 -03:00
Michael Natterer
3b6bb46d36 app: add gimp_viewable_has_preview() and use it in GimpRow, instead of
peeking around in GimpViewableClass manually.
2025-08-05 17:42:32 +02:00
Michael Natterer
33bfd5a12b app: implement GimpContainerListView, using a GtkListBox
It completely relies on GListModel and doesn't manage any list items
itself. The port should be pretty much feature-complete.

Add a ton of stuff to GimpRow in order to look and behave like a
GimpContainerTreeView row.

Add a playground switch to use the new widgets in all views that can
be switched between list and grid view (brushes, patterns etc.)

Please test!
2025-08-05 16:13:01 +02:00
Kolbjørn Stuestøl
bf4cfd9932 Update Norwegian Nynorsk translation 2025-08-05 11:03:03 +00:00
Martin
f85f9e6497 Update Slovenian translation 2025-08-05 06:50:12 +00:00
Jehan
6c6253223d extensions: update in the GEX format
Our custom keys are now listed under <custom/> instead of <metadata/>,
with the same format otherwise.

This change was initially triggered by using as_component_get_custom()
in libappstream instead of as_app_get_metadata() in appstream-glib (cf.
MR !2326). It seems that libappstream doesn't have any API to get the
<metadata/> keys, and that this tag is not officially in the spec
anyway.

The custom tag on the other hand is officially in the specs (and has
been added in 2018 apparently, cf. commit 1b1ba1f61 in the appstream
repository).

See also commit Infrastructure/gimp-extensions-web@f9f497b.

Without this, all extensions were broken with MR !2326. They were parsed
and correctly listed, but no entry point to plug-ins or data were
registered.
2025-08-04 18:56:42 +00:00
Jehan
40adbff456 app, build: fix MR !2326 (porting to libappstream).
The following things were broken:

* Remove gdk-pixbuf-2.0/ from gdk-pixbuf include (this is part of the -I
  directory in the pkg-config data).
* Properly free the allocated AsMetadata which were leaked (while the
  AsComponent was freed mistakenly since it belongs to the AsMetadata).
* Properly free GFile as a GObject (it must not be freed with g_free()!).
* Fix various coding style bugs.
* Fix installing a .gex file by dropping it in GIMP. The code in
  file_gex_validate() was completely broken as it was not parsing the
  AppStream metadata anymore.
* Mininum libappstream requirement moved down to 0.16.1 so that GIMP can
  be built on Debian bookworm (our dependency baseline).
* Fix Snap build (hopefully, untested).
2025-08-04 18:56:42 +00:00
Joey Riches
8277817b62 app: Port from appstream-glib to appstream
From the horse's mouth:
"WARNING: appstream-glib is heavy maintenance mode, use appstream
instead"

Additionally, appstream-glib no longer conforms fully to the
appstream specification.

Some care is taken to taken to support both libappstream 1.0 as well
as libappstream 0.16.x to support stable distros.
2025-08-04 18:56:42 +00:00
Bruno Lopes
3d9e95a2f4 build/linux: Remove empty line on Flatpak gimp script for consistency with Win 2025-08-04 15:07:20 -03:00
Bruno Lopes
a269410d6b build/linux: Add missing submodule init on local mode of Snap script 2025-08-04 15:05:48 -03:00
Bruno Lopes
6ab5402195 build/linux: Make flatpak env section more consistent with Snap script 2025-08-04 14:37:38 -03:00
Yuri Chornoivan
74617fc63a Update Ukrainian translation 2025-08-04 16:53:22 +00:00
Kolbjørn Stuestøl
c8be1d9817 Update Norwegian Nynorsk translation 2025-08-04 15:01:59 +00:00
Kolbjørn Stuestøl
867dd017fb Update Norwegian Nynorsk translation 2025-08-04 15:01:39 +00:00
Michael Natterer
4a9b772689 app: GimpRow: implement GtkWidget::style_updated() and ::query_tooltip().
Also add API gimp_row_monitor_changed() to be called from a future
container, because we don't want the logic of gimp_widget_track_monitor()
on each row.
2025-08-04 14:52:43 +02:00
Michael Natterer
7ea10c6475 app: forgot a #pragma once 2025-08-04 14:32:10 +02:00
Michael Natterer
78186c7a16 app: don't chain up to parent->constructed() in
gimp_container_box_finalize() /o\... it's a minor miracle that it just
warned and leaked instead of exploding completely. Fixes #14596.
2025-08-04 14:28:31 +02:00
Bruno Lopes
05f85e79d1 build/linux: Bump qoi module commit
The recent commit promisses slighty better performance.
2025-08-04 08:53:27 -03:00
Bruno Lopes
7f7ee96717 build/linux: Update poppler module to 25.08 2025-08-04 08:44:08 -03:00
Michael Natterer
a9f5694906 app: add "context", "view-size" and "view-border-width" to GimpRow.
Add a GimpView widget and virtual functions to prepare for subclasses.
The controller page of prefs looks a bit funny now, but it's a nice
temporary test case without disturbing general user experience.
2025-08-04 08:22:31 +02:00
Bruno Lopes
893f268e60 build/linux: Complete a3aca3c1 2025-08-03 19:47:24 -03:00
Bruno Lopes
a3aca3c171 build/linux: Print info message about which archs will be distributed
All our Linux dist scripts are multi-arch aware so
we need to be clear like on windows scripts.
2025-08-03 19:39:59 -03:00
Ondřej Míchal
69e9efe534 plug-ins: Add GEGL filter API browser
A new browser for exploring the available and supported GEGL operations
for use with the filter API. These include also all operations loaded as
GEGL plug-ins and operations registered from GIMP.

Similarly to the Procedure browser it shows also the details of
individual parameters like the allowed values and default values. In the
case of a type that is not completely supported by the GimpProtocol, the
browser can show useful information about a parameter thanks to a PDB
procedure encoding the information in a placeholder GParamSpec.
2025-08-03 21:38:28 +00:00
Ondřej Míchal
43de81fb25 themes: Add ListBox style to mimic the look of TreeView 2025-08-03 21:38:28 +00:00
Ondřej Míchal
ce5efe29d6 pdb: Encode param info with unsupported type in a placeholder spec
To prevent losing all information about a type (and also reporting a
different API by dropping a parameter when retrieving an operation's
pspecs, create a placeholder type with a known name and type and put the
rest of the information into its blurb. A little hack-y but filter
browser can now show information of parameters with unsupported types.
2025-08-03 21:38:28 +00:00
Jehan
74d79ba0c6 app, pdb, libimp: prevent core process from raising WARNING on libgimp call.
Whatever a plug-in does, it should not be able to trigger WARNINGs or
CRITICALs on the core process. Here this was possible when requesting an
array of param specs with gimp_drawable_filter_operation_get_pspecs() on
a GEGL operation, while GIMP doesn't support all types for this filter's
arguments. Trying to send unsupported type specs through the wire would
fail.

Unfortunately just saying that we must add support for these types is
not enough because we simply cannot support every possible types. First
because even in current GEGL core filters, there are types we might
never support (e.g. audio fragments?). But even more because third-party
filters could have custom types too (just like our own filters have
custom GIMP types).

So instead, acknowledge that some types cannot be sent through the wire,
verify when it's one such argument and simply output an informational
message on stderr (because the info of a non-supported type is still
interesting in case this is something we should in fact add support for;
it's much better than silently ignoring the argument).
2025-08-03 21:38:28 +00:00
Ondřej Míchal
4694c9178a pdb: Add procedures to inspect filter operations
The primary consumer of these procedures is an upcoming browser for
available GEGL operations introduced in a follow-up commit.
2025-08-03 21:38:28 +00:00
Ondřej Míchal
faca688dba pdb: Extract GEGL operation validation into its own function
A follow-up commit will make use of it in multiple places.
2025-08-03 21:38:28 +00:00
Ondřej Míchal
00c08e81d4 app: Make block-listing of GIMP operations optional
In an upcoming commit a new user of gimp_gegl_get_op_classes will expect
a list of all operations supported/allowed in GIMP and not just the ones
that are not exposed in the GUI.
2025-08-03 21:38:28 +00:00
Ondřej Míchal
caa61e5925 app: Separate GEGL op blacklist based on filter actions
In an upcoming commit a new user of gimp_gegl_get_op_classes will expect
a list of all operations supported/allowed in GIMP and not just the ones
that are not exposed in the GUI.

With the same change, this switches from maintaining a list of
operations exposed as an action, this now uses the actions themselves
for the filtering. During this I found some operations that were in the
"exposed in GUI sub-list" were in-fact not exposed but were straight up
blocked. I moved them to the appropriate sub-list along with the
justifications I found in the commit history.
2025-08-03 21:38:28 +00:00
Jehan
5a68c4b9b6 app: improve GimpTRCType arguments' labels.
It's not just about linear or perceptual. It can also be non-linear,
a.k.a. following the image's curve.
2025-08-03 21:38:28 +00:00
Jehan
09e8e45d07 app, libgimp, pdb: have GimpTrcType into public libgimp.
It is being used as filter arguments in 2 GIMP filters (curves and
levels) so we want to be able to send this enum type through the wire.
2025-08-03 21:38:28 +00:00
Jehan
bbe5c16862 pdb: properly handle enum types with acronyms and sort case-insensitively.
This will be used in particular for adding GimpTRCType to libgimp.
Otherwise it generates some broken gimp_TRCtype_get_type() function
name.

For this use case, we need to look-ahead a bit in the regular
expression.
2025-08-03 21:38:28 +00:00
Ondřej Míchal
4022a123e9 libgimp: Add support for GeglParamFilePath to the wire 2025-08-03 21:38:28 +00:00
Bruno Lopes
88d6c95ef4 build/linux: Add info about Flatpak toolkit for debugging purposes 2025-08-03 17:35:43 -03:00
Bruno Lopes
27f0594ef6 build/linux: Add info about Snap toolkit for debugging purposes 2025-08-03 14:57:44 -03:00
Bruno Lopes
df880e3da9 gitlab-ci: Bump Flatpak timeout to 90min
This is needed by the awful aarch64 runner.
2025-08-03 10:32:34 -03:00
Jehan
5c9a950752 NEWS: update. 2025-08-03 12:17:59 +02:00
Bruno Lopes
caf460177a gitlab-ci, build: Add infrastructure to distribute nightly aarch64 flatpak 2025-08-02 22:07:37 -03:00
Bruno Lopes
ed1d4a37a0 Revert "gitlab-ci: Fix broken CI after GNOME/citemplates@d33cf81a"
This reverts commit 6c44745861.

The bug was fixed by GNOME/citemplates!126
2025-08-02 20:24:44 -03:00
Bruno Lopes
6b69fca88d build/linux: Remove bogus cleanup on cfitisio module after move to CMake 2025-08-02 19:38:24 -03:00
Bruno Lopes
4985991552 gitlab-ci: Complete db10cdab 2025-08-02 19:18:55 -03:00
Bruno Lopes
db10cdab26 gitlab-ci: Ensure we use runners with longer timeouts on Snap jobs
Some x86_64_v3 runners provided by Cannonical have a 60m limit which
makes impossible to maintain connection in snapcraft remote-build, so
let's ensure we use gimp x86_64_v2 runner which have longer limit.

On the other hand, let's use the x86_64_v3 ones on AppImage to
avoid the AppImage jobs delaying the Snap ones and vice versa.
2025-08-02 18:59:03 -03:00
Bruno Lopes
4ae861f5ac build/linux: Fix Nightly flatpak after GCC 15 + CMake 4 bombastic combo
These updates brokened badly json-c, x265, cfitsio and maxflow modules.
Let's workaround them with proper patches and build options.

By the way, cfitsio was updated and is now built with CMake.

ghostscript was temporarely dropped since it is impossible to
build right now even with Archlinux patches. Let's wait a release.
2025-08-02 16:41:15 -03:00
Bruno Lopes
6c44745861 gitlab-ci: Fix broken CI after GNOME/citemplates@d33cf81a 2025-08-02 16:39:35 -03:00
Kolbjørn Stuestøl
c35dbcfc3b Update Norwegian Nynorsk translation 2025-08-02 14:49:53 +00:00
Bruno Lopes
84186a932b build/windows: Delete some dubious empty lines on msix script 2025-08-02 08:16:20 -03:00
Bruno Lopes
e1184f8d58 build/windows: Make all deps for MSIX making less confusing
Following 2e390fee
2025-08-02 08:09:22 -03:00
Bruno Lopes
2e390fee01 build/windows: Try to make msstore-cli section less confusing 2025-08-01 22:33:45 -03:00
Bruno Lopes
c1c5c82683 build/windows: Move WACK message to before appcert run
This way, if some error like lack of sudo is throw, the context is clear.
2025-08-01 22:25:05 -03:00
Bruno Lopes
d0455ffda3 build/windows: Group commands about Partner Center credentials 2025-08-01 22:20:44 -03:00
Luming Zh
07ef945646 Update Chinese (China) translation 2025-08-02 00:03:11 +00:00
Bruno Lopes
e9ea400eee build/windows: Make .gitignore logic on MSIX script less convoluted
It is not consistent with other scripts like 3_dist-gimp-goappimage.sh
2025-08-01 20:21:59 -03:00
Bruno Lopes
34ab2099bb build/windows: Make assets test more premature on MSIX script
This fixes the "surprise" of not being able to make a .msix without
previously built assets. That surprise existed because the test was
running quite late (after the successful AppxManifest.xml creation).
Even me, the script author, was feeling like the script was trolling me.
2025-08-01 19:42:33 -03:00
Bruno Lopes
a221a7006c gitlab-ci: Add references to variables from gimp-web-devel
This should make more clear that the variables on
gitlab-ci and gimp-web-devel should be synced.
2025-08-01 19:04:21 -03:00
Bruno Lopes
dbdc9bc43c gitlab-ci: Improve LIB_DIR and LIB_SUBDIR universal variables
Ported from Infrastructure/gimp-web-devel!115
2025-08-01 18:52:13 -03:00
Bruno Lopes
3b6a2138a7 build/windows: Add conf_manifest function on MSIX script to reduce redundancy 2025-08-01 16:51:48 -03:00
Bruno Lopes
bcad28a5d1 build/windows: Update comments of source section on MSIX script 2025-08-01 16:51:44 -03:00
Yuri Chornoivan
aebbbd1142 Update Ukrainian translation 2025-08-01 19:11:12 +00:00
Bruno Lopes
374c94434b build/windows: Reduce nesting on MSIX script 2025-08-01 15:53:06 -03:00
Martin
5f80a4ee9b Update Slovenian translation 2025-08-01 16:51:21 +00:00
Kolbjørn Stuestøl
029cd0ea5e Update Norwegian Nynorsk translation 2025-08-01 16:09:08 +00:00
Michael Natterer
0794087a67 app: move the entire zoom logic from GimpContainerTreeView to
GimpContainerBox so both grid and list views can zoom via scroll and
zoom gestures.
2025-08-01 17:01:53 +02:00
Bruno Lopes
bd6218a12f build/linux: Some cosmetic changes to AppRun vars 2025-08-01 10:55:54 -03:00
Bruno Lopes
bc095d5c83 Issue #13001: build/linux: Sandbox XDG_DATA_DIRS on AppImage
Closes #13001

XDG_DATA_DIRS is a variable used by many deps (e.g. glib) to
find runtime data. So, let's point XDG_DATA_DIRS to the
appimage bundle so prevent unexpected data from the host.
2025-08-01 10:46:07 -03:00
Bruno Lopes
d731a8fc0d build: Make scripts CWD check run on CI too 2025-08-01 09:19:21 -03:00
Michael Natterer
b416994ed0 app: make GimpContainerView behave like a normal widget
The old API to select stuff and its signals was doing unexpected
stuff and was very confusing. Change things to be "normal":

The selection API is now set_selected() and get_selected(), with no
internal data exposed, and set_selected() emitting the expected
signal.

The signals are now "selection-changed" and "item-activated".
"selection-changed" is always emitted in response to changing the
selection, be it via the API, or by changes in the model (the internal
callbacks in from e.g. GimpContext or GimpImage simply call set_selected()
and don't do any unxpected magic).
2025-08-01 10:02:37 +02:00
Bruno Lopes
a7be8ec6cd build/linux: Correct typo in APP_ID 2025-07-31 20:43:23 -03:00
Bruno Lopes
c5427bec21 build/linux: Take flatpak app ID and branch dybamically from the manifest
This is more future proof.
2025-07-31 20:42:12 -03:00
Bruno Lopes
8a2dd28082 build/linux: Add CLI message explaining how to test .flatpak artifact
We can't guarantee that every DE or package manager have
support to install .flatpak files by double click.
2025-07-31 20:37:56 -03:00
Bruno Lopes
4faa5a6153 build/linux: Delete empty line on env block of Snap script 2025-07-31 20:18:38 -03:00
Bruno Lopes
70eb95bff8 build: Reorder shasums output on AppImage and Installer scripts
The output being before the release-only file generation is more logical
2025-07-31 19:24:40 -03:00
Bruno Lopes
e0b2bcba27 build/linux: Some cosmetic changes and comments to AppImage script 2025-07-31 18:40:13 -03:00
Alx Sa
901d1cd9d9 plug-ins: Add initial import support for PAA textures
This patch adds support for loading
compressed PAA textures.
This includes RGBA 4444, 5551, 8888, and
Grayscale with Alpha channel.
It does not yet cover DXT1 - 5 texture
import support.
2025-07-31 15:49:21 +00:00
Alx Sa
f7ef01f44a tools: Update Seamless Clone paste check
The experimental Seamless Clone tool assumes
that all pasted objects are GimpBuffers. With multi-select,
it's now likely that the pasted object is an image containing
layers instead. Thus, the tool would report there was no pasted
data to work with, even though there was.
This patch updates the check so that it retrieves the first selected
layer from the pasted image if it's not a GimpBuffer, allowing the
tool to function again.

Note that this patch does not improve the speed of the Seamless Clone
GEGL operation, just enables the tool to work again in GIMP.
2025-07-31 14:49:35 +00:00
Bruno Lopes
79374e0bc1 build/linux: Update openexr and suitesparse Flatpak modules 2025-07-30 20:51:01 -03:00
Bruno Lopes
75aa40f3cb build/linux: Add (nightly) Snap package distribution 2025-07-30 20:44:11 -03:00
Yuri Chornoivan
ed896b069d Update Ukrainian translation 2025-07-30 18:48:14 +00:00
Michael Natterer
fc68405c45 app: remove the gimplayertreeview.h include from GimpDrawableTreeView 2025-07-30 18:25:40 +02:00
Alexander Alexandrov Shopov
74e0f1d87e Update Bulgarian translation 2025-07-30 10:26:05 +00:00
Alexander Alexandrov Shopov
f78475b594 Update Bulgarian translation 2025-07-30 10:18:26 +00:00
Alx Sa
ea61460c6f actions: Use layer for lock check when mask is active
Resolves #9287
In GIMP 2.10, before checking if the drawable was locked,
we checked if it was a layer mask and switched to its
layer if so. This is because the lock status is saved in the
layer.
In GIMP 3.0, we accidentally moved that check to the bottom
during the conversion to multi-select. As a result, when
switching to a layer mask, the lock content and lock position
would always be turned off since we checked the wrong
drawable.
This patch restores the 2.10 order of checks so that
we compare the lock status with the layer and not the mask.
2025-07-30 03:36:38 +00:00
Luming Zh
80f9caf418 Update Chinese (China) translation 2025-07-29 23:02:38 +00:00
Luming Zh
cc76f4d459 Update Chinese (China) translation 2025-07-29 22:56:47 +00:00
Martin
96c78dcf9c Update Slovenian translation 2025-07-29 19:25:53 +00:00
Martin
9bb39b7cf4 Update Slovenian translation 2025-07-29 19:16:35 +00:00
Bruno Lopes
d7687ee7e6 build/linux: Complete 2aee80b7 2025-07-27 21:43:15 -03:00
Bruno Lopes
9e1c1e314a build/linux: Rename suffix of flatpak scripts to flatpakbuilder
Since the praxis in all other scripts is to
name the suffix with the toolkit name
2025-07-27 19:33:42 -03:00
Bruno Lopes
2aee80b77f build/linux: Drop support to unreproducible builds on Flatpak
We had a way of building gimp without calling flatpak-builder but
"thanks" to Glycin sandboxing in pixbuf we can't anymore...
2025-07-27 19:06:58 -03:00
Bruno Lopes
215fcc9652 gitlab-ci: Rename 'gimp' stage to 'build'
This is how we call in other gimp repos, where there is no 'gimp' building.
2025-07-27 15:30:48 -03:00
Yuri Chornoivan
df0edc982a Update Ukrainian translation 2025-07-27 18:14:04 +00:00
Alx Sa
7c949960a4 widgets: Don't freeze progress box on image load
To prevent people from making changes to setting while
in the middle of loading images, we turn off sensitivity to all
widgets in GimpFileDialog (except for the cancel button).
However, the progress box no longer shows the load percentage
when it is not sensitive. Therefore, this patch conditionally leaves
it enabled so we can see progress while loading large images.
2025-07-27 12:48:33 +00:00
Alx Sa
df8063c861 tools: Make transform boundary multi-select aware
Resolves #13589
When selecting multiple layers to transform, the boundaries
would only consider the first layer selected - leaving the other
items invisible.
This patch reuses code from gimp_edit_paste_get_viewport_offset ()
to loop through all selected layers and update the transform
boundaries to consider the total offset and dimensions of the selected
layers.
2025-07-27 04:01:27 +00:00
Alx Sa
f99415c281 plug-ins: Give unique IDs to file-svg choice parameter
Resolves #14557
Per Kamil Burda, all three choices for the "paths" parameter
in file-svg had an ID of 0. This patch makes them unique.
2025-07-26 16:08:03 +00:00
Bruno Lopes
db8ead54f8 Issue #1620: plug-ins: Clarify file size string of JPEG plug-in
Closes #1620 by using the suggested string by Jacob.
2025-07-25 19:38:51 -03:00
Gabriele Barbero
0551b4be1d app: implement system color scheme detection on MacOS
Following Linux and Windows implementations, this commit add the
system color scheme detection on MacOS, enabling the "System Colors"
setting also on this OS.
2025-07-25 19:03:24 -03:00
Alx Sa
a066a27f86 po-python: Make OpenRaster text translatable 2025-07-25 20:44:17 +00:00
Gabriele Barbero
83dcd00794 dialogs: respect time/date system format on Windows
Fetch date and time via GetDateFormatEx/GetTimeFormatEx to respect
the user's custom formats from Windows Region settings instead of
falling back to C locale defaults.
2025-07-25 15:13:08 -04:00
Gabriele Barbero
180736f772 dialogs: respect time/date system format on macOS
When the time or date format is changed from macOS system settings,
these changes do not affect the locale but the user preferences.
This commit ensures that the date and time are retrieved directly from
those settings, respecting the selected format.
2025-07-25 15:13:08 -04:00
Jacob Boerema
3c7dd6db3b plug-ins: fix #10893 file-gif-load: segmentation fault on opening huge gif
When using huge-dimensions (e.g. 60000 x 60000) using a 32-bit int is
not enough to compute the offset, which causes a crash when loading
such a huge image.

We fix this by casting the first variable to gsize. We also do this
for the case where `alpha-frame` is TRUE since it is clear that the
same could also happen there.
2025-07-25 10:45:56 -04:00
Luming Zh
94aa995711 Update Chinese (China) translation 2025-07-25 12:00:15 +00:00
Jehan
f4bdd69f73 meson, build, INSTALL: we now use mypaint-brushes-2.0 for all Windows platform.
Thanks to lazka and the whole MSYS2 project for adding this package to
their repository so that we don't need ugly special-casing anymore.

See: e515fe48bc
2025-07-25 01:19:12 +02:00
Bruno Lopes
7b03ca6fd1 gitlab-ci, build: Remove old Xorg-testing deps and GEGL optional deps 2025-07-24 19:30:56 -03:00
Bruno Lopes
b3d7d9b8df build/linux: Update gexiv2 and graphviz modules 2025-07-24 15:39:07 -03:00
Jehan
2a55604e6f meson: bump libmypaint minimum dependency to version 1.5.
The MyPaintSurface2 interface got added with libmypaint 1.5.0.

Also mypaint-brushes 2.0.2 release notes explicitly say:

> The v2.0.x brushes (in general) require libmypaint >= 1.5 to work correctly / not crash.

(cf. https://github.com/mypaint/mypaint-brushes/releases/tag/v2.0.2)

Since Debian bookworm ships with libmypaint 1.5.1, this is fine to bump
this requirement.

Note: there is still some discrepancy lying around with Windows x86
(32-bit) still using mypaint-brushes-1.0 but apparently these older
brushes still work fine with the new API, and Alx will ask the MSYS2
project if we can have a mypaint-brushes-2.0 package for x86 too.
2025-07-23 19:25:27 +02:00
Jehan
619b321141 INSTALL: remove mentions of needing to install mypaint-brushes v1. 2025-07-23 19:18:34 +02:00
Jehan
5af0758994 NEWS: update. 2025-07-23 18:42:30 +02:00
Jehan
ae076dd584 Issue #14530: Debug Dialog on Unstable tells to downgrade to Stable version.
This may happen upon upgrading, before the next update check kicked in
and the existing last-known-release was imported by the config migration
from an older version of GIMP.

Let's just make sure GimpCoreConfig will silently discard these old
values when they are older than the currently running version.
2025-07-23 18:09:37 +02:00
Martin
b4efde182d Update Slovenian translation 2025-07-23 11:46:23 +00:00
Alx Sa
4c76ea387a plug-ins: Redesign of animation-playback
Reju developed a redesign of the Animation Playback
plug-in that more closely resembles standard playback
UIs (such as VLC Player).
The redesign also changes the progress bar to a GtkScale,
so users can move to different frames on the timeline
instead of always having to step through them one by one.
2025-07-23 00:34:53 +00:00
Alx Sa
963dde2b08 themes: Define minimum height of progress bar
On some system themes, the progress bar on the
status bar was less visible due to the minimum height
being set too low. This patch defines a CSS rule to make
sure the progress bar is at least 10px tall.
2025-07-22 19:18:25 +00:00
Bruno Lopes
fe4cbb6512 Issue #14515: Fix stiff GIMP Debug Dialog
Closes: #14515

Also, make the dialog centered since it isn't modal to
the, for example, crashed GIMP, it is independent.
2025-07-22 10:57:39 -03:00
Alx Sa
40e147af11 build/windows: Fix mypaint-brushes build on clang
This patch separates the conditional logic
for loading perl and mypaint-brushes2 from
ea8b9dc1 to be two separate calls to MSYS2
pacman. This should resolve an issue with
line break differences between platforms.
2025-07-21 17:11:22 +00:00
Alx Sa
0f79d3e850 widgets: Fix crosshair hotspot on Windows
On Windows, the crosshair cursor for brushes is
offset from the brush outline if you have a display
scale of 200% or more. This is because
gdk_cursor_new_from_surface () does not contain code
to scale the hotspot X/Y coordinates to match the surface
on Windows - so it expects you pass those values in
already scaled to the surface.
This patch adds conditional code to scale the hotspots on
Windows the same way we currently do on macOS (though
for opposite reasons).
2025-07-21 01:28:39 +00:00
Alx Sa
daea3c2298 operations: Guard against missing config in...
...GimpCageCoefficientCalculation.
Resolves #8297
The custom filter "gimp:cage-coef-calc" is used
in the Cage Transform tool, which always sends in
a GimpCageConfig parameter. However, it's possible
to call this filter from GEGL Graph without the config.
This causes GIMP to crash, as it tries to access
members of a non-existent config in
gimp_cage_config_get_n_points ().
This patch adds safeguard checks to make sure there's
a config object before trying to use it. The resulting
filter's output in these cases is blank, which is not ideal
but better than a crash.
2025-07-20 06:30:41 +00:00
Alx Sa
1376d25453 plug-ins: Fix bug with RGB FITS export
Resolves #13842
fits_write_img () was incorrectly used, since we
were writing one channel of RRR...GGG...BBB... data
at a time. This patch switches to fits_write_pix (), and
increments the first pixel's 3rd index after writing
each channel so that the next channel is written from
the correct starting point.
2025-07-19 23:36:20 +00:00
Jehan
65949e731c plug-ins: get rid of useless code.
Fixes build warning:

> plug-ins/map-object/map-object-ui.c:309:18: warning: variable ‘combo’ set but not used [-Wunused-but-set-variable]
2025-07-20 01:19:17 +02:00
Michael Natterer
3a2ca2b6ff app: split up GimpContainerView so the code to manually connect to the
GimpContainer is in a separate file, and called conditionally. We
don't need any of this when using GListModel-based views soon.
2025-07-19 13:50:54 +02:00
Martin
ab6569168a Update Slovenian translation 2025-07-19 09:28:41 +00:00
Martin
8e85e98b1c Update Slovenian translation 2025-07-19 09:26:17 +00:00
Yuri Chornoivan
d40b2552c7 Update Ukrainian translation 2025-07-19 05:50:50 +00:00
Yuri Chornoivan
8cb4c382eb Update Ukrainian translation 2025-07-19 05:38:25 +00:00
Ekaterine Papava
99ce27af43 Update Georgian translation 2025-07-19 03:13:40 +00:00
Ekaterine Papava
d7ec15ce75 Update Georgian translation 2025-07-19 03:11:10 +00:00
Luming Zh
0de80db0d0 Update Chinese (China) translation 2025-07-18 23:30:52 +00:00
Luming Zh
373dab8ee1 Update Chinese (China) translation 2025-07-18 23:24:02 +00:00
Michael Natterer
6eae69d2a4 app, pdb: rename gimp_container_get_children_type() to get_child_type() 2025-07-18 08:19:13 +02:00
Michael Natterer
d4e8ab0234 app: rename GimpContainer's "children-type" property to "child-type" 2025-07-18 08:19:13 +02:00
Michael Natterer
77bb857046 app: rename all "children_type" members and variables to "child_type" 2025-07-18 08:19:13 +02:00
Michael Natterer
e00afd9d54 app: rename gimp_data_factory_view_get_children_type() to _get_child_type() 2025-07-18 08:19:13 +02:00
Alx Sa
83dc066b3c plug-ins: Port legacy Grid to GimpProcedureDialog
Note that the horizontal and vertical color buttons are
still chained and laid out manually, as we do not have
a chained color widget in GimpProcedureDialog.
2025-07-18 01:57:54 +00:00
Alx Sa
bb9d36d8ae dialogs, widgets: Check if animations are enabled...
...when setting animations for GtkStack.

Adds a check if gimp_widget_animation_enabled ()
is TRUE before setting an animation type in
gtk_stack_set_transition_type (). If it's FALSE,
then we turn off animations with
GTK_STACK_TRANSITION_TYPE_NONE.
This affects the Input Controller dialogue,
Preferences dialogue, and the Welcome
dialogue.
2025-07-17 20:56:16 +00:00
Alx Sa
1b72774969 themes: Reduce scope of 2bbe1958 changes
2bbe1958 also added outlines to labels in
the color selector, which was not intended. This patch
reduces the scope of the style change to prevent this.
2025-07-17 20:07:40 +00:00
Bruno Lopes
ae482fff97 .gitlab: Add one more rule to bug reports: "only one bug per report created" 2025-07-17 16:41:48 -03:00
Bruno Lopes
0a54dd48a0 .gitlab: Make issue templates consistent 2025-07-17 16:13:08 -03:00
Bruno Lopes
739633fb0c .gitlab: Add template for Security Report
This should help us to have minimally useful reports about security.
2025-07-17 15:49:32 -03:00
Anders Jonsson
f99610cc85 po: update POTFILES.in 2025-07-17 16:41:32 +02:00
Marco Ciampa
b839f66b48 Update Italian translation 2025-07-17 14:28:32 +00:00
Martin
b06da4ba24 Update Slovenian translation 2025-07-17 13:42:37 +00:00
Martin
2d877525e0 Update Slovenian translation 2025-07-17 13:42:26 +00:00
Michael Natterer
f1373373e6 app: in GimpRow, say e.g. "Rename Brush" instead of a generic
"Rename Item", using GimpViewableClass::default_name
2025-07-16 17:27:40 +02:00
Michael Natterer
df497b5ca6 app: move "default_name" from GimpItemClass to GimpViewableClass and
set default names for a lot of stuff. To be used by GimpRow soon.
2025-07-16 17:22:11 +02:00
Michael Natterer
b32ab62822 app: use G_DECLARE_DERIVABLE_TYPE() in GimpResource 2025-07-16 17:11:15 +02:00
Alx Sa
c31b2a31cf plug-ins: Fix various warnings in Map Object
Resolves #12873
This patch fixes a few warnings and bugs in Map Object.
* Since GimpChoice parameters with only a few options
become RadioFrames rather than ComboBoxes, the
"value-changed" signal no longer worked for Light Type.
This was replaced with a "notify::light-type" signal.

* After the GimpProcedureDialog port, xadj, yadj, and zadj
were no longer created. Calls to block signals on these were
removed, and replaced with updating the GimpProcedureConfig
object directly.

* The step increment for adjusting the Light position was lowered
to match how they work in GIMP 2.10 (and because the current step
size sends the light off-screen in one click).
2025-07-16 03:45:19 +00:00
Alx Sa
d51cdee779 paint: Use PROP_VIEW_ZOOM and PROP_VIEW_ROTATION
In ea8b9dc1, PROP_RADIUS was incorrectly used for the
view-zoom and view-rotation property IDs. This patch
removes the duplication and makes the IDs distinct.
2025-07-16 03:35:16 +00:00
Michael Natterer
03b9292d59 app: use g_set_object() in more set_property() implementations 2025-07-15 15:49:45 +02:00
Michael Natterer
bfaf6c5ce0 app: fix typo in GimpViewable: it's "pending" not "prending" 2025-07-15 15:34:24 +02:00
Michael Natterer
0682a19213 app: implement object renaming in GimpRow, using either F2 or long press 2025-07-15 12:27:44 +02:00
Michael Natterer
a91cfe07ac app: set GimpViewableClass::name-editable to TRUE in GimpControllerInfo 2025-07-15 12:12:35 +02:00
Michael Natterer
39228512ad app: use G_DECLARE_DERIVABLE_TYPE() in GimpGroupLayer 2025-07-15 12:10:51 +02:00
Alx Sa
6be5c0d794 plug-ins: Support more Sketchbook TIFF features
Adds support for the following features, based on
unofficial documentation and user-provided sample
files.

* Sets the selected layer based on the image-level metadata
* Sets the visibility of the background layer based on the image
   level metadata.
* Sets the blend mode and color tag of each layer, based on extended
   layer-level metadata. Legacy blend modes are used, based on
   user feedback and comparison with Sketchbook.
* Creates group layers and stores layers in them. Layers are read from
   top to bottom, and layer groups are added and filled based on layer
   level metadata.

Additionally, fixes a bug where "R~G~B~A" was used instead of
"R~aG~aB~aA" to transfer the color, as Sketchbook TIFF layers use
associated alpha.
2025-07-13 18:36:41 +00:00
Ondřej Míchal
dabe921ba1 app: Change container pop-up view size predictably
Instead of a blind multiplication/division use known and well defined
increments that also have no chance of overflowing the minimum/maximum
allowed sizes.

Closes https://gitlab.gnome.org/Teams/GIMP/Design/gimp-ux/-/issues/509
2025-07-13 11:44:57 -04:00
Ondřej Míchal
3dd6272a1d app: Use correct maximum size for button viewables
Pop-up widgets tied to button viewables can have their previews go over
the original max value which officially is 192 ("gigantic"). When they
do and update their property with the number, a critical gets fired
regarding the maximum value being crossed over.

Closes #14337
2025-07-13 11:44:57 -04:00
Michael Natterer
57f21db59e app: use G_DECLARE_DERIVABLE_TYPE for GimpObject 2025-07-13 13:18:42 +02:00
Michael Natterer
572b160ff9 tools, modules: #pragma once 2025-07-13 12:54:21 +02:00
Michael Natterer
06cd254954 libgimpbase: #pragma once 2025-07-13 12:46:11 +02:00
Michael Natterer
47a8ab5a66 libgimpconfig: #pragma once, and some formatting 2025-07-13 12:36:30 +02:00
Michael Natterer
74bf171611 libgimpmath: #pragma once 2025-07-13 12:27:58 +02:00
Michael Natterer
c71661bf24 libgimpwidgets: #pragma once, and formatting and ordering 2025-07-13 12:23:24 +02:00
Emin Tufan Çetin
0a804cb06a Update Turkish translation 2025-07-13 10:00:38 +00:00
Michael Natterer
be3597e3c7 pdb, libgimp: more #pragma once, and formatting cleanup 2025-07-13 11:05:20 +02:00
Michael Natterer
14fb14effc app: #pragma once in app/tools 2025-07-13 09:26:04 +02:00
Michael Natterer
246f9d284f app, pdb, libgimp: use "#pragma once" instead of:
#ifndef __FOO_H__
 #define __FOO_H__

 /* declarations  */

 #endif /* __FOO_H__ */

And some cleanups while I saw the headers.
This is far from finished...
2025-07-13 03:21:37 +02:00
Alexander Alexandrov Shopov
17363c56e6 Update Bulgarian translation 2025-07-12 21:26:50 +00:00
Alexander Alexandrov Shopov
6ce1fd0595 Update Bulgarian translation 2025-07-12 21:16:04 +00:00
Alexander Alexandrov Shopov
181672aa75 Update Bulgarian translation 2025-07-12 21:13:32 +00:00
Jehan
46143342b4 plug-ins: fix "no previous declaration" warnings. 2025-07-12 20:34:22 +02:00
Michael Natterer
5a66ceda13 app: port GimpCircle and its subclasses to G_DECLARE_DERIVABLE_TYPE() 2025-07-12 20:03:34 +02:00
Michael Natterer
d2ca61d5e2 app: G_DECLARE_DERIVABLE_TYPE() in GimpFilter, GimpItem, GimpViewable,
plus somewhat related cleanup in the .c files
2025-07-12 19:08:30 +02:00
Michael Natterer
9359839e84 app, pdb: get rid of const object pointer in generated PDB code, and
adapt some core functions accordingly. Const object pointer make no
sense at all.
2025-07-12 18:54:20 +02:00
Michael Natterer
453e3a1004 app: remove GimpAdd,RemoveItemFunc from GimpItemTreeView and use
gimp_image_add,remove_item() instead
2025-07-12 17:45:05 +02:00
Michael Natterer
7e43c448ae app: add gimp_image_add,remove_item() which dispatches to the correct
layer, channel, path functions
2025-07-12 17:43:44 +02:00
Michael Natterer
a7881b6708 app: remove GimpGetContainerFunc from GimpItemTreeView and use
gimp_image_get_items() instead
2025-07-12 17:17:39 +02:00
Michael Natterer
42e070521c app: add gimp_image_get_items() which returns a GimpContainer based on
an item GType
2025-07-12 17:16:36 +02:00
Michael Natterer
4220657930 app: reorder functions in GimpImage so the item sets API is in the
middle of an unrelated function group
2025-07-12 17:04:36 +02:00
Michael Natterer
4e1c6e918b app: remove GimpGet,SetItemsFunc from GimpItemTreeView and use the
newly added gimp_image_set,get_items()
2025-07-12 16:37:18 +02:00
Michael Natterer
7887862b29 app: port GimpEditor to G_DECLARE_DERIVABLE_TYPE() and some other
cleanups
2025-07-12 16:01:50 +02:00
Alx Sa
bd6cf4a58e plug-in: Fix image-map map format type change
Resolves #14456
Similar to bbbf6df5, GTK3 uses GTK_STATE_FLAG_ACTIVE to
indicate a radio button is selected, rather than GTK2's
GTK_STATE_FLAG_SELECTED. This patch fixes the check to use
it when updating _map_format after toggling the format.

While investigating this bug, the code format was also fixed to match
current standards.
2025-07-12 13:26:10 +00:00
Michael Natterer
c880e5ac17 app: listen to icon-name changes in GimpRow 2025-07-12 15:03:34 +02:00
Michael Natterer
529db388c2 app: add GimpRow, a GtkListBoxRow subclass, that is going to be the
parent of all our future row widgets, Use it in GimpControllerList.
2025-07-12 14:03:14 +02:00
Michael Natterer
c5c503cd59 app: derive GimpControllerManager from GimpList and remove its own
GListModel implementation.
2025-07-12 12:43:09 +02:00
Michael Natterer
af20371f6b app: implement GListModel in GimpContainer, and add
G_DEFINE_AUTOPTR_CLEANUP_FUNC to GimpContainer and GimpList
2025-07-12 12:40:38 +02:00
Niels De Graef
b690e59dca app: Fix adding devices in gimpcontrollerlist 2025-07-12 12:00:30 +02:00
Michael Natterer
71bb54cb9a app: forgot an #include /o\ 2025-07-12 11:53:24 +02:00
Michael Natterer
e85d696cd9 app: forgot to commit the changes in app/display 2025-07-12 11:49:21 +02:00
Michael Natterer
af95e96963 app: move GimpControllerManager to its own files 2025-07-12 11:43:28 +02:00
Michael Natterer
905ccf2ea9 app: move GimpControllerCategory to its own files 2025-07-12 11:09:28 +02:00
Ekaterine Papava
e39650d47c Update Georgian translation 2025-07-12 02:24:01 +00:00
Ekaterine Papava
dd87749d21 Update Georgian translation 2025-07-12 02:19:39 +00:00
Niels De Graef
af3007afbf plug-ins: Use GtkListBox in metadata viewer
This commit changes the metadata viewer to use `GtkListBox`es instead of
`GtkTreeView`s for displaying the tags and their values. The main
advantages is that the latter isn't available in GTK4 (making the
eventual port to it smaller), that they have a11y problems, and that
list boxes allow more advanced UIs than just showing a simple string.
One thing for example that this commit introduces, is to make the labels
selectable, so they can be easily copy-pasted for lookup.

Since we wanted to use `GListModel`, this commit also introduces a
helper object `GimpMetadataTagObject` which holds both a tag's name and
its value. In the future, we could use this to move the string
formatting logic to that helper object, which we could then in turn use
for more advanced UIs.
2025-07-11 21:44:09 +00:00
Niels De Graef
3eb129c73a plug-ins: Use G_DECLARE_FINAL_TYPE in metadata plugin
Use the opportunity also to rename the plug-in to a more
self-explanatory `GimpMetadataViewer` (rather than a `Metadata` struct
which can be easily confused with `GimpMetadata`).
2025-07-11 21:44:09 +00:00
Jacob Boerema
8c86b2ba58 plug-ins, psp: fix #14182 Invalid UTF-8 in PSP comment
PSP creator comments are supposed to be ASCII according to the psp8
specs.
Since we expect utf-8, text with characters that have their high bit
set (e.g. Copyright character) fail to be read as utf-8.

We fix this by first converting the creator keywords to utf-8, and as
extra security also test if the result is valid utf-8.
2025-07-11 16:51:43 -04:00
Jacob Boerema
03427c4600 plug-ins, psp: fix warnings: result of comparison of unsigned...
enum expression >= 0 is always true
2025-07-11 16:42:30 -04:00
Alx Sa
24e6aaea30 widgets: Reconnect style_updated() in DrawableTreeView
Resolves #14447
In addition to defining a style_updated () function, we also need
to attach it to signals whenever the theme or icon size changes.
2025-07-11 15:48:57 +00:00
Alx Sa
270a834598 core: Stop error in gimp_image_set_selected_items ()
Unlike gimp_image_get_selected_items (), we don't return
anything after calling the appropriate function inside
gimp_image_set_selected_items (). Thus, even if we match
the GType for the item, the g_return_if_reached () will always
run at the end of the function and throw an error.
This patch puts that statement in an else {} condition so it
only runs if the GType doesn't match a layer, channel, or path.
2025-07-11 03:50:44 +00:00
Luming Zh
a402d98f3c Update Chinese (China) translation 2025-07-10 23:24:12 +00:00
Luming Zh
43784d6d68 Update Chinese (China) translation 2025-07-10 23:19:59 +00:00
Michael Natterer
5060cc06dd app: move the g_set_str() hack to config-types.h 2025-07-10 23:58:43 +02:00
Jehan
a4a5b2e300 app: (temporarily) redefine g_set_str() to avoid bumping GLib requirement. 2025-07-10 23:51:37 +02:00
Michael Natterer
b61b3362ff app: fix wrong propery identifier of GimpFillEditor::use-custom-style
and fix some coding style issues
2025-07-10 23:31:08 +02:00
Michael Natterer
50ce759eca libgimp*: revert using g_set_str() outside app/ 2025-07-10 23:27:54 +02:00
Yuri Chornoivan
734610c8f6 Update Ukrainian translation 2025-07-10 18:29:40 +00:00
Yuri Chornoivan
b44d267986 Update Ukrainian translation 2025-07-10 18:26:54 +00:00
Niels De Graef
b144929476 app: Don't use g_type_class_get() yet
It's not available yet in Debian.
2025-07-10 09:54:17 +02:00
Niels De Graef
8013d1c013 app: Port controllers dialog to GtkListBox
This shouldn't be a real change in design, just moving away from
`GtkTreeView`.

Since we stopped relying on the underlying `GimpContainer` API, we can
now stop exposing it in the `GimpControllerManager` too.
2025-07-10 07:28:36 +02:00
Niels De Graef
b410dcdc03 app: Extend GimpControllerManager API
... and fix a bug related connecting to the wrong signal.
2025-07-10 07:23:48 +02:00
Alx Sa
2449d2f3ad paint, tools: Minor fixes to MyPaint Brushes code
* Anders Jonsson noticed a typo where the
'r' in "pressure" was left off in the Gain
parameter description
* Since 0.0 is an invalid value for the viewzoom
parameter in MyPaint, the cut off is adjusted
to be greater than 0, not greater than or
equal to 0.
* The default viewzoom value is set to 1.0f,
100%, rather than 0.0001, very zoomed out.
2025-07-10 01:39:36 +00:00
Anders Jonsson
3e781dde6b plug-ins: add name label for brush pipe selection modes
Previously selection mode variables were shown as-is with
their name in a drop-down in the brush pipe export dialog.
Add a label so we can have nicer strings for the GUI and
also make them translatable.
2025-07-10 01:30:00 +00:00
Niels De Graef
fcca547dd6 app: Expose Controller types as GListModel 2025-07-10 00:57:08 +02:00
Alx Sa
ea8b9dc13c core, paint, tools: Port to MyPaint Brushes2
This patch ports our MyPaint code to use the
MyPaintSurface2 API, allowing us to support
version 2 MyPaint Brushes correctly.
The API update lets us take into account
the zoom factor and rotation of the canvas
when drawing. It also adds a "Gain" option
to the GUI in order to control the strength
of the input's pressure (tablet or mouse).
As a caveat, this patch does not yet
implement spectral/pigment blending.
2025-07-09 22:14:42 +00:00
Jacob Boerema
4dd729ba42 plug-ins, tiff: fix crash with clang when querying TIFFTAG_SUBIFD
The TIFFTAG_SUBIFD has a 16-bit length parameter, but we were using a
32-bit int that was not initialized to 0.
Apparently on clang when returning this value the high bits are not
set to 0.
This caused an incorrect high value which caused a stack overflow.
To fix this we change the type to gint16.

See issue #14432.
2025-07-09 17:26:51 -04:00
Aefgh Threenine
0dbc19d303 Update Thai translation 2025-07-09 09:43:26 +00:00
Aefgh Threenine
ca3706cadf Update Thai translation 2025-07-09 08:21:34 +00:00
Aefgh Threenine
39b28cd98c Update Thai translation 2025-07-09 07:28:11 +00:00
Jehan
f0357800bc NEWS: update. 2025-07-08 17:18:58 +02:00
Alx Sa
5f65133e20 pdb: Set image file when using gimp-file-save
gimp_file_save () lets you save an image to
any supported file format, but it did not
update the GimpImage's file or exported
file accordingly. This patch adds code to
do just that, patterned after /app/file/file-save.c's
file_save ().
2025-07-08 14:06:00 +00:00
Niels De Graef
53750e2699 app: Make sure GimpControllerManager emits changes 2025-07-08 15:41:28 +02:00
Niels De Graef
441590ade1 app: Implement GListModel in GimpControllerManager
This'll help us later on to migrate `GimpControllerList` to more modern
widgetry.
2025-07-08 12:52:07 +02:00
Niels De Graef
fcdbd74071 app: Split off GimpControllerManager
Transform the `GimpControllerManager` so it encapsulates all the logic
related to managing all `GimpControllerInfo` objects, so we can pass
that object around, rather than dealing with the `Gimp` struct
everywhere and pretty hackishly retrieving the manager struct using
`g_object_get_data()`. By also making it a proper `GObject`, we can
later put even more logic onto it.
2025-07-08 12:52:04 +02:00
Luming Zh
977a02b702 Update Chinese (China) translation 2025-07-07 23:51:43 +00:00
Michael Natterer
5559a1d487 meson.build: remove stuff about G_DISABLE_DEPRECATED, it's gone 2025-07-08 01:22:12 +02:00
Michael Natterer
89ea91df96 app, libgimp*: more g_set_str() and some other stuff in the same
spirit
2025-07-08 00:37:26 +02:00
Jehan
38a00aca7c app: migrate toolrc from 2.10 or 3.0.
It seems we were never migrating toolrc since GIMP 2.4 (commit
152af52bfe) but that means that people were losing their toolbox
configuration at every minor release.

Let's migrate recent toolrc, and rename the path tool. I went back to
2.10 because apparently if tools are missing, the toolrc parsing would
fail. Anyway we have no new tools in 3.0 or 3.2. We'll see how to
properly migrate this file when we'll also add new tools but there is no
reason to lose this configuration at each software update.
2025-07-07 23:57:32 +02:00
Michael Natterer
199eecfb66 app: use g_set_str() in some places, it's hell yeah! 2025-07-07 22:55:44 +02:00
Alx Sa
2bbe19589d themes: Prevent system theme leak in dialogue frames
Resolves #14421
This patch provides a CSS rule for GtkFrame borders inside of
a dialogue (see Filmstrip plug-in GUI for an example) to prevent
a system theme leak from altering the color.
2025-07-07 19:24:02 +00:00
Michael Natterer
74271cd834 app: quote the font name in the previous commit, and some cleanup 2025-07-07 20:13:42 +02:00
Jehan
a0ca190ca9 app, etc: fix sessionrc from GIMP 3.0 to 3.2. 2025-07-07 20:10:56 +02:00
Michael Natterer
082a88d02d app: fix warnings about deprecated gtk_widget_override_font() by using
a GtkCssProvider. Thanks Carlos!
2025-07-07 20:01:33 +02:00
Yuri Chornoivan
aaa659c011 Update Ukrainian translation 2025-07-07 17:28:49 +00:00
Jehan
421995ae35 app: fix migration of updated action names. 2025-07-07 19:14:53 +02:00
Martin
906a07fc12 Update Slovenian translation 2025-07-07 16:51:38 +00:00
Martin
5eec8c1c72 Update Slovenian translation 2025-07-07 16:51:21 +00:00
Michael Natterer
62384ac915 app: make sure shortcutsrc gets updated with vector -> path when going
from 3.0 to 3.2.
2025-07-07 18:47:22 +02:00
Michael Natterer
1e5792449c app: use gimp_image_set_selected_items() in gimpitemtreeview-search.c
so it's prepared for all kinds of items.
2025-07-07 18:28:08 +02:00
Michael Natterer
5378402d69 app: add gimp_image_set,get_selected_items() which take a GType 2025-07-07 18:19:03 +02:00
Niels De Graef
337c2bbde0 extensions: Ignore all C warnings in Vala
Vala is being silly again and emitting code that is generating a ton of
C warnings that we can't really do anything about. Just ignore all C
warnings (while keeping the Vala warnings of course).
2025-07-07 18:10:47 +02:00
Michael Natterer
76caac9481 libgimp, libgimpwidgets: fix (closure) annotations. 2025-07-07 17:59:32 +02:00
Michael Natterer
1e502371d8 app: vectors -> path in test-xcf.c 2025-07-07 17:23:25 +02:00
Michael Natterer
6a3256ad69 app, menus: rename the vector-toolpath menu stuff to tool-path 2025-07-07 16:32:20 +02:00
Michael Natterer
4ce5181cc5 app, menus: vectors -> path in dialog and action identifiers 2025-07-07 16:16:48 +02:00
Jehan
8a55eec2a9 app: remove a bunch of useless, disabled tests.
We just agreed that there is no point in keeping these forever if they
have not been fixed for years. They only produce warnings and also they
likely won't work in Wayland anyway so they probably *can't* be fixed
without heavy updates.
2025-07-07 16:09:53 +02:00
Jehan
a79d58989e app: fix shortcutsrc from 3.0 to 3.2.
tools-vector becomes tools-path.
2025-07-07 16:09:53 +02:00
Michael Natterer
e6d11e350e app: remove all "vectors" variables to "path" in app/xcf/ 2025-07-07 16:05:07 +02:00
Michael Natterer
69f84942fa app: rename app/vectors/ to app/path/ 2025-07-07 15:44:15 +02:00
Jehan
e3a940ffae app: handle Overwrite layer mode in switch.
This mode should never be used as layer mode anyway but it must still be
listed.

Fixes:

> app/core/gimpimage.c:2837:7: warning: enumeration value ‘GIMP_LAYER_MODE_OVERWRITE’ not handled in switch [-Wswitch]
2025-07-07 15:33:31 +02:00
Yuri Chornoivan
97dfa4ea65 Update Ukrainian translation 2025-07-07 13:20:39 +00:00
Michael Natterer
73352992e3 app: rename vectors-type,enums.h to path-type,enums.h 2025-07-07 15:16:37 +02:00
Michael Natterer
d88a3b9345 app: rename enum GimpVectorExtendMode to GimpStrokeExtendMode
and give namespace to its values.
2025-07-07 15:05:59 +02:00
Michael Natterer
bf405d3d93 app: vector -> path in gimppathtool.[ch] and some config files 2025-07-07 14:56:41 +02:00
Michael Natterer
775c7ef825 app: vector -> path in GimpPathOptions 2025-07-07 14:33:12 +02:00
Michael Natterer
a15fa05d4c app: remove gimpvectortool,options.[ch] to gimppathtool,options.[ch]
Don't change any code just yet, just the files removed.
2025-07-07 14:24:51 +02:00
Michael Natterer
f5900020d3 app: more vectors -> path, mostly in GimpToolPath 2025-07-07 14:16:50 +02:00
Michael Natterer
6d2c71591d app: GimpToolPath: rename "path" to "tool_path" and private->path to
private->canvas_path
2025-07-07 13:37:27 +02:00
Michael Natterer
bee7b8713b app, pdb: a lot of vectors -> path renaming 2025-07-07 13:18:02 +02:00
Alx Sa
aff70406c0 plug-ins: Initialize UI for too-large SVG imports
Resolves #14417
As a security measure, if the user tries to load an SVG
that's larger than the specified limit, we show a warning dialog
that informs them of the possible security risk and lets them
decide if they actually want to open it. However, we did not call
gimp_ui_init () before trying to show this dialogue - resulting in
a crash. This patch adds a call to initialize the UI before creating
gimp_dialog_new ().
2025-07-07 11:05:53 +00:00
Michael Natterer
12716a9377 app: make sure the search popup is never shown without and image,
and don't update it when there is no image
2025-07-07 11:29:03 +02:00
Michael Natterer
5360264ca8 app: never create a new linked group when the search popup is closed
with "Escape".
2025-07-07 11:19:15 +02:00
Ekaterine Papava
6074587094 Update Georgian translation 2025-07-07 08:14:17 +00:00
Luming Zh
72ea198032 Update Chinese (China) translation 2025-07-07 00:01:35 +00:00
Michael Natterer
1e9979349a po: update POTFILES.in 2025-07-07 00:26:35 +02:00
Alx Sa
96fb97d3fa libgimp: Make comment text sensitive based on...
...if Save Comment option is enabled.
Currently, it's possible to unknowingly export an image
without a comment, even if it exists, if the "Save Comment"
option is left unchecked. This patch adds a signal whenever
the "Save Comment" checkbox is clicked (and when the dialogue
is first opened) that uses its active status to set the sensitive
status of the comment text area. If unchecked, the text area will
be marked as insensitive so it can't be edited.
2025-07-06 18:45:58 +00:00
Michael Natterer
853b0ece14 app: move the layer search and link code to its own file 2025-07-06 20:16:37 +02:00
Marco Ciampa
bc25103e89 Small fix in Italian translation 2025-07-06 18:47:40 +02:00
Yuri Chornoivan
8a08fd1c12 Update Ukrainian translation 2025-07-06 16:29:10 +00:00
Jehan
8a6e9a4a3b app: get rid of build warning.
Fixes:

> app/main.c:1094:3: warning: format not a string literal and no format arguments [-Wformat-security]
2025-07-06 14:47:41 +02:00
Bruno Lopes
7f527d8c72 build/linux: Update poppler, libheif and graphviz modules
poppler: Update poppler-25.06.0.tar.xz to 25.07.0
libheif: Update libheif-1.19.8.tar.gz to 1.20.1
graphviz: Update graphviz-13.0.1.tar.gz to 13.1.0
2025-07-06 14:14:11 +02:00
Alx Sa
06915ec881 libgimpbase: Add mnemonics to Convert Indexed options 2025-07-06 01:44:11 +00:00
Michael Natterer
f016b61ebc app: use an enum for the label indices in GimpHistogramEditor 2025-07-05 17:32:34 +02:00
Michael Natterer
8db521d059 app: repack "Compute unique colors" in GimpHistogramEditor so the
entire widget doesn't require an insane width.
2025-07-05 16:30:06 +02:00
Michael Natterer
fd3852af31 pdb: remove -private suffixes
from gimp-drawable-append-filter and -merge-filters. They are not
needed any longer, and it's not an API change because they are
private.
2025-07-05 14:15:17 +02:00
Michael Natterer
6221bdb503 app, libgimp: minor whitespace and formatting cleanup 2025-07-05 12:58:03 +02:00
Michael Natterer
7eac33fba3 app: add gimp_set,get_last_template() and use is from gimpimage-new.c
instead of using gimp->image_new_last_template directly.
The first call to gimp_get_last_template() will create
gimp->image_new_last_template on demand and thus make sure the first
new image is always matching what is set in preferences. All later
images will still default to the last image created in this
session. Fixes #14378.
2025-07-05 12:42:14 +02:00
Kolbjørn Stuestøl
2c767fdb51 Update Norwegian Nynorsk translation 2025-07-04 17:25:08 +00:00
Kolbjørn Stuestøl
b6fee8dc1b Update Norwegian Nynorsk translation 2025-07-04 17:20:31 +00:00
Alx Sa
47f94bc6a3 plug-ins: Show frames in Playback progress bar
In GTK3, GtkProgressBar does not show the frame numbers
by default. This is a regression from GIMP 2.10, so we need
to call gtk_progress_bar_set_show_text () after creating it
to restore the text display.
2025-07-03 17:07:11 +00:00
Alx Sa
dbe5bc7d5d core: Fix Alpha to Selection on single no-alpha layer
Resolves #14392
When using Alpha to Selection on a single layer with no
transparency, we were not cropping the selection channel
from the image size to the the layer size. As a result, we were
essentially performing Select All instead of only selecting the
area of the layer itself.
This patch refactors gimp_channel_combine_items () in its
single layer check, to create a mask for single layers with no
alpha that is the size of the layer. It's then used to crop the
image channel the same way the alpha channel does for layers
that have transparency.
2025-07-03 13:55:11 +00:00
Ekaterine Papava
d54e2749eb Update Georgian translation 2025-07-03 03:45:15 +00:00
Alx Sa
1ec2641941 gui, widgets: Use system colors on Windows title bar...
...when System colors theme is set.
Previously, we just checked if the theme
was set to Light or not and used that to
decide the title bar colors. With the
System colors theme, this was no longer
valid logic.
This patch renames
themes_win32_is_darkmode_active () to
gimp_is_win32_system_theme_dark (), and
moves it to gimpwidgets-utils.c so that
it can be accessed by functions that
need to determine Windows mode
settings. We then use it to determine
dark mode if the System colors theme
is set, and use the original logic otherwise.
2025-07-01 16:49:55 +00:00
Bruno Lopes
a989cec59c build/windows: Make deps installation command work on PowerShell 7
See: #14376
2025-07-01 07:30:33 -03:00
Jacob Boerema
d4581baf25 ci: increase timeout for file-plug-in-tests
The file-plug-in-tests sometimes fail due to timeout on slower runners.
Let's see if increasing it from the default 20 to 30 minutes helps.
2025-06-30 12:07:11 -04:00
Marco Ciampa
7d8ff8eb48 Small fix in Italian translation 2025-06-29 23:03:36 +02:00
Jacob Boerema
6f36667ab8 app: silence warning about unused install_flatpak_gimpdir
This function is only used on Unix, so encapsulate it in a define.
2025-06-29 12:25:33 -04:00
Jacob Boerema
204ddaae56 app: fix #14312 on first run copies settings from 2.10 instead of 3.0
I noticed when running 3.1.2 for the first time it copied settings
from 2.10 instead of 3.0 as I would expect.

Investigation shows that the major version number is hardcoded to 2,
so let's change that to major.
In addition to that, the outer loop continues running even when we
found a migration path if there is a lower major version number
available. Let's change this so we stop when migrate is TRUE.

Also fix some issues that could hit us in the future:
- Change the value of `major` in the for loop from a hardcoded value
to using `GIMP_MAJOR_VERSION`.
- The flatpak specific testing is for version 2.10 but only tested
the minor version. Change that to make sure major is 2.
2025-06-29 12:20:17 -04:00
Bruno Lopes
4b549c61f2 build/linux: Restrict Gexiv2 module version to the API we support
See the explanation in: #14361
2025-06-29 10:48:26 -03:00
Martin
428d76962b Update Slovenian translation 2025-06-29 10:40:30 +00:00
Luming Zh
488a3180a4 Update Chinese (China) translation 2025-06-29 01:36:08 +00:00
Bruno Lopes
1de46ae757 gitlab-ci, INSTALL: Install flex and bison for .map support on AppImage
See: #14145
2025-06-28 12:54:16 -03:00
Yuri Chornoivan
adc9e7cfd3 Update Ukrainian translation 2025-06-28 11:20:17 +00:00
Gabriele Barbero
0ebbfaa3c1 dialogs: indicate when GIMP is up to date in About dialog
To make more clear to users that GIMP is up to date, the About dialog now
shows "Up to date" along with the timestamp of the last update check.
If there's a new update available, it will show only the timestamp
of the last update check.
2025-06-28 09:15:46 +00:00
Yuri Chornoivan
2a00ccf018 Update Ukrainian translation 2025-06-28 08:30:14 +00:00
Luming Zh
d5e3aca09e Update Chinese (China) translation 2025-06-27 23:55:40 +00:00
Jehan
83dca4d9be tools: fix my flatpak install script for Nightly.
The AppId for our nightly flatpak is now different.
2025-06-27 20:55:37 +02:00
Bruno Lopes
d055c0fbd1 app: Do not create separate local data dir on macOS
Closes #13079

We don't know if ~/Library/Caches (NSCachesDirectory) is
the practical equivalent of $XDG_CACHE_HOME on Linux or
%LocalAppData% on Windows so let's just drop 3.00 for now.
2025-06-27 12:36:39 -03:00
Alx Sa
51547d427a core: Consistent naming pattern for symmetry options
Per Reju, the checkbox options for Symmetry should only have
the first word capitalized to match our style guide.
2025-06-27 14:26:34 +00:00
Alx Sa
718487ee5d widgets: Prevent icons shifting with layer selection
Showing and hiding the "%d selected items" text in the
ItemTreeView header causes the height of the header to
shift slightly. This is most noticeable on the layer dockable,
as it has a search icon which moves up and down.
To prevent this, we can switch to using gtk_widget_set_opacity ()
to hide and show the text, as the height stays consistent.
2025-06-26 15:20:18 +00:00
Bruno Lopes
f8d54fe65a app: Set LIBTHAI_DICTDIR on macOS bundle
In preparation for Infrastructure/gimp-macos-build!333

Also, explain why we are setting env vars since
setting env vars is usually runtime-pervasive.
2025-06-26 12:09:52 -03:00
Alexander Shopov
c0892fd7a5 Update Bulgarian translation 2025-06-26 06:36:20 +00:00
Luming Zh
283b6954e4 Update Chinese (China) translation 2025-06-25 11:12:22 +00:00
Ekaterine Papava
e896e15144 Update Georgian translation 2025-06-25 10:20:18 +00:00
Marco Ciampa
013135505e Update Italian translation 2025-06-25 08:34:41 +00:00
Marco Ciampa
ca38e4f7f8 Update Italian translation 2025-06-25 08:30:26 +00:00
Marco Ciampa
54811fea34 Update Italian translation 2025-06-25 08:27:02 +00:00
Marco Ciampa
6e262db1c4 Update Italian translation 2025-06-25 08:26:51 +00:00
Marco Ciampa
e8e845e6fa Update Italian translation 2025-06-25 08:26:37 +00:00
Yuri Chornoivan
1746f4e352 Update Ukrainian translation 2025-06-25 07:46:55 +00:00
Martin
b4020be31c Update Slovenian translation 2025-06-24 18:52:00 +00:00
Ondřej Míchal
47f2a591f8 plug-ins/sphere-designer: Port GimpSpinEntry to GimpSpinScale
GimpSpinEntry is problematic to use when there's little horizontal space
because the slider becomes too small. GimpSpinScale does not suffer from
this because it uses the available space more efficiently. These days it
is also used more over GimpSpinEntry.

Related: https://gitlab.gnome.org/Teams/GIMP/Design/gimp-ux/-/issues/503
2025-06-24 17:37:48 +00:00
Jacob Boerema
a8339021f8 app: fix #14311 Incorrect loading of Photoshop pattern with alpha channel
We did not load the alpha channel when loading Photoshop patterns.
The Photoshop pattern format doesn't tell you whether a pattern has
an alpha channel. You can only find out by reading the color channels
first and then checking if there is enough room for another channel.
In addition to that there is also an 88-byte empty space before the
alpha channel.

To fix this, we now always add an alpha channel to the pattern and
then check if there is enough room. We separated the code inside the
channel reading loop into a separate function, which is now also
called if an alpha channel is detected. If none is detected, we
initialize that channel to 255 (fully opaque).

Besides this a few minor error checking improvements were made:
- Only show the unsupported color mode text once per pattern file.
- Only accept 8-bit color channels, other values will print a console
warning.
2025-06-24 13:12:38 -04:00
Alx Sa
1c71e30cd0 widgets: Confirm image is indexed before setting entry
It is possible to have an indexed image open
in one tab, and RGB/grayscale images open
in others. If you have the color editor open
and swap between them, you'll receive a
CRITICAL because the ColorMapEditor will
always try to update a color entry even if
the active image is not indexed.

This patch adds checks to ensure you have
the indexed image open before trying to update
its color entry.
2025-06-24 14:38:20 +00:00
Anders Jonsson
5baabdb4b2 plug-ins: Mark TIM name as per-process translatable 2025-06-23 23:45:48 +00:00
Bruno Lopes
b2ae719c41 build/windows: Update gimp-data commit 2025-06-23 11:51:03 -03:00
Jehan
f1c781936c app: allow GIMP_DEV_VERSIONS_JSON to be empty for disabling it.
It makes it easier to have it set all the time and when I want to
disable it, I just prepend my command with GIMP_DEV_VERSIONS_JSON=.
2025-06-23 14:25:26 +02:00
Jehan
e38ea2d866 desktop: fix last release date.
I forgot to update the date after the last small delay.
2025-06-23 14:25:26 +02:00
Bruno Lopes
fc06a435fa build/linux: Fix OpenBLAS comment position 2025-06-23 07:06:06 -03:00
Alx Sa
f3b676f9cf core: Free drawables after use
In gimp_edit_copy (), there is a code path where
we iterate through drawables *after* we had freed it.
This patch moves the code that frees "drawables" until
after its final usage.
2025-06-23 02:21:49 +00:00
Jehan
d5e07db771 meson: post-release version bump to 3.1.3. 2025-06-23 00:57:10 +02:00
Kolbjørn Stuestøl
14e44cf961 Update Norwegian Nynorsk translation 2025-06-22 21:38:21 +00:00
Jehan
b4e2570461 Release GIMP 3.1.2. 2025-06-22 16:20:52 +02:00
Kolbjørn Stuestøl
88aba102a7 Update Norwegian Nynorsk translation 2025-06-22 12:39:42 +00:00
Jehan
9666d28ed5 build, gimp-data: compute splash ratio for Windows installer. 2025-06-22 12:00:29 +00:00
Ekaterine Papava
dc26f99521 Update Georgian translation 2025-06-22 02:49:42 +00:00
Luming Zh
1656fdeaf6 Update Chinese (China) translation 2025-06-22 02:27:49 +00:00
Luming Zh
ecfceffe6c Update Chinese (China) translation 2025-06-22 02:24:32 +00:00
Jehan
2a05ee6a44 gimp-data: bump the submodule again.
Make sure the splash file is not oversized when the original XCF is
high-bit depth.
2025-06-22 00:16:49 +02:00
Bruno Lopes
464b1fb32f build: Only bundle the strictly needed .typelib files
Otherwise plug-in developers would rely on .typelib available only on
Linux OR macOS OR Windows so create unportable/broken .py plug-ins.
2025-06-21 18:40:22 -03:00
Jehan
1632e24dbd gimp-data: bump to fix Windows installer's images. 2025-06-21 23:12:22 +02:00
Jehan
2f5b2b5bca NEWS: update. 2025-06-21 22:37:11 +02:00
Jehan
7b14c5b9fa desktop: update AppStream and add demo scripts. 2025-06-21 22:36:44 +02:00
Jehan
c5b52a5ad3 app, modules: add some identifiers for demo scripts. 2025-06-21 22:36:44 +02:00
Jehan
48934e4eb4 app: make color selector modules' names their identifier for demo scripts. 2025-06-21 22:36:44 +02:00
Jehan
1b012548c9 app: add ability to click any button in our Release Notes demo scripts. 2025-06-21 22:36:44 +02:00
Yuri Chornoivan
9c49e276e0 Update Ukrainian translation 2025-06-21 17:49:53 +00:00
Yuri Chornoivan
afc904c5cc Update Ukrainian translation 2025-06-21 17:14:39 +00:00
Jehan
b35b0cad0a gimp-data: bump to latest.
- Some Legacy icons copied from Default icon theme.
- New splash screen for GIMP 3.1.2.
2025-06-21 16:40:29 +02:00
Martin
0b47045bb1 Update Slovenian translation 2025-06-21 13:46:31 +00:00
Martin
365c4d4c6a Update Slovenian translation 2025-06-21 13:46:13 +00:00
Jehan
97b8ddbdff NEWS: update per Bruno's comment. 2025-06-21 15:26:00 +02:00
Bruno Lopes
c1422a9008 build/linux: Update graphviz module 2025-06-21 08:59:25 -03:00
Jehan
fc5c59a643 NEWS: update. 2025-06-21 13:03:35 +02:00
Jehan
23f9d8748c desktop: going for release today. 2025-06-21 12:30:22 +02:00
Bruno Lopes
ccf592d28b plug-ins: Mark LNK and ICNS descriptions as per-process translatable 2025-06-21 10:05:17 +00:00
Bruno Lopes
d495994082 plug-ins: Mark FF, AVIF, LNK, QOI and ICNS names as per-process translatable 2025-06-21 10:05:17 +00:00
Ekaterine Papava
b462371b2e Update Georgian translation 2025-06-21 04:42:25 +00:00
Ekaterine Papava
0e35ebf282 Update Georgian translation 2025-06-21 04:39:11 +00:00
cheesequake
afecf9f6c6 Issue #14074: Resize image to layers irrespective to selections
By moving the block of code to resize the image to layer size outside
the has_selection condition, we ensure that a smaller layer without
selection also gets resized properly.
2025-06-21 00:08:11 +00:00
Jehan
fbf58140eb app: include mask_value as part of the target alpha value.
The existing usage of the mask value was as interpolation variable,
which is a different usage. If we werent doing this, trying to paint
with tool opacity to 100 and a paint dynamics changing opacity, we'd
still have 100% opaque pixels instead of lowered opacity.
2025-06-20 23:24:10 +00:00
Jehan
8dbedcf723 app: review and improve over MR !151 for an "Overwrite" paint mode.
I get why Woynert wanted to still interpolate both alpha and RGB
channels here, avoiding some too harsh transition when using the brush
tool. But the algorithm felt overly complicated (unless I misunderstood
the reason). I think what we want is simply to use the mask value to
interpolate, which allows the alpha and color to smoothly transition in
parts where the brush designer was expecting transitionning, when used
in a paintbrush-type tool.
In particular the proposed algorithm was never using the layer[ALPHA]
value which felt quite weird.

Additionally to the algorithm update, this commit:

* Makes the composite mode/space and blend space explicitly immutable.
* Removes code from other composite modes, which was anyway just
  copy-paste remnants from gimp:normal operation and add some
  g_return_val_if_reached() call to protect these code paths.
* Fix a code path where the out array was never filled (i.e. it was
  filled with random data).
* Fix another code path where we could make a division by zero (in my
  case, it didn't crash, but I got nan values).
2025-06-20 23:24:10 +00:00
woynert
a188a8db93 app,libgimp: paint blend mode 'overwrite' 2025-06-20 23:24:10 +00:00
Luming Zh
63e3a2436d Update Chinese (China) translation 2025-06-20 23:12:23 +00:00
Bruno Lopes
35b3cdf31c gitlab: Update coding style URL pointing to gimp-web-devel 2025-06-20 18:50:16 -03:00
Bruno Lopes
c854ca5f45 gitlab: Don't allow clang-format to fail silently
It is not useful for code style debugging this way.
2025-06-20 18:49:27 -03:00
Martin
59fd0d02ee Update Slovenian translation 2025-06-20 19:54:10 +00:00
Bruno Lopes
ff1bd20577 data: Fix obscure environ files on Windows
Following 36b660e2b2

- PATH was being set due to the Installer and MSIX but
  on my tests on both relocatable and Unix-style builds it
  was bogus. C and Py plug-ins worked without problems
- Same aplies to GI_TYPELIB_PATH, it is obscure and useless
2025-06-20 16:30:34 -03:00
Sam James
36b660e2b2 meson: fix typo on GIMP_TESTING_ENVIRON_DIRS
This fixes some "illegal variable" noise in the build. There can't
be any dynamically created environment files in the *source* directory,
but there may be in the *build* directory we're modifying.
2025-06-20 13:23:21 -03:00
Yuri Chornoivan
9039e35b01 Update Ukrainian translation 2025-06-20 15:44:02 +00:00
Jacob Boerema
c17b324910 plug-ins/dds: fix #12790 for 32-bit
On 32-bit systems the computed linear size can overflow, causing a
crash.
Use a function that checks for overflow when multiplying and return
an error if that fails.
As extra security also update the loop to compute the base offset after
each line of data, and convert to gsize first when computing the
size for g_malloc and memset.
2025-06-20 10:29:43 -04:00
Martin
693a6c5938 Update Slovenian translation 2025-06-20 07:06:49 +00:00
Alx Sa
56c83101e9 plug-ins: Import legacy PSD Inner Shadow
This patch adds support for loading and
applying active legacy Inner Shadow
layer styles in PSD images. It uses
gegl:inner-glow with certain preset values
to replicate the Photoshop filter.
2025-06-19 23:32:42 +00:00
Jehan
7262faed16 app, pdb: allow rendering font previews with theme colors.
This also depends on the same settings to render brushes with theme
colors, because this is data, not user interface. Therefore following
theme colors is not necessarily what creators would expect.
2025-06-20 00:11:08 +02:00
Jehan
e41776ef39 app: clean out unused functions. 2025-06-20 00:11:08 +02:00
Kolbjørn Stuestøl
40845e1961 Update Norwegian Nynorsk translation 2025-06-19 20:01:29 +00:00
Kolbjørn Stuestøl
cf817b96a3 Update Norwegian Nynorsk translation 2025-06-19 19:57:13 +00:00
Kolbjørn Stuestøl
aac4e49a47 Update Norwegian Nynorsk translation 2025-06-19 19:49:23 +00:00
Bruno Lopes
6c5401b9da build/linux: Explain the purpose of $APPENDED_LIST 2025-06-19 16:25:16 -03:00
Bruno Lopes
f59b83ed6c build/linux: Reorganize a bit the files section of AppImage script
This makes it a bit more similar to the Windows bundling script so
easier to read and maintain in the future.
2025-06-19 16:20:00 -03:00
Alx Sa
a39355ca4d actions: Select next palette entry after deletion
Unlike other dockables such as brush and patterns,
deleting a palette color does not automatically select
the next one. This makes it difficult to delete multiple
colors in a row. This patch gets the current index before
deleting the color, and then uses it to select the next entry
afterwards.
2025-06-19 18:57:08 +00:00
Bruno Lopes
2defc3d07b build/linux: Delete some whitespaces on Flatpak deps script 2025-06-19 14:45:08 -03:00
Bruno Lopes
aa10583576 gitlab: Add soft check against bashisms
Even .sh (Unix) scripts being "forbidden" by us on Meson to
allowing GIMP being 100% natively built on Windows, it is a
good pratice anyway .sh being portable even outside Meson.
2025-06-19 11:31:43 -03:00
Ondřej Míchal
073a7a208f app: Unref GtkFileFilter only when a file loader has extensions set
gimp_file_proc_view_process_procedure() can return NULL in case a file
loading procedure does not have any extensions set.
2025-06-19 14:13:40 +00:00
Alx Sa
58a0c1d31e tools: Don't alter merge filter status unexpectedly
Currently, some GEGL filters must always be merged because
we don't yet have a way to store GimpDrawables with filters.
When creating these filters as part of the Filter Tool, we were
changing the "merge-filter" property directly. This mean that
if you had previously set the Filter Tool to be non-destructive,
it would be destructive the next time you added a filter (even if
the filter supported NDE).

This patch creates a separate boolean variable (initialized to the
current state of "merge-filter") and uses that instead in the
gimp_filter_tool_create_filter () function. This allows us to still
force filters with aux pads to always merge, while not affecting
the user's preferences for other NDE filters.
2025-06-18 23:14:36 +00:00
Yago Raña
fe19572cd1 Update Galician translation 2025-06-18 18:12:11 +00:00
Bruno Lopes
f4b2c99a5d gitlab: Refine meson-health failure catching
- Add backslash to avoid dots being treated as wildcards by grep
- Do not allow search-common-ancestor to fail silently anymore
2025-06-17 21:13:32 -03:00
Alx Sa
c6655c2eac plug-ins: Correct Legacy PSD layer style loading format
Per Wormnest, the 4 bytes allocated to
PSD Legacy Dropshadow properties are
meant to be used for fixed floating point
values rather than integers. This patch
corrects the PSD layer resource struct and
how the data is loaded, based on prior
work by Wormnest.
2025-06-17 16:25:48 +00:00
Yuri Chornoivan
879aa8e89f Update Ukrainian translation 2025-06-17 13:51:36 +00:00
Bruno Lopes
078abb5f93 gitlab-ci: Use printf to fix Docker RUN of GL Collapsible Sections
This fixes some problems of output in the deps script and
makes everything more consistent.
2025-06-17 08:51:43 -03:00
Martin
877e500d0f Update Slovenian translation 2025-06-17 11:40:52 +00:00
Luming Zh
09720123d3 Update Chinese (China) translation 2025-06-17 01:48:58 +00:00
Bruno Lopes
fd47161215 gitlab, build, tools: Port bashisms to POSIX-compliant code
Although these scripts are not called by Meson, portability outside the
build system is always welcome (specially on macOS or non-GNU OSes).
2025-06-16 22:06:06 -03:00
Ekaterine Papava
b9d30cb3a2 Update Georgian translation 2025-06-16 20:46:10 +00:00
Alexander Shopov
1352857579 Update Bulgarian translation 2025-06-16 20:45:52 +00:00
Alx Sa
f94b43ecbf plug-ins: Add export support for PSB images
Photoshop's PSB format is nearly the same
as PSD. The main differences are that it
allows you to save images up to
300,000 by 300,000 pixels, and it doubles
the size of pointers related to pixel data
(such as layers and channels).
2025-06-16 18:57:22 +00:00
Jehan
1b9c78dc12 app: move the follow-theme toggle to GimpDataFactoryView.
By being in GimpContainerIconView, the toggle was only being shown in
grid view, even though it also affected the list view. So we move it up
to the container, next to the query tag entry.

Also I am adding a function to make this toggle visible only when
requested. And so far, we only request it for the Brushes dockable,
because it doesn't do anything on other data dockables (we added some
code to follow theme, for instance in Palettes dockable, but it doesn't
depend on this setting, because it doesn't touch data render, only GUI
render where it's normal to follow theme).

The latter function fixes issue #14260.
2025-06-16 12:13:15 +02:00
Jehan
8628ad77c1 app: make sure we invalidate brush renderers when "viewables-follow-theme" changes. 2025-06-16 11:55:34 +02:00
Alx Sa
bd79df9858 themes: Fix system theme leak on notebook header
Some system themes add a box shadow and change borders
for GtkNotebook headers. This patch adds rules defining these,
along with defining the outline for header buttons when hovered
over.
2025-06-15 17:08:14 +00:00
Jehan
55bad480b8 README: this is a development branch now. 2025-06-15 17:46:41 +02:00
Jehan
c6c00ddccc INSTALL: update.
This text should also be a bit more robust to future (more frequent now)
minor version bumps.
2025-06-15 17:43:59 +02:00
Jehan
423b1d027f NEWS: update. 2025-06-15 17:29:40 +02:00
Jehan
cc21e6d70b app: fixup commit be1496a91e implementing unique color count.
- Improve the hash: doing the value computation in guint64, we'd
  wrap-around the max guint64, which mostly means that we'd drop all
  high bits! Therefore the hash doesn't depend at all on the most
  significant bits. Instead let's do our computation in double and
  convert to guint in the end. I am not 100% sure if it is that much
  better, to be fair (thinking in term of color: the old hash function
  depended on the least significant color channels; I do wonder if it
  could not make collisions more frequent but I'm not sure). The
  wrap-around hash function should be fairly distributed too, but then
  maybe we should just use guint directly in this case.
- The computation of unique colors was leaking all the GBytes but the
  last! First we must use g_hash_table_new_full() to set a free function
  for inserted keys, then we must free every non-inserted key ourselves.
- The "n/a" string should be localized (it's English acronym).
- Also display this "n/a" in italic to make it clearly different from
  computed numbers.
2025-06-15 17:23:06 +02:00
Jehan
22a14d6248 app: fix a few build warnings.
- gimp_pattern_load_photoshop_pattern() should be a static function.
  Fixes:

> app/core/gimppattern-load.c:39:1: warning: no previous declaration for ‘gimp_pattern_load_photoshop_pattern’ [-Wmissing-declarations]

- Fix wrong format for goffset values:

> app/core/gimppattern-load.c:137:16: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘goffset’ {aka ‘long int’} [-Wformat=]
2025-06-15 15:53:55 +02:00
Bruno Lopes
16cbcb828c build/windows: More metainfo cleanup
Following 088dd8aa9f
2025-06-14 17:35:56 -03:00
Alexander Shopov
05aeba9740 Update Bulgarian translation 2025-06-14 20:26:49 +00:00
Yuri Chornoivan
0acc8ffba3 Update Ukrainian translation 2025-06-14 17:44:52 +00:00
Bruno Lopes
26c2fe9e3d build/linux: Add comment about why libbacktrace is custom built 2025-06-14 12:46:41 -03:00
Bruno Lopes
c10d5c1138 build/windows: Add comment about glib schemas bundling
Otherwise, I and the future packagers will forget the reasoning behind
why glib schemas on Windows diverges from Linux bundling (e.g. AppImage).
2025-06-14 12:31:40 -03:00
Bruno Lopes
088dd8aa9f build/windows: Complete share/metainfo cleanup
Completes 47212318

I missed the .iss script so it would fail. Removing from it, then.
2025-06-14 11:38:11 -03:00
Bruno Lopes
c3bf6ae3ba build/windows: Add explanation about .pdb Symbol Server 2025-06-14 10:14:54 -03:00
Anders Jonsson
e44a6db7a5 Update Swedish translation 2025-06-14 11:03:55 +00:00
Anders Jonsson
681e92ee7a Update Swedish translation 2025-06-14 11:00:58 +00:00
Martin
ea69356e52 Update Slovenian translation 2025-06-14 05:43:37 +00:00
Luming Zh
c0bc06f7ea Update Chinese (China) translation 2025-06-14 01:15:00 +00:00
Bruno Lopes
d178d741b0 build/linux: Sync Flatpak nightly modules with Flathub branches 2025-06-13 21:52:11 -03:00
Bruno Lopes
ac320fb6a6 build/linux: Enable dependency check on Nightly flatpak
Inspired by https://github.com/flathub/org.gimp.GIMP/pull/437

Now, in the weekly builds the job will fail if some module is old.
It is reasonable to make the job fail since nightly builds are
supposed to be blending edge so they should have the latest deps.

This makes way easier to spot when some module needs to be updated,
reducing a bit the continuous burden of syncing the 3 manifests.
2025-06-13 21:52:06 -03:00
Gabriele Barbero
be1496a91e widgets: implement unique color count
This patch reintroduce the unique color counting in an image,
an old feature from old color-cube-analyze plug-in.
See #13026
2025-06-13 19:22:46 +00:00
Ekaterine Papava
d028b96654 Update Georgian translation 2025-06-13 17:57:54 +00:00
Yuri Chornoivan
427904a636 Update Ukrainian translation 2025-06-13 17:44:01 +00:00
Jehan
3799d66ecf Revert "plug-ins: Convert screenshot dropdowns to radios"
This reverts commit 7af987d31b.

This commit is not needed anymore since the automatically generated
widget will now be radio buttons for small lists of choices.
2025-06-13 16:50:12 +00:00
Jehan
bcb736db61 libgimp: different widget default for GimpChoice in GimpProcedureDialog…
… depending on the number of choices.

Enforcing a UX decision into code from GIMP/Design/gimp-ux#323.
Note that this is not a perfect automatization, since the right default
widget may still be a combo box even for limited choices arguments, when
the dialog is crowded.
It still improves the defaults, and it is still possible to override the
widget on case by case (just as of now).
2025-06-13 16:50:12 +00:00
Bruno Lopes
d56676a2fa meson, desktop, plug-ins: Generate MIMEtypes var dynamically
This way, we avoid divergence with MIMEs declared on the
plug-ins .c and .py files and we eliminate duplicate work.

See also: 2ce3c604
2025-06-13 13:47:19 -03:00
Jacob Boerema
a2bd03a471 app: use GIMP_BRUSH_MAX_SIZE instead of a fixed number...
to check for the maximum allowed size of a Photoshop brush.
2025-06-13 12:15:06 -04:00
Jacob Boerema
67f505009a app: add support for loading Photoshop patterns
For now only RGB and grayscale are supported.
2025-06-13 11:44:32 -04:00
Jacob Boerema
934c4a90cd app: refactor Photoshop stream loading functions
Since these functions used in gimpbrush-load will also be used in
Photoshop pattern loading, move them to gimp-utils.

At the same time, change the signature to return a boolean which
indicates TRUE on success and make the returned value a parameter.
This makes it easier to check multiple read calls for success.
2025-06-13 11:19:35 -04:00
Bruno Lopes
35fbb10d43 desktop: Use GIMP_DESKTOP_NAME on appdata too 2025-06-13 10:17:09 -03:00
Bruno Lopes
b57744ceba build/linux: Fix AppImage StartupWMClass
This completes aede2709b0
2025-06-13 10:09:22 -03:00
Martin
745bf31cd7 Update Slovenian translation 2025-06-13 05:42:12 +00:00
Martin
fa8a12a29e Update Slovenian translation 2025-06-13 05:39:30 +00:00
Bruno Lopes
472123181d build/windows: Do not bundle unneeded share/metainfo on Windows
Seems it was used at runtime in the past but that is
not the case anymore. Indeed, it started to be bundled in
af79bbe028 due to an
error: before the Windows bundling unification the
crossbuilds "script" on .yml bundled all the 'share' dir.
2025-06-12 18:59:48 -03:00
Alx Sa
c2b9c21b5b core: Add alpha on merge if filter requires it
Some filters such as Color to Alpha require
an alpha channel. Now that we have NDE,
filters can exist separately from layers
until they're merged down. This means
the layer itself may not have an alpha
channel, causing distortions on merge.
This patch adds a method to check if
the filter requires an alpha channel, and
adds it to the layer on merge or export if
it has such a filter.
2025-06-12 18:04:09 +00:00
Yuri Chornoivan
50df422969 Update Ukrainian translation 2025-06-12 15:24:25 +00:00
Alx Sa
9a349e812b app/tools: Use NDE filter's drawable for on-canvas widgets
Resolves #14240
This patch extends a9056419 to use the existing filter's
drawable (if it exists) on all other on-canvas widgets instead
of always using the selected layer.
2025-06-12 15:11:31 +00:00
Alx Sa
03bf117110 plug-ins: Remove unnecessary file size check...
...for file-tim-load, as we use other methods to check
if the data we load exceeds the size of the file.
2025-06-12 11:53:06 +00:00
Jehan
e98fc3dbf6 plug-ins: closing a NULL File.
This is a code path where we already verified that the returned FILE was
NULL. The compiler complained too:

> plug-ins/common/file-tim.c:280:7: warning: argument 1 null where non-null expected [-Wnonnull]
2025-06-12 13:31:27 +02:00
Jehan
80fe32dfc6 pdb: also allow none_ok on PDB type 'guide'.
This would be theoretically useful for gimp-image-find-next-guide except
that this function was already using the int type, and allowing 0. I'm
not changing to 'guide' type with none_ok because it would break the
libgimp API (the signature would change, with the type changing from
gint to guint).

Since it already works like this, I just leave a TODO for further
update.

With this and previous commit, we now fully replaced commit 69894d8bbf
attempts for allowing 0 to some types. There was in fact also some
change on 'tattoo' type, but I went through all the PDB functions we
had, one by one, and I don't think we currently have a single case where
we need to allow 0 as a tattoo value. If this need ever arises then we
can always add none_ok support easily in the future.
2025-06-12 13:21:52 +02:00
Jehan
bf14d3db20 Issue #14205: gimp-image-find-next-sample-point returns error when…
… passed "0" as argument.

Adding support of none_ok for arguments of type sample_point, allowing
to pass 0 as a special value and use it on this function.
2025-06-12 12:59:10 +02:00
Jehan
2d2f1d048d Revert "PDB: fix #14205 image-find-next-sample-point error"
This reverts commit 69894d8bbf.

Let's not randomly make our API less strict on types as a workaround for
a bug. If there are specific cases where it's needed to accept 0, then
these are the cases we have to handle.

Also unlike what the commit message was saying, it's not true that this
was only affecting Script-Fu. Any change to the PDB affects by
definition the whole PDB, as well as libgimp and all bindings (over PDB
or libgimp alike). And yes, this change **was** of "real consequence".

I'll do further commits for the proper fixes to #14205.
2025-06-12 12:59:10 +02:00
Luming Zh
d86b26dc4b Update Chinese (China) translation 2025-06-12 00:53:23 +00:00
Jehan
2244d70a94 Issue #13183: use the renamed desktop filename in Flatpak.
Since MR !2158, we set the desktop name as prgname, because that's what
is expected for Wayland. But this doesn't work on Flatpak where the
desktop file is renamed (and even to different names for the stable/beta
vs. nightly flatpaks). This commit adds some special-casing when we
detect we are inside a flatpak environment.

Note that on X11 (whether or not we are in flatpak), we just always use
the original desktop name, because then it will be set as windows'
WM_CLASS which will also match the StartupWMClass key we set in the
desktop file (cf. previous commit).
2025-06-12 02:31:36 +02:00
Jehan
aede2709b0 Issue #14233: incorrect StartupWMClass in gimp.desktop.
The WM_CLASS X property is apparently set to windows throughout the
program by the g_set_prgname() call which we changed in commit
95e32ebb34 from being the executable name (being the fully qualified
program name with the version) to the desktop name.
2025-06-12 02:31:36 +02:00
Alx Sa
0370aed02d tools: Don't run Foreground Selection without strokes
The Foreground Selection algorithm was being run when
users switched to a different tool, even if no strokes had been
painted. This caused an unnecessary delay, since no selection
will be generated.
This patch adds a check to verify we have at least one foreground
stroke made by the user before trying to create the selection.
2025-06-11 19:49:52 +00:00
Bruno Lopes
1f8f17cd9a gimp-data: Bump to fix #14236 2025-06-11 16:00:00 -03:00
Alx Sa
54c95577df widgets, tools: Allow NDE filters on channels
This patch removes restrictions on applying
NDE filters to channels in the GUI. Note
that layer masks are still restricted, not for
technical reasons but because UX/UI needs
to be considered further.
2025-06-11 16:49:12 +00:00
Ekaterine Papava
7ba36e83a3 Update Georgian translation 2025-06-11 06:25:18 +00:00
Anders Jonsson
82c9a80de3 plug-ins: remove unmatched parenthesis 2025-06-11 06:50:19 +02:00
Jehan
427cc49074 desktop: new release tag for upcoming GIMP 3.1.2. 2025-06-11 03:04:45 +02:00
Jehan
a349db4c72 NEWS: update. 2025-06-11 03:04:45 +02:00
Luming Zh
679d9a8952 Update Chinese (China) translation 2025-06-11 00:55:35 +00:00
Luming Zh
78915f28f0 Update Chinese (China) translation 2025-06-11 00:53:43 +00:00
Jehan
fca4fd1bcc Revert "ScriptFu: scripts: remove obsolete script unsharp-mask"
This reverts commit fbee943213.

We must not remove any PDB function because we promise API stability
(not only in libgimp, but also in the PDB). Even if this was not used
anywhere in our own scripts/plug-ins, it may be used by third-party
scripts. At best, we can deprecate them so that people are properly warn
that we plan on removing a function. Then we'll remove it for GIMP 4.

Also I believe that various people were not perfectly happy with GEGL's
unsharp-mask operation, compared to the old one. And that was a reason
for keeping the legacy Script-fu version around. See gegl#122 or other
reports which mention such concerns.
At the very least, this should be discussed first with more specialized
developers to determine whether we consider GEGL's replacement operation
to be adequately replacing the historical script by now, so that we can
plan the removal for GIMP 4.
2025-06-11 02:26:16 +02:00
Daniel Novomeský
933a12335c plug-ins: AVCI import, HEJ2 export
AVCI images can be opened now, saving is not available in libheif yet.
Opening AVCI needs libheif 1.19.6 with OpenH264 decoder enabled.

HEJ2 images can be saved, when at least
libheif 1.19.8 with enabled support for OpenJPEG is detected.
2025-06-10 23:27:59 +02:00
Danial Behzadi
82eb34503f Update Persian translation 2025-06-10 21:26:17 +00:00
Alx Sa
963830fd91 libgimp, libgimpwidgets: Add GimpCoordinates widget...
...to GimpProcedureDialog.
This patch allows plugin developers to create a
GimpCoordinates widget (two GimpSizeEntries linked
together with a chain and with a units combo) in the
GimpProcedureDialog.

It is largely a wrapper for gimp_prop_coordinates_new ().
This patch also makes that function more responsive
to the unit property, now that GimpUnit has a proper
GParamSpec implementation. The default unit and
whether we show pixels, percents, or the resolution
spinners can now be determined via the unit
parameter (if set) rather than relying on
hardcoded values.

As a demonstration, the Tile plug-in's width/height
entries were restored to what they were before the
GimpProcedureDialog port, with units and a chain
link between values.
2025-06-10 19:37:35 +00:00
Ekaterine Papava
c1a56ff0b3 Update Georgian translation 2025-06-10 04:13:26 +00:00
Ekaterine Papava
dd5379662b Update Georgian translation 2025-06-10 04:10:51 +00:00
Anders Jonsson
51a64babca po, po-plug-ins: update POTFILES.in 2025-06-09 22:59:02 +02:00
lloyd konneker
fbee943213 ScriptFu: scripts: remove obsolete script unsharp-mask
Was replaced by a GEGL filter, long ago.

See 18 year old commit 31282ecc by Sven that says this exists for backward compatibility.
Which means we should have removed it befoe GIMP 3.0 major release.

Provides nothing more than the GEGL filter, so just delete it,
and NOT move to gimp-data-extras repo.

Fix #13824 (or at least makes it moot.)

The obsolete script was not used by any code in the repo,
except for test scripts, which were changed to not use it.
2025-06-09 14:27:54 -04:00
lloyd konneker
ea238e4e5a ScriptFu: fix #12837 i18n for independent scripts
See /scripts/test/test-i18n.scm,
which has tests and documents use cases.

Some incidental refactoring and editing of comments.
2025-06-09 13:50:12 +00:00
Bruno Lopes
6dfd27b271 gimp-data: Bump commit 2025-06-09 10:18:04 -03:00
Alexander Shopov
2d1ab85214 Update Bulgarian translation 2025-06-08 19:44:49 +00:00
Alexander Shopov
529914250e Update Bulgarian translation 2025-06-08 19:42:34 +00:00
Alexander Shopov
6386cfe561 Update Bulgarian translation 2025-06-08 19:37:18 +00:00
Alexander Shopov
ffc5836e48 Update Bulgarian translation 2025-06-08 19:32:48 +00:00
Martin
32404df8f6 Update Slovenian translation 2025-06-08 07:05:55 +00:00
Alx Sa
6e58d05a56 widgets: Prevent filter container duplication
Resolves #14206
If the user clicks the Fx icon in the DrawableTreeView
repeatedly (and quickly enough), the "closed" signal
function that cleans up the Filter popover does not
run before the next creation code is started. This can
results in the previous view being left in editor->vbox,
leading to duplication.
This patch checks if the editor and view already exist when
the popover opens, and if so, it runs the clean-up code first.
2025-06-08 01:42:24 +00:00
Martin
9464e571ed Update Slovenian translation 2025-06-07 22:58:20 +00:00
Martin
050a2094bc Update Slovenian translation 2025-06-07 22:55:48 +00:00
lloyd konneker
69894d8bbf PDB: fix #14205 image-find-next-sample-point error
Three types declared in pdbgen perl code,
for sample-point, guides, and tatto objects,
declare too restrictive a range of permissible values.
They should allow the value 0, which the API uses as a sentinel value,
to represent "invalid object ID".
The types are for object ID's, which are unsigned.

GObject checks the declared range when you chunk into a GValueArray,
to call the PDB.

Declaring the attribute in the perl .pdb "no-validate"
is not sufficient since GObject doesn't understand
GIMP_PARAM_NO_VALIDATE, that flag is distinct from G_PARAM_NO_VALIDATE.

Only affects the ScriptFu binding to PDB.
The GI binding to libgimp is not affected.

The declared range is no more restrictive than the underlying type
"unsigned int 32."
So of no real consequence.

The API could be changed to return a list which the caller
would iterate on.
2025-06-07 19:58:24 +00:00
Bruno Lopes
7fd2489985 build/linux: Run gimp process without LD interpreter on AppImage
Closes: #12929

This normalizes argv0, making the AppImage debuggable by gdb etc.

From now, the AppImage can't be run in pre-Bookworm (glibc < 2.36)
distros, but that use case was never officialy supported anyway.
2025-06-07 16:47:30 -03:00
Bruno Lopes
f2bd9fcd7f build/linux: Do not bundle daemons on AppImage
We weren't launching then (and not sure if
we should at all). Also, the proper fix to
some errors encountered is 330ebe90.
2025-06-07 13:44:40 -03:00
Yuri Chornoivan
0286ff4149 Update Ukrainian translation 2025-06-07 15:19:34 +00:00
Jehan
3e46549880 app: small ordering cleanup.
No functional change, just some include cleanup, as well as reordering
with a private function made public.

Also adding a comment saying why we have somewhat unrelated code (about
color-scheme) in gui-unique.c. Maybe eventually we should generalize
this message-handling invible window code into a separate file, if it
becomes further used for more message handling.
2025-06-07 16:39:23 +02:00
Luming Zh
38f8aec0df Update Chinese (China) translation 2025-06-07 08:44:52 +00:00
Alx Sa
1f1404dc93 script-fu: Respect no-validate flag in Script-fu
GIMP 3.0 enforces stricter parameter range checks
compared to GIMP 2.10. As a result, scripts that are the
right datatype but go outside the parameter range will
fail. In GimpProcedure, we have checks if a no-validate
flag is set to bypass these constraints.
This patch adds those checks to Script-fu so it also knows
to not check ranges if no-validate is set.
2025-06-07 05:22:48 +00:00
Alx Sa
12f643329a modules: Display Total Ink Coverage on CMYK selector
Total Ink Coverage shows the total percentage of ink
that would be needed to print a particular color. It is the
simple addition of all CMYK channels.
This patch adds a Total Ink Coverage label to the
CMYK color selector, as a reference when selecting a
color for print.
2025-06-07 01:36:06 +00:00
Bruno Lopes
330ebe90b6 build/linux: Prevent loading host's GIO_EXTRA_MODULES on AppImage
We can't guarantee that the .so modules pointed by GIO_EXTRA_MODULES will
link properly to the bundled libc and other bundled deps in the AppImage.

So, by making our AppImage ignore that var we avoid errors on terminal due
to linking mismatch (e.g. on NixOS which sets that var by default).
2025-06-06 21:22:44 -03:00
Luming Zh
1bfd5ebf20 Update Chinese (China) translation 2025-06-06 23:47:34 +00:00
Bruno Lopes
c49d7ab36f gitlab-ci: Make meson-health job less pervasive on merge requests
It fails silently sometimes, which shouldn't happen but
I don't have time right now to investigate and fix.
For now, allowing it to fail will free auto merge again.
2025-06-06 19:00:26 -03:00
lloyd konneker
eb5fe2325e Tests: ScriptFu: test PDB API for gimp-image-sample-point
No changes except to tests
2025-06-06 17:43:27 -04:00
Alx Sa
9ab17bf034 python: Add import/export support for ORA extensions
The OpenRaster specification has two official extensions
for layers - storing if they are pixel locked, and if they are
selected. Krita and MyPaint already support these extensions
on import and export. This patch adds that support to GIMP
as well.
2025-06-06 20:25:04 +00:00
Yuri Chornoivan
ede910abce Update Ukrainian translation 2025-06-06 19:10:20 +00:00
Alx Sa
592a17a1b0 plug-ins: Add zlib as JIF dependency
After 6395c374, file-gif-export now requires
zlib to handle importing JIF images.
2025-06-06 17:36:09 +00:00
Alx Sa
6395c37425 plug-ins: Add import support for Jeff's Image Format
JIF is a variation of the GIF format that compresses
indexed images using zlib rather than LZW. This patch
add import support for JIF images.
2025-06-06 14:15:06 +00:00
Yuri Chornoivan
992b7c40c6 Update Ukrainian translation 2025-06-06 12:52:06 +00:00
Yuri Chornoivan
be9ad294bc Update Ukrainian translation 2025-06-06 12:47:51 +00:00
Ondřej Míchal
c55f4b104c build/linux: Sync dependencies with Flathub flatpak
Poppler - 25.05.0 -> 25.06.0
2025-06-06 08:09:08 -03:00
Philip Zander
9873ea97de App: Implement/Fix system dark/light theme auto-detection 2025-06-06 10:25:05 +00:00
Jehan
be2d71607a app: implement system color scheme detection on Windows.
This commit is based off code suggested by Isopod on !2180:

https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/2180#note_2399185
2025-06-06 10:25:05 +00:00
Luming Zh
b633658ccb Update Chinese (China) translation 2025-06-06 06:57:33 +00:00
Alx Sa
bb9c43102f plug-ins: Initial APNG load support
Uses plain libpng rather than modified libapng library.
Since libpng only reads one image (and reports other frames
as "extra compressed data"), we read the PNG chunks in separately,
then restart and pass them into libpng for processing.
Since APNG and PNG share the same magic number, we add a check
in the regular PNG loading sequence to see if it contains APNG
frames, and if so, we load them afterwards.
2025-06-06 03:36:25 +00:00
Alx Sa
4e1967bf70 core: Add alpha channel for certain transforms
In 756fed0c, we removed code that automatically added an
alpha channel for transformed layers, as it relied on the user
setting interpolation to anything other than NONE.

This patch attempts to restore this behavior with a different
check. If gimp_matrix_is_simple () returns FALSE, it means that
the transformation requires some form of interpolation, and thus
requires an alpha channel. Flipping and translating do not trigger
a change in the alpha channel, but rotation, shearing, and perspective
transforms do (even if the tool's interpolation is set to NONE).
2025-06-06 02:53:55 +00:00
Luming Zh
4ba74177ea Update Chinese (China) translation 2025-06-05 00:03:57 +00:00
Jehan
08c93a5478 app: make dark scheme the default when system scheme request fails.
If the DBus portal is not available or if any failure occurs when
querying the system scheme, let's default to dark theme (since it's
GIMP's default).
2025-06-05 01:15:17 +02:00
Jehan
d0abb78db3 app: only show the "System" color variant on supported platforms. 2025-06-05 00:48:33 +02:00
Jehan
2056fb1dd3 app: fix a build warning.
Fixes:

> app/core/gimp-user-install.c:762:1: warning: no previous declaration for ‘user_update_post_process_menurc_over20’ [-Wmissing-declarations]
2025-06-05 00:45:02 +02:00
Hari Rana
5556a6708e Add support for respecting the system's color scheme
Now that the XDG Settings portal has started exposing a "color-scheme"
property in the latest versions, we can follow this property and switch
from dark to light theme (or vice versa) with the rest of the system.

This implementation was heavily based on @nielsdg's
merge request: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/612.

Related: https://gitlab.gnome.org/GNOME/gimp/-/issues/8675

Co-authored-by: Niels De Graef <nielsdegraef@gmail.com>
Co-authored-by: Ondřej Míchal <harrymichal@seznam.cz>
Co-authored-by: Jehan <jehan@girinstud.io>
2025-06-04 22:12:43 +00:00
Jehan
d45ff5b5cd app: remove GIMP_HELP_PREFS_VIEWABLES_FOLLOW_THEME help ID.
It is unused and setting it on the new toggle button doesn't seem to
work anyway as the dockable's help ID is called. Improving the help page
for this dockable, rather than adding a specific help page, seems a
better fit anyway.
2025-06-04 23:57:38 +02:00
Jehan
2f19042feb app: localize some strings now that we are out of string freeze. 2025-06-04 23:46:39 +02:00
Jehan
0f900d2946 app: draw the palette grids with the theme's background color.
Commit 80fca449a4 had a few issues:

- It was using the theme's foreground or background colors as non-entry
  color, depending on whether we draw a grid or not. It should just be
  the background's color.
- It was still defaulting color to white/black in some places, instead
  of fg/bg colors (though I just removed these defaults because the code
  just always properly set these colors later on).
- It was using the foreground colors for vertical grid lines, instead of
  background color.
- It was coloring horizontal grid lines as black, instead of background
  color.
2025-06-04 23:46:39 +02:00
Nathan Follens
7f0815a67a Update Dutch translation 2025-06-04 21:01:21 +00:00
Nathan Follens
ab9e63ebeb Update Dutch translation 2025-06-04 21:01:12 +00:00
Nathan Follens
f579324696 Update Dutch translation 2025-06-04 21:00:55 +00:00
Nathan Follens
b16d427d75 Update Dutch translation 2025-06-04 21:00:45 +00:00
Alx Sa
6192b79d89 actions: Fix missing argument length check
Resolves #14192
In procedure_commands_get_display_args (), one
section missed a check for the argument array length
before trying to access the index. This caused a crash
if there were not enough arguments sent in for a Script-fu
plug-in. This patch adds that array length check to prevent
the crash.
2025-06-04 13:52:55 +00:00
Ekaterine Papava
20fb40f7d7 Update Georgian translation 2025-06-04 02:34:24 +00:00
Luming Zh
1724e3cd9d Update Chinese (China) translation 2025-06-04 01:53:35 +00:00
Martin
a05b4a1d60 Update Slovenian translation 2025-06-03 21:15:41 +00:00
Alx Sa
e8c29f818e core: Add Lock Content to undo history
In 2.10, we did not add a Undo History item for "Lock Content"
in the History dockable. In 3.0, we add the item, but Ctrl+Z
doesn't work because we don't actually push the undo item to
the stack.
Comments in fb1a6725 indicate this was intentionally left off
in 2.10. However, it's more consistent in 3.0 to have all locks
behave the same when it comes to undo history.
2025-06-03 19:20:10 +00:00
Yuri Chornoivan
979e0bfd0f Update Ukrainian translation 2025-06-03 17:46:45 +00:00
Kolbjørn Stuestøl
d1f002464a Update Norwegian Nynorsk translation 2025-06-03 14:17:57 +00:00
Kolbjørn Stuestøl
80fe0e541a Update Norwegian Nynorsk translation 2025-06-03 14:11:31 +00:00
Kolbjørn Stuestøl
adbed2c9e9 Update Norwegian Nynorsk translation 2025-06-03 13:43:03 +00:00
Advance Software
19c57a9765 plug-ins: Add support for JPEG 2000 export 2025-06-03 09:22:14 -04:00
Bruno Lopes
d6a961c2af plug-ins: Fix file associations generated from .py plug-ins
Following 2ce3c604
2025-06-02 07:47:51 -03:00
Alx Sa
348b86e2f7 plug-ins: Check libtiff version for TIFF layers
The Photoshop and Sketchbook TIFF enums
were added in later versions of libtiff. Since we
do not enforce that version when compiling, we
add macros to verify TIFFTAG_IMAGESOURCEDATA
and TIFFTAG_ALIAS_LAYER_METADATA are defined
before trying to build with them.
2025-06-01 22:39:41 +00:00
Michael Natterer
d896d60a5c app: in gimp_drawable_merge_filters(), iterate the list of filters
with a while() loop and get list->next before removing the filter,
because removing deleted "list" under our feet.
2025-06-01 11:44:58 +02:00
Alx Sa
b98fe0c3d0 plug-ins: Export single-page PDFs without layers
Resolves #10133
We always set GIMP_EXPORT_CAN_HANDLE_LAYER in
the export options, even if the user set the "layers-as-pages"
parameter to FALSE. As a result, single-page PDFs did not
render the same way they appeared in GIMP, since
gimp_export_options_get_image () did not process them
as a single layer image.
This patch makes GIMP_EXPORT_CAN_HANDLE_LAYER be
conditionally set based on the value of "layers-as-pages".
2025-06-01 02:29:07 +00:00
Michael Natterer
6151deaff9 app: gimp_view_render_temp_buf_to_surface(): fix component extraction
The code was still assuming that GimpTempBuf is always 8 bit. Fixed
that, and optimized it to call babl_process() once per line instead of
per pixel. Fixes #13253.
2025-06-01 03:01:03 +02:00
Michael Natterer
7121109655 app: remove usless include in GimpLayerTreeView 2025-05-31 17:27:56 +02:00
Michael Natterer
f21aaf3416 app: make GimpItemList fully work on all item types 2025-05-31 17:22:55 +02:00
Michael Natterer
76e82d5572 libgimp: there was an "else" missing in the commit below 2025-05-31 17:00:33 +02:00
Alx Sa
0d08a3c532 libgimp: Create widgets for unsigned integer parameters
gimp_procedure_add_uint_argument () creates an unsigned integer
parameter. It's functionally equivalent for creating dialogue widgets,
but since we only checked for G_TYPE_PARAM_INT, these parameters
did not generate widgets in GimpProcedureDialog.
This patch adds a check for G_TYPE_PARAM_UINT in relevant sections
to resolve the issue.
2025-05-31 14:20:28 +00:00
Michael Natterer
03366ae77c app: the filters popover now seems smart enough to be shown when there
is a floating selection.
2025-05-31 16:08:23 +02:00
Michael Natterer
9e64535c22 app: gimp_drawable_update(): optimize a call to
gimp_drawable_get_bounding_box() away.
2025-05-31 16:07:07 +02:00
Michael Natterer
40ace1016d app: GimpItemTreeView: show/hide the lock and search popovers
smoothly.
2025-05-31 16:01:26 +02:00
Michael Natterer
8119591049 app: hide/destroy the filters popover properly when the view is
unmapped or the image is changed, don't run into hide/popdown
recursions, show/hide the popover smoothly.
2025-05-31 15:51:25 +02:00
Michael Natterer
fc0c089208 app: fix my own confusion about gimp_drawable_update()
vs. gimp_drawable_update_bounding_box().
2025-05-31 15:22:54 +02:00
Alx Sa
ae02db90a3 core: Don't merge floating selection as filter
Floating selections are added to the same stack as
non-destructive filters. While the GUI prevents merging
filters when there is a floating selection, 
gimp_drawable_merge_filters () did not explicitly prevent
this. This patch replaces the while loop to merge filters with
a for loop, and explicitly checks if the item in the stack is a
drawable filter (and not a temporary one).
2025-05-31 12:38:47 +00:00
Michael Natterer
2baab5aa74 app: add accessors for GimpDrawableFilter::temporary and use them
instead of using the property dirtectly.  Also make sure temporary
filters don't go to the undo stack or to the XCF.
2025-05-31 14:14:02 +02:00
Michael Natterer
ac01289824 app: GimpDrawableFilter: move setters and getters together 2025-05-31 13:21:58 +02:00
Jordi Mas
4e2e1adce6 Update Catalan translation 2025-05-31 08:58:51 +02:00
Martin
56083f3928 Update Slovenian translation 2025-05-31 06:06:29 +00:00
Martin
9210cf0be3 Update Slovenian translation 2025-05-31 06:03:08 +00:00
Ekaterine Papava
ea5cd6a5f7 Update Georgian translation 2025-05-31 00:43:59 +00:00
Luming Zh
d60d9757a9 Update Chinese (China) translation 2025-05-31 00:11:51 +00:00
Bruno Lopes
2ce3c604e2 build, plug-ins: Generate *associations.list automatically at build-time
This is way easier to maintain and creates a bigger list of
associations by following the libraries that GIMP links
(but does not work with more complex code like file-gegl).

Also helps with
https://gitlab.gnome.org/Infrastructure/gimp-macos-build/-/issues/3
2025-05-30 19:23:41 -03:00
Alx Sa
3693f90aca Issue #4379: Add support for loading multi-layer OpenEXR images 2025-05-30 15:46:23 -03:00
Yuri Chornoivan
9e072b2ea0 Update Ukrainian translation 2025-05-30 18:19:32 +00:00
Yuri Chornoivan
c560c952b3 Update Ukrainian translation 2025-05-30 18:15:57 +00:00
Michael Natterer
90db039270 app: always show the filters popover if there are any potentially
editable filters, regardless of whether they are currently editable.
Also an ugly hack to make sure the popover resizes corrently with the
number of filters.
2025-05-30 18:07:39 +02:00
Michael Natterer
27b09025be app: refactoring in filters and their UI
- move the filter popover to its own file
- centralize popover sensitivity settings
- get rid of gimp_item_refresh_filters()
- lots of minor filter fixes/changes
2025-05-30 15:54:48 +02:00
Bruno Lopes
6b4e346c24 plug-ins: Build 'file-desktop-link' only on Linux 2025-05-30 09:01:18 -03:00
Luming Zh
f72b3f0a4d Update Chinese (China) translation 2025-05-29 23:08:25 +00:00
Bruno Lopes
edb55421fb build/windows: Add observation about GIMP files on Installer script 2025-05-29 18:21:29 -03:00
Michael Natterer
18a9d267a0 app: GimpDrawableTreeView: rename functions to be consistent
and s/effects/filters/
2025-05-29 20:11:55 +02:00
Michael Natterer
9b2fc547ef app: GimpDrawableTreeView: rename "effect" to "filter" 2025-05-29 19:35:42 +02:00
Alx Sa
371620b0af plug-ins: Add support for ART as RAW loader
Since ART is a fork of RawTherapee, the
code is fairly similar to our existing loader
for that software.
2025-05-29 16:40:26 +00:00
Michael Natterer
2b82907967 app: minor cleanups in GimpDrawableTreeView 2025-05-29 17:09:49 +02:00
Michael Natterer
624a62d489 app: some random cleanups in widgets 2025-05-29 17:01:08 +02:00
Michael Natterer
3b60a1e01d app: move the entire filter code from GimpItemTreeView to
GimpDrawableTreeView, because it's filters on drawables not items.
2025-05-29 16:38:42 +02:00
Bruno Lopes
c49f5e3e2b build/windows: Fix XCF association name
Closes: #14149
2025-05-29 10:51:18 -03:00
Michael Natterer
a790dc3253 app: add gimp_drawable_raise,lower_filter()
and move code there from gimpitemtreeview.c
2025-05-29 13:18:40 +02:00
Michael Natterer
fb199fba34 app: micro cleanup in the filter undo code 2025-05-29 00:45:01 +02:00
Michael Natterer
679c7a35c5 app: move gimp_drawable_has_filter() around in its file 2025-05-28 22:29:35 +02:00
Michael Natterer
2bf2f0e34f app: sanitize callback names of GimpItemTreeView drawable filter
callbacks, and remove unused variables.
2025-05-28 22:15:41 +02:00
Estecka
a60c1097ab core,widgets: Fix filter manipulations on invisible layers
Many actions done on layers require refreshing its filters, by toggling
the layer off and on again. When done on an invisible layer, this would
turn it visible, which could not be undone.
Now, the layer remains invisible.
2025-05-28 19:42:33 +00:00
Alx Sa
3b775abc90 plug-ins: Import Legacy PSD Dropshadow
This patch adds support for loading and
applying active Legacy Dropshadow
layer styles in PSD images.
2025-05-28 17:50:35 +00:00
Bruno Lopes
65feecd32d app: Remove not-working GIMP_ICONS_LIKE_A_BOSS
'gtk-menu-images' simply does not
work on GTK3 (tested on AppImage, Flatpak
and Windows) and it is not present on GTK4.
2025-05-28 14:07:05 -03:00
Michael Natterer
5805b96095 app: move filter stack init/finalize to gimpdrawable-filters.c so we
can connect to signals and do other things right here for the entire
lifecycle of the drawable.
2025-05-28 17:54:00 +02:00
Michael Natterer
bf877a8aa3 app, pdb: move filter duplication to one place in
GimpItem::duplicate().
2025-05-28 17:28:01 +02:00
Michael Natterer
4bb4811e77 app: call gimp_drawable_filter_refresh_crop() in a
GimpItem::size_changed() implementation in GimpDrawable,
instead of having the same code multiple times.
2025-05-28 16:55:13 +02:00
Michael Natterer
81a3c729d5 app: fix gimp_channel_is_full() to not lie:
- add channel->full the same way we have channel->empty
- never actually iterate the pixels to determine "full",
  only set it on simple stuff like "select all"
- optimize some code to take a fast path when the channel
  is full

Fixes #14081.
2025-05-28 00:48:58 +02:00
Bruno Lopes
c9f77c7228 build/windows: Alternative approach to Inno reading of config*.h
Closes: #14101

Partially reverts: f69dd75a17
2025-05-27 15:34:13 -03:00
Michael Natterer
868d566c7f app: make gimp_image_new_add_creation_metadata() static 2025-05-27 20:24:41 +02:00
Jehan
2bb6b6b970 NEWS: starting 3.2 NEWS. 2025-05-27 19:28:04 +02:00
Michael Natterer
c460450b4a app: fix menu states/callbacks for "Show Layer Masks" and "Disable
Layer Masks", Fixes #14055.

- change the logic to show the toggles in "on" state ONLY when ANY
  selected layer has the property enabled.
- adjust the action callbacks accordingly, and fix them to only push
  undo groups when multiple layers are changed.
- completely remove gimp_layer_tree_view_update_menu(), which did the
  same as the action update code, only more broken, was causing
  redundant undo steps beibng pushed, and was probably obsolete for 20
  years.
2025-05-27 19:23:44 +02:00
Alx Sa
1f37f92667 plug-ins: Fixes to JPEG 2000 import
This patch fixes the following:
- The magic number for J2K codestreams was left off
when porting from GIMP 2.10, preventing GIMP from
recognizing those files automatically
- The "colorspace" parameter was added to JP2 loading
procedure as an aux argument, so that if a color space was
not defined, the pop-up dialogue will work correctly.
- Fixed a crash in sycc444_to_rgb (), similar to 127cd671,
when freeing parts of the OpenJPEG object that were still in
use.
- Minor spacing issues fixed.
2025-05-27 17:23:31 +00:00
Bruno Lopes
2c0e7fdb76 build/windows: Organize expired certificate detection code on MSIX script
This commit make things more linear.
2025-05-27 12:40:47 -03:00
Bruno Lopes
6ca8945d49 build/windows: Fix .exe installer having the same mutex as gimp*.exe process 2025-05-27 11:36:13 -03:00
Bruno Lopes
b1eba99e46 build/windows: No need to double-define GIMP_MUTEX_VERSION on bundling script
We already take it from config.h
2025-05-27 11:34:12 -03:00
Sam James
db6e72e6a2 meson: use boolean false, not string false 2025-05-27 07:45:26 -03:00
Michael Natterer
d63c4deb68 app: when creating a layer mask from the layer's alpha, but the layer
has no alpha, simply fill the mask with complete opacity instead of
leaving the user with a completely empty mask (and thus a completely
transparent layer).
2025-05-27 11:16:09 +02:00
Michael Natterer
1697e4575f app: make order of undo_group_end() and image_flush() consistent
in layers-commands.c, and some spacing cleanup.
2025-05-27 10:49:24 +02:00
Natanael Copa
4cccc52622 Issue #13657: fix build dependencies
We need the gir and plugins to be able to generate the splash image(s).
Add those as dependencies to gimp executable to ensure they are there
when needed.

Fixes: https://gitlab.gnome.org/GNOME/gimp/-/issues/13657
2025-05-27 05:47:08 -03:00
Danial Behzadi
04e3bdc790 Update Persian translation 2025-05-27 08:18:36 +00:00
Martin
60cb583a52 Update Slovenian translation 2025-05-26 09:59:30 +00:00
Martin
ef142caec8 Update Slovenian translation 2025-05-26 09:57:04 +00:00
Luming Zh
b383b86364 Update Chinese (China) translation 2025-05-26 09:06:20 +00:00
Luming Zh
7298e2b9d0 Update Chinese (China) translation 2025-05-26 08:45:09 +00:00
Ekaterine Papava
0fed482ae7 Update Georgian translation 2025-05-26 01:44:21 +00:00
Ekaterine Papava
528b9b4d69 Update Georgian translation 2025-05-26 01:39:04 +00:00
Ekaterine Papava
6e82489225 Update Georgian translation 2025-05-26 01:34:45 +00:00
Yuri Chornoivan
2f4b8782fa Update Ukrainian translation 2025-05-25 18:10:42 +00:00
Yuri Chornoivan
d5fb67f827 Update Ukrainian translation 2025-05-25 18:02:44 +00:00
Yuri Chornoivan
cd2a7b360d Update Ukrainian translation 2025-05-25 17:59:40 +00:00
Alx Sa
2aff687e18 plug-ins: Add import support for Over The Air Bitmap
This is a Nokia mobile image format,
similar in structure to WBMP.
2025-05-25 15:50:12 +00:00
Alx Sa
befacfd0d4 python: Add export support for Krita .kpl palette
Resolves #13889
Adds support for exporting palettes in
Krita's .kpl format (zipped .xml data).
Colors are currently saved as 32-bit
floating point RGB values.
Future work includes supporting other
color spaces like CMYK, other precisions,
and including color profiles for colors.
2025-05-25 15:50:12 +00:00
Alx Sa
d5cdeb96e8 plug-ins: Add import/export support for Playstation TIM images
These images are primarily used as textures
for Sony Playstation video games.
Port and update of GIMP 2 plug-in by
Andrew Kieschnick.
2025-05-25 15:50:12 +00:00
Ekaterine Papava
7d802efa27 Update Georgian translation 2025-05-25 01:52:21 +00:00
Luming Zh
0790d1340d Update Chinese (China) translation 2025-05-25 00:44:39 +00:00
Martin
0108b6b415 Update Slovenian translation 2025-05-24 19:35:07 +00:00
Emin Tufan Çetin
2da8c80997 Update Turkish translation 2025-05-24 18:35:56 +00:00
Bruno Lopes
e019f1cce3 build/windows: Fix Start Menu and alias clashes with "GIMP (Insider)" MSIX 2025-05-24 15:18:22 -03:00
Alx Sa
5918e2b4d3 widgets: Prevent crash when changing indexed color
Similar logic to 4d8073a3 - the selection signal was not
being properly disconnected when the dialogue closed after
the color entry's color was changed via the HTML field.
This patch switches to using g_signal_connect_object ()
to automatically disconnect when the object is destroyed.
2025-05-24 17:47:34 +00:00
Alx Sa
3edafcc7bc text: Add additional outline options
This creates a new "outline direction" property, that determines whether
the text outline grows outward, inward, or centered from the text.
2025-05-24 16:12:39 +00:00
Bruno Lopes
073adebd0a build/windows: Fix bezel being shown on Installer's Preparing page 2025-05-24 11:22:24 -03:00
Alx Sa
8168142c0c plug-ins: Let Jigsaw draw on transparent layers
Currently, the Jigsaw plug-in only draws on RGB
channels. If the alpha channel is 0, then the Jigsaw
pattern will not show because it does not change the
alpha channel.
This patch adds a check if the format has an alpha
channel, and conditionally sets the alpha byte to 255
when drawing to ensure the pattern is always visible.

This patch also does some formatting clean-up, and
adds a check on the final progress update when previewing
to prevent it from showing 100% as soon as the GUI appears.
2025-05-23 12:38:00 +00:00
Luming Zh
42e804f5f3 Update Chinese (China) translation 2025-05-23 11:10:37 +00:00
Yuri Chornoivan
c1d14710e3 Update Ukrainian translation 2025-05-23 11:01:06 +00:00
Martin
0f1145253d Update Slovenian translation 2025-05-23 06:59:45 +00:00
Jehan
b45cb600fe app: add a toggle button in Brushes dockable for brush previews to…
… follow theme colors or not.

This is an update to MR !1370, as a result of testing and usability
meetings with Aryeom. While we understand that some people may want the
brush dockable to not display as some huge white "stain" in the middle
of an otherwise dark GUI (or other colors, depending on the chosen theme
and color scheme), brushes are not part of the GUI. When you look at
brush previews, you don't expect these to follow theme. And for sure,
painters more often paint over a white canvas than a gray or dark canvas
(or other colors), even though this is not an "always true" either. But
it's probably a better bet than following theme (which is closer to
"always false"!).

Therefore, what this additional commit does:

* By default, the brush previews still show as black on white;
* Nevertheless there is now a button (using the Preferences' theme icon)
  in the Brushes dockable which allow to switch to theme colors
  following brush previews.
* This setting is a GimpGuiConfig property, which means it will stick
  across sessions.
2025-05-22 21:14:20 +00:00
Jehan
e8ffb8ff0e libgimpwidgets: new gimp_prop_toggle_new() property widget function. 2025-05-22 21:14:20 +00:00
Jehan
3038c751bc app, pdb: use the real theme background color for brushes with GIMP_VIEW_BG_USE_STYLE.
Previous code was using the correct background color from the theme, but
the foreground color was always either white or black (depending on GUI
config color scheme). Instead, just use the foreground color from theme.

Since core/ doesn't have access to GTK, hence the theme, we had to
update GimpViewable's get_preview() and get_pixbuf() abstract methods to
have a color argument for recoloring previews (when relevant, which for
most types of viewables is not).
2025-05-22 21:14:20 +00:00
Jehan
55658facb4 app: invalidate and redraw the icons when the color scheme changes. 2025-05-22 21:14:20 +00:00
Alx Sa
9bef3b2edd widgets, themes: Fix bug with selection...
background color. Resolves #9983.

We now check the parent widget's color
first to prevent issues with the selection
altering the background color of the
icon until the view is refreshed.
As a result, we can now define the
selected color of an icon, fixing a
regression from 2.10.
2025-05-22 21:14:20 +00:00
Alx Sa
80fca449a4 widgets: Use theme colors of palette...
..background rendering. As with the
previous commit, this patch tries to
retrieve the background color and color
properties of the widget, then use them
to draw the background and grid of the
Palette and Colormap dockables.
2025-05-22 21:14:20 +00:00
Alx Sa
59685ce621 widgets: Adapt brush previews to theme
We now check the current theme and 
draw the brush preview color and
background to match.
2025-05-22 21:14:20 +00:00
Jacob Boerema
7add94f868 libgimpwidgets: gtk-fallback-icon-theme is deprecated...
since GTK 3.10 and according to the GTK3 documentation the setting
is ignored.

Remove the reference to it and thus setting a fallback. According to
the GTK docs `hicolor` is the fallback icon theme.
Since `gimp_icons_notify_system_icon_theme` was only used to add
the fallback, remove the function and setting it with
`g_signal_connect`.
2025-05-22 16:18:44 -04:00
Alx Sa
3879520cc2 tools, operation: Add support for loading PS Levels presets
Photoshop stores their Levels filter presets in an
.alv file. This patch adds support for loading these
and converting them to GIMP's Level format.

The .alv file is binary, and consists of a 2 byte version
followed by 29 groups of 2 byte values for input,
output, and gamma. We only read the first four for
now, since GIMP only supports composite and then
R, G, and B individual channels.
2025-05-22 18:52:30 +00:00
Alx Sa
f3afd91a95 tools, operation: Add support for loading PS Curve presets
Photoshop stores their Curve filter presets in an
.acv file. This patch adds support for loading these
and converting them to GIMP's Curves format.

The .acv file is binary, and consists of a 2 byte version
and 2 byte curve count. Then, you read in 2 bytes for
the number of curve points, followed by 2 bytes for
the Y value and 2 bytes for the X value. You repeat that
for the curve count defined in the header. PS Curves range from 2 to 19 points total.
2025-05-22 18:52:30 +00:00
Jehan
f17c6262f2 Move on to GIMP 3.1.1.
This opens the merge window for upcoming GIMP 3.2.0.
2025-05-22 19:28:07 +02:00
Alx Sa
abfd6cd6dc themes: Define menubar menuitem padding
Since we did not define the padding between menu items
in the menubar, some system themes caused them to
scrunch together. This patch sets the padding to match the
"default" GTK CSS to ensure there's distance between each
item in the menubar.
2025-05-22 13:54:24 +00:00
Alx Sa
06a0bafe79 plug-ins, operations: Fix warnings on Windows
This patch reduces three sets of warnings
when compiling on Windows:

* In gimp-layer-modes.c, we move the
g_return_val_if_reached () in
gimp_layer_mode_get_format () to the
default case in the last switch statement
to prevent a warning about an unhandled
switch case

* In spline.c, we initialize V[] to prevent
a warning about uninitialized values

* In flame.c, we unconditionally call
g_bytes_unref () to prevent a warning
about dangling pointers.
2025-05-22 02:10:08 +00:00
Emin Tufan Çetin
d74943b69e Update Turkish translation 2025-05-21 20:48:19 +00:00
Jehan
181b18f843 app: make transient factory dialogs follow the active display.
Right now, when you were setting your hints as KEEP_ABOVE, the dock
window would only keep above the image window from which you called it.
If you create a new image window, it could hide your toolbox and dock
windows.

Now we will reparent the dock windows when switching active display.

Note that this also applies to other types of dialogs we have, such as
the New Image dialog or the Search Actions, etc. But looking at all
these factory dialogs we have, it doesn't look like there is a single
case where the parenting pertains to a specific image. So it makes sense
that we always reparent when focusing a different image window.
2025-05-20 20:24:39 +00:00
Jehan
756700a02a Issue #13436: dock windows follow main window with all but NORMAL hint.
Per testing by Gabriele and discussions on IRC, it doesn't make sense
that UTILITY windows also keep all dockables above. Otherwise what's the
difference with KEEP_ABOVE?

Also it turns out that on macOS, setting a parent makes the transient
window follow the parent window (so it's close to the modal window
concept of GNOME). So that makes it even more important that our utility
windows don't have a parent.
2025-05-20 20:24:39 +00:00
Jehan
b8a39a4911 app: make sure KEEP_ABOVE windows are also set with UTILITY hint. 2025-05-20 20:24:39 +00:00
Alx Sa
3f9b05fb61 widgets: Only change text color when user confirms
Previously, we set text color to change when the "color-changed"
signal was sent out from GimpColorPanel. When all of the text is
the same color, this works fine. However, if we select text with
different colors on the canvas editor, the color defaults to black
since we can only hold a single color. If the user cancels, the
"color-changed" signal is still sent out, so we change all colors
to black.

This patch changes the code to use the "response" signal instead.
Then, we check if the user chose "OK" before calling the color
change function.
2025-05-20 16:11:26 +00:00
Alx Sa
bc887fbbb2 widgets: Prevent CRITICAL when toolbox has no child areas
To balance the child areas in the toolbox horizontally,
we dynamically set the maximum number of children in
the GtkFlowBox depending on the number of visible ones.
It is possible to hide all of them, giving us a max count of 0.
However, gtk_flow_box_set_max_children_per_line () requires
the max count to be at least 1 - this causes a CRITICAL.
This patch adds a check to make sure the count is at least 1
before calling that function.
2025-05-20 15:39:10 +00:00
Bruno Lopes
96d09108d5 build/windows: Distribute .pdb symbols on .msix too (not only on the .appxsym)
Despite what it looks like, the .pdb on .appxsym are
not stored on https://msdl.microsoft.com/download/symbols
I confirmed that on WinDBG and Visual Studio Debugger.
2025-05-20 07:39:06 -03:00
Alx Sa
b065425ee6 plug-ins: Don't draw PDF mask if turned off
In GIMP, if a layer mask is marked as disabled, it
does not show on the screen. However, we always
rendered the mask on PDF export. Since other image
formats like PNG don't render the mask, and since the
user likely does not expect an invisible mask to be drawn
on export, we add a check for gimp_layer_get_apply_mask ()
to be TRUE before rendering the mask image on PDF export.
2025-05-20 02:23:35 +00:00
Alx Sa
1685c86af5 widgets: Don't show palette name with no palette
Resolves #14047
The Color Dialog that appears when you select a
text outline color does not load a palette from context.
Since we then try to get the name from a NULL palette,
this causes a crash.
This patch resolves the issue by adding a check for the
palette's existence before trying to get its name.
2025-05-19 19:34:47 +00:00
Bruno Lopes
b25e489f6b build/windows: Only MSYS_ROOT env is needed for fix_msg.py
Fix regression introduced by c346731e, avoiding CYGWIN bins on PATH.
2025-05-19 14:07:34 -03:00
Jacob Boerema
6268eb5ed4 tests: Update location of eps loading tests from Pillow 2025-05-19 12:53:38 -04:00
Ekaterine Papava
a0b08da0b4 Update Georgian translation 2025-05-18 23:18:45 +00:00
Jehan
fc2e395d72 meson: Post-release version bump to 3.0.5. 2025-05-18 20:45:12 +02:00
Bruno Lopes
abcc0b1f07 build/windows: Fix dangling console being kept opened by CMD
By calling 'powershell' to run the gimp command, we can
keep only GIMP console opened.
2025-05-18 14:41:47 -03:00
Christoph Reiter
b78cd8d59d meson: fix install scripts not taking DESTDIR into account
Regression from 455dc1faa6

The new install scripts installed the files into MESON_INSTALL_PREFIX
instead of MESON_INSTALL_DESTDIR_PREFIX.
2025-05-18 10:36:56 -03:00
Bruno Lopes
6809c2ade7 build/windows: Test fix for failing .appxsym making
The previous code worked locally but,
for some obscure reason, not on CI.
2025-05-18 08:37:35 -03:00
Yuri Chornoivan
b341fe6102 Update Ukrainian translation 2025-05-18 09:34:35 +00:00
Martin
e5b305c66a Update Slovenian translation 2025-05-18 08:52:27 +00:00
Luming Zh
9e5c582fb4 Update Chinese (China) translation 2025-05-18 01:49:10 +00:00
Jehan
c1901c5be6 Release GIMP 3.0.4. 2025-05-18 00:51:03 +02:00
Jehan
81c0c7a98b desktop: fix release notes.
I realized that without a listing of changes, the "Release Notes" tab is
missing from the Welcome dialog. I can change this in the code, but
having just a single small sentence filling a big tab is not really nice
either. So instead, let's add some more details even if these are not as
major changes as on a minor point release.

After all, these are still nice changes anyway.

Several of these even take good advantage of the demo feature in our
AppStream parsing.
2025-05-18 00:51:03 +02:00
Jehan
f5d02dfb03 NEWS: update. 2025-05-17 23:38:37 +02:00
Jehan
148746c6a6 Issue #13414: convert "edit-paste-as-new-layer*" to "edit-paste-merged*".
Converting to "edit-paste*" was counter-productive because you could end
up overriding the default (and very well known) ctrl-v just because one
you touched this "edit-as-new-layer" action at some point in the past
and didn't even remember it.

Also since "edit-paste" existed in 2.10, you could even have shortcut
conflicts by having 2 shortcuts merged.

Instead "edit-paste-merged*" actions seem a bit better, are kinda
similar (though not exactly) and since they didn't exist in 2.10, you
are at least not creating conflicts.
2025-05-17 23:26:18 +02:00
Jehan
ddb6dbcc0d app: fix build warning.
Fixes:

> app/signals.c:56:12: warning: unused variable ‘codeview_path’ [-Wunused-variable]
2025-05-17 23:10:10 +02:00
Jehan
568afe809d app: do not store the filter tool's filter object.
Just swap the values in the stored GeglNode each time you undo or redo.
When undoing, the GeglNode contains the values from before this undo
step. When redoing, it stores the values to after the step.

Also fix a few leaks (GValue-s and list of properties).
2025-05-17 19:55:08 +00:00
Alx Sa
7a8a147ce3 core, tools: Editing effects stored in undo history
A new GIMP_UNDO_FILTER_MODIFIED
enum is now used to store filter properties
when an edited NDE filter is committed.
A new undo entry will be added to the
history each time the filter is edited and
committed.
2025-05-17 19:55:08 +00:00
aruius
a4fba54c1b color_frame: Fix #13887 Pixel display not updating on Image encoding change
A GimpColorFrame's GeglColor's Babl format's precision is set to the image's precision
when picked. On an Image encoding change to a different precision the colors are
perceptually identical, but for Sample Points set to 'Pixel' we need to run
gimp_color_frame_update after updating the frame's color to the higher precision one.
2025-05-17 19:03:19 +00:00
Gabriele Barbero
ebd5e1966e actions: hide windows-display-* actions from the Shortcuts dialog
windows‑display* actions are used to switch open displays and are not
meant to be remapped. They are implemented so they can be reassigned
each time a display is opened, closed, or moved, in order to keep them
aligned with the order of displays. This commit hides them from the
Shortcuts dialog to prevent remapping and avoidinconsistent behavior.
To avoid hiding these actions completely and making them harder to discover,
this commit removes them only from the shortcuts dialog while still showing
them in the action search.
(see #11685)
2025-05-17 20:22:31 +02:00
Integral
95e32ebb34 app: set a specific desktop filename to fix wayland window icon
Set a specific desktop filename to fix window icon under Wayland.

Closes: #13183
2025-05-17 13:24:20 +00:00
Jehan
672703eb60 devel-docs: Windows Aarch64 is not considered experimental anymore. 2025-05-17 15:00:49 +02:00
Jehan
286b80ac36 desktop: set GIMP 3.0.4 release date. 2025-05-17 11:24:00 +02:00
Jehan
caa03fd2e4 NEWS: update. 2025-05-17 11:15:15 +02:00
Alx Sa
b31e08012f widgets: Show palette name in Palette Color Selector 2025-05-16 22:44:19 -03:00
Bruno Lopes
c346731e1b build/windows: Fixes to make the installer script work locally again 2025-05-16 21:52:37 -03:00
Jehan
a1621427d6 build: clone the InnoSetup repository once instead of downloading individual files.
It turns out that commit bd6745ab40 is not a good solution either,
because now it is the "Making sure you're not a bot!" page from Anubis
which is blocking us.
I am hoping that a git clone should encounter neither the HTTP 429 error
(though we clone through HTTP, but maybe/hopefully the rate limitation
is set up only for actual web page requests) nor the bot protection.
2025-05-17 01:05:21 +02:00
Jehan
4b9e96f703 build: add the ability to add patches when using tagged babl/GEGL releases. 2025-05-16 16:56:35 +00:00
Bruno Lopes
f8d87fc293 meson: Do not generate CodeView symbols with GCC
Since GCC 15.1 CodeView generation is broken
2025-05-16 16:56:35 +00:00
Jehan
27f6d25677 libgimp: fix incompatible type for exported function address in gimp-win-x86 job.
This fixes:

> ../libgimp/gimp.c:280:27: error: assignment to 't_SetProcessDEPPolicy' {aka 'int (__attribute__((stdcall)) *)(long unsigned int)'} from incompatible pointer type 'FARPROC' {aka 'int (__attribute__((stdcall)) *)(void)'} [-Wincompatible-pointer-types]
>   280 |     p_SetProcessDEPPolicy = GetProcAddress (GetModuleHandleW (L"kernel32.dll"),
2025-05-16 16:56:35 +00:00
Jehan
a826e35a3e build: add option to select a dependency branch.
We'll make use of this now, and as a general rule, it may be useful when
we need to easily point to feature branches for testing.
2025-05-16 16:56:35 +00:00
Jehan
bd6745ab40 Issue #13957: Unnofficial Inno langs can't be downloaded (due to…
… GitHub rate limiting).

Let's just work with our own remote which will update manually (at least
before a release).
2025-05-16 16:55:01 +00:00
Jehan
be4b8a3ae3 gitlab-ci: use include:project to avoid making HTTP instance on same Gitlab.
This should fix this pipeline error:

> Remote file `https://gitlab.gnome.org/GNOME/citemplates/-/raw/master/flatpak/flatpak_ci_initiative.yml` could not be fetched because of HTTP code `429` error!

See: https://docs.gitlab.com/ci/yaml/#includeproject
2025-05-16 07:17:56 -03:00
Bruno Lopes
840519cb91 gitlab-ci: Go back to flatpak_ci_initiative.yml from GitLab 2025-05-15 21:41:49 -03:00
Bruno Lopes
1aef6f2c37 gitlab-ci: Add CYGWIN perl for 32-bit jobs only
There is no mingw32 perl.
2025-05-15 21:39:26 -03:00
Alx Sa
4eb462a7a4 display: Fix copy/paste typo for UNSCALEY
In 9fe8e849, we accidentally used UNSCALEX
rather than UNSCALEY for offset_y. This patch
corrects that typo.
2025-05-15 13:06:36 +00:00
Alx Sa
6475f0a6dc widgets: Change multi-window title bar based on theme
Applies ad8b47bf to title bars of GimpDockWindows so that
they adapt to the Windows system theme colors.
2025-05-14 23:48:51 -04:00
Jehan
51d69fa44b plug-ins: do not warn for invalid font names at startup.
While all other resources are supposed to be already loaded, this is not
the case of fonts which are loaded in a thread, and whose loading may
end after plug-ins are initialized. So ignore unknown font name as an
exception (because we can't know if it is really unknown or just not
loaded yet).

This fixes such WARNINGs:

> (script-fu:33006): scriptfu-WARNING **: 14:35:28.259: script_fu_add_resource_arg declared resource name is invalid Serif
2025-05-15 02:16:10 +02:00
Jehan
02fd84394c app: fix build warnings.
This fixes 2 such warnings:

> app/text/gimpfontfactory.c: In function ‘gimp_font_factory_load_names’:
> /usr/include/glib-2.0/glib/gstring.h:74:5: warning: ignoring return value of ‘g_string_free_and_steal’ declared with attribute ‘warn_unused_result’ [-Wunused-result]

The (void) ! trick was also possible but this is so ugly so I went for
actual usage of the return value as we should.

Also clean up some trailing whitespaces.
2025-05-15 01:02:53 +02:00
Idriss Fekir
8328dfb25b GimpFontFactory: Move font loading to another thread
This is to make sure than regardless of how many fonts there are, font loading
won't delay startup.

FontConfig if compiled against libxml2 might fail to parse huge xml configs.
So instead of passing it a huge xml, pass the xml every MAX_NUM_FONTS_PER_CONFIG (currently 1000) fonts.

Also made GimpFontFactory custom config strings private because there is no reason for them to be public.
2025-05-14 22:42:22 +00:00
Idriss Fekir
f63e8afe60 GimpFontFactory:Speed up font loading
Profiling showed that a significant amount of time was spent created the hb_blob, and calling FcParseAndLoadFromMemory.

To allow only fonts that pango/harfbuzz recognize, an hb_blob was created from
every font to test if harfbuzz recognizes it, which is obviously a lot of overhead.
FontConfig allows to check if the Font is SNFT and wether it's a WOFF[2] font.
2025-05-14 22:42:22 +00:00
Jehan
2702a47c9e NEWS: update. 2025-05-14 22:53:51 +02:00
1935 changed files with 241137 additions and 185239 deletions

View File

@@ -3,8 +3,9 @@ spec:
distribution_pipeline:
description: 'Pipelines that creates installable GIMP'
options:
- GIMP_CI_APPIMAGE #trigger the appimage making.
- GIMP_CI_APPIMAGE #trigger the appimage making (base & fast).
- GIMP_CI_FLATPAK #trigger the flatpak build and publishing (base but slow)
- GIMP_CI_SNAP #trigger the snap build (base but slow)
- GIMP_CI_WIN_INSTALLER #trigger all native MSYS2 builds then creates Inno Windows installer (base but slow)
- GIMP_CI_MS_STORE #trigger arm64 and x64 native MSYS2 builds then creates a .msixbundle (base but slow)
- none
@@ -29,7 +30,8 @@ workflow:
##################################################
## 1. On MERGE REQUESTS, the following are triggered:
## - Abbreviated Linux Clang build (base & fast)
## - Abbreviated Linux Clang build
## - Building quality tests (static code analysis)
## - clang-format (static code analysis)
## - Execution tests (dynamic code analysis)
.pipeline_merge: &CI_MERGE
@@ -42,20 +44,22 @@ workflow:
# GitLab is quite sensitive about rules 'if' order so be careful
## 3. On COMMITS except tags.
## - Linux Clang build (base & fast)
## - Linux Clang build
## - Building quality tests (static code analysis)
## - Execution tests (dynamic code analysis)
## - Source tarball (base & fast)
## - Developer documentation (base & fast)
## - Source tarball
## - Developer documentation
.pipeline_commit: &CI_COMMIT
if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS == null && $CI_COMMIT_TAG == null'
interruptible: true
variables: {}
## 4. RELEASES.
## - Source tarball (base & fast)
## - Developer documentation (base & fast)
## - Inno Windows installer (base but slow)
## - MS Store .msixupload (base but slow)
## - Source tarball
## - Developer documentation
## - Linux .appimage
## - Inno Windows installer
## - MS Store .msixupload
.pipeline_release: &CI_RELEASE
if: '$CI_COMMIT_TAG != null'
interruptible: false
@@ -76,10 +80,11 @@ workflow:
- 'runner_system_failure'
- 'scheduler_failure'
needs: []
# Default Docker image (unless otherwise defined)
image: debian:${DEB_VERSION}
# Default Docker image (keep variables: DEB_VERSION: consistent with devel-docs/os-support.txt)
image: $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}
variables:
DEB_VERSION: "bookworm"
RUNNER: "x86_64_v3"
# Common cloning procedure
GIT_DEPTH: "1"
GIT_SUBMODULE_STRATEGY: none
@@ -93,7 +98,7 @@ workflow:
stages:
- dependencies
- gimp
- build
- analysis
- distribution
@@ -107,10 +112,9 @@ stages:
- <<: *CI_RELEASE
parallel:
matrix:
- RUNNER: [aarch64, x86_64_v2]
- RUNNER: [aarch64, x86_64_v3]
tags:
- $RUNNER
image: $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}
variables:
CC: "clang"
CXX: "clang++"
@@ -121,9 +125,10 @@ stages:
timeout: 20m
.debian_environ: &ENVIRON
- echo -e "\e[0Ksection_start:`date +%s`:environ[collapsed=true]\r\e[0KPreparing build environment"
- gcc -print-multi-os-directory 2>/dev/null | grep ./ && export LIB_DIR=$(gcc -print-multi-os-directory | sed 's/\.\.\///g') || export LIB_DIR="lib"
- gcc -print-multiarch 2>/dev/null | grep . && export LIB_SUBDIR=$(echo $(gcc -print-multiarch)'/')
# See: https://testing.developer.gimp.org/core/setup/build/#preparing-for-building
- printf "\e[0Ksection_start:`date +%s`:environ[collapsed=true]\r\e[0KPreparing build environment\n"
- gcc -print-multi-os-directory 2>/dev/null | grep -q ./ && export LIB_DIR=$(gcc -print-multi-os-directory | sed 's/\.\.\///g') || export LIB_DIR="lib"
- gcc -print-multiarch 2>/dev/null | grep -q . && export LIB_SUBDIR=$(echo $(gcc -print-multiarch)'/') || export LIB_SUBDIR=
## Build-time vars
- export PKG_CONFIG_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
- export XDG_DATA_DIRS="${GIMP_PREFIX}/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}"
@@ -131,34 +136,33 @@ stages:
- export PATH="${GIMP_PREFIX}/bin:$PATH"
- export LD_LIBRARY_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
- export GI_TYPELIB_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
- echo -e "\e[0Ksection_end:`date +%s`:environ\r\e[0K"
- printf "\e[0Ksection_end:`date +%s`:environ\r\e[0K\n"
deps-debian:
extends: .debian
stage: dependencies
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
image: quay.io/buildah/stable
variables:
GIT_STRATEGY: none
UMFPACK: libumfpack5
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
script:
- export container=docker
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- export BUILDAH_FORMAT=docker
- export STORAGE_DRIVER=vfs
- echo "$CI_REGISTRY_PASSWORD" | buildah login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
# Install deps
- echo "FROM debian:${DEB_VERSION}" > Dockerfile
- echo "RUN echo -e \"\e[0Ksection_start:0000000001:deps_install[collapsed=true]\r\e[0KInstalling dependencies provided by Debian $DEB_VERSION\"" >> Dockerfile
- echo "WORKDIR $CI_PROJECT_DIR" >> Dockerfile
- echo "RUN printf \"\e[0Ksection_start:0000000001:deps_install[collapsed=true]\r\e[0KInstalling dependencies provided by Debian $DEB_VERSION\n\"" >> Dockerfile
- echo "RUN apt-get update -qq" >> Dockerfile
## 'ca-certificates' is NOT a gimp dep, it is installed only to our Docker image work
- echo "RUN apt-get install -qq -y --no-install-recommends ca-certificates" >> Dockerfile
## Build-time only dependencies
- echo "RUN apt-get install -qq -y --no-install-recommends \\" >> Dockerfile
- echo "appstream
ccache
bison
clang
desktop-file-utils
flex
gi-docgen
git
gobject-introspection
@@ -166,9 +170,7 @@ deps-debian:
lld
meson
valac
xauth
xsltproc
xvfb" >> Dockerfile
xsltproc" >> Dockerfile
## Runtime dependencies
- echo "RUN apt-get install -qq -y --no-install-recommends \\" >> Dockerfile
- echo "at-spi2-core
@@ -178,9 +180,10 @@ deps-debian:
glib-networking
graphviz
graphviz-dev
gvfs
iso-codes
libaa1-dev
libappstream-glib-dev
libappstream-dev
libarchive-dev
libbz2-dev
libcfitsio-dev
@@ -203,12 +206,10 @@ deps-debian:
libopenjp2-7-dev
libpoppler-glib-dev
libqoi-dev
libraw-dev
librsvg2-dev
libspiro-dev
libsuitesparse-dev
libtiff-dev
$UMFPACK
libumfpack5
libunwind-dev
libwebp-dev
libwmf-dev
@@ -219,37 +220,36 @@ deps-debian:
python3
python3-gi
python3-gi-cairo" >> Dockerfile
- echo "RUN echo -e \"\e[0Ksection_end:0000000002:deps_install\r\e[0K\"" >> Dockerfile
- echo "RUN printf \"\e[0Ksection_end:0000000002:deps_install\r\e[0K\n\"" >> Dockerfile
# Prepare environ
- echo "FROM $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}" > Dockerfile2;
- echo "RUN echo -e \"\e[0Ksection_start:`date +%s`:environ[collapsed=true]\r\e[0KPreparing build environment\"" >> Dockerfile2;
- export LIB_DIR="lib";
- export LIB_SUBDIR=$([ "$(uname -m)" = 'aarch64' ] && echo "aarch64-linux-gnu/" || echo "x86_64-linux-gnu/");
- echo "ENV PKG_CONFIG_PATH=\"${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}\"" >> Dockerfile2;
- echo "RUN printf \"\e[0Ksection_start:`date +%s`:environ[collapsed=true]\r\e[0KPreparing build environment\n\"" >> Dockerfile2;
- echo "ENV PKG_CONFIG_PATH=\"${GIMP_PREFIX}/lib/$([ "$(uname -m)" = 'aarch64' ] && echo "aarch64-linux-gnu/" || echo "x86_64-linux-gnu/")pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}\"" >> Dockerfile2;
- echo "ENV XDG_DATA_DIRS=\"${GIMP_PREFIX}/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}\"" >> Dockerfile2;
- echo "ENV CC=\"$CC\"" >> Dockerfile2;
- echo "ENV CXX=\"$CXX\"" >> Dockerfile2;
- echo "ENV CC_LD=\"$CC_LD\"" >> Dockerfile2;
- echo "ENV CXX_LD=\"$CXX_LD\"" >> Dockerfile2;
- echo "ENV CLICOLOR_FORCE=\"1\"" >> Dockerfile2;
- echo "RUN echo -e \"\e[0Ksection_end:`date +%s`:environ\r\e[0K\"" >> Dockerfile2;
- echo "RUN printf \"\e[0Ksection_end:`date +%s`:environ\r\e[0K\n\"" >> Dockerfile2;
# Build some dependencies
## Build babl
- echo "RUN echo -e \"\e[0Ksection_start:`date +%s`:babl_build[collapsed=true]\r\e[0KBuilding babl\"" >> Dockerfile2;
- echo "RUN git clone --branch \"\$([ \"$CI_COMMIT_TAG\" ] && echo \"\$(git ls-remote --tags --exit-code --refs https://gitlab.gnome.org/GNOME/babl.git | grep -oi \"BABL_[0-9]*_[0-9]*_[0-9]*\" | sort --version-sort | tail -1)\" || echo \"master\")\" --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git" $CI_PROJECT_DIR/babl >> Dockerfile2;
- echo "RUN meson setup $CI_PROJECT_DIR/babl/_build-${RUNNER} $CI_PROJECT_DIR/babl -Dprefix=\"${GIMP_PREFIX}\" $PKGCONF_RELOCATABLE_OPTION" >> Dockerfile2;
- echo "RUN ninja -C $CI_PROJECT_DIR/babl/_build-${RUNNER}" >> Dockerfile2;
- echo "RUN ninja -C $CI_PROJECT_DIR/babl/_build-${RUNNER} install" >> Dockerfile2;
- echo "RUN echo -e \"\e[0Ksection_end:`date +%s`:babl_build\r\e[0K\"" >> Dockerfile2;
- echo "RUN printf \"\e[0Ksection_start:`date +%s`:babl_build[collapsed=true]\r\e[0KBuilding babl\n\"" >> Dockerfile2;
- echo "RUN git clone --branch \"\$([ \"$CI_COMMIT_TAG\" ] && echo \"\$(git ls-remote --tags --exit-code --refs https://gitlab.gnome.org/GNOME/babl.git | grep -oi \"BABL_[0-9]*_[0-9]*_[0-9]*\" | sort --version-sort | tail -1)\" || echo \"master\")\" --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git" babl >> Dockerfile2;
- echo "RUN meson setup babl/_build-${RUNNER} babl -Dprefix=\"${GIMP_PREFIX}\" $PKGCONF_RELOCATABLE_OPTION" >> Dockerfile2;
- echo "RUN ninja -C babl/_build-${RUNNER}" >> Dockerfile2;
- echo "RUN ninja -C babl/_build-${RUNNER} install" >> Dockerfile2;
- echo "RUN printf \"\e[0Ksection_end:`date +%s`:babl_build\r\e[0K\n\"" >> Dockerfile2;
## Build GEGL
- echo "RUN echo -e \"\e[0Ksection_start:`date +%s`:gegl_build[collapsed=true]\r\e[0KBuilding gegl\"" >> Dockerfile2;
- echo "RUN git clone --branch \"\$([ \"$CI_COMMIT_TAG\" ] && echo \"\$(git ls-remote --tags --exit-code --refs https://gitlab.gnome.org/GNOME/gegl.git | grep -oi \"GEGL_[0-9]*_[0-9]*_[0-9]*\" | sort --version-sort | tail -1)\" || echo \"master\")\" --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git" $CI_PROJECT_DIR/gegl >> Dockerfile2;
- echo "RUN meson setup $CI_PROJECT_DIR/gegl/_build-${RUNNER} $CI_PROJECT_DIR/gegl -Dprefix=\"${GIMP_PREFIX}\" $PKGCONF_RELOCATABLE_OPTION $WORKSHOP_OPTION" >> Dockerfile2;
- echo "RUN ninja -C $CI_PROJECT_DIR/gegl/_build-${RUNNER}" >> Dockerfile2;
- echo "RUN ninja -C $CI_PROJECT_DIR/gegl/_build-${RUNNER} install" >> Dockerfile2;
- echo "RUN echo -e \"\e[0Ksection_end:`date +%s`:gegl_build\r\e[0K\"" >> Dockerfile2;
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER} --cache=true --cache-ttl=120h --image-fs-extract-retry 1 --verbosity=warn
- if [ -f 'Dockerfile2' ]; then /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile2 --destination build-debian-${DEB_VERSION}-${RUNNER}-temp --cache=false --no-push --verbosity=warn; fi
- echo "RUN printf \"\e[0Ksection_start:`date +%s`:gegl_build[collapsed=true]\r\e[0KBuilding gegl\n\"" >> Dockerfile2;
- echo "RUN git clone --branch \"\$([ \"$CI_COMMIT_TAG\" ] && echo \"\$(git ls-remote --tags --exit-code --refs https://gitlab.gnome.org/GNOME/gegl.git | grep -oi \"GEGL_[0-9]*_[0-9]*_[0-9]*\" | sort --version-sort | tail -1)\" || echo \"master\")\" --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git" gegl >> Dockerfile2;
- echo "RUN meson setup gegl/_build-${RUNNER} gegl -Dprefix=\"${GIMP_PREFIX}\" $PKGCONF_RELOCATABLE_OPTION -Dworkshop=true" >> Dockerfile2;
- echo "RUN ninja -C gegl/_build-${RUNNER}" >> Dockerfile2;
- echo "RUN ninja -C gegl/_build-${RUNNER} install" >> Dockerfile2;
- echo "RUN printf \"\e[0Ksection_end:`date +%s`:gegl_build\r\e[0K\n\"" >> Dockerfile2;
#FIXME: '2>&1 | grep -v STEP' since buildah is too verbose. See: https://github.com/containers/buildah/issues/6362
- buildah build --log-level error --volume $CI_PROJECT_DIR:$CI_PROJECT_DIR:Z --file $CI_PROJECT_DIR/Dockerfile --tag $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER} --layers --cache-from $CI_REGISTRY_IMAGE/cache --cache-to $CI_REGISTRY_IMAGE/cache --cache-ttl=120h 2>&1 | grep -v STEP && buildah push --log-level error $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER} 2>&1 | grep -v STEP
- buildah build --log-level error --volume $CI_PROJECT_DIR:$CI_PROJECT_DIR:Z --file $CI_PROJECT_DIR/Dockerfile2 --no-cache 2>&1 | grep -v STEP
artifacts:
paths:
- _install-${RUNNER}/
@@ -262,27 +262,28 @@ deps-debian:
gimp-debian:
extends: .debian
needs: ["deps-debian"]
stage: gimp
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- *ENVIRON
# Build GIMP
- echo -e "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP"
- printf "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP\n"
- meson setup _build-${RUNNER} -Dprefix="${GIMP_PREFIX}"
-Dgi-docgen=disabled
-Dpkgconfig.relocatable=true
-Drelocatable-bundle=yes
-Dcheck-update=yes
-Dbuild-id=org.gimp.GIMP_official.AppImage.$(uname -m)
- cd _build-${RUNNER}
- ninja
- echo -e "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K"
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
# Create bundle
- echo -e "\e[0Ksection_start:`date +%s`:gimp_bundle[collapsed=true]\r\e[0KCreating bundle"
- ninja install &> ninja_install.log || cat ninja_install.log
- printf "\e[0Ksection_start:`date +%s`:gimp_bundle[collapsed=true]\r\e[0KCreating bundle\n"
- ninja install > ninja_install.log 2>&1 || { cat ninja_install.log; exit 1; }
- cd ..
- bash build/linux/appimage/3_dist-gimp-goappimage.sh --bundle-only &> goappimage.log || cat goappimage.log
- echo -e "\e[0Ksection_end:`date +%s`:gimp_bundle\r\e[0K"
- sh build/linux/appimage/3_dist-gimp-goappimage.sh --bundle-only > goappimage.log 2>&1 || { cat goappimage.log; exit 1; }
- printf "\e[0Ksection_end:`date +%s`:gimp_bundle\r\e[0K\n"
artifacts:
paths:
- AppDir*/
@@ -293,12 +294,11 @@ gimp-debian:
## GNU/Linux 64-bit CIs (Debian) ##
.debian-x64:
.debian-nonreloc:
extends: .debian
rules:
- <<: *CI_MERGE
- <<: *CI_COMMIT
- if: '$GIMP_CI_MESON_CLANG != null'
variables: {}
- if: '$GIMP_CI_MESON_GCC != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_GCC.*/'
variables:
@@ -311,58 +311,56 @@ gimp-debian:
variables:
MESON_OPTIONS: "-Dvector-icons=false"
VARIANT: "-raster"
- if: '$GIMP_CI_SOURCES != null'
- <<: *CI_RELEASE
parallel:
matrix:
- RUNNER: x86_64_v2
- RUNNER: x86_64_v3
tags: []
deps-debian-x64:
extends: .debian-x64
deps-debian-nonreloc:
extends: .debian-nonreloc
stage: !reference [deps-debian, stage]
image: !reference [deps-debian, image]
variables:
GIT_STRATEGY: none
WORKSHOP_OPTION: '-Dworkshop=true'
script:
- !reference [deps-debian, script]
artifacts: !reference [deps-debian, artifacts]
gimp-debian-x64:
extends: .debian-x64
needs: ["deps-debian-x64"]
gimp-debian-nonreloc:
extends: .debian-nonreloc
needs: ["deps-debian-nonreloc"]
stage: !reference [gimp-debian, stage]
variables: !reference [gimp-debian, variables]
script:
- *ENVIRON
# Check building
- echo -e "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP"
- printf "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP\n"
- meson setup _build-${RUNNER} -Dprefix="${GIMP_PREFIX}"
-Dfile-plug-ins-test=true
$MESON_OPTIONS
- cd _build-${RUNNER}
- ninja
- echo -e "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K"
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
# Check execution
- echo -e "\e[0Ksection_start:`date +%s`:gimp_test[collapsed=true]\r\e[0KTesting GIMP execution"
- printf "\e[0Ksection_start:`date +%s`:gimp_test[collapsed=true]\r\e[0KTesting GIMP execution\n"
- ninja test
- echo -e "\e[0Ksection_end:`date +%s`:gimp_test\r\e[0K"
- printf "\e[0Ksection_end:`date +%s`:gimp_test\r\e[0K\n"
# Check source
- echo -e "\e[0Ksection_start:`date +%s`:gimp_tar[collapsed=true]\r\e[0KChecking GIMP source"
- printf "\e[0Ksection_start:`date +%s`:gimp_tar[collapsed=true]\r\e[0KChecking GIMP source\n"
- if [ $(git diff |wc -l) -ne 0 ]; then
echo "ERROR. A generated file was updated without the source:";
printf "ERROR. A generated file was updated without the source:\n";
git diff;
exit 1;
fi
- if [ "$VARIANT" != "-gcc" ] && [ "$VARIANT" != "-raster" ] && [ "$CI_PIPELINE_SOURCE" != "merge_request_event" ]; then
ninja dist &> ninja_dist.txt || cat ninja_dist.txt;
ninja dist > ninja_dist.log 2>&1 || { cat ninja_dist.log; exit 1; };
fi
- echo -e "\e[0Ksection_end:`date +%s`:gimp_tar\r\e[0K"
- printf "\e[0Ksection_end:`date +%s`:gimp_tar\r\e[0K\n"
# Check install
- echo -e "\e[0Ksection_start:`date +%s`:gimp_install[collapsed=true]\r\e[0KChecking GIMP installation"
- ninja install &> ninja_install.txt || cat ninja_install.txt;
- echo -e "\e[0Ksection_end:`date +%s`:gimp_install\r\e[0K"
- printf "\e[0Ksection_start:`date +%s`:gimp_install[collapsed=true]\r\e[0KChecking GIMP installation\n"
- ninja install > ninja_install.log 2>&1 || { cat ninja_install.log; exit 1; };
- printf "\e[0Ksection_end:`date +%s`:gimp_install\r\e[0K\n"
artifacts:
paths:
- _install-${RUNNER}/
@@ -374,49 +372,123 @@ gimp-debian-x64:
expire_in: 2 days
## Flatpak CI ##
.flatpak-x64:
## Flatpak CI (Fedora) ##
.flatpak:
extends: .default
#We need to specify this since .flatpak from flatpak_ci_initiative.yml sets to true
interruptible: false
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Flatpak.*/'
interruptible: true
- if: '$GIMP_CI_FLATPAK != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_FLATPAK.*/'
parallel:
matrix:
- RUNNER: [flatpak-aarch64, flatpak-x86_64]
tags:
- flatpak
image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master'
- $RUNNER
image: quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master
variables:
RUN_TESTS: 0
MESON_DIST: 0
before_script:
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install"
timeout: 40m
timeout: 90m
deps-flatpak-x64:
extends: .flatpak-x64
deps-flatpak:
extends: .flatpak
stage: dependencies
#https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/1502
#cache:
#key: ${CI_JOB_NAME_SLUG}
#paths:
#- .flatpak-builder/
script:
- bash build/linux/flatpak/1_build-deps-flatpak.sh
- sh build/linux/flatpak/1_build-deps-flatpakbuilder.sh
artifacts:
paths:
- .flatpak-builder.tar
- _build-$RUNNER.tar
- flatpak-builder.log
- babl-meson-log.tar
- gegl-meson-log.tar
expire_in: 2 hours
gimp-flatpak-x64:
extends: .flatpak-x64
needs: ["deps-flatpak-x64"]
stage: gimp
gimp-flatpak:
extends: .flatpak
needs: ["deps-flatpak"]
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- bash build/linux/flatpak/2_build-gimp-flatpak.sh
- sh build/linux/flatpak/2_build-gimp-flatpakbuilder.sh
artifacts:
paths:
- repo.tar
- temp*.flatpak
- repo*.tar
- gimp-flatpak-builder.log
- gimp-meson-log.tar
expire_in: 2 days
## Snap CI (Ubuntu) ##
.snap:
extends: .default
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Snap.*/'
interruptible: true
- if: '$GIMP_CI_SNAP != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_SNAP.*/'
parallel:
matrix:
- RUNNER: [aarch64, x86_64_v3]
tags:
- $RUNNER
image: $CI_REGISTRY_IMAGE:build-snap-${SNAPCRAFT_BASE_VERSION}-${RUNNER}
variables:
SNAPCRAFT_BASE_VERSION: "8_core24"
RUNNER: x86_64_v3
timeout: 20m
deps-snap:
extends: .snap
stage: dependencies
image: quay.io/buildah/stable
script:
- export BUILDAH_FORMAT=docker
- export STORAGE_DRIVER=vfs
- echo "$CI_REGISTRY_PASSWORD" | buildah login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
# Install deps
- echo "FROM ghcr.io/canonical/snapcraft:${SNAPCRAFT_BASE_VERSION}" > Dockerfile
- echo "ENTRYPOINT [\"\"]" >> Dockerfile
- echo "WORKDIR $CI_PROJECT_DIR" >> Dockerfile
- echo "ENV GITLAB_CI=1" >> Dockerfile
- echo "ENV RUNNER=$RUNNER" >> Dockerfile
- echo "RUN apt-get update -y" >> Dockerfile
- echo "RUN apt-get install -y curl jq squashfs-tools sudo" >> Dockerfile
# https://github.com/canonical/snapcraft-rocks/issues/37
- echo "RUN cp -r /usr/lib/python3.*/site-packages/extensions/* /usr/share/snapcraft/extensions/" >> Dockerfile
# https://github.com/canonical/snapcraft-rocks/issues/33
- echo "RUN ln -s /usr/libexec/snapcraft/craftctl /usr/bin/craftctl" >> Dockerfile
- echo "RUN sh build/linux/snap/1_build-deps-snapcraft.sh --install-snaps" >> Dockerfile;
# Build babl and GEGL
- echo "FROM $CI_REGISTRY_IMAGE:build-snap-${SNAPCRAFT_BASE_VERSION}-${RUNNER}" > Dockerfile2;
- echo "RUN sh build/linux/snap/1_build-deps-snapcraft.sh" >> Dockerfile2;
#FIXME: '2>&1 | grep -v STEP' since buildah is too verbose. See: https://github.com/containers/buildah/issues/6362
- buildah build --log-level error --volume $CI_PROJECT_DIR:$CI_PROJECT_DIR:Z --file $CI_PROJECT_DIR/Dockerfile --tag $CI_REGISTRY_IMAGE:build-snap-${SNAPCRAFT_BASE_VERSION}-${RUNNER} --layers --cache-from $CI_REGISTRY_IMAGE/cache --cache-to $CI_REGISTRY_IMAGE/cache --cache-ttl=120h 2>&1 | grep -v STEP && buildah push --log-level error $CI_REGISTRY_IMAGE:build-snap-${SNAPCRAFT_BASE_VERSION}-${RUNNER} 2>&1 | grep -v STEP
- buildah build --log-level error --volume $CI_PROJECT_DIR:$CI_PROJECT_DIR:Z --file $CI_PROJECT_DIR/Dockerfile2 --no-cache 2>&1 | grep -v STEP
artifacts:
paths:
- _install-$RUNNER.tar
- _build-$RUNNER.tar
- babl-meson-log.tar
- gegl-meson-log.tar
expire_in: 2 hours
gimp-snap:
extends: .snap
needs: ["deps-snap"]
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- sh build/linux/snap/2_build-gimp-snapcraft.sh
artifacts:
paths:
- temp*.snap
- gimp-snapcraft.log
- gimp-meson-log.tar
expire_in: 2 days
@@ -425,16 +497,20 @@ gimp-flatpak-x64:
.win:
extends: .default
rules:
#Developers (on GNOME/gimp namespace) can create multi-arch installers (.exe or .msixbundle)
#Non developers (e.g. on MRs), however, can create x64-only installers (.exe or .msix)
- if: '$RUNNER == "windows-aarch64" && $CI_PROJECT_NAMESPACE != "GNOME"'
when: never
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Windows Installer.*/ && $CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/'
interruptible: true
variables:
INSTALLER_OPTION: '-Dwindows-installer=true'
STORE_OPTION: '-Dms-store=true'
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Windows Installer.*/'
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Windows Installer.*/ && $CI_JOB_NAME !~ /.*store.*/'
interruptible: true
variables:
INSTALLER_OPTION: '-Dwindows-installer=true'
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/ && $CI_JOB_NAME =~ /.*64.*/ && $CI_JOB_NAME !~ /.*installer.*/'
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/ && $CI_JOB_NAME !~ /.*mingw32.*/ && $CI_JOB_NAME !~ /.*installer.*/'
interruptible: true
variables:
STORE_OPTION: '-Dms-store=true'
@@ -442,10 +518,10 @@ gimp-flatpak-x64:
variables:
INSTALLER_OPTION: '-Dwindows-installer=true'
STORE_OPTION: '-Dms-store=true'
- if: '$GIMP_CI_WIN_INSTALLER != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_WIN_INSTALLER.*/'
- if: '($GIMP_CI_WIN_INSTALLER != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_WIN_INSTALLER.*/) && $CI_JOB_NAME !~ /.*store.*/'
variables:
INSTALLER_OPTION: '-Dwindows-installer=true'
- if: '$GIMP_CI_MS_STORE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_MS_STORE.*/ && $CI_JOB_NAME =~ /.*64.*/ && $CI_JOB_NAME !~ /.*installer.*/'
- if: '($GIMP_CI_MS_STORE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_MS_STORE.*/) && $CI_JOB_NAME !~ /.*mingw32.*/ && $CI_JOB_NAME !~ /.*installer.*/'
variables:
STORE_OPTION: '-Dms-store=true'
- <<: *CI_RELEASE
@@ -462,8 +538,6 @@ gimp-flatpak-x64:
- $RUNNER
variables:
MSYS_ROOT: 'C:/msys64'
CC: cc
CXX: c++
#meson.build forces non-relocatable .pc. See: https://github.com/mesonbuild/meson/issues/14346
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
before_script:
@@ -472,20 +546,21 @@ gimp-flatpak-x64:
timeout: 40m
.win_environ: &WIN_ENVIRON
# See: https://testing.developer.gimp.org/core/setup/build/windows/#prepare-for-building
- Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0):win_environ[collapsed=true]$([char]13)$([char]27)[0KPreparing build environment"
## Build-time vars
- $env:PKG_CONFIG_PATH = "$GIMP_PREFIX/lib/pkgconfig;$MSYS_ROOT/$MSYSTEM_PREFIX/lib/pkgconfig;$MSYS_ROOT/$MSYSTEM_PREFIX/share/pkgconfig"
- $env:XDG_DATA_DIRS = "$GIMP_PREFIX/share;$MSYS_ROOT/$MSYSTEM_PREFIX/share"
- $env:PKG_CONFIG_PATH = "$GIMP_PREFIX/lib/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share/pkgconfig"
- $env:XDG_DATA_DIRS = "$GIMP_PREFIX/share;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share"
## Runtime vars
- $env:PATH = "$GIMP_PREFIX/bin;$MSYS_ROOT/$MSYSTEM_PREFIX/bin;" + $env:PATH
- $env:GI_TYPELIB_PATH = "$GIMP_PREFIX/lib/girepository-1.0;$MSYS_ROOT/$MSYSTEM_PREFIX/lib/girepository-1.0"
- $env:PATH = "$GIMP_PREFIX/bin;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/bin;$env:PATH"
- $env:GI_TYPELIB_PATH = "$GIMP_PREFIX/lib/girepository-1.0;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/girepository-1.0"
- Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):win_environ$([char]13)$([char]27)[0K"
deps-win:
extends: .win
stage: dependencies
script:
- build/windows/1_build-deps-msys2.ps1
- build\windows\1_build-deps-msys2.ps1
artifacts:
paths:
- _install-$MSYSTEM_PREFIX/
@@ -495,12 +570,15 @@ deps-win:
gimp-win:
extends: .win
needs: ["deps-win"]
stage: gimp
needs:
- job: deps-win
#to allow running outside 'GNOME/gimp' namespace (on MRs)
optional: true
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- build/windows/2_build-gimp-msys2.ps1
- build\windows\2_build-gimp-msys2.ps1
artifacts:
paths:
- gimp-$MSYSTEM_PREFIX/
@@ -508,17 +586,15 @@ gimp-win:
- _build-$MSYSTEM_PREFIX/done-dll.list
# Needed by dist-installer-weekly and dist-store-weekly
- _build-$MSYSTEM_PREFIX/config.h
- _build-$MSYSTEM_PREFIX/plug-ins/file_associations.list
- _build-$MSYSTEM_PREFIX/build/windows/installer/
- _build-$MSYSTEM_PREFIX/build/windows/store/
expire_in: 2 days
## WINDOWS x86 legacy CI (native MSYS2) ##
.win-x86:
.win-eol:
extends: .win
rules:
- !reference [.win, rules]
- if: '$GIMP_CI_MSYS2_WIN32 != null'
parallel:
matrix:
- RUNNER: win32-ps
@@ -528,20 +604,21 @@ gimp-win:
CC: cc
CXX: c++
deps-win-x86:
extends: .win-x86
deps-win-eol:
extends: .win-eol
stage: !reference [deps-win, stage]
script:
- !reference [deps-win, script]
artifacts: !reference [deps-win, artifacts]
gimp-win-x86:
extends: .win-x86
needs: ["deps-win-x86"]
gimp-win-eol:
extends: .win-eol
needs: ["deps-win-eol"]
stage: !reference [gimp-win, stage]
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- $env:PATH = "C:/msys64/usr/bin;" + $env:PATH
- !reference [gimp-win, script]
artifacts: !reference [gimp-win, artifacts]
@@ -551,22 +628,18 @@ gimp-win-x86:
file-plug-in-tests:
# FIXME: Do we need another job testing this under Windows? MSYS2 usually has
# the latest deps. It might be a good idea to test that too, maybe weekly?
extends: .debian-x64
extends: .debian-nonreloc
rules:
# Don't run on release since the plug-in doesn't get installed in releases
- <<: *CI_MERGE
- <<: *CI_COMMIT
needs: ["gimp-debian-x64"]
needs: ["gimp-debian-nonreloc"]
stage: analysis
variables:
GIT_STRATEGY: none
GIMP_TESTS_DATA_FOLDER: "$CI_PROJECT_DIR/_data/gimp-test-images/"
GIMP_TESTS_LOG_FILE: "$CI_PROJECT_DIR/_log/import-tests.log"
REGRESSION_STRING: "Total number of regressions: 0"
cache:
key: $CI_JOB_NAME
paths:
- _data
script:
- API_VER=$(grep GIMP_PKGCONFIG_VERSION _build*/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/')
- APP_VER=$(grep GIMP_APP_VERSION _build*/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/')
@@ -580,7 +653,7 @@ file-plug-in-tests:
- cd ..
- cat ${PLUG_IN_DIR}test-file-plug-ins/batch-import-tests.py | gimp-console-${APP_VER} -idf --batch-interpreter python-fu-eval -b - --quit
- if [ $(grep -c "${REGRESSION_STRING}" "${GIMP_TESTS_LOG_FILE}") -ne 1 ]; then
echo "There are file import regressions. Check the log at ${GIMP_TESTS_LOG_FILE}!";
printf "There are file import regressions. Check the log at ${GIMP_TESTS_LOG_FILE}!\n";
exit 1;
fi
# FIXME No export testing for now until it's more developed. A limited test
@@ -591,6 +664,7 @@ file-plug-in-tests:
reports:
junit: "_log/import-tests.xml"
expire_in: 2 days
timeout: 30m
meson-health:
extends: .default
@@ -598,10 +672,13 @@ meson-health:
- <<: *CI_MERGE
- <<: *CI_COMMIT
stage: analysis
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- apt-get update
- apt-get install -y git
- bash .gitlab/run_meson_health_diff.sh
- apt-get update -qq
- apt-get install -qq -y --no-install-recommends git shellcheck devscripts
- sh .gitlab/run_meson_health_diff.sh
allow_failure: true
clang-format:
extends: .default
@@ -612,7 +689,7 @@ clang-format:
- apt-get update
- apt-get install -y clang-format
git
- .gitlab/run_style_check_diff.sh
- sh .gitlab/run_style_check_diff.sh
allow_failure: true
artifacts:
when: on_failure
@@ -621,6 +698,19 @@ clang-format:
- fetch_origin.log
expire_in: 2 days
branches-check:
extends: .default
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS == null && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
stage: analysis
variables:
GIT_DEPTH: "0"
script:
- apt-get update -qq
- apt-get install -qq -y --no-install-recommends git
- sh .gitlab/check_dead_branches.sh
allow_failure: true
cppcheck:
extends: .default
rules:
@@ -630,7 +720,7 @@ cppcheck:
- apt-get update
- apt-get install -y cppcheck
- cppcheck -q -j8 --enable=all --force --output-file=cppcheck.xml --xml --xml-version=2
-i _build -i babl -i gegl -i _install -i .local -i .cache -i gimp-x64 .
-i _build -i babl -i gegl -i _install .
- mkdir report
- cppcheck-htmlreport --source-dir=. --title=gimp --file=cppcheck.xml --report-dir=report
artifacts:
@@ -644,10 +734,10 @@ cppcheck:
sources-debian:
extends: .default
rules:
# Don't run on MRs since non-merged/non-upstream code can't be distributed by us
- <<: *CI_COMMIT
- if: '$GIMP_CI_SOURCES != null'
- <<: *CI_RELEASE
needs: ["gimp-debian-x64"]
needs: ["gimp-debian-nonreloc"]
stage: distribution
variables:
GIT_STRATEGY: none
@@ -666,10 +756,10 @@ sources-debian:
dev-docs:
extends: .default
rules:
# Don't run on MRs since non-merged/non-upstream code can't be distributed by us
- <<: *CI_COMMIT
- if: '$GIMP_CI_SOURCES != null'
- <<: *CI_RELEASE
needs: ["deps-debian-x64", "gimp-debian-x64"]
needs: ["deps-debian-nonreloc", "gimp-debian-nonreloc"]
stage: distribution
variables:
GIT_STRATEGY: none
@@ -727,44 +817,66 @@ dist-appimage-weekly:
needs: ["gimp-debian"]
stage: distribution
script:
- bash build/linux/appimage/3_dist-gimp-goappimage.sh
- sh build/linux/appimage/3_dist-gimp-goappimage.sh
artifacts:
expose_as: 'Linux appimage'
paths:
- build/linux/appimage/_Output/
expire_in: 8 days
include: 'https://raw.githubusercontent.com/GNOME/citemplates/master/flatpak/flatpak_ci_initiative.yml'
include:
project: GNOME/citemplates
file: flatpak/flatpak_ci_initiative.yml
ref: 42fbc2526a7680b6a4f284a210e63e3973ea6dae
dist-flatpak-weekly:
extends:
- .default
- .publish_nightly
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Flatpak.*/'
interruptible: true
- if: '$GIMP_CI_FLATPAK != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_FLATPAK.*/'
needs: ["gimp-flatpak-x64"]
- !reference [.flatpak, rules]
needs: ["gimp-flatpak"]
stage: distribution
script:
- bash build/linux/flatpak/3_dist-gimp-flatpak.sh
- sh build/linux/flatpak/3_dist-gimp-flatpakbuilder.sh
artifacts:
expose_as: 'Linux flatpak'
paths:
- build/linux/flatpak/_Output/
expire_in: 8 days
dist-snap-weekly:
extends: .default
rules:
- !reference [.snap, rules]
needs: ["gimp-snap"]
stage: distribution
image: !reference [.snap, image]
variables: !reference [.snap, variables]
script:
- sh build/linux/snap/3_dist-gimp-snapcraft.sh
artifacts:
expose_as: 'Linux snap'
paths:
- build/linux/snap/_Output/
expire_in: 8 days
dist-installer-weekly:
extends: .default
rules:
- !reference [.win, rules]
needs: ["gimp-win", "gimp-win-x86"]
needs:
- job: gimp-win
#to allow running outside 'GNOME/gimp' namespace (on MRs)
optional: true
- job: gimp-win-eol
stage: distribution
tags:
- windows-aarch64
- win32-ps
variables:
MSYS_ROOT: 'C:/msys64'
script:
- build/windows/installer/3_dist-gimp-inno.ps1
- build\windows\installer\3_dist-gimp-inno.ps1
artifacts:
expose_as: 'Windows exe'
paths:
@@ -775,11 +887,11 @@ dist-installer-weekly:
dist-store-weekly:
extends: .default
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/'
interruptible: true
- if: '$GIMP_CI_MS_STORE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_MS_STORE.*/'
- <<: *CI_RELEASE
needs: ["gimp-win"]
- !reference [.win, rules]
needs:
- job: gimp-win
#to allow running outside 'GNOME/gimp' namespace (on MRs)
optional: true
stage: distribution
tags:
- win32-ps

View File

@@ -0,0 +1,42 @@
#!/bin/sh
printf "\e[0Ksection_start:`date +%s`:branch_check[collapsed=false]\r\e[0KChecking for dead branches\n"
git branch -r | grep -v 'origin/HEAD' | grep -v "origin/$CI_DEFAULT_BRANCH" | while IFS= read remote_branch; do
remote_branch=$(printf "%s\n" "$remote_branch" | sed 's/^ *//;s/ *$//')
branch_name=$(printf "%s\n" "$remote_branch" | sed 's|origin/||')
# NOT CHECKING
## Skip old stable branches
if echo "$branch_name" | grep -q "^gimp-[0-9]-" || [ "$branch_name" = "gnome-2-2" ] || [ "$branch_name" = "gnome-2-4" ]; then
printf "\033[33m(SKIP)\033[0m: $branch_name is a snapshot of $CI_DEFAULT_BRANCH but no problem\n"
continue
fi
## Skip recently created branches
if [ "$(git rev-parse "$remote_branch")" = "$(git rev-parse "$CI_COMMIT_SHA")" ]; then
printf "\033[33m(SKIP)\033[0m: $branch_name is identical to $CI_DEFAULT_BRANCH but no problem\n"
continue
fi
# CHECKING
## Check: merge-base
if git merge-base --is-ancestor "$remote_branch" "$CI_COMMIT_SHA"; then
printf "\033[31m(ERROR)\033[0m: $branch_name is fully merged into $CI_DEFAULT_BRANCH (via git merge-base)\n"
touch 'dead_branch'
continue
fi
## Fallback check: cherry
cherry_output=$(git cherry "$CI_COMMIT_SHA" "$remote_branch")
if [ -z "$(printf "%s\n" "$cherry_output" | grep '^+')" ]; then
printf "\033[31m(ERROR)\033[0m: $branch_name is fully merged into $CI_DEFAULT_BRANCH (via git cherry)\n"
touch 'dead_branch'
continue
fi
done
if [ -f "dead_branch" ]; then
printf " Please delete the merged branches\n"
exit 1
else
printf '(INFO): All branches are organized.\n'
fi
printf "\e[0Ksection_end:`date +%s`:branch_check\r\e[0K\n"

View File

@@ -1,16 +1,8 @@
<!-- ⚠️ IMPORTANT: READ ME! ⚠️
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.
For feature requests, performance issues and security reports, 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!
-->
It is important that you fill all the fields of the template. -->
### Environment/Versions
@@ -19,14 +11,21 @@ interactions. Thanks!
- 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
<!-- Note: you are expected to have verified the bug still exists
either in the last stable version of GIMP or on updated development code
(master branch).-->
(master branch).
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 -->
### Description of the bug
<!--Please describe your issue with details.
Add full (not cropped) screenshots or other files if needed.(write it after the > symbol)-->
<!-- Please describe your issue with details. By "details" we mean:
- "Be considerate and respectful". This is our main rule.
E.g. avoid negative emotional writing which only generates more upsetting
interactions.
- Stay on topic by writting only one bug per report created.
- Add full (not cropped) screenshots or other files using the clip button on GitLab. -->
### Reproduction

View File

@@ -1,4 +1,8 @@
**Operating System:** <!--[Windows? macOS? Linux? All?] (write it after the > symbol) -->
<!-- ⚠️ IMPORTANT: READ ME! ⚠️
This is the template for feature requests.
For bug reports, performance issues and security reports, 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. -->
### Description of the feature
@@ -15,3 +19,5 @@
<!-- Explain the use cases or problems to solve.
If you are unsure, you should first discuss with the community in the forums
or talk with the developers on IRC: https://www.gimp.org/discuss.html -->
/label ~"1. Feature"

View File

@@ -1,14 +1,21 @@
<!-- ⚠️ IMPORTANT: READ ME! ⚠️
This is the template for performance issues.
For bug reports, feature requests and security reports, 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. -->
### 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
<!-- Note: you are expected to have verified the performance issue still exists
either in the last stable version of GIMP or on updated development code
(master branch). -->
### Issue Description
### Description of the performance issue
<!-- Please provide a general description of the issue. -->
@@ -25,9 +32,9 @@ For more information, see
<!-- Please describe in detail the actions performed in the performance log.
If you added empty event markers to the log, please provide a description for them here.
If you recorded a screencast while recording the log, please attach it here. -->
If you recorded a screencast while recording the log, please attach it here. -->
### Additional Information
### Additional information
<!-- If there is any additional information, please provide it here. -->

View File

@@ -0,0 +1,31 @@
<!-- ⚠️ IMPORTANT: READ ME! ⚠️
This is the template for security reports.
For bug reports, feature requests and 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. -->
### Environment/Versions
- 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? 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: you are expected to have verified the security issue still exists
either in the last stable version of GIMP or on updated development code
(master branch). -->
### Description of the security report
<!-- Please provide a general description of the security issue (with CVE code if possible). -->
### Antivirus Log
<!-- Please attach a antivirus log or other file detailing the issue, and attach it to the report.
If you have none, at least report GIMP as false positive to the antivirus before continuing. -->
### Additional information
<!-- If there you know the culprit code, please link it here. -->
/label ~"1. Security"

View File

@@ -9,4 +9,7 @@
"*Allow commits from members who can merge to the target branch.*"
- No AI-generated contents allowed (neither code nor text, images…).
Only human created works please! -->
Only human created works please!
- You can request the devs to allow installable packages to be
generated from this MR by writting ~Package: in the comments -->

View File

@@ -1,167 +1,218 @@
#!/bin/bash
#!/bin/sh
source .gitlab/search-common-ancestor.sh
diff=$(git diff -U0 --no-color "${newest_common_ancestor_sha}" -- '*.build' '*.py' | grep -E '^\+[^+]' | sed 's/^+//')
. .gitlab/search-common-ancestor.sh
#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'"
)
# CHECK SCRIPTS RUNNED BY MESON (ALL OSes)
printf "\e[0Ksection_start:`date +%s`:nonunix_test[collapsed=false]\r\e[0KChecking for non-Unix compatibility\n"
diff=$(git diff -U0 --no-color --submodule=diff "${newest_common_ancestor_sha}" \
| awk '
/^diff --git a\/.*\.(build|py)/ {
sub(/^diff --git a\//, "", $0)
sub(/ b\/.*$/, "", $0)
file = $0
next
}
/^\+[^+]/ && file != "" {
print file ":" substr($0, 2)
}
')
for coreutil in "${coreutils_array[@]}"; do
## List of commonly used utilities on Unix world
## See the context: https://gitlab.gnome.org/GNOME/gimp/-/issues/11385
coreutils_list="
\.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_list; do
if echo "$diff" | grep -q "$coreutil"; then
found_coreutils+=" $coreutil"
found_coreutils="$(echo "$found_coreutils $coreutil" | sed 's|\\||g')"
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}."
printf "$diff\n"
printf '\033[31m(ERROR)\033[0m: Seems that you are trying to add an Unix-specific dependency to be called by Meson.\n'
printf " Please, port to Python (which is crossplatform), your use of:${found_coreutils}.\n"
fi
#Limited list of commonly used utilities on Windows world
ntutils_array=(
".bat"
".cmd"
".ps1"
"'cmd'"
"'powershell'"
)
for ntutil in "${ntutils_array[@]}"; do
## Limited list of commonly used utilities on Windows world
ntutils_list="
\.bat \
\.cmd \
\.ps1 \
'cmd' \
'powershell'
"
for ntutil in $ntutils_list; do
if echo "$diff" | grep -q "$ntutil"; then
found_ntutils+=" $ntutil"
found_ntutils="$(echo "$found_ntutils $ntutil" | sed 's|\\||g')"
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}."
printf "$diff\n"
printf '\033[31m(ERROR)\033[0m: Seems that you are trying to add a NT-specific dependency to be called by Meson.\n'
printf " Please, port to Python (which is crossplatform), your use of:${found_ntutils}.\n"
fi
if [ -z "$found_coreutils" ] && [ -z "$found_ntutils" ]; then
printf '(INFO): Meson .build and .py files are alright regarding being crossplatform.\n'
fi
printf "\e[0Ksection_end:`date +%s`:nonunix_test\r\e[0K\n"
if [ "$found_coreutils" ] || [ "$found_ntutils" ]; then
# CHECK SCRIPTS NOT RUN BY MESON (UNIX ONLY)
# Shell scripts have potential portability issues if:
# 1) contain bash shebang or are called by bash;
# 2) contain bashisms.
printf "\e[0Ksection_start:`date +%s`:unix_test[collapsed=false]\r\e[0KChecking for Unix portability (optional)\n"
diff=$(git diff -U0 --no-color --submodule=diff "${newest_common_ancestor_sha}" \
| awk '
/^diff --git a\// {
sub(/^diff --git a\//, "", $0)
sub(/ b\/.*$/, "", $0)
file = $0
next
}
/^\+[^+]/ && file != "" {
print file ":" substr($0, 2)
}
')
## Check shebang and external call (1)
echo "$diff" | grep -E '#!\s*/usr/bin/env\s+bash|#!\s*/(usr/bin|bin)/bash(\s|$)' && found_bashism='extrinsic_bashism'
echo "$diff" | grep -E "bash\s+.*\.sh" && found_bashism='extrinsic_bashism'
## Check content with shellcheck and checkbashisms (2)
for sh_script in $(find "$CI_PROJECT_DIR" -type d -name .git -prune -o -type f \( ! -name '*.ps1' ! -name '*.c' -exec grep -lE '^#!\s*/usr/bin/env\s+(sh|bash)|^#!\s*/(usr/bin|bin)/(sh|bash)(\s|$)' {} \; -o -name '*.sh' ! -exec grep -q '^#!' {} \; -print \)); do
shellcheck --severity=warning --shell=sh -x "$sh_script" | grep -v 'set option posix is' | grep -vE '.*http.*SC[0-9]+.*POSIX' | grep --color=always -B 2 -E 'SC[0-9]+.*POSIX' && found_bashism='intrinsic_bashism'
checkbashisms -f $sh_script || found_bashism='intrinsic_bashism'
done
if [ "$found_bashism" ]; then
printf '\033[33m(WARNING)\033[0m: Seems that you added a Bash-specific code (aka "bashism").\n'
printf " It is recommended to make it POSIX-compliant (which is portable).\n"
else
printf '(INFO): Shell .sh files are alright regarding being portable.\n'
fi
printf "\e[0Ksection_end:`date +%s`:unix_test\r\e[0K\n"
if [ "$found_coreutils" ] || [ "$found_ntutils" ] || [ "$found_bashism" ]; then
exit 1
fi
echo 'Meson .build files are alright regarding crossplatform.'
exit 0

View File

@@ -1,27 +1,25 @@
#!/bin/bash
set -e
#!/bin/sh
ancestor_horizon=28 # days (4 weeks)
echo ""
echo "This script may be wrong. You may disregard it if it conflicts with"
echo "https://gitlab.gnome.org/GNOME/gimp/-/blob/master/CODING_STYLE.md"
echo "https://developer.gimp.org/core/coding_style/"
clang-format --version
# Wrap everything in a subshell so we can propagate the exit status.
(
source .gitlab/search-common-ancestor.sh
. .gitlab/search-common-ancestor.sh
git diff -U0 --no-color "${newest_common_ancestor_sha}" | clang-format-diff -p1 > format-diff.log
)
exit_status=$?
[ ${exit_status} == 0 ] || exit ${exit_status}
[ ${exit_status} = 0 ] || exit ${exit_status}
format_diff="$(<format-diff.log)"
format_diff="$(cat format-diff.log)"
if [ -n "${format_diff}" ]; then
cat format-diff.log

View File

@@ -1,6 +1,4 @@
#!/bin/bash
set -e
#!/bin/sh
ancestor_horizon=28 # days (4 weeks)
@@ -14,7 +12,7 @@ ancestor_horizon=28 # days (4 weeks)
if ! git ls-remote --exit-code upstream >/dev/null 2>&1 ; then
git remote add upstream https://gitlab.gnome.org/GNOME/gimp.git
fi
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" upstream &> ./fetch_upstream.log
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" upstream > ./fetch_upstream.log 2>&1
# Work out the newest common ancestor between the detached HEAD that this CI job
# has checked out, and the upstream target branch (which will typically be
@@ -28,10 +26,12 @@ git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%
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)" patch-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 2>&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
git rev-list --first-parent "upstream/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}" > "temp_upstream" 2>&1
git rev-list --first-parent "patch-origin/${source_branch}" > "temp_patch-origin" 2>&1
newest_common_ancestor_sha=$(diff --old-line-format='' --new-line-format='' "temp_upstream" "temp_patch-origin" | head -n 1)
if [ -z "${newest_common_ancestor_sha}" ] || [ "${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"
echo "your clone, rebase, and re-push your branch."

View File

@@ -23,6 +23,7 @@ The following people have contributed code to GIMP:
Rob Antonishen
Nicola Archibald
Timm Bäder
Gabriele Barbero
Luis Barrancos
Jerry Baker
John Beale
@@ -204,6 +205,7 @@ The following people have contributed code to GIMP:
Federico Mena Quintero
Loren Merritt
Jim Meyer
Ondřej Míchal
James Mitchell
Hirotsuna Mizuno
Chris Mohler

View File

@@ -4,14 +4,15 @@ 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.10.x versions. It is advised to
uninstall them before installing GIMP @GIMP_APP_VERSION@. Since libgimp* libraries
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@ replaces earlier GIMP versions. It is advised to uninstall
them before installing GIMP @GIMP_APP_VERSION@. Since libgimp* libraries and data
are all versioned anyway, it is possible to keep your older GIMP 2.x
or 3.x installations 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
versions. Plug-ins and scripts written for GIMP 2.10, 2.8, 2.6 or
earlier GIMP 2.x versions will not work because the API changed.
earlier GIMP 2.x versions will not work because the API changed in
GIMP 3.0.
The most important part is to make sure the requirements for a build
are fulfilled. We depend on a number of tools and libraries which are
@@ -146,18 +147,11 @@ help in that regard:
incompatible with the version 2 (which is still experimental anyway
and has no stable release at time of writing).
11. We also need the mypaint-brushes data package:
11. We also need the mypaint-brushes v2 data package:
https://github.com/mypaint/mypaint-brushes
If installing from repository, install from branch "v1.3.x" or the
last tag "v1.y.z" (e.g. "v1.3.1" at time of writing).
In particular do NOT install from `master` branch which installs
brushes incompatible with GIMP (the `master` branch and v2 brushes
are targeted to software using recent libmypaint which GIMP wasn't
ported to yet).
Also this is a data packages and therefore it will install the
Note that this is a data packages and therefore it will install the
pkg-config file inside `$PREFIX/share/pkgconfig/`. If you install
mypaint-brushes from repository in a non-standard prefix, you will
have to make sure your $PKG_CONFIG_PATH environment variable also
@@ -244,7 +238,7 @@ help in that regard:
Package Name Version
appstream-glib @APPSTREAM_GLIB_REQUIRED_VERSION@
appstream @APPSTREAM_REQUIRED_VERSION@
ATK @ATK_REQUIRED_VERSION@
babl @BABL_REQUIRED_VERSION@
cairo @CAIRO_REQUIRED_VERSION@
@@ -270,7 +264,7 @@ help in that regard:
librsvg @RSVG_REQUIRED_VERSION@
libtiff @LIBTIFF_REQUIRED_VERSION@
Little CMS @LCMS_REQUIRED_VERSION@
mypaint-brushes-1.0
mypaint-brushes-2.0
pangocairo @PANGO_REQUIRED_VERSION@
poppler-data @POPPLER_DATA_REQUIRED_VERSION@
PyGObject
@@ -281,10 +275,12 @@ help in that regard:
Package Name Version Feature
bison - Image Map plug-in
cairo-pdf @CAIRO_PDF_REQUIRED_VERSION@ PDF export
cfitsio - FITS
iso-codes - Language selection
ExcHndl - Crash logs on Windows with Dr. MinGW
flex - Image Map plug-in
gs - ghostscript
libaa - ASCII art
libheif @LIBHEIF_REQUIRED_VERSION@ HEIF (HEIC, AVIF)

344
NEWS
View File

@@ -6,6 +6,324 @@
This is the development branch of GIMP.
Overview of Changes from GIMP 3.1.4 to GIMP 3.2-RC1
===================================================
Core:
- Improve Export to SVG of paths by not exporting the DTD and adding
an explicit SVG version.
Graphical User Interface:
- "Monitor Linked Image" and "Discard Link Information" menu items
added to Layer menu when the selected layer is a link layer.
- Palette Import dialog now display file format filters, both to let
users hide irrelevant files from view and to highlight which formats
we support.
Plug-Ins:
- Fixed vulnerabilities: ZDI-CAN-27684, ZDI-CAN-27863, ZDI-CAN-27878,
ZDI-CAN-27836, ZDI-CAN-27823, ZDI-CAN-27793
API:
- The following libgimpbase API are now deprecated:
* gimp_pixpipe_params_init
* gimp_pixpipe_params_parse
* gimp_pixpipe_params_build
* gimp_pixpipe_params_free
- New libgimp functions:
* gimp_vector_layer_get_enable_fill
* gimp_vector_layer_get_enable_stroke
* gimp_vector_layer_get_fill_color
* gimp_vector_layer_get_path
* gimp_vector_layer_get_stroke_cap_style
* gimp_vector_layer_get_stroke_color
* gimp_vector_layer_get_stroke_dash_offset
* gimp_vector_layer_get_stroke_dash_pattern
* gimp_vector_layer_get_stroke_join_style
* gimp_vector_layer_get_stroke_miter_limit
* gimp_vector_layer_get_stroke_width
* gimp_vector_layer_get_stroke_width_unit
* gimp_vector_layer_set_enable_fill
* gimp_vector_layer_set_enable_stroke
* gimp_vector_layer_set_fill_color
* gimp_vector_layer_set_stroke_cap_style
* gimp_vector_layer_set_stroke_color
* gimp_vector_layer_set_stroke_dash_offset
* gimp_vector_layer_set_stroke_dash_pattern
* gimp_vector_layer_set_stroke_join_style
* gimp_vector_layer_set_stroke_miter_limit
* gimp_vector_layer_set_stroke_width
* gimp_vector_layer_set_stroke_width_unit
Build:
- CI:
* Linux builds ported from unmaintained Kaniko to Buildah.
* Colored output and .pdb support for builds of dependency using
CMake.
* Ability to apply remote patches on dependency builds.
Overview of Changes from GIMP 3.1.2 to GIMP 3.1.4
=================================================
Core:
- About dialog now shows "Up to date as of <date>" text for more
clarity.
- Fixed config migration when updating to GIMP 3.1/2.
- Reorganizing layer search code into generic item tree view search
code for further reusing into other use cases.
- Internal classes, config items and actions renamed from "vectors" to
"path".
- Some cleanup of outdated disabled unit tests and other warnings.
- Restructuration of internal GimpControllerManager and
GimpContainerView API.
- GimpContainerListView now uses a GtkListBox. A Playground switch was
added to use the new widgets in all views that can be switched
between list and grid view (brushes, patterns etc.). This won't
likely get out of Playground before GIMP 4 because it is far too
slow right now (and apparently we'll need GTK4 for making it fast as
our current lists).
- Various code have been moving away from GtkTreeView and some new
internal classes were added as a preparation for GTK4 port.
- GEX format updated to use standard <custom/> instead of <metadata/>
per update in the AppStream specs in the last few years. This
doesn't make any compatibility issue since this format is purely
internal only for now, not public.
- New setting "Update metadata automatically" in Preferences > Image
Import & Export > Export Policies. When enabled, add and update
metadata automatically. When disabled, only the minimum necessary
metadata changes are made, without changing modification date,
synchronizing tags, or updating the software and change history
metadata. This new setting is enabled by default.
- Fix palette import to properly import colors with alpha values from
palettes.
- New layer types:
* vector layers
* link layers
- Fill/Stroke editor are now live-previewing color changes for vector
layer fill/stroke and text layer outlines.
Tools:
- MyPaint brush tool was ported to the newer MyPaintSurface2 API. A
consequence is that we now depend on mypaint-brushes-2.0 instead of
mypaint-brushes-1.0.
- Seamless Clone (Playground): made to work again, but is still too
slow to move out of Playground.
- The Paths tool has updated UI to create vector layers.
- Text tool: bold, italic and underline can now be applied with
commonly used shortcuts (Ctrl+b, i and u respectively).
- Vector and Link layers cannot be painted on, and filters cannot be
merged on them. They now need to be explicitly downgraded to raster
layers.
Graphical User Interface:
- More consistent capitalization across text in UI.
- Use system colors on Windows title bar when System colors theme is
set.
- Make the comment text area sensitive in Export procedure dialogs
depending on whether "Save Comment" checkbox is checked or not.
- In various GUI using a GtkStack (Input Controller dialogue,
Preferences dialogue, and Welcome dialogue), we now turn off
animations when it is set OFF system-wide.
- "System" color scheme now also works on macOS.
- GimpSpinScale cursors now changed to "pointer" when hovering the
slider area and "col-resize" when actually grabbing the cursor.
- The Welcome dialog will now recognize your standard shortcuts to
create a new file, open a file or open one of the 10 most recent
files.
Plug-Ins:
- TIFF - Add support for the following features, based on unofficial
documentation and user-provided sample files:
* Sets the selected layer based on the image-level metadata.
* Sets the visibility of the background layer based on the image
level metadata.
* Sets the blend mode and color tag of each layer, based on extended
layer-level metadata. Legacy blend modes are used, based on
user feedback and comparison with Sketchbook.
* Creates group layers and stores layers in them. Layers are read from
top to bottom, and layer groups are added and filled based on layer
level metadata.
- Animation Playback was redesigned to more closely resemble standard
playback UIs. The redesign also changes the progress bar to a
GtkScale, so users can more easily move to different frames on the
timeline.
- New GEGL Filter Browser plug-in to list and inspect all available
filters for development purpose.
- New import support:
* PAA textures: initial import support (includes RGBA 4444, 5551,
8888, and Grayscale with Alpha channel. It does not yet cover DXT1
- 5 texture import support).
* Seattle Filmworks photos (earliest format SFW93A, and the most
common format SFW94A). Both formats are essentially mangled JPEGs,
though mangled in different ways.
* HRZ Slow Scan Television Images (restored, as it used to be
implemented and removed in 2004).
- Raw Image data plug-in dialog redesigned to be on a two-column
layout to avoid over-high dialog.
- Print: in sandboxed environments (Flatpak, Snap), the print Settings
are now displayed as a second dialog after the portal print dialog.
This 2-step workflow is a work-around to the inability to tweak the
print dialog when the print portal is in use.
API:
- GimpTRCType enum type made available in libgimp and PDB.
- gimp-file-save properly sets associated save or exported files.
- New PDB/libgimp functions:
* gimp_drawable_filter_operation_get_available()
* gimp_drawable_filter_operation_get_details()
* gimp_drawable_filter_operation_get_pspecs()
* gimp_context_get_paint_fade_length()
* gimp_context_get_paint_fade_repeat()
* gimp_context_set_paint_fade_length()
* gimp_context_set_paint_fade_repeat()
* gimp_item_id_is_vector_layer()
* gimp_param_spec_vector_layer()
* gimp_procedure_add_vector_layer_argument()
* gimp_procedure_add_vector_layer_aux_argument()
* gimp_procedure_add_vector_layer_return_value()
* gimp_vector_layer_discard()
* gimp_vector_layer_get_by_id()
* gimp_vector_layer_new()
* gimp_vector_layer_refresh()
- GimpSizeEntry (libgimpwidget) can now parse mathematical expressions
in their reference value spin buttons too.
- GimpColorScales (libgimpwidget) will now set its decimals to 0 when
creating u8 RGB color selectors. This change will help further
distinguish between the 0...00 and 0..255 views in the Color
Selectors. It will also better convey to users that u8 is an integer
value rather than a floating point.
- Favor existing image comment instead of always loading comment from
metadata.
- Improve handling of comment metadata with
"charset=[ascii|InvalidCharsetId]" prefixes.
- New GIMP_METADATA_SAVE_UPDATE value in enum type
GimpMetadataSaveFlags (libgimpbase).
- Modernize setting "Exif.Image.DateTime" metadata by setting the
timezone additionally.
Build:
- Add nightly Snap package.
- Add nightly Aarch64 flatpak.
- appstream-glib dependency replaced with libappstream
- Installer uses latest InnoSetup now.
- New configure option -Dwin-debugging allowing to choose DWARF debug
symbols on Windows instead of the native (CodeView) symbols. This
will be useful for people wishing to debug with GDB in particular.
Overview of Changes from GIMP 3.0.4 to GIMP 3.1.2
=================================================
Core:
- Layer mask created from layer's alpha when there is no alpha
channel is now a fully opaque mask.
- Major non-destructive filter code refactoring.
- Lock Content now generates undo steps.
- NDE filters are now allowed on channels.
- Merging filter will now add an alpha channel to a layer if required.
- Refactoring Photoshop stream loading functions.
- Loading Photoshop RGB and grayscale patterns (.pat, unfortunately
the same extension as our own pattern format) now supported.
- The histogram editor now shows a "Compute unique colors:" checkbox
which will display the unique color count in the image.
- Deleting current palette entry now selects the next entry in the
palette.
- New paint mode: Overwrite. Note that this mode is only available for
paint tools right now (in particular not for layers, neither in
filters).
Graphical User Interface:
- Brushes and Fonts dockables: new "Use theme colors for preview"
toggle button.
- The Palettes and Palette Editor dockables, and the Palette tab in
FB/BG Color dockable, also follow theme colors for grid display.
- New "System" color scheme which will follow the system's color
scheme setting (on Unix-like systems when XDG Settings portal is
installed and on Windows).
Tools:
- Curves tool: Photoshop curves file format (.acv) can now be loaded.
- Levels tool: Photoshop levels file format (.alv) can now be loaded.
- Text tool: new "Outline Direction" settings.
Plug-Ins:
- Jigsaw: the plug-in now draws on transparent layers too.
- Playstation TIM images now supported (import/export).
- Palettes can now be exported as Krita .kpl palette.
- Over The Air Bitmap (Nokia mobile image format) now supported for
import.
- PSD:
* legacy Drop Shadow layer style is now imported on loading.
* legacy Inner Shadow layer style is now imported on loading.
- file-raw: new support for ART (Another RawTherapee, fork of the
latter) as a RAW loader.
- OpenEXR: support for importing multi-layer OpenEXR images.
- JPEG 2000: export support added.
- APNG: initial import support.
- JIF: new import support for Jeff's Image Format.
- ORA: support the extensions storing layer's "pixel locked" and
"selected" status on import and export.
- Script-Fu: new function (script-fu-register-i18n) for setting up
localization of Script-Fu plug-ins.
- HEIF:
* new AVCI import support (requires libheif 1.19.6 with OpenH264
decoder enabled);
* new HEJ2 export support (requires libheif 1.19.8 with OpenJPEG
support).
- New export support for PSB.
Modules:
- CMYK selector: Total Ink Coverage (total percentage of ink that
would be needed to print a particular color) information is now
shown.
API:
- Changes in libgimpwidgets:
* New functions:
+ gimp_prop_toggle_new()
- Changes in libgimpui:
* New functions:
+ gimp_procedure_dialog_get_coordinates()
* gimp_procedure_dialog_get_widget() will now generate a radio frame
widget for GimpChoice arguments of 2 choices only (and will still
default to a combo box for larger choices list).
PDB:
- none_ok tag now allowed on sample_point and guide PDB types.
Build:
- File format associations list now generated by the build system for
Windows and OSes using the Desktop file.
- Flatpak: verify nightly flatpak dependencies with the
flatpak-external-data-checker (like we do for stable and beta
flatpaks).
- Various non-portable scripts were ported to be properly
POSIX-compliant and to allow native builds on all OS (e.g. Windows).
- Some soft checks were also added to the build system to prevent
re-introduction of non-portable code.
Overview of Changes from GIMP 3.0.2 to GIMP 3.0.4
=================================================
@@ -17,6 +335,17 @@ Core:
- Module loading improved to be better cross-platform (in particular
on macOS both .so and .dylib modules are supported).
- Code compliant with GCC 15 (C23).
- Filter size updated when its drawable is rotated.
- Font loading (at startup) optimized.
- Set the proper program name for KDE/Wayland to map the process to
the correct desktop file.
- "windows-display-*" are hidden from the Shortcuts dialog (they are
not meant to be remapped).
- Editing non-destructive effects now triggers undo steps.
- When migrating from GIMP 2.x to GIMP 3, shortcuts for actions
"edit-paste-as-new-layer*" are now converted to "edit-paste-merged*"
(and not "edit-paste*" anymore which was confusing and
counter-productive).
Graphical User Interface:
@@ -37,11 +366,17 @@ Graphical User Interface:
- Removed size restrictions on Display Filters.
- Don't show hidden tools on toolbox tooltips.
- Fix "Keep above" Window Manager hint.
- Multi-Window mode on Windows: dock windows' title bars now adapt to
the Windows system theme colors too.
- Show palette name in Palette Color Selector.
Tools:
- MyPaint Brush: have consistent options layout compared to other
paint tools.
- Scissors Select Tool: close the curve on Enter, similar to the Path
tool.
- Path Tool: connect path on click in design mode.
Plug-ins:
@@ -74,6 +409,7 @@ Build:
* Downgrading is only possible by uninstalling first.
* Development warning is shown in dev build of stable series too.
* Add fractional scaling support to Installer welcome image.
* Restore points now have a timeout to prevent stuckness.
- Our AppImage won't ship debug symbols anymore. Better debugging can
be set with: export DEBUGINFOD_URLS="https://debuginfod.debian.net"
- Windows builds:
@@ -81,11 +417,17 @@ Build:
files for plug-in developers.
* Dedicated file icon for XCF files.
* Generate native .pdb CodeView symbols on Windows (smaller debug
data files, usable by MSIX and better debugging ability).
data files, usable by MSIX and better debugging ability), except
on x86 (32-bit).
- Crossbuilds are dropped from CI.
- Shell scripts used in the meson build are ported to Python (more
portable and much faster on some platforms, in particular Windows).
- Some build scripts were moved around for reorganization.
- Depency requirement bumped:
* babl 0.1.114
* GEGL 0.4.62
- New "Inputs" feature for simpler Gitlab pipelines running.
- Some in-repository documentation was cleaned up.
Overview of Changes from GIMP 3.0.0 to GIMP 3.0.2

4
README
View File

@@ -1,9 +1,9 @@
------------------------------
GNU Image Manipulation Program
3.0 Stable Branch
3.1 Development Branch
------------------------------
This is a stable release in the GIMP 3.0 series.
This is an unstable development release in the GIMP 3.1 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

View File

@@ -32,9 +32,9 @@ if enable_default_bin
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())
meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; import os; copy2(argv[1], str(Path(os.environ.get("MESON_INSTALL_DESTDIR_PREFIX")) / "bin" / argv[2]))',
gimp_debug_tool.full_path(), 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; import os; copy2(argv[1], str(Path(os.environ.get("MESON_INSTALL_DESTDIR_PREFIX")) / "bin" / argv[2].replace("@0@", argv[3])))',
gimp_debug_tool.full_path(), fs.name(gimp_debug_tool.name()).replace(exec_ver, '-@0@.exe'), api_version_major.to_string())
endif
endif

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ABOUT_H__
#define __ABOUT_H__
#pragma once
#define GIMP_ACRONYM \
@@ -48,6 +47,3 @@
"\n\n" \
"You should have received a copy of the GNU General Public License " \
"along with GIMP. If not, see: https://www.gnu.org/licenses/")
#endif /* __ABOUT_H__ */

View File

@@ -15,9 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ACTIONS_TYPES_H__
#define __ACTIONS_TYPES_H__
#pragma once
#include "dialogs/dialogs-types.h"
#include "tools/tools-types.h"
@@ -51,6 +49,3 @@ typedef enum
GIMP_SAVE_MODE_EXPORT_AS,
GIMP_SAVE_MODE_OVERWRITE
} GimpSaveMode;
#endif /* __ACTIONS_TYPES_H__ */

View File

@@ -91,10 +91,10 @@
#include "text-editor-actions.h"
#include "text-tool-actions.h"
#include "tool-options-actions.h"
#include "tool-path-actions.h"
#include "tool-presets-actions.h"
#include "tool-preset-editor-actions.h"
#include "tools-actions.h"
#include "vector-toolpath-actions.h"
#include "view-actions.h"
#include "windows-actions.h"
@@ -104,6 +104,7 @@
/* global variables */
GimpActionFactory *global_action_factory = NULL;
GHashTable *aux_filter_hash_table = NULL;
/* private variables */
@@ -233,12 +234,12 @@ static const GimpActionFactoryEntry action_groups[] =
{ "tool-options", N_("Tool Options"), GIMP_ICON_DIALOG_TOOL_OPTIONS,
tool_options_actions_setup,
tool_options_actions_update },
{ "tool-path", N_("Tool Path"), GIMP_ICON_PATH,
tool_path_actions_setup,
tool_path_actions_update },
{ "tools", N_("Tools"), GIMP_ICON_DIALOG_TOOLS,
tools_actions_setup,
tools_actions_update },
{ "vector-toolpath", N_("Path Toolpath"), GIMP_ICON_PATH,
vector_toolpath_actions_setup,
vector_toolpath_actions_update },
{ "paths", N_("Paths"), GIMP_ICON_PATH,
paths_actions_setup,
paths_actions_update },
@@ -270,6 +271,8 @@ actions_init (Gimp *gimp)
action_groups[i].icon_name,
action_groups[i].setup_func,
action_groups[i].update_func);
aux_filter_hash_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
}
void
@@ -280,6 +283,23 @@ actions_exit (Gimp *gimp)
g_return_if_fail (global_action_factory->gimp == gimp);
g_clear_object (&global_action_factory);
g_hash_table_unref (aux_filter_hash_table);
}
/* XXX Temporary code to store the list of filter operations with an
* "aux" input. This won't be necessary anymore once these filters can
* be applied non-destructively too in the future.
*/
void
actions_filter_set_aux (const gchar *action_name)
{
g_hash_table_add (aux_filter_hash_table, (gpointer) g_strdup (action_name));
}
gboolean
actions_filter_get_aux (const gchar *action_name)
{
return g_hash_table_lookup (aux_filter_hash_table, action_name) != NULL;
}
Gimp *
@@ -490,10 +510,9 @@ action_data_sel_count (gpointer data)
{
if (GIMP_IS_CONTAINER_EDITOR (data))
{
GimpContainerEditor *editor;
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
editor = GIMP_CONTAINER_EDITOR (data);
return gimp_container_view_get_selected (editor->view, NULL, NULL);
return gimp_container_view_get_selected (editor->view, NULL);
}
else
{

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ACTIONS_H__
#define __ACTIONS_H__
#pragma once
extern GimpActionFactory *global_action_factory;
@@ -25,6 +24,9 @@ extern GimpActionFactory *global_action_factory;
void actions_init (Gimp *gimp);
void actions_exit (Gimp *gimp);
void actions_filter_set_aux (const gchar *action_name);
gboolean actions_filter_get_aux (const gchar *action_name);
Gimp * action_data_get_gimp (gpointer data);
GimpContext * action_data_get_context (gpointer data);
GimpImage * action_data_get_image (gpointer data);
@@ -114,6 +116,3 @@ void action_message (GimpDisplay *display,
paths = gimp_image_get_selected_paths (image); \
if (! paths) \
return
#endif /* __ACTIONS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __BRUSH_EDITOR_ACTIONS_H__
#define __BRUSH_EDITOR_ACTIONS_H__
#pragma once
void brush_editor_actions_setup (GimpActionGroup *group);
void brush_editor_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __BRUSH_EDITOR_ACTIONS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __BRUSHES_ACTIONS_H__
#define __BRUSHES_ACTIONS_H__
#pragma once
void brushes_actions_setup (GimpActionGroup *group);
void brushes_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __BRUSHES_ACTIONS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __BUFFERS_ACTIONS_H__
#define __BUFFERS_ACTIONS_H__
#pragma once
void buffers_actions_setup (GimpActionGroup *group);
void buffers_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __BUFFERS_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __BUFFERS_COMMANDS_H__
#define __BUFFERS_COMMANDS_H__
#pragma once
void buffers_paste_cmd_callback (GimpAction *action,
@@ -28,6 +27,3 @@ void buffers_paste_as_new_image_cmd_callback (GimpAction *action,
void buffers_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __BUFFERS_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CHANNELS_ACTIONS_H__
#define __CHANNELS_ACTIONS_H__
#pragma once
void channels_actions_setup (GimpActionGroup *group);
void channels_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __CHANNELS_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CHANNELS_COMMANDS_H__
#define __CHANNELS_COMMANDS_H__
#pragma once
void channels_edit_attributes_cmd_callback (GimpAction *action,
@@ -69,6 +68,3 @@ void channels_color_tag_cmd_callback (GimpAction *action,
void channels_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __CHANNELS_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __COLORMAP_ACTIONS_H__
#define __COLORMAP_ACTIONS_H__
#pragma once
void colormap_actions_setup (GimpActionGroup *group);
void colormap_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __COLORMAP_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __COLORMAP_COMMANDS_H__
#define __COLORMAP_COMMANDS_H__
#pragma once
void colormap_edit_color_cmd_callback (GimpAction *action,
@@ -31,6 +30,3 @@ void colormap_add_color_cmd_callback (GimpAction *action,
void colormap_to_selection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __COLORMAP_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CONTEXT_ACTIONS_H__
#define __CONTEXT_ACTIONS_H__
#pragma once
void context_actions_setup (GimpActionGroup *group);
void context_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __CONTEXT_ACTIONS_H__ */

View File

@@ -895,17 +895,16 @@ context_select_object (GimpActionSelectType select_type,
GimpContainer *container)
{
GimpObject *current;
GType child_type;
current =
gimp_context_get_by_type (context,
gimp_container_get_children_type (container));
child_type = gimp_container_get_child_type (container);
current = gimp_context_get_by_type (context, child_type);
current = action_select_object (select_type, container, current);
if (current)
gimp_context_set_by_type (context,
gimp_container_get_children_type (container),
current);
gimp_context_set_by_type (context, child_type, current);
}
static gint

View File

@@ -15,9 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CONTEXT_COMMANDS_H__
#define __CONTEXT_COMMANDS_H__
#pragma once
void context_colors_default_cmd_callback (GimpAction *action,
@@ -139,6 +137,3 @@ void context_brush_angle_cmd_callback (GimpAction *action,
void context_toggle_dynamics_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __CONTEXT_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CURSOR_INFO_ACIONS_H__
#define __CURSOR_INFO_ACIONS_H__
#pragma once
void cursor_info_actions_setup (GimpActionGroup *group);
void cursor_info_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __CURSOR_INFO_ACTIONS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CURSOR_INFO_COMMANDS_H__
#define __CURSOR_INFO_COMMANDS_H__
#pragma once
void cursor_info_sample_merged_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __CURSOR_INFO_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DASHBOARD_ACTIONS_H__
#define __DASHBOARD_ACTIONS_H__
#pragma once
void dashboard_actions_setup (GimpActionGroup *group);
void dashboard_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __DASHBOARD_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DASHBOARD_COMMANDS_H__
#define __DASHBOARD_COMMANDS_H__
#pragma once
void dashboard_update_interval_cmd_callback (GimpAction *action,
@@ -43,6 +42,3 @@ void dashboard_reset_cmd_callback (GimpAction *action,
void dashboard_low_swap_space_warning_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DASHBOARD_COMMANDS_H__ */

View File

@@ -68,7 +68,7 @@ data_open_as_image_cmd_callback (GimpAction *action,
data = (GimpData *)
gimp_context_get_by_type (context,
gimp_data_factory_view_get_children_type (view));
gimp_data_factory_view_get_child_type (view));
if (data && gimp_data_get_file (data))
{
@@ -119,7 +119,7 @@ data_new_cmd_callback (GimpAction *action,
GtkWidget *edit_button;
gimp_context_set_by_type (context,
gimp_data_factory_view_get_children_type (view),
gimp_data_factory_view_get_child_type (view),
GIMP_OBJECT (data));
edit_button = gimp_data_factory_view_get_edit_button (view);
@@ -142,7 +142,7 @@ data_duplicate_cmd_callback (GimpAction *action,
data = (GimpData *)
gimp_context_get_by_type (context,
gimp_data_factory_view_get_children_type (view));
gimp_data_factory_view_get_child_type (view));
if (data && gimp_data_factory_view_have (view, GIMP_OBJECT (data)))
{
@@ -155,7 +155,7 @@ data_duplicate_cmd_callback (GimpAction *action,
GtkWidget *edit_button;
gimp_context_set_by_type (context,
gimp_data_factory_view_get_children_type (view),
gimp_data_factory_view_get_child_type (view),
GIMP_OBJECT (new_data));
edit_button = gimp_data_factory_view_get_edit_button (view);
@@ -178,7 +178,7 @@ data_copy_location_cmd_callback (GimpAction *action,
data = (GimpData *)
gimp_context_get_by_type (context,
gimp_data_factory_view_get_children_type (view));
gimp_data_factory_view_get_child_type (view));
if (data)
{
@@ -207,7 +207,7 @@ data_show_in_file_manager_cmd_callback (GimpAction *action,
data = (GimpData *)
gimp_context_get_by_type (context,
gimp_data_factory_view_get_children_type (view));
gimp_data_factory_view_get_child_type (view));
if (data)
{
@@ -243,7 +243,7 @@ data_delete_cmd_callback (GimpAction *action,
data = (GimpData *)
gimp_context_get_by_type (context,
gimp_data_factory_view_get_children_type (view));
gimp_data_factory_view_get_child_type (view));
if (data &&
gimp_data_is_deletable (data) &&
@@ -288,7 +288,7 @@ data_edit_cmd_callback (GimpAction *action,
data = (GimpData *)
gimp_context_get_by_type (context,
gimp_data_factory_view_get_children_type (view));
gimp_data_factory_view_get_child_type (view));
if (data && gimp_data_factory_view_have (view, GIMP_OBJECT (data)))
{

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DATA_COMMANDS_H__
#define __DATA_COMMANDS_H__
#pragma once
void data_open_as_image_cmd_callback (GimpAction *action,
@@ -43,6 +42,3 @@ void data_refresh_cmd_callback (GimpAction *action,
void data_edit_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DATA_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DATA_EDITOR_COMMANDS_H__
#define __DATA_EDITOR_COMMANDS_H__
#pragma once
void data_editor_edit_active_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DATA_EDITOR_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DEBUG_ACTIONS_H__
#define __DEBUG_ACTIONS_H__
#pragma once
void debug_actions_setup (GimpActionGroup *group);
void debug_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __DEBUG_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DEBUG_COMMANDS_H__
#define __DEBUG_COMMANDS_H__
#pragma once
void debug_gtk_inspector_cmd_callback (GimpAction *action,
@@ -40,6 +39,3 @@ void debug_dump_keyboard_shortcuts_cmd_callback (GimpAction *action,
void debug_dump_attached_data_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DEBUG_COMMANDS_H__ */

View File

@@ -89,12 +89,12 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
"gimp-channel-list",
GIMP_HELP_CHANNEL_DIALOG },
{ "dialogs-vectors", GIMP_ICON_DIALOG_PATHS,
{ "dialogs-paths", GIMP_ICON_DIALOG_PATHS,
NC_("dialogs-action", "_Paths Dialog"),
NC_("dialogs-action", "_Paths"),
{ NULL },
NC_("dialogs-action", "Open the paths dialog"),
"gimp-vectors-list",
"gimp-path-list",
GIMP_HELP_PATH_DIALOG },
{ "dialogs-indexed-palette", GIMP_ICON_COLORMAP,

View File

@@ -15,9 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DIALOGS_ACTIONS_H__
#define __DIALOGS_ACTIONS_H__
#pragma once
/* this check is needed for the extern declaration below to be correct */
#ifndef __GIMP_ACTION_GROUP_H__
@@ -33,6 +31,3 @@ void dialogs_actions_update (GimpActionGroup *group,
gpointer data);
gboolean dialogs_actions_toolbox_exists (Gimp *gimp);
#endif /* __DIALOGS_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DIALOGS_COMMANDS_H__
#define __DIALOGS_COMMANDS_H__
#pragma once
void dialogs_create_toplevel_cmd_callback (GimpAction *action,
@@ -25,6 +24,3 @@ void dialogs_create_toplevel_cmd_callback (GimpAction *action,
void dialogs_create_dockable_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DIALOGS_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCK_ACTIONS_H__
#define __DOCK_ACTIONS_H__
#pragma once
void dock_actions_setup (GimpActionGroup *group);
void dock_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __DOCK_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCK_COMMANDS_H__
#define __DOCK_COMMANDS_H__
#pragma once
void dock_toggle_image_menu_cmd_callback (GimpAction *action,
@@ -25,6 +24,3 @@ void dock_toggle_image_menu_cmd_callback (GimpAction *action,
void dock_toggle_auto_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DOCK_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCKABLE_ACTIONS_H__
#define __DOCKABLE_ACTIONS_H__
#pragma once
void dockable_actions_setup (GimpActionGroup *group);
void dockable_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __DOCKABLE_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCKABLE_COMMANDS_H__
#define __DOCKABLE_COMMANDS_H__
#pragma once
void dockable_add_tab_cmd_callback (GimpAction *action,
@@ -44,6 +43,3 @@ void dockable_tab_style_cmd_callback (GimpAction *action,
void dockable_show_button_bar_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DOCKABLE_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCUMENTS_ACTIONS_H__
#define __DOCUMENTS_ACTIONS_H__
#pragma once
void documents_actions_setup (GimpActionGroup *group);
void documents_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __DOCUMENTS_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCUMENTS_COMMANDS_H__
#define __DOCUMENTS_COMMANDS_H__
#pragma once
void documents_open_cmd_callback (GimpAction *action,
@@ -49,6 +48,3 @@ void documents_reload_previews_cmd_callback (GimpAction *action,
void documents_remove_dangling_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DOCUMENTS_COMMANDS_H__ */

View File

@@ -174,34 +174,34 @@ drawable_actions_update (GimpActionGroup *group,
{
GimpItem *item;
if (gimp_item_get_visible (iter->data))
has_visible = TRUE;
if (gimp_item_can_lock_content (iter->data))
{
if (! gimp_item_get_lock_content (iter->data))
locked = FALSE;
can_lock = TRUE;
}
if (gimp_item_can_lock_position (iter->data))
{
if (! gimp_item_get_lock_position (iter->data))
locked_pos = FALSE;
can_lock_pos = TRUE;
}
if (gimp_viewable_get_children (GIMP_VIEWABLE (iter->data)))
none_children = FALSE;
if (! gimp_drawable_is_rgb (iter->data))
all_rgb = FALSE;
if (GIMP_IS_LAYER_MASK (iter->data))
item = GIMP_ITEM (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (iter->data)));
else
item = GIMP_ITEM (iter->data);
if (gimp_item_get_visible (item))
has_visible = TRUE;
if (gimp_item_can_lock_content (item))
{
if (! gimp_item_get_lock_content (item))
locked = FALSE;
can_lock = TRUE;
}
if (gimp_item_can_lock_position (item))
{
if (! gimp_item_get_lock_position (item))
locked_pos = FALSE;
can_lock_pos = TRUE;
}
if (gimp_viewable_get_children (GIMP_VIEWABLE (item)))
none_children = FALSE;
if (! gimp_drawable_is_rgb (iter->data))
all_rgb = FALSE;
if (gimp_item_is_content_locked (item, NULL))
all_writable = FALSE;

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DRAWABLE_ACTIONS_H__
#define __DRAWABLE_ACTIONS_H__
#pragma once
void drawable_actions_setup (GimpActionGroup *group);
void drawable_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __DRAWABLE_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DRAWABLE_COMMANDS_H__
#define __DRAWABLE_COMMANDS_H__
#pragma once
void drawable_equalize_cmd_callback (GimpAction *action,
@@ -42,6 +41,3 @@ void drawable_flip_cmd_callback (GimpAction *action,
void drawable_rotate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DRAWABLE_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DYNAMICS_ACTIONS_H__
#define __DYNAMICS_ACTIONS_H__
#pragma once
void dynamics_actions_setup (GimpActionGroup *group);
void dynamics_actions_update (GimpActionGroup *group,
gpointer user_data);
#endif /* __DYNAMICS_ACTIONS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DYNAMICS_EDITOR_ACTIONS_H__
#define __DYNAMICS_EDITOR_ACTIONS_H__
#pragma once
void dynamics_editor_actions_setup (GimpActionGroup *group);
void dynamics_editor_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __DYNAMICS_EDITOR_ACTIONS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __EDIT_ACTIONS_H__
#define __EDIT_ACTIONS_H__
#pragma once
void edit_actions_setup (GimpActionGroup *group);
void edit_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __EDIT_ACTIONS_H__ */

View File

@@ -41,7 +41,7 @@
#include "core/gimpimage.h"
#include "core/gimpimage-undo.h"
#include "vectors/gimppath-import.h"
#include "path/gimppath-import.h"
#include "widgets/gimpclipboard.h"
#include "widgets/gimphelp-ids.h"

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __EDIT_COMMANDS_H__
#define __EDIT_COMMANDS_H__
#pragma once
void edit_undo_cmd_callback (GimpAction *action,
@@ -71,6 +70,3 @@ void edit_clear_cmd_callback (GimpAction *action,
void edit_fill_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __EDIT_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ERROR_CONSOLE_ACIONS_H__
#define __ERROR_CONSOLE_ACIONS_H__
#pragma once
void error_console_actions_setup (GimpActionGroup *group);
void error_console_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __ERROR_CONSOLE_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ERROR_CONSOLE_COMMANDS_H__
#define __ERROR_CONSOLE_COMMANDS_H__
#pragma once
void error_console_clear_cmd_callback (GimpAction *action,
@@ -38,6 +37,3 @@ void error_console_highlight_warning_cmd_callback (GimpAction *action,
void error_console_highlight_info_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __ERROR_CONSOLE_COMMANDS_H__ */

View File

@@ -59,6 +59,7 @@ static void file_actions_last_opened_update (GimpContainer *container,
static void file_actions_last_opened_reorder (GimpContainer *container,
GimpImagefile *unused1,
gint unused2,
gint unused3,
GimpActionGroup *group);
static void file_actions_close_all_update (GimpContainer *images,
GimpObject *unused,
@@ -81,6 +82,12 @@ static const GimpActionEntry file_actions[] =
file_open_as_layers_cmd_callback,
GIMP_HELP_FILE_OPEN_AS_LAYER },
{ "file-open-as-link-layers", GIMP_ICON_LAYER,
NC_("file-action", "Op_en as Link Layer..."), NULL, { "<primary><alt><shift>O", NULL },
NC_("file-action", "Open an image file as Link layer"),
file_open_as_link_layer_cmd_callback,
GIMP_HELP_FILE_OPEN_AS_LINK_LAYER },
{ "file-open-location", GIMP_ICON_WEB,
NC_("file-action", "Open _Location..."), NULL, { NULL },
NC_("file-action", "Open an image file from a specified location"),
@@ -434,6 +441,7 @@ static void
file_actions_last_opened_reorder (GimpContainer *container,
GimpImagefile *unused1,
gint unused2,
gint unused3,
GimpActionGroup *group)
{
file_actions_last_opened_update (container, unused1, group);

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FILE_ACTIONS_H__
#define __FILE_ACTIONS_H__
#pragma once
void file_actions_setup (GimpActionGroup *group);
void file_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __FILE_ACTIONS_H__ */

View File

@@ -73,7 +73,8 @@ static void file_open_dialog_show (Gimp *gimp,
const gchar *title,
GimpImage *image,
GFile *file,
gboolean open_as_layers);
gboolean open_as_layers,
gboolean open_as_link);
static GtkWidget * file_save_dialog_show (Gimp *gimp,
GimpImage *image,
GtkWidget *parent,
@@ -118,7 +119,7 @@ file_open_cmd_callback (GimpAction *action,
file_open_dialog_show (gimp, widget,
_("Open Image"),
image, NULL, FALSE);
image, NULL, FALSE, FALSE);
}
void
@@ -140,7 +141,29 @@ file_open_as_layers_cmd_callback (GimpAction *action,
file_open_dialog_show (gimp, widget,
_("Open Image as Layers"),
image, NULL, TRUE);
image, NULL, TRUE, FALSE);
}
void
file_open_as_link_layer_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp;
GtkWidget *widget;
GimpDisplay *display;
GimpImage *image = NULL;
return_if_no_gimp (gimp, data);
return_if_no_widget (widget, data);
display = action_data_get_display (data);
if (display)
image = gimp_display_get_image (display);
file_open_dialog_show (gimp, widget,
_("Open Image as Link Layer"),
image, NULL, TRUE, TRUE);
}
void
@@ -577,7 +600,7 @@ file_file_open_dialog (Gimp *gimp,
{
file_open_dialog_show (gimp, parent,
_("Open Image"),
NULL, file, FALSE);
NULL, file, FALSE, FALSE);
}
@@ -589,7 +612,8 @@ file_open_dialog_show (Gimp *gimp,
const gchar *title,
GimpImage *image,
GFile *file,
gboolean open_as_layers)
gboolean open_as_layers,
gboolean open_as_link)
{
GtkWidget *dialog;
@@ -621,7 +645,7 @@ file_open_dialog_show (Gimp *gimp,
gtk_window_set_title (GTK_WINDOW (dialog), title);
gimp_open_dialog_set_image (GIMP_OPEN_DIALOG (dialog),
image, open_as_layers);
image, open_as_layers, open_as_link);
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (gtk_widget_get_toplevel (parent)));
@@ -841,9 +865,9 @@ file_revert_confirm_response (GtkWidget *dialog,
new_image = file_open_image (gimp, gimp_get_user_context (gimp),
GIMP_PROGRESS (display),
file, 0, 0, FALSE, NULL,
file, 0, 0, TRUE, FALSE, NULL,
GIMP_RUN_INTERACTIVE,
&status, NULL, &error);
NULL, &status, NULL, &error);
if (new_image)
{

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FILE_COMMANDS_H__
#define __FILE_COMMANDS_H__
#pragma once
void file_open_cmd_callback (GimpAction *action,
@@ -25,6 +24,9 @@ void file_open_cmd_callback (GimpAction *action,
void file_open_as_layers_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void file_open_as_link_layer_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void file_open_location_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
@@ -58,6 +60,3 @@ void file_quit_cmd_callback (GimpAction *action,
void file_file_open_dialog (Gimp *gimp,
GFile *file,
GtkWidget *parent);
#endif /* __FILE_COMMANDS_H__ */

View File

@@ -29,13 +29,18 @@
#include "core/gimp-filter-history.h"
#include "core/gimpimage.h"
#include "core/gimpgrouplayer.h"
#include "core/gimplinklayer.h"
#include "core/gimplayermask.h"
#include "path/gimpvectorlayer.h"
#include "pdb/gimpprocedure.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpstringaction.h"
#include "widgets/gimpuimanager.h"
#include "widgets/gimpwidgets-utils.h"
@@ -48,11 +53,12 @@
/* local function prototypes */
static void filters_actions_set_tooltips (GimpActionGroup *group,
const GimpStringActionEntry *entries,
gint n_entries);
static void filters_actions_history_changed (Gimp *gimp,
GimpActionGroup *group);
static void filters_actions_set_tooltips (GimpActionGroup *group,
const GimpStringActionEntry *entries,
gint n_entries);
static void filters_actions_history_changed (Gimp *gimp,
GimpActionGroup *group);
static gboolean filters_is_non_interactive (const gchar *action_name);
/* private variables */
@@ -748,6 +754,7 @@ static const GimpEnumActionEntry filters_repeat_actions[] =
void
filters_actions_setup (GimpActionGroup *group)
{
static gboolean first_setup = TRUE;
GimpProcedureActionEntry *entries;
gint n_entries;
gint i;
@@ -776,8 +783,23 @@ filters_actions_setup (GimpActionGroup *group)
filters_actions_set_tooltips (group, filters_interactive_actions,
G_N_ELEMENTS (filters_interactive_actions));
/* XXX Hardcoded list to prevent expensive node/graph creation of a
* well-known list of operations.
* This whole code will disappear when we'll support filters with aux
* input non-destructively anyway.
*/
if (first_setup)
{
actions_filter_set_aux ("filters-variable-blur");
actions_filter_set_aux ("filters-oilify");
actions_filter_set_aux ("filters-lens-blur");
actions_filter_set_aux ("filters-gaussian-blur-selective");
actions_filter_set_aux ("filters-displace");
actions_filter_set_aux ("filters-bump-map");
}
gegl_actions = g_strv_builder_new ();
op_classes = gimp_gegl_get_op_classes ();
op_classes = gimp_gegl_get_op_classes (TRUE);
for (iter = op_classes; iter; iter = iter->next)
{
@@ -789,6 +811,9 @@ filters_actions_setup (GimpActionGroup *group)
const gchar *op_name;
gchar *label;
if (filters_actions_gegl_op_blocklisted (op_class->name))
continue;
formatted_op_name = g_strdup (op_class->name);
gimp_make_valid_action_name (formatted_op_name);
action_name = g_strdup_printf ("filters-%s", formatted_op_name);
@@ -858,6 +883,23 @@ filters_actions_setup (GimpActionGroup *group)
g_free (short_label);
}
/* Identify third-party filters based on operations with an
* auxiliary pad in first setup because of slowness on Windows.
* See #14781.
*/
if (first_setup)
{
GeglNode *node = gegl_node_new ();
gegl_node_set (node,
"operation", op_class->name,
NULL);
if (gegl_node_has_pad (node, "aux"))
actions_filter_set_aux (action_name);
g_clear_object (&node);
}
g_strv_builder_add (gegl_actions, action_name);
g_free (label);
@@ -907,6 +949,8 @@ filters_actions_setup (GimpActionGroup *group)
group, 0);
filters_actions_history_changed (group->gimp, group);
first_setup = FALSE;
}
void
@@ -914,11 +958,14 @@ filters_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *image;
GList *actions;
GList *iter;
gboolean writable = FALSE;
gboolean gray = FALSE;
gboolean alpha = FALSE;
gboolean supports_alpha = FALSE;
gboolean is_group = FALSE;
gboolean force_nde = FALSE;
image = action_data_get_image (data);
@@ -946,6 +993,11 @@ filters_actions_update (GimpActionGroup *group,
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
is_group = TRUE;
if (GIMP_IS_GROUP_LAYER (drawable) ||
gimp_item_is_vector_layer (GIMP_ITEM (drawable)) ||
gimp_item_is_link_layer (GIMP_ITEM (drawable)))
force_nde = TRUE;
}
g_list_free (drawables);
@@ -954,134 +1006,82 @@ filters_actions_update (GimpActionGroup *group,
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
SET_SENSITIVE ("filters-alien-map", writable);
SET_SENSITIVE ("filters-antialias", writable && !is_group);
SET_SENSITIVE ("filters-apply-canvas", writable);
SET_SENSITIVE ("filters-apply-lens", writable);
SET_SENSITIVE ("filters-bayer-matrix", writable);
SET_SENSITIVE ("filters-bloom", writable);
SET_SENSITIVE ("filters-brightness-contrast", writable);
SET_SENSITIVE ("filters-bump-map", writable && !is_group);
actions = gimp_action_group_list_actions (group);
for (iter = actions; iter; iter = iter->next)
{
GimpAction *action = iter->data;
const gchar *action_name;
action_name = gimp_action_get_name (action);
if (filters_is_non_interactive (action_name))
{
/* Even I'm not sure they should, right now non-interactive
* actions are always applied destructively. So these filters
* are incompatible with layers where non-destructivity is
* mandatory.
*/
SET_SENSITIVE (action_name, writable && ! force_nde);
}
else if (GIMP_IS_STRING_ACTION (action))
{
const gchar *opname;
opname = GIMP_STRING_ACTION (action)->value;
if (opname == NULL)
/* These are the filters-recent-*, repeat and reshow handled
* below.
*/
continue;
if (g_strcmp0 (opname, "gegl:gegl") == 0)
{
/* GEGL graph filter can only be run destructively, unless
* the GIMP_ALLOW_GEGL_GRAPH_LAYER_EFFECT environment
* variable is set.
*/
SET_SENSITIVE (gimp_action_get_name (action), writable &&
(g_getenv ("GIMP_ALLOW_GEGL_GRAPH_LAYER_EFFECT") != NULL || ! force_nde));
}
else if (gegl_has_operation (opname))
{
gboolean sensitive = writable;
if (sensitive && force_nde)
/* Operations with auxiliary inputs can only be applied
* destructively. Therefore they must be deactivated on
* types of layers where filters can only be applied
* non-destructively.
*/
sensitive = ! actions_filter_get_aux (action_name);
SET_SENSITIVE (gimp_action_get_name (action), sensitive);
}
}
}
g_list_free (actions);
/* Special-cased filters */
SET_SENSITIVE ("filters-c2g", writable && !gray);
SET_SENSITIVE ("filters-cartoon", writable);
SET_SENSITIVE ("filters-channel-mixer", writable);
SET_SENSITIVE ("filters-checkerboard", writable);
SET_SENSITIVE ("filters-color-balance", writable && !gray);
SET_SENSITIVE ("filters-color-enhance", writable && !gray);
SET_SENSITIVE ("filters-color-exchange", writable);
SET_SENSITIVE ("filters-color-enhance", writable && !force_nde && !gray);
SET_SENSITIVE ("filters-colorize", writable && !gray);
SET_SENSITIVE ("filters-dither", writable);
SET_SENSITIVE ("filters-color-rotate", writable);
SET_SENSITIVE ("filters-color-temperature", writable && !gray);
SET_SENSITIVE ("filters-color-to-alpha", writable && supports_alpha);
SET_SENSITIVE ("filters-component-extract", writable);
SET_SENSITIVE ("filters-convolution-matrix", writable);
SET_SENSITIVE ("filters-cubism", writable);
SET_SENSITIVE ("filters-curves", writable);
SET_SENSITIVE ("filters-deinterlace", writable);
SET_SENSITIVE ("filters-desaturate", writable && !gray);
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 && !is_group);
SET_SENSITIVE ("filters-distance-map", writable);
SET_SENSITIVE ("filters-dropshadow", writable && alpha);
SET_SENSITIVE ("filters-edge", writable && !is_group);
SET_SENSITIVE ("filters-edge-laplace", writable);
SET_SENSITIVE ("filters-edge-neon", writable);
SET_SENSITIVE ("filters-edge-sobel", writable);
SET_SENSITIVE ("filters-emboss", writable);
SET_SENSITIVE ("filters-engrave", writable);
SET_SENSITIVE ("filters-erode", writable);
SET_SENSITIVE ("filters-exposure", writable);
SET_SENSITIVE ("filters-fattal-2002", writable);
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 && !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);
SET_SENSITIVE ("filters-hue-saturation", writable && !gray);
SET_SENSITIVE ("filters-illusion", writable);
SET_SENSITIVE ("filters-invert-linear", writable && !is_group);
SET_SENSITIVE ("filters-invert-perceptual", writable && !is_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 && !is_group);
SET_SENSITIVE ("filters-lens-distortion", writable);
SET_SENSITIVE ("filters-lens-flare", writable);
SET_SENSITIVE ("filters-levels", writable);
SET_SENSITIVE ("filters-linear-sinusoid", writable);
SET_SENSITIVE ("filters-little-planet", writable);
SET_SENSITIVE ("filters-long-shadow", writable && alpha);
SET_SENSITIVE ("filters-mantiuk-2006", writable);
SET_SENSITIVE ("filters-maze", writable);
SET_SENSITIVE ("filters-mean-curvature-blur", writable);
SET_SENSITIVE ("filters-median-blur", writable);
SET_SENSITIVE ("filters-mono-mixer", writable && !gray);
SET_SENSITIVE ("filters-mosaic", writable);
SET_SENSITIVE ("filters-motion-blur-circular", writable);
SET_SENSITIVE ("filters-motion-blur-linear", writable);
SET_SENSITIVE ("filters-motion-blur-zoom", writable);
SET_SENSITIVE ("filters-newsprint", writable);
SET_SENSITIVE ("filters-noise-cell", writable);
SET_SENSITIVE ("filters-noise-cie-lch", writable);
SET_SENSITIVE ("filters-noise-hsv", writable && !gray);
SET_SENSITIVE ("filters-noise-hurl", writable);
SET_SENSITIVE ("filters-noise-perlin", writable);
SET_SENSITIVE ("filters-noise-pick", writable);
SET_SENSITIVE ("filters-noise-reduction", writable);
SET_SENSITIVE ("filters-noise-rgb", writable);
SET_SENSITIVE ("filters-noise-simplex", writable);
SET_SENSITIVE ("filters-noise-slur", writable);
SET_SENSITIVE ("filters-noise-solid", writable);
SET_SENSITIVE ("filters-noise-spread", writable);
SET_SENSITIVE ("filters-normal-map", writable);
SET_SENSITIVE ("filters-offset", writable);
SET_SENSITIVE ("filters-oilify", writable && !is_group);
SET_SENSITIVE ("filters-panorama-projection", writable);
SET_SENSITIVE ("filters-photocopy", writable);
SET_SENSITIVE ("filters-pixelize", writable);
SET_SENSITIVE ("filters-plasma", writable);
SET_SENSITIVE ("filters-polar-coordinates", writable);
SET_SENSITIVE ("filters-posterize", writable);
SET_SENSITIVE ("filters-recursive-transform", writable);
SET_SENSITIVE ("filters-red-eye-removal", writable && !gray);
SET_SENSITIVE ("filters-reinhard-2005", writable);
SET_SENSITIVE ("filters-rgb-clip", writable);
SET_SENSITIVE ("filters-ripple", writable);
SET_SENSITIVE ("filters-saturation", writable && !gray);
SET_SENSITIVE ("filters-semi-flatten", writable && alpha);
SET_SENSITIVE ("filters-sepia", writable && !gray);
SET_SENSITIVE ("filters-shadows-highlights", writable);
SET_SENSITIVE ("filters-shift", writable);
SET_SENSITIVE ("filters-sinus", writable);
SET_SENSITIVE ("filters-slic", writable);
SET_SENSITIVE ("filters-snn-mean", writable);
SET_SENSITIVE ("filters-softglow", writable);
SET_SENSITIVE ("filters-spherize", writable);
SET_SENSITIVE ("filters-spiral", writable);
SET_SENSITIVE ("filters-stretch-contrast", writable);
SET_SENSITIVE ("filters-stretch-contrast-hsv", writable);
SET_SENSITIVE ("filters-stress", writable);
SET_SENSITIVE ("filters-supernova", writable);
SET_SENSITIVE ("filters-threshold", writable);
SET_SENSITIVE ("filters-threshold-alpha", writable && alpha);
SET_SENSITIVE ("filters-tile-glass", writable);
SET_SENSITIVE ("filters-tile-paper", writable);
SET_SENSITIVE ("filters-tile-seamless", writable);
SET_SENSITIVE ("filters-unsharp-mask", writable);
SET_SENSITIVE ("filters-value-propagate", 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);
SET_SENSITIVE ("filters-waves", writable);
SET_SENSITIVE ("filters-whirl-pinch", writable);
SET_SENSITIVE ("filters-wind", writable);
#undef SET_SENSITIVE
@@ -1120,6 +1120,36 @@ filters_actions_update (GimpActionGroup *group,
}
}
gboolean
filters_actions_gegl_op_blocklisted (const gchar *operation_name)
{
for (gint i = 0; i < G_N_ELEMENTS (filters_actions); i++)
{
const GimpStringActionEntry *action_entry = &filters_actions[i];
if (g_strcmp0 (operation_name, action_entry->value) == 0)
return TRUE;
}
for (gint i = 0; i < G_N_ELEMENTS (filters_settings_actions); i++)
{
const GimpStringActionEntry *action_entry = &filters_settings_actions[i];
if (g_strcmp0 (operation_name, action_entry->value) == 0)
return TRUE;
}
for (gint i = 0; i < G_N_ELEMENTS (filters_interactive_actions); i++)
{
const GimpStringActionEntry *action_entry = &filters_interactive_actions[i];
if (g_strcmp0 (operation_name, action_entry->value) == 0)
return TRUE;
}
return FALSE;
}
static void
filters_actions_set_tooltips (GimpActionGroup *group,
const GimpStringActionEntry *entries,
@@ -1303,3 +1333,19 @@ filters_actions_history_changed (Gimp *gimp,
NULL);
}
}
static gboolean
filters_is_non_interactive (const gchar *action_name)
{
gint i;
for (i = 0; i < G_N_ELEMENTS (filters_actions); i++)
if (g_strcmp0 (filters_actions[i].name, action_name) == 0)
return TRUE;
for (i = 0; i < G_N_ELEMENTS (filters_settings_actions); i++)
if (g_strcmp0 (filters_settings_actions[i].name, action_name) == 0)
return TRUE;
return FALSE;
}

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FILTERS_ACTIONS_H__
#define __FILTERS_ACTIONS_H__
#pragma once
void filters_actions_setup (GimpActionGroup *group);
void filters_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __FILTERS_ACTIONS_H__ */
void filters_actions_setup (GimpActionGroup *group);
void filters_actions_update (GimpActionGroup *group,
gpointer data);
gboolean filters_actions_gegl_op_blocklisted (const gchar *operation_name);

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FILTERS_COMMANDS_H__
#define __FILTERS_COMMANDS_H__
#pragma once
void filters_apply_cmd_callback (GimpAction *action,
@@ -37,6 +36,3 @@ void filters_run_procedure (Gimp *gimp,
GimpDisplay *display,
GimpProcedure *procedure,
GimpRunMode run_mode);
#endif /* __FILTERS_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FONTS_ACTIONS_H__
#define __FONTS_ACTIONS_H__
#pragma once
void fonts_actions_setup (GimpActionGroup *group);
void fonts_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __FONTS_ACTIONS_H__ */

View File

@@ -18,9 +18,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_GEGL_PROCEDURE_H__
#define __GIMP_GEGL_PROCEDURE_H__
#pragma once
#include "pdb/gimpprocedure.h"
@@ -68,5 +66,3 @@ GimpProcedure * gimp_gegl_procedure_new (Gimp *gimp,
const gchar *icon_name,
const gchar *help_id);
gboolean gimp_gegl_procedure_is_editing_filter (GimpGeglProcedure *procedure);
#endif /* __GIMP_GEGL_PROCEDURE_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GRADIENT_EDITOR_ACTIONS_H__
#define __GRADIENT_EDITOR_ACTIONS_H__
#pragma once
void gradient_editor_actions_setup (GimpActionGroup *group);
void gradient_editor_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __GRADIENT_EDITOR_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GRADIENT_EDITOR_COMMANDS_H__
#define __GRADIENT_EDITOR_COMMANDS_H__
#pragma once
enum
@@ -94,6 +93,3 @@ void gradient_editor_blend_opacity_cmd_callback (GimpAction *action,
void gradient_editor_zoom_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __GRADIENT_EDITOR_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GRADIENTS_ACTIONS_H__
#define __GRADIENTS_ACTIONS_H__
#pragma once
void gradients_actions_setup (GimpActionGroup *group);
void gradients_actions_update (GimpActionGroup *group,
gpointer user_data);
#endif /* __GRADIENT_ACTIONS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GRADIENTS_COMMANDS_H__
#define __GRADIENTS_COMMANDS_H__
#pragma once
void gradients_save_as_pov_ray_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __GRADIENTS_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __HELP_ACTIONS_H__
#define __HELP_ACTIONS_H__
#pragma once
void help_actions_setup (GimpActionGroup *group);
void help_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __HELP_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __HELP_COMMANDS_H__
#define __HELP_COMMANDS_H__
#pragma once
void help_help_cmd_callback (GimpAction *action,
@@ -25,6 +24,3 @@ void help_help_cmd_callback (GimpAction *action,
void help_context_help_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __HELP_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __IMAGE_ACTIONS_H__
#define __IMAGE_ACTIONS_H__
#pragma once
void image_actions_setup (GimpActionGroup *group);
void image_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __IMAGE_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __IMAGE_COMMANDS_H__
#define __IMAGE_COMMANDS_H__
#pragma once
void image_new_cmd_callback (GimpAction *action,
@@ -106,5 +105,3 @@ void image_softproof_intent_cmd_callback (GimpAction *action,
void image_softproof_bpc_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __IMAGE_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __IMAGES_ACTIONS_H__
#define __IMAGES_ACTIONS_H__
#pragma once
void images_actions_setup (GimpActionGroup *group);
void images_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __IMAGES_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __IMAGES_COMMANDS_H__
#define __IMAGES_COMMANDS_H__
#pragma once
void images_raise_views_cmd_callback (GimpAction *action,
@@ -28,6 +27,3 @@ void images_new_view_cmd_callback (GimpAction *action,
void images_delete_image_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __IMAGES_COMMANDS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ITEMS_ACTIONS_H__
#define __ITEMS_ACTIONS_H__
#pragma once
void items_actions_setup (GimpActionGroup *group,
@@ -24,6 +23,3 @@ void items_actions_setup (GimpActionGroup *group,
void items_actions_update (GimpActionGroup *group,
const gchar *prefix,
GList *items);
#endif /* __ITEMS_ACTIONS_H__ */

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ITEMS_COMMANDS_H__
#define __ITEMS_COMMANDS_H__
#pragma once
void items_visible_cmd_callback (GimpAction *action,
@@ -60,7 +59,3 @@ void items_stroke_last_vals_cmd_callback (GimpAction *action,
GimpImage *image,
GList *items,
gpointer data);
#endif /* __ITEMS_COMMANDS_H__ */

View File

@@ -30,9 +30,12 @@
#include "core/gimpimage.h"
#include "core/gimplayer.h"
#include "core/gimplayer-floating-selection.h"
#include "core/gimplinklayer.h"
#include "text/gimptextlayer.h"
#include "path/gimpvectorlayer.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpwidgets-utils.h"
@@ -60,6 +63,12 @@ static const GimpActionEntry layers_actions[] =
layers_edit_text_cmd_callback,
GIMP_HELP_LAYER_EDIT },
{ "layers-edit-vector", GIMP_ICON_TOOL_PATH,
NC_("layers-action", "Path Tool"), NULL, { NULL },
NC_("layers-action", "Activate the path tool on this vector layer's path"),
layers_edit_vector_cmd_callback,
GIMP_HELP_TOOL_PATH },
{ "layers-edit-attributes", GIMP_ICON_EDIT,
NC_("layers-action", "_Edit Layer Attributes..."), NULL, { NULL },
NC_("layers-action", "Edit the layer's name"),
@@ -173,24 +182,48 @@ static const GimpActionEntry layers_actions[] =
image_flatten_image_cmd_callback,
GIMP_HELP_IMAGE_FLATTEN },
{ "layers-link-discard", GIMP_ICON_TOOL_TEXT,
NC_("layers-action", "_Discard Link Information"), NULL, { NULL },
NC_("layers-action", "Turn this link layer into a normal layer"),
layers_link_discard_cmd_callback,
GIMP_HELP_LAYER_TEXT_DISCARD },
{ "layers-link-monitor", GIMP_ICON_TOOL_TEXT,
NC_("layers-action", "_Monitor Linked Image"), NULL, { NULL },
NC_("layers-action", "Discard any transformation and monitor the linked file again"),
layers_link_monitor_cmd_callback,
GIMP_HELP_LAYER_TEXT_DISCARD },
{ "layers-text-discard", GIMP_ICON_TOOL_TEXT,
NC_("layers-action", "_Discard Text Information"), NULL, { NULL },
NC_("layers-action", "Turn these text layers into normal layers"),
layers_text_discard_cmd_callback,
GIMP_HELP_LAYER_TEXT_DISCARD },
{ "layers-text-to-vectors", GIMP_ICON_TOOL_TEXT,
{ "layers-text-to-path", GIMP_ICON_TOOL_TEXT,
NC_("layers-action", "Text to _Path"), NULL, { NULL },
NC_("layers-action", "Create paths from text layers"),
layers_text_to_vectors_cmd_callback,
layers_text_to_path_cmd_callback,
GIMP_HELP_LAYER_TEXT_TO_PATH },
{ "layers-text-along-vectors", GIMP_ICON_TOOL_TEXT,
{ "layers-text-along-path", GIMP_ICON_TOOL_TEXT,
NC_("layers-action", "Text alon_g Path"), NULL, { NULL },
NC_("layers-action", "Warp this layer's text along the current path"),
layers_text_along_vectors_cmd_callback,
layers_text_along_path_cmd_callback,
GIMP_HELP_LAYER_TEXT_ALONG_PATH },
{ "layers-vector-fill-stroke", NULL,
NC_("layers-action", "Fill / Stroke..."), NULL, { NULL },
NC_("layers-action", "Edit the fill and stroke of this vector layer"),
layers_vector_fill_stroke_cmd_callback,
GIMP_HELP_LAYER_VECTOR_FILL_STROKE },
{ "layers-vector-discard", NULL,
NC_("layers-action", "Discard Vector Information"), NULL, { NULL },
NC_("layers-action", "Turn this vector layer into a normal layer"),
layers_vector_discard_cmd_callback,
GIMP_HELP_LAYER_VECTOR_DISCARD },
{ "layers-resize", GIMP_ICON_OBJECT_RESIZE,
NC_("layers-action", "Layer B_oundary Size..."), NULL, { NULL },
NC_("layers-action", "Adjust the layer dimensions"),
@@ -757,6 +790,8 @@ layers_actions_update (GimpActionGroup *group,
gboolean lock_alpha = TRUE;
gboolean can_lock_alpha = FALSE;
gboolean text_layer = FALSE;
gboolean vector_layer = FALSE;
gboolean link_layer = FALSE;
gboolean bs_mutable = FALSE; /* At least 1 selected layers' blend space is mutable. */
gboolean cs_mutable = FALSE; /* At least 1 selected layers' composite space is mutable. */
gboolean cm_mutable = FALSE; /* At least 1 selected layers' composite mode is mutable. */
@@ -780,8 +815,8 @@ layers_actions_update (GimpActionGroup *group,
gboolean all_visible = TRUE;
gboolean all_next_visible = TRUE;
gboolean all_masks_shown = TRUE;
gboolean all_masks_disabled = TRUE;
gboolean any_mask_shown = FALSE;
gboolean any_mask_disabled = FALSE;
gboolean all_writable = TRUE;
gboolean all_movable = TRUE;
@@ -816,10 +851,11 @@ layers_actions_update (GimpActionGroup *group,
if (gimp_layer_get_mask (iter->data))
{
have_masks = TRUE;
if (! gimp_layer_get_show_mask (iter->data))
all_masks_shown = FALSE;
if (gimp_layer_get_apply_mask (iter->data))
all_masks_disabled = FALSE;
if (gimp_layer_get_show_mask (iter->data))
any_mask_shown = TRUE;
if (! gimp_layer_get_apply_mask (iter->data))
any_mask_disabled = TRUE;
}
else
{
@@ -976,7 +1012,10 @@ layers_actions_update (GimpActionGroup *group,
gimp_action_group_set_action_active (group, action, TRUE);
text_layer = gimp_item_is_text_layer (GIMP_ITEM (layer));
text_layer = gimp_item_is_text_layer (GIMP_ITEM (layer));
vector_layer = gimp_item_is_vector_layer (GIMP_ITEM (layer));
if (GIMP_IS_LINK_LAYER (layer))
link_layer = gimp_link_layer_is_monitored (GIMP_LINK_LAYER (layer));
}
}
@@ -992,6 +1031,7 @@ layers_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("layers-edit", !ac && ((layer && !fs) || text_layer));
SET_VISIBLE ("layers-edit-text", text_layer && !ac);
SET_SENSITIVE ("layers-edit-text", text_layer && !ac);
SET_VISIBLE ("layers-edit-vector", vector_layer && !ac);
SET_SENSITIVE ("layers-edit-attributes", layer && !fs && !ac);
if (layer && gimp_layer_is_floating_sel (layer))
@@ -1037,9 +1077,15 @@ layers_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("layers-merge-layers", n_selected_layers > 0 && !fs && !ac);
SET_SENSITIVE ("layers-flatten-image", !fs && !ac);
SET_VISIBLE ("layers-text-discard", n_text_layers > 0 && !ac);
SET_VISIBLE ("layers-text-to-vectors", n_text_layers > 0 && !ac);
SET_VISIBLE ("layers-text-along-vectors", text_layer && !ac);
SET_VISIBLE ("layers-text-discard", n_text_layers > 0 && !ac);
SET_VISIBLE ("layers-text-to-path", n_text_layers > 0 && !ac);
SET_VISIBLE ("layers-text-along-path", text_layer && !ac);
SET_VISIBLE ("layers-vector-fill-stroke", vector_layer && !ac);
SET_VISIBLE ("layers-vector-discard", vector_layer && !ac);
SET_VISIBLE ("layers-link-discard", link_layer && !ac);
SET_VISIBLE ("layers-link-monitor", GIMP_IS_LINK_LAYER (layer) && ! link_layer && !ac);
SET_SENSITIVE ("layers-resize", n_selected_layers == 1 && all_writable && all_movable && !ac);
SET_SENSITIVE ("layers-resize-to-image", all_writable && all_movable && !ac);
@@ -1082,8 +1128,8 @@ layers_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("layers-mask-disable", n_selected_layers > 0 && !fs && !ac && have_masks);
SET_ACTIVE ("layers-mask-edit", n_selected_layers == 1 && have_masks && gimp_layer_get_edit_mask (layers->data));
SET_ACTIVE ("layers-mask-show", all_masks_shown);
SET_ACTIVE ("layers-mask-disable", all_masks_disabled);
SET_ACTIVE ("layers-mask-show", any_mask_shown);
SET_ACTIVE ("layers-mask-disable", any_mask_disabled);
SET_SENSITIVE ("layers-mask-selection-replace", n_selected_layers && !fs && !ac && have_masks);
SET_SENSITIVE ("layers-mask-selection-add", n_selected_layers && !fs && !ac && have_masks);

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __LAYERS_ACTIONS_H__
#define __LAYERS_ACTIONS_H__
#pragma once
void layers_actions_setup (GimpActionGroup *group);
void layers_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __LAYERS_ACTIONS_H__ */

View File

@@ -39,8 +39,6 @@
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpdrawable-fill.h"
#include "core/gimpdrawable-filters.h"
#include "core/gimpdrawablefilter.h"
#include "core/gimpgrouplayer.h"
#include "core/gimpimage.h"
#include "core/gimpimage-merge.h"
@@ -50,6 +48,8 @@
#include "core/gimplayerpropundo.h"
#include "core/gimplayer-floating-selection.h"
#include "core/gimplayer-new.h"
#include "core/gimplink.h"
#include "core/gimplinklayer.h"
#include "core/gimplist.h"
#include "core/gimppickable.h"
#include "core/gimppickable-auto-shrink.h"
@@ -57,23 +57,27 @@
#include "core/gimpundostack.h"
#include "core/gimpprogress.h"
#include "path/gimppath.h"
#include "path/gimppath-warp.h"
#include "path/gimpstroke.h"
#include "path/gimpvectorlayer.h"
#include "path/gimpvectorlayeroptions.h"
#include "text/gimptext.h"
#include "text/gimptext-path.h"
#include "text/gimptextlayer.h"
#include "vectors/gimppath.h"
#include "vectors/gimppath-warp.h"
#include "vectors/gimpstroke.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpdock.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpopendialog.h"
#include "widgets/gimpprogressdialog.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpimagewindow.h"
#include "tools/gimppathtool.h"
#include "tools/gimptexttool.h"
#include "tools/tool_manager.h"
@@ -82,6 +86,7 @@
#include "dialogs/layer-options-dialog.h"
#include "dialogs/resize-dialog.h"
#include "dialogs/scale-dialog.h"
#include "dialogs/vector-layer-options-dialog.h"
#include "actions.h"
#include "items-commands.h"
@@ -103,6 +108,7 @@ static void layers_new_callback (GtkWidget *dialog,
GimpLayerCompositeMode layer_composite_mode,
gdouble layer_opacity,
GimpFillType layer_fill_type,
GimpLink *link,
gint layer_width,
gint layer_height,
gint layer_offset_x,
@@ -126,6 +132,7 @@ static void layers_edit_attributes_callback (GtkWidget *dialog,
GimpLayerCompositeMode layer_composite_mode,
gdouble layer_opacity,
GimpFillType layer_fill_type,
GimpLink *link,
gint layer_width,
gint layer_height,
gint layer_offset_x,
@@ -143,6 +150,7 @@ static void layers_add_mask_callback (GtkWidget *dialog,
GimpAddMaskType add_mask_type,
GimpChannel *channel,
gboolean invert,
gboolean edit_mask,
gpointer user_data);
static void layers_scale_callback (GtkWidget *dialog,
GimpViewable *viewable,
@@ -202,6 +210,10 @@ layers_edit_cmd_callback (GimpAction *action,
{
layers_edit_text_cmd_callback (action, value, data);
}
else if (gimp_item_is_vector_layer (GIMP_ITEM (layers->data)))
{
layers_vector_fill_stroke_cmd_callback (action, value, data);
}
else
{
layers_edit_attributes_cmd_callback (action, value, data);
@@ -253,6 +265,52 @@ layers_edit_text_cmd_callback (GimpAction *action,
}
}
void
layers_edit_vector_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpLayer *layer;
GList *layers;
GtkWidget *widget;
GimpTool *active_tool;
return_if_no_layers (image, layers, data);
return_if_no_widget (widget, data);
if (g_list_length (layers) != 1)
return;
layer = layers->data;
if (! gimp_item_is_vector_layer (GIMP_ITEM (layer)))
{
layers_edit_attributes_cmd_callback (action, value, data);
return;
}
active_tool = tool_manager_get_active (image->gimp);
if (! GIMP_IS_PATH_TOOL (active_tool))
{
GimpToolInfo *tool_info;
tool_info = (GimpToolInfo *)
gimp_container_get_child_by_name (image->gimp->tool_info_list,
"gimp-path-tool");
if (GIMP_IS_TOOL_INFO (tool_info))
{
gimp_context_set_tool (action_data_get_context (data), tool_info);
active_tool = tool_manager_get_active (image->gimp);
}
}
if (GIMP_IS_PATH_TOOL (active_tool))
gimp_path_tool_set_path (GIMP_PATH_TOOL (active_tool),
GIMP_VECTOR_LAYER (layer)->options->path);
}
void
layers_edit_attributes_cmd_callback (GimpAction *action,
GVariant *value,
@@ -447,6 +505,7 @@ layers_new_last_vals_cmd_callback (GimpAction *action,
ngettext ("New layer",
"New layers",
n_layers > 0 ? n_layers : 1));
for (iter = layers; iter || run_once ; iter = iter ? iter->next : NULL)
{
GimpLayer *parent;
@@ -492,11 +551,13 @@ layers_new_last_vals_cmd_callback (GimpAction *action,
gimp_image_add_layer (image, layer, parent, position, TRUE);
new_layers = g_list_prepend (new_layers, layer);
}
gimp_image_set_selected_layers (image, new_layers);
gimp_image_undo_group_end (image);
g_list_free (layers);
g_list_free (new_layers);
gimp_image_undo_group_end (image);
gimp_image_flush (image);
}
@@ -550,6 +611,7 @@ layers_new_group_cmd_callback (GimpAction *action,
layers = g_list_copy (layers);
n_layers = g_list_length (layers);
run_once = (n_layers == 0);
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_LAYER_ADD,
ngettext ("New layer group",
@@ -588,11 +650,13 @@ layers_new_group_cmd_callback (GimpAction *action,
}
gimp_image_set_selected_layers (image, new_layers);
gimp_image_undo_group_end (image);
gimp_image_flush (image);
g_list_free (layers);
g_list_free (new_layers);
gimp_image_undo_group_end (image);
gimp_image_flush (image);
}
void
@@ -665,7 +729,6 @@ layers_raise_cmd_callback (GimpAction *action,
}
else
{
gimp_image_flush (image);
g_list_free (raised_layers);
return;
}
@@ -680,11 +743,10 @@ layers_raise_cmd_callback (GimpAction *action,
raised_layers = g_list_reverse (raised_layers);
for (iter = raised_layers; iter; iter = iter->next)
gimp_image_raise_item (image, iter->data, NULL);
gimp_image_flush (image);
gimp_image_undo_group_end (image);
g_list_free (raised_layers);
gimp_image_undo_group_end (image);
gimp_image_flush (image);
}
void
@@ -716,10 +778,10 @@ layers_raise_to_top_cmd_callback (GimpAction *action,
for (iter = raised_layers; iter; iter = iter->next)
gimp_image_raise_item_to_top (image, iter->data);
gimp_image_flush (image);
gimp_image_undo_group_end (image);
g_list_free (raised_layers);
gimp_image_undo_group_end (image);
gimp_image_flush (image);
}
void
@@ -746,7 +808,6 @@ layers_lower_cmd_callback (GimpAction *action,
}
else
{
gimp_image_flush (image);
g_list_free (lowered_layers);
return;
}
@@ -761,10 +822,10 @@ layers_lower_cmd_callback (GimpAction *action,
for (iter = lowered_layers; iter; iter = iter->next)
gimp_image_lower_item (image, iter->data, NULL);
gimp_image_flush (image);
gimp_image_undo_group_end (image);
g_list_free (lowered_layers);
gimp_image_undo_group_end (image);
gimp_image_flush (image);
}
void
@@ -798,10 +859,10 @@ layers_lower_to_bottom_cmd_callback (GimpAction *action,
for (iter = lowered_layers; iter; iter = iter->next)
gimp_image_lower_item_to_bottom (image, iter->data);
gimp_image_flush (image);
gimp_image_undo_group_end (image);
g_list_free (lowered_layers);
gimp_image_undo_group_end (image);
gimp_image_flush (image);
}
void
@@ -821,8 +882,7 @@ layers_duplicate_cmd_callback (GimpAction *action,
_("Duplicate layers"));
for (iter = layers; iter; iter = iter->next)
{
GimpLayer *new_layer;
GimpContainer *filters;
GimpLayer *new_layer;
new_layer = GIMP_LAYER (gimp_item_duplicate (GIMP_ITEM (iter->data),
G_TYPE_FROM_INSTANCE (iter->data)));
@@ -837,39 +897,6 @@ layers_duplicate_cmd_callback (GimpAction *action,
TRUE);
gimp_drawable_enable_resize_undo (GIMP_DRAWABLE (new_layer));
new_layers = g_list_prepend (new_layers, new_layer);
/* Import any attached layer effects */
filters = gimp_drawable_get_filters (GIMP_DRAWABLE (iter->data));
if (gimp_container_get_n_children (filters) > 0)
{
GList *filter_list;
GimpContainer *filters;
filters = gimp_drawable_get_filters (GIMP_DRAWABLE (iter->data));
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 (new_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);
}
}
}
}
}
gimp_image_set_selected_layers (image, new_layers);
@@ -922,6 +949,7 @@ layers_merge_down_cmd_callback (GimpAction *action,
g_clear_error (&error);
return;
}
gimp_image_set_selected_layers (image, layers);
g_list_free (layers);
@@ -1013,6 +1041,7 @@ layers_merge_group_cmd_callback (GimpAction *action,
gimp_image_undo_group_end (image);
g_list_free (merge_layers);
gimp_image_flush (image);
}
@@ -1072,9 +1101,46 @@ layers_delete_cmd_callback (GimpAction *action,
gimp_image_undo_group_end (image);
g_list_free (removed_layers);
gimp_image_flush (image);
}
void
layers_link_discard_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *layers;
GList *iter;
return_if_no_layers (image, layers, data);
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_ITEM_PROPERTIES,
_("Discard Links"));
for (iter = layers; iter; iter = iter->next)
if (GIMP_IS_LINK_LAYER (iter->data))
gimp_link_layer_discard (GIMP_LINK_LAYER (iter->data));
gimp_image_undo_group_end (image);
}
void
layers_link_monitor_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *layers;
GList *iter;
return_if_no_layers (image, layers, data);
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_ITEM_PROPERTIES,
_("Monitor Links"));
for (iter = layers; iter; iter = iter->next)
if (GIMP_IS_LINK_LAYER (iter->data))
gimp_link_layer_monitor (GIMP_LINK_LAYER (iter->data));
gimp_image_undo_group_end (image);
}
void
layers_text_discard_cmd_callback (GimpAction *action,
GVariant *value,
@@ -1094,18 +1160,20 @@ layers_text_discard_cmd_callback (GimpAction *action,
}
void
layers_text_to_vectors_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
layers_text_to_path_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *layers;
GList *iter;
gboolean path_added = FALSE;
return_if_no_layers (image, layers, data);
/* TODO: have the proper undo group. */
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_PATHS_IMPORT,
_("Add Paths"));
for (iter = layers; iter; iter = iter->next)
{
GimpLayer *layer = iter->data;
@@ -1122,16 +1190,20 @@ layers_text_to_vectors_cmd_callback (GimpAction *action,
gimp_image_add_path (image, path,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
gimp_image_flush (image);
path_added = TRUE;
}
}
gimp_image_undo_group_end (image);
if (path_added)
gimp_image_flush (image);
}
void
layers_text_along_vectors_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
layers_text_along_path_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *layers;
@@ -1260,6 +1332,7 @@ layers_resize_to_image_cmd_callback (GimpAction *action,
if (g_list_length (layers) > 1)
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_ITEM_RESIZE,
_("Layers to Image Size"));
for (iter = layers; iter; iter = iter->next)
gimp_layer_resize_to_image (iter->data,
action_data_get_context (data),
@@ -1445,8 +1518,9 @@ layers_crop_to_content_cmd_callback (GimpAction *action,
break;
}
}
gimp_image_flush (image);
gimp_image_undo_group_end (image);
gimp_image_flush (image);
}
void
@@ -1495,6 +1569,7 @@ layers_mask_add_cmd_callback (GimpAction *action,
widget,
config->layer_add_mask_type,
config->layer_add_mask_invert,
config->layer_add_mask_edit_mask,
layers_add_mask_callback,
NULL);
@@ -1570,11 +1645,12 @@ layers_mask_add_last_vals_cmd_callback (GimpAction *action,
if (config->layer_add_mask_invert)
gimp_channel_invert (GIMP_CHANNEL (mask), FALSE);
gimp_layer_add_mask (iter->data, mask, TRUE, NULL);
gimp_layer_add_mask (iter->data, mask,
config->layer_add_mask_edit_mask,
TRUE, NULL);
}
gimp_image_undo_group_end (image);
gimp_image_flush (image);
}
@@ -1601,6 +1677,7 @@ layers_mask_apply_cmd_callback (GimpAction *action,
! gimp_item_is_content_locked (GIMP_ITEM (iter->data), NULL))))
break;
}
if (iter == NULL)
/* No layers or none have applicable masks. */
return;
@@ -1675,43 +1752,47 @@ layers_mask_show_cmd_callback (GimpAction *action,
GimpImage *image;
GList *layers;
GList *iter;
gboolean active = g_variant_get_boolean (value);
gboolean have_masks = FALSE;
gboolean active = g_variant_get_boolean (value);
gint n_masks = 0;
return_if_no_layers (image, layers, data);
for (iter = layers; iter; iter = iter->next)
{
if (gimp_layer_get_mask (iter->data))
{
have_masks = TRUE;
/* A bit of tricky to handle multiple and diverse layers with
* a toggle action (with only binary state).
* In non-active state, we will consider sets of both shown
* and hidden masks as ok and exits. This allows us to switch
* the action "active" state without actually changing
* individual masks state without explicit user request.
*/
if (! active && ! gimp_layer_get_show_mask (iter->data))
return;
if (active && gimp_layer_get_show_mask (iter->data))
{
/* if switching "show mask" on, and any selected layer's
* mask is already visible, bail out because that's
* exactly the logic we use in the ui for multile
* visible layer masks.
*/
return;
}
if (gimp_layer_get_show_mask (iter->data) != active)
n_masks++;
}
}
if (! have_masks)
if (n_masks == 0)
return;
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_LAYER_ADD,
_("Show Layer Masks"));
if (n_masks > 1)
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_LAYER_ADD,
_("Show Layer Masks"));
for (iter = layers; iter; iter = iter->next)
{
if (gimp_layer_get_mask (iter->data))
{
gimp_layer_set_show_mask (iter->data, active, TRUE);
}
gimp_layer_set_show_mask (iter->data, active, TRUE);
}
if (n_masks > 1)
gimp_image_undo_group_end (image);
gimp_image_flush (image);
gimp_image_undo_group_end (image);
}
void
@@ -1722,43 +1803,47 @@ layers_mask_disable_cmd_callback (GimpAction *action,
GimpImage *image;
GList *layers;
GList *iter;
gboolean active = g_variant_get_boolean (value);
gboolean have_masks = FALSE;
gboolean active = g_variant_get_boolean (value);
gint n_masks = 0;
return_if_no_layers (image, layers, data);
for (iter = layers; iter; iter = iter->next)
{
if (gimp_layer_get_mask (iter->data))
{
have_masks = TRUE;
/* A bit of tricky to handle multiple and diverse layers with
* a toggle action (with only binary state).
* In non-active state, we will consider sets of both enabled
* and disabled masks as ok and exits. This allows us to
* switch the action "active" state without actually changing
* individual masks state without explicit user request.
*/
if (! active && gimp_layer_get_apply_mask (iter->data))
return;
if (active && ! gimp_layer_get_apply_mask (iter->data))
{
/* if switching "disable mask" on, and any selected
* layer's mask is already disabled, bail out because
* that's exactly the logic we use in the ui for multile
* disabled layer masks.
*/
return;
}
if ((! gimp_layer_get_apply_mask (iter->data)) != active)
n_masks++;
}
}
if (! have_masks)
if (n_masks == 0)
return;
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_LAYER_ADD,
_("Disable Layer Masks"));
if (n_masks > 1)
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_LAYER_ADD,
_("Disable Layer Masks"));
for (iter = layers; iter; iter = iter->next)
{
if (gimp_layer_get_mask (iter->data))
{
gimp_layer_set_apply_mask (iter->data, ! active, TRUE);
}
gimp_layer_set_apply_mask (iter->data, ! active, TRUE);
}
if (n_masks > 1)
gimp_image_undo_group_end (image);
gimp_image_flush (image);
gimp_image_undo_group_end (image);
}
void
@@ -1801,10 +1886,12 @@ layers_mask_to_selection_cmd_callback (GimpAction *action,
C_("undo-type", "Intersect Masks with Selection"));
break;
}
gimp_channel_combine_items (gimp_image_get_mask (image),
masks, operation);
gimp_image_flush (image);
g_list_free (masks);
gimp_image_flush (image);
}
}
@@ -1883,8 +1970,10 @@ layers_alpha_to_selection_cmd_callback (GimpAction *action,
C_("undo-type", "Intersect Alpha with Selection"));
break;
}
gimp_channel_combine_items (gimp_image_get_mask (image),
layers, operation);
gimp_image_flush (image);
if (gimp_channel_is_empty (gimp_image_get_mask (image)))
@@ -2044,6 +2133,7 @@ layers_blend_space_cmd_callback (GimpAction *action,
gimp_image_undo_group_end (image);
g_list_free (update_layers);
gimp_image_flush (image);
}
}
@@ -2097,6 +2187,7 @@ layers_composite_space_cmd_callback (GimpAction *action,
gimp_image_undo_group_end (image);
g_list_free (update_layers);
gimp_image_flush (image);
}
}
@@ -2150,6 +2241,7 @@ layers_composite_mode_cmd_callback (GimpAction *action,
gimp_image_undo_group_end (image);
g_list_free (update_layers);
gimp_image_flush (image);
}
}
@@ -2226,6 +2318,7 @@ layers_lock_alpha_cmd_callback (GimpAction *action,
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_LAYER_LOCK_ALPHA,
lock_alpha ? _("Lock alpha channels") : _("Unlock alpha channels"));
for (iter = layers; iter; iter = iter->next)
{
if (gimp_layer_can_lock_alpha (iter->data))
@@ -2234,6 +2327,7 @@ layers_lock_alpha_cmd_callback (GimpAction *action,
gimp_layer_set_lock_alpha (iter->data, lock_alpha, TRUE);
}
}
gimp_image_undo_group_end (image);
gimp_image_flush (image);
}
@@ -2268,6 +2362,7 @@ layers_new_callback (GtkWidget *dialog,
GimpLayerCompositeMode layer_composite_mode,
gdouble layer_opacity,
GimpFillType layer_fill_type,
GimpLink *link,
gint layer_width,
gint layer_height,
gint layer_offset_x,
@@ -2288,6 +2383,8 @@ layers_new_callback (GtkWidget *dialog,
gint n_layers = g_list_length (layers);
gboolean run_once = (n_layers == 0);
g_return_if_fail (link == NULL);
g_object_set (config,
"layer-new-name", layer_name,
"layer-new-mode", layer_mode,
@@ -2384,6 +2481,7 @@ layers_edit_attributes_callback (GtkWidget *dialog,
GimpLayerCompositeMode layer_composite_mode,
gdouble layer_opacity,
GimpFillType unused1,
GimpLink *link,
gint unused2,
gint unused3,
gint layer_offset_x,
@@ -2412,7 +2510,8 @@ layers_edit_attributes_callback (GtkWidget *dialog,
layer_lock_pixels != gimp_item_get_lock_content (item) ||
layer_lock_position != gimp_item_get_lock_position (item) ||
layer_lock_visibility != gimp_item_get_lock_visibility (item) ||
layer_lock_alpha != gimp_layer_get_lock_alpha (layer))
layer_lock_alpha != gimp_layer_get_lock_alpha (layer) ||
link)
{
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_ITEM_PROPERTIES,
@@ -2473,8 +2572,10 @@ layers_edit_attributes_callback (GtkWidget *dialog,
if (layer_lock_alpha != gimp_layer_get_lock_alpha (layer))
gimp_layer_set_lock_alpha (layer, layer_lock_alpha, TRUE);
gimp_image_undo_group_end (image);
if (GIMP_IS_LINK_LAYER (layer) && link)
gimp_link_layer_set_link (GIMP_LINK_LAYER (layer), link, TRUE);
gimp_image_undo_group_end (image);
gimp_image_flush (image);
}
@@ -2494,6 +2595,7 @@ layers_add_mask_callback (GtkWidget *dialog,
GimpAddMaskType add_mask_type,
GimpChannel *channel,
gboolean invert,
gboolean edit_mask,
gpointer user_data)
{
GimpImage *image = gimp_item_get_image (GIMP_ITEM (layers->data));
@@ -2503,13 +2605,15 @@ layers_add_mask_callback (GtkWidget *dialog,
GError *error = NULL;
g_object_set (config,
"layer-add-mask-type", add_mask_type,
"layer-add-mask-invert", invert,
"layer-add-mask-type", add_mask_type,
"layer-add-mask-invert", invert,
"layer-add-mask-edit-mask", edit_mask,
NULL);
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_LAYER_ADD,
_("Add Layer Masks"));
for (iter = layers; iter; iter = iter->next)
{
mask = gimp_layer_create_mask (iter->data,
@@ -2519,7 +2623,7 @@ layers_add_mask_callback (GtkWidget *dialog,
if (config->layer_add_mask_invert)
gimp_channel_invert (GIMP_CHANNEL (mask), FALSE);
if (! gimp_layer_add_mask (iter->data, mask, TRUE, &error))
if (! gimp_layer_add_mask (iter->data, mask, edit_mask, TRUE, &error))
{
gimp_message_literal (image->gimp,
G_OBJECT (dialog), GIMP_MESSAGE_WARNING,
@@ -2532,6 +2636,7 @@ layers_add_mask_callback (GtkWidget *dialog,
gimp_image_undo_group_end (image);
gimp_image_flush (image);
gtk_widget_destroy (dialog);
}
@@ -2595,6 +2700,56 @@ layers_scale_callback (GtkWidget *dialog,
}
}
void
layers_vector_fill_stroke_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpLayer *layer;
GList *layers;
GtkWidget *widget;
return_if_no_layers (image, layers, data);
return_if_no_widget (widget, data);
if (g_list_length (layers) != 1)
return;
layer = layers->data;
if (GIMP_IS_VECTOR_LAYER (layer))
{
GtkWidget *dialog;
dialog = vector_layer_options_dialog_new (GIMP_VECTOR_LAYER (layer),
action_data_get_context (data),
_("Fill / Stroke"),
"gimp-vector-layer-stroke",
GIMP_HELP_LAYER_VECTOR_FILL_STROKE,
widget);
gtk_widget_show (dialog);
}
}
void
layers_vector_discard_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpLayer *layer;
GList *layers;
return_if_no_layers (image, layers, data);
if (g_list_length (layers) != 1)
return;
layer = layers->data;
if (GIMP_IS_VECTOR_LAYER (layer))
gimp_vector_layer_discard (GIMP_VECTOR_LAYER (layer));
}
static void
layers_resize_callback (GtkWidget *dialog,
GimpViewable *viewable,

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __LAYERS_COMMANDS_H__
#define __LAYERS_COMMANDS_H__
#pragma once
void layers_edit_cmd_callback (GimpAction *action,
@@ -25,6 +24,9 @@ void layers_edit_cmd_callback (GimpAction *action,
void layers_edit_text_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void layers_edit_vector_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void layers_edit_attributes_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
@@ -75,13 +77,25 @@ void layers_merge_group_cmd_callback (GimpAction *action,
void layers_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void layers_link_discard_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void layers_link_monitor_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void layers_text_discard_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void layers_text_to_vectors_cmd_callback (GimpAction *action,
void layers_text_to_path_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void layers_text_along_vectors_cmd_callback (GimpAction *action,
void layers_text_along_path_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void layers_vector_fill_stroke_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void layers_vector_discard_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
@@ -165,6 +179,3 @@ void layers_lock_alpha_cmd_callback (GimpAction *action,
void layers_color_tag_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __LAYERS_COMMANDS_H__ */

View File

@@ -79,14 +79,14 @@ libappactions_sources = [
'text-tool-commands.c',
'tool-options-actions.c',
'tool-options-commands.c',
'tool-path-actions.c',
'tool-path-commands.c',
'tool-preset-editor-actions.c',
'tool-preset-editor-commands.c',
'tool-presets-actions.c',
'tool-presets-commands.c',
'tools-actions.c',
'tools-commands.c',
'vector-toolpath-actions.c',
'vector-toolpath-commands.c',
'view-actions.c',
'view-commands.c',
'window-actions.c',

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __MYPAINT_BRUSHES_ACTIONS_H__
#define __MYPAINT_BRUSHES_ACTIONS_H__
#pragma once
void mypaint_brushes_actions_setup (GimpActionGroup *group);
void mypaint_brushes_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __MYPAINT_BRUSHES_ACTIONS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PALETTE_EDITOR_ACTIONS_H__
#define __PALETTE_EDITOR_ACTIONS_H__
#pragma once
void palette_editor_actions_setup (GimpActionGroup *group);
void palette_editor_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __PALETTE_EDITOR_ACTIONS_H__ */

View File

@@ -79,8 +79,17 @@ palette_editor_delete_color_cmd_callback (GimpAction *action,
if (data_editor->data_editable && editor->color)
{
GimpPalette *palette = GIMP_PALETTE (data_editor->data);
gint index;
index = gimp_palette_get_entry_position (palette, editor->color);
gimp_palette_delete_entry (palette, editor->color);
if (index >= gimp_palette_get_n_colors (palette))
index = gimp_palette_get_n_colors (palette) - 1;
gimp_palette_view_select_entry (GIMP_PALETTE_VIEW (editor->view),
gimp_palette_get_entry (palette, index));
}
}

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PALETTE_EDITOR_COMMANDS_H__
#define __PALETTE_EDITOR_COMMANDS_H__
#pragma once
void palette_editor_edit_color_cmd_callback (GimpAction *action,
@@ -32,6 +31,3 @@ void palette_editor_delete_color_cmd_callback (GimpAction *action,
void palette_editor_zoom_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __PALETTE_EDITOR_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PALETTES_ACTIONS_H__
#define __PALETTES_ACTIONS_H__
#pragma once
void palettes_actions_setup (GimpActionGroup *group);
void palettes_actions_update (GimpActionGroup *group,
gpointer user_data);
#endif /* __PALETTES_ACTIONS_H__ */

View File

@@ -117,9 +117,7 @@ palettes_merge_callback (GtkWidget *widget,
context = gimp_container_view_get_context (editor->view);
factory = gimp_data_factory_view_get_data_factory (view);
gimp_container_view_get_selected (editor->view, &selected, NULL);
if (g_list_length (selected) < 2)
if (gimp_container_view_get_selected (editor->view, &selected) < 2)
{
gimp_message_literal (context->gimp,
G_OBJECT (editor), GIMP_MESSAGE_WARNING,

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PALETTES_COMMANDS_H__
#define __PALETTES_COMMANDS_H__
#pragma once
void palettes_import_cmd_callback (GimpAction *action,
@@ -25,6 +24,3 @@ void palettes_import_cmd_callback (GimpAction *action,
void palettes_merge_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __PALETTES_COMMANDS_H__ */

View File

@@ -46,7 +46,7 @@ static const GimpActionEntry paths_actions[] =
NC_("paths-action", "Edit Pa_th"), NULL, { NULL },
NC_("paths-action", "Edit the active path"),
paths_edit_cmd_callback,
GIMP_HELP_TOOL_VECTORS },
GIMP_HELP_TOOL_PATH },
{ "paths-edit-attributes", GIMP_ICON_EDIT,
NC_("paths-action", "_Edit Path Attributes..."), NULL, { NULL },
@@ -149,7 +149,12 @@ static const GimpActionEntry paths_actions[] =
{ "paths-import", GIMP_ICON_DOCUMENT_OPEN,
NC_("paths-action", "I_mport Path..."), NULL, { NULL }, NULL,
paths_import_cmd_callback,
GIMP_HELP_PATH_IMPORT }
GIMP_HELP_PATH_IMPORT },
{ "paths-to-vector-layer", NULL,
NC_("paths-action", "Path to Vector Layer"), NULL, { NULL }, NULL,
path_to_vector_layer_cmd_callback,
GIMP_HELP_PATH_TO_VECTOR_LAYER },
};
static const GimpToggleActionEntry paths_toggle_actions[] =
@@ -429,6 +434,8 @@ paths_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("paths-export", n_selected_paths > 0);
SET_SENSITIVE ("paths-import", image);
SET_SENSITIVE ("paths-to-vector-layer", n_selected_paths == 1);
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 &&

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PATHS_ACTIONS_H__
#define __PATHS_ACTIONS_H__
#pragma once
void paths_actions_setup (GimpActionGroup *group);
void paths_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __PATHS_ACTIONS_H__ */

View File

@@ -44,9 +44,10 @@
#include "pdb/gimppdb.h"
#include "pdb/gimpprocedure.h"
#include "vectors/gimppath.h"
#include "vectors/gimppath-export.h"
#include "vectors/gimppath-import.h"
#include "path/gimppath.h"
#include "path/gimppath-export.h"
#include "path/gimppath-import.h"
#include "path/gimpvectorlayer.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpclipboard.h"
@@ -54,7 +55,7 @@
#include "display/gimpdisplay.h"
#include "tools/gimpvectortool.h"
#include "tools/gimppathtool.h"
#include "tools/tool_manager.h"
#include "dialogs/dialogs.h"
@@ -125,10 +126,10 @@ paths_edit_cmd_callback (GimpAction *action,
active_tool = tool_manager_get_active (image->gimp);
if (! GIMP_IS_VECTOR_TOOL (active_tool))
if (! GIMP_IS_PATH_TOOL (active_tool))
{
GimpToolInfo *tool_info = gimp_get_tool_info (image->gimp,
"gimp-vector-tool");
GimpToolInfo *tool_info = gimp_get_tool_info (image->gimp,
"gimp-path-tool");
if (GIMP_IS_TOOL_INFO (tool_info))
{
@@ -137,8 +138,8 @@ paths_edit_cmd_callback (GimpAction *action,
}
}
if (GIMP_IS_VECTOR_TOOL (active_tool))
gimp_vector_tool_set_vectors (GIMP_VECTOR_TOOL (active_tool), paths->data);
if (GIMP_IS_PATH_TOOL (active_tool))
gimp_path_tool_set_path (GIMP_PATH_TOOL (active_tool), paths->data);
}
void
@@ -469,6 +470,7 @@ paths_delete_cmd_callback (GimpAction *action,
{
GimpImage *image;
GList *paths;
gboolean attached_to_vector_layer = FALSE;
return_if_no_paths (image, paths, data);
paths = g_list_copy (paths);
@@ -478,11 +480,21 @@ paths_delete_cmd_callback (GimpAction *action,
_("Remove Paths"));
for (GList *iter = paths; iter; iter = iter->next)
gimp_image_remove_path (image, iter->data, TRUE, NULL);
{
/* Verify path is not attached to vector layer */
if (! gimp_path_attached_to_vector_layer (GIMP_PATH (iter->data), image))
gimp_image_remove_path (image, iter->data, TRUE, NULL);
else
attached_to_vector_layer = TRUE;
}
gimp_image_undo_group_end (image);
gimp_image_flush (image);
g_list_free (paths);
if (attached_to_vector_layer)
gimp_message_literal (image->gimp, NULL, GIMP_MESSAGE_WARNING,
_("Paths attached to vector layers weren't deleted"));
}
void
@@ -509,6 +521,28 @@ paths_merge_visible_cmd_callback (GimpAction *action,
gimp_image_flush (image);
}
void
path_to_vector_layer_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GList *paths;
GimpVectorLayer *layer;
return_if_no_paths (image, paths, data);
layer = gimp_vector_layer_new (image, paths->data,
gimp_get_user_context (image->gimp));
gimp_image_add_layer (image,
GIMP_LAYER (layer),
GIMP_IMAGE_ACTIVE_PARENT,
-1,
TRUE);
gimp_vector_layer_refresh (layer);
gimp_image_flush (image);
}
void
paths_to_selection_cmd_callback (GimpAction *action,
GVariant *value,
@@ -924,8 +958,8 @@ paths_import_callback (GtkWidget *dialog,
GimpImage *image,
GFile *file,
GFile *import_folder,
gboolean merge_vectors,
gboolean scale_vectors,
gboolean merge_paths,
gboolean scale_paths,
gpointer user_data)
{
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
@@ -937,8 +971,8 @@ paths_import_callback (GtkWidget *dialog,
g_object_set (config,
"path-import-path", path,
"path-import-merge", merge_vectors,
"path-import-scale", scale_vectors,
"path-import-merge", merge_paths,
"path-import-scale", scale_paths,
NULL);
if (path)

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PATHS_COMMANDS_H__
#define __PATHS_COMMANDS_H__
#pragma once
void paths_edit_cmd_callback (GimpAction *action,
@@ -51,15 +50,18 @@ void paths_duplicate_cmd_callback (GimpAction *action,
void paths_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void path_to_vector_layer_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_selection_to_paths_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void paths_fill_cmd_callback (GimpAction *action,
GVariant *value,
@@ -104,6 +106,3 @@ void paths_color_tag_cmd_callback (GimpAction *action,
void paths_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __PATHS_COMMANDS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PATTERNS_ACTIONS_H__
#define __PATTERNS_ACTIONS_H__
#pragma once
void patterns_actions_setup (GimpActionGroup *group);
void patterns_actions_update (GimpActionGroup *group,
gpointer user_data);
#endif /* __PATTERNS_ACTIONS_H__ */

View File

@@ -15,13 +15,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PLUG_IN_ACTIONS_H__
#define __PLUG_IN_ACTIONS_H__
#pragma once
void plug_in_actions_setup (GimpActionGroup *group);
void plug_in_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __PLUG_IN_ACTIONS_H__ */

View File

@@ -102,7 +102,7 @@ plug_in_run_cmd_callback (GimpAction *action,
context = gimp_container_view_get_context (editor->view);
object = gimp_context_get_by_type (context,
gimp_container_get_children_type (container));
gimp_container_get_child_type (container));
args = procedure_commands_get_data_args (procedure, object);
}
@@ -119,14 +119,16 @@ plug_in_run_cmd_callback (GimpAction *action,
{
GimpItemTreeView *view = GIMP_ITEM_TREE_VIEW (data);
GimpImage *image;
GList *items;
GList *items = NULL;
image = gimp_item_tree_view_get_image (view);
if (image)
items = GIMP_ITEM_TREE_VIEW_GET_CLASS (view)->get_selected_items (image);
else
items = NULL;
{
GType item_type = GIMP_ITEM_TREE_VIEW_GET_CLASS (view)->item_type;
items = gimp_image_get_selected_items (image, item_type);
}
args = procedure_commands_get_items_args (procedure, image, items);
}

View File

@@ -15,8 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PLUG_IN_COMMANDS_H__
#define __PLUG_IN_COMMANDS_H__
#pragma once
void plug_in_run_cmd_callback (GimpAction *action,
@@ -26,6 +25,3 @@ void plug_in_run_cmd_callback (GimpAction *action,
void plug_in_reset_all_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __PLUG_IN_COMMANDS_H__ */

View File

@@ -289,14 +289,14 @@ procedure_commands_get_display_args (GimpProcedure *procedure,
return NULL;
}
}
else if (GIMP_IS_PARAM_SPEC_CORE_OBJECT_ARRAY (procedure->args[n_args]))
else if (gimp_value_array_length (args) > n_args &&
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);
drawables = g_new0 (GimpDrawable *, n_drawables + 1);

Some files were not shown because too many files have changed in this diff Show More