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

Compare commits

...

5912 Commits

Author SHA1 Message Date
Gabriele
f3356a3f36 Merge branch 'gabrybarbe-setting-tab-toolbox' into 'master'
Teams/GIMP/Design/gimp-ux#666: add option to enable/disable TAB key to show/hide toolbox

Closes Teams/GIMP/Design/gimp-ux#666

See merge request GNOME/gimp!2490
2025-10-05 20:14:58 +02:00
Bruno Lopes
ebd6e64dc8 build/linux: Fix Flatpak building after gexiv2 dep declaration 2025-10-05 14:53:41 -03:00
Bruno Lopes
4768a4283d gitlab-ci: Add comment explaining Flatpak timeout 2025-10-05 13:45:55 -03:00
Bruno Lopes
fe4a698928 gitlab-ci: Bump Flatpak timeout for 90min again for rebuilding purposes
When we bump some dependency (e.g. Poppler), even the ones which
don't link to it will be rebuild, so 30min is not enough even
with the ORAS caching.
2025-10-05 13:41:27 -03:00
Gabriele Barbero
10256cbdab display: add option to enable/disable TAB key to show/hide toolbox
This commit introduces a new preference option that allows users to enable
or disable the functionality of using the TAB key to show or hide the toolbox in GIMP.
The settings is TRUE by default, preserving the existing behavior.
2025-10-05 11:09:31 +02:00
Bruno Lopes
d8d73266bc build/linux: Update poppler module to 25.10
Synced from
6d4124f7b8
2025-10-04 18:51:18 -03:00
Bruno Lopes
356c2baec5 gitlab-ci, build/windows: Remove forgotten comment about fixed #12284 2025-10-04 16:16:49 -03:00
Bruno Lopes
aea7042aa1 meson: Support Windows native paths (aka backslashes) on -Dprefix
Closes: #12284
2025-10-04 16:12:00 -03:00
Alan Mortensen
97944a5415 Update Danish translation
(cherry picked from commit d81cfcc325)
2025-10-04 12:48:26 +00:00
Alx Sa
a5182a010f tools: Fix missing cursor for MyPaint Brush tool
Resolves #15001
In the MyPaint Brushes v2 port (ea8b9dc1),
I implemented a cursor_update () function from the
parent class. However, I did not call the parent's
version of the function afterwards, so the MyPaint
Brush cursor was not being redrawn. This patch
adds the call to fix the cursor display issue.
2025-10-03 22:14:52 +00:00
Øyvind Kolås
9c2c5ff183 meson, app: depend on GEGL-0.4.64 2025-10-03 23:56:36 +02:00
Bruno Lopes
f09007507f Declare gexiv2 dependency on many targets (due to gimpmetadata.h)
Our build files were relying 'sysroot' to find gexiv2.h but this is
not possible with Apple Clang om which sysroot points to macOS SDK.
So, exotic environments like Homebrew were failing. Let's fix this.
2025-10-03 18:31:53 -03:00
Bruno Lopes
2b91551f4e gitlab-ci: Complete cbe56ff3 2025-10-03 09:03:26 -03:00
Bruno Lopes
cbe56ff388 gitlab-ci: Remove dangling MSYSTEM_PREFIX on Win job names
It makes them consistent with other non-Windows jobs so
easier to read.
2025-10-02 21:37:33 -03:00
Anders Jonsson
7cec3f52b9 .gitlab: fix template typo 2025-10-03 00:54:09 +02:00
Alx Sa
81c67e5614 tools: Don't commit Filter Tool without a filter
The Filter Tool is a "hidden" tool that we switch to
when applying a filter. Like other tools, it commits when
we save our image. However, we may no longer have an
active filter in the tool when we do so (like, after applying
an NDE filter). Because we check the drawable from the
filter to confirm whether we should force NDE or not,
this can cause a CRITICAL when we try to access a now
non-existent filter.

This patch extends the "if (filter_tool->filter)" check to
cover the full commit check process, to prevent the bug.
2025-10-02 12:07:25 +00:00
Øyvind Kolås
67fa72a94e meson, app: depend on babl-0.1.116 2025-10-02 13:22:29 +02:00
Yuri Chornoivan
6587256c3a Update Ukrainian translation 2025-10-02 08:21:41 +00:00
Bruno Lopes
ad9dbf2c8b tools: Drop bashism/gnushism in read command 2025-10-01 21:26:25 -03:00
Bruno Lopes
2f0bfc569b meson: Fix wrong debugging_format detection on clang-cl and msvc 2025-10-01 20:13:33 -03:00
Alx Sa
36330a271a tools: Prevent bucket fill on link/vector layers
Resolves #14993
We currently prevent paint tools from painting on
link or vector layers. However, we had not added this
protection to the bucket fill tool. This patch copies over
the relevant if statements to prevent this.
2025-10-01 13:23:09 +00:00
Jehan
baa4825880 app: use the new release/ alias URLs for the "Learn more" link of…
… Release Notes tab.
2025-10-01 14:40:18 +02:00
Jehan
8c910c2b6b tools: improve release stats.
- Interactively query the release version from standard input.
- Compute the logical previous version but also the previous release in
  time. For instance the logical previous release of GIMP 3.0.6 will be
  3.0.4 but the time-wise previous release will be 3.1.4.
- Some statistics will use the logical previous release whereas others
  the time-wise one.
2025-10-01 14:39:51 +02:00
Marco Ciampa
a025cfe41b Updated Italian translation 2025-10-01 12:37:59 +02:00
Jehan
41035c7589 plug-ins: fix memory management and handle multi-file zip.
We should not call archive_entry_free() since man
archive_read_next_header explicitly says that the returned entry is an
internal object:

> This is a convenience wrapper around archive_read_next_header2() that
> reuses an internal struct archive_entry object for each request.

The only reason why it was not crashing is that we were not properly
freeing the archive itself so internal objects were hanging! The man
archive_read says:

> Once you have finished reading data from the archive, you should call
> archive_read_close() to close the archive, then call archive_read_free()
> to release all resources, including all memory allocated by the library.

Therefore this code add archive_read_free() at the end and removes
archive_entry_free().

Furthermore we now verify if the zip archive contains any other file.
Unlike all other compression formats we were supporting until now, zip
is a full multi-file container format and we are always only trying to
read the first file listed in the archive. This likely means that this
file was not meant to be opened this way. In any case, still try to load
the first file as an image, yet raise a warning about the existence of
more files in the archive.
2025-09-30 20:14:01 +02:00
Jehan
7275569079 plug-ins: localize strings and improve extension list.
- Uppercase first letter of blurbs.
- Make the blurb and documentation strings localizable and localized.
- Add the compression format extension to the list of extensions. I am
  unsure why it was set as FIXME, because it does work perfectly (per
  tests) as a generic (de)compressor plug-in for any of the image
  formats we support. Not even this, but I am even putting the generic
  extension first, because sometimes we take the first listed extension
  of a load procedure to determine the source file format. Yet the only
  thing we can say *generically* about a file loaded by these procedures
  is that it was compressed with the associated container format!
- For the new zip-support, do not show xcf.zip and xcfzip extensions in
  the list. I don't think we want to promote these new extensions as
  standard XCF variants, even though in practice this will still work
  fine. Instead add hgt.zip (but again, after the generic zip, cf.
  previous point), because we know that this is a commonly used format
  combination for HGT files.
2025-09-30 19:53:36 +02:00
Jehan
dfafb7c6f2 NEWS: add new feature and clean out backported enhancements.
Various items have been moved to gimp-3-0 branch (commit f2c13d319e) and
some were already duplicated.
2025-09-30 17:50:39 +02:00
Aleksandr Prokudin
25d1b7f8c3 Update Russian translation 2025-09-30 17:12:29 +02:00
Bruno Lopes
0edf615333 libgimp: Improve .gir and .vapi dependencies by using unified list
To avoid bugs like: #14902
2025-09-30 11:29:51 -03:00
Aefgh Threenine
daf23e1a50 Update Thai translation 2025-09-29 23:54:22 +00:00
Alx Sa
b633b4b9c7 python: Remove layer offsets on ORA export
When exporting formats that use image procedures
(like PNG), if we don't remove the layer offsets then
the image is cut off on export. This is because we
size the image to the layer size, but then the layer offsets
move it off the canvas. This patch fixes the issue for
ORA export.
2025-09-29 18:55:20 -03:00
Yuri Chornoivan
cfa3fd6bb7 Update Ukrainian translation 2025-09-29 20:00:05 +00:00
Yuri Chornoivan
669685d1d8 Update Ukrainian translation 2025-09-29 19:51:36 +00:00
Alx Sa
f032153596 plug-ins: Add zip decompression support
This patch adds support for decompressing .zip files and
loading an image within. This allows us to load zipped
images like hgt.zip and other compressed formats.
2025-09-29 19:28:18 +00:00
Jehan
13639b1d3d NEWS: update. 2025-09-29 21:06:08 +02:00
Jehan
eb0bfe7bdb Issue #13553: pop an error dialog up only for specific GIO error.
This fixes 46d9a09698. There was a reason why this was not implemented
as an assert-type error nor as a user-facing error: network problems
happen.

We cannot pop an error up every time:

* The computer is offline! 😱 GIMP is not made to be run as a connected
  software and working on GIMP with a non-connected computer is a
  perfectly valid way of using GIMP.
* gimp.org is down (it's rare, but it happens and it should not have any
  impact to creators with GIMP).
* You are behind some kind of proxy or other complicated network
  configuration which GIO is not able to pass through.
* And any other reason which could make your GIMP not able to read the
  remote json file…

Instead let's check the more particular domain and error code, though
even this I hesitated between doing this change or simply reverting
commit 46d9a09698.
Indeed it's still quite a generic G_IO_ERROR_NOT_SUPPORTED error, so I
do hope we cannot get it in other normal conditions where reading a
remote link may fail. The last thing we want is GIMP popping up errors
which are neither bugs in our code, nor environment issues for which
anyone can do anything about.
2025-09-29 20:31:40 +02:00
Asier Saratsua Garmendia
393ca59e79 Update Basque translation 2025-09-29 17:59:37 +00:00
Jehan
3a698a05a1 plug-ins: only set the file if it's actually an inner XCF file.
Soon we will officially support .hgt.zip files (see !2483) but in fact,
even without this, the file-compressor actually support any other
formats we support, compressed into one of the container formats
supported by this plug-in.

This fixes such error message:

> gimp_image_set_file: failure to set file 'file:///home/jehan/Documents/gimp-splash-deleteme.png.gz' with extension 'gz'. The extension must be '.xcf' (or a compressed variant).
2025-09-29 17:46:33 +02:00
Jehan
f4a7da1ee3 app, pdb: similar to the previous commit, but for files loaded with…
… gimp_file_load().

We make sure that the load procedure associated to the file is the one
used for the inner-file (in case of imbricated files into container
formats).

Also let's set the imported file unless it's a XCF inner format.
2025-09-29 17:46:32 +02:00
Jehan
bb9d8df855 app: make sure we only consider the inner file load procedure to…
… determine if a file is XCF.

This was kinda already working for files loaded through the GUI. Yet the
code in file_open_file_proc_is_import() was assuming a file loaded
through the file-compressor plug-in is necessarily XCF.

Even though it is the original use, the code in file-compressor is
actually generic and is able to load any supported format additionally
compressed with gz, bz2 or xz.
Furthermore, we will soon support zip-ped imaged, explicitly to support
the format .hgt.zip which is quite common (see !2483). So remove any
logic of a file loaded by file-compressor as meaning it's a compressed
XCF.
2025-09-29 17:46:32 +02:00
Kolbjørn Stuestøl
78e68efd06 Update Norwegian Nynorsk translation 2025-09-29 15:15:57 +00:00
Ekaterine Papava
2fa82d51ee Update Georgian translation 2025-09-29 14:52:02 +00:00
Martin
f223dae9fe Update Slovenian translation 2025-09-29 13:21:27 +00:00
luzpaz
9daf5d2e5d libgimpconfig: fix typo in gimpconfig-params.c
Fixes source comment typo and modifies whitespace for readability.
2025-09-29 11:07:55 +00:00
Bruno Lopes
789af76a32 app: Move "Documentation" link one line up over (community) "Tutorials"
Users were thinking the tutorials are some kind of official docs,
but they are not maintained as the official GIMP help website,
they are more like informal documentation about GIMP made public.

Let's clarify this reordering the buttons.
2025-09-29 07:32:12 -03:00
Bruno Lopes
f9ba343558 build/windows: Stay on Inno 6.5.4 to avoid (potentially) broken 6.6.0 Dark Mode
It was announced by the devs on Google Groups that they are on preview state.

I will need time to conform our scripts to the upcoming 6.6.0.
So, let's not risk creating installers with broken UI.
2025-09-28 22:12:16 -03:00
Bruno Lopes
014aa5ae6f build/linux: Patch mypaint brushes on AppImage and Snap too
Following 2f6b7591
2025-09-28 21:39:00 -03:00
Bruno Lopes
47eac319b1 build/linux: Silence noisy warnings about GTK_MODULES
From GTK mouth:
https://gitlab.gnome.org/GNOME/gtk/-/blob/3.24.50/gtk/gtkmodules.c?ref_type=tags#L250
2025-09-28 19:58:25 -03:00
Bruno Lopes
3bde6195f6 build/windows, gimp-data: Prepare to Inno Setup 6.6.0 2025-09-28 18:19:18 -03:00
Bruno Lopes
b0689f565b build/linux: Little improvement on libheif plugins bundling 2025-09-28 08:25:27 -03:00
Bruno Lopes
1e46438ced build/linux: Fix libproxy/libpxbackend errors on Snap 2025-09-28 08:02:52 -03:00
Bruno Lopes
2b32496195 build/linux: Remove some uneeded lines after move to Trixie 2025-09-28 07:41:45 -03:00
Bruno Lopes
de62139894 build/linux: Fix GJS bundling on AppImage
It have an undeclared dependency on GioUnix typelib.
2025-09-28 07:40:20 -03:00
Bruno Lopes
f774ad7f16 Revert "Issue #13001: build/linux: Sandbox XDG_DATA_DIRS on AppImage"
This reverts commit bc095d5c83.

Sandboxing XDG_DATA_DIRS, while can fix the crash due to share/mime,
on the other hand makes impossible to call share/applications
associated with such mimes on host.

So, since we bumped the AppImage to Debian Trixie so the Glib
crash due to mime is gone, we can (and should) revert the
wrong sandboxing without problems.
2025-09-27 19:58:02 -03:00
Bruno Lopes
f53a843c3d gitlab-ci, build: Move to Debian Trixie on AppImage only
Fixes: #13001 #13106 #13492 #13647 #14779

AppImage jobs are now built with Trixie to adress #13001 and many others.

To have two Debian versions with less complexity possible, I needed to:
- Revert the prevalence of the AppImage CI (now nonreloc comes first);
- Revert the use of Clang on Debian (also to save 120MB from registry,
  since we now have 4 Docker images, each one with its own STEP cache!).
In short, .gitlab-ci.yml will look more like before I changing it a lot.
2025-09-27 18:58:18 -03:00
Bruno Lopes
46d9a09698 app: Use 'g_message' (like the help plug-in) when GVFSd-HTTP is not present
Closes #13553

Such issue tends to affect only AppImage users (e.g. when running it in
KDE installations). This is because AppImage files are not ran by
any host helper (e.g. snapd or flatpak) to connect to GVFSd and is
not possible to bundle GVFSd due to its own nature (it is daemon).

Since GVFS is listed in the INSTALL file as a required dependency, it is
fair enough to be more clear when it is not present, otherwise users will
have outdated GIMP without knowing (like happened in macOS in the past).

We are already doing this with GIMP help plug-in by the way. The
difference is that, at GIMP start, such techinical error message can
be surprising, but even so it is needed as feedback for fail on the
update check button in the end of day. Let's follow GIMP help on this.
2025-09-27 11:39:36 -03:00
Kolbjørn Stuestøl
355d695607 Update Norwegian Nynorsk translation 2025-09-27 11:44:30 +00:00
Alx Sa
714e9041d8 pdb: Set choice args to default in gimp-file-load
This patch resolves the same issue as 8021b464,
but for `gimp-file-load`.
2025-09-26 23:57:51 +00:00
Jehan
24c8f86c85 app: minor indentation cleanup. 2025-09-26 23:30:37 +02:00
Jehan
f50145c155 po: remove files which should not be in POTFILES.in.
This file is part of po-tags/ domain, and in fact, it's even in the
POTFILES.skip of the main po/ domain.
2025-09-26 21:53:28 +02:00
Gabriele
7f8298467b Issue #11869: use a custom AppMenu for macOS 2025-09-26 11:43:47 +00:00
Alx Sa
23a9758a7b libgimpwidgets: Update hex color as you type
This patch connects the gimp_color_hex_entry_events ()
function to "key-release-event" and adjusts the code
to update valid colors as you type. Pressing Enter
will work as before, converting back to the last valid
color if an invalid one is typed.
2025-09-25 11:48:17 +00:00
Jehan
0af9261980 app: fix rendering background of Colormap dockable.
The rgba variable would be used uninitialized. This needs to be moved
one loop level up so that the color extracted at each cell start
position is properly reused (and also so that the full transparent color
at no-entry position is properly set and reused too).
2025-09-25 01:27:54 +02:00
Martin
77d25750a7 Update Slovenian translation 2025-09-24 20:36:59 +00:00
luzpaz
155e951fa6 app: Fix description typo
This patch fixes a minor typo in a user-facing description within app/path/gimpvectorlayer.c  
This was found via codespell.
2025-09-24 17:24:28 +00:00
Jehan
5a22a9b931 app: make sure we don't crash dereferencing a NULL GError.
I think most, if not all, failure cases of file_open_with_proc_and_display()
should allocate a GError by now. But just in case we missed some edge
case, better not crash.
For instance, we were crashing when opening a remote file because of
this line before the previous commit was pushed.
2025-09-24 19:15:47 +02:00
Jehan
2187f0a49c app: fix opening remote files.
This got broken with commit 66cdecb0fa. It is now possible to open
remote files again.
2025-09-24 19:10:33 +02:00
luzpaz
91418131a0 app, libgimp*, pdb, themes: Fix description typos
This patch fixes minor typos in user-facing descriptions
and internal comments found by Codespell.
2025-09-24 16:50:15 +00:00
Yuri Chornoivan
645d23cd37 Update Ukrainian translation 2025-09-24 16:13:51 +00:00
Jehan
28fa2e5fc7 app, libgimp, pdb: new function gimp_link_layer_get_mime_type().
As discussed with NikcDC, this will be useful, for instance for the SVG
export to know the mime type of the linked file. If not PNG, JPG or SVG,
we may want to output a small warning that some viewers may not be able
to read such files, since the SVG spec makes the support of these 3
formats only as mandatory.
2025-09-24 16:11:01 +02:00
Bruno Lopes
c13bf1af19 build: Move loose scripts in meson subdir to tools
The build dir looks "prettier" without the meson subdir.
With prettier I mean: just the OSes subdirs.
2025-09-24 09:07:47 -03:00
Martin
9337c55599 Update Slovenian translation 2025-09-24 11:26:55 +00:00
Ekaterine Papava
947995248a Update Georgian translation 2025-09-24 05:09:40 +00:00
Jehan
abcfbfbca5 NEWS: update. 2025-09-24 03:06:56 +02:00
Jehan
b121ddd6f8 app, pdb: do not leak a GFile in gimp_temp_file() or any future…
… PDB API which will return a newly allocated GFile.

Though gimp_temp_file() was so far the only such case where a returned
GFile was being leaked, it may happen again. So the PDB must instead
assume that all returned GFile-s have their own reference and take over
said reference.

And therefore update all other functions to increase the internal
GFile-s reference counts.
2025-09-24 02:22:43 +02:00
Jehan
ba1de3b68e app, libgimp, pdb: add GimpLinkLayer base API.
Still more to be done, but this is the basic, working API.
2025-09-24 01:56:52 +02:00
Jehan
6552e3200d libgimp: add gimp_item_is_vector_layer() and fix some "Since" annotations. 2025-09-24 00:46:59 +02:00
Bruno Lopes
4d97212cf9 build/linux: Sync with Beta manifest regarding whitespaces 2025-09-23 16:56:32 -03:00
Yuri Chornoivan
54b64252df Update Ukrainian translation 2025-09-23 18:56:50 +00:00
Bruno Lopes
c79db4c15a gitlab-ci: Unify build jobs timeout by bumping them to 30min
While 20min is being enough, the jobs are completing
too close of the due time (due to awful runners like
OSU or Win32 stuckness). Let's prevent failures, then.
2025-09-23 15:38:25 -03:00
Bruno Lopes
cecb937a0b gitlab-ci: Reduce Flatpak timeout to 20min like AppImage and Snap, after ORAS 2025-09-23 12:18:03 -03:00
Bruno Lopes
fe4dbeb911 build/linux: ORAS works! Let's do some cosmetical changes on Flatpak deps script 2025-09-23 12:17:53 -03:00
Bruno Lopes
fdb4111e3f build/windows: Temporarely show flatpak deps building to see if ORAS caching is working 2025-09-23 11:52:18 -03:00
Bruno Lopes
72533aaf8e build/linux: Do not cache babl and gegl builds binaries to ORAS image
They should be passed only at artifact level.
2025-09-23 11:52:15 -03:00
Marco Ciampa
ccc4eacac3 Updated Italian translation 2025-09-23 16:14:49 +02:00
Bruno Lopes
8e9b7bfce6 build/linux: Test built packages binary caching on Flatpak with ORAS
If this works, our flatpak builds will behave like on AppImage,
Snap and Windows, I mean: with all precompiled binaries.
2025-09-23 10:37:42 -03:00
Sabri Ünal
17552c0e11 Update Turkish translation 2025-09-23 13:08:08 +00:00
Sabri Ünal
f428089947 Update Turkish translation 2025-09-23 13:07:56 +00:00
Rico Tzschichholz
6260590cf4 libgimp: Additionally pass gio-[unix,windows]-2.0 to vapigen
Fixes https://gitlab.gnome.org/GNOME/gimp/issues/14902
2025-09-23 08:41:05 -03:00
Jehan
c5e77fb8bb po-windows-installer: fix building the pot file.
When running `ninja gimp30-windows-installer-pot`, we had this error:

```
[0/2] Running external command gimp30-windows-installer-pot
/usr/bin/xgettext: warning: ITS rule file 'gimp-ms-installer-config.its' does not exist; check your gettext installation
/usr/bin/xgettext: warning: file 'build/windows/installer/lang/setup.isl.xml.in' extension 'xml' is unknown; will try C
```
2025-09-23 12:13:48 +02:00
Jehan
b50781730c NEWS: update. 2025-09-23 11:56:04 +02:00
Emin Tufan Çetin
2b669917c2 Update Turkish translation 2025-09-23 09:54:29 +00:00
Martin
7d22110cfb Update Slovenian translation 2025-09-23 07:33:11 +00:00
luming zh
86cc15cbf0 Update Chinese (China) translation 2025-09-23 00:31:05 +00:00
luming zh
865e6363e1 Update Chinese (China) translation 2025-09-23 00:24:04 +00: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
Bruno Lopes
84c4e0b639 gitlab-ci, devel-docs: Update to new "Package:" labels
A common prefix makes easier to use these dist pipelines.
2025-05-14 09:13:40 -03:00
Idriss Fekir
f0dc96caf1 GimpText:Partially Revert some of the changes in commit b2eb374aaacd0c8054234c4fa2b785da0007355f
I accidently commited 2 calls to g_assert in the previous commit.

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

Also font's reference count wasn't increased in one case when opening xcf file with a text layer.
2025-05-14 01:51:58 +02:00
lloyd konneker
12806b2830 ScriptFu: tests: add tests of selection semantics
No changes except to tests.
2025-05-13 11:22:25 -04:00
Alx Sa
60891765a5 core: Update filter size when image is rotated
Resolves #13981
The dimensions of NDE filters were being updated
when a drawable was resized or scaled, but not when
the drawable was rotated. Since this transform also
affects the dimensions of the filter, the filter refresh
code should be called there as well.
2025-05-13 14:28:29 +00:00
Bruno Lopes
e68cc824c1 devel-docs: Restore one paragraph from icons section 2025-05-13 06:54:36 -03:00
Bruno Lopes
fb2167c8ad devel-docs: Restore gitlab-mr reference but on Core Contributors section 2025-05-12 22:36:02 -03:00
Bruno Lopes
478ec9014f devel-docs: Remove outdated info about icons (again) 2025-05-12 22:32:59 -03:00
Bruno Lopes
35bde24daa devel-docs: Remove outdated CI explanation in favor of gitlab-ci.yml
This is already documented and updated on gitlab-ci.yml's
"There are five "TYPES" of pipelines on our CI" section so
maintaining two explanations is pointless and not future-proof.
2025-05-12 22:15:56 -03:00
Alx Sa
db040ce9e0 display: Connect path on click in design mode
Rather than having to hold Ctrl to switch to edit mode, users can now
just click the start point from the end node to create a connected path.
This makes the Path tool consistent with similar tools in GIMP
(such as Free Select, Scissor Select, and Cage Transform tools) as well
as other programs with a Path tool.
2025-05-13 00:11:05 +00:00
Bruno Lopes
a6d7bf1a8a devel-docs: Remove sparse plug-in content in favor of Jehan nice tutorials
Despite the fact a tutorial have a different nature than a formal wiki-like text with
topics, the plug-in subject is undoubtedly well documented after Jehan and others work:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This reverts commit 7d153bcc6d.

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

This reverts commit fd0ccfa16c.

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

This reverts commit 4075add5b4.

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

This reverts commit 38f0527ebc.

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

This reverts commit 543bb374a8.

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

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

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

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

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

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

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

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

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

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

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

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

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

To resolve, this patch adds a check if the clipping path
name is NULL on load, warns the user, and then
stops loading the clipping path resource.
On export, we fall back to ASCII instead if the conversion
to ISO-8859-1 fails.
2025-03-12 20:06:25 +00:00
Bruno Lopes
4497c906c1 build/linux: Fix AppImage crashing due to lack of Xapp gschemas
Closes: #13082
2025-03-12 13:24:32 -03:00
Jehan
f628b1715f Issue #13058: passthrough layer groups with filters don't merge correctly. 2025-03-11 17:18:42 +01:00
Jehan
388e346a5c app: further fix merging a pass-through group when opacity < 1.0.
Just using the output of the group is not enough since the pass-through
mode cannot be reused for the normal layer (and anyway all below layers
will have been removed). This still works out with a full-opacity
pass-through, but for lesser opacity, what we want is to replace with
not just the group's render, but in fact the render after the
compositing node.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

https://github.com/HolyBlackCat/quasi-msys2/issues/18
https://github.com/HolyBlackCat/quasi-msys2/issues/33
2025-03-02 18:11:02 -03:00
Jehan
71aff49750 Issue #11592: do not strength-reduce pass-through groups with filters.
While the pass-through group can be skipped in some specific conditions,
this won't work with filters (then the effect would only apply to the
one layer child instead of applying to the result of the child
blended/composited with the bottom layers).

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

---

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

New functions:

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

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

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

- gimp_param_spec_choice_get_choice
- gimp_param_spec_choice_get_default

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

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

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

* libgimp:
  - gimp_param_spec_resource_defaults_to_context()
  - gimp_param_spec_resource_none_allowed()

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

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

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

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

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

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

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

The new message is something like:

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

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

As a side related fix, I updated the GimpParamSpecFile validation to
only validate local files, just like we do in core. Remote files can
always be set (and we let plug-ins handle them), at least for the time
being.
2025-01-23 20:04:54 +01:00
Bruno
f9203916c0 gitlab-ci: Workaround lack of common 'x86_64' runner tag
This way, we can use OSUL and Canonical runners on some Debian jobs.
2025-01-23 13:49:16 -03:00
Alan Mortensen
7f3741957e Update Danish translation 2025-01-23 16:26:55 +00:00
Alan Mortensen
7ad02976c4 Update Danish translation 2025-01-23 16:24:21 +00:00
Bruno
38277a1fee gitlab-ci: More g-ir-doc remnants removal (not at dist job)
Following 55d0745b

This one was a bit more hard to catch since
the devel-docs dir is heavily disorganized.
2025-01-23 09:34:18 -03:00
Bruno
55d0745bc0 gitlab-ci: Fix broken Debian jobs after removal of g-ir-doc option
26a079bd lacked a bit of CTRL + F
2025-01-23 09:18:31 -03:00
Bruno
c57b10aff4 gitlab-ci: Do not install yelp-tools since we got rid of g-ir-doc in 26a079bd 2025-01-23 09:15:08 -03:00
Jehan
26a079bd57 devel-docs: get rid of g-ir-doc.
Per the (quite off-topic) discussion in #12772, the fact it's quite
broken on Windows, apparently not too maintained anymore and its syntax
clashes with gi-docgen syntax…
2025-01-23 13:07:03 +01:00
Bruno
9821d91745 app: Make possible to 'gimp-debug-tool' work relocatable
Following 50b6ba63

This is specially useful for AppImage and Snap
2025-01-23 08:53:13 -03:00
Jehan
d25c97e7c9 libgimp, libgimpbase: fix passing a file spec action through the wire.
I forgot to set meta.m_file.action into the GPParamDef! 🤦

As a side update, let's store the action as gint32 in GPParamDefFile. I
realized that otherwise, depending on the actual size of an enum type,
when casting to a (guint32 *), we crop the value! This works out in
Little Endian because we are only in small number territory, but in Big
Endian, we would always crop any action value to 0!
This was not the bug in this specific case, but it could become the
exact same bug (always passing action 0, i.e. OPEN, through the wire) on
Big Endian hardware.
2025-01-23 00:52:18 +01:00
Alx Sa
8db404516e python: Fix file arguments after 161b3c53
We accidentally missed updating the
Python file parameters after 161b3c53.
This patch updates the API as well.
2025-01-22 21:29:16 +01:00
Jehan
e752687321 libgimp: fix introspection.
The variable name was not the same on function declaration and
definition/annotations and this was confusing GIR scanner.
2025-01-22 21:29:16 +01:00
Kolbjørn Stuestøl
c975c1d19b Update Norwegian Nynorsk translation 2025-01-22 18:30:57 +00:00
Kolbjørn Stuestøl
915be5ce33 Update Norwegian Nynorsk translation 2025-01-22 18:28:30 +00:00
Jacob Boerema
8b50f186b9 plug-ins: fix incorrect loading of psd cmyk merged images
I don't know what I was seeing when I added this several years ago,
but I can't find any psd CMYK images where the merged image is RGB.

It is wrong for the CMYK images we have and there are none so far
that do conform to it, so let's remove this code.
2025-01-22 18:25:16 +00:00
Jacob Boerema
4203761708 plug-ins, psd: fix #12745 invalid merged image when selecting cmyk
The merged psd image we create when writing psd's is incorrect when
we selected cmyk at export.
The problem is that we are only saving the 3 channels of our RGB
input image, or 1 for a grayscale image.
Move the channel count up and compute it separately for cmyk, then
reuse the count instead of computing it again.
2025-01-22 18:25:16 +00:00
Bruno
50b6ba6366 build/linux: Include 'gimp-debug-tool' on AppImage
It works, but do not work well if 'gdb' or 'lldb' are installed.
2025-01-22 14:26:09 -03:00
Jehan
161b3c5331 Issue #12045: no defaults for plugin args of type File.
libgimpbase:

  - Mew GimpFileChooserAction enum type: basically a near-mapping of
    GtkFileChooserAction (GTK is not accessible from libgimpbase) with
    an added GIMP_FILE_CHOOSER_ACTION_ANY.
  - New GimpParamSpecFile param spec type: based off
    GimpParamSpecObject, it has a default value, but also a none_ok and
    action argument. This way, we can also know from the argument type
    if this is a file argument meant for selecting a normal file or a
    folder, or for saving into a file, or for creating a directory.

libgimp, plug-ins:

  - All existing file arguments (until now using a standard
    GParamSpecObject param with GFile value type) were moved to the new
    GimpParamSpecFile.
  - Script-Fu in particular will now generate the appropriate param type
    depending on whether it is an SF-FILENAME or SF-DIRNAME.
  - File arguments are now stored between runs as a URI rather than as a
    path. As far as I can tell, a GFile always has a URI, but not always
    a path (in particular remote file won't have a path).
2025-01-22 17:53:21 +01:00
Alx Sa
b6d6ccecc7 plug-ins: Make PSD compatibility messages selectable
For diagnosis purposes, it is useful for people to be able to copy and paste
the compatibility warning text that GIMP shows when loading a PSD with
unsupported features. This patch makes that label selectable, which allows
for copying.
2025-01-21 23:07:12 +00:00
Jehan
a64c46b830 Issue #12776: Underscored .isl langs (pt_BR, zh_CN and zh_TW) lost translation on Installer.
This is again a change in gettext 0.23 whose release notes say:

> The value of the xml:lang attribute, inserted by msgfmt, now conforms to W3C standards.

Our xpath selection now recognizes both the old and new (proper) format
so that it works both with older and new versions of msgfmt.
2025-01-21 20:41:57 +00:00
Alx Sa
f58d36a942 script-fu: Further API fixes to Render Font Map
f4582d97 uses gimp-font-get-lookup-name, which is now
marked as private PDB. This patch replaces that usage with
gimp-resource-get-name, which is public and standardized.
2025-01-21 20:24:49 +00:00
Jehan
6dfc9f96c5 app, libgimp, pdb, plug-ins: improve and rename gimp_file_save_thumbnail() to…
… gimp_file_create_thumbnail().

One more case where "save" is misleading, and even more as it's not a
procedure where we control where an image is stored. We only say
basically "make a thumbnail which maps to this file according to my
platform's rules".

As a side fix, I also improved a bit the logic so that it allows @file
to be the exported or — as last fallback — the imported file.

And finally improve the function's docs.
2025-01-21 20:31:27 +01:00
Jacob Boerema
66aacf9633 plug-ins: add support for loading 16-bit per channel LAB psd's 2025-01-21 19:28:25 +00:00
Alx Sa
f4582d97dd script-fu: Fix Render-Font-Map after API updates
Resolves #12753
gimp-fonts-get-list now returns a vector rather than a list,
so we needed to change calls for length to vector-length
and replace car with vector-ref.
2025-01-21 16:41:52 +00:00
Jehan
602e8f71c7 app, libgimp, pdb: reword some save/export API documentation.
Followup of the save/export difference, plug-ins can only register
"export" handler procedure (save handlers are registered by core). Also
rename _gimp_pdb_set_file_proc_save_handler() though it's private so it
doesn't matter much.

Now gimp_file_save() is a special case, because it can indeed "save" to
XCF or "export" to any other format. So I just leave it named this way,
but I make the function's documentation more exhaustive.
2025-01-21 17:40:11 +01:00
Kolbjørn Stuestøl
f98c9a851b Update Norwegian Nynorsk translation 2025-01-21 15:52:35 +00:00
Kolbjørn Stuestøl
a2a6bda810 Update Norwegian Nynorsk translation 2025-01-21 15:51:56 +00:00
Kolbjørn Stuestøl
adef456236 Update Norwegian Nynorsk translation 2025-01-21 15:48:15 +00:00
Jehan
6726372464 Issue #12729: copy-paste into a path is lost. 2025-01-21 15:15:07 +01:00
Jehan
9f204e7441 Issue #12772: fix annotations. 2025-01-21 15:04:34 +01:00
lillolollo
efdd0b76ef plug-ins: Remove unused variables in Gradient Flare 2025-01-21 01:51:19 -05:00
Jehan
2b8c4ff0de NEWS: update. 2025-01-20 22:45:30 +01:00
Jehan
18d88c207c app, libgimp, pdb, plug-ins: PDB (gimp-group-layer-new) made public. 2025-01-20 22:38:01 +01:00
Jehan
957d76fd14 app, libgimp, pdb, plug-ins: PDB (gimp-layer-copy) made public.
Not sure what I had in mind with the class method copy() in libgimp
GimpLayer. The core duplicate code already takes care of returning an
object of the right type. Also the GimpTextLayer implementation was not
a perfect copy (only text, font and font size were copied). Now it is
because, again, core has all the duplication code necessary.

Finally this makes this function visible to PDB, hence Script-Fu, again.
2025-01-20 22:38:01 +01:00
Jacob Boerema
92330f7b3c plug-ins, psd: Allow exporting of metadata, color profile and thumbnail
The PSD export dialog did not allow you to choose what metadata to
export, nor whether the color profile and thumbnail should be exported.
The metadata and thubmnail were not exported at all.

A recent commit changed this export dialog to GimpExportProcedureDialog,
which now allows us to easily add support for these types by
indicating we support these for psd, which is what this commit does.
2025-01-20 15:54:14 -05:00
Jacob Boerema
250932caa4 plug-ins, psd: fix two issues with debug output
When using GIMP_DEBUG=file-psd to have debug output in the terminal,
there are two issues:
1. When exporting there is a critical because nowadays we work on a
copy of the image, which doesn't have a filename attached to it, so
let's just remove this debug statement.
2. When loading the merged image, we do not load all layer resources,
since we don't need them. In this case it is expected that the layer
offset isn't at the end of the resources. We now skip writing this
debug statement in this specific case. The offset will be adjusted
in the lines below this.
2025-01-20 15:14:17 -05:00
Jehan
65635e8a0c app, libgimp, pdb: also get rid of gimp_text_layer_new() wrapper.
See previous commit.
2025-01-20 20:55:48 +01:00
Jehan
e125c30cfd Issue #12771: (gimp-layer-new) is missing.
The libgimp wrapper was just calling the PDB procedure. Get rid of the
wrapper and make the PDB proc public. Also reorder the name argument to
be in the second place, just like it was for the wrapper.
2025-01-20 20:55:48 +01:00
Jehan
305303330c app, libgimp, pdb: fix a null_ok/none_ok mixup.
We had 2 flags to indicate that a PDB argument could be nullable:
null_ok and none_ok. That was a huge mixup and the PDB generation code
was using sometimes one, sometimes the other. Let's settle for only
none_ok.

This fixes a bunch of annotations.
2025-01-20 20:55:48 +01:00
Alx Sa
d8df72869f core: Copy simulation settings when duplicating images
Among other issues, this bug impacted exporting images with CMYK
simulation profiles. Because the image was duplicated for export, we
lose the simulation profile information after
gimp_export_options_get_image () is called.
This patch ensures the profile, simulation intent, and simulation
black point compensation toggles are carried over to the new image.
2025-01-20 18:28:36 +00:00
Alx Sa
54c92db299 plug-ins: Use GimpExportProcedureDialog for PSD export
Previously we used GimpProcedureDialog,
rather than the specialized export dialog.
2025-01-20 17:29:06 +00:00
Jehan
6e3c60dd66 Issue #12760: make the metadata PDB arguments public. 2025-01-20 17:58:30 +01:00
Jehan
d511efb822 libgimp, plug-ins: rename the various "save-*" metadata arguments…
… per discussion with Liam on IRC.

I should have done this sooner, not in a RC, but it's better to do it
now, rather than after 3.0 is released!
2025-01-20 17:58:30 +01:00
Bruno
beecc7b723 gimp-data: Update to have proper Installer right-top icon size 2025-01-20 13:01:27 -03:00
Jehan
f17a42be75 plug-ins: add type check for the argument names in filter configuration too.
After the few specific args (drawable/filter ID, opacity, blend mode, op
name…), the op argument names can be passed either as string or with the
new argument name syntax. The error message though focus on argument
name type.

Also fix the argument count for the various possible cases (when
configuring with (gimp-drawable-filter-configure) or
(gimp-drawable-merge|append-new-filter), the start arg count is
different).
2025-01-20 15:28:15 +01:00
Jehan
6a85288723 NEWS: update. 2025-01-20 01:09:01 +01:00
Jehan
f92f7d425c plug-ins: new named argument syntax in Script-Fu.
This syntax is now the official syntax for non-core PDB procedures.

I.e. that while core procedures will still use ordered arguments (e.g.:
`(gimp-image-get-layers 1)`), plug-in PDB procedures called from
Script-Fu will have named arguments in any order.

Say for instance that you want to call python-fu-foggify from Script-Fu.
Whereas we used to run:

> (python-fu-foggify RUN-NONINTERACTIVE 1 (car (gimp-image-get-layers 1)) "Clouds" '(50 4 4) 1.0 50.0)

Now we should call:

> (python-fu-foggify #:image 1 #:drawables (car (gimp-image-get-layers 1)) #:opacity 50.0 #:color '(50 4 4))

Now we can note:

* Every argument is preceded by a #:label which is the argument name.
  This makes these calls much more readable (some plug-in procedures can
  have dozen of arguments and these end up as list of integers, floats
  and strings, which are hard to read and hard to debug) and semantic.
* Order doesn't matter anymore. For instance here, I put #:opacity
  before #:color.
* As a direct consequence, we can drop any argument which we wish to
  keep with default value. E.g. in the old style, we had to put the
  #:run-mode, #:name ("Clouds") and #:turbulence (1.0) because we were
  changing the last argument #:opacity (50.0). Now we can drop all 3
  default arguments.

Having non-ordered argument is in fact the starter of this feature,
because it is already the case for calling PDB procedures in the libgimp
API (and therefore in all GIR bindings). By saying that the order of PDB
procedures is not part of the API, we actually allow to add arguments
and even to reorder them in the future without breaking existing scripts
in the 3.0 series.

This became even more serious when I was considering to make the generic
metadata arguments public. Since they are appended to the end, after all
plug-in-specific arguments, if I do this, adding any argument in an
export plug-in would break order. It won't matter anymore!

Note that it doesn't matter for core PDB procedures (where this syntax
is not used) because these are also C functions and therefore order and
number of arguments matter anyway. Also these don't have dozens of
arguments.

As a helper for Script-Fu developer, in particular as we already
released 2 RCs and therefore some people already started to port their
scripts, the old syntax will still work yet will produce a warning
showing how to call the same thing with the new syntax. For instance,
with the above first call, the warning will be:

> (script-fu:2059912): scriptfu-WARNING **: 22:54:47.507: Calling Plug-In PDB procedures with arguments as an ordered list is deprecated.
> Please use named arguments: (python-fu-foggify #:run-mode 1 #:image 1 #:drawables (2) #:name "Clouds" #:color '(50 4 4) #:turbulence 1.000000 #:opacity 50.000000)

Note that the argument name syntax is coming from the Racket scheme
variant: https://docs.racket-lang.org/arguments/index.html

Common Lisp has a similar syntax, either with just a colon, or also a
sharp + colon (it's unclear to me the difference, something about
interned vs. uninterned symbols).
After discussion with Liam on IRC, we decided to go with the #: syntax
of Racket.
2025-01-20 00:01:23 +01:00
Jehan
751665a7bd app: gimp_pdb_query() in libgimp doesn't return private procedures anymore.
A main consequence of this is that the Procedure Browser plug-in in GIMP
doesn't show now private PDB procedures. I was always finding this
annoying as their presence in the procedure browser would encourage
people to use these in plug-ins and scripts (even when sometimes we
added explicit description that these should not be used).

Now it's clearer. The procedure are much more hidden to plug-in
developers (and if they still use them, it's at their own risk,
especially of having broken plug-ins when we change signature of these
as they are not meant to be used, and therefore we don't promise
stability for these).
2025-01-20 00:01:23 +01:00
Jehan
45af19e917 app, libgimp, pdb: adding concept of core and private PDB procedures.
Core procedures are all the procedures created for libgimp basically. In
opposition, procedures created by plug-ins are not core procedures.

GimpProcedure class in libgimp now has a gimp_procedure_is_core() which
will tell you if a procedure is core or not.

Private procedures already existed, except that they were only marked as
"private" in libgimp (e.g. _gimp_font_get_lookup_name()) starting with
an underscore and marked as G_GNUC_INTERNAL. Now we also store this
information in the procedure object itself for reuse.
2025-01-20 00:01:23 +01:00
Bruno
b53d88a6ac gimp-data: New Installer assets size 2025-01-19 16:58:40 -03:00
Alx Sa
2e69cbb980 core: Use basename rather than URI for file loading
Certain cloud providers return a blobname
rather than the actual filename with
g_file_get_uri (). Since our code only checks
the suffix and extension of non-native files,
we received "Unknown File Type" when
trying to load images from those providers.

This patch replaces g_file_get_uri () so that
we get the display-name instead, which
should always have the extension. This
may be changed in the future when we
switch to a FileChooser portal.

This same pattern is also used on the
GimpThumbBox so we see the display-name
rather than the blob name.

Thanks to Khalid Abu Shawarib for the
additional information!
2025-01-19 18:28:32 +00:00
Bruno
99fa22939a Issue #12424: properly disable gjs requirement at build time 2025-01-19 11:35:36 -03:00
Bruno
6b13a9fff2 build/linux: Fix dangling "gimp-console*" and "gimptool*" symlinks on Flatpak
Ported from: 323972fdf5
2025-01-17 16:20:00 -03:00
Alx Sa
0a94d27bef themes: Additional system theme leak fixes
While testing an AppImage, I noticed a thick border around the
"Show All Files" in the File Open dialogue. This is because the
background color for the actionbar is not defined, and if the internal
padding is increased by the system theme, it's visible. Therefore
we define the color.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Two pieces of code were problematic in this regard:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Followup to c3bd2d368a

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The "type" argument now uses strings.

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

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

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

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

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

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

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

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

Notes:

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

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

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

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

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

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

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

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

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

Notes:

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

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

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

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

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

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

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

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

Notes:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Following de556c0734

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

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

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

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

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

---

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

---

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

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

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

---

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

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

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

---

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Therefore the changes are:

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

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

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

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

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

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

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

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

> config.set_property('image', image)

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

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

Fixes warning:

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

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

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

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

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

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

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

> ld.lld: error: undefined symbol: pow

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

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

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

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

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

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

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

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

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

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

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

---

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Eventually GimpCoreObjectArray is meant to replace GimpObjectArray.

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

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

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

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

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

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

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

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

Symbols not used yet.

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

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

In preparation for defining another string constant.

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

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

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

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

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

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

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

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

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

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

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

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

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

SIOD dialect was used before GIMP 2.4 circa 2006.

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

Motivated by faults discovered in denoise filter for small images.

No faults detected by new tests.

ScriptFu: tests: enhance testing of gegl wrapper plugins

Add tests on other image modes.

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

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

After changes to ScriptFu handling of color.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

See the next commit for a proper fix.

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

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

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

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

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

As discussed in the issue, there are more issues:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Many tests of TinyScheme compliance to R5RS re numbers.

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

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

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

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

The plugins now use the new dialog, GimpProcedureDialog.

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

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

Misc bug fix to prior commits.

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

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

First demonstrable changes towards #12605.

Font map plugin is ported as a test case.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Enhance by naming the called PDB procedure

This helps script authors find the location of an error.

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

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

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

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

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

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

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

With this commit:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

TODO 10822 Lava plugin issue depends on this.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

---

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

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

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

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

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

---

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

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

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

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

Fixing:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Now it will say instead:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Move the goat plugins to the menu.

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

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

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

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

Fixes:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fixes:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

See also ASAN output below:

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

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

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

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

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

---

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

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

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

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

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

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

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

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

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

---

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

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

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

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

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

ASAN output:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Extract methods for cleanup, main_proc_cleanup and temp_proc_cleanup

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

Add a few tests.

(script-fu-use-v3) in more tests, code becomes more terse.

Added some aliases in script-fu-compat.c for renamed procedures, for compatibility third party.
2024-07-13 15:00:58 -04:00
Alan Mortensen
61f7812378 Update Danish translation 2024-07-13 13:01:23 +00:00
Luming Zh
7f72eafe4c Update Chinese (China) translation 2024-07-13 12:16:27 +00:00
Jehan
7ff0a35f72 libgimp: GimpPDB and GimpPlugIn use G_DECLARE_(DERIVABLE|FINAL)_TYPE. 2024-07-13 12:24:49 +02:00
Jehan
d08f751626 libgimp, libgimpwidgets: use G_DECLARE_(DERIVABLE|FINAL)_TYPE macros for GimpProcedureDialog…
… and its subclasses, as well as for GimpDialog.
2024-07-13 12:24:49 +02:00
Jehan
9feaf02596 libgimp: use G_DECLARE_(DERIVABLE|FINAL)_TYPE macros for all Gimp*Procedure.
Though I am not fond of these macros for our core code (it makes the
code more cumbersome especially for using private data in derivable
types), this definitely makes sense for public API, since it would allow
easier modifications with less chances of messing API/ABI stability.
2024-07-13 12:24:49 +02:00
Alan Mortensen
eb5a44d8a7 Update Danish translation 2024-07-13 10:01:25 +00:00
Alx Sa
2e6938b3da app: Rename app/core GimpVectors vectors API...
...to path.
Changes the names of
gimp_vectors_* () API to
gimp_path[s]_* (). Renames related files
to [path] instead of [vectors], along with
relevant enums and functions.
2024-07-13 05:07:57 +00:00
Luming Zh
2d8d5e1e81 Update Chinese (China) translation 2024-07-12 08:42:25 +00:00
Alx Sa
e8df68fb65 libgimp, app, pdb: Rename GimpVectors to GimpPath
This commit renames the GimpVectors
object to GimpPath in both app/core and
in libgimp. It also renames the files
to gimppath.[ch] and updates the relevant
build and translation files.
There are still outstanding gimp_vectors_* ()
functions on the app side that need to be renamed
in a subsequent commit.
2024-07-12 06:16:25 +00:00
Martin
813277ebe4 Update Slovenian translation 2024-07-11 22:13:26 +00:00
Jordi Mas
aacd5f379f Update Catalan translation 2024-07-11 21:07:33 +02:00
Yuri Chornoivan
73128f88af Update Ukrainian translation 2024-07-11 18:33:17 +00:00
Rodrigo Lledó
89bafa50a6 Update Spanish translation 2024-07-11 15:37:36 +00:00
Anders Jonsson
bcbbb8b159 po: update POTFILES.in 2024-07-11 16:35:15 +02:00
bootchk
24554d7fe2 app/plugin fix #11407 PLUGIN_DEBUG_WRAP=all
So a tester can valgrind all plugins.
2024-07-11 13:29:57 +00:00
Luming Zh
20de1e0560 Update Chinese (China) translation 2024-07-11 13:08:16 +00:00
Alx Sa
7fe398ca1a display: Fix regression accidentally introduced 2024-07-11 01:38:13 +00:00
Alx Sa
d1af2efa95 vectors: Swap code files also 2024-07-11 01:17:49 +00:00
Alx Sa
5cd7c5c2f8 actions: Swapped text actions 2024-07-11 01:17:49 +00:00
Alx Sa
853f37bed9 app: Rename app/core GimpImage vectors API...
...to paths.
Similar to d0bdbdfd, but covering the
app/core versions of the API instead of
libgimp. Changes the names of
gimp_image_*_vectors () API to
gimp_image_*_path[s] ().
Also renames some related functions such
as gimp_image_pick_path (). The next step
will be to rename the gimp_vectors_* () to
gimp_path_* ().
2024-07-11 01:17:49 +00:00
Alx Sa
c1bd108bba widgets: Connect Configure this tab icon to icon size changes
Inspired by Mark Sweeney's work.
GimpDockbook's dockable tabs update whenever the icon size is
changed. However, the Configure this tab button icon does not,
so it always remains at 12px. This patch adds code to resize it to 75%
of the current tab icon's size, which mirrors the default relationship
of 12px to 16px. This allows the icon to grow when the icon size is
set to Large or Huge.
2024-07-10 10:03:32 +00:00
Bruno
9d86492b14 build: Make scripts numbering and storing consistent
The numbering is now inline with actual the order of jobs on CI
to make easier to understand what the numbers represent.
To understand why bundling is number 2 see: d09a2a6f and 2dc6f411

The storing of Windows scripts was changed to make easier to
call them, to better convey that they work outside CI and
to be consistent with other build/ subdirectories.
2024-07-10 00:04:03 +00:00
bootchk
0dae61772a Fix #11613 crash Wayland flatpak unreffing GBytes window handle
Refactor: extract method gimp_widget_free_native_handle.
This reduces duplication of code and encapsulates Wayland specific code.

Call the new function in more places.
This is expected to fix #11613 but it is hard to be sure
since the exact sequence of events in 11613 was never determined
and only reproduceable in some flatpak builds.

Calling the new function in more places also should eliminate leaks.
But I did not test there was a leak prior to this fix.
2024-07-09 17:48:53 +00:00
bootchk
bdddc94151 libgimpwidgets: fix #11339 chroma slider fail on small increments
In GimpColorSelector setter, don't change the model if perceptually same.
More than just don't emit changed, don't change the model value.

Also, fix leak by freeing old color.
2024-07-09 15:56:07 +00:00
bootchk
5cc187b597 Fix #9851 radio menu groups fail show any active item
End the radio group of a submenu when the submenu ends.
So subsequent radio menu items are in a new radio group.
2024-07-09 15:42:50 +00:00
Lukas Oberhuber
2341259f36 os-support: Remove mention of 2.10 2024-07-09 15:24:54 +00:00
Lukas Oberhuber
15f5adae0b os-support: Update MacOS supported platforms for GIMP 3.0 2024-07-09 14:57:57 +00:00
Bruno
d3ccac8d2f build/windows: Bundle 'share/poppler' again following 25701f6c 2024-07-09 14:36:14 +00:00
Alx Sa
b90b6bce00 pdb, libgimp: Rename libgimp GimpVectors vectors API...
...to paths
Follow-up to d0bdbdfd. Changes all
gimp_vectors_* () PDB to gimp_path_* ()
and renames relevant PDB files from
vectors to path.
The next step will be to rename
GimpVectors in libgimp to GimpPath,
removing the last (public) trace of it.
2024-07-08 23:39:51 +00:00
Jordi Mas
cdde11b19d Update Catalan translation 2024-07-08 17:19:31 +02:00
Alx Sa
00d07e028f libgimp: Fix gimp.def order 2024-07-08 02:22:57 +00:00
Alx Sa
d0bdbdfdf6 pdb, libgimp: Rename libgimp GimpImage vectors API...
...to paths

The first step in converting GimpVectors
to GimpPath. The PDB API for any
gimp_image_*_vectors () is now
gimp_image_*_paths ().
This commit only covers libgimp, and
the app/core versions will be renamed in
a following commit.
2024-07-08 02:09:42 +00:00
Bruno
40ecfd40ad Issue #11455: Split flatpak jobs
- Dependencies not present in GNOME runtime are now built in deps stage
  This makes easier to follow the progress of the overall pipeline and
  to know how much time was spent on each stage
  (like crossbuilds, the artifact size is brutal but only lasts 2 hours)

- babl and GEGL build now have output in GitLab runner, unlike others deps
  This makes clearer to spot if something goes wrong in these crucial deps

- GIMP is still built in its stage but now alone, like Debian and Windows
  This makes possible to retrigger only this job when runner errors occours,
  without needing to start monolithically the deps+gimp build from scratch

Also:

- babl, GEGL and GIMP now have meson-log.txt artifact like other builds

- dist job now have all commands self-contained on its script (needs to
  be merged to be tested according to my tests)
2024-07-07 21:46:52 +00:00
Jehan
dac11f11aa libgimp: add G_GNUC_WARN_UNUSED_RESULT to several functions.
Functions creating a new GeglBuffer should trigger a warning if the
result if unused, because this is potentially a big memory leak.

Similarly objects created by functions creating new layers should be
handled (usually by adding the layer to the image with
gimp_image_insert_layer()), because they also come with a buffer and
possibly quite some important memory leak.
2024-07-07 22:39:13 +02:00
Jehan
ebc4f9afab app, libgimp: initialize GimpGroupLayer.
If the type is not registered, g_type_from_name() is not able to find
the GType from the type name.

Fixes:

> gimp_gp_param_to_value: type name GimpGroupLayer is not registered

Also add a bit more type handling code.
2024-07-07 22:27:22 +02:00
Alx Sa
d10a8c357f plug-ins: Allow Python GUI resources to be empty
Resolves #11772
While ba79fd00 fixed the number of
arguments in the resource arguments,
setting them to False prevented the GUI
from opening if the gradient wasn't set.
This patch switches the value to True to
fix the problem.
2024-07-07 19:19:16 +00:00
Alx Sa
86ef74ae95 plug-ins, tests: Update Python plug-ins after b1736a67
Two instances of Gimp.Layer.group_new ()
were missed during the initial port.
2024-07-07 12:37:33 +00:00
Alx Sa
ba79fd00d3 plug-ins: Update Python plug-ins after 6d36d143
A new parameter was added to indicate if
it was okay to run without setting these
resource values.
2024-07-07 12:05:54 +00:00
Alx Sa
8e6fb3d0e4 pdb: Remove uchar type
Resolves #10855
Replaces the uchar arguments in
plug_in_exchange () with floats to better
match gegl:color-exchange's arguments.
Since this was the last plug-in that used
uchar, we also remove the datatype from
PDB.
2024-07-07 11:14:41 +00:00
Alexander Shopov
d213235d37 Update Bulgarian translation 2024-07-07 09:00:14 +00:00
Alexander Shopov
d69e8abfa6 Update Bulgarian translation 2024-07-07 08:54:55 +00:00
Jehan
fc3cfc7771 app, libgimp: oups, fixing some generated sources.
These were some last minute fixes in the PDB and it looks like I forgot
to amend commit b1736a6736 with these!
2024-07-07 10:43:51 +02:00
Jehan
87d89ba062 libgimp: some object's header cleanup.
Using G_DECLARE_*() macros everywhere, aligning functions, including the
parent class header…
2024-07-07 10:27:04 +02:00
Jehan
b1736a6736 app, libgimp, pdb, plug-ins: new GimpGroupLayer class in libgimp.
Also:

- renaming gimp_layer_group_new() to gimp_group_layer_new() in order to keep the
  same name as in core code (i.e. GimpGroupLayer, not GimpLayerGroup).
- renaming gimp_image_merge_layer_group() to gimp_group_layer_merge()
- new functions: gimp_procedure_add_group_layer_argument(),
  gimp_procedure_add_group_layer_aux_argument() and
  gimp_procedure_add_group_layer_return_value().

This can be tested, e.g. in Python with these calls:

```py
i = Gimp.get_images()[0]
g = Gimp.GroupLayer.new(i, "hello")
i.insert_layer(g, None, 1)
g2 = Gimp.GroupLayer.new(i, "world")
i.insert_layer(g2, g, 1)
g.merge()
```

This was work started long ago, stored in an old stash which I finally
finish now! :-)
2024-07-07 10:27:04 +02:00
Bruno
98d3956fef build/linux: Fix flatpak ignoring fork source code
See: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1670#note_2152565

This makes the NIGHTLY flatpak use the local GIMP source. This reduces the
internet usage and makes possible to generate .flatpak from every branch out
there, which turns the flatpak finally really useful to code development.

Of course, this makes impossible to run 'flatpak-builder NIGHTLY_manifest.json'
without cloning or downloading GIMP code, but this is not a regression since:

1) the NIGHTLY manifest is in-source to begin with, so same thing as our other
   building methods (except macOS), which runs over the code they are stored

2) the chances of someone downloading partial source code (the NIGHTLY manifest
   alone) so being unable to build are low since this file isn't too easy to find

3) even if someone do this and don't like, we are not violating flatpak building
   pratices since this option exists to be used (and will be in NIGHTLY only)
2024-07-06 13:08:47 -03:00
Jehan
703305d270 libgimp, gimp-data: now skipping the _list_ array functions.
In most bindings, they would just result in the same signature as the
_get_ variants (which people have been used to, since the GIMP 2
series). Also I was told that apparently in some bindings where this
would make a different signature, the (skip) annotation could be ignored
anyway.
2024-07-06 14:51:23 +02:00
Jehan
8b6d90700a libgimp, pdb, plug-ins: don't skip gimp_*get_*() API from GObject Introspection anymore.
The original reason to skip these was because the new _list_ API were
introspected basically to a similar function signature, except with a
useless return value, at least in pygobject binding where the list size
was also returned.
Though it seems that in fact, only the docstring was wrong. The real
signature was apparently already the same.
See: https://gitlab.gnome.org/GNOME/pygobject/-/issues/352

Therefore since the _get_ naming is more consistent compared to other
existing function, let's re-integrate the _get_ functions for array of
items or images.

This basically reverts commit 15ec254148.
2024-07-06 14:44:45 +02:00
Jehan
38946716f2 NEWS: update. 2024-07-06 14:44:45 +02:00
Jehan
ac030a0cd7 libgimp, plug-ins: make generic gimp_procedure_add_argument() private.
Same for gimp_procedure_add_aux_argument() and gimp_procedure_add_return_value().

We now have specific public functions for every supported type and it's
in fact much better to use them. The generic functions gave the feeling
that we could use any GParamSpec as procedure argument, whereas we in
fact depend on what the PDB support, and only these subtypes.
2024-07-06 14:44:45 +02:00
Jehan
6d36d143e8 libgimp, plug-ins: fix gimp_procedure_add_*_argument() where * is a resource type.
The correspondant param specs' fourth arg was a `none_ok` boolean, not a
type. Carry over this argument to the gimp_procedure_add_*() function.
2024-07-06 14:44:45 +02:00
Bruno
26645ab404 build/linux: Temporarily drop 'aalib'
It's failing badly even with the gcc trick.
I hope re-adding it soon with the MSYS2 patches.
2024-07-06 11:19:41 +00:00
Bruno
ad7ef08ea0 build/linux: Antecipate some Clang changes to properly work on aarch64
Despite we not building gimp nightly on aarch64 we need to sync with beta.

So, this updates to LLVM/Clang 18, which fixes 'gexiv2' and 'poppler'
problems with deps on that arch. 'json-c' and 'luajit'  were adjusted too
with the use of proper build options to fix errors.
2024-07-06 11:19:41 +00:00
Bruno
78c85f6f45 build/linux: Sync poppler, ghostscript and openblas with beta manifest 2024-07-06 11:19:41 +00:00
Alx Sa
ea63e99ab8 widgets: Cast GimpColorDialog to GtkWidget...
...when passing it in gimp_color_dialog_style_updated ().
This fixes a compiler error introduced in c5efa0b8 on
some Windows builds.
2024-07-05 11:43:40 +00:00
Fran Dieguez
a5c91110b4 Update Galician translation 2024-07-05 10:37:04 +00:00
Jehan
caffd09b5b libgimp, plug-ins: getting rid of gimp_procedure_add_*_from_property() functions.
These were created because of some limitation/bug in pygobject, which is
now much better worked around by having specific functions for every
argument type supported by the PDB.
2024-07-04 22:11:53 +02:00
Jehan
25701f6c1b Issue #11760: explain why poppler-data is a hard dependency. 2024-07-04 21:50:11 +02:00
cheesequake
8ebe9b090d core: Fix layer regeneration after crop undo
Resolves #10523
As we loop through every layer, we enable resizing
of the drawable on undo.
2024-07-03 11:26:55 +00:00
Luming Zh
8d3d408b14 Update Chinese (China) translation 2024-07-02 11:09:04 +00:00
Alx Sa
b3b32c7765 widgets: Disconnect gimp_color_editor_display_changed...
...when dockable is closed.
Resolves #11748

gimp_color_editor_display_changed () was still connected to
the user context when the Color dockable was closed. This
resulted in either a critical or crash if a new Color dockable
was opened or if the GIMP was closed. This patch should
cause the signal to be disconnected automatically when
the editor is destroyed.
2024-06-30 04:14:48 +00:00
Alx Sa
c5efa0b874 gui, widgets: Connect GimpColorNotebook to icon size changes
Inspired by Mark Sweeney's work.
GimpColorNotebook has existing code to
update the color selector tab icon sizes
via CSS. However, it was not set up to be
notified of icon size changes from the GUI.
Since GimpColorNotebook is in libgimpwidgets,
we call its style_updated () function from
the style_updated () functions of the two
widgets its created in - GimpColorEditor
and GimpColorDialog.
2024-06-29 20:10:26 +00:00
dimspingos
c31faab2c0 Updated Greek translation 2024-06-29 13:23:26 +03:00
Luming Zh
0a8bf6857d Update Chinese (China) translation 2024-06-29 00:09:41 +00:00
Joachim Priesner
35deb1eb30 dialogs: Don't escape underscores in Welcome Dialog recent files list
It seems unnecessary – at least on my system, files with underscores in
their names are shown with two underscores in the recent files list.
This patch fixes that.
2024-06-28 20:50:21 +00:00
Alexander Shopov
92b8670c21 Update Bulgarian translation 2024-06-28 05:15:59 +00:00
Anders Jonsson
7f9e819b50 Export histogram: fix blank lines on Windows
For the Python 3 case in issue #6096 following the
instructions of zjw and the Python 3 manual.
2024-06-27 21:21:30 +00:00
Alx Sa
87eadbf5d1 dialogs: Fix theme selection on reset
The Preference settings for themes and icon themes
are not directly connected to the property due to
the possibility of custom themes. Instead, we create
GtkListBoxes and load all the theme values. As a result,
when the preferences are reset, the row selection is not
updated.

This patch adds signals to the config object that update
the listbox selections when the Reset button is clicked.
The handler IDs are stored in the dialogue so that we
can remove them when the dialogue is closed.
2024-06-27 14:14:15 +00:00
Alx Sa
2bd598bcfd plug-ins: Fix crash in Export Histogram on file save
Resolves #11742
gimp_procedure_dialog_get_file_chooser () does not
work with GtkFileChooserAction.SAVE enums yet.
This was incorrectly left in by f5b7f734.
This patch removes the command to fix a crash.
2024-06-27 11:14:12 +00:00
Jacob Boerema
0c3bf56d83 app: fix help id for layer-lock-visibility is not set 2024-06-26 15:16:45 -04:00
Daniel
82fa7dccc1 Updated Spanish translation 2024-06-26 14:03:14 +02:00
Bruno
e59dec503e build/windows: Include only the bare minimum files to run TWAIN
As decided in #10922, 32-bit will be tolerated in 3.0 series because of TWAIN.
So, let's package only the bare minimum files to the 32-bit TWAIN plug-in work.

This reduces the final installation size by approximately 215MB.
2024-06-25 14:52:14 -03:00
Luming Zh
8a927753d9 Update Chinese (China) translation 2024-06-25 12:27:49 +00:00
Luming Zh
314e03a5ce Update Chinese (China) translation 2024-06-25 12:20:16 +00:00
Yuri Chornoivan
5af2599500 Update Ukrainian translation 2024-06-25 11:25:40 +00:00
Bruno
adda94e4d2 build/windows: Mimic 'AppVerName' against Inno pervasive behavior
It's a common pratice to tell the user what version is being installed
even if this is somewhat obvious (the user opened the installer, he
should know it). Many installers do this and Win MSIX installer too.

However, there is no sign in our Installer about what version is
being installed (the reused splash/intro image doesn't count because
it isn't always different at each micro or revision, and text is small).

---

To accomplish that feature, the Inno langs needed to be patched since
Inno actually forbidden to use that feature when we have a Welcome page.
https://groups.google.com/g/innosetup/c/w0sebw5YAeg

But 'UninstallAppFullTitle' from the following langs couldn't be patched:
- Japanese
- Lativian
2024-06-24 19:56:46 +00:00
Jacob Boerema
1e0be3d063 app: fix CI build failure core-enums.c is generated from core-enums.h
I only updated the mask strings to plural in core-enums.c, overlooking
that it is generated from core-enums.h.
So, update the same strings there after "desc".
2024-06-24 19:25:25 +00:00
Bruno
2450b93062 meson, build/linux: Fix 'sed' hell in Flatpak build
Thanks @Jehan for noticing the right fix, way better than !1281
and subsequent tortuous workarounds.
2024-06-24 17:39:46 +00:00
Bruno
e5b6dab298 build/windows: Merge '(INFO): moving DWARF...' with '(INFO): extracting...'
This makes easier to understand to where the .debug files are being moved.
2024-06-24 12:21:18 +00:00
Rodrigo Lledó
bf457a9fc8 Update Spanish translation 2024-06-24 12:09:37 +00:00
Rodrigo Lledó
75f42834f7 Update Spanish translation 2024-06-24 11:22:27 +00:00
Martin
bd1f0e4c36 Update Slovenian translation 2024-06-24 07:07:53 +00:00
Ekaterine Papava
4970f72044 Update Georgian translation 2024-06-24 03:37:25 +00:00
Bruno
51b2f2b037 build/windows: Silence 'glib-compile-schemas' in Crossroad Deps script
Wine always outputs an ugly warning, even the command running fine.
Some first-time contributors got confused about this on IRC.
2024-06-24 00:01:08 +00:00
Bruno
00e11df317 build/windows: Debloat 'share/locale' bundling
Only iso_639.mo is needed. This also reduces the bundle and installs in 15MB.
2024-06-23 23:38:49 +00:00
Ekaterine Papava
d46f15f253 Update Georgian translation 2024-06-23 23:24:07 +00:00
Jacob Boerema
51b444b846 app, actions: be consistent and use plural for layer moving ...
commands that work on multiple layers:
Raise Layer -> Raise Layers
Layer to Top -> Layers to Top
Lower Layer -> Lower Layers
Layer to Bottom -> Layers to Bottom
Also update the hint strings.
2024-06-23 19:05:01 -04:00
Martin
d875f09b51 Update Slovenian translation 2024-06-23 21:11:58 +00:00
Rodrigo Lledó
e928bc96c2 Update Spanish translation 2024-06-23 20:44:33 +00:00
Bruno
56269a68f6 build/windows: Add custom icon to the Installer setup
There are two approaches regarding the icon for Windows installers .exe:
1) same icon as the app: this give more identity, but creates confusion if
   you saved the installer in the same dir of the installed app shortcut.
   This approach is also confusing in the task bar (e.g.: running GIMP
   stable while installing GIMP unstable);
2) generic icon (e.g. a box, a cd) provided by the tool: more generic if
   you downloaded two installers generated by the same tool (ours is Inno)

I choose a middle ground and created a icon with: the app icon and an
"installer" symbol (a package box), which conveys the best of two words.

This also fixes the Inno inborn bug of the unninstaller with install icon.
2024-06-23 20:30:36 +00:00
Yuri Chornoivan
bc2917b1f3 Update Ukrainian translation 2024-06-23 18:57:03 +00:00
Jacob Boerema
5f41b4460c app, actions: be consistent and call Duplicate Layer -> Duplicate Layers
Since it works on multiple selected layers use the plural like we
also do in other similar cases.
2024-06-23 14:09:06 -04:00
Yuri Chornoivan
680d84292b Update Ukrainian translation 2024-06-23 17:24:29 +00:00
Alx Sa
9c46d0a689 libgimp: Use RGB/A u8 format for indexed color params
Resolves #11018.
Currently, babl formats are saved as strings when
passed as params. However, indexed palettes do not
use a "standard" encoding string but are created from
palettes (with a custom format). This results in an
error when we attempt to recreate the babl format from
the custom string encoding, as it doesn't exist at that
point.

This patch mitigates the problem by converting the indexed
color to RGB/A 8-bit when used in params. In the future when
indexed mode supports different color spaces and higher
precision, we will need to remove the hard coding. For now,
it solves the immediate problem.
2024-06-23 16:09:38 +00:00
Bruno
16dc7b4047 build/windows: Debloat 'lib/python3.11' bundling
After running almost all the py plug-ins, I noticed that few py modules and
pkgs are used to justify the need of a slightly faster build time with .pyc.
In the actual bloated status (with all .pyc), lib/python* is about 260 MB big.
With the bare minimum .pyc after the tests above, python*/ is less than 90.

So, let's purge the .pyc at bundling time (I'm not reinventing the wheel,
Krita do this too), which reduces the .zip bundles (so the Inno and MSIX
installs) in 170MB, the Installer .exe in 45MB and MSIX download in 60MB.

---

Let's also disable any .pyc generation, since GIMP installed with Inno in the
system-wide (aka admin) mode or installed with MSIX both doesn't handle well:
py plug-ins work but have CLI errors, unlike Inno user-mode and .zip bundle.
2024-06-23 14:09:22 +00:00
Martin
47edc69c6d Update Slovenian translation 2024-06-23 13:12:49 +00:00
Bruno
8a2ce9d16f build/windows: Make Installer's Language dialog automatic
Actually, the Language dialog is always displayed, which is not too good since:

1) This is inconsistent: the install mode dialog (to choose user or system)
   appears before using the system lang automatically. Even if Inno fix this:

2) This is tiring: depending on the context, the user can see up to 5 dialogs:
   SmartScreen (1) > Install mode (2) > installer lang (3) > dev warning (4)
   > SetupMutex (5): https://groups.google.com/g/innosetup/c/bkRtnHz2ygg

3) This is redundant: even if only 2 and 3 are displayed, why 2? Inno will
   auto select the sys lang, which the user understand to search GIMP for PC;

4) This is confusing: even the lang dialog message being clear, some users
   genuinely conclude that the selection will carry over to GIMP install like
   the old Adobe CS installer (#5515). !1628 makes more clear that not, but
   reducing confusion even more is a welcome plus considering points above.

So, let's use 'ShowLanguageDialog=auto'. That option ensures that the dialog
will NOT appear if the sys lang have a translation present in the installer,
which matches what every program does and even installers like Inkscape one.

If the lang isn't included in the installer, the dialog WILL appear so the
user can choose one which he is more fluent, being is a nice middle ground.
2024-06-22 21:53:25 +00:00
Jacob Boerema
6dbf144f6b app: add missing help ids for the text tool 2024-06-22 16:47:44 -04:00
Jacob Boerema
9c432f6505 app, actions: use consistent naming for Text to Path
In the main menu and layers dialog context menu it is called
`Text to Path`, let's use that same name in the text tool actions
instead of `Path from Text`.
2024-06-22 16:11:57 -04:00
Bruno
dfceba448f build/windows: Fix Inno wrong components size calc (part 1)
This solves an old bug that makes Inno report GIMP as being almost 1.8GB,
which is not true (it's 1.3GB at most). That was probably caused by the
overuse of components intersections (e.g.: gs + gimp, py + deps), which
Inno does not handle well (sometimes it not even displayed the cmp size).

TWAIN component is still reporting a wrong size since it's a totally
different beast, it will be fixed later.
2024-06-22 18:52:20 +00:00
Bruno
9b29cc35be build/windows: Reduce redundancy on [Files] flags 2024-06-22 18:52:20 +00:00
Jacob Boerema
a3ecca3487 app: fix some layer mask strings
Not all layer mask menu commands and help texts were updated to reflect
that they work on multiple masks.
Updates
- Apply Layer Mask -> Apply Layer Masks
- Delete Layer Mask -> Delete Layer Masks
- Their text hints and the one for Disable Layer Masks

Updates the undo strings, even though these don't seem to be used
anymore? Looks like undo always picks the menu command now.
2024-06-22 14:20:02 -04:00
Alx Sa
3842efd524 libgimpcolor: Remove GimpCMYK code
Part of the color space invasion API
updates. CMYK conversion should be
done through babl/GEGL now.
2024-06-21 16:00:18 +00:00
Bruno
04a9771c9c gitlab: Comment 'Contribution guidelines' in MR template
This is inline with our pratice in issue templates and it is welcome because
contributors who are subscribed to MRs can be annoyed by generic descs.
2024-06-21 15:06:29 +00:00
Bruno
d071d01666 Revert "build/linux: Drop 'cfitsio' for now due to security concerns"
This reverts commit d64cbf1993.

By the way, change to a more trustful source repo in the hope of working.
2024-06-21 14:20:39 +00:00
Alx Sa
26fe9713e1 modules: Remove last usage of GimpCMYK
It had actually been made unnecessary by 1c81c426.
This will allow for the full removal of GimpCMYK from
the codebase as part of the color space invasion.
2024-06-21 12:44:08 +00:00
Rodrigo Lledó
5f9e939e09 Update Spanish translation 2024-06-21 12:43:09 +00:00
Alx Sa
fcdddad2a7 core: Include NDE filters when opening as layers
Adds code to copy any NDE filters when
importing an .xcf file as layers in an
existing project.
This also requires removing the check
for the layer being attached to an image,
which historically made sense because
filter effects were immediately merged
down. Now that filters can exist separately
the check is no longer required.
2024-06-20 19:06:57 +00:00
Bruno
ebeef5d7ef build/linux: Move HEIC support to an extension
Ported from downstream (with proper adaptations):
3d7f13ff3c
2024-06-20 14:33:47 -03:00
Bruno
744abbbd6b build: Respect contributor's own GIMP_PREFIX
This makes the scripts less pervasive locally.
2024-06-20 16:20:11 +00:00
Yuri Chornoivan
990f9b7871 Update Ukrainian translation 2024-06-20 15:37:34 +00:00
Alx Sa
134100fb8a app/tools: Allow locked layers to be used as sources
GimpSourceTools like Clone and Heal use GimpPaintTool's
code for determining if they can work on a pixel-locked
layer. This means that they can not set a locked layer as a
source even though that would not affect the locked layer's
pixels.
This patch adds an additional condition to GimpPaintTool, to
allow operations if the tool is a GimpSourceTool AND only
Ctrl is held down. This allows the layer to be set as a source
while preventing it from being drawn on.
2024-06-20 13:13:47 +00:00
Nils Philippsen
05b470eba7 Fix gobject introspection references
Newer gi-docgen will fail otherwise.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-06-20 12:14:23 +00:00
Bruno
3ea2fd4e19 build/windows: Avoid bloated .mo in Crossbuild bundling
Since CROSSROAD_PREFIX have system and GIMP_PREFIX mixed, we shouldn't
rely on that folder to list the supported langs. Let's do it more smartly.
2024-06-20 12:10:02 +00:00
Bruno
5e500aeb78 Issue #11714: Temporary fix failing Flatpak builds 2024-06-20 08:03:22 -03:00
Jacob Boerema
d190c37a2c app: add missing help-id for layer effects
Note that this isn't enough for F1 to work, but that is a separate
issue.
I think that for now one help-id for all the layer effects is enough,
until we get a more final UI.
2024-06-19 13:42:49 -04:00
Bruno
d83c254ce1 meson: Clarify Lua state on Windows
lua-lgi now works with Lua 5.3 on Windows:
https://github.com/msys2/MINGW-packages/issues/21171

According to my tests, after installing lua53-lgi MSYS2 package,
lua5.3.exe tries to run the goat exercise (fails since the goat
uses different lua API). Anyway, lua5.1 isn't required per se.
2024-06-19 10:17:51 -03:00
Bruno
46698e25d5 build/windows: Clarify Installer optional params 2024-06-19 13:03:03 +00:00
Bruno
5c3620cbe7 build/windows: Move *associations.isi and *configoverride.isi to main .iss
Following c6634d66 and 09d6402a

These files are too small and aren't reused so no point keeping them modular.
Also, with them inside .iss we reduce the clutter in the installer/ folder.
2024-06-19 13:03:03 +00:00
Luming Zh
6762874412 Update Chinese (China) translation 2024-06-19 11:34:14 +00:00
Ekaterine Papava
49af594a69 Update Georgian translation 2024-06-19 03:52:23 +00:00
Bruno
3ee8c4e9a5 build/windows: Debloat 'share/glib-2.0' bundling
According to my tests, seems that only 'gschemas.compiled' is needed
2024-06-18 22:52:54 -03:00
Bruno
18187926cd build/windows: Bundle 'share/lua' again on Windows
Despite that folder mysteriously not being mandatory on Linux
(the contents are different), on Windows (in PCs without MSYS2)
this is required by a warning. So, partially reverts c808d13b
2024-06-18 22:52:38 -03:00
Bruno
a1cb43d977 build/linux: Add way to locally emulate flatpak CI building
This is useful to debugging only
2024-06-19 01:02:58 +00:00
Martin
f23b0744d7 Update Slovenian translation 2024-06-18 21:38:53 +00:00
Bruno
c7f7c5d147 build/windows: Direct Installer users to the specific updates page
The gimp.org main page was being used as the updates URL but the
downloads page is more direct, avoiding confusion with news or with
the stable big red button (remember: we also have dev installers).
2024-06-18 16:57:03 -03:00
Alx Sa
0ace660248 plug-ins: Fix crash with OpenEXR chroma images
The OpenEXR plugin was specifically set
to throw an exception if a chroma image
(Y/BY/RY) image was loaded.
This patch removes the exception and loads
the luminance channel only as a grayscale image,
which is how Krita currently handles it.
Future work is needed to properly convert the
chroma channels to import as a RGB(A) image.
2024-06-18 19:42:59 +00:00
Bruno
bb9716d609 build/linux: Enable colorful output under 'flatpak-builder'
Following 0f425554

Ninja and Cmake (which some modules use) supports colorful output.
To enable it, we need to set in the manifest due to the sandboxing.

See also: https://github.com/flatpak/flatpak-builder/issues/605
2024-06-18 16:09:05 -03:00
Bruno
d64cbf1993 build/linux: Drop 'cfitsio' for now due to security concerns
Temporarily drops 'cfitsio' which started weeks ago to change its hash.
In my tests, after "fixing" the hash, sometimes it alternates to another,
which breaks the build again. This is too hard to maintain and unsafe(?).
2024-06-18 14:58:07 -03:00
Bruno Lopes
3a54c37daa gitlab-ci, build/linux: Move Flatpak CI code to scripts that works
This will make easier to debug problems locally if needed and
have the potential to reduce the first barrier for Linux newbies.
2024-06-18 14:57:39 -03:00
Anders Jonsson
36f6b476f0 python: don't translate test plug-in
Following the note of 'no i18n' in the header
2024-06-18 11:13:06 +00:00
Rodrigo Lledó
1e48badea2 Update Spanish translation 2024-06-18 11:08:23 +00:00
Rodrigo Lledó
4deb132243 Update Spanish translation 2024-06-18 10:58:44 +00:00
Alx Sa
dc0449b05e widgets: Fix label background on Curves tool
Resolves #11702
In 2.10, the x/y label background on the Curves tool used
GtkStateType enums to get the widget's background color.
These enums were depreciated in GTK3, and during the
port the gdk_cairo_set_source_rgba() command was left
out. This resulted in the current line color being used instead,
making it hard to read the label in some instances.

This patch restores the Cairo color update command, using
the gridline color as an equivalent to the background color
from 2.10.
2024-06-17 13:05:38 +00:00
Alx Sa
9256a15363 widgets: Prevent image name from affecting the dialogue width
Resolves #7588
After the port to GTK3, the Filter dialogue's width started
to be affected the length of the image name. If the name
was very long, the filter dialogue would expand to fit it.

This patch encloses the image title label in a GtkScrolledWindow
with polices of EXTERNAL width and NEVER height. This ensures
there will not be a scrollbar, and the label will not influence the
width of the dialogue. A tooltip was added in case the user wants
to hover to see the full name.
2024-06-16 16:12:16 +00:00
Bruno
de556c0734 build/windows: Move Installer (fully) to Win32 Vista design
Following e93e0f49

This defaults 'Segoe UI' for Installer texts and for license's body. This
font is still used as the default in Windows 11 and even in online docs.

We are also bumping to 9 pt as outlined in the final Win32 guidelines:
https://learn.microsoft.com/en-us/windows/win32/uxguide/vis-fonts
I've done microscopic pixel checks and confirmed that this produces a Win32
compliant design, which renders kerning and spacing equal as 'Win + R' and
UWP Notepad (please note that some "legacier" Win32 apps renders different)

---

Also, change from Lucida Console to 'Consolas' (default console font since
at least Win8). Today it is Cascadia Mono but not included with Win 10.
2024-06-16 08:17:20 -03:00
Rodrigo Lledó
5da85f6a31 Update Spanish translation 2024-06-16 01:20:29 +00:00
Bruno
8315967735 build/windows: Little fix after b38d0455 2024-06-15 15:40:45 +00:00
cheesequake
fb4cd9aedc core: Fix drawable filter duplication
Resolves #11690
While exporting, the image is duplicated, in turn,
filters are also duplicated. This patch fixes the
duplication by also copying the parent
GimpFilter's properties.
2024-06-15 13:58:33 +00:00
Bruno
b38d0455c3 build/windows: Make clear crossbuild awful situation
Some contributors got confused about how to crossbuild on IRC. Let's help them.
2024-06-15 08:47:18 -03:00
Bruno
0397132184 gitlab-ci: Restore 'meson-log.txt' as artifact
Restores the build log artifact which was lost partly due to my fault.
The log is very useful in the rare cases of breaking the build system.
So, following our experience, let's save it for, at minimum:
- Native Linux
- Native Linux flatpak: will be adressed later in another commit
- Cross Win
- Native Win (aarch64)
2024-06-15 07:27:31 -03:00
Bruno
0f42555484 gitlab-ci, meson: Enable colored Clang output
This makes easier to spot warnings.
2024-06-15 00:34:54 +00:00
Bruno
fa26f20e9f gitlab-ci: Disable CI scripts 'debug mode'
If we were in the first days of our CI (so script bugs are common),
the scripts "debug mode" (bash -x) would be crucial, but we are not.

To be fair, running scripts in "debug mode" is pretty harmful today:
1) the produced logs consume our quota more and more (e.x.: adding a
   bit more complicated .sh function can double the output size); and
2) the long white logs tends to be specially hard to read by the way.
2024-06-15 00:34:54 +00:00
Bruno
c808d13b6e build/windows: Debloat a bit Windows bundling
This makes the output more complete but at the same time less
polluted regarding the bundling scripts (base, deps and sym).

---

Also, packaging scripts (inno and msix) were touched as consequence
of experiments about drop bundling, for saving space (~20MB), of:
- etc/gtk (MSYS2 don't build immodules)

- share/ghostscript (macOS .dmg don't package it)
- share/libthai (macOS .dmg don't package it)
- share/locale (???, decided to kept only gtk and iso-codes to test)
- share/man (installer don't package it, maybe because Windows can't open)
- share/poppler (macOS .dmg don't package it)

- bin/bzip2.exe (???)
- bin/gdk-pixbuf-query-loaders.exe (loaders.cache already bundled)
- bin/gspawn*.exe. (???)

- share/gir-1.0 (installer don't package it)
- share/lua (???)
- share/vala (installer don't package it)

The "???" ones seems to not be used according to my local tests. If
they are, a bug will appear so we will be able to know, comment in
the script (for maximum clarity towards the future) then revert.
2024-06-15 00:34:54 +00:00
Martin
08701da730 Update Slovenian translation 2024-06-14 20:08:50 +00:00
Yuri Chornoivan
a69cb1be2f Update Ukrainian translation 2024-06-14 19:17:31 +00:00
Luming Zh
be0a6dfb12 Update Chinese (China) translation 2024-06-14 08:35:26 +00:00
Ekaterine Papava
7f2f3e7e99 Update Georgian translation 2024-06-14 03:51:00 +00:00
Ekaterine Papava
4058db1f70 Update Georgian translation 2024-06-14 03:48:16 +00:00
Alx Sa
bac368af0b libgimp: Remove GIMP_PROC_* macros
These have been replaced with
gimp_procedure_*_argument () functions.
2024-06-13 23:17:48 +00:00
Alx Sa
4bf5dc7b97 plug-ins: Port argument macros to functions
With the new API introduced int d1c4457f,
we next need to port all plug-ins using
the argument macros to functions.
This will allow us to remove the macros
as part of the 3.0 API clean-up.
2024-06-13 23:17:48 +00:00
Yuri Chornoivan
0de33a0462 Update Ukrainian translation 2024-06-12 17:36:08 +00:00
Bruno Lopes
21ffb58903 Issue #811: Make each language a component for the Installer
In the process, make the Installer localization process less 'masochist'
(in other words: less manual). The custom '.xml' was the only way since
the iso-codes, Dammed Lies and Inno namings don't match.
2024-06-12 11:38:36 -03:00
Alx Sa
0be5db0b77 widgets: Allow deleting inactive filters
Resolves #11687
Previously gimp_drawable_has_filters () was used to check
if a drawable had filters before deleting them. However,
this function actually only checks if there's an active filter -
if filters are attached but set to invisible, this returns false.
This mean that you could not delete filters if they were
invisible.
This patch switches to using gimp_container_have () instead
as it checks if the filter is in the drawable's filter stack.
2024-06-12 13:44:21 +00:00
Luming Zh
d4046c24ed Update Chinese (China) translation 2024-06-12 12:10:09 +00:00
Martin
389b6d98b4 Update Slovenian translation 2024-06-11 21:11:02 +00:00
Anders Jonsson
ef91ab25eb python: remove accelerator in title bar 2024-06-11 20:22:15 +00:00
Martin
7ee8558033 Update Slovenian translation 2024-06-11 19:48:52 +00:00
Jacob Boerema
3fc861e186 tips: remove tip about dynamic keyboard shortcuts
Since dynamic keyboard shortcuts are not available anymore, remove
the obsolete tip about it.
2024-06-11 14:57:24 -04:00
Yuri Chornoivan
128e99f76b Update Ukrainian translation 2024-06-11 18:27:29 +00:00
Alx Sa
f5b7f734e2 python: Minor enhancements to python plug-ins
* colorxhtml.py was converted to use
GimpProcedureDialog. A new aux
argument was added so that a widget
could be created in the GUI. The text
field and the file widgets were made
to be sensitive to the source-file bool to
better indicate to the user which one will
be used.

* palette-sort.py now uses babl instead of
colormath libraries to get CIE LAB and
CIE LCH(ab) values. This means all users
will be able to sort by those options even
if the colormath library isn't installed.

* histogram-export.py's out-format
widget was converted to a radio frame
as it is in 2.10.
2024-06-11 17:17:41 +00:00
Martin
2a8e75de6a Update Slovenian translation 2024-06-11 15:33:33 +00:00
Alx Sa
d00aacfea2 libgimpwidgets: Fix Procedure Browser description size
Currently when you open the Procedure Browser, part of the
description text is off-screen.
This patch changes the values for the GtkPaned panels so that
the description is completely visible horizontally. It also makes
the vertical scrollbar conditional on the widget height rather
than always showing.
2024-06-11 15:00:00 +00:00
Alx Sa
2260e8bbe8 core: Fix palette error handling
Resolves #11679
The loading code for ASE, ACB, and ACO palettes
set any errors with g_prefix_error (). However, the
error object is NULL at that point for those palettes.
Therefore, a NULL error object is returned to
palette_import_make_palette () which then tries to
access its attributes. This resulted in a crash.
This patch fixes the issue by using g_set_error () for
those three formats instead.
2024-06-11 12:43:39 +00:00
Marco Ciampa
e576ac421d Update Italian translation 2024-06-11 06:45:13 +00:00
Yuri Chornoivan
3107eb61a8 Update Ukrainian translation 2024-06-11 06:38:24 +00:00
Anders Jonsson
5841e9f8af python: translation fixes
Followup to 292cb01fc2,
taking care of remaining untranslated strings and a stray
accelerator in a tooltip.
2024-06-10 20:58:39 +00:00
Yuri Chornoivan
19a94fa4ba Update Ukrainian translation 2024-06-10 18:51:55 +00:00
Alx Sa
292cb01fc2 python: Port arguments code to use functions
This patch ports the first-party Python plug-ins
to use the new argument API.
This restores the ability to add dropdown menus from
enums and Gimp.Choice parameters, and also allows
defaults to be set for custom datatypes like Gegl.Color.
2024-06-10 15:22:02 +00:00
Alx Sa
d1c4457fa3 libgimp: Convert gimpprocedure-params macros to functions
In order for Python plug-ins to be able
to create custom parameters like
GeglColor and GimpChoice, we need to
create actual functions rather than
using macros. A subsequent commit
will update all plug-ins to use them.
2024-06-10 15:22:02 +00:00
Alx Sa
ceb9747e23 libgimpwidgets: New API to check system animation status
Ports the animation code started in e13cc635
to an independent gimp_widget_animation_enabled()
function. This allows plug-in authors to
also conditionally turn off animations if
the user's system settings say to do so.

The function is applied to the About
Dialogue animation as well as two Easter
Egg animations:
* Wilber's eyes blinking after 23 minutes
on an empty canvas
* Wilber's eyes following the mouse after
a certain sequence of tools is clicked
2024-06-10 13:47:25 +00:00
Bruno
c02160a949 build/windows: No need to download Inno Korean translation
It is shipped with Inno by default in version 6.3.
2024-06-09 18:26:02 -03:00
Bruno
2f74496ebf build/windows: No need to add BOM anymore
Inno Installer 6.3 added support to UTF-8 *.isl files without a BOM
2024-06-09 18:21:27 -03:00
Bruno
8e576fb741 build/windows: Add fractional scaling to Installer Intro (actually End) image
Following a1ce459a
2024-06-09 16:58:03 +00:00
Cheesequake
22c59503b5 app/tools: Fix Filter GUI when expanding vertically,
Resolves #11656
Since e4b1f37e, Filter Tool widgets above the Blend
Mode frame do not expand vertically when the dialogue
is resized.
This especially impacts GeglGraph, as you can no longer
increase the text area to see more graph code.
This patch resolves the issue by adding a GtkExpander
to the GUI so that it allows the inner area to resize
vertically.
2024-06-09 15:02:48 +00:00
Yuri Chornoivan
f2c14573c3 Update Ukrainian translation 2024-06-09 14:58:34 +00:00
Yuri Chornoivan
19e0a45e60 Update Ukrainian translation 2024-06-09 14:53:46 +00:00
Luming Zh
843faff192 Update Chinese (China) translation 2024-06-09 12:55:24 +00:00
Luming Zh
18b659dd12 Update Chinese (China) translation 2024-06-09 12:43:43 +00:00
Anders Jonsson
a8e2c4e663 Update Swedish translation 2024-06-09 10:47:11 +00:00
Bruno
a3621cecca images/logo: Reduce size of Installer right-top icon
Following 6276d9d7

Reasons are explained in gimp-data commit message.
2024-06-09 02:39:30 +00:00
Jehan
61eca5d05b plug-ins: fix scale value in file-pdf-load. 2024-06-09 03:18:21 +02:00
Jehan
cca637135b app, libgimp, pdb, plug-ins: fix failure to set plug-in as transient.
While setting a plug-in as transient usually worked, it was failing in
cases the plug-in's progress bar was not initialized (i.e. if
progress_init() was not called before setting the dialog transient).

This commit stores the calling display, core side too (libgimp side, the
plug-in already had the calling display ID information), and we use this
when a GimpProgress has not been created yet.
2024-06-08 21:54:21 +02:00
Martin
e710457b4c Update Slovenian translation 2024-06-08 19:22:17 +00:00
Martin
81a16c4f9a Update Slovenian translation 2024-06-08 19:21:19 +00:00
Alexander Shopov
3fdbea6804 Update Bulgarian translation 2024-06-08 17:38:37 +00:00
Jehan
221bdd61c6 libgimp, plug-ins: GimpVectorLoadProcedureDialog will have thumbnail and…
… native dimensions/ratio display by default.

Also adding gimp_vector_load_procedure_extract_dimensions() public
function allowing plug-ins to query the native size or ratio of a vector
file.
2024-06-08 18:58:06 +02:00
Jehan
a4bb3a48a2 libgimp: reimplement gimp_procedure_run_config() for public usage.
Previous gimp_procedure_run_config() was in fact only good for private usage
inside the various run() methods for the different GimpProcedure subtypes. The
problem with this implementation is that the returned config object is not
complete. For instance, for a GimpLoadProcedure, the "run-mode" and "file"
properties are not part of the config object so you cannot call a
GimpLoadProcedure with any of the gimp_procedure_run*() functions.

Note: we had some working usage, e.g. in file-openraster, but only because it
was running the load procedure as a GimpPDBProcedure whose returned config
object was indeed always complete!

As a consequence, I rename gimp_procedure_run_config() as an internal-only
function _gimp_procedure_create_run_config() and I create a new
gimp_procedure_run_config() which always return a full config with all
arguments.
2024-06-08 18:58:06 +02:00
Jehan
5bcc6bfe52 libgimp: disengage pixel density from dimensions in GimpResolutionEntry.
It was a bad idea to bind width/height with pixel density. These are separate
things. You may want to set specific pixel dimensions while keeping a given
resolution.

Moreover I am now properly storing aspect ratio in the widget, otherwise with
integer computation, we are just losing too much precision and the ratio is in
fact changing constantly as you change dimensions.
2024-06-08 18:58:06 +02:00
Jehan
5784d1eba6 plug-ins: port file-pdf-load to the new GimpVectorLoadProcedure logic. 2024-06-08 18:58:06 +02:00
Jehan
3d25182ea7 libgimp: "Reset to Factory Defaults" resets to extracted size.
The bogus 0×0 default values for width×height properties are only because we
don't know the real native size of the image. Once we have computed it, we can
change the param spec defaults, so that hitting "Reset to Factory Defaults" sets
width, height and resolution to the actual file's default values (if resolution
is not a metadata in the format, which is apparently the case for all vector
formats we currently support, then 300.0 stays the default resolution).
2024-06-08 18:58:06 +02:00
Jehan
7f2b54db1f plug-ins: port file-ps to new GimpVectorLoadProcedure logic. 2024-06-08 18:58:06 +02:00
Jehan
48babeab3d plug-ins: port to the updated GimpVectorLoadProcedure logic. 2024-06-08 18:58:06 +02:00
Jehan
39ea23ed52 app, libgimp, plug-ins: improve GimpVectorLoadProcedure workflow.
I'm moving the logic of choosing a correct default for width/height by adding an
"extract dimensions" callback in the procedure. The logic is that every vector
format out there should likely have metadata either for pixel dimensions or
physical dimensions, or at the very least for no-unit dimensions (ratio only).

Vector load procedures will have to implement only the extraction of such data
in a callback called by GIMP but not how to act upon them, so that we have a
common logic for all vector images.

I am implementing this callback first in the SVG plug-in, moving all the code
to extract dimensions (and improving it) in this callback.

Also I am deleting "file-svg-load-thumb" procedure. I could simply reimplement
it using the same code, but it looks to me like this is very useless for vector
formats to have a specific thumbnail procedure (unless it were to use very
specific metadata for faster result). This is vector data, just ask it directly
at the proper bounding box size.
2024-06-08 18:58:06 +02:00
Jehan
b0d1668594 desktop: sync AppStream metadata after GIMP 2.10.38 release. 2024-06-06 21:12:32 +02:00
Jehan
a73881478c libgimpwidgets: new gimp_int_radio_frame_set_title().
This new function allows to set a title with mnemonic.

But also it properly sets the frame label as the mnemonic widget for the
radio buttons, otherwise the mnemonic is mostly bogus and doesn't
actually give focus to the editable widgets (i.e. the radio group).
2024-06-06 21:08:08 +02:00
Jehan
0b2d8fedc3 libgimp, libgimpwidgets: ability to generate a GimpIntRadioFrame for GimpChoice arguments.
This includes a new function gimp_prop_choice_radio_frame_new() which
creates GimpIntRadioFrame from GimpChoice properties.

GimpChoice GimpProcedure arguments are still creating a combo box by
default, but it is now possible to override this default behavior to get
a radio frame by calling first:

```C
gimp_procedure_dialog_get_widget (dialog, "arg-name", GIMP_TYPE_INT_RADIO_FRAME);
```
2024-06-06 20:20:30 +02:00
Bruno
12707592c2 build/windows: Add 'libxslt' to unified deps list
Some package stopped to need 'libxslt' out of nowhere.
Don't know when and why that happened, best I found was:
c3a5cacbaf
2024-06-06 14:07:10 +00:00
Alx Sa
6be4e7029a plug-ins: Use combobox in histogram-export
Currently, we can not use Gimp.Choice as a parameter type for
Python plug-ins. This means that we're using a string instead for
the "output-format" parameter, which creates a textbox in the GUI.

This patch manually creates a GimpStringComboBox in the GUI and
syncs it with the "output-format" string parameter. Once Gimp.Choice
can be used in Python, we should be able to swap this out without
impacting plug-in developers (since it would also take in a string)
2024-06-06 04:54:05 +00:00
Bruno
a8b9bedf3c Issue #5146: Change Installer ProductInfo in revisions
This allows better versioning control by ITs.
2024-06-05 20:33:16 -03:00
Bruno
fb5474ae4d Issue #4053: Add "*default_bin" support on Windows and enable it
Almost every program have a non-versioned .exe on Windows. MSYS2 does this too.
2024-06-05 11:51:14 -03:00
Alx Sa
29bb5b3608 dialogs: Respect Windows Show Animation option
Building on d25d8778, this patch checks the Window
"Show Animation" option and uses it to determine
if the About Dialogue animations should be active.
2024-06-05 12:49:20 +00:00
Alx Sa
d25d877899 dialogs: Respect MacOS Reduced Motion option
e13cc635 uses gtk-enable-animation to determine whether
the more dynamic motion animation should be used for the
About Dialog credits. However, gtk-enable-animation does
not take into account the MacOS preferences.
This patch adds a check for this value using NSWorkspace's
accessibilityDisplayShouldReduceMotion boolean. Since the
value is TRUE on MacOS if the user wants animations turned
off, the boolean is inverted.
2024-06-04 16:46:01 +00:00
Bruno
a2bd501cee build/windows: Move Store assets generation to gimp-data
gimp-data is the correct place, along with the installer assets.
2024-06-04 16:29:59 +00:00
Bruno
1a70eba570 Revert "build/windows: generate a default XCF file to be copied by Windows"
This reverts commit 085d8a02b5.

For some reason, Windows doesn't allow us to use that feature
(confirmed this after using the version from the Store itself,
not the .msixbundle)
2024-06-04 16:29:59 +00:00
Jehan
349191b8ab Issue #10406: get rid completely of the animated authors list when…
… "Reduce Animation" is checked.

This is an alternate version for commit e13cc63525.
Instead of proposing a simpler animation (fade-in/out instead of wave
animation), let's just completely get rid of the whole thing when
someone enabled an accessibility option saying that long animated
contents are basically disturbing to them, which is how I understand
additional issue #11647.

In fact, reading Mozilla docs about such option:
https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#user_preferences
… they even mention vestibular motion disorders, which seem pretty
serious and would make our About dialog quite uncomfortable.

I tried to experiment with just showing a part of the authors list, then
ending on a link text to the Credits tab after a few second, but it
didn't feel that interesting nor useful. Anyway the whole animated
widget is redundant with said Credits tab, and therefore more on the
"fancy" side of things than on the useful one. Hence let's make simple:
if someone configure their OS saying that animated elements are a
discomfort, let's just get rid of useless ones! Done!
2024-06-04 17:25:37 +02:00
Alx Sa
5bd293340f dialogs: Redesign Welcome Dialogue options layout
Currently, the additional customization
options are laid out horizontally.
Depending on the translation, this might
cause the dialogue window to become
much wider.

This patch converts those options to
GtkSwitch and puts them in a column.
prefs_switch_add () was modified to also
return the GtkSwitch object, so we could
bind its active property for the icon
override property.
2024-06-04 01:57:51 +00:00
Bruno
fad40afe45 build/windows: Organize *gimp3264.iss [Code] to not look like Assembly
The installer is probably the most complex packaging format so one of the
biggest examples of packaging love over the years into it in our repo.
But the readability of installer scripts... leave a lot to be desired.

Now, the main script is organized following the order of installer pages
with some comments. This will make easier to future contributors work
(but this commit probably isn't perfect since it's a big change to read)
2024-06-03 16:42:13 -03:00
Bruno
09d6402a5b build/windows: Update Installer dir code following latest changes 2024-06-03 06:49:22 -03:00
Alexandre Prokoudine
14250debdd Update Russian translation 2024-06-03 01:34:27 +02:00
Ekaterine Papava
1ccc31648f Update Georgian translation 2024-06-02 21:17:07 +00:00
Kolbjørn Stuestøl
ffc9f85f48 Update Norwegian Nynorsk translation 2024-06-02 19:50:46 +00:00
Kolbjørn Stuestøl
ceb982225e Update Norwegian Nynorsk translation 2024-06-02 19:48:32 +00:00
Alx Sa
e13cc63525 dialogs: Reduce About Dialog animations if requested
The About Dialog shows authors names using motion effects.
Since this is done with Cairo, it does not respect the
"gtk-enable-animations" setting or OSX's "Reduced Motion"
option.

This patch retrieves the "gtk-enable-animations" value.
If it is set to false, then the simple fade-in effect is used
for author names in place of the motion effects.
2024-06-02 02:05:24 +00:00
Bruno Lopes
57012174fb build/windows: Don't allow multiple Installers at same time
We have counter measures to avoid installing while gimp opened at 'prep time',
but until now none for the installer itself. Let's fix it with SetupMutex.

The final UX is just less worse (than today): the user needs first to select a
language, then only after this the dialog about two installer will be prompt.
Seems that Inno devs willn't fix: https://github.com/jrsoftware/issrc/pull/461
2024-06-01 20:42:06 +00:00
Alx Sa
6d1db0d7d5 plug-ins: Fix crash in Van Gogh plug-in
As noted by Wormnest, if the effect-image drawable is
smaller than the source image, the Van Gogh plug-in crashes.
This is because the source image's dimensions were being
used to traverse the effect-image drawable in rgb_to_hsl ().
This patch fixes the nested for loop to use the correct
width and height values as limits.
2024-06-01 17:33:41 +00:00
Alx Sa
b6c69ad9cd plug-ins: Set default image for Van Gogh
Unlike 2.10, the Van Gogh plug-in does not set the effect image
to the current layer by default. This means that if you don't set
it yourself, the plug-in does nothing.
This patch restores the 2.10 behavior by passing the drawable
to the plug-in dialogue and setting it by default with
gimp_drawable_chooser_set_drawable ().
2024-06-01 16:39:08 +00:00
Bruno Lopes
a91599c454 build/linux: Reduce bashisms on AppImage script 2024-06-01 16:27:20 +00:00
Bruno
796005216d build/windows: Very small clean-up to PowerShell scripts 2024-06-01 13:47:35 +00:00
Bruno Lopes
375782fd64 gitlab-ci: Use LLD linker in Debian and Flatpak jobs
Following 55427487 and 85ed2847

It is a bit unusual to use 'clang' + 'GNU ld' combo.
Also, lld is advertised to be way faster.
2024-06-01 11:28:21 +00:00
Bruno Lopes
884b05f168 gitlab-ci, build/windows: Move back split of 32-bit symbols to gimp job
Following 0199faac

We use arm64 runners for the installer job to avoid queues, but...
llvm-objcopy is well know to lack parity and one sympthom is the
'invalid SymbolTableIndex' warning when handling x86 debug symbols.
2024-06-01 10:57:24 +00:00
Bruno Lopes
2f49ff0810 build/windows: Offer option to launch GIMP after install
This commit just makes the installer display a (unchecked) checkbox, like Win
pkg manager (WinGet) so it's doesn't change the actual behavior. It also don't
break string freeze since the .isl string already exists and have translations.

The benefit to some users is having one less click to launch GIMP: [checkbox] >
[close]; instead of: [close] > [start menu icon] > [gimp in 'recommendations'].
2024-06-01 10:53:14 +00:00
Luming Zh
e5ac62990d Update Chinese (China) translation 2024-06-01 02:38:30 +00:00
Nils Philippsen
ffa8be0351 plug-ins: Fix parameter type in psd_read_len()
The function expects *data to be 64bit wide which is incidentally true
on some architectures but not others. Make it explicit (and portable).

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-05-31 23:04:54 +00:00
Yuri Chornoivan
4f0333b60d Update Ukrainian translation 2024-05-31 17:25:43 +00:00
Alx Sa
1426701143 scriptfu, tools: Allow off-canvas guides in more places
Resolves #10609

Continuing from 1759174d, this patch
removes the on-canvas restrictions for
guides from the New Guide dialogue and
the Measure Tool's guide creation feature.
2024-05-31 12:03:44 +00:00
Martin
bb65b1aca1 Update Slovenian translation 2024-05-31 07:06:33 +00:00
Alx Sa
e9f2e9012f plug-ins: Port file-tiff-load to GimpProcedureDialog
Note that GimpPageSelector is still added
manually as there is no GimpProcedureDialog 
equivalent yet.
2024-05-31 04:34:51 +00:00
Marco Ciampa
583dfbd8a3 Update Italian translation 2024-05-30 16:12:17 +00:00
Marco Ciampa
d497188ec3 Update Italian translation 2024-05-30 16:12:06 +00:00
Marco Ciampa
38223a5d6e Update Italian translation 2024-05-30 16:11:56 +00:00
Alan Mortensen
3ce095edd6 Update Danish translation 2024-05-30 15:16:50 +00:00
lillolollo
a21b18bbec app/widgets: Fix deprecated code in GimpToolBox
Replaces gtk_widget_show () with gtk_widget_set_visible ()
and replaces margin-left/margin-right with margin-start and
margin-end properties.
2024-05-29 13:43:17 +00:00
Luming Zh
05bbcc81d0 Update Chinese (China) translation 2024-05-29 12:41:31 +00:00
Bruno Lopes
9a4d46f077 build/windows: Don't generate .interp files for Native .zip bundles
Following 59b62c33
2024-05-29 10:43:39 +00:00
Alx Sa
83141ba62d actions, plug-ins: Minor clean-up and warning fix
*In file-pnm, format_name is no longer
used due to changes in exporting
functions. This was creating a warning
about an unused variable.

*In 519f301c, an attempt to add a
short-key for MacOS Settings was left in.
It did not work because "comma" should
be spelled out rather than using ",". This
patch removes the accelerator.
2024-05-28 16:16:29 +00:00
Jehan
e2748a2e4f NEWS: update. 2024-05-28 15:33:28 +02:00
Bruno Lopes
cb8c8711a6 build/windows: Enable GEGL dev docs building on Windows
This is not broken according to my tests but babl is.
2024-05-28 13:32:03 +00:00
Marco Ciampa
a1a22afe1b Update Italian translation 2024-05-28 12:56:13 +00:00
Bruno Lopes
2e748ddbfc build/windows: Make crossroad GIMP script work locally
Following fdc2f080.
2024-05-28 09:39:16 +00:00
Bruno Lopes
00af02fa19 build/windows: Make crossroad Deps script work locally
Following fdc2f080.

Also, do some cleanups.
2024-05-28 09:39:16 +00:00
Alx Sa
394ca66037 plug-ins: Fix issue with drawing Cylinder face
Resolves #11617

When we ported Map Object to GimpProcedure API,
the wrong index was set for the Cylinder's bottom face.
As a result, the top and bottom faces both appeared on the top.
This patch fixes the array index to the right value.
2024-05-27 18:50:36 +00:00
Jacob Boerema
aab6f4eab8 modules: fix CI failure in gimp-win-x86 job
Our gimp-win-x86 job fails with the following error:
../modules/gimpinputdevicestore-dx.c:207:28: error: passing argument 2
 of 'GetModuleHandleExW' from incompatible pointer type
 [-Wincompatible-pointer-types]

Fairly Recent the call to `GetModuleHandleEx` was changed to
`GetModuleHandleExW`. This new call expects a wide char pointer
instead of a char pointer.
So replace it with the wide variant (LPCWSTR). Since in this call
an address is actually expected, the actual contents don't need to
be a wide string.
2024-05-27 13:32:54 -04:00
Alx Sa
1759174d9d pdb: Allow off-canvas guides with Script-fu
Commit 015f4946 allowed guides to be
placed off-canvas in the GUI. However,
the restrictions were not removed from
the Script-fu implementation.
This patch fixes the Script-fu parameters
and conditional checks to match the
GUI implementation.
2024-05-27 15:42:10 +00:00
Marco Ciampa
fb94e576df Update Italian translation 2024-05-27 14:58:25 +00:00
Marco Ciampa
c62ef5eb12 Update Italian translation 2024-05-27 14:58:22 +00:00
Martin
d32d8d9ccf Update Slovenian translation 2024-05-27 12:26:22 +00:00
Marco Ciampa
94e57486a0 Small fixies in Italian translation 2024-05-27 12:23:17 +02:00
Jacob Boerema
85561c7ff0 libgimp: fix #6126 Invalid charset: InvalidCharsetId
Some apps that write EXIF metadata, forgot to add the charset to
certain tags that require it. The main case is Exif.Photo.UserComment.
This caused us to show a warning about an invalid charset, in addition
to not showing it in our Metdata Viewer.

We fix this by reading the raw data for that tag when we encounter the
above error. The raw data is then validated as utf-8 and converted
to a string if valid.

We then resave this tag to our metadata to force it to have the
correct charset; that way we don't have to do any checking in other
places in our code.

Note: there are a few other tags that also use a charset. We may have
to check those too, eventually.
2024-05-26 14:46:20 -04:00
Bruno Lopes
3ad39c3866 gitlab-ci: Expose .flatpak as artifact from the distribution job
Completing d09a2a6f, since the dist job wasn't added to MR pipelines that time

Note: this doesn't change the actual behavior. The job will upload to nightly
repo only when triggered from schedule pipelines. I repeat, nothing changed.

What is new is that the .flatpak bundle now is an artifact from dist job, since:
- Despite the name, it isn't a real bundle, so no need to be only in gimp stage
- In dist, it reduces storage use because only the .flatpak file lasts 8 days,
  not the .tar and other files from gimp job which lasts 2 days (5495483c)
2024-05-26 13:48:28 -03:00
Bruno Lopes
445def2109 gitlab-ci: Align again the logical operator '&&' in dev-docs 2024-05-26 10:50:32 -03:00
Alx Sa
c8049f2ed5 app/tools: Fix editing custom NDE filters
Resolves #11211

The code that moves the temporary "editing" filter
when modifying an NDE filter was not being run
on custom GIMP filters like Curves. This meant that
editing Curves would always place the temporary
"editing" filter at the top of the filter stack, giving
an incorrect preview of what the changes would do.

This patch moves the reorder code from being in
gimp_filter_tool_create_filter () to being in
gimp_filter_tool_set_config (), which always runs
when any filter is created.

This change also fixes a separate issue where the
filter mask would not be copied over for Curves.
2024-05-26 12:37:47 +00:00
Yuri Chornoivan
965bd8daa2 Update Ukrainian translation 2024-05-26 06:03:16 +00:00
Bruno Lopes
ed97f08d0b build/windows: Delete Splash images from 2.9 era not used anymore
They should have been deleted by !1373 but there were so many things to
do that it is completely natural that these two files went unnoticed.
2024-05-25 17:44:22 -03:00
Bruno Lopes
e93e0f49a0 build/windows: Move Inno installer to 'modern' style
This style mimics the color scheme used by Win32 applications since Vista (and
still used in Win11). The all grey scheme ended in XP. Let's move on.

But we will keep the actual window size and without being able to resize since
these two Inno features (WizardSizePercent and WizardResizable) are broken.

(The progress bar was changed too to conform with the defaults and uninstaller)
2024-05-25 19:15:54 +00:00
Alx Sa
a28b1bad14 plug-ins: Update Darktable API check
Darktable 4.6 updated the version output format to conform
to standards. This broke the regex check that GIMP uses to
test if Darktable is installed. The developers of Darktable
have added a new --gimp flag for us to use for checking
support. This patch updates our check code to use this
API first, then fallback on the original regex code if a
version of Darktable before 4.6 is installed.
2024-05-25 17:59:37 +00:00
Bruno Lopes
c7d271d892 build/windows: Silence Inno warnings regarding langs
We have no control over lang teams. No reason to keep the output polluted.
2024-05-25 07:44:57 -03:00
Bruno Lopes
f34f55dd65 build/windows: Organize Installer [Setup] to make some sense 2024-05-25 07:44:49 -03:00
Bruno Lopes
6276d9d777 build/windows: Drop hardcoded Installer right-top icon
Now, the icon is generated from the (new) logo .svg in gimp-data.
Also, it now have full HiPPI (aka fractional scaling) support.
2024-05-24 16:22:23 -03:00
Bruno Lopes
a1ce459a1b build/windows: Drop hardcoded Intro image from 2.9 (pre-2.10) series
Now, the image is generated from splash image in gimp-data
2024-05-24 12:16:07 -03:00
Bruno Lopes
c6634d66ff build/windows: Make Installer versioning vars more neutral
Now, the installer files match the meson config.h naming:
'gimp_version', 'gimp_app_version' and 'gimp_api_version'.
"devel" was replaced by meson 'gimp_unstable' too.

util_version was dropped since it lost its utility.
2024-05-24 13:22:03 +00:00
Bruno Lopes
2758965731 meson: Optimize DWARF symbols to Dr. Mingw 2024-05-24 13:11:18 +00:00
Bruno Lopes
0199faac2c gitlab-ci, build: Make DWARF (.debug) symbols splitting an Installer only script
Splitted .debug are not needed by crossbuilds, and breaks .msix certification.
2024-05-24 13:11:18 +00:00
Bruno Lopes
dc21fb7601 meson, build: Disable CodeView (.pdb) generation and bundling for now
1) Right now, MS Partner Center doesn't tell us if the .pdb bunbled as .appxsym
are fine and we only have "Unknow" dumps in the Health page from MS Par. Cen.

My theory, according to my tests with 'SymChk', 'PDBCopy' and 'llvm-pdbutil',
is that this is happening because .pdb from clang or gcc are not "perfect", but
I really have no proof to afirm this, since Partner Center tell us nothing
about them, and we don't even know if the .appxsym were uploaded to begin with.

---

2) The compiler can't generate DWARF (.debug*) symbols when generating .pdb,
which breaks debugging in DrMingw and even lldb according to my tests.
(This is not a fault of the .pdb format but a circumstance: our debuggers
only support DWARF, which is the format already used by MSYS2 packages)

---

So, the .pdb will return probably only in the potential vcpkg transition.
2024-05-24 13:11:18 +00:00
Alx Sa
742ec5689d widgets: Block removing tool-based NDE filters
Currently, messing with filters that are
being managed by tools (like Warp or
Gradient) causes crashes. For now, we'll
prevent removing NDE filters which are
tool-based, and revist after 3.0 is released.
2024-05-22 19:59:40 +00:00
Bruno Lopes
edddb83784 build/windows: Fixes and cleanup to native scripts
Previous changes broken local building courtesy and probably DirectInput too.
Noticed that the universal variables can not work in some contexts, fixed.

Also, done some little cleanups.
2024-05-21 22:59:44 +00:00
Cheesequake
e4b1f37e4e tools: Improve Filter Tool UI for Blending Options...
...by having it stay in the same position when expanded
and closed rather than moving to the bottom afterwards.
2024-05-21 19:15:43 +00:00
Alx Sa
acf2756e4a widgets: Update image display on imageview select
In the Image Dockable, clicking on an image will update the layers and 
navigation views. However, the actual canvas image will not update
unless you double-click the item.
This adds a select_item function so the canvas is updated on a single 
click as well.
2024-05-21 17:31:05 +00:00
Idriss Fekir
4a174206af text: Fix loading XCFs with XLFD fonts 2024-05-21 17:19:33 +01:00
Alx Sa
5f38c37b98 tools, core: Don't stroke/fill paths on pixel locked layers
Resolves #11568

Currently, the Stroke/Fill Paths options on
the Path tool disregard the Pixel Locked
flag for layers. This patch resolves this as
follows:

* On the Paths tool, the Stroke/Fill button
does not pull up a dialogue if a single
layer is selected and it's pixel locked.
* If multiple layers are selected, only those
that are not pixel-locked have the Fill/Stroke
applied to them.

In both cases, a warning is also displayed.
2024-05-21 12:57:55 +00:00
Niels De Graef
36c201e426 libgimpwidget: Mark gimpcolorscale as introspectable
There's no seemingly good reason for it not to be introspected, so let's
add it to the files. This also fixes an issue where the documentation
for it is not properly generated.
2024-05-21 10:08:07 +02:00
Niels De Graef
5efb05825c meson: Undef GIM_DISABLE_DEPRECATED on GIR
By defining `GIMP_DISABLE_DEPRECATED` when creating the GObject
Introspection file, we're actually not (or only partially) generating
some of the documentation of some files that are marked as deprecated.

One example that should now properly generate documentation is
`GimpFileEntry`.
2024-05-21 10:01:48 +02:00
Martin
9acd62a0fa Update Slovenian translation 2024-05-20 13:52:09 +00:00
Rodrigo Lledó
bf66900493 Update Spanish translation 2024-05-19 16:44:50 +00:00
Rodrigo Lledó
291e049df5 Update Spanish translation 2024-05-19 16:14:40 +00:00
Rodrigo Lledó
74673f431a Update Spanish translation 2024-05-19 15:49:02 +00:00
Rodrigo Lledó
61f75b3541 Update Spanish translation 2024-05-19 15:41:26 +00:00
Rodrigo Lledó
cf717f4add Update Spanish translation 2024-05-19 15:23:41 +00:00
Rodrigo Lledó
1f95fc8e05 Update Spanish translation 2024-05-19 14:07:02 +00:00
Rodrigo Lledó
5567b67de5 Update Spanish translation 2024-05-19 13:12:41 +00:00
Luming Zh
ed070d10b7 Update Chinese (China) translation 2024-05-19 11:08:57 +00:00
Luming Zh
691e96bb10 Update Chinese (China) translation 2024-05-19 11:04:32 +00:00
Balázs Úr
e4fd431970 Update Hungarian translation 2024-05-19 10:01:09 +00:00
Balázs Úr
88eb404ab3 Update Hungarian translation 2024-05-19 09:55:32 +00:00
Yuri Chornoivan
f5f99bdfdd Update Ukrainian translation 2024-05-19 06:45:04 +00:00
Alx Sa
519f301c65 actions: Use Settings rather than Preferences on MacOS
Per Lukas Oberhuber, Preferences should be called Settings
on MacOS, as it was before the GTK3 menu port.
2024-05-19 02:12:44 +00:00
Alx Sa
47dde0580a libgimpwidgets: Fix formatting from 8adcc0cd
Some minor code style issues remained 
that I missed in 8adcc0cd.
After further reflection, I also converted
the code to be a private/internal function.
gimp_prop_check_button_new () should
cover the majority of GtkCheckButtons,
and the function is currently only used
to fix the size of those widgets. We could
revisit it as a public function in the
future if more use cases are found.
2024-05-19 02:10:23 +00:00
Rodrigo Lledó
5a4afd39eb Update Spanish translation 2024-05-19 01:20:57 +00:00
Rodrigo Lledó
ef405918f8 Update Spanish translation 2024-05-18 23:49:43 +00:00
Rodrigo Lledó
86465e4aff Update Spanish translation 2024-05-18 21:41:39 +00:00
Mark Sweeney
8adcc0cdcb libgimpwidgets: Fix GUI twitching due to bold label sizing
Resolves #10026

Selecting a checkbutton makes the label bold. This increases the
width of its label, and if it's the longest item in a box, this
causes minor "twitching" and resizing of the dialogue.
This patch calculates the size of the label when bold and then
requests the label width be set accordingly to resolve the issue.
2024-05-18 21:33:51 +00:00
Alx Sa
e51a128acd text: Update font property to GimpFront
Resolves #11550
The import code for X Logical Font Description fontnames
was not updated to use GimpFont instead of strings.
This caused crashes when we tried to set GimpFont properties
with gchars. This patch updates the code to create a new
GimpFont object from the font name string.
Additionally, it increases the read length by one, as we were losing
the last character of each field as it was split on the "-" character.
2024-05-17 14:47:29 +00:00
Marco Ciampa
bed62a077c Updated Italian translation 2024-05-17 12:12:52 +02:00
Andre Klapper
dff524d7e6 pdb: Update URL for GLib API docs 2024-05-17 09:12:14 +02:00
Bruno Lopes
75f59c7602 gitlab-ci: Remove unnoticed keyword by fdc2f080 2024-05-16 14:00:46 -03:00
Oleg Kapitonov
7ccfad1716 app: Fix localization language in Windows 2024-05-16 16:42:47 +00:00
Alx Sa
4de7c7defb themes: Removing padding constraints on GimpToolDialog
Resolves Issue #9955.
GimpToolDialog CSD buttons were being singled out to only
have padding of 2px. This was inconsistent with other dialogues
without this constraint. Since the larger padding style seems to
be preferred, we'll remove the constraint for GimpToolDialog
CSD buttons.
2024-05-16 15:49:10 +00:00
Bruno Lopes
fdc2f080a8 gitlab-ci, build/windows: Make crossroad scripts self-contained
This make them easier to understand and to run local, as we do with native ones

(They can't be run local yet, further changes will try to acomplish this a bit)
2024-05-16 10:05:38 -03:00
Bruno Lopes
26e2f693dc build/windows: Enable .pdb bundling in x86 (32-bit)
Following 8cf688ac. Since GCC 14 was finally released with this feature.
Clang have it for years in advance so no change is needed for arm64 and x64.
2024-05-15 21:20:36 -03:00
Bruno Lopes
36ce192a53 build/windows: Reduce some bashisms on Windows scripts 2024-05-16 00:02:25 +00:00
Bruno Lopes
b42b18de24 gitlab-ci: Re-enable pkg caching for deps-*cross job
Reintroduce pkg caching for crossroad. The possibility of using it is one
in thousands since we don't have distributed cache, but it's better than
rely totally on MSYS2 mirrors, which can be be extremely sick sometimes.
2024-05-15 19:29:07 -03:00
Rodrigo Lledó
e59231d659 Update Spanish translation 2024-05-14 15:52:07 +00:00
Alx Sa
bcf5697289 themes: Define GtkListBox row styles
Resolves #11531

GtkListBox's CSS was previously defined, but GtkListBoxRow
did not inherit those values. This patch explicitly defines this
so we do not have system theme leaks.
2024-05-14 15:13:49 +00:00
Alx Sa
aa30b40fee core, xcf: Prevent copying tool-based NDE filters
For now, we can't keep certain GEGL ops
like Gradient as NDE filters, since they are
connected to tools. If the layer is copied
or saved as an .XCF while the tool is still
active, it attempts to save it and causes a
crash.
This patch adds a check to make sure the
copied filter has been commited and that
it's not a tool-based NDE filter before
being copied. It also adds some NULL
checks where gimp_drawable_filter_duplicate
is used to prevent NULL from being
added to the filter stack.
2024-05-14 04:05:06 +00:00
Nils Philippsen
29fda469d1 meson: Detect Lua 5.4 and fall back to plain name
Lua-lgi works with Lua 5.4 meanwhile which is the only implementation on
some architectures.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-05-13 23:49:42 +02:00
Alexander Shopov
f35a0bb3be Update Bulgarian translation 2024-05-13 20:54:10 +00:00
Alexander Shopov
fa9ceb4411 Update Bulgarian translation 2024-05-13 20:47:04 +00:00
Kolbjørn Stuestøl
fcbe556704 Update Norwegian Nynorsk translation 2024-05-13 19:35:03 +00:00
Luming Zh
f3711e9750 Update Chinese (China) translation 2024-05-13 11:28:37 +00:00
Luming Zh
19bac162de Update Chinese (China) translation 2024-05-13 11:18:01 +00:00
Luming Zh
9b16976879 Update Chinese (China) translation 2024-05-13 11:12:55 +00:00
Luming Zh
49a2b7eb3d Update Chinese (China) translation 2024-05-13 11:08:42 +00:00
Alx Sa
d9125c58f9 libgimp: Fix description of gimp_export_image ()
As noted by Anders Jonsson, the wrong parameter description
was removed when the API was updated. Other aspects of the
descriptions were also updated to account for the change.
2024-05-12 15:26:29 +00:00
Alx Sa
1bb515eb64 plug-ins: Fix call to internal GIH export after 443947c6
After 443947c6, the image layers were being passed as a
GList to the internal GIH export code rather than GimpDrawable
pointers.
2024-05-12 11:38:53 +00:00
Alexander Shopov
0471439ed4 Update Bulgarian translation 2024-05-12 07:58:13 +00:00
Alexander Shopov
ba04867d71 Update Bulgarian translation 2024-05-11 14:18:06 +00:00
Alexander Shopov
dd128d2748 Update Bulgarian translation 2024-05-11 14:05:41 +00:00
Alexander Shopov
bf60369e74 Update Bulgarian translation 2024-05-11 14:02:09 +00:00
Niels De Graef
c2971f000a libgimpwidgets: Add missing GIR annotations 2024-05-11 15:30:45 +02:00
Niels De Graef
d44a9c942b libgimpmath: Add missing (out) annotations 2024-05-11 15:01:23 +02:00
Niels De Graef
f08aca656d libgimpcolor: Add missing (out) in gimpcolorprofile 2024-05-11 14:46:10 +02:00
Niels De Graef
2bc7ec8ef6 libgimpbase: Add GIR annotation for memsize deserialize
The memsize argument was missing an `(out)` argument
2024-05-11 14:40:38 +02:00
Niels De Graef
c15c180eab libgimpconfig: Fix gimpconfigwriter GIR annotation
Make sure to mark the data argument in `gimp_config_writer_data()` as an
array.
2024-05-11 14:34:32 +02:00
Rodrigo Lledó
8038cc1d62 Update Spanish translation 2024-05-11 11:48:53 +00:00
Ekaterine Papava
1b29e77c17 Update Georgian translation 2024-05-11 03:09:37 +00:00
Rodrigo Lledó
ac4de97855 Update Spanish translation 2024-05-10 23:55:39 +00:00
Rodrigo Lledó
f15a605ed9 Update Spanish translation 2024-05-10 21:47:25 +00:00
Bruno Lopes
bad250429c build/linux: Fix stuck AppImage
* Since the appimage is for testing purposes, let's use system 'libc'
* Hardcode python path since the wildcard wasn't expanding misteriously
* Improve system theme recognition making way simpler
2024-05-08 22:02:23 +00:00
Jordi Mas
5556735d22 Update Catalan translation 2024-05-08 18:50:11 +02:00
Rodrigo Lledó
735ca5a1ab Update Spanish translation 2024-05-06 21:05:35 +00:00
Rodrigo Lledó
6ccb043873 Update Spanish translation 2024-05-06 20:49:43 +00:00
Michael Schumacher
aff33e2d18 gitlab: Add url to the Duplicate candidate report search for both open and closed reports.
This may help to reduce the number of duplicate reports we get about some (temporarily) frequently reported issues, like the current crash
happening since GLib 2.79/2.80, or the crash happening with older GIMP versions on macOS Sonoma.

This won't be perfect because not everyone will use or read the template, or notice the url in it, or use the url to find and check the
reports, but I count on it getting more known than right now.
2024-05-05 22:48:05 +00:00
Simon Budig
1b142eb604 app: don't leak the GeglColor in GimpPaletteEntries. 2024-05-06 00:35:51 +02:00
Simon Budig
e0564ae69d libgimpwidgets: don't leak dest_profile 2024-05-06 00:35:51 +02:00
Simon Budig
32336a2350 app: avoid uninitialized memory for color names 2024-05-06 00:35:51 +02:00
Yuri Chornoivan
12c13f0f11 Update Ukrainian translation 2024-05-05 17:42:42 +00:00
Simon Budig
6877a3cd43 app: use the logical rectangle for positioning the splash text.
This avoids jiggeling baselines for texts with/without descenders.
2024-05-05 16:55:41 +02:00
Martin
f1a2bbb1cc Update Slovenian translation 2024-05-05 08:42:48 +00:00
Jacob Boerema
64b9a00484 plug-ins, ci: add basic support for junit reports for...
file plug-in testing.
The name and location of the xml results will be the same as for the
log file, but with the extension replaced by .xml.

Just some basic support is added which adds failed testcases when
a plug-in has a failure result, which should be the most common
case of failures.
Not all cases where we make errors in our test setup will generate
failed testcases yet, although they should show up in the number of
failures.
Disabled tests won't show up as skipped tests.
We also don't track time.
2024-05-04 19:06:38 +00:00
Anders Jonsson
dfae02038a libgimp: make vector load strings translatable 2024-05-04 13:17:39 +00:00
Daniel Novomeský
b8eea758d7 plug-ins: JPEG XL half-float import support 2024-05-04 04:58:28 +00:00
Hugo Carvalho
01858bd0de Update Portuguese translation 2024-05-03 21:46:31 +00:00
Alx Sa
3260299f4a libgimp, plug-ins: Remove n_drawables parameter from gimp_file_save () 2024-05-03 15:22:39 +00:00
Alx Sa
443947c6aa plug-ins: Remove n_drawables parameter
Port all plug-ins to retrieve the layers
directly from the image rather than
having them passed in. This resolves some
issues with introspection and sets the
foundation for future API work.
2024-05-03 15:22:39 +00:00
Alx Sa
bb3c28689a libgimp, plug-ins: Remove GIMP_EXPORT_CANCEL
Per Jehan, as of 0dc9ff7c we can't
cancel gimp_export_image, so we can
safely remove this enum.
2024-05-03 15:22:39 +00:00
Bruno Lopes
e96494d5a3 build/linux: Re-enable ccache in Flatpak builds
The move to Clang in 85ed2847 didn't take into account caching,
Now, this is fixed or, better saying, reintroduced(?): e545116b

Also, flatpak-builder output was confined to the .log file to make
possible checking the end of the CI output, which was being cut.
2024-05-02 08:58:29 -03:00
Marco Ciampa
254d4270e6 Updated Italian translation 2024-05-01 16:41:18 +02:00
bootchk
3a4d6387b3 ScriptFu: TinyScheme: fix closing of ports
Formerly, closing a port cleared all the attribute bits.
Then the port was not disposed of properly (leaked memory)
when the port was garbage collected.

Now, closing a port only clears the direction bits.
The kind of port is still known for a closed port.

Add test script for file port methods of Scheme.
2024-05-01 12:08:46 +00:00
Bruno Lopes
17ae809fd6 gitlab-ci: Fix Installer job using cache 2024-04-30 18:01:29 +00:00
Bruno Lopes
91811c4638 gitlab-ci: Improve the order of beginning of .yml
Pure cosmetical change to more linear reading. This makes related Keywords
more closer to each other.
2024-04-30 18:01:29 +00:00
Bruno Lopes
aef0348229 gitlab-ci: More little fixes regarding 'file-plug-in-tests' 2024-04-30 18:01:29 +00:00
Bruno Lopes
e2b77df5a2 gitlab-ci: Update cppcheck exclude dirs
To follow the latest changes (e.g. cross 32-bit drop).
2024-04-30 18:01:29 +00:00
Rodrigo Lledó
9f5e8604ca Update Spanish translation 2024-04-30 15:30:35 +00:00
Rodrigo Lledó
71ad6425bd Update Spanish translation 2024-04-30 15:29:12 +00:00
Rodrigo Lledó
b5a13b7cc8 Update Spanish translation 2024-04-30 15:26:36 +00:00
Alx Sa
0b171e9bae core: Copy NDE filters in layer group children
Resolves #10765
This allows us to retain any filters that a
layer group's children might have when
copied or exported. They were previously
lost when the group layer was duplicated.
Note that an OR condition was added to
GimpDrawableFilter creation, to allow
one to be created if the layer was 
attached to a parent layer rather than the
image.
2024-04-29 20:51:36 +00:00
Bruno Lopes
59b62c3355 build/windows: Make possible to execute Win cross artifact without the wrapper
The wrapper, like in native artifact, exists just for avoid searching the exe.
But, if the user wanted, wasn't possible to execute gimp-*.exe directly since
the wrapper was needed to generate loaders.cache. Now, loaders.cache are built.
2024-04-29 15:51:33 +00:00
Bruno Lopes
bf0671dac2 build/windows: Make clear that our Windows builds are not incomplete
This improves the gimp.cmd wrapper wording a bit to not need the README
anymore. Our dev site was improved some time ago to clarify this:
the Windows builds aren't not incomplete if run correctly (under MSYS2)

Also, add cleanup commands to make the .typelib wizardy less invasive.
2024-04-29 15:51:33 +00:00
Bruno Lopes
649f0c7747 build/windows: Update 'project_subdir' in gimp.cmd wrapper following 973c2dd7 2024-04-29 15:51:33 +00:00
Rodrigo Lledó
99d29f0345 Update Spanish translation 2024-04-29 11:48:35 +00:00
Cheesequake
10cc33b28e widgets: Deleting effects now deletes the selected effect instead of the topmost effect
Resolves #11404
Since the GimpContainer selected function automatically updates which filter is the
"active" selected filter, we can remove the code that sets it to NULL after a filter
is deleted. This fixes a bug where the top effect was always deleted in subsequent
attempts rather than the highlighted one.
A now unnecessary gimp_drawable_remove_last_filter () function was also removed.
2024-04-29 11:34:59 +00:00
Bruno Lopes
b080180955 gitlab-ci: Little changes in 'file-plug-in-tests' for consistency
Some details went unnoticed by me when reviewing the MR,
so Jacob authorized me to fix them separately.
2024-04-28 23:34:06 +00:00
Bruno Lopes
f7c5c5a6e0 build/windows: Update 'project_subdir' in MSIX following 973c2dd7
Also, drops manual removing of test plug-ins since they willn't be
installed at build time for stable versions, I suppose.
2024-04-28 19:05:18 -03:00
Bruno Lopes
e53d6df611 build/windows: Add 'GIMP.GIMPPreview' identity for testing purposes
Without this, Partner Center refuses the .MSIX by not matching the
entry Identity and DisplayName (which isn't the same as the stable).

Also, rework the naming of the .msix's to be more Microsoft-ish
2024-04-28 17:55:22 -03:00
Alan Mortensen
ef62625c27 Update Danish translation 2024-04-28 16:28:41 +00:00
Alan Mortensen
f80353e8ee Update Danish translation 2024-04-28 16:28:00 +00:00
Bruno Lopes
0a2433c062 build/linux: Fix failing Flatpak jobs due to old path 2024-04-28 14:24:48 +00:00
Yuri Chornoivan
6075afd70d Update Ukrainian translation 2024-04-28 05:58:56 +00:00
Jacob Boerema
97671dbab7 plug-ins, tests: fix #11408 test-file-plug-ins: permission error ...
for gimp-tests.log

On Linux we may not have permission to create a log at our default
location, so we need to check for that.

First we should not init the log when our plug-in is asked for info.
Only create it when we actually run the import or export tests.

Second, try to catch the permission error and write a message either
in GIMP or in the terminal for non-interactive.
2024-04-27 22:46:02 +00:00
Martin
b5c6b48bee Update Slovenian translation 2024-04-27 21:49:18 +00:00
Bruno Lopes
7503dd449a build/windows: Add 'qoi' back to the unified deps list
Following 93722e81. I forgot adding into the list
2024-04-27 16:37:05 -03:00
Jacob Boerema
5def9ffd09 plug-ins: don't crash file export tests when sections is None 2024-04-27 13:10:18 -04:00
Bruno Lopes
93722e81b5 build/windows: Remove a bit of actually dead code in msys2 scripts
This commit is mostly a little cleanup:
- Reduce redundancy in Local compatibility layer regarding build commands,
  which partily reverts !1171 regarding buggy "ninja && ninja install"
- Reduce redundancy of some variables (MSYS_PREFIX and GIMP_DISTRIB)
- Remove manual QOI install since MSYS2 granted a exception in the win32 drop

This commit also reverts 7cca69cd, a fix from the autotools era that isn't
actually needed according to my tests in CI.
2024-04-27 17:00:43 +00:00
Alx Sa
b283d9fe08 plug-ins: Port file-ps to GimpChoice
Resolves #9946
2024-04-27 16:49:31 +00:00
Martin
e1cc217057 Update Slovenian translation 2024-04-26 21:36:55 +00:00
Martin
76bf9174ad Update Slovenian translation 2024-04-26 21:34:49 +00:00
Yuri Chornoivan
510b557fc8 Update Ukrainian translation 2024-04-26 19:58:04 +00:00
Yuri Chornoivan
ac56004fd0 Update Ukrainian translation 2024-04-26 19:49:25 +00:00
Yuri Chornoivan
62f94d8746 Update Ukrainian translation 2024-04-26 19:44:08 +00:00
Sabri Ünal
bc6dbf87d6 Update Turkish translation 2024-04-26 17:31:21 +00:00
Sabri Ünal
339db86473 Update Turkish translation 2024-04-26 17:29:06 +00:00
Jacob Boerema
3478e1c00f plug-ins: add file-plug-in testing framework
Copied over from the original separate work in:
https://gitlab.gnome.org/Wormnest/gimp-file-plugin-tests
After that further improved and changed and added more file format
tests.

Added meson.build files to integrate it in our build, but we do not
install it for releases.
2024-04-26 12:28:47 -04:00
Rodrigo Lledó
44225ef1c0 Update Spanish translation 2024-04-26 12:11:08 +00:00
Jordi Mas
628a8d1f5b Update Catalan translation 2024-04-26 13:53:07 +02:00
Alx Sa
9a4d365d59 core: Copy correct filters to new layers
Should resolve #11392

In dfb26f37, the NDE filters in the copied image are
retrieved with gimp_image_get_layer_iter (). This works
fine for single layer images or when all the layers are copied
at once. However, if a subset is copied then the filters are always
copied starting from the top level of the image. This can result
in an incorrect filter being copied to the wrong layer.
To fix this, we get the filters from the provided drawables list
instead. This matches the number of layers in the copied
image exactly, since it was used to create the copied image.
2024-04-26 04:17:08 +00:00
Martin
9f1a099202 Update Slovenian translation 2024-04-25 19:59:07 +00:00
Bruno Lopes
ab4267d620 gitlab-ci: Fix custom builds being interrupted
This regression was added by c064148a and it's similar to fb7a9954. Now, that
we are using 'interruptible: false' in custom rules, this is probably fixed.

Also, organize a bit better some pipelines with official GitLab .yml wizardy.
I was hesitating to use "<<: *" since this creates a new layer of complexity,
but this was the better way and the trick have a distinct marking by the way.
2024-04-25 19:03:12 +00:00
Anders Jonsson
d83cf4d9b6 plug-ins: fix typo in file-raw-data 2024-04-25 18:18:38 +02:00
Ekaterine Papava
c28f63f119 Update Georgian translation 2024-04-25 14:51:19 +00:00
Alx Sa
ed557ad2bd plug-ins: Typo correction from 1247c8ba 2024-04-25 14:49:21 +00:00
Ekaterine Papava
596619d928 Update Georgian translation 2024-04-25 14:46:30 +00:00
Ekaterine Papava
62b3df3aa5 Update Georgian translation 2024-04-25 14:45:09 +00:00
Ekaterine Papava
81975732c0 Update Georgian translation 2024-04-25 14:43:10 +00:00
Alx Sa
62cdbfbafa plug-ins: Port file-jpeg to GimpChoice parameters 2024-04-25 14:04:23 +00:00
bootchk
20b19b960e ScriptFu: fix #10307 plugin call display not effective
This benefits script authors and testers of ScriptFu.

Now a call to (display "foo") in a plugin goes to the terminal where GIMP started.
Whether interactive or in batch mode.

Make TS errors go to an error port instead of the output port.

Tool plugins: Console, Eval, Server get error messages from the error port.
TextConsole not changed. Tools behave per new doc "ScriptFu Tools" at dev web site.

Driveby fix of SF Server: send whole message instead of byte by byte.

Driveby comments and more semantic checking of set-output-port in TS.

Add test plugin test-display.scm
2024-04-25 12:51:00 +00:00
Alx Sa
1247c8ba2e plug-ins: Port file-raw-data parameters to GimpChoice
In addition, this restores the palette options for HGT import
that were accidentally removed from 2.10. Mnemonics
were also added to parameters which were missing them
earlier.
2024-04-25 12:40:42 +00:00
Jehan
973c2dd710 meson: fixing the datadir/libdir/sysconfdir.
As noticd by Bruno, the meson port is inconsistent with our 2.10
autotools build here too (and therefore our data path standards).
Fixing.
2024-04-25 01:13:38 +02:00
Jehan
9d93160de6 Issue #11384: new Image automatically uses comment from active image. 2024-04-25 00:20:32 +02:00
Bruno Lopes
b494944f2f build: Add pedagogic README towards 'gimp-macos-build' repo
It's not obvious (when browsing in the repo) where the macOS files are.
Now, that we have one folder per OS, this became desirable for clarity.
2024-04-24 22:02:32 +00:00
Martin
9406b61a05 Update Slovenian translation 2024-04-24 21:31:47 +00:00
Jehan
c40dc612a5 tools: update the rm command for macOS.
Hopefully now the CI jobs can run?!
2024-04-24 23:31:05 +02:00
Martin
16d15dccf2 Update Slovenian translation 2024-04-24 21:30:11 +00:00
Anders Jonsson
80b7727770 Update POTFILES.in 2024-04-24 22:32:03 +02:00
Jehan
4e8f7c5be6 tools: fix in-build-gimp.sh on macOS.
This should hopefully fix:

> realpath: /Users/circleci/macports-gimp3-arm64/var/macports/build/_Users_circleci_project_ports_graphics_gimp3/gimp3/work/build/.GIMP3-build-config-: No such file or directory

Though it's harder to verify because of the "Intel macOS resource brownouts"
going on on CircleCI infra, and only x86_64 runners allowed me to SSH to them.
But I think that's the right fix seeing the error.
2024-04-24 21:57:15 +02:00
Jehan
55b5e14f69 plug-ins: port file-wmf-load to GimpVectorLoadProcedure.
The preview widget is a bit stretched, though at least I fix the contents to be
distorted (instead, the preview is fine but we've got black-filled parts
around). I'm not focusing on it because anyway, I'm not sure either if the
preview is that important, or (if it is) whether we should not just integrate it
as part of GimpVectorLoadProcedureDialog, i.e. for every vector images.
2024-04-24 21:57:15 +02:00
Martin
ecec798548 Update Slovenian translation 2024-04-24 19:32:10 +00:00
Bruno Lopes
5495483c76 gitlab-ci: Unify artifacts 'expire_in' time a bit more rationally
For our two "development" sub-stages, the expiration is as follows:
The 'dependencies' stage artifacts continues to expire in 2 hours.
Now, all 'gimp' ones expires in 2 days (to avoid time zone limbo).

For "stage"/tests and "production"/dist, the expire time depends
on the source of the CI pipeline. If the artifact is oriented to a
'short-span' source (e.g. MRs and commits), it expires in 2 days.
If is oriented to a 'LONG-span' one (e.g. web, schedule), 8 days
(we choose 8 to have a +1 day artifact just in case if something
goes wrong in the weekly schedule day, which isn't rare actually).
2024-04-24 18:35:56 +00:00
Jehan
390340b433 app: fix cases of missing data directories by always trying to mkdir them.
This happens in particular for in-build runs (or when using
GIMP3_DIRECTORY environment variable on an empty directory). In any
case, I don't see why we wouldn't try and create a directory which was
configured for data storage.
2024-04-24 19:48:59 +02:00
Jehan
3fbf34dabc meson: fails to compile with -Dpython=disabled flag.
We compile GObject-Introspection anyway (except for cross-builds, where
anyway we don't rely on local Python scripts), so even if not installing
the Python plug-ins, still use them locally.
2024-04-24 19:48:59 +02:00
Alx Sa
106706ca31 plug-ins: Fix IFS color updates
Resolves #11176

After the initial color space invasion, changing colors in the IFS color
transformation section no longer affected the image. It seems that
ifsD->*_cmap->color held the actual color selected by the user, but
this value was not making it into elements[ifsD->current_element]->v.*_color.
This patch connects the *_cmap->color values to the functions used
to draw the image on the screen.
2024-04-24 16:05:32 +00:00
bootchk
283ec65d79 ScriptFu: build: "stable release" not install test framework or test plugins
meson.build exclude subdirs script-fu/test/
and script-fu/scripts/test
on a stable release.
2024-04-24 14:32:53 +00:00
bootchk
60a584f91a ScriptFu: move test plugins and install more in unstable build
Move test plugins from /scripts to /scripts/test.
POTFILES.skip that directory.

Add a readme to scripts dir.

Revise readme in scripts/test

Rename test9.scm which tests the new byte type support in Scheme.
Install it in unstable build, it is an important test,
long and sophisticated.

Install contactsheet.scm as a test plugin in unstable build.
See test/meson.build for comments about its issue.
2024-04-24 14:32:53 +00:00
bootchk
deb4dc8190 Plugins: GUI: Fix redundant Clothify plugins
Formerly, both Clothify and "Clothify v3" are installed
in menu Filters>Artistic.
They are duplicates.

Clothify is the original using the old-style, homegrown interface.
"Clothify v3" is new-style, GimpProcedureDialog interface.

Both are marked for translation.
Only Clothify (v2) is translated (in potfiles.in)
"Clothify v3" is not translated (in potfiles.skip)
This commit does not break string freeze.

Moves "Clothify v3" to Demos menu.
It only installs in an unstable build.
The new is installed in unstable only for comparison with the old.

FUTURE: when no string freeze:
Swap the new and the old.
Move "Clothify v3" clothify-v3.scm to potfiles.in
and move "Clothify" clothify.scm to potfiles.skip.
Swap the menu items, so the user doesn't see "v3."
2024-04-24 14:32:53 +00:00
Jehan
25b9f677b1 libgimp: fix libgimp introspection.
- Fix a few broken references and an inconsistent argument name.
- Add the new headers in the introspectable header list.
- Add a few missing class descriptions for GimpProcedure and subclasses.
2024-04-24 16:05:41 +02:00
Jehan
dd6acc86fb libgimp: new fill_start() and fill_end() class method for GimpProcedureDialog.
Instead of filling default GUI for a specific type of plug-in procedure in
fill_list(), we add 2 methods:

* fill_start() is ensured to run once (and only once) before any fill_list()
  code runs.
* fill_end() is ensured to run once (and only once) after all fill_list() ran.

This takes care of 2 kind of GUI bugs which we could have:

1. First if no explicit fill were run (i.e. neither gimp_procedure_dialog_fill()
   nor gimp_procedure_dialog_fill_list() were ever run), then the default
   interface would not be added to the dialog. Yet this case could happen when
   we don't want anything else but the default GUI (this will be the case in the
   upcoming file-wmf-load GUI).
2. Second if at the opposite, you fill several times fill functions (I hadn't
   thought of this, but noticed some already started to do this in our ported
   plug-ins), we obviously don't want the default GUI to be added several times
   either.
2024-04-24 15:50:22 +02:00
Alx Sa
9a2774f7f9 libgimp: Fix casing in documentation 2024-04-24 11:34:01 +00:00
Jehan
c22515e0b7 plug-ins: port file-ps and file-svg to GimpVectorLoadProcedure. 2024-04-24 01:16:46 +02:00
Jehan
a931f4c93e plug-ins: port file-pdf-load to GimpVectorLoadProcedure and…
… GimpVectorLoadProcedureDialog.
2024-04-24 01:16:46 +02:00
Jehan
bed41ea3c0 libgimp: new GimpVectorLoadProcedureDialog widget.
As expected, it is made to reuse shared code for every GimpVectorLoadProcedure.
In particular, they all need to choose dimensions to load at, so we are sharing
a same GimpResolutionEntry widget logic everywhere now.

I am in fact still very unsure about the code logic for this widget by the way
for these reasons:

* It still puts too much emphasis on the "resolution" (pixel density) part,
  which makes people believe it's important, while they should in fact choose
  the pixel dimensions most of the time and not care about the pixel density.
* Right now we can't break ratio (which in fact was already impossible in most
  vector format plug-ins we had). Do we want to add a chain and allow this?
* If we consider the pixel density as the one we want to set the document with
  (which may not be the same thing as the one from when we load the document),
  we also want to break link between width/height dimensions and pixel density.
  Right now we can't (updating one field updates the others too).
* There is always this issue of precision with pixel density vs. pixel
  dimensions because we don't necessarily find the same values when computing
  from one side to another because of lack of precision and this confuses
  people.
* Finally there is the question of multi-page documents (e.g. PDF) where the
  chosen dimensions are the document dimensions whereas each page may have a
  different size which has to be recomputed independently and this got me
  off-by-one errors. I think I'll need to review a bit the logic, but I'll do
  once I've ported all the vector format load plug-ins first to see the most
  common usages.
2024-04-24 01:16:46 +02:00
Jehan
3a3f67ef95 libgimp: re-promote GimpResolutionEntry in its own file and improve its API.
The code comes from plug-ins/common/file-pdf-load.c and apparently it used to be
in libgimpwidgets (very long ago). I'm copying it to its own file and massively
improve the code (depending on property binding which makes the behavior much
more robust).

Still I left it as private because I don't want to say the API is finale without
having tested it a bit more. But eventually we should make it public for
plug-ins to use it directly too. When this happens, it should get back to
libgimpwidgets.
2024-04-24 01:16:46 +02:00
Jehan
768f871bc7 app, libgimp, pdb: new GimpVectorLoadProcedure class.
It's still basic but will help to share code for support of various vector-able
formats, such as the logic for dimensioning them, but also the generated GUI.

Not only this, but we are paving the way for the link layers (though it'll be
after GIMP 3, we want plug-in procedures' API to stay stable) by giving a way
for a plug-in procedure to advertize a vector format support. This way, the core
will know when a source file is vector and can be directly reloaded at any
target size (right now, in my MR for link layers, the list of "vector" formats
is hardcoded, which is not reliable).
2024-04-24 01:16:46 +02:00
Martin
c363991cad Update Slovenian translation 2024-04-23 21:58:44 +00:00
cheesequake
5c646830a5 Fixes #11338: Layers do not teleport to the bottom of the list if dragged onto the headers 2024-04-24 00:23:40 +05:30
Yuri Chornoivan
6c6ad24119 Update Ukrainian translation 2024-04-23 17:32:39 +00:00
Anders Jonsson
83dee0e43a app: translate link labels and tooltip in Welcome dialog 2024-04-23 14:57:25 +00:00
Bruno Lopes
f40ecca648 gitlab-ci, build: Enable ccache for win crossbuilds
Due to design, crossroad install everything in the same prefix. So, let's
drop the pkg caching (.cache) and reuse ccache path inherited from .default.
2024-04-23 14:08:55 +00:00
Alx Sa
47aabfc93a core, libgimpcolor: CMKY & HSL to float
Continuing 32d64ab1, this converts the
few instances of CMYK and HSL/A double
to float to match babl's precision.
2024-04-23 13:38:59 +00:00
Bruno Lopes
bffe62d43e gitlab-ci, build: Drop custom "CI_*" variables
Let's figure out what job is running using the predefined GitLab variables.
2024-04-23 13:20:29 +00:00
Yuri Chornoivan
1420e60f45 Update Ukrainian translation 2024-04-23 13:20:11 +00:00
bootchk
7b37d5bee8 GUI: Eliminate menu Filters>Development>Script-Fu>Test
Only affects unstable build.

Move remaining items to Demos.
They have names like "Test foo."
They only install on an unstable build.

The ScriptFu>Test menu is only in an unstable release.
It is untranslated.

The ScriptFu menus don't need to be so deep.
The Demos menu is an appropriate place for test plugins.

If the Demos menu is not in the stable release and translated,
Gimp creates the Demos menu and it is untranslated.
2024-04-23 07:57:32 -04:00
bootchk
f64115d3b2 Plugins: GUI: Move HelloWorld and Sphere plugin menu items to Demos menu.
The "Sphere" plugin demonstrate all the widgets for arguments of a plugin.
Only its menu label is translated.

The "Hello World" plugin demonstrates an independently interpreted SF plugin.
It has no translations, even of its menu label.

Formerly in ..ScriptFu>Test menu.

They still are installed even in a stable release.
If we don't want 3.0 stable to ship with demos,
need more changes to meson.build.

They are akin to the goat exercise plugins.
These plugins are expected to ship with the goat plugins in a stable build.
!!! But 2.10 did not ship with any demo plugins in stable build.

There are duplicate "Sphere" (v2) and "Sphere v3" plugins.

Does not break string freeze.

The new-style "Sphere v3" plugin moves to Demos.
It will be installed with stable build.
No translations will change.

"Sphere" (v2) will only be installed in an unstable build.

FUTURE: we should translate Hello World and Sphere v3.
If they are to ship as demos, their GUI should be translated.

FUTURE: low priority we could rename "Sphere v3" to just Sphere,
and Sphere to "Sphere v2" so there is no conflict.
2024-04-23 11:46:48 +00:00
Bruno Lopes
42356db4b4 gitlab-ci, build: Clarify DWARF debug symbols "extraction"
Partially reverts af79bbe0 (regarding .debug "extraction" in cross builds)

Now, we call the split debug script from the main bundling script, which makes
similar to our macOS .app bundling script. This cleans a bit of code in .yml
and make things clearer to the mere mortals in the scripts.
2024-04-23 07:53:48 -03:00
bootchk
c5c0976ed7 app: GUI: Delete root menu "Test", move its item to Demos
Its contents is a test plugin, "Test dialog".
I am responsible for it, and it is ugly, even in unstable.
Is only installed in an unstable build.

We need a convention that menu items for plugins named like "Test foo"
should only be installed in unstable build,
and should require no translations.

Note that if the Demos menu does not exist,
Gimp creates it, and it is not translated,
but only present in an unstable build.
2024-04-22 16:06:38 -04:00
Bruno Lopes
8ef4b40c8c build/windows: Fix Installer after native x64 and arm64 TWAIN drop
Native arm64 and x64 TWAIN binaries are not built anymore. No need to
discard at dist time what doesn't exist. (32-bit TWAIN not affected)

Also, start to using our own ARM64 runners to do the dist. This is more
reliable since the shared x64 runners can (and indeed) cause long queue.
2024-04-22 18:52:25 +00:00
Jacob Boerema
b3f8ad3eea libgimp: fix #11382 oversized export dialog with long comment
When there is a very long comment shown in the export dialog, the
dialog expands horizontally. Possibly making it wider than your screen
instead of wrapping the text.

Let's set word wrapping for the text view. That way the text will
wrap at a reasonable length and use the multiline text view instead
of just the first line.
2024-04-22 13:26:29 -04:00
Jürgen Benvenuti
5569e40b8c Update German translation 2024-04-22 17:16:15 +00:00
Alan Mortensen
44a3d88802 Update Danish translation 2024-04-22 16:38:14 +00:00
Alan Mortensen
5bf2bb901e Update Danish translation 2024-04-22 16:36:30 +00:00
Martin
290d5ccd67 Update Slovenian translation 2024-04-22 14:19:28 +00:00
Bruno Lopes
28ba5d6918 gitlab-ci: Silence universal variables
They were generating a distracting output in CLANG* shells, as noted by
@lillolollo in a comment from MR: Infrastructure/gimp-web-devel!65

In the process, make AppImage and Windows (native) scripts use these
variables, without hardcoding the same variables from .yml anymore.
2024-04-22 13:22:31 +00:00
bootchk
55cc32e7f4 ScriptFu: Plugins: fix #11346 broken "Export Palette" plugin.
Fix ScriptFu, CRITICAL handling filename args user-entered in old-style interface.

Fix plugin, changes to API re Resource i.e. Palette and Colormap

Add message giving mangled name of output file.

Driveby minor refactoring of plugin.

Driveby cleanup, remove old email addresses.

Driveby use script-fu-use-v3 binding to PDB.
2024-04-22 06:17:13 -04:00
Alx Sa
c691bd2a0b actions: Prevent crash due to non-existent editors
Resolves #10914

Some dockables such as "gimp-pattern-editor" and
"gimp-mybrush-editor" are listed as Editors even though
we don't yet have dedicated GimpDataEditors for them.
This causes problems when using certain features like
duplicating. To resolve for now, we check if
gimp_window_strategy_show_dockable_dialog () returns a
valid GimpDataEditor before trying to use it.
Per Jehan, we also verify that an edit button exists
and is visible before we try to call the edit command.
2024-04-22 01:24:36 +00:00
Jehan
2f9881c03f build, tools, gimp-data: removing gimp_exe_config_dir from the root meson.build.
Creating a temporary config directory for the in-build GIMP (run as a tool or
for unit-testing) is not done as a build target anymore, but in the
in-build-gimp.sh script as a unique temp directory, then cleaned out on exit.
This has a few advantages:

- It is properly cleaned out once the build ends (instead of leaving a full
  config dir as trash inside the build dir).
- It is not reused from one build to another (with risk of carrying bugs and
  issues over).
- Every use of the in-build GIMP will have its own config directory, and in
  particular when they are called in parallel.

As a side update, make sure that all `gimp_exe` runs depend on
`gimp_exe_depends`.
2024-04-21 20:43:29 -03:00
Jehan
a54253db04 build, gimp-data: all 'file-*-save' plug-in procedures got renamed to 'file-*-export'. 2024-04-21 18:18:44 -03:00
Bruno Lopes
a56cfc9080 build/windows: add UTF-8 support to non MS Store manifest
This is recommended by Microsoft for "*nix apps" and adding it to the
.exe manifest will avoid disparity between MSIX and other versions
(e.g. CI crossbuilds and CI native builds/installer/local builds).
2024-04-21 18:18:44 -03:00
Bruno Lopes
3f0532ba86 app, devel-docs: add a bit of MS Store documentation
See also: Infrastructure/gimp-web-devel!46
2024-04-21 18:18:35 -03:00
Jehan
a9c8420368 build/windows: fix submodule checkout failure
Bruno note: This commit was repurposed after ad132ad0.

---

For some reason, on the Windows/Aarch64 runners only, submodule updates fails
with:

> + git submodule update --init
> From https://gitlab.gnome.org/GNOME/gimp-data
>  * branch            d1041a4d97871c85538938872d0ace69d2fc44c2 -> FETCH_HEAD
> error: Your local changes to the following files would be overwritten by checkout:
>         images/README.md
>         images/logo/meson.build
>         images/meson.build

The big question was: why are there edits to begin with? This is supposed to be
a brand new clone!
After a bit of investigation, it turns out that the whole files have incorrect
EOL endings (a `git diff` returns every possible lines in the whole
repositories, but `git diff --ignore-cr-at-eol` returns nothing). It looks like
this breaks the submodule update.
2024-04-21 18:15:32 -03:00
Jehan
194eaf1312 build/windows: drop plug-ins .ico (it is now generated by gimp-data) 2024-04-21 18:15:32 -03:00
Jehan
b41fe61698 build/windows: generate fileicon .png's for MS Store and drop .ico
Also update the gimp.rc and delete the committed fileicon.ico now that
gimp-data generates this file the same way as these PNG fileicon-s.
2024-04-21 18:15:32 -03:00
Jehan
085d8a02b5 build/windows: generate a default XCF file to be copied by Windows
Attribute uap4:ShellNewFileName is meant as a template file to be copied when
someone initiate the Shell "New" command (via the Explorer context menu).
2024-04-21 18:15:31 -03:00
Bruno Lopes
4c968d9aa0 meson, build/windows: generate AppList, StoreLogo and *Tile .png's
Most of the work in this commit is by @Jehan.

These icons are used only by the .msix (MS Store) distribution of GIMP.

Some legacy icons are used only by Windows 10 and need to have smaller logo
than full image dimensions, so let's not use colorsvg2png. We just pass the
dimensions to use by configuring variants of the same base script.
2024-04-21 18:15:31 -03:00
Bruno Lopes
37045e477b gitlab-ci, build/windows: Add MS Store job to CI
The new dist job can produce two artifacts: a *.msixupload file
ready for submission and/or a *.msixbundle only for testing.

See the commit about the script for more details.
2024-04-21 18:15:18 -03:00
Jehan
8cf688ac16 meson, build/windows: generate .pdb (CodeView) debug symbols
This makes possible to debug with DIA SDK, if wanted by the developer.
Also, this is needed to create .appxsym files for MS Store debugging.

Ideally meson should be able to install for us, but apparently it doesn't.
See https://github.com/mesonbuild/meson/issues/12977
2024-04-21 18:13:47 -03:00
Bruno Lopes
184e2704a4 build/windows: Add MS Store dist script
Adds PowerShell script and proper manifest for making .msixupload
(only for releases) and/or .msixbundle (always, for testing).

As authorized by Jehan, 32-bit willn't be supported. The reasons are:
1. 32-bit is going to die when WIA plug-in is done. This can hurt reviews
2. 32-bit is being restricted in ARM64 version. This causes disparity
3. 32-bit is generating a big footprint. "This is bad for the environment"
   To be clear: we are discarding most of 32-bit artifact (see point 1)
   and what could not (TWAIN for x64 only, point 2) almost doubles .msix.

There is one small circumstantial reason too:
4. 32-bit wouldn't have .pdb even after GCC 14 because bins have same name
   as x64, and MS don't allow multiarch debug symbols in the same .appxsym
2024-04-21 18:12:38 -03:00
Jacob Boerema
9d133add5b build: openjpeg dependency was missing
Both in our Debian and Windows deps the openjpeg dependency was
missing, so let's add it back.
2024-04-21 12:40:41 -04:00
Jehan
c65aca8b17 plug-ins: rename various '*-save.[ch]' files to '*-export.[ch]'.
Though it's not visible and could happily wait for after GIMP 3 release, this
was annoying when grepping. Just did a quick cleanup.

I also removed gimprc.common which is a forgotten remnant from the autotools
build.
2024-04-21 16:48:58 +02:00
Alx Sa
32d64ab1c9 core, widgets: Convert HSV/A to float
Per Pippin, the only color model that can
have double precision is RGB/A.
Therefore, we need to switch all others to
use float instead. This patch converts the
HSV and HSVA double babl formats.
2024-04-21 03:42:27 +00:00
Bruno Lopes
2dc6f41114 gitlab-ci, build: Use 'bundling' naming instead of 'packaging'
As hinted in d09a2a6f

We now use the word 'bundle' to signify "program files in the same prefix"
(e.g. .appimage, .zip, .app). This is in line with our source and dev-docs
(just take a search in the repo). So, appimage and windows scripts changed.

The word 'package' normally means "program files distributed for install in
the same prefix or not" (e.g. .deb, .msi, .dmg). This is in line with CMake
naming of some commands, but meson prefers to call 'dist', which we use more.

So, this partly reverts some things of GNOME/gimp!1171 and reinforce others
for even more "rationality" in the overall build structure of GIMP.
2024-04-20 22:32:46 -03:00
Bruno Lopes
b1c25ca5dc gitlab-ci: Clarify some CI-wide variables 2024-04-20 23:23:39 +00:00
Jehan
0dc9ff7c06 libgimp: clean out the "interactive" intermediate dialog which was hidden…
… since forever anyway!

GIMP used to have a second export dialog, a generically generated one, appearing
either before or after (depending on when gimp_export_image() was called) the
custom export dialog implemented by the plug-in code. This has been hidden deep
in code since forever (since version 2.8.0 in fact, I believe) and only kept
hidden behind an environment variable "GIMP_INTERACTIVE_EXPORT". I don't think
we'll ever revive this, so let's clean up.

In fact, not one, but in worst case even 2 more dialogs were hidden behind this
variable! The first dialog (confirm_save_dialog()) was a confirmation when the
selected drawable was a layer mask or a channel (and not a layer). Most export
code don't even seem to care about the selected drawables anymore anyway (cf.
issue #7370), except with gimp_file_save() non-interactively (issue #8855),
which is a real mess of inconsistency anyway.

The second dialog (export_dialog()) was listing the various actions to do on a
copy of the image to help the plug-in (e.g. merge layers/flatten image, etc.)
and possibly give choices to some of these actions. Though there is definitely
no reason to request this kind of thing anymore, especially for a short-lasting
image copy, the list of action could still be interesting in the future, not as
information of what is going to be done, but as information of the kind of data
loss of the exported format. I could imagine we want to be able to reuse such
information for generating types of data loss per format in the export dialog,
in particular in the context of my long-term export workflow refactoring (from
which resizing before export such as #2531 are part of, but the whole
refactoring project is much wider).

In the whole discussion of #5858, there will be the question on whether we don't
want plug-ins to be directly given a "ready-to-use" image depending on
capabilities they advertized in create_procedure().
2024-04-21 00:16:27 +02:00
Jehan
b4f84dfd8f NEWS: update. 2024-04-20 23:51:53 +02:00
Alx Sa
7abcc97c6a modules: Swap ColorWheel to HSV float
Should resolve #11370

Per Pippin, HSV double is not a valid
color model for babl. We need to change
to HSV float to resolve the warning when
selecting colors on the Color Wheel.
2024-04-20 21:31:58 +00:00
Bruno Lopes
0c32125f1c gitlab-ci: Fix duplicate merge and push pipelines
This is a well know problem documented in GitLab docs that happens when
the CI isn't properly configured that was causing double pipelines in MRs.
Let's fix it, and reduce some redundancy.
2024-04-20 20:50:04 +00:00
Jehan
ef314804c4 Issue #11361: building fails on macOS.
This line should have never been pushed (in commit a78c41d2a3), my bad! It was
an early (extremely ugly and bad!) attempt to try and have the bindings see the
libraries another way than using DYLD_LIBRARY_PATH (which was instead resolved
with commit 3e980d5ad4).

This omission went unnoticed until I add `set -e` very likely as this failed
command would stop the script in failure.
2024-04-20 20:17:59 +02:00
Jehan
d661e8efb1 libgimpcolor: gimprgb-parse finally deleted.
- gimp_rgb_list_names() ported as gimp_color_list_names() using NUL-terminated
  GimpColorArray.
- GimpColorHexEntry uses the new function (and is therefore now GimpRGB free!).
- gimp_rgb_parse_name() deleted as it's unused since my previous commit.

With all this, gimprgb-parse.c is now deleted from the repository! \o/
2024-04-20 20:04:32 +02:00
Jehan
b31a465a9e plug-ins: port ifs-compose to GeglColor. 2024-04-20 20:04:32 +02:00
Bruno Lopes
6428e51f2a gitlab-ci: Move 'analysis' stage to a more "mainstream" position
I suppose the intention of having this stage at the end was to make clear: no
job depends on it. However, this place is not common or ideal but one of two:
1) before building, which is more linear; or 2) after building (the choosen)
even if this isn't dynamic analysis (tests), since they are both related and
some compilers and build systems do static analysis. Anyway, not after dist.

The new place is a bit  more clear to devs used at "build, test, deploy" praxis
and maybe will be now better noticed by the existing devs before distributing.
It's not perfect, since I explained above that there are two places/approaches.

Obviously, the stage continues to be OPTIONAL to pass, nothing was changed.

---

Also, dropped the deprecated "only:" (in clang-format job) in favor of "rules:"
and made the artifacts paths of clang-format and cppcheck more consistent.
2024-04-20 17:35:45 +00:00
Jehan
0f9b08c37e libgimpcolor: more GimpRGB-based functions are now unused. 2024-04-20 16:10:32 +02:00
bootchk
2914fd40ff ScriptFu: Test: maintenance, fix tests broken by changes to Gimp, add tests.
Fix tests broken by changes to gimp_data, wilber.png=>gimp-logo.png

Uncomment failing tests whose issue was fixed.

Remove calls to deprecated functions.

Make more test files use v3 binding script-fu-use-v3

Compare floats relatively by epsilon.

Add some missing tests.
2024-04-20 08:25:35 -04:00
Alx Sa
a0d040bddc libgimp: GimpSaveProcedure to GimpExportProcedure
This patch continues porting save API to
export for the 3.0 release.
2024-04-20 07:50:42 -04:00
Jehan
62ab8e2604 libgimp, libgimpcolor: make real unit test of old (compiled but unused) …
… test-color-parser.c file.

The file libgimpcolor/test-color-parser.c was compiled but never actually called
by the build. Now that we have a nice infrastructure to test libgimp API, I am
moving it there with the new format. Doing this also allowed me to discover some
bugs in CSS parsing, as well as discover Python binding was failing here (cf.
the few previous commits).

Only one test is disabled so far, the one where 4 digits are used per channel in
hexadecimal notation: "#64649595eded". This format simply doesn't appear
anywhere in the spec, and also the result values in the samples listing don't
even fit. So far, I'm just unsure what to do with it, if we want to keep this
support (of some kind of higher precision hex notation, but not specified, so is
it even used by anyone?) or not.

All the other tests just work in both C and Python!
2024-04-20 12:39:52 +02:00
Jehan
106d18605a libgimpcolor, app: gimp_color_parse_(css|hex|name)() renamed with _substring() suffix.
New functions with the same name as these functions are created, except without
the length argument (i.e. it's equivalent to calling these with -1).

The reason for this is that using strings with a length variant which may be
negative to switch to NUL-terminated strings are not bindable. At least in our
case, when testing in Python, the input string ended up as corrupted garbage and
GObject Introspection docs warns about such interfaces:

> In particular, avoid functions taking a const char * with a signed length that
> can be set to a negative value to let the function compute the string length
> in bytes. These functions are hard to bind, and require manual overrides.

(see: https://gi.readthedocs.io/en/latest/writingbindableapis.html#strings)

So instead, I create a simple version which runs on NUL-terminated strings only
and which is bound, whereas unbinding the generic length-version (making it
C-only, or maybe usable in some other bindings which ignore the (skip)
annotation; apparently some do this).
2024-04-20 12:37:20 +02:00
Jehan
d51cde85c1 plug-ins: script-fu is now GimpRGB-free. 2024-04-20 12:06:41 +02:00
Jehan
6a85efe92c libgimpcolor: gimp_rgb_parse_hex() is also unused. 2024-04-20 03:41:27 +02:00
Jehan
9f205ca63e libgimpcolor: fix CSS parsing.
- "transparent" is now recognized. It was forgotten (probably because on the
  GimpRGB interface, we separated the API in a _rgb_ and a _rgba_ variant).
- rgba() and hsla() formats are now fixed (implementation was there but the
  function names were not recognized.
- Adding some comment about limitations of the hexadecimal notation (we don't
  support the alpha channel which is now in the CSS specs, while we also support
  some non-specified variant with every channel on 3 or 4 digits) for future
  work.
2024-04-20 03:03:41 +02:00
Bruno Lopes
685fe6c0c5 data: Restrict 'default.env' to relocatable builds
The lack of distinction after 975c1891 was causing crashes in local builds.
2024-04-19 22:25:18 +00:00
Jehan
fde0b27754 plug-ins: add missing include.
This fixes:

> plug-ins/script-fu/script-fu-refresh.c:70:1: warning: no previous declaration for ‘script_fu_register_refresh_procedure’ [-Wmissing-declarations]
2024-04-19 23:58:18 +02:00
Jehan
0d39458d8d libgimpcolor: remove all gimp_rgb_*() utilities not in use anymore. 2024-04-19 23:58:18 +02:00
Martin
d23fd3fc9d Update Slovenian translation 2024-04-19 21:43:37 +00:00
Jehan
2b27feb2fd app, libgimp*, modules, pdb, plug-ins: new GimpParamColor.
This is meant to obsolete GeglParamColor with at least an additional argument
has_alpha which we need in GIMP. It allows to advertize when a parameter wants
an opaque color, which in particular means we know when displaying a GUI to pick
colors with alpha or not.
2024-04-19 23:25:13 +02:00
Jehan
cbb333c220 app: accept a NULL default color in plug-ins.
Our pluginrc code is already able to output NULL for a default NULL color, but
reading was failing with the following error:

> GIMP-Error: Error while parsing '/home/jehan/.config/GIMP/2.99/pluginrc' in line 289: unexpected identifier 'NULL', expected number (integer) - fatal parse error

Let's support reading such a value now, especially as for Python plug-ins, we
are not even able to add a default value to GeglColor arguments (cf. previous
commit).
2024-04-19 19:13:53 +02:00
Jehan
634fe62f74 Issue #11319: support GeglColor as generic GParamObject of type GeglColor.
In some binding (e.g. Python), we have not found how to create GeglParamColor
specs for PDB procedures, so we use GParamObject specs with `GeglColor`
object_type. Have our code handle both variants.

Fixes:

> GIMP-WARNING: _gimp_gp_param_def_to_param_spec: GParamSpec type unsupported 'GeglParamColor'

Of course such generic spec won't have any future option which we may add to a
dedicated param spec (and despite adding code to handle a default value, adding
a default color still doesn't work according to tests).
2024-04-19 19:13:53 +02:00
Yuri Chornoivan
642f12639a Update Ukrainian translation 2024-04-19 14:53:51 +00:00
Jehan
e7b7efafe9 app, libgimpcolor: no GValue GimpRGB anymore! 2024-04-19 14:42:08 +02:00
Jehan
a50759cda8 app, libgimp*, pdb, plug-ins: remove GimpRGB support in GIMP protocol.
There are no plug-ins which uses GimpRGB for procedure argument, nor is there
any base PDB procedure. We don't pass this type anymore through from/to
core/plug-ins. So let's clean the whole code out as a next step to get rid of
GimpRGB from our codebase!
2024-04-19 14:34:22 +02:00
Anders Jonsson
70b8e49e01 script-fu: fix calls to gimp-context-set-[pattern/brush]
Like in e31de151fa
these now need to work on an object rather than a name.
2024-04-19 12:37:45 +02:00
Alx Sa
97d6aa5904 widgets: Close Layer Effects popover when changing images
Resolves #11347

In multi-window mode, it is possible to change images without
causing the layer effects popover to close. This results in the prior
image's layer effects being shown over the new image, which is
confusing. This patch causes the popover to automatically close
when the image is changed to prevent this problem.
2024-04-19 01:58:56 +00:00
Bruno Lopes
9653e50e5f gitlab-ci, build: Unify Debian jobs and add AppImage artifact
AppImage is pretty fast to make, like the win crossbuild; and portable,
being very appropriate to do quick tests on Linux when pushing to git.

The overall organization of Debian jobs was changed to take advantage
of this and make things less complicated (but less clear at first sight).
I reinforce that this was the most efficent way to make the AppImage.
2024-04-18 20:54:49 -03:00
Jehan
df915494d1 gitlab-ci: hack-fix the broken job gimp-flatpak-x64.
This fix doesn't feel right. The whole point of having a generated manifest from
the build was to use it for our flatpak job (through job dependency). Right now,
it has been rendered useless. We must either re-implement the proper job
dependency or find another way to fill the proper "command" with the right
version (maybe just a standalone script to be used in Gitlab CI and which we
could tell about to people who wish to build the nightly flatpak themselves).

Anyway for now, it should do as I don't want to spend too long on this. It
should fix this error in the log generated as artefact of the "gimp-flatpak-x64"
job:

> ../build/flatpak/meson.build:6:2: ERROR: File org.gimp.GIMP-nightly.json.in does not exist.
2024-04-18 23:40:30 +00:00
Jehan
a9814c9e51 build: syncing dependencies with the beta flatpak.
Syncing dependencies back and forth with the current branch, preparing for 3.0.0
RC1 release: https://github.com/flathub/org.gimp.GIMP/pull/287
2024-04-18 23:40:30 +00:00
Alx Sa
e31de151fa scripts: Use GimpFont object in Render Font Map
Resolves #11354

Due to improvements in the text API, we have to pass a GimpFont
object as the last parameter of gimp-text-get-extents-font rather
than just a String.
2024-04-18 23:06:31 +00:00
Jordi Mas
26e116d9b1 Update Catalan translation 2024-04-18 22:23:21 +02:00
Bruno Lopes
975c1891ae data: Generate .env files at build time
These files has been generated by the installer scripts for historical reasons.
Now that we have full-blown local builds and the upcoming MS Store version,
this pervasive pratice can't continue since it creates disparity between builds.
2024-04-18 19:04:25 +00:00
Alx Sa
094ae8eec3 themes: Apply 77ee80f3 to generic spinbuttons
Resolves #11337
2024-04-18 18:57:37 +00:00
Alx Sa
77ee80f329 themes: Removing more instances of -gtk-icon-shadow
Per Bruno Lopes, we should extend aefdb84b to also cover
dropdown box arrows and GimpSpinScale buttons.
2024-04-18 18:06:35 +00:00
Sveinn í Felli
8b181f9925 Update Icelandic translation 2024-04-18 17:51:07 +00:00
Jacob Boerema
a367dec2f8 plug-ins: fix #10787 Page Setup warning/critical
When closing the Page Setup dialog we had warnings and criticals in
the terminal.
The cause for this was that we were looking for the temp procedure
to notify the print plug-in. However, this temp procedure is only
installed if the print plug-in is running, not when running the
Page Setup directly, in which case it is not needed.

We now check if the procedure is valid (meaning the print plug-in is
running) before calling the temp notify procedure.
2024-04-18 12:43:08 -04:00
Sveinn í Felli
bcf30d6c2f Update Icelandic translation 2024-04-18 16:42:49 +00:00
Sveinn í Felli
f04e01aa41 Update Icelandic translation 2024-04-18 16:41:08 +00:00
Alx Sa
ad5e612a1c plug-ins: Fix palette_sort after GeglColorPort
Resolves #11324

Similar to 403af188, we needed to update function calls
that assumed they were receiving a GimpRGB struct rather
than a GeglColor object. Future plans including adding Gegl
functions to retrieve HSV and HSL automatically, rather than
using gegl_color_get_bytes().
2024-04-18 15:42:27 +00:00
Jehan
2434c41a12 app, plug-ins: renaming the file-*-save-internal procs to file-*-export-internal. 2024-04-18 16:02:00 +02:00
Jehan
94853968b3 libgimp: also update unit testing for GimpColorArray.
Making sure not only that the PDB passes correctly the number of colors, but
taking one random color in the array and verifying it is correct.
2024-04-18 16:00:42 +02:00
Jehan
9f149ef3a2 app, libgimp*, plug-ins: get rid of GimpRGB arrays now that we have GeglColor arrays. 2024-04-18 16:00:42 +02:00
Anders Jonsson
2e536b6df1 plug-ins: change file-[gbr/gih/pat]-save to export
Fixes some scripts, followup to
c92cf7e8f2
2024-04-18 12:28:53 +00:00
megakite
e961ff0fe2 app/menus: update tool options menu while initializing menus 2024-04-18 10:22:11 +00:00
Alx Sa
403af1880f plug-ins: Fix GeglColor port of palette-offset
Removes an index that was needed to GimpRGB, but no longer
valid now that gimp_palette_entry_get_color () returns a GeglColor
object. Also, fixed an issue in Interactive Mode where the first
valid palette would be used for every other attempt, no matter which
palette you clicked on.
2024-04-18 04:02:48 +00:00
Alx Sa
dbbdbb45e1 core: Fix filter mask when copied to new image
Switch to using gimp_item_convert ()
instead of gimp_item_duplicate () so that
the filter mask can be properly associated
with a new image when copy/pasted.
2024-04-18 02:25:14 +00:00
Alx Sa
dfb26f37e7 core: Allow copy/pasting NDE filters
Previously, filters were lost when copying
individual layers. This patch copies them
to the clipboard image on cut or copy,
then copies them back to the pasted
image.
It also fixes an issue where filters would
be merged down if a selection was
copied instead of the entire layer.
2024-04-18 02:25:14 +00:00
Jehan
252f991cfb app: swapping gimp_prop_color_button_new() and gimp_prop_gegl_color_button_new().
Color propwidgets now use GeglColor only.
2024-04-18 00:37:20 +02:00
Jehan
80334f0eba app: gimp_gegl_color_new() is not used anywhere anymore.
We don't need to convert GimpRGB to GeglColor now as we work directly with
GeglColor!
2024-04-18 00:25:14 +02:00
Jehan
266e694920 libgimp: library unit testing should use a separate environment.
The comment I had written back then was wrong. Meson in fact can create an env
object from another with a simple assignment (which copies the object, rather
than pointing to a same object), per the answer which has been given to me in:
https://github.com/mesonbuild/meson/issues/13045

This allows to have a properly separate environment (when using GIMP as a build
tool, we don't want to load the test files).
2024-04-18 00:01:30 +02:00
Jehan
354970c0eb tools: make sure in-build-gimp.sh fails when the gimp-console command fails. 2024-04-18 00:01:30 +02:00
Jacob Boerema
204bc9390e plug-ins: compose needs to add .xcf filename extension
We are using `gimp_image_set_file` to set the filename, which
requires an extension, not doing so caused an error.
So let's add .xcf to all compose filenames.
2024-04-17 16:58:27 -04:00
Jacob Boerema
4aa3e7a475 plug-ins: fix #3480 decompose extension needs to be .xcf
When decomposing, the plug-in sets the filename without changing the
extension. However, gimp_image_set_file requires the filename to be
an .xcf file.

To fix this we simplified `generate_filename` to always add an
.xcf extension.
While doing this we also fixed a critical that happened when no
filename was set (new image), by testing `gimp_image_get_file` for
being NULL first.
When no filename was set it also didn't use the type when
config_as_layers was set, this is also fixed.
2024-04-17 16:58:27 -04:00
Alx Sa
2af0218d23 widgets: Do not show internal procedures as search actions
Resolves #11334

GBR, GIH, and PAT have internal save functions which are not meant
to be run directly. However, they were showing up in the Search dialogue
as valid options. This patch adds an additional check for "-internal" to
prevent users from accidentally running them, as they only give a warning.
2024-04-17 17:10:18 +00:00
Sveinn í Felli
64d994b198 Update Icelandic translation 2024-04-17 16:37:37 +00:00
Jehan
88d4033b98 Issue #9578: crash accessing tab menu.
The whole action name prefixing will definitely need to be straightened up in
our codebase at some point (differenciating the global actions and the local
ones).
2024-04-17 18:22:53 +02:00
Martin
3d2207558c Update Slovenian translation 2024-04-17 13:38:45 +00:00
Alx Sa
337ec4cd57 themes: Prevent "bold" button icons when focused
Extends aefdb84b to all buttons with images.
2024-04-17 10:37:49 +00:00
Yuri Chornoivan
5c287b9b9d Update Ukrainian translation 2024-04-17 10:16:55 +00:00
Sveinn í Felli
756e12efa1 Update Icelandic translation 2024-04-17 09:18:01 +00:00
Sveinn í Felli
5c610c203c Update Icelandic translation 2024-04-17 09:16:21 +00:00
Sveinn í Felli
7dd8b62860 Update Icelandic translation 2024-04-17 08:58:02 +00:00
Sveinn í Felli
554bb34371 Update Icelandic translation 2024-04-17 08:46:35 +00:00
Alx Sa
aefdb84bb4 themes: Prevent too thick image button border
Resolves #11337

"gtk-icon-shadow" is applied to all buttons with images,
which creates a bold effect on symbolic icons.
This patch zeroes this effect out and makes them highlight
the background in the same way as the toolbox buttons.
2024-04-17 04:15:17 +00:00
Jacob Boerema
ae2cf562e8 libgimpwidgets: fix #10821 Problem with LabelSpin widget
For certain min/max values of the LabelSpin widget, in combination with
zero digits, it proves impossible to change the initial value.
The reason for this is that the step size may become less than 1.0.
In which case, stepping doesn't work because the number of digits is
set to zero.

Let's check for this situation and when digits is zero set the step
to 1.0 and make sure that page is at least the same value.

While testing this I also noticed another issue: when initializing
the upper value was set to 0.0 and the lower to 1.0 which leads to
a critical because lower > upper.
We fix this by switching the initial upper and lower values.
2024-04-16 21:44:22 -04:00
Jordi Mas
b71464804d Fixes to Catalan translation 2024-04-16 21:58:22 +02:00
Jacob Boerema
f574dc7f0f plug-ins: add missing error message when TWAIN driver isn't found
There was no user feedback when our twain plug-in couldn't find the
(32-bit) TWAIN driver, making for a poor user experience.

Especially since nowadays the availability of the twain driver is
less likely, let's add an error message for the user, so they will
know what's going on.
2024-04-16 15:09:49 -04:00
Jehan
956a9fac6c Issue #10715: icon for effects.
We now have a proper icon thanks to Denis Rangelov!
2024-04-16 19:54:06 +02:00
Jehan
3e980d5ad4 libgimp: generate build-only GIR/Typelib variants for macOS.
The previous commit worked for all the compiled executables, but for Python
plug-ins (and likely all other GObject-Introspected bindings), we need to
generate a temporary typelib linking to the in-build-directory libgimp*
libraries.

This is similar to what the script `package/macports_build_app.sh` does for
packaging in gimp-macos-build repository.
2024-04-16 17:43:15 +00:00
Jehan
a78c41d2a3 meson: on macOS temporarily update rpath to find libraries of non-installed GIMP.
The DYLD_LIBRARY_PATH trick was working fine on CI, but not on local builds for
Lukas. Apparently there are security measures disabling the environment
variable. Instead let's temporarily add then remove libgimp libraries folders
from rpath.

See: https://gitlab.gnome.org/Infrastructure/gimp-macos-build/-/merge_requests/292#note_2075291
2024-04-16 17:43:15 +00:00
Yuri Chornoivan
7f76285bc8 Update Ukrainian translation 2024-04-16 17:16:31 +00:00
Alx Sa
c92cf7e8f2 plug-ins: Convert file_*_save to file_*_export
Resolves #10932

Since GIMP distinguishes between saving
XCF and exporting image like PNG,
we should change the PDB to show
export rather than save in the function
calls.
2024-04-16 16:07:10 +00:00
Bruno Lopes
d09a2a6f7a gitlab-ci: Drop 'packaging' stage
This stage was introduced in 076e4d68 and it fulfilled well its purpose. But
the side effects were: more (sometimes slow) uploading and downloading of
packages and artifacts. Even if we have caching, this is far from ideal.

Now, the so-called "packaging" jobs were moved inside in the "build" jobs.
The advantages are: just one pacman install (ideally cached from deps job);
direct packaging without waiting for upload/download; and less confusion,
since "packaging" naming was implying that the .zips are somewhat official,
which isn't totally true, and sometimes overlaps the dist/deploy concept.

---

Also, the flatpak job now uses config.h instead of triggering a GIMP build.
In other words, I'm reverting part of my work in some old commits.
2024-04-16 12:08:07 -03:00
Jehan
bf91e454fd app: fix build warnings.
Fix 2 "discards ‘const’ qualifier from pointer target type" warnings.
2024-04-16 16:40:36 +02:00
Jehan
f10d9a706d app: keep image reference with weak pointer in GimpStatusBar.
Unlike the previous 2 commits, this was not making an error but was the reason
why our code was keeping the last closed GimpImage alive a bit longer than it
should. In particular, the status bar code was keeping a hard reference to the
image until the focus changed, hence preventing the object to get finalized
longer than necessary.

Now it will also be a weak reference, so the image is immediately freed when the
view is closed.
2024-04-16 15:48:54 +02:00
Jehan
d888e95cfa app: keep track of image with a weak pointer.
Similar to the previous commit, but this time for the GimpAlignOptions.
2024-04-16 15:43:40 +02:00
Jehan
9abda0ab00 Issue #10826: crash when closing view.
Using weak pointers to make sure that the previously pointed image is still a
valid GimpImage.
2024-04-16 15:43:40 +02:00
Bruno Lopes
c064148a95 gitlab-ci: Make the CI a little more smart
Now, the CI will auto cancel jobs after a new commit is pushed and retry when
the runners fails. The first case is frequent, the last is rare but happened.
2024-04-16 08:57:14 -03:00
bootchk
4048556171 libgimpwidgets: fix #11255 unterminated Wayland window ID string
Copy the NULL when creating GBytes from a string.
2024-04-16 09:26:00 +00:00
Alx Sa
5b5a8f58e4 python: Fix ColorXHTML export
Since the GeglColor port, gimp_drawable_get_pixel () returns
a GeglColor rather than a GimpRGB structure. We needed to
update the supporting code in ColorXHTML to handle the change.
2024-04-16 01:57:01 +00:00
nb1
d8c98e74f3 Refreshing the templaterc 2024-04-15 23:46:32 +00:00
Anders Jonsson
bca4679fa3 python: fix translation of Spyrograph dropdowns 2024-04-15 23:19:02 +00:00
cheesequake
8153dffb92 Issue #9727: Reduced text area to improve Slider UX 2024-04-15 22:31:35 +00:00
Jacob Boerema
af8ef61a04 app, pdb: fix incorrect group checks for edit-cut and edit-named-cut
As a follow up to the previous commit, I noticed that the pdb functions
gimp-edit-cut and gimp-edit-named-cut also incorrectly used
gimp_pdb_item_is_group.

This can be seen by calling Filters/Blur/Tileable blur when a group
layer is selected. The error message was incorrect.
We replace the call here also to `! gimp_pdb_item_is_not_group`.
2024-04-15 18:13:32 -04:00
Jacob Boerema
7aa33bf771 app, pdb: fix #8363 gimp_selection_float() crash
Calling gimp_selection_float from a Python plug-in could make it crash
with an error like Calling error for procedure 'gimp-selection-float':
Item x cannot be used because it is not a group item.

This is caused by an incorrect check for group layers.
gimp_pdb_item_is_group returns an error when the condition is False,
while we only want an error when a group layer is selected (True).
Thus we need to use gimp_pdb_item_is_not_group, which returns an error
when the item is a group, which is what we want.

These function names are a little confusing, we might need to think
about better naming sometime.

I added C/Python tests for this function, so that we can test whether
this works correctly.
2024-04-15 18:13:32 -04:00
Jehan
140a3c82d0 Issue #10713: API versioning got broken with meson.
This is now back in sync with how it used to be up to GIMP 2.10. Basically our
API version should always be <major>.0 in the shared libraries naming, as well
as in pkg-config and docs. Otherwise we would break library compatibility with
every minor version bump.
2024-04-15 23:35:37 +02:00
Jehan
d7ec3a5ca4 tools: delete a remnant from autotools paths.
Library binaries are not under a hidden .libs/ directory anymore.
2024-04-15 23:35:37 +02:00
Alx Sa
167066a468 plug-ins: Get Blue channel in Palette-Sort
Per Elad Shahar, this should be v.b instead of v.r.
2024-04-15 18:12:29 +00:00
Alx Sa
15ffc4a6c0 plug-ins: Improve FITS import error handling
Code that checked if an image was NULL was run
*after* the variable was used in a function,
gimp_image_resize_to_layers (). This patch moves
the NULL check before the function call is made.
Additionally, we now verify there are at least two axis
before trying to access indexes in the naxis array.
2024-04-14 17:20:40 +00:00
Bruno Lopes
876c709a29 gitlab-ci: Move 'image:' from deprecated global to .default 2024-04-14 13:52:29 +00:00
Bruno Lopes
18079e176f gitlab-ci, build/windows: Unify a bit Windows (cross and native) jobs 2024-04-14 10:36:04 +00:00
Martin
d9694a6e38 Update Slovenian translation 2024-04-14 10:27:48 +00:00
Ngọc Quân Trần
761d740f9b Update Vietnamese translation 2024-04-14 08:01:24 +00:00
Ngọc Quân Trần
6ee9158cca Update Vietnamese translation 2024-04-14 03:10:09 +00:00
Ngọc Quân Trần
26d6aa4c6d Update Vietnamese translation 2024-04-14 03:08:43 +00:00
Bruno Lopes
ad132ad0fa gitlab-ci, build/windows: Organize 'git' variables 2024-04-13 20:47:47 -03:00
Bruno Lopes
5202935db7 gitlab-ci: Make use of 'before_script' less unorthodox
Since !1171 the 'before_script' was being used by me for organization, but
this is at least unexpected to "mainstream" .yml pratice and can be wrong.
For example, the universal variables can't be properly used this way.
So, let's use 'before_script' only for the (official) purpose: save code.
2024-04-13 23:12:34 +00:00
Alx Sa
437cb6b366 plug-ins: Use correct colormap in Flame
Resolves #11292

Since the GimpProcedureDialog port, the "settings-data"
parameter has been used to save and load the selected
color map. However, the parameter was not being updated
when the user switched colormaps in the GUI - therefore, it
always used the "Custom Gradient" option.
This patch updates the "settings-data" parameter after the
change to resolve the issue.
2024-04-13 22:42:01 +00:00
Bruno Lopes
28c65b8a5f gitlab-ci: Drop x86 (aka 32-bit) cross builds for Windows
This isn't directly related with #10922 and does NOT affect 32-bit support.

After talk with @Jehan, author of 'crossroad' and main dev of crossbuilds,
we decided that the x86 crossroad builds can be dropped by these reasons:

1) 32-bit crossbuilds weren't being built. They are used since c8ec0ae7 but
after the native 32-bit builds they ended in a state that they are the only
pipeline that isn't automatically triggered in any way, a complete limbo.

2) 32-bit crossbuilds weren't being autonomous. They are not working fine
with wine32 so the win-x64-cross artifact is a 'need' and now debian-x64,
so we were spending way more time fixing than using the 32-bit cross jobs
(sometimes the 32-bit cross jobs are just broken and we even noticed).
We have other jobs not autonomous but they don't have additional bugs
like not being able to build with .mng and .wmf (32-bit cross only bugs).

---

The x64 crossbuilds will continue to be supported. They are very useful to
develop on Linux, and test MRs on Windows. I'm an assiduous user of them :)
2024-04-13 18:25:47 +00:00
Alx Sa
1f2ce6fe58 plug-ins: Fix Flame crash on interactive run
Resolves #11283

In the GUI, set_flame_preview () is connected to GimpProcedureConfig's
"notify" signal. However it is not disconnected afterwards, so it runs again
after the plug-in is finished and the "setting-data" parameter is updated.
Since the preview area no longer exists, this causes a crash.
This patch resolves the issue by storing the callback ID and then disconnecting
after the GUI is closed.
2024-04-13 17:23:45 +00:00
Bruno Lopes
694e4f382c gitlab-ci: Remove unnecessary manual _ccache/ folder creation
This was added in a22393a6 and e96b751e, following old 2_build-gimp-msys2.sh.
But, according to my tests (local and in the CI, in both Debian and Windows),
meson creates this in setup time so the manual folder creation is redundant.
2024-04-13 16:44:36 +00:00
Bruno Lopes
28f893293a gitlab-ci: Reduce redundancy on Windows cross jobs (take 3)
Following 2c2e779f and 70886e55.
2024-04-13 15:51:32 +00:00
Yuri Chornoivan
9be2e641d1 Update Ukrainian translation 2024-04-13 15:48:39 +00:00
Anders Jonsson
3f0120578d plug-ins: fix duplicate Brightness labels in Flame 2024-04-13 14:37:19 +00:00
Jordi Mas
3d5ce372f9 Update Catalan translation 2024-04-13 15:52:50 +02:00
Bruno Lopes
2c2e779f92 gitlab-ci: Reduce redundancy on Windows cross jobs (take 2)
Following 129c1637a9
2024-04-13 10:00:56 -03:00
Bruno Lopes
bc8ef7998c gitlab-ci: Remove paradoxical redundancy on Windows native jobs
a22393a6 introduced redundancy while removing redundancy
2024-04-13 10:40:21 +00:00
Anders Jonsson
d7c693cc57 Update Swedish translation 2024-04-13 10:04:24 +00:00
Alx Sa
2ee847d8d0 actions: Hide Preview Size dockable option if not needed
Resolves #11250

In 2.10, we explicitly hid "dockable-preview-size-menu", the submenu
for Preview Size, if there were no previews to set sizes for in the
dockable dialogue. In 2.99, this code was removed as part of the
GAction port and code clean-up.
As a result, the Preview Size submenu is always visible even if the
options have no effect on the display. To restore the 2.10 behavior,
we set each Preview Size option's visibility. If all options are hidden,
the submenu does not appear.
2024-04-13 01:43:31 +00:00
Bruno Lopes
129c1637a9 gitlab-ci: Reduce redundancy on Windows cross jobs (take 1)
Our crossroad jobs are too "sensible" and prone to broke so let's go gradually.
2024-04-12 22:02:52 -03:00
Bruno Lopes
dcaaf8a48b gitlab-ci: Overall cosmetic change following e96b751e
Also, drops 'apt-cache' caching since after some experimenting with !1171
this proved to be of little use; and reorganize some dist and analysis jobs.
2024-04-12 21:57:29 +00:00
Guntupalli Karunakar
b35a105f99 Add Hindi translation 2024-04-12 16:36:24 +00:00
Bruno Lopes
e96b751e35 gitlab-ci: Reduce redundancy on Debian native jobs
* Move common things to the new .default section extensible for all jobs
* Reorganize order of job elements to be way more consistent and rational:
  from general (pipeline/rules) to specific (job artifacts) in a liner way
* The order of rules was changed to be a bit more easier to understand
- Drops 'dependencies' which is redudant, and 'needs' have more options
- Drop apt-cache which lost use and it is sometimes troublesome to cache
+ First try to boost the use of ccache in all build jobs, when possible
+ Fix the problem of non-failing jobs introduced by GNOME/gimp!1171
2024-04-12 16:05:42 +00:00
Jehan
9a353b9db9 libgimpwidgets: fix undeclared identifier.
Build for macOS on CI breaks with:

> ../gimp3-2.99.19/libgimpwidgets/gimppickbutton-quartz.c:210:45: error: use of undeclared identifier 'monitor_profile'
>       space = gimp_color_profile_get_space (monitor_profile,
2024-04-12 12:24:53 +02:00
Jehan
ef9de3c263 app: initialize font to NULL.
In case there are no fonts loaded (which may happen in particular when starting
with --no-fonts), we need to make sure that font is initialized to NULL so that
we can return the standard GimpFont object and not a broken pointer.

Thanks to Idriss for the additional diagnosis, which would hopefully complete
commit 5dc86277e6 and take care of #11219.
2024-04-12 12:23:00 +02:00
Martin
0df73ade6c Update Slovenian translation 2024-04-11 20:05:28 +00:00
Bruno Lopes
a22393a67e gitlab-ci: Reduce redundancy on Windows native jobs
This commit uses definitions and references to reduce repetition of CI code.
Some people (like the GitLab devs?) prefer (almost imposes) this to be done in
multiple .yml's using 'worfklow:' but this makes the CI way more complicated
and very slow to read. So, let's just keep simple in one human readable file.

---
Other changes are:
- The custom native arch pipelines now they always generate a .zip package.
  This helps to ensure that everything is in place and facilitate testing;
- The pacman update (-Syyuu) was removed since it is auto done by runners;
- The ccache config was moved to .yml. This does NOT affect local builds
  since meson saves ccache by default for user in '%LocalAppData%/ccache'.
2024-04-11 19:02:49 +00:00
Cheesequake
702d5e1e80 Issue #11071: Changed detailed_signal from "map" to "realize" to enable opening animations 2024-04-11 14:59:15 +00:00
Bruno Lopes
4652022368 gitlab-ci: Expose job artifacts in UI
Makes a bit easier to newcomers download the main artifacts in MRs.
(This feature doesn't support variables or wildcards in paths)
2024-04-11 07:42:13 -03:00
Yuri Chornoivan
c7b2bacbe2 Update Ukrainian translation 2024-04-11 10:28:06 +00:00
Jehan
5dc86277e6 app: set font factory as GimpFont class member regardless of fonts being loaded.
Previous code would only set the class member when we were actually
loading fonts, so we ended with code paths where the member was NULL.

Fixes:

> GIMP-CRITICAL: gimp_container_get_n_children: assertion 'GIMP_IS_CONTAINER (container)' failed

It should hopefully also fix #11219 (though I couldn't reproduce this
failure).
2024-04-11 12:15:59 +02:00
Jehan
3001c2d523 plug-ins: fix include.
This will fix the following warnings:

[1/30] Compiling C object plug-ins/script-fu/libscriptfu/libgimp-scriptfu-3.0.so.0.9900.19.p/script-fu-version.c.o
../../../../../../../greenmarmot/gimp/plug-ins/script-fu/libscriptfu/script-fu-version.c:49:1: warning: no previous declaration for ‘begin_interpret_v3_dialect’ [-Wmissing-declarations]
   49 | begin_interpret_v3_dialect (void)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../greenmarmot/gimp/plug-ins/script-fu/libscriptfu/script-fu-version.c:55:1: warning: no previous declaration for ‘begin_interpret_v2_dialect’ [-Wmissing-declarations]
   55 | begin_interpret_v2_dialect (void)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../greenmarmot/gimp/plug-ins/script-fu/libscriptfu/script-fu-version.c:62:1: warning: no previous declaration for ‘begin_interpret_default_dialect’ [-Wmissing-declarations]
   62 | begin_interpret_default_dialect (void)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../greenmarmot/gimp/plug-ins/script-fu/libscriptfu/script-fu-version.c:69:1: warning: no previous declaration for ‘is_interpret_v3_dialect’ [-Wmissing-declarations]
   69 | is_interpret_v3_dialect (void)
      | ^~~~~~~~~~~~~~~~~~~~~~~
2024-04-11 10:47:20 +02:00
lillolollo
9f86d6b8d0 libgimpwidgets: Replace deprecated CGColorSpaceCopyICCProfile with CGColorSpaceCopyICCData 2024-04-11 01:28:16 +00:00
Alx Sa
49c820e620 dialogs: Use error variable in Welcome Dialog
Resolves #11256

A GError variable was created but not passed to
file_open_with_display () when opening recent files.
As a result, if an error did occur the variable would be
used while it was still NULL. This patch fixes this
by passing a reference to error as the last parameter
of file_open_with_display ().
2024-04-11 01:25:42 +00:00
Anders Jonsson
8e8d2dd4c4 plug-ins: mark DDS progress strings as translatable 2024-04-10 15:30:00 +00:00
Jacob Boerema
5bda6e0623 plug-ins: fix failure to load certain mipmapped DDS images
We compute the size of the mipmapped layers wrong. We assume that
width, height are always exactly a power of 2, which is the normal case
for dds images. See issue #11256.

Since other sizes are possible, we adjust this by computing the width
times height times bytes per pixel of the current mimmap level.
2024-04-09 13:33:36 -04:00
Alx Sa
f346b1783b widgets: Disable DrawableChooser if no layer/channel selected
Resolves #11075

In the DrawableChooser pop-up, choosing an image without
also picking a layer or channel causes the pop-up not to
reappear on subsequent attempts to click it. This is because
the callback is only recreated when the drawable is updated,
and choosing just an image does not update the drawable.
For 3.0, we'll set the Okay button to insensitive unless a layer
or channel is picked.
2024-04-09 12:51:30 +00:00
Alx Sa
f726efba76 Don't convert to float before storing...
...in GeglColor. Just use the "u8" format.
2024-04-09 00:48:35 +00:00
Alx Sa
cc74d40769 libgimpwidgets: Port GimpPickButton to GeglColor
Also have "color-picked" signal send a
GeglColor object rather than GimpRGB.
2024-04-09 00:48:35 +00:00
Jacob Boerema
97e29cb7f6 plug-ins: some improvements to Photoshop layer reading code
I added a few improvements to how we load the Photoshop layers:
- When included from TIFF, we forgot to decrease the data_length for
the parts we already read.
- Also when included from TIFF, we need to skip the global layer mask
info.
- The block length for the layer data needs to be a multiple of 4.
- Catch an invalid data condition where block_len is greater than
total_len. This could cause a change total_len to a very large
value, so protect against that.
2024-04-08 18:07:33 -04:00
Jacob Boerema
c4de209322 plug-ins: incorrect size of Photoshop metadata in TIFF
When loading Photoshop metadata from TIFF images, the size of the data
in the temp file was often incorrect.
This happens because run_mode is usually GIMP_RUN_INTERACTIVE when
run from within GIMP. In interactive mode, the last saved config values
take precedence over the ones set in the function call, which is not
what we want in this case.
We would prefer to use interactive here, because then we can show a
dialog with a list of unsupported Photoshop features that were found
inside the image.
For now, we will use GIMP_RUN_NONINTERACTIVE and accept that we can't
do that at this time. This way we will at least have the correct values
when processing the Photoshop data.
2024-04-08 18:07:32 -04:00
Jacob Boerema
61614a39ca plug-ins: fix reading Photoshop clipping path
The clipping path values are all 2 bytes, but we were only reading in
1 byte for each value. In addition to that, the path_flatness_fixed
value was not converted to the correct Endian representation.

Since these values are usually 0 and get clamped to valid values, this
went unnoticed until now.
2024-04-08 18:07:31 -04:00
Jehan
adb479a63e plug-ins: fix warnings in recent libscriptfu commits.
Fixes 2 such warnings:

> warning: format ‘%i’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]

As well as:

> warning: conversion lacks type at end of format [-Wformat=]

And:

> warning: no previous declaration for ‘reset_output_port_struct’ [-Wmissing-declarations]
2024-04-08 20:43:27 +02:00
Jehan
378e80408d meson: share a same environment for all usages of self-built GIMP
In particular GIMP used for unit-testing, or in other cases as a build tool,
from the non-installed binaries, can use a same meson `env` object.
2024-04-08 20:30:51 +02:00
bootchk
9a2de135ee ScriptFu: fix #10698 and other issues with script progress
Fix unreported issue that new-style dialog using GimpProcedureDialog
does not display progress.

Change progress reporting to use app's status bar, for all scripts,
old and new style.
As before, report progress whenever a script calls a PDB procedure,
by putting the procedure name in the status bar.

Eliminate progress bar widget from old-style script dialog.
Since it was failing on Wayland, and since it is inconsitent
with new style dialog using GimpProcedureDialog.
2024-04-08 11:27:13 -04:00
Alx Sa
23807a3aa3 plug-ins: Port sparkle to GeglColor
Also remove one instance of GimpRGB in
cml-explorer. The remainder requires a
different approach to optimize the filter.
2024-04-07 23:17:12 +00:00
Alx Sa
0ec02a4fa9 libgimpwidgets: Fix CRITICAL when no monitor profile is set
Resolves #11246

On Windows, a CRITICAL was being repeatedly thrown if you
didn't have a monitor profile set. This is because we were trying to
pass a NULL value to g_utf16_to_utf8 () whenever we needed to
convert a GeglColor.
This patch fixes it by checking if the monitor profile filename is NULL
before trying to convert it.
2024-04-07 12:52:24 +00:00
Alx Sa
841d926f4b themes: Prevent .text-button from overwriting radio button background
Resolves #11244

GtkRadioButtons can also have the .text-button CSS class set. This class was overwriting
the radiobutton background color, making it appear dark and box-like.
This adds a specific radiobutton.text-button definition to ensure the background color
is consistent (as we had to do with checkbutton.text-button)
2024-04-07 00:06:52 +00:00
bootchk
2df7874216 ScriptFu: hide "Refresh Scripts"
It is broken and throws critical, see #10596.

Expedient to hide it instead of fixing it, to not block 3.0rc1.

As discussed in #10652, a user can simply restart GIMP instead.
"Refresh Scripts" is a poor design, a bandaid.
There are plans for better alternatives to install/remove scripts.

The MR for #10652 shows the reason it throws critical,
and could fix it,
but completing the MR requires time we don't have.
Note the MR is not on these files, but on core plugin machinery.

The change is to extract functions to a separate file,
and still build them, but not call them or link them.
They also are not translated while not being called.

Eventually, the extracted files can be deleted (or restored when they work.)
There is other related cruft that needs deletion in scheme-wrapper.c.
2024-04-06 14:33:13 -04:00
bootchk
0b9ec0e8b9 ScriptFu: TinyScheme: add call-with-output-string etc to dialect
Add canonical/idiomatic functions call-with-output-string,
call-with-input-string, any->string to the library init.scm.
Since they are useful, especially in test scripts and frameworks.

Remove their definitions from test scripts and test frameworks.

Also comment out failing test in test script string-escape.scm.
2024-04-06 13:43:33 +00:00
bootchk
bf59bf026b ScriptFu: TinyScheme: revise tests of byte operations
Redefine call-with-output-string etc. in the test script: test9.scm
Other fixes to the test script.

Improve logging of no memory condition for string-ports

Fix bug freeing ports that have been closed.
When ports are closed, string-port code was treating them as string-ports.
2024-04-06 13:43:33 +00:00
bootchk
d8e5d694d3 ScriptFu: TinyScheme: major revision and fix bugs string-port
Fix #11040 and #9495 bugs with unicode in string-ports

Fix other unreported bugs with allocations and garbage collection of string-ports.

Obsolete open-input-output-string, a string port of kind input-ouput is no longer supported
and the function actually opens a string-port of kind input which cannot be written.

Comments and Gimp style in the original TinyScheme code, now in string-port.c

Revise tests of string-port.

Update TinyScheme README: Discuss more thoroughly the ancestry, and changes from upstream.
2024-04-06 13:43:33 +00:00
bootchk
b32be06502 ScriptFu: TinyScheme: refactor string-port
Extract pseudo class string-port methods to separate file.

No functional changes intended.

Style changes not complete: anticipate further bug fixes and styling.
2024-04-06 13:43:33 +00:00
bootchk
96da006e4a ScriptFu: TinyScheme: delete unused functions for string-ports 2024-04-06 13:43:33 +00:00
Bruno Lopes
06b18b9c58 themes: Fix title bar mode (following 879cec87)
After the referenced commit, the title bar became to tall. This was
due to lack of testing. Now, both title bar and header bar are 36px.
2024-04-06 09:26:10 -03:00
Luca Bacci
d7228727d7 QuitDialog: disconnect signal handler on dialog destroy
...rather than finalize.

Fixes #10785
2024-04-04 20:18:56 +00:00
Jehan
1c2472a092 libgimpbase: support multiarch folders for binary relocability on Linux.
This is not seen on all distributions (mostly on Debian-based ones in my
experience), but some distributions install libraries in a second-level
directory under prefix (e.g. lib/x86_64-linux-gnu/ instead of lib/ or lib64/)
whereas our prefix-guessing code for relocatable builds harcoded moving up from
1 level.

This new heuristic will assume that if the leaf directory is neither bin/ nor
starting with `lib`, then it's likely a multiarch folder and we must move up
once more to find the prefix folder.

This should also fix the problem encountered by Bruno for the current work on a
potential official AppImage.
2024-04-04 22:10:58 +02:00
Jehan
1387d4d081 NEWS: update. 2024-04-04 18:15:23 +02:00
Alx Sa
0e3f34206a libgimpwidgets: Prevent FileChooser widget from crashing
We dereference "file" twice in gimp_prop_file_chooser_button_callback(),
once in the GIMP_IS_PARAM_SPEC_CONFIG_PATH () condition and then
at the end of the function. This is likely due to a similar structure in 2.10,
which did not have a second condition.
As a result, any Gegl filter which had a file property would crash if set from
a GUI. The first g_object_unref() is removed so we only dereference "file"
once.
2024-04-04 15:23:27 +00:00
Anders Jonsson
134c354a9e app, pdb, plug-ins: lower Spread limit for Distort
Distort can call plug-in-spread with Spread of 1000 which causes an error.
This limits it to 512 which is the highest allowed by gegl:noise-spread
2024-04-04 12:04:12 +00:00
Alx Sa
d0d63efac9 themes: Define box-shadow for tooltips on System theme
Applying cc120f1b to the System theme as well, so that the issue
is resolved for both.
2024-04-03 20:37:59 +00:00
Alx Sa
cc120f1bd9 themes: Define box-shadow for tooltips
Resolves #9795

(Solution provided by Andreas G, @uriesk)
Some system themes provide errant values for tooltip
box-shadows which cause flickering effects.
This patch defines the tooltip box-shadow to 0px to
prevent the issue.
2024-04-03 13:38:01 +00:00
cheesequake
63a134a2b2 Issue #11021: cairo-ARGB32 uses "associated alpha", so changed the new formats accordingly. 2024-04-03 03:12:12 +05:30
Nathan Follens
e34b5d3267 Update Dutch translation 2024-04-02 18:28:51 +00:00
Alx Sa
c44941ae28 core: Resize filters with group layers
Resolves #11054

NDE Filters clip to the size of the layer when
applied. Group layers get their dimensions from
the largest layers under them, so an empty
layer has dimensions of 0 by 0. This means a
filter applied when the layer group is empty will
be clipped to 0 by 0 as well.
This patch adds code to refresh the filter's crop
whenever the group layer is resized by a
layer being added or removed.
2024-04-02 16:36:46 +00:00
Bruno Lopes
70886e554f Partially reverts 9d279a60 and 4f965557
These commits introduced sensible drawbacks in our CI file organization.
Some of them I already commented in the MR but was "ignored" back then
probably due to the complexity of the MR. So, the let's revert:
- Unecessary repetition of libomp installation (4 times, now 1)
- Unecessary repetition of submodule initialization (6 times, now 4)
- Creation of new variables in the hope of more clarity. But,
  they aren't consistent with the gimp-web-devel instructions
  nor with other systems variables. This is terrible to undestand.
  Please, let's not reinvent the wheel since this is a bad example to
  packagers, since they tends to isolation and overly-engineering.

Also, made some little adjustments that I should have done in previous MR.

---

This MR was splitted. Even more simplification will be done in the future.
2024-04-02 11:55:33 +00:00
Alx Sa
10eb615eff widgets: Port gimp_get_color_tag_color ()...
...to accept GeglColor paramaters instead
of GimpRGB. This function is used to draw
the layer/channel color tags.
Note that a temporary GimpRGB was left
to use with gimp_rgb_composite ().
It will be replaced once that function is
also converted to use GeglColor.
2024-04-02 04:00:50 +00:00
Bruno Lopes
2f2027b757 gitlab-ci, build: Unify variables following gimp-web-devel
We should avoid disparity with the build instructions since
contributors will look at the CI files. See:
Infrastructure/gimp-web-devel!54 and Infrastructure/gimp-web-devel!65
2024-04-01 19:01:52 -03:00
Juliano de Souza Camargo
45198023bb Update Brazilian Portuguese translation 2024-04-01 12:42:02 +00:00
Ekaterine Papava
4e43e0ab07 Update Georgian translation 2024-04-01 03:14:45 +00:00
Anders Jonsson
3daaad08d4 app, pdb: raise limit for wavelength argument to Waves plug-in 2024-03-31 17:36:24 +00:00
Alx Sa
c17548f01c xcf: Save/load NDE filter clipping setting
752f0fb4 did not fix saving/loading filters
in .xcf files. To do this, a new function to
retrieve the clip setting was added to
gimpdrawablefilters.c, and then used to
save the value in xcf-save.c. The existing
set_clip function was used in xcf-load.c,
just like in 752f0fb4.
2024-03-31 17:30:00 +00:00
Nathan Follens
3749b23a6c Update Dutch translation 2024-03-31 15:31:01 +00:00
Martin
7aff667ac0 Update Slovenian translation 2024-03-31 15:20:47 +00:00
Alx Sa
752f0fb43d core: Copy filter clipping setting
Resolves #10997
When filters are duplicated for export, the clip property was
not being copied over. This caused filters that go outside the
layer boundaries (like Drop Shadow and Long Shadow) to be
clipped incorrectly. 
The simple fix was to copy over the clip value when the new
filter was duplicated.
2024-03-31 15:15:39 +00:00
Alx Sa
99e0446dfd libgimpcolor: Port gimp_cairo_checkerboard_create ()...
to GeglColor.
2024-03-31 01:09:45 +00:00
Martin
796ff8233d Update Slovenian translation 2024-03-30 22:38:03 +00:00
Rodrigo Lledó
a17d5b3ee6 Update Spanish translation 2024-03-30 19:16:45 +00:00
Rodrigo Lledó
cf056e2e2d Update Spanish translation 2024-03-30 19:14:54 +00:00
Alx Sa
a4cfa25822 core: Put floating selections under layer effects
Resolves #11147

Applying the same reordering code
in cbb1e816 to adding a floating selection.
When anchored, floating selections were also
merging down all layer effects onto the original
image. This patch places the float selection
under the layer effect when added, both to prevent
this and because it seems to be the expected
behavior based on user feedback.
2024-03-30 15:44:39 +00:00
Juliano de Souza Camargo
781581379a Update Brazilian Portuguese translation 2024-03-30 13:28:42 +00:00
Yuri Chornoivan
c67c9f23dc Update Ukrainian translation 2024-03-30 09:24:02 +00:00
Asier Sarasua Garmendia
00c2c00818 Update Basque translation 2024-03-30 08:14:49 +00:00
Asier Sarasua Garmendia
22cf668a1b Update Basque translation 2024-03-30 08:12:39 +00:00
Asier Sarasua Garmendia
d2a9558d20 Update Basque translation 2024-03-30 08:07:58 +00:00
Asier Sarasua Garmendia
c7a0aa28b5 Update Basque translation 2024-03-30 08:07:49 +00:00
Alx Sa
2cfe12deab plug-ins: Port file-xmc to GimpSaveProcedureDialog 2024-03-30 02:01:20 +00:00
Jordi Mas
ef4086e027 Fixes to Catalan translation 2024-03-29 19:35:52 +01:00
bootchk
1e104769d7 ScriptFu: tests of TinyScheme string-ports and string escapes
Add document about string-like objects in TinyScheme.

Add tests of several outstanding issues in TinyScheme.
In preparation for fixing them.
2024-03-29 10:03:44 +00:00
Martin
5ac6cf6e6c Update Slovenian translation 2024-03-29 06:43:18 +00:00
Alx Sa
3cccc0d319 libgimpwidgets: Get full color data from ColorArea
Resolves #11146

As Idriss Fekir and I noted,  5ce128a9 added support for
receiving GeglColor data to GimpColorAreas, but
retrieving it still resulted in RGBA application/x-color
values being stored when dragged.
This patch updates gimp_color_area_drag_data_get () to
give the format and profile information along with the
pixel values.
2024-03-29 04:01:12 +00:00
Jacob Boerema
1094ba1382 plug-ins: fix #11131 Crash loading PSD with extra layer channels
When loading a PSD with multiple extra layer channels, the PSD loader
crashes. We increase the number of layer_channels with 2 for every
extra channel found, which we only should do for the first extra to
skip the alpha channel.

We fix this by adding a check to see if this is the first extra channel
and in that case skip the alpha channel slot. Any other extra channel
will be added in the next available slot.

We also add an extra check in case we have extra channels when we do
not have an alpha channel in the layer. Not sure howe likely this is.
In that case we move the last extra channel to the slot reserved for
the alpha channel. That way we won't try to free non-existent alpha
channel data.

Note that eventually we should probably try to add these extra layer
channels are extra image channels in GIMP, since GIMP doesn't have the
concept of extra channels per layer.
2024-03-28 15:54:48 -04:00
Yuri Chornoivan
e6e6e9853c Update Ukrainian translation 2024-03-28 19:45:32 +00:00
Alx Sa
82d4bf26ad plug-ins: Port qbist to GimpProcedureDialog
Connected anti-aliasing GUI to a property so that
script writers could also configure this when running
the plug-in.
2024-03-28 17:55:50 +00:00
Sabri Ünal
e1170f2cb9 Update Turkish translation 2024-03-28 14:39:07 +00:00
Sabri Ünal
574199e5a0 Update Turkish translation 2024-03-28 14:38:55 +00:00
Sabri Ünal
d2a667ba1d Update Turkish translation 2024-03-28 14:38:15 +00:00
Sabri Ünal
0a640bc630 Update Turkish translation 2024-03-28 14:38:08 +00:00
Alx Sa
6a981012be widgets, plug-ins: GeglColor port and fix
The border-drawing code for Layer icons
has been ported to GeglColor. Note that
GimpViewRenderer still uses GimpRGB for
gimp_cairo_checkerboard_create (), which
will be fixed in a larger commit.

In 9bee3bed, Border Average's return
value was set to NULL rather than a valid
GeglColor when the procedure was
created, which caused a warning on
launch. This has been fixed.
2024-03-28 13:51:55 +00:00
Anders Jonsson
202d358991 pdb: raise max blur radius of plug-in-gauss-rle
Perspective shadow could call plug-in-gauss-rle with higher blur
radius than allowed in the wrapper. Raise the max value to
allow for this.

Fixes #11140
2024-03-28 12:59:34 +00:00
Jehan
85783b05aa gitmodules, gimp-data: set the default remote branch.
Now that the MR gimp-data!1 has been merged, we can pull the main branch.

Also syncing to latest commit to fix "dev-docs" job.
2024-03-28 04:30:59 +01:00
Jehan
5c14d937f9 gitlab-ci: fix dist-installer-weekly job.
Since dist-installer-weekly doesn't depend on gimp-debian-x64 anymore, we need
to grab the config.h from one of the other dependencies. Let's use the one from
gimp-win-a64 (though it could have been any other Windows build job).

Fixes:

> Get-Content : Cannot bind argument to parameter 'Path' because it is an empty string.
> At C:\_r\_builds\vJWzEqDv\0\GNOME\gimp\build\windows\gitlab-ci\4_dist-gimp-inno.ps1:13 char:39
> +     $GIMP_VERSION = Get-Content -Path "$CONFIG_PATH"         | Select ...
> +                                       ~~~~~~~~~~~~~~
>     + CategoryInfo          : InvalidData: (:) [Get-Content], ParameterBindingValidationException
>     + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.GetC
>    ontentCommand
2024-03-28 00:19:10 +01:00
Jehan
8c6177dc1a gitlab-ci: fix cross-builds.
The dependency to libomp apparently came with the move to CLang.

Fixes:

> /builds/GNOME/gimp/_install-debian-x64/bin/gimp-console-2.99: error while loading shared libraries: libomp.so.5: cannot open shared object file: No such file or directory
2024-03-28 00:19:10 +01:00
Jehan
be0e6b84e9 libgimpbase: do not "fix" paths in build environment.
When running GIMP in the build environment (even before it's installed), we
don't want to "fix" paths. We had the case in particular on the macOS CI where
the install PREFIX was a parent directory of the build directory and therefore
we were "fixing" some perfectly good constructed directories (set by meson) into
non-existing folder paths.

Additionally this codepath should only run when ENABLE_RELOCATABLE_RESOURCES is
set (even though this alone would not have fixed our CI issue because the macOS
build is relocatable).

Finally I am updating the gimp-data repository so that libraries are properly
found from the (now correct thanks to this commit) paths set by meson when
running gimp-console from within the build directory.
2024-03-28 00:19:10 +01:00
Jehan
8e7fc1d920 app: do not show the welcome dialog with the --no-interface option.
Fixes:

> (gimp-2.99:3763): GLib-CRITICAL **: 19:31:02.392: g_hash_table_size: assertion 'hash_table != NULL' failed
> GIMP-CRITICAL: gimp_translation_store_constructed: assertion 'lang_list != NULL' failed
2024-03-28 00:19:10 +01:00
Jehan
bde350fc28 app: fix CRITICAL when GIMP3_DIRECTORY env variable is set.
When the config directory is set by an environment variable, the version is
likely not part of the directory path, and therefore strstr() would return NULL.

Fixes:

> (gimp-console-2.99:41446): GLib-CRITICAL **: 13:19:34.933: g_vsnprintf: assertion 'n == 0 || string != NULL' failed
2024-03-28 00:19:10 +01:00
Jehan
4e274be6f3 Update INSTALL file and gimp-data submodule. 2024-03-28 00:19:10 +01:00
Jehan
c3840c63e8 build: gimp.ico now generated from the new icon. 2024-03-28 00:19:10 +01:00
Jehan
de7d0b3663 plug-ins: fix color mixup in "file-svg-load". 2024-03-28 00:19:10 +01:00
Jehan
4e3792d3f1 desktop: application icons are now generated from the new logo source SVG. 2024-03-28 00:19:10 +01:00
Jehan
42171503d4 data, plug-ins: logo images moved to gimp-data repository.
Now the development and stable logos will be generated from gimp-data.

In other changes, the gi-docgen logo is installed as a symlink using
install_symlink() which exists since meson 0.61.0 so I bumped our meson
dependency (in practice we were already using this function anyway and Debian
bookworm has meson 1.0.1 so it's all good).

Finally I don't install a wilber.png anymore, which was only used by script-fu
testing, and which was the same as gimp-logo.png (except 256x256 instead of
128x128). Unless mistaken, all script-fu tests loading this image still work
with the change. The only one where I needed further change was buffer.scm
(which was checking the dimensions).

See gimp-data@9aa6e35.
2024-03-28 00:19:10 +01:00
Jehan
4f9655573f build, gitlab-ci: update dependencies.
- With last commit, the Windows installer pipeline doesn't depend on
  "gimp-debian-x64" job anymore since a native Windows build is now able to run
  GIMP (or gimp-console) as a build-time tool as well. It makes the Windows
  installer pipeline (and full custom native builds) self-sufficient.
- On the other hand, "gimp-win-x64-cross" and "gimp-win-x86-cross" now require
  "gimp-debian-x64" since cross-compiling GIMP now requires a native GIMP in
  order to generate some image data (such as the splash image, and probably soon
  logo or icons, etc.). See gimp-data@5a03c71.
- Getting rid of "image-win-x64-cross" and "image-win-x86-cross" in favor of
  "image-debian-x64" for all Debian as well as the cross-compilation jobs. They
  are all based on the same Debian image (it was debian:bookworm for native
  Linux jobs and debian:testing for cross-builds; now it will be debian:bookwork
  for all) and it's just a few more packages (cross-compilation C and C++
  toolchains) for the cross-builds. Moreover now the cross-builds also need the
  native GIMP binary around, therefore native dependencies are needed as well.
  It makes sense to factorize all 3 images into 1.
- Make sure we don't build bindings when cross-compiling since these won't work
  in this case.
2024-03-28 00:19:10 +01:00
Jehan
530d8c6f9f app: fix running gimp or gimp-console as tool during build time on Windows.
This commit is in conjunction of gimp-data@d273a18 and finally makes Windows
build able to run GIMP main binary itself (or gimp-console) in order to create
various images, before the installation step.

- Use the new GIMP_TESTING_INTERPRETER_DIRS environment variable for uninstalled
  binary to find the .interp files (in particular because our build scripts are
  usually Python scripts these days).
- Use the new GIMP_TESTING_ENVIRON_DIRS environment variable to find .env files
  (actually running uninstalled GIMP binaries did run without this one, but it's
  not a bad idea to add support anyway.
2024-03-28 00:19:10 +01:00
Jehan
c6a6449dd0 app: swap ':' path separator to ';' on Windows.
The python.env file sets a ':' separator for GI_TYPELIB_PATH environment
variable, which breaks finding the correct typelib files in the CI, when also
manually setting a previous value for this environment variable.

I'm not entirely sure the rule of swapping ':' for ';' is universally true on
Windows, whichever the variable. Let's hope that it is.
2024-03-28 00:19:10 +01:00
Jehan
f6d4ebb286 libgimpbase: fix annotation.
Fixes:

> libgimpbase/gimpchoice.c:240: Warning: Gimp: gimp_choice_list_nicks: unknown parameter 'nick' in documentation comment
2024-03-28 00:19:10 +01:00
Jehan
fade73664e app, pdb: gimp_image_set_file() should accept compressed XCF variants. 2024-03-28 00:19:10 +01:00
Jehan
5fd29d7f9a libgimpbase: check EOF first. 2024-03-28 00:19:10 +01:00
Jehan
0b5b4173ab build, data: moving splash image to gimp-data repository.
- Splash images will now be stored from gimp-data.
- The installer BMP image scripts also move in the same time.
- We don't need devel and non-devel variants of the BMP images in InnoSetup
  scripts since the images are generated from the actual splash.
2024-03-28 00:19:10 +01:00
Jehan
dbb2f67e66 build: exit in error when ninja fails.
Not sure why it doesn't already since `set -e` stops the script immediately and
crossroad is supposed to pass the return value through.
2024-03-28 00:19:10 +01:00
Jehan
9d279a60ce meson: moving away from meson subprojects in favor of git submodules.
Meson subprojects just have too many problems and limitations and I can foresee
the maintenance headache and the future incoming false-positive bug reports if
we start using meson subprojects.

Comparing to the simplicity of git submodule which also has much better
notifications to help people understand when the submodule is not in sync and
how to remedy to it.

See commit gimp-data@c364adb explaining the main reasons in detail.
2024-03-28 00:19:10 +01:00
Jehan
1854e65667 build: use the icon file from the gimp-data subproject. 2024-03-28 00:19:10 +01:00
Jehan
67f5dd0df8 meson: pass the executable name to gimp-data to build gimp.ico.
Note that the executables are not built yet at this point, but we just need to
pass the name for configuration. The gimp.ico generation step is run manually
anyway and requires a fully functional and installed GIMP.

See commit gimp-data@40d4822.
2024-03-28 00:19:10 +01:00
Jehan
cbdd45723a data: moving brushes and patterns to gimp-data.
Symmetric removal commit of add commit gimp-data@c09aa01.
2024-03-28 00:19:10 +01:00
Jehan
2bda55fa9a meson: cursors are now hosted and installed from gimp-data too. 2024-03-28 00:19:10 +01:00
Jehan
008f7b5093 cursors: move all cursors to gimp-data repository.
This is the symmetrical removal commit of the add commit gimp-data@299204f.
2024-03-28 00:19:10 +01:00
Jehan
686897e35d meson: icons are now installed by making gimp-data a meson subproject.
This commit is separate from the previous to make it immediately clear (by
comparing files) that the previous commit is a simple move with no modification
whatsoever of the icons/ directory, i.e. the symmetrical removal of add commit
gimp-data@8b54490.

We now clone gimp-data as a meson subproject. I am currently testing the
subproject feature though I am doubting a bit because of its limitations: the
git clone is not updated automatically, nor are errors clear. Therefore it would
be easy to end up with outdated data for developers not manually and regularly
running:

> meson subprojects update

Worse, it looks like even when updating the suproject, it fails to be properly
reconfigured. See: https://github.com/mesonbuild/meson/issues/12898
2024-03-28 00:19:10 +01:00
Jehan
d57442eeeb icons: moved to gimp-data repository. 2024-03-28 00:19:10 +01:00
Bruno Lopes
85ed2847a6 gitlab-ci, build: Move to Clang in Flatpak (mostly)
In our efforts to use Clang, now the nightly (in fact weekly) flatpak
is built with Clang too, not only GIMP but also the dependencies.

* However, not aalib. We welcome fixes regarding this cursed lib.

Additionally, updated some build options from some deps.
2024-03-27 11:01:20 -03:00
Alx Sa
e4a4063f40 pdb: Fix selection offset bug in Plasma
Resolves #7672

The Plasma wrapper gets the boundaries
of its filter area using gimp_item_mask_intersect().
If used on a selection, this gives the x and y
coordinates relative to the total canvas.
However, the GEGL operation will be drawn
relative to the selection - so this offsets
the effect within the selection rather than
filling the full space.
This patch fixes the problem by setting
the x and y position to 0 when there is an
active selection.
2024-03-27 10:54:39 +00:00
Jordi Mas
f9a4d686a5 Update Catalan translation 2024-03-27 08:21:52 +01:00
Luming Zh
6293da2509 Update Chinese (China) translation 2024-03-27 03:07:01 +00:00
Luming Zh
21d36d1051 Update Chinese (China) translation 2024-03-27 03:03:45 +00:00
Luming Zh
a23bc85e66 Update Chinese (China) translation 2024-03-27 02:42:02 +00:00
Martin
e709f22359 Update Slovenian translation 2024-03-26 19:57:53 +00:00
Yuri Chornoivan
cebbec9d77 Update Ukrainian translation 2024-03-26 19:22:46 +00:00
Alx Sa
5fcee54d49 widgets: Prevent reordering actively edited layer effects
Layer effects that have not yet been committed are not
attached to the drawable. Trying to reorder them causes a
crash since they're required to be attached for undo/redo
purposes. This patch checks if they're committed beforehand,
and informs the user with a warning if it's not possible.
2024-03-26 16:58:34 +00:00
Alx Sa
5ce128a9fa libgimpwidgets: Allow colors to be dropped on ColorAreas
Post color space invasion, this function needed to read in
GeglColors directly rather than converting from GimpRGB.
2024-03-26 13:57:52 +00:00
Anders Jonsson
aaba366f0c plug-ins: avoid blinds crash by allowing MAX_FANS segments
In GIMP 2.10 the number of segments was restricted to MAX_FANS.
That was later changed to 1024 without increasing MAX_FANS
which can crash the plug-in.

Also change the max displacement angle back to 90 degrees. The interval
0 to 90 degrees is enough to return all possible values.

Fixes #11108
2024-03-25 21:50:34 +01:00
Bruno Lopes
8c3cce1737 build/windows: Remove redundant build options
These options are already auto set by babl and GEGL.
2024-03-25 15:55:34 +00:00
Marco Ciampa
6f7537b1fb Update Italian translation 2024-03-25 14:22:07 +00:00
Alx Sa
9bee3bed2a plug-ins, libgimpbase, text: Port border-average...
...to fully use and return GeglColor.
Also, fix gimptext-parasite sending a
GimpRGB to create a GimpText instead of
the now required GeglColor, and update
documentation in gimp_checks_get_colors
to reference GeglColor instead of GimpRGB.
2024-03-25 02:21:54 +00:00
Alx Sa
32c9a9a6cc plug-ins: Fix preview for Blinds GUI
Resolves #11092

Same fix as in 2b3b2af2, since Blinds and Jigsaw
were the two plug-ins which used GimpAspectPreview
before the port to GimpProcedureDialog.
2024-03-24 18:39:50 +00:00
Alx Sa
2b3b2af26d plug-ins: Fix preview for Jigsaw GUI
After the port to gimp_procedure_dialog_get_drawable_preview (),
the preview widget was being sized to the original drawable's dimensions
while the drawable was being redrawn with only its thumbnail dimensions.
This created a scrollbar that showed unallocated/overwritten buffers.

To fix, we update the preview size and boundaries whenever the preview
is changed. This removes the scrollbar and returns to 2.10 behavior.
2024-03-24 18:25:11 +00:00
Bruno Lopes
879cec8786 Issue #9999: Fix arbitrary headerbar height
The merged menu + title bar (headerbar mode) wasn't matching the height of
the title bar mode. This is inconsistent and, worse, ugly even in 768p.
2024-03-24 17:07:14 +00:00
Martin
d6d3451898 Update Slovenian translation 2024-03-24 16:09:00 +00:00
Yuri Chornoivan
94916bd596 Update Ukrainian translation 2024-03-24 14:58:45 +00:00
Alx Sa
d5c2585773 Issue #11098: Fix crash on saving PDF
Resolves #11098.
In f12687e9, a new parameter was put in the wrong order
in a call to draw_layer(). This caused a crash in
single layer PDF saves.
2024-03-24 13:56:42 +00:00
Rodrigo Lledó
b21cbf505d Update Spanish translation 2024-03-24 13:52:26 +00:00
Alx Sa
f12687e9f5 plug-ins: Port file-pdf-save-multi to GimpProcedureDialog
In addition to the port, mnemonics were added to both file-pdf-save-multi
and file-pdf-save's GUI parameters.
Some runtime warnings were also fixed, such as trying to use a NULL string
parameters to make a file and trying to access properties from file-pdf-save
that don't exist in file-pdf-save-multi.
2024-03-24 02:20:05 +00:00
Bruno Lopes
5de967aae9 gitlab-ci: Drop Windows resource .patch since MSYS2 now have LLVM 18 2024-03-23 20:07:54 -03:00
Alx Sa
ed1e8a62aa xcf: Set NDE filter visibility on load
The filter visibility setting was being loaded but
not actually used to set a filter invisible.
2024-03-23 21:31:20 +00:00
Jordi Mas
027a52bcae Update Catalan translation 2024-03-23 16:53:52 +01:00
Alx Sa
2e0d31b17e modules, core, pdb, plug-ins: GeglColor ports
More minor ports from GimpRGB to
GeglColor.
Note that file-mng's GimpRGB code was
already dummied out.
2024-03-23 07:16:02 -04:00
Alx Sa
db88383abb themes: Define no box-shadow on unselected tabs
As shown in a video for issue 11087, some system themes
may add a white box-shadow on the side of unselected
tabs. This patch forces box-shadow to "none" to prevent
this.
2024-03-22 16:27:55 +00:00
Rodrigo Lledó
9e0e56be95 Update Spanish translation 2024-03-22 15:10:31 +00:00
Marco Ciampa
b4895b0ff5 Updated Italian translation 2024-03-22 11:28:47 +01:00
Marco Ciampa
e0ee27f66f Updated Italian translation 2024-03-22 11:00:42 +01:00
Marco Ciampa
71c7d36009 Updated Italian translation 2024-03-22 10:06:14 +01:00
Alx Sa
fef2120dd3 xcf: Fix filter color saving bug
Resolves #11057
Per Idriss Fekir's research, data from GBytes
should be written before the GByte is freed.
Perhaps due to luck, the data persisted on
Windows but was freed too early on Linux.
This patch should resolve the issue.
2024-03-22 02:01:57 +00:00
Marco Ciampa
ec88bc40cc Updated Italian translation 2024-03-22 01:50:28 +01:00
Marco Ciampa
515f353737 Updated Italian translation 2024-03-22 01:47:09 +01:00
Ekaterine Papava
6f03b6934f Update Georgian translation 2024-03-21 23:33:27 +00:00
Ekaterine Papava
ba0646bdf3 Update Georgian translation 2024-03-21 23:27:36 +00:00
Alx Sa
3233aed0dc plug-ins: Fix Palette and Gradient functions
Resolves #11083

Per bootchk, changes in function calls to
palette_entry_get_color () and 
gradient_segment_get_left_color () were
broken in Python scripts due to GelColor
being used post Color Space Invasion.
This patch fixes the calls and returns.
2024-03-21 13:06:39 +00:00
bootchk
59b6c8fc8f ScriptFu: fix 11077: call gimp_ui_init in every run_func
More descriptive name for script-fu-interface-dialog

Delete SF flag for gimp_ui_init already called: gimp_ui_init can be called often.

FUTURE: might be faster to call just gegl_init when mode is non-interactive.
2024-03-20 11:35:48 +00:00
bootchk
fc310e0bed libgimpui: annotation of gimp_ui_init say it can be called often. 2024-03-20 11:35:48 +00:00
lillolollo
c72f91d69a remove extraneous parentheses 2024-03-20 10:27:07 +00:00
Yuri Chornoivan
d207fcde4a Update Ukrainian translation 2024-03-20 10:11:35 +00:00
Alx Sa
ef548fff65 widgets,modules,plug-ins: GeglColor ports
After the color space invasion, the
Clip Warning filter no longer had color
areas for its shadow, highlights, and
bogus color properties. This patch ports
them to GeglColor so the widget can be
created correctly.
GimpRGB structs are also converted to
GeglColor in GimpPanedBox and two
plug-ins.
2024-03-20 02:53:41 +00:00
Anders Jonsson
0bc99a29e1 Update Swedish translation 2024-03-19 22:02:36 +00:00
Anders Jonsson
188d00193a Update Swedish translation 2024-03-19 22:01:07 +00:00
Jehan
1158fc2119 app: make sure we just seek past unknown effect properties.
Otherwise we are not in a valid position anymore and further loading the XCF
fails. This may happen when updating a GEGL operation (in particular removing
effect properties, or renaming them).
2024-03-19 18:03:25 +01:00
Alx Sa
2b62976260 propgui: Port Color-To-Alpha GUI to GeglColor
The two threshold color pick buttons needed to have
a GeglColor parameter for their GimpPickerCallback
rather than a const GimpRGB.
This also fixes a crash caused by trying to free the GeglColor
rather than unreferencing it.
2024-03-19 14:32:14 +00:00
bootchk
2c664fac72 API PDB: resource-get-by-name return NULL instead of error
Without this, there is no easy way to quietly check for existence of a resource by name.
Needed when plugin authors can name defaults for resource args by name.

Add tests to script-fu/test/tests
2024-03-19 12:05:28 +00:00
Alx Sa
05af8c91c1 widgets: Minor GimpRGB to GeglColor ports
Mainly fixing GimpRGB comments and
parameters that are unused (or in unused
functions).
GimpCircle and GimpGradientChooser
have color conversions ported to use
GeglColor exclusively.
2024-03-19 04:40:14 +00:00
Jehan
f46c536ebb app: fix GEGL buffer leaks.
Since commit 10b96b1025, we had buffer leaks as soon as we ran filters.
gimp_drawable_get_buffer_with_effects() was either creating a new buffer (when a
drawable had filters) or not. And calling code couldn't know which is which.

Code needs to be consistent. Either we return a new reference to take ownership
to, or not. So let's change to add a new reference to the drawable' buffers so
that it always returns a new reference to free.
2024-03-18 22:08:03 +01:00
Martin
6e1cc909ce Update Slovenian translation 2024-03-18 17:23:46 +00:00
Marco Ciampa
256c795a10 Updated Italian translation 2024-03-18 12:52:50 +01:00
Jacob Boerema
0faa8f5460 plug-ins: fix #8453 Wrong order of layers in certain PSD files
So far, we did not consider that group layers could also be part of
a set of layers that have clipping set. This means that clipping groups
can be nested.

To support this we have completely rewritten the layer parser to detect
all clipping groups and mark them in a first pass. We now go through
the layers from the last (top) layer to the first (bottom) in this
first pass, because that makes it easier to detect the start/end
pairs of a clipping group.

In the second pass we handle the clipping groups first before adding
layers, except when a regular group is also the start of a clipping
group. In that case we need to handle the clipping after creating the
regular group, or we get an incorrect order.
2024-03-17 17:59:17 -04:00
Jacob Boerema
8a958d1568 plug-ins: refactor psd clipping group conversion into a ...
separate function
2024-03-17 17:59:17 -04:00
Jacob Boerema
f8b8ffa10e plug-ins: do not drop unsupported psd layers
Unsupported psd layers were dropped when loading psd images. This
causes problems when handling psd clipping groups, see issue #8453.

PSP also does not drop unsupported layers, so let's keep the layers
and accept that they will usually show up empty. This will help in
fixing clipping groups in a next step.

While we are at it, also remove the warnings that are only shown when
define CONVERSION_WARNINGS is TRUE (defaults to FALSE). We already
have a better way to show unsupported features, so at least for the
unsupported layers it is not needed anymore.
There are still some CONVERSION_WARNINGS warnings left over in the
blend modes conversion, which do not have a similar warning in our
unsupported features dialog.
2024-03-17 17:59:17 -04:00
Andi Chandler
f7c42b3bbf Update British English translation
(cherry picked from commit 4733819167)
2024-03-17 20:35:33 +00:00
Alx Sa
28b236b578 libgimpbase: Replace GimpRGB in gimpchecks
Converted to gdouble[] and updated in all 
calls to the enums in gegl_color_set_pixel()
2024-03-17 16:19:25 +00:00
Bruno Lopes
c2d8d6c45c .gitlab: Improve Feature request template
* Makes the wording more concise and "first contributor-friendly"
+ Adds info about submitting patches
* Makes the explanation of use cases implicitly mandatory
+ Adds discuss info to facilitate the redation of use cases
2024-03-16 20:25:03 +00:00
Bruno Lopes
9691665d52 gitlab-ci: Update jobs order
Following 5542748779
2024-03-16 15:38:51 -03:00
Rodrigo Lledó
5581b0b8b8 Update Spanish translation 2024-03-16 16:25:43 +00:00
Rodrigo Lledó
c0e7aebc8d Update Spanish translation 2024-03-16 16:22:49 +00:00
Rodrigo Lledó
cf97007ba8 Update Spanish translation 2024-03-16 16:15:08 +00:00
Rodrigo Lledó
1abcc8100c Update Spanish translation 2024-03-16 16:05:27 +00:00
Rodrigo Lledó
24062b9e50 Update Spanish translation 2024-03-16 16:01:18 +00:00
Bruno Lopes
e61b7e05ed build/windows: Port Installer script to .ps1
This commit unites two scripts (.sh + .bat) in one .ps1. PS was choosed, since:
1) We don't need MSYS2 to distribute with Inno at first. Now, who wants to
   just distribute GIMP can do it easier natively without a separate environ.
2) PS is actually pretty solid and have a good number of cmdlets, unlike the
   ancient CMD, which barely supported more than 9 parameters in .bat files.
   Consequently, some redundant variable checks have been removed from the .ISS.

Also, changes the name of the job and script for better consistency with the
upcoming MS Store job.
2024-03-16 15:24:45 +00:00
Rodrigo Lledó
d92ed3e496 Update Spanish translation 2024-03-16 14:48:24 +00:00
Bruno Lopes
a4e94d86ea Issue #8209: Don't install unselected components 2024-03-16 00:13:44 +00:00
Jürgen Benvenuti
5af2607525 Update German translation 2024-03-15 23:28:43 +00:00
Andi Chandler
3acedc30cf Update British English translation 2024-03-15 18:28:24 +00:00
Bruno Lopes
e89bca35c7 gitlab-ci, build: Move to Clang in Windows (native)
This makes possible to use the Universal C library provided by Microsoft.
2024-03-15 17:08:31 +00:00
Bruno Lopes
5542748779 gitlab-ci: Move to Clang in Debian
This makes the GEGL code execution a bit faster in Linux.
2024-03-15 17:08:31 +00:00
Jehan
c4d5f67388 Issue #11048: simplify the previous fix.
Though commit a14caafa8c was not wrong per-se, it's a bit too much. ;-)

Functions like g_ascii_dtostr() already exists for this very purpose of
converting a double/float to string in a locale-independent format.
2024-03-15 15:33:21 +01:00
Sabri Ünal
b8a9a1e9e9 Update Turkish translation 2024-03-15 13:38:40 +00:00
Sabri Ünal
f51c340c97 Update Turkish translation 2024-03-15 13:13:16 +00:00
Sabri Ünal
4bf425e188 Update Turkish translation 2024-03-15 13:12:11 +00:00
Sabri Ünal
1ca303132d Update Turkish translation 2024-03-15 13:12:05 +00:00
Sabri Ünal
14fc21d192 Update Turkish translation 2024-03-15 13:11:05 +00:00
Alx Sa
a14caafa8c gui: Prevent localization issues with font-size
CSS breaks when given a number with a comma as the radix
instead of a decimal. Depending on the system localization,
printf () may return numbers in this format when resizing
the font. This causes the theme to break unless font size is
set to 100.
To prevent this issue, we create the font size string manually
using integer division and mod operations.
2024-03-15 12:40:01 +00:00
Martin
7e58a00a74 Update Slovenian translation 2024-03-15 08:44:22 +00:00
Martin
3f6e3021da Update Slovenian translation 2024-03-15 08:36:08 +00:00
Jehan
11539e6d74 NEWS: update. 2024-03-15 02:48:51 +01:00
Yuri Chornoivan
4718645a0a Update Ukrainian translation 2024-03-14 18:30:15 +00:00
Yuri Chornoivan
02649e3d65 Update Ukrainian translation 2024-03-14 18:26:51 +00:00
Alx Sa
3767e1032d libgimpwidgets: Port GimpCellRendererColor...
...to use GeglColor rather than GimpRGB.
Also update the ColorHexEntry,
DynamicsOutputEditor, and the
colormap-remap plug-in which uses this
widget.
2024-03-14 00:40:02 -04:00
Alx Sa
917506d16e libgimp, dialogs, plug-ins: Minor fixes
- Replaces GimpRGB in Channel Dialog
with gdouble array, as was done in
channel_options_color_changed ()
- Replace %ld with G_GSIZE_FORMAT
in libgimp checkboard color message to
fix warning in Windows build
- Set file-gih documentation text as
translatable.
2024-03-14 01:41:31 +00:00
Jehan
4f14e89ed9 app: move the "Show on Start" checkbox inside "Create" tab.
I think I may even have been the one who suggested to make this checkbox always
visible, but after more thought and usage, I just realize that this option is
not about showing the Welcome dialog, but about showing the Create tab of the
Welcome dialog. So I move it to the Create tab.

A very obvious case where the previous option location could have been
considered wrong is that we will always show the dialog (on the "Welcome" tab)
for updates, even if this checkbox had been unchecked. So if we left it as a
global option of the dialog, this could be considered a bug (the option is
disabled, but the dialog still opens on updates), whereas the new position and
shortened label make it clearer that this settings only apply to whether or not
we show specifically the Create dialog on start.
2024-03-14 00:39:14 +01:00
Jehan
3b261e3b31 app: render the splash in Welcome dialog with no window background showing on the sides.
I think it's much prettier with no part of the window showing up on the left and
right sides.
2024-03-14 00:39:14 +01:00
Jehan
e93f35a521 app: do not waste that much space in the welcome dialog.
The splash image had a lot of empty space around it. From what I understood,
this is because we want to avoid it to be too big because it makes the dialog
overgrow the display size on small screens. But I don't think that was a very
good idea. We should find better ways to save space.
2024-03-14 00:39:14 +01:00
Anders Jonsson
c6cbb100d9 Update Swedish translation 2024-03-13 20:34:58 +00:00
Yuri Chornoivan
8952bf0e1d Update Ukrainian translation 2024-03-13 19:56:19 +00:00
Yuri Chornoivan
8b707e7271 Update Ukrainian translation 2024-03-13 19:48:44 +00:00
Alx Sa
234fa0e820 xcf: Save color profile for NDE filters
In d055564d, a pointer to the color profile
for NDE filter color properties was being
saved rather than the actual ICC profile.
This patch fixes the issue.
It also allows colors to load even if the
color profile is corrupted, with a warning.
2024-03-13 01:44:23 +00:00
lillolollo
dde1e5a054 App/core; Fix Critical floating object 2024-03-12 21:02:33 +00:00
Ekaterine Papava
33eca64697 Update Georgian translation 2024-03-12 17:54:16 +00:00
Alx Sa
86f62e8330 plug-ins: Replace GimpHSV in colormap-remap
Per bbb30eac, the GimpHSV object is replaced with
gegl_color_get_pixel () in "HSV double" color format.
GimpCellRendererColor still needs to be updated to
accept GeglColor rather than GimpRGB.
2024-03-12 16:01:52 +00:00
Stanislav Grinkov
bbb30eacfb plug-ins: Rewrite colormap-remap plugin
This commit fixes several issues with the plugin.

* Move plug-in to GimpProcedureDialog framework (see #9250)
* Use GimpPalette instead of (soon to be deprecated) Colormap (see #9477)
* Make plugin UI height, make it resizeable, update font sizes,
  paddings, etc (see #10533)

Further improvements most likely are needed because plugin still uses
GimpRGB and GimpHSV (former is used by GimpCellRendererColor, latter for
H, S, and V values)

Resolves: https://gitlab.gnome.org/GNOME/gimp/-/issues/10533
Resolves: https://gitlab.gnome.org/GNOME/gimp/-/issues/10749
2024-03-12 20:13:09 +05:00
Alx Sa
f39af05a48 devel-docs: Replace Gimp.RGB with Gegl.Color
Updating Python plug-in developer
instructions to use Gegl.Color instead of
Gimp.RGB.
2024-03-12 14:51:20 +00:00
Alx Sa
85bb1790b7 plug-ins: Restore GIH parameters from file
During the GimpProcedureConfigDialog port,
the "gimp-brush-pipe-parameters" parasite loading
code was unintentionally removed. This parasite
was used to restore the GIH parameters if it was
loaded as an image.
This patch restores that code on initial export as
GIH, then removes the parasite since the parameters
will be saved as part of the GimpProcedureConfig
going forward.
2024-03-11 18:37:28 +00:00
Jehan
7f35729c1e Issue #5342: Export to 16-bit PNG incorrectly sets background color to 8-bit. 2024-03-11 18:31:06 +01:00
bootchk
7a48cdccb4 ScriptFu: translations: Skip translating test script test-v3.scm 2024-03-11 11:14:36 -04:00
Sabri Ünal
98ef0c7adb Update Turkish translation 2024-03-11 14:41:25 +00:00
Sabri Ünal
e8b963a14b Update Turkish translation 2024-03-11 14:41:15 +00:00
Sabri Ünal
a34cf018ab Update Turkish translation 2024-03-11 14:39:40 +00:00
Jehan
9816d9a0bd build: sync with beta flatpak.
Update various dependencies.
2024-03-11 03:45:02 +01:00
Anders Jonsson
d4db1aa42c Update POTFILES.in
Followup to 0d512085f3
2024-03-10 21:19:22 +01:00
Rūdolfs Mazurs
4401ddfc20 Update Latvian translation 2024-03-10 15:48:06 +00:00
Ekaterine Papava
9d515f24e7 Update Georgian translation 2024-03-10 14:53:12 +00:00
Ekaterine Papava
6e4d78f91f Update Georgian translation 2024-03-10 14:51:00 +00:00
Ekaterine Papava
9203ff336c Update Georgian translation 2024-03-10 14:49:31 +00:00
Andre Klapper
f59f8a3df2 Save gradient as CSS: Remove outdated vendor-prefixed CSS extensions 2024-03-09 22:10:30 +00:00
bootchk
98bf051e7a Fix #10044 more natural binding of PDB return values
Allow (script-fu-use-v3) in script, or in SF Console.

Definitive description is in script-fu/docs/using-v3-binding.md

Makes SF interpret v3 of SF dialect.
  - marshals single return value from PDB without wrapping in list
  - marshals boolean return value from PDB as #t #f instead of integers
  - marshals boolean to PDB from #t and #f or TRUE and FALSE
  - marshals void return from PDB as () instead of (#t), but that is moot.

The version of SF dialect is distinct from the version of the PDB API.

Dialect v3 is opt-in: the initial dialect of all SF tools remains v2.

Commit also allows #t,#f for defaults of SF-TOGGLE instead of TRUE, FALSE
but that is an independent enhancement (but closely related.)

Affects interpreter state of the current process.
Not an attribute per se of a plugin.
While in this state, a plugin should not call PDB procedures
which are themselves v2 script plugins,
or a few utility scripts in script-fu-util.scm,
but that is rarely needed.

Does not remove symbols TRUE and FALSE from dialect.

A script can also call (script-fu-use-v2) to revert.
That is also discouraged but useful e.g. for testing.
2024-03-09 07:21:50 -05:00
Alx Sa
d4af93b256 libgimpcolor: Fix CAIRO_FORMAT_RGB96F babl format
As noted by Idriss, this should most likely be R'G'B' instead.
2024-03-08 20:56:32 +00:00
Anders Jonsson
b0cec7c771 Update Swedish translation 2024-03-08 19:53:48 +00:00
Anders Jonsson
0d512085f3 menus: move menus to submenus of tab menu
Fixes #9883

    There were menus that put their entries
    directly in the tab menu rather than in a submenu.

    This moves them to submenus to bring back GIMP 2.10 behavior.

    Stray entries added by scripts are also moved to the right
    submenu.
2024-03-08 17:48:38 +00:00
Kamil Burda
08c1fdc719 plug-ins: Replace guchar PDB parameters with more appropriate types
For improved readability, int or boolean types are used in place of
guchar for PDB parameters where the parameter description better fits
one or the other type.

This change affects `plug-in-alienmap2` and `plug-in-maze`.

Also, the problem with `guchar` parameters is that they currently cannot
 be modified via `GimpProcedureConfig` due to the type not being
supported.
2024-03-08 14:08:05 +00:00
cheesequake
905e8777a7 Fixes #11000: Cut now clears out the selection properly 2024-03-08 14:01:07 +00:00
bootchk
b854db9666 ScriptFu: fix #11013 ts-hello-world.scm crashes at query time
Call gimp_ui_init during query phase as well as run phase.

Maybe gimp_main() should do this.

Since space invasion from GimpRGB to GeglColor,
plugins that declare defaults for formal args of type GeglColor
need babl and gegl at plugin registration time.
2024-03-08 08:16:20 -05:00
bootchk
a2f01ff5f1 Test: add color/pixel related tests
Add more tests of selection by shape

Add test! statement to the test framework.
2024-03-08 11:49:38 +00:00
Bruno Lopes
3c129a79d5 build: Drop 'docker' draft folder
The 'Docker' draft of GIMP was introduced in 09/04/2017 and then died ONE day
after, mostly because of "bad" timing (few years later we moved to GitLab CI).

Similar (in fact, even worse) than 'jhbuild' folder, update it to keep the
current development status is so hard that it is equal to do it from scratch.
So it is reasonable to delete it anyway.
2024-03-08 10:15:29 +00:00
Yuri Chornoivan
d3e37fa538 Update Ukrainian translation 2024-03-07 21:39:09 +00:00
Philipp Kiemle
5460687766 Update German translation 2024-03-07 21:24:22 +00:00
Martin
aef14ef721 Update Slovenian translation 2024-03-07 18:41:09 +00:00
Martin
7d46e0c6b4 Update Slovenian translation 2024-03-07 18:31:24 +00:00
Martin
52c5869cae Update Slovenian translation 2024-03-07 18:30:11 +00:00
Martin
9fd37c82b3 Update Slovenian translation 2024-03-07 18:27:52 +00:00
Martin
4065f3fba4 Update Slovenian translation 2024-03-07 18:25:10 +00:00
Jacob Boerema
4bf2c1e1ba plug-ins: fix #10903 Missing metadata in OpenEXR images from darktable
Due to changes in our metadata handling API for plug-ins, the exif and
xmp metadata read from exr images was being overwritten by empty
metadata.

Fix this by following the new API and also add messages when loading
metadata fails. That way it will be easier to catch in the future if
metadata loading gets broken again.
2024-03-07 13:12:08 -05:00
Jacob Boerema
0585bc11d4 plug-ins: fix incorrect size when comparing jpeg exif marker in EXR loader
When defining jpeg_exr a closing \0 is automatically added by the
compiler. So when we compare it using sizeof, we do not compare
6 bytes but 7. Since there won't be three 0's, this will fail.

Fix this by reducing the size by 1 and also update the comment to
make this clear and further to add that this was changed after
darktable 4.0.0.
2024-03-07 13:12:08 -05:00
Jacob Boerema
f00ad15b7b libgimpbase: fix loading exif data from buffer
gimp_metadata_set_from_exif has special code for handling old-style
GIMP exif parasite data, but didn't check for the more common case
of loading exif data from image formats that can't be handled by exiv2.

The exif data in these formats usually start with the TIFF endian
markers instead of "Exif", which caused a failure to read this
metadata for e.g. EXR images, see issue #10903.

We change this function to check for "Exif" at the start of the data,
in which case we assume it to be the old-style exif parasite and in
that case add extra metadata as was previously always done.

In all other cases, we do not add extra metadata.
2024-03-07 13:12:08 -05:00
Kolbjørn Stuestøl
0c6c3d5347 Update Norwegian Nynorsk translation 2024-03-07 15:51:52 +00:00
Kolbjørn Stuestøl
7a5fd3120f Update Norwegian Nynorsk translation 2024-03-07 15:30:50 +00:00
Yuri Chornoivan
06fa6bad89 Update Ukrainian translation 2024-03-07 14:20:26 +00:00
Bruno Lopes
b51e0bc464 build/windows: Update some Installer strings
- Remove obsolete GtkWimp and Compat strings
* Update 32-bit string
2024-03-07 10:42:34 +00:00
Bruno Lopes
a0512f5aae build/windows: Clean *gimp3264.iss regarding 2.0 series InstallDelete
These files are not deleted when the Unstable (GIMP 2.99) or Stable (GIMP 3)
version are installed because the root is different. So, they can be removed.
2024-03-07 10:08:34 +00:00
Sabri Ünal
bc6252dcdf Update Turkish translation 2024-03-07 09:24:32 +00:00
Sabri Ünal
e0853f9141 Update Turkish translation 2024-03-07 09:24:28 +00:00
Alx Sa
63ea1e2b5f plug-ins: Get monitor after screenshot dialogue
Resolves #11004

During the port to GimpProcedureDialog, the code
that assigned the current monitor object for
Windows and MacOS was accidentally removed.
This patch restores this code in the proper place.
2024-03-07 03:14:48 +00:00
Alx Sa
69314ba087 tools: Add NDE support for group layers
This patch allows NDE filters to be
applied to group layers as well.
The "merge down" function is disabled.
2024-03-06 22:04:28 +00:00
bootchk
71b41c68c2 ScriptFu: fix #11010 unhandled return type GimpColorArray
Add a case to the marshalling of return types from the PDB,
for the new type GimpColorArray.

test case is gimp-palette-get-colors in tests palette.scm
2024-03-06 14:48:41 -05:00
bootchk
4c16b20d69 2.99 Tests: add more tests
Add tests of Drawable.
2024-03-06 10:45:44 -05:00
bootchk
279341a237 ScriptFu: fix #11001
At script create time, create a GimpRGB i.e. pixel from the declared name of default color.

At plugin procedure registration time, convert that pixel to GeglColor,
and use that color to declare the color arg using GeglParamSpecColor(default=color)

Fixes a faulty fix a few commits back where we lost the declared color name.
The proper dataflow is  name->color->paramspec-with-default-color.
2024-03-06 09:55:38 -05:00
bootchk
f7c876dfd3 2.99 ScriptFu: refactor, extract methods of color and resource
Extract methods related to color into new file.
So method names document what is being done.
So related code is together.

Ditto for resource.

No functional change.

Preparing for changes to reset/default and changes to representation of pixels
in lists of differing lengths rgb vs rgba.
2024-03-06 08:07:11 -05:00
Idriss Fekir
0f32312e26 widgets: Fix error on text color selection
Resolves #11003

GeglColor defaults to NULL rather than black like
GimpRGB. When selecting text with two or more colors
in the total selection, this causes NULL to be passed
to gimp_color_button_set_color () which throws an error.
This patch resolves the issue by setting GeglColor to
black if it's NULL before the call.
2024-03-06 06:37:13 -05:00
Yuri Chornoivan
a905208873 Update Ukrainian translation 2024-03-05 20:09:50 +00:00
Alx Sa
0c26cd442a operations: Port semi-flatten to GeglColor
After the color space invasion, the
Semi-Flatten GUI was broken since it still
used GimpRGB as its color property.
This patch fixes this by porting to
GeglColor. The GimpRGB conversion was
also removed from the PDB interface
since the GeglColor comes directly from
GimpContext.
2024-03-05 18:30:53 +00:00
Rodrigo Lledó
29cac9eaef Update Spanish translation 2024-03-05 12:35:40 +00:00
Rodrigo Lledó
98894383dd Update Spanish translation 2024-03-05 12:06:13 +00:00
Luming Zh
c7b6444543 Update Chinese (China) translation 2024-03-05 08:52:42 +00:00
Alx Sa
625b74ea00 pdb: Update text-layer-set-color to GeglColor
Resolves #10992.

GimpTextLayer's color attribute was
updated from GimpRGB to GeglColor,
but gimp-text-layer-set-color still passed
in GimpRGB. This patch updates the PDB
call to match the property type.
2024-03-05 01:42:22 +00:00
cheesequake
1a76346ed5 Fixes:#10933 context swatch crash issue 2024-03-04 21:10:36 +00:00
Jacob Boerema
a22a2a5b15 plug-ins: fix overwriting a GError in PCX loader
In the previous commit I overlooked one other case where the GError
can be overwritten. Fix this by using g_prefix_error.
2024-03-04 15:53:06 -05:00
bootchk
b2af8b6c2c ScriptFu fix #10982 broken build, and spurious CRITICAL
Fixes errors introduced by my prior commit c0ca0b74

1. SF is storing colors in GimpRGB, not GeglColor.
Storing using wrong pointer type seemed to work, but would not build on newer compilers.

2. spurious error message "CRITICAL....Two different plugins tried to register..."
Due to calling gimp_ui_init too early, in the class instance init.
2024-03-04 17:21:17 +00:00
Jacob Boerema
4cb6ee45a1 plug-ins: fix double free when loading invalid PCX image
When testing on Debian with acertain invalid PCX imagea that return
"Invalid number of bytes per line in PCX header", we get an error:
free(): double free detected in tcache 2
On Windows this doesn't cause an error, most likely due to a different
implementation of fclose.

The problem is that in case of errors fclose was called twice. Since
the file is opened outside the load_image functions, let's handle
closing also only outside that function.

In addition to that, change all g_message error notices to use
g_set_error instead, that way we always return a GError in case of an
error.

Further we also fix a possible error case of overwriting an existing
error by using g_prefix_error when the error is already set.
2024-03-04 11:32:42 -05:00
Alx Sa
2f94edfe8c tools: Switch to GeglColorButton for mask-color
Resolves #10990.

Since the "mask-color" property is now a GeglColor,
we need to use gimp_prop_gegl_color_button_new ()
rather than gimp_prop_color_button_new () to
display it in the options panel.
2024-03-04 12:17:26 +00:00
Emin Tufan Çetin
fa5373d99a Update Turkish translation 2024-03-04 01:11:02 +00:00
Alx Sa
d055564d26 xcf: Save/Load color property for NDE filters 2024-03-03 21:07:37 +00:00
Yuri Chornoivan
387503507c Update Ukrainian translation 2024-03-03 19:10:28 +00:00
Martin
d9c33636a3 Update Slovenian translation 2024-03-03 16:25:45 +00:00
Anders Jonsson
97e19ff931 plug-ins: mark xmc tooltips as translatable 2024-03-03 11:25:19 +01:00
Luming Zh
e0dab4172f Update Chinese (China) translation 2024-03-03 08:48:31 +00:00
Alx Sa
3b37ab4fb2 plug-ins: Convert GIFs to 8 bit on export
During the sanity_check (), we verify an image is 8 bit
before exporting as a GIF. If it isn't, we try to convert
and notify the user.
2024-03-02 20:41:14 -05:00
Martin
b639c05a05 Update Slovenian translation 2024-03-02 21:29:23 +00:00
Martin
d7a783823c Update Slovenian translation 2024-03-02 21:25:06 +00:00
Martin
80a0d76933 Update Slovenian translation 2024-03-02 21:22:47 +00:00
Martin
51d1a4f1cc Update Slovenian translation 2024-03-02 21:15:25 +00:00
Martin
753c7ba2c5 Update Slovenian translation 2024-03-02 21:12:37 +00:00
Balázs Úr
967e352d7a Update Hungarian translation 2024-03-02 19:44:42 +00:00
Bruno Lopes
683c6a3063 Issue #10960: Make disabled checkboxes less confusing 2024-03-02 12:59:33 -03:00
Balázs Meskó
6d7a67fb45 Update Hungarian translation 2024-03-02 10:06:00 +00:00
Alx Sa
a16219bf4b dialogs: Fix buttons missing their style class
Per @brunolopesdsilv, the About and Quit
dialogues had custom buttons which did
not receive the text-button CSS style.
This patch adds those back so the buttons
match the styling of the others in the
dialogue.
2024-03-02 03:55:08 +00:00
Yuri Chornoivan
823ab560c6 Update Ukrainian translation 2024-03-01 21:42:23 +00:00
Jacob Boerema
9626ad6803 plug-ins: fix crash when loading pcx image where bytesperline is 0
Previous pcx commit da217088d0 fixed
loading pcx images that had an off by one value for bytesperline.
However, it did not take into account that a value of 0 would be
invalid, causing a crash.

We fix this by adding a check for 0 and also failing in that case.
2024-03-01 13:24:49 -05:00
bootchk
c0ca0b74a9 2.99 ScriptFu: #10958 Missing color widgets in v3 dialogs
Since PDB now traffics in GeglColor instead of GimpRGB.

Change GimpParamSpecRGB to GeglParamSpecColor when declaring args to procedure.
Declared default is temporarily "black".

Change conversion of gvalue to scheme representation, now from GeglColor.

Incidental change to interpreter to init gegl early,
since now needed during registration phase.
2024-03-01 09:54:06 -05:00
Luming Zh
b4110ec3b2 Update Chinese (China) translation 2024-03-01 10:46:48 +00:00
Jehan
0b87030928 Issue #10776: Hide "Edit > Manage Extensions" for the release.
The extension format's official release is pushed for after GIMP 3 release.
Let's not leave this dialog around as it would confuse people.
2024-03-01 00:51:22 +01:00
Jehan
978a16d2e5 Issue #573: rename "Truncate" repeat type to "None (truncate)" and reorder the enum.
This commit is based on a patch submitted by Kiyotaka NISHIBORI many years ago.
2024-03-01 00:33:28 +01:00
Jordi Mas
e7575f63e2 Update Catalan translation 2024-02-29 20:18:47 +01:00
Jehan
4e7cc4afea Issue #10795: "(null)" tooltip on some tab menu items. 2024-02-29 19:07:48 +01:00
Jehan
baae7287be libgimp: allow to run gimp_procedure_run_config() with no config object.
This is the equivalent to run the procedure with its defaults.
2024-02-29 16:33:32 +01:00
Jehan
01cdf777a6 libgimp: add C tests to the libgimp testing infrastructure.
Most of the C boiler-plate code is generated so that all you have to do is
implement the run() function with test code in it.

Also adding a README to make it all very clear and easy to add new tests.
2024-02-29 16:19:49 +01:00
Jehan
bf0b774261 libgimp: gimp_pdb_lookup_procedure() returns NULL if procedure doesn't exist.
Right now, it was always returning a GimpProcedure even if the PDB procedure
didn't exist (the GimpProcedure was therefore invalid).
2024-02-29 14:13:21 +01:00
Jehan
237015dc69 libgimpbase: workaround needed to write ampersand in g-ir-docs.
Fixes:

> [2636/2644] Generating devel-docs/g-ir-docs/g-ir-Gimp-python-cache with a custom command
> file:///builds/GNOME/gimp/_build-x64/meson-private/dist-build/devel-docs/g-ir-docs/pages/python/Gimp-3.0/Gimp.ColorArray.page:22: parser error : EntityRef: expecting ';'
> NULL);</p>  <p>GeglColors **colors;</p>  <p>g_object_get (obj, "colors", &colors
>                                                                                ^
2024-02-29 12:52:26 +01:00
Jehan
7b43a7492f libgimp: new unit testing framework for libgimp.
With Python binding, it gets very easy to test new functions. I've been
wondering if we need C counterparts, but really since it's a GObject
Introspection binding, if a function succeeds there, it should also succeed in C
code.

For now, I'm testing a few of GimpPalette API. Not all of it yet. Also I test
both the direct C binding and PDB procedure since in some cases, one or the
other may not properly working. See #10885.
2024-02-28 22:55:58 +01:00
Jehan
3f79f3589d Issue #10885: gimp-palette-get-colors warning and critical when…
… accessed from Python.

Creating a new function gimp_value_array_get_color_array(). This should normally
not be needed (it isn't in C), but because of GObject Introspection limitation
and the fact that pygobject will automatically try to convert GValue to the
embedded value, we get this weird situation where the result is unusable in
Python for certain types. One of these types is GimpColorArray.

I suggest an annotation request to GObject Introspection:
https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/492

I think that with such annotation, followed as a second step by pygobject
support, correctly handling NULL terminated C arrays generically should be
feasible by bindings.
2024-02-28 22:55:58 +01:00
Jehan
d6a134e6c1 plug-ins: import Babl and Gegl modules in python-eval plug-in.
This makes it easier to run babl and GEGL code directly through the command line
or script files.
2024-02-28 22:55:58 +01:00
Jordi Mas
84c0584aea Update Catalan translation 2024-02-28 22:15:11 +01:00
Alx Sa
10b96b1025 core: Show preview with NDE filters
Resolves #10762.

Updates gimpdrawable-preview.c to use
gimp_drawable_get_buffer_with_effects (),
which includes any NDE Filters applied to
the layer in the preview.
The preview is also set to update when a
filter is applied non-destructively.
2024-02-28 11:34:31 +00:00
Alfred Wingate
46a1580018 libgimpbase libgimpwidgets: install needed headers
* These headers weren't installed despite being included by other
  installed headers.

Bug: https://gitlab.gnome.org/GNOME/gimp/-/issues/10132
Bug: https://bugs.gentoo.org/920535
Signed-off-by: Alfred Wingate <parona@protonmail.com>
2024-02-28 05:53:54 +00:00
Ekaterine Papava
71329f106b Update Georgian translation 2024-02-28 04:56:58 +00:00
Ekaterine Papava
ba0dc0474b Update Georgian translation 2024-02-28 04:52:47 +00:00
Jehan
71d03d5828 Issue #10885: gimp-palette-get-colors warning and critical.
We were missing GimpColorArray support in one function. Note that the specific
example in Python in #10885 still doesn't work, but for a second reason:
gimp_value_array_index() returns a GValue which pygobject automatically tries to
transform to the contained data. And unfortunately it doesn't know about our
GimpColorArray type so we end with unusable boxed type generic data.
2024-02-27 22:46:48 +01:00
Jehan
d9c440614b Issue #10899: Image Recovery and Welcome dialog conflicting with each other.
Since the Image Recovery dialog is blocking the main process (and requires an
answer to be done first), let's simply move down the Welcome dialog to after
this answer was given. This way, we simply won't have both dialogs in the same
time.
2024-02-27 18:06:50 +01:00
Jordi Mas
920efa45b2 Update Catalan translation 2024-02-27 16:31:55 +01:00
Jehan
eacb3ebf82 app, libgimp, pdb: gimp_layer_new() allows a NULL name.
Our core code allows a NULL name, so there is no reason not to. We just have to
explain the rules (basically: you don't choose the name!).
2024-02-26 23:19:55 +01:00
Jehan
a1b7b4dedd plug-ins: "file-ico-save" procedure doesn't care about hot spots.
Hot spot coordinates are only for cursors.
2024-02-26 23:19:42 +01:00
Asier Sarasua Garmendia
ba686fcd17 Update Basque translation 2024-02-26 20:30:24 +00:00
Asier Sarasua Garmendia
34ce526b07 Update Basque translation 2024-02-26 20:30:19 +00:00
Asier Sarasua Garmendia
87109d19fa Update Basque translation 2024-02-26 20:29:38 +00:00
Asier Sarasua Garmendia
abe97ecf20 Update Basque translation 2024-02-26 20:29:27 +00:00
Jordi Mas
a866f27cf3 Update Catalan translation 2024-02-26 21:23:52 +01:00
Jehan
341ab7212b build: remove a LLVM patch.
It was only used for the gimp-win-a64 job and was coming from MSYS2 repository
which already dropped it:
a98352b2ba

The first patch is still needed as the upstream fix is meant to appear in clang
18 according to bug report, yet our CI still uses clang 17.0.6. See:
https://github.com/llvm/llvm-project/issues/51286
2024-02-26 19:56:53 +00:00
Christian Kirbach
4338f0026c Update German translation 2024-02-26 19:56:18 +00:00
Alx Sa
8686e3f542 themes: Remove deprecated GtkPaned style
Resolves #10934.

GtkPaned's handle-size attribute has been deprecated.
Since we have our own custom paned separator, it is not
needed anyway.
2024-02-26 18:08:46 +00:00
Luming Zh
ac0333d8ec Update Chinese (China) translation 2024-02-25 22:39:38 +00:00
Luming Zh
7f41cdc599 Update Chinese (China) translation 2024-02-25 22:38:20 +00:00
Luming Zh
aabb1a4031 Update Chinese (China) translation 2024-02-25 22:38:11 +00:00
Alx Sa
7e6dc23ac1 plug-ins: Fix Foggify color property
Since the color space invasion, GimpRGB
properties do not create widgets anymore.
For Python plug-ins, we need to add
GeglColor properties as GObjects with
GeglColor value types as a workaround.
This patch does this and updates the
Foggify plug-in with the new datatype.
2024-02-25 20:14:13 +00:00
Asier Sarasua Garmendia
705fbebc55 Update Basque translation 2024-02-25 20:10:32 +00:00
Asier Sarasua Garmendia
a97a047cbd Update Basque translation 2024-02-25 20:09:20 +00:00
Bruno Lopes
98d6542745 build/windows: Fix iso-codes correctly
This fix only applies to local builds. iso-codes warning was fixed again
with proper option indicated by Jehan.
2024-02-25 15:15:16 +00:00
Jehan
d1508cdebe data: remove various historical images.
It is quite obvious that these were all kept around for the fun historical
background. And even though we can always get these back anytime through git
archeology, if these images disappear from our sight, we will just eventually
forget they even existed.

We now have a `gimp-data` repository for all data used and installed by GIMP. I
am not going to add these over there since it would go against the whole purpose
of splitting the source repository (we have too much data so we will want to
clone `gimp-data` as shallow so that it will only contain the necessary data to
install GIMP).
Yet I have created a page to reference and display all these original images
(and more! I spent quite some time researching old splashes and logos in our dev
log) for the pleasure of keeping the history of GIMP alive. It also reference
commit links for easy retrieval and further researches.

The only left images now are:

- gimp-logo.png and gimp-devel-logo.png: these are used in the About dialog or
  API reference. Ideally they should be generated from the SVG source.
- gimp-splash.png: used as splash image, in the Welcome dialog and in the
  Windows installer.
- wilber.png: only used in some Script-fu test scripts as far as I can see. This
  should also be generated from the same source SVG as gimp-logo.png, or maybe
  simply gimp-logo.png should be used instead.

Logos: https://gitlab.gnome.org/GNOME/gimp-data/-/blob/main/images/logo-log.md
Splashes: https://gitlab.gnome.org/GNOME/gimp-data/-/blob/main/images/splash-log.md
2024-02-25 16:11:58 +01:00
Sabri Ünal
0d83d2008d Update Turkish translation 2024-02-25 13:10:20 +00:00
Sabri Ünal
f59fb2f8d3 Update Turkish translation 2024-02-25 13:10:06 +00:00
Sabri Ünal
0e2f016425 Update Turkish translation 2024-02-25 08:08:08 +00:00
Sabri Ünal
74ad9f2ff4 Update Turkish translation 2024-02-25 08:06:14 +00:00
Yuri Chornoivan
9750c77abc Update Ukrainian translation 2024-02-24 20:37:53 +00:00
Yuri Chornoivan
acab21a586 Update Ukrainian translation 2024-02-24 20:36:52 +00:00
Yuri Chornoivan
abff9fe036 Update Ukrainian translation 2024-02-24 20:31:18 +00:00
Øyvind Kolås
a93fbc682e app,libgimpcolor: drop babl if guards that no longer apply 2024-02-24 18:14:36 +01:00
Øyvind Kolås
da289b9c50 meson,app: depend on babl-0.1.108 2024-02-24 18:08:31 +01:00
Alx Sa
e927b6c42b dialogs: Open multiple recent images...
...with the Enter key. Combines the single image
and multi-image opening methods so that no matter
how you open recent images (single click, button, or
multi-select and pressing Enter), it opens all selected
images in the Welcome Dialog.
2024-02-24 15:42:53 +00:00
Anders Jonsson
f2cfda17fb plug-ins: fix wording in fractal-explorer string 2024-02-24 14:52:22 +00:00
Anders Jonsson
34eac1996e plug-ins: remove unneeded accelerator 2024-02-24 14:52:22 +00:00
Anders Jonsson
58f6d86b09 scripts: GIMP Online accelerator and link fixes
* 'Use selection' entry was missing due to wrong name
* Write Table of contents without brackets, fixes #9903
* Avoid accelerator clashes
2024-02-24 14:52:22 +00:00
Vasil Pupkin
861583a3d7 Update Belarusian translation 2024-02-24 01:12:49 +00:00
Vasil Pupkin
24cd97d761 Update Belarusian translation 2024-02-24 01:06:14 +00:00
Vasil Pupkin
a0f2b2d8fa Update Belarusian translation 2024-02-23 23:26:18 +00:00
Jehan
a3c0b515f9 data: the build system should not ever move system files.
AFAIU the issue which it tried to fix only happens on custom builds and it looks
to me that it's just about multi-prefixes developer builds which were not
configured with -Drelocatable-bundle=no as they should.

When you compile GIMP yourself and intend to run it in a multi-prefix
environment, without ever relocating the build, like on Unix-like systems, then
disable this feature.

In any case, we should never do this kind of system file moving hacks in our
build system. The MSYS2 project even had to patch this out:
https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1171#note_2022406
2024-02-22 18:41:04 +01:00
Luming Zh
ce08be14d3 Update Chinese (China) translation 2024-02-22 15:39:56 +00:00
Balázs Úr
748b2b5767 Update Hungarian translation 2024-02-22 00:50:15 +00:00
Øyvind Kolås
4463c1e0b1 app: make hue-saturation op use HSLA float as processing space
This should be quite a bit quicker than the per pixel overhead of
function call converting rgb<->hsl.
2024-02-21 19:41:11 +00:00
Joachim Priesner
2680057b96 .clang-format: Remove duplicate option
This is an error starting with LLVM commit 388d679c (LLVM 17).
2024-02-21 15:44:48 +00:00
Øyvind Kolås
992cd783ac app: do processing with non-linear RGB in threshold op 2024-02-21 15:54:20 +01:00
Joachim Priesner
6731761944 .clang-format: Enable PenaltyBreakOpenParenthesis option
The CI uses clang-format 14 at least since commit 01e56545,
since that is the version available in Debian bookworm.
2024-02-21 11:27:27 +00:00
Jehan
11892f1d83 Issue #10900: install missing gimpchoice.h.
Argh how this could pass without anyone noticing?!
2024-02-21 11:08:23 +01:00
Øyvind Kolås
bc7f0f5fc2 app: make posterize op operate with a perceptual gamma 2024-02-21 09:03:08 +01:00
Yuri Chornoivan
df0a445fbd Update Ukrainian translation 2024-02-21 06:26:11 +00:00
Alx Sa
903d697091 plug-ins: Port decompose to GimpProcedureDialog widgets
Also changed decompose-type argument from string to
GimpChoice.
2024-02-20 14:42:41 +00:00
Luming Zh
745a142b09 Update Chinese (China) translation 2024-02-20 14:12:53 +00:00
Yuri Chornoivan
a7cec65868 Update Ukrainian translation 2024-02-20 13:43:04 +00:00
Øyvind Kolås
7e39d2badd app: conversion to indexed, do error diffusion in linear RGB
Do error diffusion in linear RGB while keeping palette generation as
CIE Lab.
2024-02-20 12:26:38 +01:00
Øyvind Kolås
5311cbec84 app: increase color precision in indexed conversion
The indexed conversion code was originally written for very low-memory systems,
this makes the mapping it does quantized and noisy, for examples see issue
 #5159 this commit removes quality/memory use trade-offs, modern machines can
take a 2-300mb temporary table allocation.
2024-02-20 11:58:58 +01:00
Alx Sa
e97f8693d0 plug-ins: Port warp.c to GimpProcedureDialog widgets
Also make widgets translatable and added mnemonics.
Note that the UI could still be improved -
the GimpDrawableChoosers are larger than the old ones.
2024-02-19 20:51:06 +00:00
Balázs Úr
38fbf19b50 Update Hungarian translation 2024-02-19 19:43:50 +00:00
Balázs Úr
210c7d3850 Update Hungarian translation 2024-02-19 19:41:03 +00:00
Balázs Úr
76f71ba903 Update Hungarian translation 2024-02-19 19:36:37 +00:00
Jacob Boerema
2a52d91a52 libgimpbase: fix endless loop in gimpprotocol
Coverity warned here for endless loops. Looking at it, it's clear that
we should increase k and not j.
2024-02-19 11:49:54 -05:00
Marco Ciampa
cad8c6739c Updated Italian translation 2024-02-19 14:27:14 +01:00
Alexandre Prokoudine
67c92e12c0 Update Russian translation 2024-02-19 14:26:22 +01:00
Jehan
d63a94dedc gitlab-ci: use the last tagged releases of babl and GEGL for deps-debian-x64 too.
This is similar code to what I added for the Windows builds, except that here
it's because deps-debian-x64 will also end up feeding dev-docs job too.

Right now our tagged build of GIMP produces docs for unstable versions of babl
and GEGL.
2024-02-19 12:28:53 +01:00
Bruno Lopes
368bee2d64 build/windows: Rework scripts local compatibility layer
Since !1171 we can use the CI scripts locally, but the initial implementation,
after some commits, revealed to be troublesome. So, now reworked to be simple.
2024-02-18 19:28:47 +00:00
Bruno Lopes
43c0fdcbba build/windows: Follow meson defined versions
As noted by Jehan, the way of defining the (many) GIMP versions can change.
So, let's take the GIMP version directly from the generated config.h file.

Also, changes the declaration of some variables to conform with "best pratices".
2024-02-18 19:28:47 +00:00
Bruno Lopes
3db6639375 build/windows: Make unified deps list more conventional
This list is referenced in the gimp-web-devel site, and my initial
implementation, in terms of ease to use, was a throwback.

Also, make the CI code more simple without changing the list file.
2024-02-18 19:28:47 +00:00
Bruno Lopes
265fb09ce6 build/windows: Make deps install "modular"
Since almost the same code is used in the 3 stages, let's reuse it.
2024-02-18 19:28:47 +00:00
Bruno Lopes
09a26ddb72 build/windows: Conform scripts to Coding Style
Self-explanatory. Also, make the structure a little more cohesive.
2024-02-18 19:28:47 +00:00
Alx Sa
cf73a28145 python: Fix Spyro-Gimp Long Gradient option
Resolves #10873.

We needed to update a Gimp.RGB object to Gegl.Color
in order for the Long Gradient option to work properly.
2024-02-18 19:21:31 +00:00
Alx Sa
dfad2a3028 python: Fix Spyro-Gimp Selection option
As noted in a comment on issue 10873,
choosing Selection for Fixed Gear throws
a TypeError. This is because with the change
from GimpRGB to GeglColor, we can no longer
directly access the red component with an index.

Instead, we need to call Gegl.Color.get_rgba() to get
that value, which is what this patch does.
2024-02-18 18:41:04 +00:00
Alx Sa
8f18ea6e7d widgets: Fix critical in Dynamics Dockable
Resolves #10882.

Before the color space invasion, INPUT_COLOR () returned
either a GimpRGB or NULL (if alpha == 0) that was used
directly in functions.
Now it's used to set a GeglColor in gegl_color_set_pixel (),
and calling that with a NULL color resulted in a Gegl-Critical.

This patch checks if INPUT_COLOR () returned NULL before
trying gegl_color_set_pixel () to prevent the issue.
2024-02-18 14:00:23 +00:00
Jehan
4755f0e805 meson.build: post-release version bump to 2.99.19.
On the way to the RC1!
2024-02-18 11:11:24 +01:00
Sabri Ünal
d39137b9a0 Update Turkish translation 2024-02-18 09:41:02 +00:00
Sabri Ünal
e9140fff49 Update Turkish translation 2024-02-18 09:40:51 +00:00
Sabri Ünal
cfd50c4818 Update Turkish translation 2024-02-18 09:39:31 +00:00
Jehan
f94c4cb5db Release development version GIMP 2.99.18. 2024-02-17 18:01:20 +01:00
Jehan
cb81d5224b Issue #10872: welcome dialog does not behave like the usual "new image" action.
The alternative solution would be to call:

> image_new_dialog_set (dialog, NULL, NULL);

This would have reset to default template. But it's still not exactly like the
"new image" action which defaults to the active image's size if there is an
opened image.

In order to avoid complicating the code further, as well as code duplication,
hence code divergence, let's call the "image-new" action, making sure that this
button will always behave exactly like the "File > New" menu item.

Then since we need to process the return value of this dialog (either re-showing
the welcome dialog in case of new image creation cancelation, or destroying the
hidden welcome dialog otherwise), I check for the singleton pointer and connect
the handlers to it.

Moreover I made the "response" signal of ImageNewDialog be handled as
G_CONNECT_AFTER otherwise we nearly never had the possibility to handle its
responses properly (because the base handler was doing it first, then often
destroying the dialog).
2024-02-17 18:01:20 +01:00
Luming Zh
ff459a5f4b Update Chinese (China) translation 2024-02-17 14:42:53 +00:00
Luming Zh
e24cda1998 Update Chinese (China) translation 2024-02-17 14:41:06 +00:00
Luming Zh
d656bd42ce Update Chinese (China) translation 2024-02-17 14:39:17 +00:00
Jehan
70d681f6fb desktop: release GIMP 2.99.18 today. 2024-02-17 11:33:32 +01:00
Jehan
7f6e666afc libgimpwidgets: make sure we update everything when changing the format. 2024-02-17 11:27:29 +01:00
Jehan
18d68d9e7c Issue #10850: [Color Space Invasion] Possible profile mis-match between color selectors.
It was simply not implemented yet, but it's true that it's such a visible and
used feature that it's worth adding it in time for GIMP 2.99.18!
2024-02-17 11:24:00 +01:00
Øyvind Kolås
2d1a02298d app: gimpoperationhuesaturation, do processing in non-linear
Address a regression of hue-sector sizes. The HSL model math in gimp_rgb_to_hsl
and gimp_hsl_to_rgb uses R'G'B' values rather than RGB.

Fixes #10756.
2024-02-17 06:03:40 +00:00
Alx Sa
a0990e324d python: Fix spyro-gimp Preview tool
Gimp.context_get_foreground() no longer returns a Boolean
as a first output, so we need to remove it from the assignment
line.
2024-02-17 00:02:25 +00:00
Jehan
017b82b0d5 build: use tagged releases of babl/GEGL dependencies when building releases.
The rest of the time, we want to use HEAD of their main branches.

The last ctx update seem to have broken the CI build on Windows. While we'll
have to fix this, let's do this after we release GIMP.

Anyway we obviously don't want to use unstable code for actual point releases,
so it's a good thing that this made me think of adding such rules.
2024-02-16 22:31:33 +00:00
Øyvind Kolås
597c52b92e app: gimpoperationgradient keep achromatic colors under dither
Use the same amount of dithering on R,G and B if they initially were all equal.
This allows us to keep achromatic gradients achromatic, while providing the
same amount of dither as before for colored gradients. Discrepancy uncovered in
issue #10756.
2024-02-16 22:25:25 +00:00
Jehan
8e63ef91f5 Issue #10858: [Color Space Invasion] Alpha ColorScale has corrupted values.
While the buffer used by Cairo may have a rowstride bigger than 3 * width, our
internally stored buffer has the exact size required for drawing the scale.
2024-02-16 22:05:23 +01:00
Jehan
4915689948 app: gradient not properly updated when canceling the color dialog. 2024-02-16 20:47:15 +01:00
Jehan
067abee9b2 Issue #10851: [Color Space Invasion] Crash when editing Gradient.
We were not properly duplicating the left and right colors when duplicating the
existing segments in gradient_editor_save_selection(). Therefore we ended up
freeing original GeglColor on exiting the GimpColorDialog.

Additionally to the reported crash, I add a few GeglColor freeing which were
leaked and some safeguard in gimp_gradient_get_flat_color() to ensure it always
returns a color (or raise a CRITICAL to be investigated easily).

Finally a few signals in GimpColorDialog had to be ensured disconnected when the
dialog is destroyed.
2024-02-16 19:58:11 +01:00
Jehan
793d6e7dac app: properly initialize property colors.
Our code expects that these GeglColor properties are always non-NULL in various
places, which may lead to crashes.

The property defaults should take care of this, and I am actually unsure why we
need to set it in the init(). Maybe the set_default() method for the GParamSpec
kicks in a bit late, while we have code syncing objects already running. I'm not
sure. It might need to be investigated later. But for now, let's simply make
sure we initialize the objects manually so that it's never NULL.
2024-02-16 17:28:51 +01:00
Idriss Fekir
1437e3fa99 GimpFont: Crash loading XCF with text in an unavailable font 2024-02-16 12:09:58 +00:00
Ekaterine Papava
039a3671bc Update Georgian translation 2024-02-16 11:43:58 +00:00
Ekaterine Papava
0606b986f5 Update Georgian translation 2024-02-16 11:25:59 +00:00
Øyvind Kolås
5a0a3a1263 app: special-case achromatic pixels in hue-saturation
Issue #10756, without this grayscale pixels are affected by
the red part of the manipulation configuration, after this
change pixels with original saturation == 0.0 are only
changed by the master adjustment.
2024-02-16 00:16:08 +00:00
Bruno Lopes
96e7673348 build/windows: (Finally) Drop lua5.1 in ARM
This become unnoticed in !1171 and was breaking .lua plug-ins use in
ARM installs. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/10554#note_2014768
2024-02-16 00:08:02 +00:00
Jehan
8bb79dc671 app: port Colorize to GeglColor property.
While doing this, I could find a lot of problems in the algorithm:

1. It looks like the original intent (from GUI and code) is that you set hue and
   saturation but not really the intended lightness, rather its increase or
   decrease, relatively to every pixel current lightness. I.e. that every pixel
   will be set to the selected hue and saturation, and only the lightness will
   change. The "lightness" field is therefore a relative value (pixel per
   pixel). The first problem is that instead of lightness, we compute the
   luminance, which is related but different and set this in the lightness
   field.
2. The second issue is that we were using gimp_hsl_to_rgb() which after testing
   (because its documentation doesn't give any TRC/space info at all) looks like
   it computes a color from HSL to non-linear RGB of the same space. Yet we were
   outputting to a linear RGB space. So we compute the wrong values. On the
   other hand, because of the first problem, I realize (after testing) that it
   makes our render closer to the intended render by chance (at least when the
   TRC is sRGB's). It's still wrong, but if we were to change the output to
   "R'G'B'A float" instead, the render would be much darker. In both cases, it's
   wrong anyway.
   I would not say that the 2 problems are canceling each others, but they are
   making the final result somewhat OK.
3. Ideally we should be using babl to convert colors, and this is the best way
   to actually implement the original filter intent. Unfortunately so far, doing
   this is much slower (though I save a lot of time by moving out of the samples
   loop and processing data in chunks, it's still slower than the current,
   nearly instant, implementation).
4. Because of all previous implementation irregularities, the render is
   different depending on the actual image space. I.e. that the exact same image
   filtered through Colorize with the exact same operation parameters will
   render differently. I would need to test further, and maybe it's normal since
   HSL is also space-dependant (and that's where we work on in this operation),
   but I'm wondering if the result should not be independant of the working
   space.
5. I implemented our own prepare() method because the one in
   GimpOperationPointFilter parent seems to allow other input or output models.
   Even though in all my tests, it was always linear RGB (which is what we want
   here), let's make sure by having a custom prepare() method explicitly setting
   these. It's also the opportunity to create some babl fishes.

In any case, I'm leaving the code as-is for now, because it's how this operation
has been since forever (at least for as long as I was around) and I don't think
it's the right idea to change it on a whim.

This raises even more the concern of versionning GEGL operation, which we have
been discussing with pippin on IRC lately, because if ever we want to change
this one, now that operations are not just applied, but possibly
non-destructively recreated at load, we need to make sure that we recreate the
render expected at the time of creation of a XCF while allowing us to have the
filters improving when needed.
2024-02-15 23:55:06 +01:00
Anders Jonsson
99f20a916d Update Swedish translation 2024-02-15 20:20:24 +00:00
Alx Sa
629c7eee9e widgets: Close NDE popover when merging filters
Resolves the main part of 10835. As nothing else can
be done in the GUI once all the filters are merged down
(and the GUI itself will be unavailable once closed until
a new filter is added), it makes sense to auto-close it.
gtk_widget_set_visible () was used rather than
gtk_popover_popdown () due to notes in the code about
buggy animations.

There is the possibility that users may want the GUI left
open to quickly undo the merge, so this should be
re-examined after feedback from the 2.99.18 release.
2024-02-15 18:30:12 +00:00
Yuri Chornoivan
1139df0167 Update Ukrainian translation 2024-02-15 16:40:57 +00:00
bootchk
df57b28469 2.99 ScriptFu: change wording of "Coffee Stain" filter
To reflect increased generality, its not just "coffee" but any gradient.

Delete "realistic looking": subjective and adds no content.

Better tooltips for the arguments.
2024-02-15 15:40:20 +00:00
bootchk
e6957e2b0d ScriptFu: port script "Coffee Stain" to new-style
Call new-style script-fu-register-filter so
choice of gradient is saved in settings.
2024-02-15 15:40:20 +00:00
bootchk
45f56ce44c Fix #10832 ScriptFu: script "Coffee Stain" expects int for gradient
Fix it by also enhancing, making the gradient an argument with a default
instead of a fixed choice of the gradient named "Coffee".
Instead of fixing by looking up the gradient ID in the body of the script.
2024-02-15 15:40:20 +00:00
Alx Sa
de8f7fd4b8 plug-ins: port lighting to GeglColor procedure arguments
Also fixed parameter formating.
Note that it still converts to GimpRGB
internally.
2024-02-15 13:47:04 +00:00
Alx Sa
e559c23c00 plug-ins: port map-object to GeglColor procedure arguments
Note that it still converts to GimpRGB
internally.
2024-02-15 13:10:23 +00:00
Jehan
9955c00076 Issue #10853: support GeglColor return type in script-fu.
Right now, I just transform any GeglColor return value into a RGB u8 triplet,
because that's also how we were supporting GimpRGB anyway, though it's seriously
limited.

Ideally we'd add some real concept of generic color abstraction in Script-fu
too, which could support any color model, space and precision.
2024-02-15 13:25:50 +01:00
Alx Sa
5ad18094db actions: Load opacity/mode/region properties in NDE
Resolves #10848.

In cc62f2b0, we moved the filter property loading code
earlier in the process. However, the opacity, mode, and
region options for GimpFilterTool were not included in
this move, so they reset back to defaults each time.
This fixes that problem so settings are retained when
editing.
2024-02-15 05:31:36 +00:00
Alx Sa
ad73df43fd plug-ins: port grid (legacy) to GeglColor procedure arguments 2024-02-15 03:39:52 +00:00
Alx Sa
ea14231921 scripts: Fix calls to gimp-drawable-edit-gradient-fill
Resolves #10830

The supersample-max-depth parameter
of gimp-drawable-edit-gradient-fill
required a value between 1 and 9.
Previously this wasn't enforced, so several
scripts called it with a value of 0.

Now that it's enforced, those scripts were
broken. This fixes the calls in weave,
gradient-example, test-sphere, burn-in,
and coffee (although it has other issues)
2024-02-14 23:52:18 +00:00
Jehan
fc08b78436 plug-ins: port film to GeglColor procedure arguments.
It was a bit sad that we'd release GIMP 2.99.18 with no plug-in using
GeglColor argument yet, so at least with this, we'll have one as a demo
of what needs to be done.
2024-02-14 23:58:32 +01:00
Jehan
700d0c7c91 libgimp: add macros for GeglColor arguments for GimpProcedure. 2024-02-14 23:46:03 +01:00
Jehan
19be79178d app: fix reading GeglColor arguments in pluginrc.
A GeglColor may be without profile (when the space doesn't require one
or if the default profile is used for the model).
2024-02-14 23:43:26 +01:00
Jehan
7db648195c libgimpwidgets: fix initializing a GimpLabelColor. 2024-02-14 23:36:39 +01:00
Jehan
40158b431d Issue #10838: fix dashboard crash.
- Make sure the led color is set at init().
- Unlike old GimpRGB code, values' colors must be set explicitly first.
- Make the Gimp object into a property (this one is not a problem right now, but
  it's better this way).
- Don't assume the Gimp object is non-NULL. In current code, it is set to NULL.
  The only consequence is that we don't use color management settings to draw
  with Cairo. For this widget anyway, it feels unnecessary.
2024-02-14 22:48:59 +01:00
Anders Jonsson
0f2e916b64 Update Swedish translation 2024-02-14 21:02:25 +00:00
Yuri Chornoivan
fda9df670c Update Ukrainian translation 2024-02-14 18:42:44 +00:00
Alx Sa
167e35b048 Issue #10843: Prevent raising/lower Warp NDE filter
Altering the Warp tool's GEGL filter while it's being actively edited
causing a crash. More work will be needed to make these effects
work non-destructively - for now, we'll prevent users from raising or
lowering them from the NDE UI.
2024-02-14 17:49:51 +00:00
Jehan
7e95211e35 Issue #10834: [Color Space Invasion] Filter Presets not loading deserialized GeglColors. 2024-02-14 18:00:25 +01:00
Jehan
30d6b88c95 Issue #10841: rename "Insane Options" to "Experimental". 2024-02-14 17:03:35 +01:00
Jehan
5c81f05804 app, desktop: add demo scenarios for 2 release note items. 2024-02-14 16:50:26 +01:00
Jehan
d52d57eb45 app: add ability to blink item tree view's header widget. 2024-02-14 16:49:39 +01:00
Jehan
fbb14c8c49 NEWS: update. 2024-02-14 16:48:51 +01:00
Jehan
df7cc3d377 app: simplify and fix the welcome dialog and update check algorithm.
To simplify the logic, I created an `is_update` variable. This makes the code
much more understandable (and also simplify the redundant or over-complicated
imbricated `if` blocks).

The fix part is that the update check would have never happened for anyone
leaving the "Show Welcome Dialog" option checked, whereas we only want to bypass
the update check for new installations or updates.
2024-02-14 15:20:10 +00:00
Alx Sa
9a745738b4 dialogs: Add configurations to Welcome Dialogue
Allows users to quickly configure themes and other
"controversial" options when first installed.
Also allows the welcome dialogue to appear on start,
depending on user preference.
2024-02-14 15:20:10 +00:00
Bruno Lopes
c435184735 build/windows: Update manifest to conform with 5c96851431 2024-02-14 11:20:31 +00:00
Yuri Chornoivan
862a785d8f Update Ukrainian translation 2024-02-14 11:06:49 +00:00
Ekaterine Papava
4d113f86b7 Update Georgian translation 2024-02-14 04:35:16 +00:00
Jehan
6d14ca0554 Issue #10815: [Color Space Invasion] GimpColorFrame crashes when RGB (%), RGB…
… (u8), or CMYK is selected.

We always need a final NUL indicator in a GStrv. In these 2 cases, we might fill
all 6 first indexes, so we must have an array of size 7.
2024-02-13 23:47:49 +01:00
Jehan
d945e12ccc Issue #10814: [Color Space Invasion] crash in channel_get_color_invoker. 2024-02-13 23:25:41 +01:00
Jehan
aaa75e3674 Issue #10385: fix CRITICAL when importing palettes via the Palette dockable.
Since resources must now either belong to an image, or be tied to a file, or be
marked as internal, we must immediately save imported palettes, so that they are
tied to their file.
2024-02-13 22:42:04 +01:00
Jehan
e2b2f1fb04 Issue #10811: script-fu can now create GeglColor params.
For the time being, only the same format as GimpRGB params is supported, which
means creating a color either as CSS strings or as RGBA list values, which means
that we can only input sRGB values right now in ScriptFu (even when calling
GeglColor-using API).

This is the second part to fix issue #10811.
2024-02-13 21:58:40 +01:00
Jehan
0b6b76a419 Issue #10811: implement GeglParamColor missing in some places.
Though I had already implemented passing GeglColor through the PDB, it was not
complete. In particular, the protocol was not able to pass GeglParamColor specs.

Fixes:

> LibGimp-WARNING **: 16:06:09.451: _gimp_gp_param_def_to_param_spec: GParamSpec type unsupported 'GeglParamColor'

This is part of the fix to issue #10811, though it's not complete yet.
2024-02-13 21:58:40 +01:00
Jehan
4f8793eaa7 app: the Quick Mask color must be duplicated with the image. 2024-02-13 21:58:40 +01:00
Rodrigo Lledó
43d3d24688 Update Spanish translation 2024-02-13 17:45:41 +00:00
Rodrigo Lledó
666d59b4ed Update Spanish translation 2024-02-13 17:44:07 +00:00
Rodrigo Lledó
f6c28fda22 Update Spanish translation 2024-02-13 17:39:51 +00:00
Kamil Burda
c7c1743dd0 plug-ins: Fix Save button in Python Console
Clicking on the Save button threw an exception as the wrong class was
used to invoke the `set_alternative_button_order_from_array()` method.

Since `Gtk.Dialog.set_alternative_button_order_from_array()` is
deprecated and the GIMP functions with the same name suppress
deprecation warnings in the C code, we suppress the warning here as
well. The `warnings.catch_warnings()` function is not thread-safe
according to the Python documentation, which should not pose a problem
here.

Also, the file chooser dialog now allows specifying a new file instead
of overwriting an existing file.
2024-02-12 21:49:28 +00:00
Jehan
57113323e2 Issue #10813: forgotten GimpRGB used on a GeglColor property. 2024-02-12 19:41:13 +01:00
Jehan
a7637bfb4a libgimpconfig: special-case GeglColor param comparison if one is NULL.
The current values_cmp() method will segfault if an object contains a NULL
GeglColor value. I fixed it in commit c0477bcb0 in GEGL, but since the GEGL
release is already done, I add this special-casing on GIMP side.

To be removed when we release and depend on GEGL 0.4.50.

The crash was happening when activating the text tool and raised in a comment of
another report: https://gitlab.gnome.org/GNOME/gimp/-/issues/10813#note_2009702
2024-02-12 19:33:29 +01:00
Yuri Chornoivan
458ccd9b2a Update Ukrainian translation 2024-02-12 18:28:39 +00:00
Yuri Chornoivan
5d6e8526fc Update Ukrainian translation 2024-02-12 18:23:41 +00:00
Ekaterine Papava
3a6d78871f Update Georgian translation 2024-02-12 17:55:48 +00:00
Ekaterine Papava
cbf406408e Update Georgian translation 2024-02-12 17:47:07 +00:00
Jehan
9e24ceda15 Issue #10809: Color Space Invasion: Curves Tool crashes on start. 2024-02-12 18:30:00 +01:00
Jehan
77420957d8 app: use GEGL/babl to convert to HSL in gimp_operation_hue_saturation_map(). 2024-02-12 18:30:00 +01:00
Alx Sa
fc0d21b91c Issue #10812: New layer colors tag buttons are only white
As in 6a905814, we need to use the gegl_color_set_pixel () function instead.
2024-02-12 16:28:45 +00:00
Jehan
6a90581423 Issue #10808: Hue-Saturation GUI not showing colors.
Small function mixup! We needed the set_pixel() function.
2024-02-12 16:21:28 +01:00
lillolollo
8934a50925 app, libgimpconfig: use G_GSIZE_FORMAT for printf-ing gsize values. 2024-02-12 12:03:03 +00:00
Anders Jonsson
e7e49abc99 Update Swedish translation 2024-02-12 09:22:35 +00:00
Jehan
1f85924e3c NEWS: update. 2024-02-12 00:19:40 +01:00
Jehan
dc66e99949 libgimpwidgets: fix XY rendering in GimpColorSelect for RGB color model. 2024-02-11 23:28:04 +01:00
Jehan
89b80b5b63 libgimpwidgets: don't unnecessarily redraw color previews.
When changing the selected color, we have no reason to redraw the Z preview.
This preview should only be redrawn if the allocation size changed, or if we
change the previewed model or the Z component.

As for the XY preview, it should only be redrawn if the Z value is changed (and
of course, similarly, if the allocation changed or if model or Z component
changed).
2024-02-11 23:28:04 +01:00
Jehan
3a787e8892 app: fix test-config.
Fixes broken unit test:

> stderr:
> ../babl/babl-internal.h:223 babl_fatal()
	babl_format("RGBA float"): you must call babl_init first
2024-02-11 23:28:04 +01:00
Jehan
e6e7fa8f8d libgimpcolor: work around babl_format_has_alpha() bug with some formats.
With "HSVA" and a few others, the function was not returning the right value (it
could not see it was encoding alpha channel.

I had fixed it on babl directly with commit a28309c yet I had forgotten to push
it! Let's just add some #ifdef and a comment.
2024-02-11 23:28:04 +01:00
Jehan
f8ddc94a8b build: fix splash2installer.py with updated API using GeglColor instead of GimpRGB.
Fixes:

> TypeError: argument background: Expected Gegl.Color, but got gi.repository.Gimp.RGB
2024-02-11 23:28:04 +01:00
Jehan
65f8afee68 app, libgimp, libgimpbase, pdb: GimpColorArray as a typedef to…
… NULL-terminated array of GeglColor is now a boxed type usable in PDB.
2024-02-11 23:28:04 +01:00
Jehan
cfd0389c37 app: no more GimpRGB in GimpDashboard and related. 2024-02-11 23:28:04 +01:00
Jehan
6a2aee1fce libgimpwidgets: render GimpColorSelect with babl conversion.
No custom conversion code anymore. This also fixes some bugs in HSV when
I was wrongfully multiplying the hue by 360 when mixing babl and custom
code paths.
2024-02-11 23:28:04 +01:00
Jehan
47c1cb8504 app: use GeglColor in GimpTextBuffer and GimpTextTag.
It's actually not enough to get proper colors for inner text tags. The
main color is correct, but color for subtext is currently not managed.
This must be fixed.
2024-02-11 23:28:04 +01:00
Jehan
cbd970a92d app: add memory size for GeglColor. 2024-02-11 23:28:04 +01:00
Jehan
bab9ed18c4 app: color drag'n drop is now space-invaded.
We can now drop any color model and encoding with any space. The exact
color information is passed with.
2024-02-11 23:28:04 +01:00
Jehan
ba26fc26e7 libgimpwidgets: direct binding between a GimpLabelColor and its color area. 2024-02-11 23:28:04 +01:00
Jehan
c13683a710 app: revert fg and bg colors stored as GeglColor-s. 2024-02-11 23:28:04 +01:00
Jehan
caaee9a174 app: test should have used GeglColor already. 2024-02-11 23:28:04 +01:00
Jehan
4960ed72c1 app: GimpFgBgEditor draw() method to use GeglColor directly too. 2024-02-11 23:28:04 +01:00
Jehan
02546da780 app: layer layer modes to use babl conversions directly. 2024-02-11 23:28:04 +01:00
Jehan
95ac889f6c app, pdb: this PDB function should have been using GeglColor already. 2024-02-11 23:28:04 +01:00
Jehan
57fda090df app: GimpFgBgView draw() methods uses GeglColor directly. 2024-02-11 23:28:04 +01:00
Jehan
6f408e9d48 app: GimpMenuModel uses GeglColor. 2024-02-11 23:28:04 +01:00
Jehan
924dbb44a8 app, libgimpconfig: GimpFilterTool color_picked() now uses GeglColor.
In particular, the Curves, Levels and Operation tools method implemented
are updated. Also GeglColor arguments in GEGL operations are not
transformed into GimpRGB arguments anymore in GIMP. GeglColor GParamSpec
stay GeglColor now.
2024-02-11 23:28:04 +01:00
Jehan
0239d05409 app: gimp_pickable_contiguous_region_by_line_art() now uses GeglColor. 2024-02-11 23:28:04 +01:00
Jehan
3ec13730c5 app: gimp_layer_mask_new() uses GeglColor. 2024-02-11 23:28:04 +01:00
Jehan
cf213d1051 app: some GimpAction color which was forgotten after the port. 2024-02-11 23:28:03 +01:00
Jehan
46121685b8 app: get rid of rgb_to_pixel() GimpPickable method and related functions.
We don't try anymore to convert early from a pickable color to another
format/space. Now we are able to get a GeglColor and move it around,
doing only last-second (when needed) conversions.
2024-02-11 23:28:03 +01:00
Jehan
d55325829f app: no more GimpRGB/GimpHSL/GimpHSV usage in paint code at all anymore.
I'm a bit unsure about the GimpMyBrushCore which doesn't have much
indication on which color space we are working in, but the new code
should not be worse than the old one (if wrong, color-wise, it should be
the same wrong as before).
2024-02-11 23:28:03 +01:00
Jehan
fcfb574715 app: get_paint_params() now uses GeglColor. 2024-02-11 23:28:03 +01:00
Jehan
c892de85df app: port some of the paint and fill code to GeglColor. 2024-02-11 23:28:03 +01:00
Jehan
ae31cf0b18 app: GimpCurveView using GeglColor. 2024-02-11 23:28:03 +01:00
Jehan
20b9f9bc06 app: GimpColorBar to use GeglColor.
It's still internally loading data as a sRGB buffer. More work will need
to be done.
2024-02-11 23:28:03 +01:00
Jehan
d1c3b104bf libgimpcolor: gimp_color_is_perceptually_identical() also checks transparency.
When I implemented CIEDE2000 distance for verifying perceptual identity,
I mistakenly lost checking the alpha channel.
2024-02-11 23:28:03 +01:00
Jehan
b53da69f3c app, libgimp, pdb, plug-ins: canvas grid now using GeglColor. 2024-02-11 23:28:03 +01:00
Jehan
f9c97aeb72 app: mask colors are GeglColor. 2024-02-11 23:28:03 +01:00
Jehan
636a33aed2 app: GimpColorDialog now fully uses GeglColor. 2024-02-11 23:28:03 +01:00
Jehan
4b3702bfc1 libgimpwidgets, libgimpcolor: RGB and HSV should also show out-of-gamut…
… in soft-proof space when soft-proofing is enabled.
2024-02-11 23:28:03 +01:00
Jehan
de83bca814 app, libgimpwidgets: make GimpColorSelector sync with soft-proofing.
Until now we only had the case of the CMYK color selector using the
soft-proofing profile. Yet this is also interesting for other color
selectors, in particular to show out-of-gamut colors. Indeed if we
enable soft-proofing on the active image, it is interesting to show the
intersection of the current RGB/Grayscale space gamut with the
soft-proofing gamut.

Right now, this is only used in GimpColorSelect when showing colors in
LCh color space.
2024-02-11 23:28:03 +01:00
Jehan
12b2abce7c libgimpcolor: implement CIEDE2000 distance algorithm to compare colors.
This is used for the gimp_color_is_perceptually_identical() function,
because the Euclidean distance in LCH is extremely limited, if not wrong
in many cases. Indeed LCH is not perfectly perceptually uniform, and for
this exact reason, the CIE defined the specific Delta E algorithms.
Later versions are also based on LCH values, so my intuition to use it
for distance was on a good start, yet these algorithms were refined a
few times to allow for corrections in perceptual uniformity
imperfections.

This was in particular needed to verify if a color is out of a CMYK
space gamut. The idea is to compare the distance of the RGB (or other)
and the CMYK version, since we cannot just check if the CMYK color is
out of the [0; 1] range (it never is). Instead if both colors are
perceptually identical, then we consider that the RGB color was inside
the CMYK space gamut.
The naive algorithm was giving any (or nearly) color as out-of-gamut.
Now using CIEDE2000, I get a much nicer results.
2024-02-11 23:28:03 +01:00
Jehan
4d2acac506 libgimpwidgets, modules: display the exact space/profile name for…
… relevant color selectors.
2024-02-11 23:28:03 +01:00
Jehan
3c3f3030f1 libgimpwidgets: GimpColorSelect is now also aware of active image space. 2024-02-11 23:28:03 +01:00
Jehan
ebb93a07a5 modules: the color wheel selector now displays and select in the active…
… image's space!
2024-02-11 23:28:03 +01:00
Jehan
1066229ba6 modules: Watercolor selector now shows the actual target gamut. 2024-02-11 23:28:03 +01:00
Jehan
69b7cbe111 libgimpcolor: add support for "CIE LCH(ab)" to gimp_babl_format_get_with_alpha().
It seems I had forgotten about this one!
2024-02-11 23:28:03 +01:00
Jehan
e104196cb7 app, libgimpwidgets: "Scales" color selection now space-aware.
This commit adds gimp_color_selector_set_format() which is meant to give
awareness of the target color format for which we are selecting colors.
Right now, I am only using this information on the Scales selection
method, which means that now colors you read and select are in the
target space. Even better, the out-of-gamut shown happens in the with
LCH scales is for the target space too. As tested, it already makes
quite a difference for an image in sRGB vs. say adobeRGB.

Note that right now, I only use the format information as a space, but
in fact, I made the API to be about a format because the actual format
can be used wisely too. First we may want to do different thing
depending on the color model itself (which the space may give away or
not, especially when using default spaces or when we'll have images
using models with no space in the future, such as CIE Lab). But also
whether the image is following the space TRC or is linear (or
perceptual) would change how we represent the data. If we were to show
non-linear values in the Colors dockable but when painting, the color
picker shows linear values for instance, it might be puzzling to people.
2024-02-11 23:28:03 +01:00
Jehan
881baba59b app: update the simulation profile in Colors dockable.
Only the color dialog was getting simulation updates when the active
image changed, or when the simulation profile changed (while the active
image stayed the same). Now the Colors dockable also get updates.
2024-02-11 23:28:03 +01:00
Jehan
b7610b1db7 app: re-run gtk_event_box_set_above_child() when showing the event box.
Somehow, in some cases, the event box is not getting button events. I
had the case when creating new images (though it was working fine when
loading images!). I could not yet understand the issue looking at both
GIMP and GTK code and could not even reproduce by creating simple code
sample reproducing a similar pattern (an inactive button inside an event
box placed above the button and meant to catch click events).
This works as a workaround for the time being.
2024-02-11 23:28:03 +01:00
Jehan
9833ebd0ee app, libgimpwidgets, modules: color selectors are now partly space-invaded.
What this commit does is keep the same code logic while moving to
GeglColor. Yet it's not **really** space-invaded yet. What we need to do
now:

1. Take into account the image space, and this is what we must navigate
   through, in particular for various representations of RGB or HSV.
   I.e. that if the active image is in anyRGB, the RGB values shown must
   be within anyRGB. Right now, everything is still shown/used as sRGB
   (even though it's properly retrieved and transformed to the target
   space thanks to GeglColor).
2. Show space info to make things clear and explicit, by adding some
   label somewhere.
3. Allow to switch between image and softproof spaces, regarding
   out-of-gamut display. I.e. that while RGB/HSV must be shown within
   the image space (assuming it's anyRGB), we may want to show
   out-of-gamut area (pink areas) within the softproof space. This may
   mean adding a checkbox. Or maybe simply taking into account whether
   we are in softproof mode or not?
4. We can likely move off gimp_widget_get_color_transform() into using
   gimp_widget_get_render_space() for display drawing. We don't need any
   soft-proofing or black point compensation for any of these widgets so
   pure babl is fine. Indeed we want to show any in-gamut color
   correctly (and not transformed according to specific intents or
   through soft-proofing). We will take care of the proofing case with
   out-of-gamut area showing only.
5. In the various drawing functions, we should move to
   CAIRO_FORMAT_RGBA128F. The color selection area might be wide enough
   that it makes sense to be more accurate, especially as we are
   essentially showing color gradients in 1 or 2 directions in these
   various widgets.
2024-02-11 23:28:03 +01:00
Jehan
4d798ecfed libgimpcolor: improve warning to help with debugging. 2024-02-11 23:28:03 +01:00
Jehan
ce887767e7 app, libgimpconfig: color history is now space-invaded.
I also changed a bit the new color serialization by adding a (color …)
symbol framing the contents, for cases where we don't have a specific
property name, e.g. for the color history list stored in colorrc, unlike
for GimpConfig GeglColor properties.

While doing this, I moved GeglColor property deserialization code into
gimp_scanner_parse_color() which is now able to recognize both older
(color-rgb|rgba|hsv|hsva with no color space) and newer serialization
formats ("color", color model agnostic and space aware).
2024-02-11 23:28:03 +01:00
Jehan
1a901e0bb9 libgimpcolor: get the proper alpha variant of a palette format. 2024-02-11 23:28:03 +01:00
Jehan
1be7892862 libgimpconfig: serialize indexed colors as RGB instead.
Serializing palette colors is not possible right now as far too much
additional data are required, and anyway we likely wouldn't be able to
associate back the color to the right palette on deserialization,
removing any interest of keeping the index data anyway.

With that context in mind, let's just serialize palette data as basic
RGB within the palette's space.
2024-02-11 23:28:03 +01:00
Jehan
91d3b51bf2 app: when creating a palette from an image, colors must be space-aware. 2024-02-11 23:28:03 +01:00
Jehan
b6c1b20737 app: colors generated when converting to indexed must be within the image space.
Colors must not be clamped to sRGB, which could lose colors on wide
gamut indexed images.
2024-02-11 23:28:03 +01:00
Jehan
093d00572a app, libgimpcolor: more move to GeglColor.
- New libgimpcolor functions: gimp_color_parse_hex() and gimp_color_parse_name().
- GimpColorHexEntry is now space-invaded. Though recognized color names
  and hexadecimal syntax are sRGB only (because CSS and SVG
  specifications explicitly say that this syntax is for sRGB values), it
  is possible to enter non-sRGB values with
  gimp_color_hex_entry_set_color().
- GimpColorSelection is now space-invaded.
2024-02-11 23:28:03 +01:00
Jehan
ee19ad54d6 app, libgimpcolor: 2 new libgimpcolor functions.
Adding gimp_color_is_out_of_gamut() and gimp_color_is_out_of_self_gamut() and
using them where relevant.
2024-02-11 23:28:03 +01:00
Jehan
4a30f431fd app: work with a GimpPalette rather than a colormap.
We historically have both the colormap and palette concept in core GIMP,
though they are actually kinda the same concept, except that with
"colormap" we work with an array of raw data and it's a lot less
color-aware. It is still much more efficient in some specific cases,
such as when converting the image (we can then convert the whole palette
as a single buffer, because the image palette is space-restricted
anyway), when storing undo data or when storing/loading in XCF.

But for all the rest, let's use gimp_image_get_colormap_palette() and
work with the GimpPalette API.
2024-02-11 23:28:03 +01:00
Jehan
5e8f4f5e00 app: add a concept of format restriction in GimpPalette.
By default a palette can contain any mix of color models and space. These new
internal API add a concept of format/space restriction. For now this will only
be used for indexed images whose palette should only contain colors for the
specific palette format and space (at least as currently implemented in GIMP).
2024-02-11 23:28:03 +01:00
Jehan
dc1f5ea227 app, libgimp, pdb, plug-ins: GimpPalette are now GeglColor based. 2024-02-11 23:28:03 +01:00
Jehan
b6856af9d8 app: GimpGradient now uses GeglColor.
I still see some limitations in GimpGradient, and in particular, they are still
always stored as RGB in GGR files. It would be nice if we could store the actual
color format. This way, if someone chooses a gradient stop as Lab or CMYK color,
that's what the gradient file would keep track of. But also even storing the
space of a color (instead of storing/loading always in sRGB, even though this
may still work fine as we store unbounded double values). This might warrant for
a v2 of GGR file format.

This commit also fixes loading of SVG gradient which was apparently broken
regarding hexadecimal color parsing.

Finally I improve gegl_color_set_alpha() by adding an alpha channel when the
initial format had none.
2024-02-11 23:28:03 +01:00
Jehan
916d032f67 app, libgimp*, plug-ins: GimpColorButton now space-invaded.
The invasion extended to some core widgets too, in particular GimpColorPanel (a
subclass of GimpColorButton). There was quite a lot of code depending on these
widgets.
2024-02-11 23:28:03 +01:00
Jehan
8eb56586aa app, libgimpwidgets, plug-ins: GimpColorArea is now space-invaded.
This includes improvements on the out-of-gamut colored corner being shown for
unbounded component types out of the [0; 1] range (with some small margin of
error to avoid e.g. a -0.0000001 value to show as out-of-gamut).

There are still improvements to be made on the color rendering. In particular,
it still draws as CAIRO_FORMAT_RGB24 cairo surface. We should probably move to
draw as CAIRO_FORMAT_RGBA128F eventually (more precision and even allowing to
draw unbounded colors with a possible option, instead of always clipping).

Also adding the libgimpwidgets API gimp_widget_get_render_space().
2024-02-11 23:28:03 +01:00
Jehan
5a0f88e053 app: fix signature of gimp_babl_is_bounded(). It returns a boolean. 2024-02-11 23:28:03 +01:00
Jehan
a5657e4d28 app: also display color profile in Pixel mode. 2024-02-11 23:28:03 +01:00
Jehan
86854ee66f app: GimpColorFrame is now much more space aware.
This one is kind of a huge deal, because the info returned by the color frame
was kind of messy (even though it improved lately, but space associated to color
data had to be kept in-sync by hand, which was bug-prone).

Now the color frame stores the data as a GeglColor, always aware of its space
and therefore able to do much nicer conversion. Also RGB and Grayscale options
now display the profile name of the color space (until now, we had only this for
the CMYK option using the proofing profile).

I still wish to get more options. Typically some people may want to get
RGB/Grayscale/CMYK values to other spaces (maybe sRGB, one of their favorite
profile as set in Preferences or just any random profile which they could load
from disk). Giving such ability to basically live-convert their pixel data to
various other color space would be very nice. We'll see if this will be
implemented for GIMP 3 or for after.
2024-02-11 23:28:03 +01:00
Jehan
559297a5cb app, libgimp*: more GeglColor's space invasion.
- New function gimp_cairo_set_source_color() which is meant to replace
  gimp_cairo_set_source_rgb(a?)() eventually. This new function sets the Cairo
  source color, using the target monitor's profile of the widget where the Cairo
  surface is meant to be drawn on. It also uses the color management settings
  (such as whether a custom profile was set, instead of using system profile, or
  also simply whether color management was disabled at all). It doesn't
  soft-proof the color yet.
- Padding and out-of-gamut colors drawing now use the new
  gimp_cairo_set_source_color(). These don't need any soft-proofing anyway.
- Out-of-gamut color property in GimpColorConfig is now a GeglColor property.
2024-02-11 23:28:02 +01:00
Jehan
b06fe36970 app, libgimp*, plug-ins, tools: settings custom check colors now space-invaded.
We pass 2 GeglColor through the wire now. Since it is passed very early
(when sharing the configuration), I had some issues with initialization
order of GEGL, and in particular when calling gegl_init() before
gegl_config() inside _gimp_config(), I had a bunch of such criticals:

> Plugin script-fu: GLib-GObject: CRITICAL: Two different plugins tried to register 'GeglOpPlugIn-transform-core'

Anyway in the end, I store the passed colors as raw bytes and strings in
the GPConfig object, and re-construct the GeglColor last minute in
_gimp_config().
2024-02-11 23:28:02 +01:00
Jehan
7d2d96a0da libgimpcolor: gimp_color_is_perceptually_identical() should also check transparency.
This fixes weird behavior when changing only the alpha value of a color, e.g. in
the channel color GUI. The before and after colors were considered the same. Now
they won't.
2024-02-11 23:28:02 +01:00
Jehan
4879ab7b7f app, libgimp, pdb, plug-ins: move more code to GeglColor.
In particular, I updated the channel and quick-mask colors, padding colors and
more.
2024-02-11 23:28:02 +01:00
Jehan
319150a3b1 app: get rid of gimp_pickable_pixel_to_rgb() and gimp_image_color_profile_pixel_to_rgb().
These are not used anywhere anymore.
2024-02-11 23:28:02 +01:00
Jehan
d4fd88a77c app: improve out-of-gamut tests in the GimpFgBgEditor.
In particular, let's accept small margin of errors to determine that a value is
out of the [0; 1] range of its color space.
The specific use case is about a component at -0.000001 (or at 1.000001) which
will even just show as 0 (respectively 1) in the GUI and will be marked as
out-of-gamut. We want to avoid such thing to happen.

I also took the opportunity to get rid of a bit more GimpRGB code.
2024-02-11 23:28:02 +01:00
Jehan
e992ca3e51 app, libgimp, pdb, plug-ins: GimpText* using GeglColor.
One of the big improvement in this commit is that text layers are now much
better at space accuracy. They were already space-aware, yet rendered as sRGB u8
only before being converted to the image's space. It means that text layers had
the following limitations:

* Any color out of sRGB gamut were trimmed.
* Precision was always 8-bit (even if the image was high-bit depth).

Now GimpTextLayout keeps track of its source space (for RGB and CMYK only, this
won't be as easy when we will support more backend, since Cairo has only RGB
support for image data) and the image TRC (in case it bypasses the color space's
TRB) and it draws within this gamut and space.
It means first that we are not limited to sRGB colors; we will draw text main
color in the full image gamut, with still 2 remaining limitations:

* Unbounded colors are impossible because Pango format (to color text) uses
  hexadecimal (so even with half/float images, you can't draw out-of-gamut text
  unfortunately).
* Main color precision is still 8-bit, yet a tiny bit better than before as we
  at least follow TRC (so we avoid some of the precision loss when converting,
  even though the bit-depth is still the biggest loss).

The outline color on the other hand is drawn through Cairo API entirely, in
float. This means that the outline color will now be without any precision loss.

Note that this depends on CAIRO_FORMAT_RGBA128F which is only available since
Cairo 1.17.2 which is not in Debian bookworm (our current baseline for GIMP
3.0). It means that the old precision will still happen with older Cairo
version, as determined by #if code at compilation.
2024-02-11 23:28:02 +01:00
Jehan
a60b16f497 app: grab HSV values directly from GeglColor.
Absolutely no need to use intermediate GimpRGB and GimpHSV now convert data
ourselves with gimp_rgb_to_hsv() and gimp_hsv_to_rgb().
2024-02-11 23:28:02 +01:00
Jehan
7de118051f app: the Device Status dockable now shows context-sensitive colors.
I moved the function to select a valid contextual RGBA format as a core API
gimp_context_get_rgba_format(). This same API is now used in context actions, as
well as in the GimpDeviceStatus widget.

The latter now shows per-device fg/bg colors relatively to the active image's
format. The tooltip will also display contextual information (i.e. either the
image's name whose space is used, or sRGB).
Of course, this all updates when switching images by connecting to the
image-changed signal.
2024-02-11 23:28:02 +01:00
Jehan
cd09634dc2 app: update fg/bg color action code modifying colors through RGB axes.
In space invasion world, we want color-related code to be contextual. When we
say "Increase/Decrease the red/green/blue channel by X%", it would actually mean
something different if you are working on a sRGB space or a wider gamut space.
Furthermore, it means also something different if you work on linear/perceptual,
overriding the space's actual TRC.

This is why this new code takes the active image into account and uses this as a
base for the space and TRC you are working on. In case you have no active image,
it defaults to the current GeglColor space (though really this case should not
matter too much). In case your image is not RGB to begin with, it uses sRGB
space.
2024-02-11 23:28:02 +01:00
Jehan
b1178c51a3 libgimpconfig: support the GimpRGB format for GeglColor.
Some old config files will contain (color-rgb) contents. Also some data, such as
historical tool presets (.gtp files) will have such values in their
(tool-options).
2024-02-11 23:28:02 +01:00
Jehan
cd32b3bffa libgimpconfig: add support for GeglColor config properties.
GeglColor properties are serialized this way:
(propname "encoding" bpp pixel-data profile-size profile-data)
2024-02-11 23:28:02 +01:00
Jehan
4d0df90e26 libgimpconfig: fix some memory leaks when deserializing raw data. 2024-02-11 23:28:02 +01:00
Jehan
dbbcfb16d5 app, libgimp*, pdb, plug-ins: GimpContext is now using only GeglColor.
- app: gimp_context_get_(foreground|background)() are now returning a GeglColor.
- libgimp: PDB functions named similarly in libgimp are returning a newly
  allocated GeglColor too.
- A few other PDB functions (the ones using these functions) were updated and
  their signature changed to use GeglColor too, when relevant. Plug-ins which
  use any of the changed libgimp functions were fixed.
- GimpContext: signals "(foreground|background)-changed" are now passing a
  GeglColor.
- libgimpconfig: new macro GIMP_CONFIG_PROP_COLOR using gegl_param_spec_color().
- GimpContext: properties "foreground" and "background" are now GeglParamColor
  properties.
- app: All code interacting with GimpContext objects were updated to receive a
  GeglColor (that they may still convert, or no, to GimpRGB for now).
- app: gimp_prop_gegl_color_button_new() was added as an alternative to
  gimp_prop_color_button_new() when the property is a GeglParamColor. Eventually
  the former should replace completely the latter.
- libgimpwidgets: gimp_prop_color_area_new() now works on GeglParamColor
  properties only.
- libgimp: gimp_procedure_dialog_get_widget() will generate a GimpColorArea for
  GeglTypeParamColor arguments.
2024-02-11 23:28:02 +01:00
Jehan
229994957c libgimpwidgets: improve a tiny bit the error message to help debugging. 2024-02-11 23:28:02 +01:00
Jehan
f18266cb04 app, libgimp, pdb, plug-ins: gimp_context_[gs]et_foreground() now using GeglColor.
Also the color is internally stored as GeglColor, though there are still get
APIs and signals using GimpRGB.

The equivalent PDB functions are also changed to use GeglColor, same as app/
functions.
2024-02-11 23:28:02 +01:00
Jehan
9602926012 libgimpcolor: new functions gimp_color_set_alpha() and…
… gimp_color_is_perceptually_identical().

gimp_color_is_perceptually_identical() is meant to replace gimp_rgb_distance()
which is anyway always used to decide whether 2 colors can be considered equal.
So rather than having a distance algorithm which we won't be able to change
later on (if people start relying on specific values), let's just give the
answer directly on what's a same color (perceptually) or not.

Also now the distance is computed through the intermediate color space LCh which
seems to be one of the most perceptually uniform space, therefore a good choice
for such an algorithm (comparing distances on a non-perceptual uniform space
doesn't make very much sense, since a same distance may be perceived differently
in different subspaces).
2024-02-11 23:28:02 +01:00
Jehan
39544f96b4 app: some more GimpRGB to GeglColor port.
The picked() signal of GimpColorTool now emit a GeglColor.
2024-02-11 23:28:02 +01:00
Jehan
ecf4cfb3c5 app, libgimp, pdb, plug-ins: getting rid of some GimpRGB usage.
This is a first commit to really getting rid of GimpRGB within core and
PDB/plug-in code. This will make color conversion reliability a lot better as
GeglColor will handle conversions for us. The goal is that we should keep origin
color space (for instance when picking colors in a GimpPickable, or when storing
in the FG/BG colors or in paletters) until the last second and convert at use
only.
It's still very much work-in-progress.
2024-02-11 23:28:02 +01:00
Jehan
75efbf77d3 Issue #9790: reimplement gimp_drawable_[gs]et_pixel().
These 2 functions were removed in commit 89c359ce. They were in fact used and
clearly this historical API seems interesting (though we can likely do the same
thing using the drawable GeglBuffer, but this way is much easier).

This is now reimplemented using GeglColor instead of raw data.
2024-02-11 23:28:02 +01:00
Jehan
7814f011d0 libgimp*, pdb: support of GeglColor in the PDB.
Eventually this is meant to fully replace GimpRGB (as well as GimpHSV, GimpHSL
and GimpCMYK), both in libgimp and in core code, as part of both the space
invasion and the API rework. For this first commit, I keep this new object side
by side to GimpRGB.
2024-02-11 23:28:02 +01:00
Alx Sa
f6ff73210d core: Ignore selection when merging NDE
gimp_drawable_filter_apply () is affected
by the active selection. This causes display
glitches when merging all filters or
undoing a merge while an active selection
is on the image.

This patch saves the current selection,
clears it, merges/unmerges the filters,
then reapplies the selection to avoid the
problem. In the future, this should be
re-examined (when filter masks can be
edited).
2024-02-11 22:14:15 +00:00
Øyvind Kolås
9e6f90d664 meson,app: depend on GEGL-0.4.48 2024-02-11 22:42:16 +01:00
programmer_ceds
3a6e2913ed Correct upper limit shown in console browser for SF-OPTION controls (fixes #10796) 2024-02-11 19:25:56 +00:00
Alx Sa
8285795367 plug-ins: Restore screenshot delay on Windows
Resolves #10802.
Since the GimpProcedureDialog port, the Windows version
of the Screenshot plug-in has been missing the
"Screenshot Delay" option. This is because Windows did not
have the SCREENSHOT_CAN_DELAY_WINDOW_SHOT enum
set. Adding that back in restores the option.
2024-02-11 17:11:45 +00:00
Ferry Jérémie
1a041b65d1 correction : keep <rec> node and put opacity to 0 2024-02-10 19:56:15 +00:00
Ferry Jérémie
06064a6e5a Issue #9282 : deleting a rect node => black squares instead of symbolic icons 2024-02-10 19:56:15 +00:00
Ferry Jérémie
e397fb512a Issue 9268 : a <rect> node cover the picture 2024-02-10 19:56:15 +00:00
Sabri Ünal
032d930e23 Update Turkish translation 2024-02-10 11:20:41 +00:00
Sabri Ünal
69bf2f1897 Update Turkish translation 2024-02-10 11:06:40 +00:00
Sabri Ünal
6ea9b2d40d Update Turkish translation 2024-02-10 11:04:07 +00:00
Sabri Ünal
ee5fc1d484 Update Turkish translation 2024-02-10 11:03:58 +00:00
Jordi Mas
abe25cd0c0 Update Catalan translation 2024-02-10 08:03:20 +01:00
Jordi Mas
a1a38cb933 Update Catalan translation 2024-02-10 07:59:28 +01:00
Alx Sa
a2b683e53c tools: Move tool effects under NDE effects
Applying the same reordering code
in cbb1e816 to the Gradient and Cage
tools.
2024-02-09 23:23:47 +00:00
Yuri Chornoivan
bca419f9da Update Ukrainian translation 2024-02-09 20:41:58 +00:00
Bruno Lopes
e977b1b03b build/flatpak: Move Build instructions to gimp-web-devel
Here, the instructions was hard to find in the middle of maintainer stuff.

Also, be able to build GIMP without dev-oriented distros is something very
desirable, and the gimp-web-devel is the suited place fot it.
2024-02-09 15:29:45 -03:00
Jehan
6e6239c882 NEWS: update. 2024-02-09 19:10:46 +01:00
Ekaterine Papava
9043eeb837 Update Georgian translation 2024-02-09 17:55:10 +00:00
Ekaterine Papava
94ed0c0fe5 Update Georgian translation 2024-02-09 17:52:31 +00:00
Alx Sa
cbb1e81686 tools: Apply Warp below NDE filters
Resolves #10736.

By default, any filter added with a drawable with
gimp_drawable_filter_new () will be added on top
of the filter stack. Now that we have NDE effects,
there can be multiple live filters when drawing.

The Warp tool applies a GEGL operation as well,
and now it draws on top of any existing effect.
This patch adds code to move the Warp's filter
below any other NDE effects so it operates on
the raw pixels only.

Note that a longer term solution might be to have
a separate stack for tool-based GEGL operations,
but that would be a post 3.0 discussion.
2024-02-09 17:48:53 +00:00
Jehan
25145b9684 Issue #10745: move the "item set" icon above layer list.
- The icon itself was changed to a "search" icon. Though it kinda made sense to
  keep the "link" reference when I first implemented this, as a reference to how
  we used to link items (whereas now we select them together), in the grand
  scheme of things, it's not such a good idea and many won't likely understand.
  But everyone will understand a "search" button. :-)
- It's now next to the label displaying the number of selected items, in the
  item tree view header. This makes much more sense there. Also it makes the
  long list of bottom buttons slighly shorter.
- Finally I make this feature accessible to the channels and paths, by actually
  moving it out of GimpLayerTreeView and into GimpItemTreeView.
2024-02-09 18:22:43 +01:00
Alx Sa
d6edd71c4f xcf: Save/load GEGL seed parameter
Certain filters like Supernova have a
random seed property. According to the
specifications it's an unsigned int, so we
can save and load it with existing
functions.
2024-02-09 11:20:42 +00:00
Jehan
979900fcdf gitlab-ci, build: BUILD_TYPE not set for packaging-win-a64 job.
Aaaargh! I think this was the main issue which would explain why the problem was
mostly happening on the packaging job. In this job, we were still consistently
calling `pacman --noconfirm -Suy` (i.e.g "Synchronizing package databases")
which we had stopped to do for the CI builds as that was highly increasing
chances of locking pacman's process.
2024-02-08 21:00:07 +00:00
Jehan
a3d8f65946 gitlab-ci: terminate all msys2 related processes before Windows/Aarch64 jobs.
This is the command suggest by MSYS2 developers here:
https://github.com/msys2/MSYS2-packages/issues/4340#issuecomment-1887695290

They also say to run it outside the MSYS2 environment, which is why it's in the
CI rules, not in the shell script.

Honestly at this point, it feels like we are just stacking weird workaround to
get it to fail not too often. ;-(
2024-02-08 21:00:07 +00:00
Jehan
effe39d688 build: add gettext-tools dependency from MSYS2 repo.
gettext was recently split into 2 packages. While we didn't have the issue on
hmartinez82's runner, because old packages are not wiped out (as they should),
this issue first appeared on our new Arm runners.

This fixes the following error in our Windows build:

> /usr/bin/msgfmt: cannot locate ITS rules for ../data/tips/gimp-tips.xml.in

See:
* https://gitlab.gnome.org/Infrastructure/gimp-web-devel/-/merge_requests/52
* https://github.com/msys2/MINGW-packages/pull/19913
2024-02-08 21:00:07 +00:00
Jehan
5040eb88fb build: break ninja && ninja install into 2 calls.
Fixing a case where the script continued after a failed `ninja`. After further
testing on how `set -e` works, it looks like a toplevel `false && true` command
will fail the script (which is what we want), but it won't when inside an `if`
block!

Breaking it down into 2 separate calls fail the script correctly though. So
let's do this.
2024-02-08 21:00:07 +00:00
Jehan
ea3ec94bfb build: work around repetitive pacman failures by retrying.
MSYS2 pacman gets randomly stuck on Windows/Aarch64. The actual issue is still
being investigated by upstream projects, though anyway it's bad for us right
now, to the point that there are discussions to remove Aarch64 support from the
Windows installer (whereas it just got added recently!) in #10729.

This is an attempt to a workaround. Instead of getting stuck forever and waiting
until the whole job times out (per Gitlab CI settings), I time-out (after 3
minutes) the pacman command within our script and try again, up to 2 more times.
Hopefully one of the calls would succeed.

I also send a SIGKILL through the timeout (though I have no idea how signals
translate to Windows processes) and run again taskkill after this, which may
seem overkill. Interestingly I get output for both, which seems to indicate that
the kill succeeds in both cases (because of several processes?).

Anyway clearly it's a bit of random code not completely understood, but the
inability to test this all locally clearly doesn't help so it's good enough for
the time being.

See: https://github.com/msys2/MSYS2-packages/issues/4340
2024-02-08 21:00:07 +00:00
Alx Sa
d8b1dd8a37 Core: Explicitly merge down NDE filters on flatten
Resolves #10769.

Flattening an image or merging down layers caused
us to lose NDE filters on undo, as we flattened with
gimp_gegl_create_flatten_node () which didn't create
an Undo/Redo object.
To fix this, we merge the filters down beforehand with
our API so that they will be restored when undoing.
2024-02-08 17:04:25 +00:00
Alx Sa
92aad54cca widgets: Fix crash and formatting from NDE
Resolves #10768.
During NDE development, the Show/Hide All
function name was changed. This was not fixed
in one location where we blocked it during popup
creation, so the signal was running on dead objects.
This patch fixes this. It also fixes a few formatting
errors made during NDE development.
2024-02-08 14:03:55 +00:00
Jehan
1bf506abc6 gitlab-ci: clarify multi-command shell block.
Two shell commands got merged as one line. This seems to work fine on
hmartinez82's runner, unlike on our new runners. Anyway it is likely good
practice to clearly separate the commands.

Fixing:

$ if ($stuck -eq "True") { Remove-Item -Force -Path "C:\msys64\var\lib\pacman\db.lck" Write-Output "Cleaned previous stuck pacman" }
Remove-Item : A positional parameter cannot be found that accepts argument 'Write-Output'.
At line:279 char:26
+ ... q "True") { Remove-Item -Force -Path "C:\msys64\var\lib\pacman\db.lck ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Remove-Item], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
2024-02-07 22:48:37 +01:00
Sabri Ünal
48b3b7f2bd Update Turkish translation 2024-02-07 12:49:05 +00:00
Alx Sa
9860377871 widgets: Prevents NDE edits on pixel locked layers
Resolves #10766.
Currently, GIMP does not support applying or editing
filters when the layer is pixel locked. This patch
prevents users from attempting to edit filters via the
NDE popover UI, and notifies them of why.
2024-02-07 04:47:49 +00:00
Vasil Pupkin
be7f2964de Update Belarusian translation 2024-02-06 23:38:39 +00:00
Alx Sa
3e200c81d7 widgets: Don't merge filters on pixel locked layers
Resolves #10767
Since you can't merge other layers onto a pixel
locked layer, it makes sense to prevent that with
NDE filters as well.
2024-02-06 18:20:36 +00:00
Alx Sa
ba05730f78 core: Fix invisible filter merge bug
If any NDE filter is hidden when merged, the entire layer
is hidden. This patch changes the behavior so that the
invisible filter is removed instead of committed when
merged down.
2024-02-06 15:34:39 +00:00
Jehan
768b01fbf5 desktop: small grammar fix.
Just noticed this while reviewing the Welcome dialog. Since it's user-facing
text, let's avoid too many grammar errors.
2024-02-06 15:49:41 +01:00
Jehan
0e10dacc87 libgimpwidgets: properly set the icon theme even at initialization.
Without this, when creating the new config folder for the first time
(update from 2.10 to 2.99/3.0), if say "Legacy" icon theme was set, it
would not show on the first run, though it would show on the second run.

Now it shows directly on the first run.
2024-02-06 15:10:32 +01:00
Jehan
a5cc3759b3 Issue #10731: icons are broken at first run. 2024-02-06 15:04:52 +01:00
Vasil Pupkin
f2681ac49c Update Belarusian translation 2024-02-06 03:54:12 +00:00
Daniel Novomeský
d326e1350e plug-ins: clean-up HEIF plug-in
Plug-in now requires libheif >= 1.15.1, so many preprocessor
directives like LIBHEIF_HAVE_VERSION(1,13,0) are no longer needed.
2024-02-05 13:28:13 +01:00
Daniel Novomeský
63aa33f808 meson: require libheif >= 1.15.1 2024-02-05 13:28:13 +01:00
programmer_ceds
6d10bbf856 Guides scripts enabled when multiple drawables selected (fixes issue #7535) Take 2 2024-02-04 18:26:45 +00:00
Anders Jonsson
f13d007a95 Update Swedish translation 2024-02-04 18:21:22 +00:00
Anders Jonsson
0aa74267c6 Update Swedish translation 2024-02-04 14:07:29 +00:00
Yuri Chornoivan
fa0ab5ee1a Update Ukrainian translation 2024-02-03 20:32:29 +00:00
Alx Sa
0bca939daf scripts: Port scripts with SF-OPTION
After ab626e79, Script-Fu v3 now has the
SF-OPTION parameter again. This patch
ports a few scripts that use it or were
not otherwise covered by other merge
requests.
Note that further improvements are
necessary to allow these to work on
multiple layers simultaneously.
2024-02-03 18:39:10 +00:00
Sabri Ünal
3c264411ad Update Turkish translation 2024-02-03 18:05:15 +00:00
bootchk
ab626e79ec 2.99 ScriptFu: add custom widgets to GimpProcedureDialog
For version 3 scripts, using script-fu-register-filter

Widgets for SF-OPTION and SF-DIRNAME

Fixes #9992

Test case is Sphere v3.

Note that SF-VECTORS is still not supported,
until there is a VectorsChooser widget in libgimp.

A step towards deprecating old-style scripts using script-fu-register,
and deleting script-fu-interface, the duplicate dialog for SF.
But we still need to change or replace script-fu-register (for non-filter plugins)
to use GimpProcedureDialog.
2024-02-03 15:27:16 +00:00
Stanislav Grinkov
978a795eb7 plug-ins: replace manual creation of GimpDrawablePreview's...
... with the call to gimp_procedure_dialog_get_drawable_preview(...) function.
2024-02-03 21:02:40 +06:00
Stanislav Grinkov
31b4e8122b libgimp: new gimp_procedure_dialog_get_preview_from_drawable() function.
This allows plug-in developers to create GimpPreviewDrawable widgets
with the procedure dialog API.
2024-02-03 21:02:40 +06:00
bootchk
e9f24beb6b ScriptFu: no compiler warning converting float to int MIN_RESOLUTION 2024-02-03 09:34:58 -05:00
Alx Sa
cc62f2b037 actions: Load Gegl properties when editing filters
Some GIMP-custom GEGL operations do not use GimpConfig to
store their properties (for instance, Threshold). 
Previously, we weren't copying over their values when editing an
NDE filter.
This patch adds code to copy over the Gegl properties if there is
not a GimpConfig object attached to the filter.
2024-02-02 22:42:02 +00:00
Alexandre Prokoudine
26d8c971a1 Update Russian translation 2024-02-02 13:05:48 +01:00
Jordi Mas
21170ad2b7 Update Catalan translation 2024-02-01 18:29:51 +01:00
bootchk
68cc92f939 libgimp: fix #10730 gimp_procedure_dialog_get_file_chooser precondition wrong 2024-02-01 11:39:00 -05:00
Jehan
e7b85e3d67 Issue #10725: do not test for lua-lgi when lua can't be run.
In particular in a cross-compilation environment where you don't have an exe
wrapper or cross-host run ability, you still want to be able to configure GIMP.

It is also possible to install lua scripts anyway with -Dlua=enabled, bypassing
ability to test lua-lgi presence (a warning will be outputted at configuration
time, but no error).
2024-02-01 15:46:55 +00:00
Jehan
0902e45901 build: jobs must return in failure when a dependency build fails.
While this is the job of `set -e`, putting parts of the script in shell
functions hid error returns in the build-deps-msys2 script.
Cf. #10729.

For the build-gimp-crossroad script, let's just add `set -e`.
Cf. #10725.
2024-02-01 15:46:55 +00:00
Anders Jonsson
a07b3c803b NEWS: typo and grammar fixes 2024-02-01 16:17:32 +01:00
Ekaterine Papava
f2ffdfefa3 Update Georgian translation 2024-02-01 02:24:08 +00:00
Ekaterine Papava
4ba8721f12 Update Georgian translation 2024-02-01 02:19:29 +00:00
Jehan
b89d90de42 NEWS: update. 2024-01-31 15:37:02 +01:00
Jehan
495523db39 themes: removing "Darker" theme.
I believe there is a real use case for darker or lighter themes, but this
particular theme is not particularly maintained and has no light variant (or to
be accurate: the light variant is just a link to the "Default" one). If someone
is interested in such themes, we'll welcome contributions to revive a new theme
which should have at the very least both a light and dark version, and we could
name it "Contrast" (rather than "Darker" which focuses on a dark variant only).

I think it's better to do it this way rather than releasing with a half-done
job.
2024-01-31 15:27:50 +01:00
Jehan
87a3073b04 app, themes: get rid of Compact theme and move its logic into code.
The Compact theme code is nearly the same as the Default one, apart from setting
palette icon size to small (which is already something done by the "Override
icon sizes" setting in Preferences), setting font-size to small (which can be
independently set by our "Font Scaling" setting) and setting 3 paddings.

Rather than having this separate theme, it feels like just moving the padding
changes as part of the icon size makes sense. In particular since, when setting
icons to "Small" right now, the default padding really feels a bit huge and out
of place. So all-in-one seems a better choice.

At first, I wanted to set a padding proportional to the icon size, but it didn't
work well. For now, I'll just choose padding sizes manually.
2024-01-31 15:27:50 +01:00
Marco Ciampa
f9a75fbe80 Updated Italian translation 2024-01-31 13:46:14 +01:00
Alx Sa
5f561bfbca tools: Don't make nop effects non-destructive
If you run the GEGL Operation tool without choosing
a filter, it leaves a "gegl:nop" layer effect behind.
This is not useful, so we check and set such filters as
destructive to get rid of when applying an effect.
2024-01-31 11:38:40 +00:00
Anders Jonsson
3d721935eb Update Swedish translation 2024-01-30 21:19:28 +00:00
Yuri Chornoivan
e667cc48d3 Update Ukrainian translation 2024-01-30 20:40:24 +00:00
Jehan
961248528b Issue #9712: image finalization should be propagated through GimpContext.
This was provoking a CRITICAL in #9712, in the GimpFgBgEditor which was tracking
the active image, but even before this, I experienced a crash in
GimpLayerTreeView code with the same steps.

The problem is that in some cases, the image switch happens once the currently
active image is already disposed. In particular we had the case in multi-window
mode where closing a window would free a GimpImage yet without necessarily
setting another image as active, since it depends on window focus in MWM (and
the other image windows may not gain focus immediately; this depends on the
window management logic).

Therefore we had various handlers in Gimp*TreeView (or GimpFgBgEditor and
possibly other places) code which tried to disconnect or work on now freed
pointers. To handle such case, let's connect to image finalization and set the
context to NULL image.
2024-01-30 21:31:04 +01:00
Jehan
2294ad12fc app: fix crash when setting an action insensitive without setting reason.
When working on #9712, I encountered this crash first before the main issue
(with the same reproduction steps as listed by Wormnest): reason may not be set
by the method. It's better to always explicitly set this variable to NULL first.
2024-01-30 21:31:04 +01:00
Alx Sa
e5592f2adf actions, dialogs, widgets: Windows Dark Mode title bar fixes
Making more dialogues use the title bar
theme code from ad8b47bf on Windows.
2024-01-30 15:58:07 +00:00
Alx Sa
34d613f364 Fix regression caused by 2c9668cb
2c9668cb did not contain the updates to gimpicons.h
introduced in c4f5bae1, accidentally reverting back
two function signatures to before that commit.
2024-01-30 15:55:10 +00:00
Alx Sa
2c9668cbb4 widgets: Add Effects icon to layer dockable header
Also creates a GIMP_ICON_EFFECT
constant so that a new permanent
layer effects icon can be assigned to it
2024-01-30 04:06:39 +00:00
Jehan
d28a577a12 Issue #9410: override prefer-symbolic-icons for mono-style icon themes.
The current GTK algorithm for finding an icon seems to be:

  main icon theme in choosen style > fallback icon theme in choosen style >
  main icon theme in another style > fallback icon theme in another style

Where "style" is either color or symbolic variant of a given icon. The problem
is therefore if say your prefered style is "Symbolic" and you choose a
Color-only icon theme. In such a configuration, all icons which are also
available in the system theme with a symbolic variant will be used from the
system theme (even when they are actually available in the chosen icon theme
too, yet in a color variant) and you get a weird mix of part of the icons as
symbolic from system theme and another part as color from the chosen theme.

In order to avoid this weird situation, we only set -gtk-icon-style CSS value to
the prefer-symbolic-icons property if the chosen icon theme has both style
variants. Otherwise we force the only variant of the chosen icon theme.

The icon "gimp-wilber" is used to determine whether an icon theme has both
variants, which should be documented in the developer website for icon theme
makers.
2024-01-29 21:48:17 +01:00
Kolbjørn Stuestøl
6a06985064 Update Norwegian Nynorsk translation 2024-01-29 18:57:04 +00:00
Jehan
2102e58884 Issue #9752: actually check for lua-lgi at configuration.
The -Dlua option has 3 cases:

1. disabled: lua plug-ins aren't installed at all.
2. auto: lua plug-ins are only installed if we find a lua installation
   with access to the 'lgi' module. We now do the actual test at configuration
   (not only lua existence test, but also lua-lgi).
3. enabled: lua plug-ins are always installed but if no lua installation with
   'lgi' module is found, a warning is displayed at end of configuration step.
2024-01-29 18:42:45 +01:00
Jehan
224879db91 icons: delete unused meson.build ad fixup for commit c4f5bae14a.
These should have been deleted. This is an oversight.
2024-01-29 17:48:54 +01:00
bootchk
888adc5b96 2.99 Test: add more tests
Add tests of context stack ops.

Add test of paint methods.

Test convert to all precisions.

Test paint dynamics.

Test PDB as database.

Test PDBProcedure methods.

Test display methods.

Test drawable operations.
2024-01-29 09:24:07 -05:00
Alx Sa
cc1f1b5900 scripts: Port add-bevel to new API
While the script is made aware of multiple selected layers,
it still only works on the top selected layer.
Mnemonics were also added to the GUI fields,
and an unused "type" parameter was removed.
2024-01-29 13:36:37 +00:00
Bruno Lopes
95deb1dae3 Issue #10580: Package and Distribute 'gegl' on Windows
This helps more advanced users to using GEGL in different contexts.
2024-01-27 20:12:05 -03:00
Bruno Lopes
5f164ef913 build/windows: Extend unified list to Deps scripts
The list contains, in addition to the GIMP deps, all babl and GEGL deps.
So, let's use it.
Also, nothing new under the sun. We already use a unique list on the
Windows build instruction page (for stable branch) and do the same to
Debian image job.
2024-01-27 20:30:13 +00:00
Jehan
c4f5bae14a app, icons, libgimpwidgets: merge Color and Symbolic icon themes into one.
The merged icon theme is simply named "Default" and contains a color and
symbolic variant for all icons. While in 2.10, it made sense to have both icon
themes because a theme had no concept of a "symbolic" variant back then, icon
themes in 3.0 have this concept and we support this in GIMP through the "Use
symbolic icons if available" option in Preferences.

Until now, it was confusing to have both themes + this option, even more as you
could use the Color icons with the "Use symbolic icons" option, which meant that
if some icons were missing, you could end up with a mix of color and symbolic
icons (and oppositely using the Symbolic theme with the option unchecked).

The new state is much simpler and less confusing. Just 1 icon theme with both
color and symbolic variants (the latter being used by default).

Note that the identical meson.build in each size subfolder is still mandatory
because of the inability of meson (still!) to generate files with
custom_target() in a subfolder as output.
2024-01-27 16:02:37 +01:00
Jordi Mas
e0373fba91 Update Catalan translation 2024-01-27 09:35:32 +01:00
Jacob Boerema
2bb0e2a636 tests: fix typo in function name 2024-01-26 13:49:48 -05:00
Jacob Boerema
e1c9ec5a06 tests: mark tests skipped due to no display as skipped
We were skipping tests when there is no display, which is always the
case on Windows. However, these tests always showed as succeeded.
Unless you looked at the test log, you wouldn't noticed that most of
the tests weren't actually performed.

Exit these tests with the value GIMP_EXIT_TEST_SKIPPED instead of
EXIT_SUCCESS.
2024-01-26 13:47:20 -05:00
Jacob Boerema
064fd69f18 tests: fix #10694 test suite fails due to use of g_assert
You are not supposed to use g_assert in tests because g_assert can be
disabled using -DG_DISABLE_ASSERT, which makes tests fail.

Instead let's use the recommended replacement g_assert_true. At this
time we are not bothering using more specific g_assert_* functions,
since there are plans to change our test suite.
2024-01-26 13:44:30 -05:00
Daniel Novomeský
1148213825 build: Install QOI header manually 2024-01-26 14:47:00 +01:00
Yuri Chornoivan
7ff284c56f Update Ukrainian translation 2024-01-26 13:18:11 +00:00
Alx Sa
4a10b11e3e libgimpconfig: Fix cross-platform gsize warning
gimp_config_writer_printf () is used to print out a gsize variable, data_length.
gsize's actual size varies depending on platform, so using the format "%lu" throws
a warning on some platforms and switching to "%llu" throws a warning on others.
@Wormnest suggested ("%" G_GSIZE_FORMAT) as a universal format to resolve
this warning.
2024-01-26 12:08:18 +00:00
Jehan
c32e803679 app, themes: merge the Gray and Default themes and add theme color scheme concept.
Until now, we were following a similar concept of color schemes as what most OS
are doing. For instance, Freedesktop recently introduced a tri-state color
scheme of "Prefer Light", "Prefer Dark" and "Default", the latter being either
whatever the software prefers (e.g. we prefer either Dark or Gray for graphics
software usually) or what the system prefers. See #8675.

Until now, with GTK, we only had a boolean "prefer dark" setting through the
"gtk-application-prefer-dark-theme" settings. There is not even a "prefer
light".

Nevertheless for graphics application, there is clearly a third case (fourth if
we added a "follow system color preferences" which we don't implement for now):
gray mode and in particular middle gray. Having a middle gray UI is often
considered a necessity when working on colors in order to protect our perception
of color from being influenced by surrounding UI.
To fill this need, we were proposing a Default vs. a Gray theme in GIMP, but
this was a bit confusing and felt illogical, as discussed on IRC some time ago.
Also depending on whether you chose "prefer dark" or not for the gray theme,
this one was itself 2 themes, which made things odd and harder to work on.

Instead this commit:

- adds a color scheme concept in GIMP with 3 variants so far: light, gray and
  dark. A possible fourth (future) variant might be to follow the system
  preference (do all OS provide such a queriable option?).
- Our Gray theme is merged into Default (as the gray color scheme variant).
- Custom themes can add the following CSS files: gimp-light.css, gimp-gray.css,
  gimp-dark.css which are the base file for their respective scheme. gimp.css is
  still used as a fallback though it is not necessary (our own Default theme
  does not provide a gimp.css anymore). Custom themes don't have to provide all
  3 variants. A theme can just provide one or 2 variants if it only wants to
  support 1 or 2 use cases.
2024-01-25 18:56:13 +01:00
Sabri Ünal
e741920d8e Update Turkish translation 2024-01-25 14:42:40 +00:00
bootchk
69fedf6995 Fix #10475 double popup context menu on RMB in dockable chooser
Chooser return GDK_EVENT_STOP so parent manager does not also popup second menu.
Specifically, return the result of the call to gimp_editor_popup_menu_at_pointer.
When a menu does pop up (for a dockable), that result is GDK_EVENT_STOP
and the event does not propagate to the parent widget.

Added a comment about why we ignore the result of a call
to gimp_editor_popup_menu_at_pointer in another place,
since it is not obvious why that call is different.

All other current behavior retained.
Other current behavior might be separate issue:
LMB or RMB outside any item, or in the current selected item,
in the chooser that popups from the toolbox,
should probably close the popup chooser, or give an audible alert,
because it does nothing.
Note that a chooser is also used in a remote dialog for a plugin,
and it closes a different way, choosing an OK button.
2024-01-25 14:13:00 +00:00
Jehan
0ea48926aa NEWS: update. 2024-01-25 15:08:13 +01:00
Yuri Chornoivan
743230fbe6 Update Ukrainian translation 2024-01-25 13:56:14 +00:00
Marco Ciampa
ecfc90d202 Updated Italian translation (WIP) 2024-01-25 11:17:03 +01:00
bootchk
6aa9f97819 Fix #10690 build broken on GLib < 2.74
Use 0 instead of new symbol G_CONNECT_DEFAULT first defined in glib2.74
2024-01-24 13:30:10 -05:00
Jacob Boerema
f78186e03b Get rid of old Windows specific defines
MINGW64
- uses 0x601 as value for _WIN32_WINNT. No need for us to define
it to that value or even lower values in some places.
This also gets rid of:  warning: "_WIN32_WINNT" redefined
- has 0x0502 for WINVER, so get rid of us setting it to 0x0500 in
gimp-app-test-utils.h. It also seems that the need to use G_OS_WIN32
has disappeared here.
- DIRECTINPUT_VERSION is 0x0800, no need for us to set it to that value.
- AI_ADDRCONFIG was apparently missing from the MINGW headers in the
past, but not anymore.
2024-01-24 12:10:00 -05:00
Anders Jonsson
be1259de2b Update POTFILES.in 2024-01-24 09:18:47 +01:00
Ekaterine Papava
6c21b03631 Update Georgian translation 2024-01-23 21:30:33 +00:00
Ekaterine Papava
1c0c8ac38f Update Georgian translation 2024-01-23 21:24:51 +00:00
Jehan
d1ea2f35c3 desktop: update the <release> info in AppStream metadata. 2024-01-23 22:09:03 +01:00
Anders Jonsson
e3896352b9 app: fix test-ui typo 2024-01-23 20:46:01 +00:00
Yuri Chornoivan
65f99b66fa Update Ukrainian translation 2024-01-23 20:44:10 +00:00
Yuri Chornoivan
cdde3f220f Update Ukrainian translation 2024-01-23 19:36:48 +00:00
bootchk
25280ffdb1 test: add tests of paint ops. 2024-01-23 18:30:32 +00:00
Jehan
3f54d83bac app: do not maintain manually the list of core ops with custom config object.
The list of objects where the config object is a dedicated custom class (instead
of a runtime-registered class) is well known. These are the operations
registered inside gimp_operations_init().

The list inside gimp_gegl_procedure_execute_async() which the previous commit
was updating was not right: it was still missing "gimp:hue-saturation" and
"gimp:threshold" should not have been on the list (this was generating a
CRITICAL when trying to get the "config" property on this object).

Instead let's add some init/exit() functions in gimp-operation-config API to
distinguish the operations with custom config (registered during init) with all
the others. Then we add gimp_operation_config_is_custom() which can be used
everywhere where we want to verify if an operation is using a custom-made config
object or a generated class just mirroring the operation properties.

This way, we should not get out-of-sync anymore.
2024-01-23 15:39:09 +00:00
Alx Sa
7a05a8956f tools: Fix Color Balance editing crash
Adds gimp:color-balance to the list of
GIMP-specific GEGL operations we
retrieve the GimpConfig settings from.
Also prevents trying to set a GEGL
property when editing if it couldn't be
converted properly (e.g. GimpConfig)
2024-01-23 15:39:09 +00:00
Jehan
956f16e173 Issue #10566: support GimpConfig and enum arguments and a few more fixes.
Now that we save GEGL operation arguments ourselves (instead of relying on
GEGL-generated XML), we can serialize and deserialize GimpConfig arguments which
are used in various operations implemented within GIMP core code.

Additionally:

- Also support saving and loading all enum types.
- PROP_EFFECT_ARGUMENT renamed to PROP_FILTER_ARGUMENT for consistent naming.
- A bit more accurate handling on save and load errors with dedicated messages
  to various issues.
- Use PROP_FLOAT_OPACITY instead of the obsolete 8-bit PROP_OPACITY (actually
  32-bit but stored as 0-255 int).
- Fix a leaking string.
2024-01-23 15:39:09 +00:00
Alx Sa
8b2975e0e8 Additional minor fixes
*It's possible to have one layer selected but edit the filter of another layer.
The FilterTool code was updated to use the filter's drawable if editing.
*Prevents editing if multiple layers are selected.
This is a current limitation of the filter tool itself, but it was causing issues with NDE.
*If an XCF with a filter from a third-party plug-in is loaded, the filter won't be
created if the user doesn't have it installed.
Note that GEGL still throws a lot of warnings about missing properties - not sure how to resolve that.
*Refresh drawable when finished editing a filter to fix issue with lingering preview splits
*Fix issue with loading more than one filter after XCF format changes
2024-01-23 15:39:09 +00:00
Jehan
a489345e77 app: a few fixups to MR !958 (initial non-destructive editing).
- Do not leak allocated return value of gegl_node_to_xml_full().
- When merging layer effects, use gimp_drawable_filter_commit(), making
  sure we use the exact same code path as when applying layer effects
  destructively from the start. This also ensures that filters are
  properly removed from the filter stack (unlike
  gimp_drawable_merge_filter()), which was the reason why the rendering
  was wrong (hence getting the buffer without effects first, then
  reapplying it after was only a workaround to an actual bug).
- When removing a filter, verify the object still exists before doing
  anything with it. If this was the last reference, we don't want to
  call functions on this object. In gimp_drawable_filter_commit(), we
  set up a weak pointer. In gimp_drawable_filter_remove_filter() itself,
  we save the pointer to the filter's drawable before actual removal (as
  we don't want to dereference a freed object later on).
- export_merge_layer_effects() should merge filters recursively through
  layer groups.
- clean up the XCF code:
  * No need to wrap the effect pointers list into 2 zero offset. Only
    have one zero offset to indicate the list end.
  * Add the layer effect mask in the effect structure (not in the layer
    structure), similar as for layer masks.
  * Effect name and icon made as main data in the structure, not as
    properties.
2024-01-23 15:39:09 +00:00
Alx Sa
e678a20951 core: Initial non-destructive editing implementation
This patch implements an initial form of
non-destructive editing. Filters now stay active
instead of being immediately merged down.
A new column is added to the layer tree view, which
can be clicked to show a pop-over menu.
Filters can currently be hidden/shown, edited, reordered,
deleted, and merged down from this pop-over menu.

Currently, this works on layers and layer selections only.
Plenty of room for improvement!
2024-01-23 15:39:09 +00:00
bootchk
ec90cd1d9a Add more tests of PDB API in ScriptFu. 2024-01-23 07:19:09 -05:00
Jordi Mas
aab48a7c89 Fixes to Catalan translation 2024-01-22 21:36:30 +01:00
bootchk
784cde7f14 Fix #10496 crash on RMB in chooser item not the current selection
Use g_signal_connect_object to ensure object passed to handler
is not destroyed in the middle of the handler by knock-on signal handling.

Note there are comments about this in gimpcontainertreeview.c line 1592.
And similar code i.e. calls to gimp_container_view_get_container
that seem to be intended to solve but might actually also be susceptible.
Those calls in icon view throw CRITICALs during this issue.
But testing of the tree view (a list instead of a grid)
doesn't seem to crash, so leave well enough alone.
2024-01-22 18:29:20 +00:00
Vasil Pupkin
7d8495fdd2 Update Belarusian translation 2024-01-22 18:27:38 +00:00
Sabri Ünal
84c2b63212 Update Turkish translation 2024-01-22 12:40:07 +00:00
Sabri Ünal
dff4486ab9 Update Turkish translation 2024-01-22 12:28:47 +00:00
Jordi Mas
a90f731d11 Update Catalan translation 2024-01-21 20:34:21 +01:00
Bruno Lopes
c60604a535 Partially revert "build/flatpak: Drop 'gimp_app_version' hardcoding"
As suggested by Jehan, the manifest will be configured by meson.
Of course, for CI compliance, this pushes the job to a further stage:
'packaging', which is what Flatpak is about, after all.

The distribution job name has also been changed, because when Store job
is merged, this will be the new nomenclature of the distribution jobs,
which was not changed since !1171 by lack of time.
2024-01-21 14:04:35 +00:00
dimspingos
0445f0b9ed Updated Greek Translation 2024-01-21 15:14:30 +02:00
Alx Sa
1b5c6630c3 widgets: Add MacOS-compatible menu separator
Per @lukaso, the "rightwards triangle arrowhead" character
doesn't render on MacOS. This patch uses a different character
for MacOS only until a standard character can be decided on.
2024-01-20 18:48:45 +00:00
Jürgen Benvenuti
462b874ae8 Update German translation 2024-01-20 18:45:20 +00:00
Kolbjørn Stuestøl
9a586890cf Update Norwegian Nynorsk translation 2024-01-20 15:26:58 +00:00
Bruno Lopes
ddf6d6e513 build/windows: Remove GTK patches
There is no point in keeping .patches in our source since we aren't applying
them and there are "backup" MRs in GTK: GNOME/gtk!3275 and GNOME/gtk!4432.
2024-01-20 09:47:48 -03:00
Boyuan Yang
182d3cece6 Update Chinese (China) translation 2024-01-20 01:55:17 +00:00
Boyuan Yang
1bccd22595 Update Chinese (China) translation 2024-01-20 01:53:35 +00:00
Boyuan Yang
f81be6d5b3 Update Chinese (China) translation 2024-01-20 01:53:20 +00:00
Alx Sa
bfcc812623 core: Fix warning when pasting to a mask
Resolves #10657.
d120e592 fixed a crash when pasting into an empty image.
However, it created a new issue when pasting into a layer mask.
It caused a later call to gimp_drawable_convert_type () to fail, as
the pasted image would not need to be converted if the image's
settings were used rather than the drawable.
This patch fixes both issues by checking if the selection/image is empty,
and assigned the base type and precision values from either the selection
or the image accordingly.
2024-01-19 22:44:51 +00:00
Bruno Lopes
161d6e6932 Add .vscode/settings.json compliant with Coding Style
As recommended in the Coding Style "Code editor" section:
https://developer.gimp.org/core/coding_style/#code-editor--integrated-development-environment-ide
2024-01-19 16:06:06 -03:00
Bruno Lopes
e653535ed2 .gitignore: Delete unused exceptions
The '_build' and '.vscode' folders (this in particular makes impossible
to commit settings.json) are not welcome in this general file, according
to Jehan comment:
https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1021#note_1801018
2024-01-19 15:43:46 -03:00
Jordi Mas
5a4a58a728 Update Catalan translation 2024-01-19 16:07:11 +01:00
Alx Sa
21d24467ad scripts: Fix "Remove all Guides" script bug
Resolves #10651
The "Remove All Guides" script calls
gimp-image-find-next-guide, which per
its description can take in 0. However,
the parameter sets 1 as the minimum
value.
This patch fixes the range so that it can
accept 0, which enables the Remove All
Guides script to work again.
It also updates the script to the new
multi-layer aware API.
2024-01-19 11:17:36 +00:00
Jehan
14abb71c34 NEWS: update. 2024-01-19 11:26:08 +01:00
Anders Jonsson
7a66111b19 Update Swedish translation 2024-01-18 21:01:16 +00:00
Bruno Lopes
ca5b2cd7c7 devel-docs: Update content according to 'gimp-web-devel'
- Drops HACKING file (it is outdated and we have the "same thing",
  updated, in the devel site), but moved PDB content to the README
* Update various links now to the devel site
+ Added 'TODOs' to avoid confusion from titles with empty content
  and removed some that are already implemented
2024-01-18 19:05:04 +00:00
Yuri Chornoivan
71ceff9125 Update Ukrainian translation 2024-01-18 17:51:16 +00:00
Yuri Chornoivan
088a4d42be Update Ukrainian translation 2024-01-18 17:49:22 +00:00
programmer-ceds
0514a07616 scripts: Update Guides from Selection API
Updates script to v3 code, which allows for it to work
when multiple layers are selected.
2024-01-18 11:14:31 -05:00
Bruno Lopes
107887f929 build/flatpak: Drop 'gimp_app_version' hardcoding
Now, the script reads the major.minor version automatically from the main
meson.build file, reducing maintenance work, which is already especially
high regarding flatpak because of the natural hashes updates etc.

Also, a small organization made to make the code more humanly readable.
2024-01-18 15:59:45 +00:00
Anders Jonsson
ab9f8146da app: mark missing tool option as translatable 2024-01-18 13:20:21 +00:00
Anders Jonsson
e2843e40cf libgimpwidgets: mark tooltips as translatable 2024-01-18 13:20:21 +00:00
Martin
f07ad4b2d6 Update Slovenian translation 2024-01-18 07:23:15 +00:00
Martin
cf133337c2 Update Slovenian translation 2024-01-18 07:21:36 +00:00
Bruno Lopes
b887211934 Issue #9106: Create desktop shortcut by default with Inno installer
As consensus on Windows contributors, it is more useful for most users
the generation of the desktop shortcut by default.
Now, users who don't want it should uncheck the option in custom install
or manually delete the shortcut after a full install.
2024-01-17 17:30:35 +00:00
Jacob Boerema
e58afad043 app: fix #10641 API for adding to the local Layers menu is broken
It was not possible anymore for a plug-in to add a menu item to the
local Layers, Classes and Paths dialogs using <Layers>, <Classes> and
<Vectors> at the start of the menu path.
For the first two this was due to an extra length parameter and the
drawables now being inside a GimpObjectArray. To fix that we check
inside the object array for the correct type names.
I'm not sure if Vectors ever worked, but testing shows it only adds
runmode and image parameters. To fix that we do the same as for
ColorMap.
2024-01-17 12:20:00 -05:00
Sabri Ünal
174d9c5631 Update Turkish translation 2024-01-17 08:04:53 +00:00
Sabri Ünal
007484517f Update Turkish translation 2024-01-17 07:48:30 +00:00
Sabri Ünal
78d768037e Update Turkish translation 2024-01-17 07:46:50 +00:00
Ekaterine Papava
f3887e362c Update Georgian translation 2024-01-16 20:07:22 +00:00
Bruno Lopes
38f5fec491 build/windows: Drop 'jhbuild'
The 'jhbuild' build of GIMP (Windows only) was added in 2013 and then maintained
by only one contributor (it even offered unnoficial nightly builds) until 2017,
when it never received a new jhbuild-specific commit again.

After so long, update it to keep up with current development status is quite hard,
so it is reasonable to remove this already dead version of GIMP.
2024-01-16 20:06:10 +00:00
Ekaterine Papava
ea54f99ec0 Update Georgian translation 2024-01-16 20:05:05 +00:00
Ekaterine Papava
30bab1919e Update Georgian translation 2024-01-16 20:02:57 +00:00
Alx Sa
0286210539 widgets: Add checks if GdkDevice doesn't exist
Resolves #10643.

Prevent gimp_modifiers_editor_show_settings () from being called
when the user clicks the Modifier Reset button in Preferences if
there is no device connected to GIMP.
2024-01-16 14:17:53 +00:00
Bruno Lopes
c239d522c8 gitlab-ci: Tweak CI to avoid stuck win-a64 jobs
'clangarm64' pacman is getting stuck and killing it is the only "solution"
before any patch by the MSYS2 folks.
2024-01-16 13:11:56 +00:00
Marco Ciampa
cb63e4505e Updated Italian translation (WIP) 2024-01-16 13:59:58 +01:00
Anders Jonsson
cea5397a59 Update Swedish translation 2024-01-16 10:25:39 +00:00
dimspingos
d5771b21e2 Updated Greek Translation 2024-01-16 10:54:56 +02:00
Alx Sa
15929e83fd core: Fix crash when pattern can't be loaded
For certain small selections, the pattern preview can't be loaded.
Since e1e30c6f assumes the pattern loads, this could cause a
crash if a dialogue with the preview is visible.
This patch checks if the scaled pattern was loaded before using
it, and otherwise uses the default pattern.
2024-01-15 22:55:57 +00:00
Anders Jonsson
31d8ac70a1 Update Swedish translation 2024-01-15 21:39:26 +00:00
Aurimas Černius
4424bafd47 Update Lithuanian translation 2024-01-15 20:55:55 +00:00
Aurimas Černius
656bf8d1fb Update Lithuanian translation 2024-01-15 20:46:13 +00:00
Aurimas Černius
a0c111a53c Update Lithuanian translation 2024-01-15 20:41:15 +00:00
Aurimas Černius
ee3e49299b Update Lithuanian translation 2024-01-15 20:36:12 +00:00
Yuri Chornoivan
92f7903331 Update Ukrainian translation 2024-01-15 20:24:04 +00:00
Bruno Lopes
663b6636ab build/windows: Enable Norwegian translation for the Windows installer
Following ce3b6430d5
2024-01-15 16:37:08 -03:00
Bruno Lopes
6850232cdb build/windows: Organize Installer script
The order of the commands was very confusing and some useful comments
was lacking. Let's fix it.
2024-01-15 16:36:32 -03:00
Bruno Lopes
2c1c7aae03 gitlab-ci, build/windows: Fix .patch and improve a little pacman upgrade
* Fixes an ARM .patch that stop to working after !1171, causing job fail
* Changes the logic of system upgrade (pacman -Syyuu) to be less redundant
  This also improves consistency with the Debian jobs
2024-01-15 15:04:30 -03:00
Bruno Lopes
3a561d1c68 build/windows: Fix and update some Inno Installer files
These files (specially the script) were not properly updated in the
previous MR, which would make the Inno Installer Job fail.
2024-01-15 15:04:30 -03:00
Bruno Lopes
9c0cc6ab98 plug-ins: Don't build ScriptFu interpreter and server in crossbuilds
Since !1171, ScriptFu .scm and .interp files aren't available to prevent
errors caused by no instrospection support, but this binaries escaped.
2024-01-15 15:04:30 -03:00
Kolbjørn Stuestøl
96a0cf98ca Update Norwegian Nynorsk translation 2024-01-15 17:58:51 +00:00
Kolbjørn Stuestøl
a380886c03 Update Norwegian Nynorsk translation 2024-01-15 17:47:58 +00:00
Kolbjørn Stuestøl
8f9dd1fe6b Update Norwegian Nynorsk translation 2024-01-15 17:35:59 +00:00
Kolbjørn Stuestøl
ce3b6430d5 Add Norwegian Nynorsk translation 2024-01-15 17:08:37 +00:00
Kolbjørn Stuestøl
46a4fbaa45 Update Norwegian Nynorsk translation 2024-01-15 17:05:05 +00:00
Bruno Lopes
5dc8c267da build: remove obsolete 'patches'
They have already been released in Cairo and were not even being applied
by us anymore.
2024-01-15 11:53:42 -03:00
Bruno Lopes
f24432e632 build: drop 'buildbot'
This folder has become totally obsolete because we currently use Gitlab CI
and its content was not being maintained for over a decade.
2024-01-15 11:53:42 -03:00
Anders Jonsson
9838c9f65f plug-ins: fix crash on export to xmc
Fixes #10605.

Export to xmc when image width or height is 256 pixels
causes a crash. Add equality check to an assert to stop
the plug-in from crashing.
2024-01-15 14:50:58 +01:00
Alx Sa
bb588155fd plug-ins: Fix ImageMap resize bug in GTK3
Resolves #10530.

In GTK2, setting a window's scrollbar policy to GTK_POLICY_NEVER
hid the scrollbars. In GTK3, this also makes the window automatically
resize to fit the contents. Since ImageMap displays the full drawable
with no scaling, this caused the plug-in window to be very large for large
layers.
GTK_POLICY_EXTERNAL in GTK3 works the same as the GTK2 version of
GTK_POLICY_NEVER, so using it instead fixes the problem.
The default width and height magic numbers were also replaced with
constants.
2024-01-14 19:43:32 +00:00
Martin
428f08b785 Update Slovenian translation 2024-01-14 17:19:51 +00:00
sonia
9f762f5e4b plug-ins: Fix JPEG2000 warning
Removes duplicate parenthesis in the CMYK color space check.
2024-01-14 11:17:29 -05:00
Alx Sa
c01ffee74f plug-ins, libgimpconfig: Fix minor warnings
- file-psd, sig[4] and block_len variables are initialized to stop uninitialized warnings
- file-xpm, g_file_peek_path () is cast to (char *) to stop "discarded const" warnings
- gimpconfig-serialized.c, %llu is used instead of %lu to stop overflow warning
2024-01-14 14:30:32 +00:00
Bruno Lopes
28fc941c53 build, devel-docs, po-*, tools: remove Autotools remnants
- Remove files not used by meson
- Remove autotools references in texts
2024-01-14 10:38:12 -03:00
Bruno Lopes
874b199e61 build, docs, etc: drop hardcoding of GIMP version
In preparation for GIMP 3.0 and future releases.
2024-01-13 18:15:10 -03:00
Luming Zh
056e545215 Update Chinese (China) translation 2024-01-12 23:57:34 +00:00
dimspingos
9d0ad0061d Updated Greek Translation 2024-01-12 20:22:40 +02:00
Alx Sa
2aa0a9d42b themes: Prevent system theme leak on stacks and viewports
If a system theme sets the background-image property for stacks,
it recolors the main canvas when empty. It also adds a border to
the toolbox Wilber area.
Additionally, the Credits page of the GtkAboutDialog has odd colors
due to general viewport grid styles overriding the GTK default.
This patch fixes these problems, and adds a custom CSS class to
the GimpAboutDialog for current and future work.
2024-01-11 20:03:48 +00:00
Yuri Chornoivan
9eb7928b91 Update Ukrainian translation 2024-01-11 19:01:04 +00:00
Yuri Chornoivan
6fa6c4fc05 Update Ukrainian translation 2024-01-11 18:54:16 +00:00
Yuri Chornoivan
edd4085608 Update Ukrainian translation 2024-01-11 18:49:58 +00:00
Anders Jonsson
ad123bbbc4 plug-ins: mark svg, wmf dialogs as translatable 2024-01-11 18:45:40 +01:00
Alx Sa
2db73f82ac display: Fix titlebar regression after 7e7828e4
The previous commit did not fully convert the title/status bar
format string to be UTF8-clean, due to a misunderstanding
of the logic behind the symbol used to indicate an image
was dirty.

Rather than always grabbing the 2nd character in the format
string, this patch now grabs the next character in the format
string after the %D, %N, %C, and %E commands.
2024-01-11 04:06:40 +00:00
Alx Sa
1666f82b20 scripts: Partially fix spinning-globe.scm
During the API port, the Map Object
plugin had some parameters added and
others changed to GimpChoice strings.
This broke the Spinning Globe filter which
called on the map-object plugin.
This patch updates the procedure call and
fixes ranges in the map-object plugin so
spinning-globe works again,
but larger scope warnings persist.
2024-01-11 03:20:04 +00:00
dimspingos
9dfe17f150 Updated Greek Translation 2024-01-10 10:08:50 +02:00
bootchk
96afe1532d libgimp: Refactor fractal-explorer-dialogs.c: extract methods
No functional change.

I did this while chasing #10590 and #10591
The refactoring moves replicated code into functions.
So readers can understand better without having to compare sections
of replicated code.
The comments also highlight issue #10590.
2024-01-09 19:21:27 +00:00
bootchk
d26433036c Fix #10536 Plugins: Fractal Explorer fails
Use g_connect_signal_swapped for "resource-set" signal from Resource Choosers,
to match the signal handler expecting "callback data" in the first arg.
Otherwise the first arg is the object emitting the signal.
2024-01-09 19:21:27 +00:00
bootchk
0edf079d4e Fix wire contention for gradient data 2024-01-09 19:21:27 +00:00
Alx Sa
ca1b21c008 widgets: Add Windows titlebar theme to search popup
Extends the theme-matching code from ad8b47bf to the
GimpSearchpop on Windows
2024-01-09 15:08:10 +00:00
Alx Sa
bbbf6df52d plug-ins: Fix image-map grid type change
Resolves #10611.

In GTK3, GtkRadioButtons are set using the "active" property
rather than selected, so the callback needed to check the
GTK_STATE_FLAG_ACTIVE flag instead of GTK_STATE_FLAG_SELECTED
when changing grid types.
The code was also reformatted to match current coding style.
2024-01-09 02:54:09 +00:00
Jacob Boerema
45ea994e89 plug-ins: improve default color handling of foggify
- To set color values in the 0-255 range we now have to use set_uchar.
- Because setting a default color is not working, the color in config
  could be None, which if the color wasn't changed caused a CRITICAL.

Let's check for None and if that is the case then manually set our
default color.
2024-01-08 18:11:46 -05:00
Jacob Boerema
c44819f58b plug-ins: fix foggify AttributeError on Cancel
When cancelling foggify we get the following error:
AttributeError: 'GimpProcedureConfig-python-fu-foggify' object has no
attribute 'end_run'

The end_run function was removed a while ago, so just remove this line.
2024-01-08 18:11:46 -05:00
Aurimas Černius
bdac126fb1 Update Lithuanian translation 2024-01-08 21:21:17 +00:00
Jacob Boerema
129667423f plug-ins: fix #10587 image map crash in grid menu
The grid state was not correctly updated when changed from within the
grid settings dialog.

Instead of using g_simple_action_set_enabled we need to use
g_simple_action_set_state, since we don't want to change whether the
action is enabled or disabled, but the checked/unchecked state.
2024-01-07 17:52:44 -05:00
Alx Sa
7e7828e452 display: Make title format UTF8-clean
The current code assumes that one letter is one byte long.
This caused issues when using non-ASCII UTF8 characters in
the title and statusbar format strings.

This patch replaces the loop logic with g_utf8_next_char () and g_utf8_get_char ()
to get the next letter no matter how many bytes it takes up.
2024-01-07 18:22:37 +00:00
Alx Sa
b9fe1c64f0 Tools: Add Pickable check to Align Tool
As reported in issue 10604, if the Align Tool is set to align relative
to a reference object and 'use extents of layer contents' is enabled,
clicking on a path causes a CRITICAL.

This is due to gimp_pickable_auto_shrink () being called, when GimpVectors
are not GimpPickables. A datatype check is added before calling the function
to prevent the issue.
2024-01-07 14:13:49 +00:00
bootchk
1553f8b88c Fix #10589 CRTICAL on empty label on resource chooser widget 2024-01-07 10:47:54 +00:00
Marco Ciampa
9bc59ba543 Updated Italian translation (WIP) 2024-01-07 03:49:30 +01:00
Jacob Boerema
73d7b0dc96 Issue #10450 crash or critical using file open options dialog
When opening images like DDS or EPS that have an options dialog,
we either get a crash, or criticals.

The critical made clear that there is a problem dereferencing:
(gimp-2.99.exe:9900): GLib-CRITICAL **: 14:52:58.831:
g_atomic_ref_count_dec: assertion 'old_value > 0' failed

Looking at gimp_file_dialog_progress_get_window_id we see that the
handle doesn't get an extra reference, while in other similar places
the handle is duplicated.

Using g_bytes_ref on the handle fixes the criticals for me.
2024-01-06 14:53:53 -05:00
Anders Jonsson
078dafa847 Update Swedish translation 2024-01-06 12:11:00 +00:00
Jacob Boerema
7a8f465b2d Issue #10588: enumerations for RotationType can't be used in Python
Due to GObject Introspection we can't have the last part of an
identifier start with a digit, since that part will be used in Python
as the identifier, and Python doesn't allow that to start with a digit.
e.g. GIMP_ROTATE_90 would be used in Python as
image.rotate(Gimp.RotationType.90)

To fix this we add DEGREES in front of the number, without a '_',
even though that looks ugly.
2024-01-05 13:28:49 -05:00
Sveinn í Felli
7e2a34bab8 Update Icelandic translation 2024-01-05 12:04:29 +00:00
Marco Ciampa
f9203e19bf Updated Italian translation (WIP) 2024-01-05 00:40:31 +01:00
Jacob Boerema
aeb1c726b9 libgimpbase: fix #10557 missing XMP namespace "Item"
With the sample image that contains the XMP namespace Item with the
correct url included, it is not returning the url when we ask for it.
This seems to be an exiv2 issue, but needs more research.

What GIMP doesn't do, is report that the namespace url we were looking
for wasn't found, and make sure that this doesn't block us from
handling all XMP tags.

To improve this on our end, we check if there was an error getting the
url, and if yes:
- We generate a warning message
- We create a dummy namespace url, with a special check for the missing
Item namespace to give it the correct known namespace url.
2024-01-04 15:24:30 -05:00
Martin
c4cf0af1da Update Slovenian translation 2024-01-04 19:58:03 +00:00
Martin
89ec688ad2 Update Slovenian translation 2024-01-04 19:56:36 +00:00
Martin
6b58329f86 Update Slovenian translation 2024-01-04 19:54:21 +00:00
Luming Zh
09f9af9a05 Update Chinese (China) translation 2024-01-04 18:11:22 +00:00
Alx Sa
f66c6e9681 python: Use theme colors for console font color
Previously, the console's font color was hardcoded to #006000.
This did not stand out well on darker theme.
This patch pulls the widget's foreground color from GtkStyleContext
to ensure it contrasts sufficiently with the console background color.
2024-01-04 17:51:02 +00:00
Sveinn í Felli
605acaa5f7 Update Icelandic translation 2024-01-04 17:42:59 +00:00
Sveinn í Felli
fbde793231 Update Icelandic translation 2024-01-03 17:58:37 +00:00
Alexandre Prokoudine
91c216d4ed Update Russian translation, part 4 of N 2024-01-03 01:27:11 +01:00
Alexandre Prokoudine
767f310e8a Update Russian translation, part 3 of N 2024-01-03 00:57:20 +01:00
Anders Jonsson
426f30cd84 Update Swedish translation 2024-01-02 21:08:23 +00:00
Luming Zh
a66f0769ca Update Chinese (China) translation 2024-01-02 20:32:07 +00:00
Sveinn í Felli
9e066feaa9 Update Icelandic translation 2024-01-02 18:22:44 +00:00
Sveinn í Felli
8bd67a2165 Update Icelandic translation 2024-01-02 18:17:28 +00:00
Alexandre Prokoudine
42971b5ffc Update Russian translation, part 2 of N 2024-01-02 15:39:21 +01:00
Bruno Lopes
d5f41b296b build/windows, data, extensions, plug-ins: Fix Build omissions
- Fix "no icons" errors generating loaders.cache with .cmd (CI-Cross).
  ! This is a sub-optimal fix, but it's better than a useless build.

- Fix "no interpreter" errors generating .interp with Meson (CI-Native)
  and generating .interp and copying .typelib with .cmd (Local-Native).
  ! This is a sub-optimal fix to Local-Native, but plug-ins will work.

- Fix "no iso" error copying iso_639.xml with Meson (Local-Native).
2024-01-02 10:49:31 +00:00
Bruno Lopes
9af3579f63 build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...

(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2024-01-02 10:49:31 +00:00
Bruno Lopes
af79bbe028 gitlab-ci, build/windows: Make Packaging scripts compatible with CI-Cross job
The CI crossbuild job now use the same main script (and the same
sub-scripts of linking and debug generation) of the native CI for
packaging. These unified scripts greatly facilitates maintenance.

The crossbuild deps script is now more consistent in relation to the
native one. As this is polished, the cross one is now polished too.

A crossroad gimp build script was created with a more clear code.

Also, finally make the script for packaging only, removing build step
stuff that shoudn't be here (glib-schemas generation) since this causes
disparity with the Local native build; and adding some packaging
decisions that shoudn't be in the installer scripts (eg. specific
folders of ghostscript, glib; no share/themes), which also facillitates
INNO (and future MSIX) maintenance.
2024-01-02 10:49:31 +00:00
Bruno Lopes
8b9aa1e7ca gitlab-ci, build/windows: Make Build script compatible with Local-Native build
The local builds now can use the same script of CI for sake of time.
The compatibility layer is very simple and makes the script more
used/tested, therefore more reliable.
2024-01-02 10:49:31 +00:00
Bruno Lopes
5ecf228019 gitlab-ci, build/windows: Make Deps script compatible with Local-Native build
The local builds now can use the same script of CI for sake of time.
The compatibility layer is very simple and makes the script more
used/tested, therefore more reliable.

Also, remove some redundacy on the code for better maintenance.
2024-01-02 10:49:31 +00:00
Bruno Lopes
637c49b30f build/windows: Add Dependencies list compatible with all jobs
Now, we have only ONE list applicable for build-deps-crossroad.sh,
build-gimp-msys2.sh and package-gimp-msys2.sh, instead of hardcoding
3 times. This unified list greatly facilitates maintenance.
2024-01-02 10:49:31 +00:00
Bruno Lopes
271ba85770 gitlab-ci, build/windows: Unify CI jobs wording
Debian changes:
- Since autotools has gone, we don't need to specify 'meson' in the
debian job and others.
- The "INSTALL_PREFIX" was renamed for the more usual "GIMP_PREFIX" and
the meson sintax of Debian jobs was also updated.

Windows changes:
- Then, clarify that the win64-nightly and win32-nightly jobs are, in
fact, in the 'packaging' step, since we don't really "distribute" GIMP
in .zip and the commands are almost the same of the packaging .SH
script, without scripted optimizations for Inno Installer (or future
.MSIX), crucial for distribution.
- We don't need to specify "native" sufix in any build since they are
the rule and cross builds are the exception.

General changes:
- The job names was changed to be more consistent and in accordance
with the folders present in the artifacts.
- The 'nightly' sufix was removed from the Inno Windows Installer job
and others, since this doesn't reflect the real build frequency.
- The scripts filenames are altered to stay "in order". This is not
essential but ultra convenient since it is easy to view and search.
(The -uni suffix is explained in a further commit)
- All artifacts names now have the commit to avoid apparently duplicate
files when downloading same step artifacts from different projects.
- Finally, rearrange the order of jobs rationally: first the OSes and
archs (from the most free and modern to the most closed and legacy),
then the stages (from 'prepare' to 'analysis'), ending with the
frequency of jobs (from the most frequent, called at each push, to
the least/weekly).

Overall, this changes, although difficult to review at the first
sight, will avoid in the future quite "dumb" issues like:
GNOME/gimp#10195
2024-01-02 10:49:31 +00:00
Yuri Chornoivan
5903426e81 Update Ukrainian translation 2024-01-02 07:30:23 +00:00
Yuri Chornoivan
8f11b02ac2 Update Ukrainian translation 2024-01-02 07:28:46 +00:00
Anders Jonsson
a4d309c7f7 plug-ins: more consistent ellipsis usage 2024-01-02 03:43:34 +00:00
Alexandre Prokoudine
829fa62163 Update Russian translation, part 1 oof N 2024-01-01 23:16:17 +01:00
Luca Bacci
0532e1b0ea GimpPopup: Ignore grabs from windows / menus shown by internal widgets
Fixes https://gitlab.gnome.org/GNOME/gimp/-/issues/6989
2023-12-31 18:07:25 +01:00
Anders Jonsson
e4e3dcca6b plug-ins: readd translation context for tag values
Originally added in 55aa462faa
2023-12-31 13:14:00 +00:00
Jehan
6fc468e7a4 desktop: prepare GIMP 2.99.18 AppStream release notes. 2023-12-31 17:08:31 +09:00
Anders Jonsson
06b638bdca Update Swedish translation 2023-12-30 14:17:17 +00:00
Jordi Mas
06df0fca10 Update Catalan translation 2023-12-30 14:12:01 +01:00
Anders Jonsson
e3b353f952 Update Swedish translation 2023-12-29 23:48:27 +00:00
Luming Zh
6838b05ac1 Update Chinese (China) translation 2023-12-29 21:07:39 +00:00
Alx Sa
d120e592d8 core: Fix crash when cutting/pasting single layer
When cutting and pasting a single layer,
drawables->data might be empty. This results in a
crash on Windows and a failure to paste on Linux.
Since this function is inside an IF statement that already
confirms it has a valid image, the base type and
precision are retrieved from there instead.
2023-12-29 10:27:27 -05:00
Alx Sa
a331e91309 plug-ins: Fix Fractal Explorer blue inversion
Resolves #10537.

During the port, the "green_invert" variable
was repeated twice rather than using the
"blue_invert" variable. This prevented the
fractal from updating when blue was changed.
2023-12-28 22:59:46 +00:00
Alx Sa
0351f48dfe themes: Defining menu, tab, and tooltip styles
This is intended to prevent system theme background-images
and borders from overriding those set by GIMP.
The minimum size of tabs is also explicitly defined.
2023-12-28 16:47:10 +00:00
Rodrigo Lledó
1f0b74d85f Update Spanish translation 2023-12-27 19:49:00 +00:00
Rodrigo Lledó
9c1e423c3f Update Spanish translation 2023-12-27 19:46:49 +00:00
Rodrigo Lledó
9d9371eede Update Spanish translation 2023-12-27 19:05:59 +00:00
Anders Jonsson
965b27fd81 Update Swedish translation 2023-12-27 16:17:46 +00:00
Anders Jonsson
9f842cbe99 Update Swedish translation 2023-12-27 16:15:08 +00:00
Yuri Chornoivan
6f84b6babc Update Ukrainian translation 2023-12-27 07:45:20 +00:00
Asier Sarasua Garmendia
7fa9d2de9b Update Basque translation 2023-12-27 07:34:57 +00:00
Alan Mortensen
6abdc0bbab Update Danish translation 2023-12-27 07:18:50 +00:00
Anders Jonsson
e762b49523 app: make colorbutton tooltips translatable 2023-12-26 22:07:37 +00:00
Martin
43cc6fc4c9 Update Slovenian translation 2023-12-26 17:13:04 +00:00
Jacob Boerema
ec2ee8fe91 plug-ins: fix #10498 Incorrect layer order when loading certain PSD's
Our handling of Photoshop's Blend Clipped Layers as Group is flawed
causing the order of layers to be messed up which may cause certain
parts of the image to become invisible or having the wrong colors.

This only fixes the incorrect layer ordering. Correct handling of
group layers with clipping needs a more extensive rewrite.
2023-12-26 11:39:49 -05:00
Jacob Boerema
2945fa6db2 plug-ins: more detailed PSD export compatibility notice
Follow up to the previous commit, we clarify the compatibility issue
between using legacy layer modes and Clip to Backdrop.
2023-12-26 11:39:48 -05:00
Jacob Boerema
f8bdca24aa Revert plug-ins: fix bad parsing of PSD blending modes
This is a manual revert of eac1df4b61
since other changes were made to the same lines.

Although using legacy layer modes for several blend modes improves
compatibility with Photoshop, we found out during testing of the
image from issue #10498, that it negatively impacts loading of PSD's
that use Blend Clipped Layers as Group.
We convert this specific PSD setting by adding a layer group and
setting Composite Mode to Blend to Background.
However, our legacy layer modes do not support Composite Mode, meaning
that PSD's using this can show up using smeared colors.

Since this hasn't been in a release yet, let's revert this and rethink
how we want to handle the combination of these PSD settings.
2023-12-26 11:39:48 -05:00
Asier Sarasua Garmendia
051f443f1f Update Basque translation 2023-12-24 09:22:22 +00:00
Ngọc Quân Trần
6dfc12ea36 Update Vietnamese translation 2023-12-24 08:29:30 +00:00
Ngọc Quân Trần
af6a1dd1db Update Vietnamese translation 2023-12-24 08:28:49 +00:00
Ngọc Quân Trần
ab33412f3e Update Vietnamese translation 2023-12-24 08:27:41 +00:00
Ngọc Quân Trần
f5f8dace6e Update Vietnamese translation 2023-12-24 08:25:21 +00:00
Alx Sa
dd10433c37 plug-ins: Fix indexed transparent PNG export
Resolves #9933.

We used png_get_valid (pp, info, PNG_INFO_tRNS) to check if
an indexed PNG had transparency when exporting.
However, this function does not return TRUE/FALSE but instead
the contents of that PNG chunk. Since we use index 0 for transparency,
this function always returns 0. The non-transparent indexed export code
ran regardless, creating incorrect PNGs.
We set pngg.has_trns earlier if the image has transparency, so it's safer
to use this variable instead.
2023-12-23 21:40:14 +00:00
bootchk
11b7e4cded Fix #10511 ScriptFu CRITICAL on scripts with no dialog, e.g. Reverse Layers
Magic number 1 changed to 2 in one place. Missed in earlier fix for #10127.

Changed magic number to a defined macro constant so it might not happen again,
should GimpConfig change again.
2023-12-22 09:43:01 -05:00
Jürgen Benvenuti
60f8e47176 Update German translation 2023-12-22 13:31:39 +00:00
Martin
73b571165f Update Slovenian translation 2023-12-21 22:33:02 +00:00
Martin
d16cdddbdd Update Slovenian translation 2023-12-21 22:14:46 +00:00
Yuri Chornoivan
fa631e76fb Update Ukrainian translation 2023-12-21 16:23:43 +00:00
Yuri Chornoivan
1236c10e4a Update Ukrainian translation 2023-12-21 15:54:51 +00:00
Luming Zh
c100b5313c Update Chinese (China) translation 2023-12-20 20:46:00 +00:00
Kolbjørn Stuestøl
e7b84bdc70 Update Norwegian Nynorsk translation
(cherry picked from commit 1be85b7fc9)
2023-12-20 20:25:09 +00:00
Kolbjørn Stuestøl
f57219b2d1 Update Norwegian Nynorsk translation 2023-12-20 20:23:34 +00:00
bootchk
507cbdc44a Fix #10508 ScriptFu CRITICAL on invalid resource ID
Add test case test/PDB/resource.scm
2023-12-20 12:50:02 +00:00
Alexander Shopov
990b0a2757 Update Bulgarian translation 2023-12-20 11:38:56 +00:00
Alexander Shopov
c40bedd1dd Update Bulgarian translation 2023-12-20 11:20:54 +00:00
Ekaterine Papava
3c46a0bb5e Update Georgian translation 2023-12-20 03:45:25 +00:00
Ekaterine Papava
f571eca749 Update Georgian translation 2023-12-20 03:41:53 +00:00
Ekaterine Papava
05d8ddfbb4 Update Georgian translation 2023-12-20 03:39:33 +00:00
bootchk
b1f2f71113 Fix #10465 ScriptFu marshal color strings correctly
Fix test case.
2023-12-19 18:40:48 +00:00
Anders Jonsson
37c971c08e app, plug-ins: make missing tooltips translatable 2023-12-19 17:56:30 +00:00
Anders Jonsson
02b970d6a9 app: make config labels translatable 2023-12-19 17:56:30 +00:00
Martin
0ae1b3dfc9 Update Slovenian translation 2023-12-19 17:10:43 +00:00
bootchk
555afe2058 Fix #10188 SF marshall array of super Item instead of subclass Drawable
Substantive change is call gimp_item_get_by_id instead of gimp_drawable...
And a few type changes from GimpDrawable* to GObject*.

Lots of renaming of functions, substituting "item" for "drawable."

Update comments.

Made one function static that was already private.

Fix the test case gimp_vectors_set_selected
2023-12-19 09:55:21 -05:00
bootchk
5486e4094a Enhance tests of PDB in ScriptFu
Add more tests

Enhance testing framework, add function assert-PDB-true

Enhance some tests: make test files order independent

Fix tests broken by recent changes to GIMP
2023-12-19 06:47:36 -05:00
Luming Zh
88b5269773 Update Chinese (China) translation 2023-12-18 17:34:07 +00:00
Luming Zh
b10b5a370d Update Chinese (China) translation 2023-12-18 17:31:35 +00:00
Luming Zh
f906f8274f Update Chinese (China) translation 2023-12-18 17:31:31 +00:00
Yuri Chornoivan
84a4d7eb13 Update Ukrainian translation 2023-12-17 10:21:32 +00:00
Yuri Chornoivan
5fb4b8496c Update Ukrainian translation 2023-12-17 10:10:46 +00:00
Ekaterine Papava
8dc3b774e6 Update Georgian translation 2023-12-17 08:51:17 +00:00
Anders Jonsson
88c7520451 ScriptFu: make default names translatable 2023-12-17 03:02:25 +00:00
Anders Jonsson
c64d59b80c plug-ins: make pdf export strings translatable 2023-12-17 03:02:25 +00:00
Yuri Chornoivan
9ee99db6a2 Update Ukrainian translation 2023-12-16 21:24:30 +00:00
Jehan
eb3b9aafec NEWS: update. 2023-12-16 20:59:51 +09:00
Jehan
7100851b5b Issue #10283: renaming generated "(Hardedge)" gradients as "(Hard Edge)".
There was the question on whether it needed an hyphen or not. The hyphen
naming was often used to describe the "Hard-edge painting" style, though
even for this, it was not an absolute case. Depending on English writing
style, we could also find "hard edge painting". Also Liam was noting
that when the term appears by itself, as a noun (rather than a
qualificative), it was likely best without hyphen. So we went for the
no-hyphen wording.

Then there was the capitalization question: should capitalization rules
of data labels apply to parts between parentheses? I went with the
answer that *yes*, since it's part of the title anyway. And without the
part between parentheses, we'd have several data named the same. So it's
just as important.

As a consequence, I also re-capitalized "FG to BG (HSV
Counter-Clockwise)" and "FG to BG (HSV Clockwise Hue)" gradients,
following this updated rule.
2023-12-16 20:40:46 +09:00
Jehan
d4f8f553b2 data: consistent capitalization in gradients' names.
See comment by Jacob about the lack of consistency in some of the names
of default data.
2023-12-16 20:20:39 +09:00
Ekaterine Papava
c2984e9005 Update Georgian translation 2023-12-15 04:30:40 +00:00
Ekaterine Papava
48b2f1bfa2 Update Georgian translation 2023-12-15 04:22:59 +00:00
Alx Sa
820e96c67b Themes: Fix button shadow on dark theme hover
Resolves #10477.

The dark theme box-shadow for buttons does not blend well
when hovering over it, compared to the light & gray themes.
This patch adds an additional CSS rule to make the box-shadow
no longer clash in dark theme.
2023-12-14 19:39:54 +00:00
Jordi Mas
d9a2b7c272 Update Catalan translation 2023-12-14 15:57:05 +01:00
Alan Mortensen
610bd7b7a2 Update Danish translation 2023-12-14 12:05:43 +00:00
Alan Mortensen
87a3618acd Update Danish translation 2023-12-14 12:04:14 +00:00
Alan Mortensen
8e5bbd3456 Update Danish translation 2023-12-14 12:01:53 +00:00
Alan Mortensen
3dd88b385c Update Danish translation 2023-12-14 08:27:39 +00:00
Alan Mortensen
d594fcf4cd Update Danish translation 2023-12-14 08:09:12 +00:00
Martin
2992a7ffed Update Slovenian translation 2023-12-13 22:11:19 +00:00
Martin
e1a2fbdb94 Update Slovenian translation 2023-12-13 22:04:20 +00:00
Luming Zh
076229e53a Update Chinese (China) translation 2023-12-13 19:30:25 +00:00
Yuri Chornoivan
dc2f7bf64c Update Ukrainian translation 2023-12-13 18:56:06 +00:00
programmer_ceds
ff219fb0e2 Resize Canvas Problems (fixes issue #10225) 2023-12-13 18:31:38 +00:00
Yuri Chornoivan
9a6a26e70f Update Ukrainian translation 2023-12-13 18:02:50 +00:00
Bruno Lopes
276754e9fe plug-ins: update Compatibility Notice wording
Since we now have documented certainty which modes are compatible, the
Compatibility Notice should convey more reassurance.
2023-12-13 17:58:37 +00:00
Bruno Lopes
e494c2ea71 plug-ins: update the PSD table of inaccurate/non-exact modes
Some 2.10 modes, even in perceptual space, don't produce the same
result as PS. Now, the mapping table takes this into account, which
avoids surprises for the user.
2023-12-13 17:58:37 +00:00
Bruno Lopes
eac1df4b61 plug-ins: fix bad parsing of PSD blending modes
The mapping table was generically indicating 2.10 modes as first choice,
which was resulting in terrible PSD compatibility in some cases. This
commit fixes this using legacy modes verified with latest PS version
(see attached files in MR).
2023-12-13 17:58:37 +00:00
Anders Jonsson
bdf0d88456 app, plug-ins: mark missing strings as translatable 2023-12-13 17:44:35 +00:00
Yuri Chornoivan
9fa31f467b Update Ukrainian translation 2023-12-13 17:44:06 +00:00
Alan Mortensen
c05b67c9aa Update Danish translation 2023-12-13 09:30:16 +00:00
Sabri Ünal
f43398c090 DOAP: Replace defunct mailing list
Corresponding URL seems to be redirected to a new URL.
2023-12-13 10:16:27 +03:00
Stayd
594afaf900 plug-ins: DDS import rewrite
Comprehensive rewrite of the DDS import routine, in the interest of
easier maintainability and readability. Adds formats.c/h, containing
tables and functions related to reading and parsing uncompressed files.
Importer now supports nearly all non-video uncompressed formats.

Includes a variety of minor-to-moderate fixes made along the way
which could not be pulled out into separate commits due to dependence
on other aspects of the rewrite.
2023-12-13 03:30:48 +00:00
Stayd
829a92d62e plug-ins: Update dds.h and add known format codes
Minor cleanup and updating of types to GIMP types.
Addition of more known DXGI format codes, and one flag used by NVTT.
2023-12-13 03:30:48 +00:00
Rodrigo Lledó
b2551d7ccf Update Spanish translation 2023-12-12 13:41:43 +00:00
Yuri Chornoivan
65893eb150 Update Ukrainian translation 2023-12-11 22:01:44 +00:00
Martin
6e6c81572a Update Slovenian translation 2023-12-11 19:16:57 +00:00
bootchk
77c12a205b Add tests of PDB procedures gimp-image-set-selected-layer etc. 2023-12-11 18:42:59 +00:00
bootchk
1ccceccb01 Fix #10460 2023-12-11 15:09:07 +00:00
Alexander Shopov
59e1f6dc4c Update Bulgarian translation 2023-12-11 09:53:40 +00:00
Anders Jonsson
dbfd506df4 plug-ins: string fixes for lighting plug-in 2023-12-10 21:39:13 +01:00
Alx Sa
e317166c98 plug-ins: Fix defaults of secondary light points
Resolves #10454.
When porting to GimpProcedureConfig, all
light types were set to "Point" when 2 - 6
should have been "None" by default.
This patch fixes the defaults.
2023-12-10 14:57:56 +00:00
bootchk
dd2d0c96bf Fix a test plugin.
1. Recent changes to arg validation reveal bug in call to gimp-drawable-edit-gradient-fill,
supersampling arg must be >0

2. Make easier for testers to invoke by reducing the declared drawable capability
to SF-ONE-OR-MORE-DRAWABLE
2023-12-10 06:03:15 -05:00
Alexander Shopov
80908bfd4f Update Bulgarian translation 2023-12-10 09:55:23 +00:00
Alexander Shopov
a3ff7e7f92 Update Bulgarian translation 2023-12-10 09:31:36 +00:00
Anders Jonsson
30db768764 Update Swedish translation 2023-12-10 00:40:14 +00:00
Martin
8234069f1a Update Slovenian translation 2023-12-09 21:16:20 +00:00
Ekaterine Papava
936dbbf947 Update Georgian translation 2023-12-09 20:06:35 +00:00
bootchk
4d4639b8f3 Fix scripts calling obsolete gimp-brush-delete
Now use gimp-resource-delete

Drive-by fix of bad call to gimp-context-set-pattern.

Fixes other calls to gimp-font-delete, etc. in a test script.

Partly fixes 9867.
2023-12-09 11:23:58 -05:00
Jacob Boerema
1add942fa6 app: fix #10349 Stroke Path on 2.99.16+ doesn't work reliably
Due to a bug in commit de5c805cbb, which
changed the choice widget between line and paint tool to a
GtkStackSwitcher, changing that choice did not work anymore.

The reason being that the stroke method wasn't being updated on clicking
stroke. We fix this by setting the stroke method when OK is clicked.

When creating the dialog we also set the stroke method, to reflect the
last used choice, since that was also missing.
2023-12-08 16:03:28 -05:00
Yuri Chornoivan
c649295f5b Update Ukrainian translation 2023-12-08 18:11:04 +00:00
Rodrigo Lledó
ecdda05905 Update Spanish translation 2023-12-08 17:55:06 +00:00
Jehan
6d2863eaf3 app: make the Pad Actions frame insensitive with tooltip on X11.
See discussion in !946: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/946#note_1768869

On Windows/macOS, the pad device is probably not even showing at all
right now, though I can't test. Also it could be eventually implemented
with pad actions support (see Luca Bacci comment in the same MR) using
WM_POINTER API on Windows.

On X11 though, the pad device is shown, except it is kind of pointless.
So I am disabling the frame (making it insensitive) and add a tooltip.
2023-12-08 22:46:32 +09:00
Carlos Garnacho
058c19e5ac widgets: Make GimpDoubleAction friendlier to GtkPadController
Handle some statefulness in actions taking a double parameter, in order
to make them friendly to GtkPadController and its pad ring/strip
integration.

The GtkPadController emits those actions with a double parameter
expressing the absolute value (e.g. 0-360 for rings, 0-1 for strips),
take care of converting these absolute values to relative changes
that increase/decrease the current GimpDoubleAction value.

Going for relative increments/decrements increases the genericity
of rings when mapped to actions, as going with the given absolute
values would mean means rings could be mainly mapped to angle-like
actions, reducing its usefulness.
2023-12-08 12:35:34 +00:00
Carlos Garnacho
0c3713b467 display: Hook pad controllers into GimpImageWindow
We have everything in place to create GtkPadControllers converting
events into actions as configured in settings, and the signaling
to trigger the (re)generation of those as device, window or configuration
changes appear.

Only the last bit attaching those controllers to actually handle
input was missing, now done in this commit.

Since there may be multiple configured tablets and pads, we need to
keep track of per-device controllers to handle the configuration for
those. This mapping is kept in GimpImageWindow as the "main" toplevel
(i.e. the one(s) typically considered "keyboard focus" and receiving pad
events) and ensured to be kept up-to-date through the ::configure-pad
signal.
2023-12-08 12:35:34 +00:00
Carlos Garnacho
02eea132c2 widgets: Add GimpDeviceInfo API to generate a GtkPadController
This API call will snapshot the current configuration of a device
into a GtkPadController, that is created and attached to a toplevel
(this event controller only acts on toplevels).

This controller will handle pad events, trigger actions, and update
compositor feedback (e.g. GNOME Shell pad OSD) as per the actions
mapped in the configuration dialog.
2023-12-08 12:35:34 +00:00
Carlos Garnacho
6ca6f87c16 widgets: Hook ::configure-pad signal emission to configuration changes
If a pad device configuration gets changed, or reset, we should trigger
the creation of new pad controllers for the existing toplevels.

Add the plumbing so that saving/resetting a device configuration will
result in the same ::configure-pad signal, and trigger it from the
relevant places.
2023-12-08 12:35:34 +00:00
Carlos Garnacho
46d38827dd widgets: Add GimpDeviceManager signal to reconfigure pad devices
In order to apply the pad configuration so it does something, we
need to create GtkPadController objects on each toplevel for each
configured pad device.

This signal will work as a hint that a new GtkPadController should
be generated for the given device and current configuration. At
the moment, emit it when pad devices are added or removed.
2023-12-08 12:35:34 +00:00
Carlos Garnacho
f66977beb5 widgets: Monitor all devices (not just pointing) in device manager
Since pads are not pointing devices, this is necessary to let pads
known to the configuration dialog.
2023-12-08 12:35:34 +00:00
Carlos Garnacho
224566bb84 widgets: Detect disconnected pads as pads in GimpDeviceInfo
Return a suitable GdkInputSource for those configured pads, so that
they show up as pads in configuration even if disconnected.
2023-12-08 12:35:34 +00:00
Carlos Garnacho
573d2f5380 widgets: Add UI for pad configuration
The UI is heavily inspired in the existing one for midi devices
and the such, as the restrictions are somewhat similar. Since there
is not enough information to introspect the device without the help
of libwacom (and the UI should work with tablets unsupported by
it, regardless) the list starts empty, and there exists a "grab
event" button to press pad buttons (or use rings/strips) and
create/focus a list item for the button/mode.

Double clicking on an action (or pressing the "edit" button) spawns
a different dialog with a GimpActionEditor to select an action.
And lastly, actions can be deleted with the "delete" button.

Pads may have different modes (e.g. leds in the tablet) that apply
to all pad features, the list will allow different actions to be
set on the same button in different modes. This basically multiplies
the amount of mappable actions by the number of available modes.
2023-12-08 12:35:34 +00:00
Carlos Garnacho
8182f7d683 widgets: Add pad configuration to GimpDeviceInfo
Add property/getters for the pad configuration, and hook it
up to the serialization mechanism, so pad configuration is part
of device configuration.
2023-12-08 12:35:34 +00:00
Carlos Garnacho
2cfca9e90e core: Add GimpPadActions object
This object holds the mapping of pad device features (buttons/rings/strips)
to actions, given the current mode (e.g. leds in the device), and can be
serialized/deserialized from configuration files.
2023-12-08 12:35:34 +00:00
Jehan
d42508534d NEWS: update. 2023-12-08 21:34:27 +09:00
Jehan
10f86c69d1 libgimp: fixing annotations. 2023-12-08 21:18:03 +09:00
Jehan
78108cc3c8 pdb: getting rid of some warnings in a perl script.
Fixing:

> Scalar value @inargs[...] better written as $inargs[...] at pdb/lib.pl line 247.
> Scalar value @outargs[...] better written as $outargs[...] at pdb/lib.pl line 386.
2023-12-08 20:58:59 +09:00
Idriss Fekir
e8ad8af0f7 Fix fonts when exporting to pdf 2023-12-08 11:09:22 +00:00
Martin
588c98eb3f Update Slovenian translation 2023-12-07 22:17:21 +00:00
Anders Jonsson
f388258c41 Update Swedish translation 2023-12-07 20:43:55 +00:00
Rodrigo Lledó
545ef24aa4 Update Spanish translation 2023-12-07 20:43:47 +00:00
Alan Mortensen
5df595ef33 Update Danish translation 2023-12-06 07:29:16 +00:00
Rodrigo Lledó
a5232405f0 Update Spanish translation 2023-12-05 15:30:48 +00:00
Víttor Paulo Vieira da Costa
9700d51c25 Update Brazilian Portuguese translation 2023-12-05 12:49:07 +00:00
Jacob Boerema
adb8f9dcbf plug-ins: fix #10429 Online help not opening
We were using an incorrect parameter name for calling the online help.
Instead of domain-names it is url.
2023-12-03 10:12:55 -05:00
Alan Mortensen
d04e4a0b74 Update Danish translation 2023-12-03 14:28:19 +00:00
Alx Sa
3c261a2334 themes: Define button and header edges
This continues the theme definition work from bd398d5c.
A new edge-border-color tag was created
to allow for defined widget edges in both
light and dark themes.
The box-shadow highlights for buttons
and header/menubars was defined to
reduce system theme leaks. Some CSS
attributes were rearranges as well.
2023-12-02 18:57:20 +00:00
Luming Zh
bd0dc645a5 Update Chinese (China) translation 2023-12-02 16:16:30 +00:00
Yuri Chornoivan
245e46f1cf Update Ukrainian translation 2023-12-02 15:31:51 +00:00
Martin
58001b93c8 Update Slovenian translation 2023-12-02 07:59:22 +00:00
Ekaterine Papava
4031b854c0 Update Georgian translation 2023-12-01 22:45:22 +00:00
bootchk
86921b45f4 Fix #9317
Also revise annotation 0=>%NULL and other wording changes.
2023-12-01 21:55:36 +00:00
bootchk
c2bdf418f6 libgimp API: vectors.pdb remove trailing whitespace
Since most editors do that on save anyway.

No functional change.
2023-12-01 21:55:36 +00:00
bootchk
5a2c725bbb app/vectors : fix annotations on gimp_vectors_export_foo
Better describe what the functions do.

Also rename a variable vectors->path_list,
since the variable is type list of path.

No functional changes!!!
2023-12-01 21:55:36 +00:00
Stayd
b8834a9596 Always interpret BC1 cutout pixels as black
Per the official format specification and hardware implementation,
BC1 cutout pixels are always black with 0 alpha, whereas previous
versions of the plugin interpreted them as white. Commit f97e718e
partially fixed this, but made the behavior an import option that
also ignored the alpha component. This commit reverts the addition
of this option in favor of consistently following the spec.
2023-12-01 20:42:16 +00:00
Stayd
eb5a9576c6 Updated save-type and mipmaps props to GimpChoice
The export properties "save-type" and "mipmaps" were left as ints
in Commit 427130be due to uncertainty on whether options could be
conditionally disabled on GimpChoice properties. From testing it
this functionality appears to work fine and is used in other plugins.
Now all combo props are GimpChoices and fully configurable from dds.c
2023-12-01 20:42:16 +00:00
Stayd
a5d1d96a38 Consolidate YCoCg/AlphaExp code, always decode
Moves most of the code relating to YCoCg and Alpha Exponent into
misc.c/h, in the interest of making the rest of the codebase cleaner.
Removes the decode option from the import menu, as encoded files are
always decoded now (there used to be a menu button for doing this
after import, but with it gone there's no reason ever to not decode).
Finally, the remaining functions in color.c were only ever called once,
so these were extracted and inlined, and the empty file deleted.
2023-12-01 20:42:16 +00:00
Stayd
30922cc266 Better handling of DX10+ files in ddsread
Partial refactor of parts of ddsread to better handle DX10+ files.
Though not included here, this is necessary to import formats that
have no DX9 equivalent, namely BC6H and BC7, as the current handling
simply downgrades DX10 files and imports them like DX9 ones.
2023-12-01 20:42:16 +00:00
Stayd
e9c301cb37 ddsread and ddswrite cleanup and commenting
Extensive formatting and cleanup in the read-write files, and addition
of some comments where they seemed appropriate. Renamed a couple of
single-letter variables to be more descriptive.
Also removed an unnecessary global variable in ddswrite.c, and made
the "config" variable in ddsread a GimpProcedureConfig type, as was
previously done for ddswrite.
2023-12-01 20:42:16 +00:00
Stayd
4eea8ab42e Mipmap generation fixes and cleanup
Fixes two major issues with mipmap generation, namely sRGB transforms
being applied both backwards and in 8-bit precision, causing severe
color degradation. sRGB transforms are now handled correctly and all
mipmap generation is done at 32-bit floating-point precision.
A new cubic filter has also been added (Catmull-Rom) which rounds-out
the existing lineup of cubic filters.

Also includes extensive code cleanup (sorry I couldn't separate this)
to mipmap.c/h and color.c/h
2023-12-01 20:42:16 +00:00
Jacob Boerema
c2ecf37923 script-fu: fix #10279 gimp-image-set-selected-layers is failing
Recently some extra input validation was added, which caused the
gimp-image-set-selected-layers command in script-fu to fail with an
invalid value for argument 2.

This is caused by the object array contents always being set as
GIMP_TYPE_DRAWABLE, while the actual type may be a layer, etc.

So, let's set the actual type of drawable being used here by using
G_OBJECT_TYPE on the first data element.
2023-12-01 15:28:57 -05:00
Alx Sa
bd398d5cff themes: Define some widget's border colors
Adds specific definitions for some widget borders that
are currently only defined by the system. This avoids
clashing colors depending on the system theme.
2023-12-01 17:09:35 +00:00
Víttor Paulo Vieira da Costa
3229ba3c3e Update Brazilian Portuguese translation 2023-12-01 14:52:03 +00:00
Andre Klapper
2eab9b31e5 Fix invalid markup in Belarusian translation 2023-12-01 13:56:55 +01:00
Vasil Pupkin
71a9f3f157 Update Belarusian translation 2023-11-30 00:41:24 +00:00
Alx Sa
75c78bf19c themes: Define border-radius for radio buttons
Resolves #10033

Not all system themes set a GtkRadioButton border-radius, so it
can default to 0. This creates a "box" around the radio button.
This patch defines the border-radius at 100% to make it universal.
2023-11-29 12:03:39 +00:00
Jacob Boerema
6cca73516a libgimpconfig: fix #10278 Script-Fu API display commands are failing
on input arguments

This is the same issue as #10194 but for GimpDisplay. We fix it in
the same manner.
2023-11-28 15:38:47 -05:00
Jacob Boerema
ec999ee193 plug-ins: make metadata-editor/viewer use gimp_image_procedure_new
These were using gimp_procedure_new, which was causing warnings like
LibGimpConfig-WARNING **: 13:56:33.270: couldn't serialize property
 GimpProcedureConfig-plug-in-metadata-editor::image of type GimpImage,
and
gimp_plug_in_destroy_proxies: ERROR: GimpImage proxy with ID 1 was
refed by plug-in, it MUST NOT do that!

This also saves us from having to define image and run-mode parameters
ourselves.
2023-11-27 14:08:26 -05:00
Jacob Boerema
cc3f4c45c5 plug-ins, libscriptfu: silence warnings
We remove two warnings:
1. warning: format '%ld' expects argument of type 'long int', but
   argument 5 has type 'GType' {aka 'long long unsigned int'}
Since GType is gsize, and this is not used in translations, use format
specifier G_GSIZE_FORMAT.

2. warning: enumeration value 'SF_IMAGE' not handled in switch (and more
   similar ones).
Add a default block to let the compiler know we handle all values.
2023-11-27 13:10:22 -05:00
Luming Zh
3ab6451ff3 Update Chinese (China) translation 2023-11-27 15:48:45 +00:00
Rodrigo Lledó
e4b2ab7ff9 Update Spanish translation 2023-11-26 23:10:30 +00:00
Rodrigo Lledó
3dc44d8e21 Update Spanish translation 2023-11-26 22:57:05 +00:00
Yuri Chornoivan
49d1160e78 Update Ukrainian translation 2023-11-26 19:50:36 +00:00
Martin
87bd568696 Update Slovenian translation 2023-11-26 09:53:48 +00:00
Ekaterine Papava
b243fdc10a Update Georgian translation 2023-11-26 08:32:08 +00:00
Jehan
ef8ddd7e30 app: rename the new gimp_drawable_*_undo() functions.
These are not generic undo function, but specific to the resize case (and even
more particularly when calling the GimpItem's resize() class method).

Also the variable was wrongly named no_undo when it actually was meant for the
opposite meaning, i.e. when we want to push an undo for a resize() call. This
made the call harder to understand. Furthermore the usage of double negation did
not help with understanding the code.
2023-11-25 21:43:08 +01:00
Jehan
aa7d7badc8 app: do not leave out-layer artefacts when canceling painting with layer expansion.
This is a fixup commit to MR !961, fixing a particular commit 5c2373a125 saying
that when canceling painting with layer expansion, strokes outside of the layer
remain visible.
2023-11-25 21:43:04 +01:00
Jehan
e495fe7ede app: fix 2 GeglBuffer leaks and a profile leak. 2023-11-25 21:38:10 +01:00
Shubham
2c00152ce2 app: Add pattern to context props for tools supporting auto-expand
When auto expanding layers, there is an option that allows user to fill
the newly expanded part with the pattern. But without this change, it
was not possible to change the active pattern without switching to some
other tool like bucket fill tool. This commit allows that.
2023-11-25 16:19:43 +00:00
Shubham
41e0151478 app: Make the layer auto expand options shared between tools
Also added option in Edit->Preferences->"Tool Options"->"Paint Options
Shared Between Tools" that decides weather the options should be shared
between different tools.
2023-11-25 16:19:43 +00:00
Shubham
5c2373a125 app: Cancel functionality works with dynamic layers
Canceling a paint stroke restores the layer and mask (if present) to the
original size if they were expanded during the stroke. The part of
stroke that is outside the layer remains visible though.
2023-11-25 16:19:43 +00:00
Shubham
d49fcf9495 app: Always separate blobs_to_render and last_blobs in ink tool
In ink tool, if last_blobs is empty, the copy of blobs present in
last_blobs and blobs_to_render was same. Due to this, when layer
boundary is expanded, we move same blobs twice. Due to this a straight
line was drawn when starting painting from outside layer boundary. Fixed
the issue by storing a duplicate version in blobs_to_render. Updated
free part accordingly.
2023-11-25 16:19:43 +00:00
Shubham
2a41fc7ee4 app: Blink lock when layer expansion is prevented by lock
In layer expansion if user is trying to draw outside the layer boundary
with expand option turned on but the "Lock position and size" enabled,
the lock square will be blinked. If user is painting on layer mask, the
corresponding layer's lock will be blinked. It will be blinked only
once per stroke.
2023-11-25 16:19:43 +00:00
Shubham
df9d1f54f8 app: Fix inefficient method of preventing pushing undo
When resizing drawable for dynamic layers, the resize drawable function
would push Modified Layer/Channel item to undo stack. Initially, I was
checking if the drawable is being painted upon and used it to disable
the undo, but this when using resizing layers with layer mask, even if
mask is being painted upon, we still want to resize the main layer and
vice versa. But the main layer is not being painted upon so it would
push the undo to stack. To prevent this, I was using
gimp_drawable_paint_start before resizing, but this method is very
inefficient, as this function duplicates buffers. So added a new member
to drawable->private that will store weather to push undo or not.
2023-11-25 16:19:43 +00:00
Shubham
6bfed5008f app: Add options to choose fill type of layer and mask when expanding
Added option to tool settings that will decide how newly created parts
of layer and layer mask should be filled. For layer, same options are
provided as present in "Set Layer Boundary Size" dialog. For layer mask,
first two options from "Add a Mask to the Layer" i.e. "White" and
"Black" are added.

This commit changes gimp_channel_resize function to actually use the
passed fill type instead of using hardcoded GIMP_FILL_TRANSPARENT.
Hardcoding this value if required should be done in function calling
this function (which is already the case with all the instances already
present afaik).
2023-11-25 16:19:43 +00:00
Shubham
8bfa22b663 app: gimp_gegl_buffer_resize function can accept pattern to fill buffer
Modified gimp_gegl_buffer_resize function to add three new parameters,
pattern, pattern_offset_x and pattern_offset_y. If pattern is not NULL,
then we set the pattern of buffet to this value. Like in
gimp_gegl_buffer_resize function, this logic is mostly copied from
gimp_drawable_fill_buffer function with minor changes.
2023-11-25 16:19:43 +00:00
Shubham
841a195bb5 app: Fix broken strokes with the ink tool 2023-11-25 16:19:43 +00:00
Shubham
9ccb027aaa app: Create gimp_gegl_buffer_resize function
This function returns resized version of the input buffer. It also takes
in a color argument. The layer background will be filled with this
color. Fill background logic is similar to gimp_drawable_fill_buffer.
2023-11-25 16:19:43 +00:00
Shubham
5ed04055f1 app: check for lock_position of layer when editing its mask
The lock in the layers tab only sets lock for the actual layer and not
for its mask, so also check the lock on the actual layer and not just on
the mask when editing layer mask.
2023-11-25 16:19:43 +00:00
Shubham
5b8f410342 app: Fix layer expansion using MyPaint Brush tool with symmetry enabled 2023-11-25 16:19:43 +00:00
Shubham
960eaf0bc9 app: Ensure undo everytime layer expands while painting
Everytime the layer expands, if the undo extents are empty, then make
them non zero. If the undo extents are zero, then user will not be able
to undo the expansion of the layer. This is perticularly required by
MyPaintBrush as just clicking the image without any motion does not draw
anything, but expands layer if required.
2023-11-25 16:19:43 +00:00
Shubham
b291a32a24 app: Layer expansion with MyPaintBrush now works.
Added tool option like other tools.
2023-11-25 16:19:43 +00:00
Shubham
5fdee7c5e7 app: gimp_paint_core_expand_drawable will return boolean
This function returns TRUE if the drawable is expanded. Otherwise, it
will return FALSE. This removes the need to check width and height of
the drawable to infer the same.
2023-11-25 16:19:43 +00:00
Shubham
95f795008f app: Make image flush related functions idle
Made `gimp_image_editor_image_flush` and
`gimp_image_editor_image_flush_idle` functions idle. For expanding
layers dynamically, we need to use gimp_image_flush funtion from the
paint therad. The gimp_image_flush eventually calls these functions.
2023-11-25 16:19:43 +00:00
Shubham
3ccec0b128 app: Layer expansion while painting now works with layers with mask
When painting the layers with a layer mask, if the layer need to be
expanded, the layer mask is also expanded with it. The same is done even
if layer mask is being painted upon.

Undo works with these layers by adding resizing of both the layer and
mask to the undo group if the layer is resized during painting.
2023-11-25 16:19:43 +00:00
Shubham
5191c17fb7 app: Fix layer expansion while painting with symmetry enabled 2023-11-25 16:19:43 +00:00
Shubham
e33618a650 app: Layer expansion while using ink tool
Now layers will expand when trying to draw beyond layer borders with ink tool.
Tool options similar to paint tools have been added (expand_use and
expand_amount).
2023-11-25 16:19:43 +00:00
Shubham
97a2627867 app: Do not expand beyond image borders while painting
When painting with "Expand Layers" option turned on but "show all"
turned off, layer will not expand beyond image borders.

Layer will not expand if "Lock size and postion" is turned on.
2023-11-25 16:19:43 +00:00
Shubham
4a953e5b59 app: Separate function for layer expansion while painting
Created a separate function gimp_paint_core_expand_drawable that handles
layer expansion while painting. The gimp_brush_core_get_buffer function
now uses this function to expand drawable. It has been separated so that
it can be reused for ink tool.
2023-11-25 16:19:43 +00:00
Shubham
9707a87488 app: Add options for tools which make layers expand
Added a checkbox that decides weather tool should expand layer when
crossing layer border and a scale that decides by what amount should
layer expand.
2023-11-25 16:19:43 +00:00
Shubham
becb23c926 app: Make undo work when layers are expanded during painting
Undo now restores layer to original size if it was expanded while
painting.
2023-11-25 16:19:43 +00:00
Shubham
ae7d37ebbd app: Make layers expand when painting with paintbrush tool
When painting with paintbrush tool, the borders of active layer will
automatically expand to accomodate the stroke. The undo does not work
with expanding layers.
2023-11-25 16:19:43 +00:00
Rodrigo Lledó
7201858d65 Update Spanish translation 2023-11-24 12:06:17 +00:00
Rodrigo Lledó
0fbab7f784 Update Spanish translation 2023-11-24 10:25:47 +00:00
Rodrigo Lledó
4510a830b0 Update Spanish translation 2023-11-24 09:19:11 +00:00
Alx Sa
62da36cd43 core: Better handle group endings in ASE palette import
This patch adds better handling for group begin and end markers
within ASE palettes. As a result, this fixes an issue where the last
color was not imported in some ASE files without groups.
Additionally, this guarantees that colors are imported using 4 bytes
per https://gitlab.gnome.org/GNOME/gimp/-/issues/10359#note_1921462
2023-11-24 06:08:09 +00:00
Vasil Pupkin
95d062d774 Update Belarusian translation 2023-11-23 23:46:28 +00:00
Sabri Ünal
333f1e1e5b Update Turkish translation 2023-11-23 17:08:40 +00:00
Anders Jonsson
7291a3553c Update Swedish translation 2023-11-23 14:52:23 +00:00
Martin
a8d589ec62 Update Slovenian translation 2023-11-23 08:07:19 +00:00
Ekaterine Papava
5794919aeb Update Georgian translation 2023-11-23 05:05:43 +00:00
Luming Zh
a5bace3513 Update Chinese (China) translation 2023-11-21 21:15:22 +00:00
Jehan
217fd3699f NEWS: update. 2023-11-21 14:28:57 +01:00
Yuri Chornoivan
f273cc93d4 Update Ukrainian translation 2023-11-21 07:11:17 +00:00
Daniel Novomeský
291208f4f9 build: associate hej2 extension in Windows installer 2023-11-20 20:18:37 +01:00
Daniel Novomeský
8bb34ac596 plug-ins: HEJ2 format loading
This image format is also called as JPEG-2000 in HEIF,
it is supported in recent versions of libheif.
Specification: https://www.itu.int/rec/T-REC-T.815-202106-I/en
2023-11-20 20:16:01 +01:00
Alx Sa
2c68021b54 core: Fix strict-aliasing error on ASE load
Resolves #10359

When compiled with -Werror=strict-aliasing, the build fails
on this line due to converting pointer datatypes.
This patch switches to using memcpy () instead.
2023-11-19 13:53:18 +00:00
Jordi Mas
ef65db052f Update Catalan translation 2023-11-19 09:53:17 +01:00
Alx Sa
b907e5efbe plug-ins: Import/export safe-to-copy PNG chunks
Currently we only use and retain "critical" PNG chunks,
discarding any safe-to-copy but non-image chunks.
This adds code to store them as parasites and then
include them on export, thus preventing loss of data.
2023-11-19 04:13:39 +00:00
Alx Sa
5e076c2803 plug-ins: Add loop count to GIF parasite
In ccd12318, the parasite to remember if the GIF was an animation
did not actually store the number of loops. This patch fixes that.
2023-11-17 21:07:05 +00:00
Martin
27e13924ea Update Slovenian translation 2023-11-17 09:29:14 +00:00
Jacob Boerema
10492830a8 plug-ins: fix GError set over the top of a previous GError ...
when loading a BMP image with an invalid compression value.

The invalid compression check was missing a goto out (error exit)
causing the GError to be overwritten, which caused a GLib warning.
We add the missing goto statement here.
2023-11-16 19:12:48 -05:00
Bruno Lopes
fd6d404698 Issue #8877: Package 'gdbus' on Windows to fix warnings 2023-11-14 08:19:49 -03:00
Martin
3bdeeb9739 Update Slovenian translation 2023-11-13 14:39:32 +00:00
Martin
bf381d7ad5 Update Slovenian translation 2023-11-13 14:27:35 +00:00
Luming Zh
104f4e272d Update Chinese (China) translation 2023-11-12 14:44:18 +00:00
Alx Sa
ccd1231869 plug-ins: Save GIF animation when overwriting
Overwriting a GIF animation results in loss of frames if a previous export turned off
animations.
This sets a parasite on import which we check for on overwrite. If it was an
animation originally, we overwrite as an animation as well.
2023-11-12 12:10:34 +00:00
Luming Zh
7efd6421ba Update Chinese (China) translation 2023-11-12 00:57:22 +00:00
Ekaterine Papava
89df8aab1d Update Georgian translation 2023-11-11 20:07:23 +00:00
Jehan
24b36379f0 app: migrate shortcut from select-float to select-cut-float.
See my previous commit.
2023-11-11 20:03:26 +01:00
Yuri Chornoivan
5f4b25c857 Update Ukrainian translation 2023-11-11 16:55:49 +00:00
Yuri Chornoivan
d6d66c03df Update Ukrainian translation 2023-11-11 16:47:22 +00:00
Jehan
05b2f93876 Issue #10153: introducing new floating data actions.
Though we mostly removed floating layers/masks (formerly floating
selections) in many interactions, at least for default behaviors for
basic pastes, there are still advanced usage attached to this concept
and some advanced users are willing to have easier access to such items.

For this reason, this commit:

- adds edit-paste-float and edit-paste-float-in-place for pasting the
  contents of the clipboard as floating data with default positionning
  algorithm or in-place respectively;
- renames select-float to select-cut-float which does a cut and paste as
  float in one action;
- adds select-copy-float which does a copy and paste as float in one
  action;
- reorganize a bit the `Edit > Paste as` submenu with sections for the
  floating data variants;
- add a "Float" submenu in "Select" root menu, containing the 2 variant
  actions select-cut-float and select-copy-float.
2023-11-11 16:40:44 +01:00
Jacob Boerema
f97e718e7a plug-ins: issue #5556 Interpret transparency as black on DDS DXT1 textures
This adds an import option for DDS DXT1/BC1 images to always use
transparency. This is the default behavior, since this was what always
happened until now and it seems that DDPF_ALPHAPIXELS is very rarely
set for these type of images.

However, as the mentioned issues explains, advanced compression
algorithms can use this transparency data instead to mean a black
pixel. There is however, no certain way to determine this.

For that reason, we add an option here, that, if disabled, will
interpret fully transparent values as a black pixel.
2023-11-10 18:30:42 -05:00
Jacob Boerema
dd45e3b462 plug-ins: add option to vertically flip dds image on import
Some games apparently need dds images to be vertically flipped.
We already have an option to flip dds images on export, so it makes
sense to also allow flipping on import.
2023-11-10 18:30:41 -05:00
Alx Sa
efa1267f13 actions: Fix layer buttons relative to floating selections
The anchor and merge down buttons are visible at the same time, which should not be the case.
Their visibility is now dependent on the existance of a floating selection.
The New Group and Search/Link buttons are also disabled when there's a floating section.
2023-11-10 20:33:26 +00:00
Jehan
f12a88bd65 build: sync nightly flatpak manifest with beta one. 2023-11-10 20:33:10 +01:00
Jehan
5f03859abf desktop: syncing the AppData with gimp-2-10 one. 2023-11-10 16:02:33 +01:00
Jehan
59116d37f8 Issue #10023: don't use the selected text styling to display the selected items label.
The idea initially came from some styling in Thunderbird. It's not that useful anyway.
2023-11-10 15:28:16 +01:00
Jacob Boerema
f516ed6935 plug-ins: fix #8942 add DDS support for reading R8G8, R16 and R16G16 formats
In addition to the requested DXGI variants we also load the older
D3DF versions, including handling of the signed versions.

We also set signed when the pixelformat flag DDPF_BUMPDUDV (added in
the previous commit) is set.
2023-11-09 18:40:50 -05:00
Jacob Boerema
4e6e3202c8 plug-ins: add more complete list of DDS flags and pixelformat flags 2023-11-09 18:40:50 -05:00
Jehan
7f15251d2e Issue #10281: layer locks popup is not appearing. 2023-11-09 15:39:21 +01:00
Alx Sa
a8369f57c1 themes: Define more GimpSpinButton styling
As shown in issue 10287, the system theme can create a
large white border around GimpSpinButton.
This patch fixes this, and also improves the border appearance
by assigning it to the background color rather than system default.
2023-11-09 13:26:55 +00:00
Jordi Mas
68b79dea0d Fixes to Catalan translation 2023-11-08 07:33:19 +01:00
Luming Zh
7f0b24b46e Update Chinese (China) translation 2023-11-07 18:24:38 +00:00
Yuri Chornoivan
71925dc0aa Update Ukrainian translation 2023-11-06 21:47:25 +00:00
Jacob Boerema
ef3f464ad7 plug-ins: add support for loading DDS 16- and 32-bit per channel RGBA
This adds support for loading RGBA DDS images with 16- and 32-bit per
channel. Loading is supported for 16-bit half float, 32-bit float,
16 and 32-bit unsigned and signed int.

This supports both the DX10 formats and the D3D FOURCC versions.

16- and 32-bit per channel images with less than 4 channels are not
yet supported.
2023-11-06 16:29:22 -05:00
Alx Sa
ea7a29af45 Issue #10250: Enable "Layers as Pages" for single layer group in PDF export
When saving a PDF, you have the option to export layers as pages.
This works for a single layer group that contains multiple layers.
However, the option is disabled because the plug-in only checks
"top level" layers.
This patch adds code to check if the single layer is a layer group,
then enables the option if there are more than one layer in that group.
2023-11-06 20:56:33 +00:00
Daniel Novomeský
183cb49b1e plug-ins: load metadata via libheif and disable rotation dialog 2023-11-06 16:03:28 +01:00
Jehan
6b86bb72f0 README: some updates.
A link to the online documentation website is definitely needed in
there.

Also get rid of mentions of mailing lists as still active discussion
media.
2023-11-05 22:25:09 +01:00
Jehan
abf66dd66a plug-ins: prevent explicit http scheme to be automatically changed to https.
This completes commit 685c8bde99 where the http:// scheme was automatically
transformed into https:// in some cases, in particular while typing (when
pasting for instance, it was still possible to add an http URL). So let's block
"toggled" signal handlers when the URL is explicitely edited to prevent this
annoying issue.

(cherry picked from commit b991f8b361)
2023-11-05 21:58:18 +01:00
Jehan
eb7337d5e4 Issue #3247: make consistent generated brush preview.
This is only a temporary solution meant to be backported to gimp-2-10 branch,
so that at least the preview now matches how angles always worked in at least
the 2.10 series: angles are measured clockwise.

Now there is the question that in the documentation of the Brush Editor, it is
written that angles are supposed to be counter-clockwise. A solution was
proposed to make them so, but only for generated brushes (whereas angles stayed
clockwise for other types of brush) which is a very bad inconsistency.
Furthermore I find the whole tool options vs. brush editor settings mess quite
confusing. Some decision should be made for GIMP 3.

For GIMP 2.10 though, this should be an OK fix: no behavior change on-canvas,
only making the preview actually match what happens on-canvas (even though it
goes against what the docs say but it's probably better than breaking workflows
relying on actual on-canvas behavior).

Note: this commit is based on an initial proposition by Alx Sa in MR !1119,
except that the patch was only working when the preview needed to be scaled.
Instead we must go through this brush transformation code path for generated
brushes, whatever the scale.
2023-11-05 19:13:11 +01:00
Daniel Novomeský
d3d13c71f5 plug-ins: force metadata loading via libjxl
While exiv2/gexiv2 could be able to load metadata from JXL files
directly, success is not guaranteed (depends on version and
configuration, for example support could be disabled or compressed
metadata could not work).
Loading metadata via libjxl should work all the time.
It is also important not to display dialog to rotate the image
according the orientation from EXIF, because in case of JXL,
the orientation is stored in codestream and it has priority.
2023-11-04 20:34:01 +01:00
Jehan
ee9be210eb libgimpwidgets: get rid of build warning.
This fixes this warning (as appeared with commit ad8b47bff7):

[1/235] Compiling C object libgimpwidgets/libgimpwidgets-3.0.so.0.9900.17.p/gimpdialog.c.o
../../../../../../../dev/src/gimp/libgimpwidgets/gimpdialog.c:774:1: warning: ‘gimp_dialog_set_title_bar_theme’ defined but not used [-Wunused-function]
  774 | gimp_dialog_set_title_bar_theme (GtkWidget *dialog)

We could either put the whole `gimp_dialog_set_title_bar_theme()` declaration,
definition and usage into #ifdef, or only the implementation (making the
function a no-op on non-Windows platforms). I chose the former. There was some
discussion that maybe some implementation may happen later for other platforms,
but until then, no need to call it needlessly (even more as we don't know when
any theoretical other implementation would happen).
2023-11-03 15:31:51 +01:00
Jacob Boerema
1b258729c9 ci: Korean translation for the Windows installer was moved to Official
Also remove special handling of Hungarian since it is now part of an
official release.
2023-11-02 21:40:04 -04:00
Jacob Boerema
8cd97b90dd plug-ins, dds: always compute pitch_or_linsize ourselves
Certain dds images can have non-zero unexpected pitch_or_linsize values.
Until now we were only computing this ourselves in case it was zero.
Let's just always compute it and print an error to the terminal if it
differs from the value in the file.

A sample can be found in Galactic Civilizations 3: Bokeh_Hex.dds.
This change also allows us to safely load the poc in security issue
ZDI-CAN-22093 as that issue was apparently only caused by an invalid
value of pitch_or_linsize.
2023-11-02 15:21:23 -04:00
Jacob Boerema
c8a8d06cd8 plug-ins: move unchanging code out of the loop in dds load_layer
Optimize dds loading a bit by moving code that doesn't change outside
the loop:
1. The number of bits to be shifted when the source isn't exactly 8 or
16 bits depends on bytes per sample and isn't changing inside the loop.
2. Use rowstride variable to compute width * d->bpp once.
3. The check for rowstride > hdr->pitch_or_linsize doesn't change
inside the loop so move it out.

Inside the loop we only check the DDSD_PITCH flag once and move both
the size check and the fread check inside it.
2023-11-02 15:21:23 -04:00
Jehan
cc5636388f NEWS: update.
Remove several features which have been backported, hence will be first
available in GIMP 2.10.36 (soon to be released).
2023-11-02 20:15:57 +01:00
Alx Sa
b68a86e486 paint: Don't paint with gradient if dynamics not enabled
Resolves #10262.

The gradient color was being used if Confetti or Color from Gradient
dynamics had been set, even if dynamics had been disabled.
This adds an additional check to make sure dynamics are enabled
first - otherwise, the brush's existing stamp or color is used to paint.
2023-11-02 11:19:16 +00:00
Alx Sa
41872a5426 plug-ins: Fix broken macro for van-gogh-lic 2023-11-01 23:31:06 +00:00
Jacob Boerema
74adec7656 plug-ins: fix #10240 DDS saved as RGB10A2 loads incorrectly
There were 2 issues here:
1. When more than 8 bits per sample are used, a previous commit changed
it so that we would be using 16-bit integer mode instead of 8-bit.
However, the actual code for this specific format was not updated to
reflect that.
We fix this by computing 16-bits per channel values and upshifting the
10 and 2-bit samples to 16 bit per channel.

2. The computation of masks was incorrect. It computed each channel
mask separately, based on whether it was <= 8 or not.
However, if any channel needs more than 8 bits, all masks should be
computed 16 bits since we will then 16-bit integer mode.
We fix this by checking all channel bits together, and if any is higher
than 8, but not more than 16,  we use 16-bit masks.
I also took this opportunity to add support for 32-bit masks if we
ever need those.
2023-11-01 15:24:34 -04:00
Luming Zh
e3b2f40ac2 Update Chinese (China) translation 2023-11-01 13:11:30 +00:00
Alx Sa
035510d1ad plug-ins: Set pixel aspect ratio for IFF images
Based off code for GIFs in 22963405.
Code was also rearranged to check if the image
is valid before trying to use some of its features.
2023-11-01 10:36:06 +00:00
Yuri Chornoivan
e62b4a3a7c Update Ukrainian translation 2023-10-31 19:20:57 +00:00
Jacob Boerema
905527ade1 plug-ins: fix typo in file-png 2023-10-31 11:37:28 -04:00
Alan Mortensen
dae82069f3 Update Danish translation 2023-10-31 13:18:40 +00:00
Alan Mortensen
9c49f73468 Update Danish translation 2023-10-31 13:14:25 +00:00
Anders Jonsson
611b3e7b1d Update Swedish translation 2023-10-30 08:17:13 +00:00
Rodrigo Lledó
79259f45cf Update Spanish translation 2023-10-28 22:54:26 +00:00
Rodrigo Lledó
267257532d Update Spanish translation 2023-10-28 22:46:03 +00:00
Rodrigo Lledó
ad537dc63f Update Spanish translation 2023-10-28 22:29:54 +00:00
Alx Sa
83d13c6004 plug-ins: Additional fixes for DDS Import
@Wormnest noted remaining regressions after 8faad92e.
The second fread() only runs if the DDSD_PITCH flag is set,
so the error handling check should also be conditional.
Additionally, the ZDI-CAN-22093 exploit no longer runs but
still could cause a plug-in crash. This patch adds an additional
check to ensure the buffer size was within bounds.
2023-10-28 19:54:58 +00:00
Martin
5ddad59921 Update Slovenian translation 2023-10-28 19:49:00 +00:00
Alx Sa
8faad92ee9 plug-ins: Fix DDS import regression from 6ad54ca3
@Wormnest pointed out that compressed files are likely smaller than
width * height * bps, so our check to prevent ZDI-CAN-22093
also caught valid files.
The size check is removed from load_image () and moved to load_layer ()
before the two fread() functions, as we know exactly how much we'll
try to read at that point.
2023-10-27 19:24:18 +00:00
Yuri Chornoivan
a5f077fb83 Update Ukrainian translation 2023-10-27 18:18:16 +00:00
Idriss Fekir
b503a3dc1d Fix bug when font is from a .ttc file
When loading an xcf file, if a a font has already
been used, its file's hash is compared against the hashes
from the xcf file (to speedup loading), but if the font is from a .ttc file (a font
collection), then all fonts from that file will have the same file
hash, so the wrong font might be selected. a simple solution is to not
use the hash except as a last resort if every other field is identical.
2023-10-27 15:48:58 +00:00
Jehan
28e94a6d8f NEWS: update. 2023-10-27 14:49:59 +02:00
Jehan
2dcc8eea93 app, libgimp, pdb: remove the internal PDB function _gimp_pdb_get_data_size().
We exchange GBytes structs which know their own data size already and is much
safer.
2023-10-27 10:16:45 +00:00
Jehan
7a03b3ea09 libgimp: gimp_pdb_get_data() and gimp_pdb_set_data() are made internal.
These are not usable by plug-ins anymore which should store their data between
runs as arguments or aux arguments (in case of values which should be stored
from one run to another but are not really usable for non-interactive scripts).
These are per-plug-in (not polluting the whole process space with just random
strings as identifiers which could be used by other plug-ins) and even survive
restarts of GIMP.

I still keep these functions, but only internally, as they are used to store
settings of GimpAspectPreview, GimpDrawablePreview and GimpZoomPreview across
plug-in runs. Still I changed their API to set and return a GBytes directly
(mimicking the private PDB functions' API).
Also I remove gimp_pdb_get_data_size() which is useless when exchanging GBytes
directly.

Note that the 2 functions are still exported in the library, and only not
advertized through headers (so they are not really internal, just hidden), on
purpose, because we need to call them in libgimpui. So it is still relatively
easy for a plug-in to use them. Nevertheless I made clear in the function
documentation that these must not be considered public and could end up deleted
at any time. Any plug-in still trying to call these takes the risk of having
their code relying on unreliable API.
2023-10-27 10:16:45 +00:00
Ekaterine Papava
0b0adfc627 Update Georgian translation 2023-10-27 04:38:09 +00:00
Alx Sa
0b83950ec4 plug-ins: Make van-gogh-lic scriptable...
...by adding parameters and porting to
GimpProcedureConfig/GimpProcedureDialog.
Code was also rearranged to match the ordering
of other plug-ins.
As a note, the help message is "Special effects that nobody understands".
It would be nice if someone with more familiarity with this plug-in could
update the help messages to explain the parameters.
2023-10-27 01:17:37 +00:00
Anders Jonsson
8055833d47 plug-ins: dds string fixes 2023-10-26 21:52:32 +00:00
Jehan
83a5998547 app: do not assume that a procedure is still registered after running.
I had the case when "Sphere" script crashed, bringing down the whole script-fu
plug-in (while trying to reproduce #10214). Then after being run, we get a
dangling pointer to a finalized action object.

Even in successful use cases, we will want to give the ability to unregister
normal plug-ins/procedures wrapped as GIMP extensions, and there is also the use
case of temporary procedures, so I'm sure this bug could be reproducible even in
normal non-problematic runs.
2023-10-26 22:44:07 +02:00
Yuri Chornoivan
fe8811c119 Update Ukrainian translation 2023-10-26 20:00:21 +00:00
Jehan
78aec68624 plug-ins: replace gimp_[gs]et_data() by AUX args in file-tiff. 2023-10-26 21:46:39 +02:00
Martin
374bc7f24b Update Slovenian translation 2023-10-26 19:19:31 +00:00
Martin
61793061db Update Slovenian translation 2023-10-26 19:10:58 +00:00
Jehan
4e9a077219 app: data tree views are in single selection mode.
I am pretty sure that this should be in single selection mode because we don't
even really have code to handle cases with multiple brushes or font selected.
Right now, we assume in many places that there is only one font or brush (or
other data) active at a given time.
Yet this code (or older versions of it) is old apparently and I realize that
even in 2.10, I can ctrl/shift click to select several data objects. This is the
weird part.

Anyway let's put this in single selection mode and see how it goes. If there
were actually use cases which I didn't know about, I'm sure we'll soon have
reports.
2023-10-26 20:59:48 +02:00
Jehan
40811be562 app: further improves the cursor choice heuristic with multi-selection.
I could still see annoying scrolling up/down happening when we are deselecting
an item (typically with ctrl-click). In such a case, the cursor is on a
deselected item. Just make it bump to a closest item, preferably a visible one.
2023-10-26 20:50:37 +02:00
Alx Sa
427130be25 plug-ins: port dds-write to GimpProcedureDialog.
Note that "save-type" and "mipmaps" were left as ints rather than GimpChoice,
as some options are conditionally disabled and I don't know if that 
is available in GimpChoice just yet.

A DDS loading bug related to 6ad54ca3 was also resolved. 
The correct header value to check for the pixel size was not "depth" but "bpp".
2023-10-26 17:16:49 +00:00
Jehan
195ac684a7 app: avoid scrolling up to top item of multi-selected items.
My first versions were commits 98f0c448 then 1d8782915e but the more I go, the
better I understand the implications of the selection vs. the cursor. In
particular, when setting a cursor, which also initializes the selection to this
item only, the tree view would also scroll to this item. The current
implementation, which sets the top item as cursor, is therefore particularly bad
for multi-selection which doesn't fit fully in the view, because we also end up
scrolling up. Say you have a long list of layers, you first select the top
layer, then scroll down to the bottom layer and ctrl-click it: the selection
(now 2 items) works but you end up scrolled back all the way up.

This alternate version is much better, by ensuring that your cursor is at least
within the selection (hence avoiding the discrepancy between keyboard navigation
and pointer navigation, and which was fixed with commit 98f0c448), so that we
don't try to change the cursor when possible.
2023-10-26 18:32:59 +02:00
Jehan
636b38be4f app: fix broken multi-selection.
This was broken in commit 3e101922. Setting a cursor basically resets to a
single selection, invalidating pointer-made multi-selection.

But then we got back the bug it fixes, which is that we must grab focus after
the selection is actually made. So we now grab at the end.

This also had a bad consequence for multi-selection (again): if the focus was
not already on the tree view, gimp_container_tree_view_selection_changed() was
not called. This function was where the actual selection-changing is meant to
happen. So we had to shift-click (or ctrl-click) twice. The first time, nothing
would happen (but focus was given to the tree view). The second time, we could
finally update the selection.

This is why we add 2 different cases of focus grab, which should hopefully
handle all cases correctly, though this code is really extra-complex. This
replaces MR !1128.
2023-10-26 17:19:08 +02:00
Alan Mortensen
05a1a9bbbc Update Danish translation 2023-10-26 14:22:00 +00:00
Ekaterine Papava
e8012ddcd2 Update Georgian translation 2023-10-25 21:23:55 +00:00
Jehan
f2734cec13 plug-ins: replace gimp_[sg]et_data() with an aux bytes argument in curve-bend.
I also remove (without replacement) 2 usages of gimp_get_data() without
associated gimp_set_data(). According to the comment, it looks like the
associated data was likely set by the GAP plug-in instead. Let's drop this.

Finally I see a lot of arguments, several of them being float arrays, so I
wondered if they were related to the curve and point arrays we are storing as
aux arg now. Apparently these arguments are not even used in the plug-in, right
now, which is explained in commit e318651c99. Maybe if these were actually
used/set and if we implement float array (de)serialization, would this aux
argument become useless?

Lastly, I deleted some code paths which were never used. For instance, stored
bval.total_steps was never set to anything else than 0 anywhere (so I removed
both the variable and the other code-path, which actually ended up being the
GAP-related data get). Additionally in p_bender_calculate_iter_curve(), there
was a big else block which was only happening when the GAP-related variables
were set. It got deleted too (as is a function only used in this block of code).
2023-10-25 22:47:45 +02:00
Jehan
8d6f281a72 plug-ins: replace gimp_[sg]et_data() with an aux str argument in ifs-compose.
The argument is the serialized description of the generated fractal. Actually it
may even be useful as a non-aux argument. A GFile argument could eventually be
interesting too, though one arg per setting would be better of course (it allows
more easily to generate animated frames for instance). In such a case, the GFile
would be used in priority, otherwise the other args.

Notes:

* I didn't port to GimpProcedureDialog though it looks like it would not be too
  hard (most of the GUI would still be custom GTK code, yet we could have the
  generic "reset to initial|factory values" buttons and load/save).
* The custom "Reset" button (identical to what "reset to factory values" would
  do) works fine anyway.
* The "run with last vals" works fine where there were indeed previous runs
  (which may be in previous sessions), but crashes when it's actually the first
  run ever. Some of the base structure data were not initialized. It should not
  be too hard yet would require a bit of code reorganization to fix this.
2023-10-25 19:01:02 +02:00
Jehan
0a0d66bda7 plug-ins: replace gimp_[sg]et_data() with an aux bytes argument in animation-play. 2023-10-25 19:01:02 +02:00
Alx Sa
f2bf2b7fe3 app: Fix initialization warnings
Initialized values in gimpruler.c and
gimptoolrectangle.c to remove warnings
about uninitialized variables.
2023-10-25 16:15:04 +00:00
Sabri Ünal
1ed8b20f02 Update Turkish translation 2023-10-25 13:44:23 +00:00
Sabri Ünal
b972bfdae9 Update Turkish translation 2023-10-25 13:44:15 +00:00
Sabri Ünal
179a084017 Update Turkish translation 2023-10-25 13:41:53 +00:00
Luming Zh
05703868bc Update Chinese (China) translation 2023-10-25 13:05:58 +00:00
Yuri Chornoivan
a3355a635d Update Ukrainian translation 2023-10-25 09:40:41 +00:00
Jehan
edc6232ae1 plug-ins: replace gimp_[sg]et_data() with an aux bytes argument. 2023-10-24 23:46:53 +02:00
Jacob Boerema
c2d76f38ff plug-ins: handle fill layers with negative height
As mentioned on Discourse here
https://discourse.gnome.org/t/error-opening-psd-image-height-no-support-or-invalid-1/17743
When opening a certain psd
(https://github.com/Squirtleiscool/Coalition-Technologies-Skill-Test/blob/master/CT_SkillTest_v1.psd)
We get a warning when creating a layer with a height of -1.
Apparently certain fill layers can have a negative height. Data on how
to handle this height is probably inside the 'SoCo' layer resource
that we don't handle yet.
For now, we will set the layer to empty and the height to 1.

To be on the safe side, let's also check the layer width to be non
negative.
2023-10-24 17:32:05 -04:00
Jehan
1caf6a8de4 plug-ins: remove useless gimp_[gs]et_data() calls.
This already uses GimpProcedureDialog and copy_from_config() is taking care at
filling the mapvals struct when an update is done.
2023-10-24 22:42:14 +02:00
Jehan
afef78b62c plug-ins: g_object_[gs]et_data() in help-browser replaced with aux bytes arg. 2023-10-24 22:28:37 +02:00
Jehan
56e5ed4559 plug-ins: various improvements to cml-explorer.
- Argument "parameter-uri" becomes "parameter-file" (GFile instead of URI
  string).
- Adding a "settings-data" auxiliary bytes argument to handle all settings for
  the time being, instead of using gimp_get_data() and gimp_set_data().
- "last_file_name" was also removed from the ValueType struct, using the
  "settings-data" arg instead.
- Fixing the non-interactive usage which was missing a gegl_init() call.
- Use GIO for various reading and writing to a CML parameter file.
- Better bubbling up of error messages.
- Fix the loading of the last section of CML parameters file.
- Also fixing deactived file dialog when clicking the open button a second time.
2023-10-24 22:28:37 +02:00
Jehan
04bcade9d7 plug-ins: current usage of gimp_[sg]et_data() in twain is bogus.
I don't even replace this one with an auxiliary bytes arg because this is
absolutely unused to start with.
2023-10-24 22:28:37 +02:00
Jehan
39409218a2 plug-ins: get rid of gimp_[sg]et_data() in gimpressionist.
We use a GBytes auxiliary argument (i.e. not visible in the public API) which
perfectly replace gimp_[gs]et_data() API, in even better (since it also works
across sessions).

The "Reset to initial values|factory defaults" still don't work. We could make
these work even with the AUX args, but I feel like this would be far too much
work for a non-optimal solution anyway. The real solution can be when we get
more public arguments to this PDB procedure to handle every setting
individually. This can happen after GIMP 3 release (especially now that
arguments number and order don't break the PDB API anymore).
2023-10-24 22:28:37 +02:00
Boyuan Yang
de10c0c309 Update Chinese (China) translation 2023-10-24 17:30:22 +00:00
Vasil Pupkin
65175d590e Update Belarusian translation 2023-10-24 16:20:56 +00:00
Yuri Chornoivan
032b786cb8 Update Ukrainian translation 2023-10-23 16:27:23 +00:00
Jehan
19b732a1da plug-ins: get rid of useless gimp_set_data() and gimp_get_data(). 2023-10-23 18:19:10 +02:00
Jehan
3352fb8639 plug-ins: port flame to GimpProcedureDialog.
I added a bunch of arguments, in particular nearly all the settings in the main
dialog, except for "Colormap" as I'm unsure yet how to handle it. It looks like
a mix of GimpChoice and GimpDrawable. I guess it could just be both (2 args,
using values from the GimpChoice if GimpDrawable arg is NULL).

And I didn't make the settings in the "Edit Flame" dialog into arguments as I'm
not sure if the "Speed" and "Variation" in particular should be args, or are
just temporary args only meant to construct a flame (in particular, it looks
like it builds data defining the flame?). These data should be their own args
probably?

Maybe we could also have the "file" as alternative way to init the flame data
(the "Open" button)?

For now, I'm just storing the whole settings struct as an aux argument, so that
"Load/Save Settings" work, as well as the initial values from previous run.

Also the whole code is still a bit of a mess. I feel like we could really
simplify a lot of the code, all these values stored globally or duplicated now
in both the GimpProcedureConfig and the control_point structure.
2023-10-23 17:07:09 +02:00
Alx Sa
0faaf7c379 themes: Define behavior for clicking already selected button
Resolves #9989

In 2.10/GTK2, clicking an already selected toolbutton caused the
background color to change to indicate this action.
This patch restores that behavior through CSS updates.
It also slightly rearranges the CSS to group related button styles.
2023-10-22 16:59:29 +00:00
Jordi Mas
6681fe7267 Update Catalan translation 2023-10-22 07:21:24 +02:00
Alan Mortensen
f5f1e05157 Update Danish translation 2023-10-21 09:09:55 +00:00
Alan Mortensen
c1b6756ee7 Update Danish translation 2023-10-21 09:09:49 +00:00
Alan Mortensen
488d154c44 Update Danish translation 2023-10-21 09:08:34 +00:00
Asier Sarasua Garmendia
0c5cb17d8a Update Basque translation 2023-10-21 07:00:51 +00:00
Jehan
0383ad350e Issue #9800: GimpAlignOptions' finalize() not properly chaining up.
Since we were not chaining up with parent's finalize(), we were not
removing the instance from the gimp-debug infrastructure which assumed
the object was leaked and would try to read its reference count for
debugging purpose, when GIMP_DEBUG=all was set.

In fact, the object was not leaked, therefore we got into a segfault
when dereferencing already freed memory.
2023-10-21 03:44:32 +02:00
Jehan
4fc9daedad Issue #10208: validate arguments for PDB calls run by script-fu.
I added a few specific validations for range types (int, double…), and a
generic validation at the end, meant to catch all yet uncaught invalid
argument cases (yet with less details on the what and why).
2023-10-21 02:46:58 +02:00
Massimo Valentini
3e101922d8 widgets: Prevent Toolbox autoscroll bug
In Preferences > Toolbox, clicking on an item below the
initial scroll window view causes it to jump to the top
automatically. This patch prevents this by setting the
clicked index in the GtkTreeView before grabbing focus.
2023-10-20 19:19:39 +00:00
Yuri Chornoivan
57a6386a3f Update Ukrainian translation 2023-10-20 18:41:56 +00:00
Jehan
a4b68c5244 app: don't call gimp_align_options_image_changed() on finalized options object.
I had this one crash upon exit, inside gimp_align_options_update_area() as a
consequence of gimp_align_options_image_changed() being called on an image
change. I could not reproduce after this one time and it's very likely a race
condition when everything is getting finalized, and the tool options object is
getting finalized earlier than the user context.

Anyway this should fix the potential crash.
2023-10-20 19:54:30 +02:00
Jehan
410ff342bc libgimp: fix double free crash.
gimp_procedure_new_return_values() takes ownership of the passed GError (it
allows, among other things, to call it directly as return value). So we must not
try and free it afterwards.
2023-10-20 19:01:38 +02:00
Jehan
3a0a400ad1 plug-ins: port forgotten uses of gimp_pdb_run_procedure*() removed API.
As often, we forgot to look in bindings. Thanks to Alx Sa for reminding me of
these.
2023-10-20 19:01:38 +02:00
Jehan
c3e59b071f libgimp: allowing NULL passed as value to a GimpObjectArray PDB argument.
A NULL will be transformed into an array of size 0.
2023-10-20 19:01:38 +02:00
Jehan
8ca6f1ac5b libgimp: gimp_procedure_new_arguments() can now be made static. 2023-10-20 19:01:38 +02:00
James Golden
22b28df391 app: save dialog now adjusts size up to monitor height
Fixes: #9373
2023-10-20 14:28:30 +00:00
bootchk
3646b86ce0 2.99 libgimpconfig: #10194 broken API GimpItem
And GimpTextLayer, GimpLayerMask
2023-10-20 09:04:42 -04:00
Ekaterine Papava
d8140cc2a1 Update Georgian translation 2023-10-20 04:03:45 +00:00
Alx Sa
208e22da3a themes: Define file dialog path buttons hover colors
Resolves #10039.

This keeps the highlight style consistent for the file
dialogues, no matter the underlying system theme.
2023-10-20 02:30:14 +00:00
Alx Sa
2c83d84d02 plug-ins: Load guides and grid info for PSP files
These are stored in the Extended Block. This block also holds metadata
in Exif, IPTC, and XMP formats, but those are not yet implemented in this
patch. A comment stating Exif was implemented in PSP 10 was corrected
to PSP 8 as well.
2023-10-19 19:36:52 +00:00
Rodrigo Lledó
f3d54b76b6 Update Spanish translation 2023-10-19 17:52:42 +00:00
bootchk
355f665403 Fix 10170
Changes only to ScriptFu.

The third term (the default) of a SF-FONT etc. spec is now ignored.

Test case is SF>Test>Sphere.  There are still crashing issues
related but separate.
2023-10-19 16:37:05 +00:00
Alx Sa
414f9f9abf build: Replace overlooked gimp_pdb_run_procedure_config () call
from 57ca3f48.
2023-10-19 14:55:59 +00:00
Alx Sa
85d8322c00 widgets: Restore layer/mask highlight on select
Changes were made to the click code for layers & masks
due to the introduction of multi-select, and this seems to
have caused the view highlight to be inconsistent.
This patch adds the gimp_layer_tree_view_update_borders ()
call after a click or selection to fix this.
2023-10-19 10:53:07 +00:00
Alx Sa
ad8b47bff7 gui: Change Windows title bar based on theme
On Windows, the title bar can be set to light or dark mode via DwmSetWindowAttribute ().
This adds code to update the main title bar and dialogue title bars based on the current theme.
The main title bar uses "prefer-dark-theme", while the dialogue title bars
uses the color of the widget background to assume the correct color.
2023-10-18 16:48:25 +00:00
Jehan
bf8ee69570 plug-ins: fix some broken macros with a massive search-and-replace.
If we leave a space between the macro name and opening parenthese for argument
lists, the args are not considered macro args (which will be discovered when
using it). I experienced this issue while testing code on some plug-in
yesterday, so thought I might as well fix all these broken macros for casting to
the specific GimpPlugIn subclass, so that we won't have a next time.
2023-10-18 18:29:37 +02:00
Jehan
57ca3f4807 libgimp, plug-ins: move gimp_pdb_run_procedure*() to gimp_procedure_run*().
The gimp_procedure_run() already existed, though it was with an ordered
GimpValueArray array of arguments. Its usage feels redundant to the series of
gimp_pdb_run_procedure*() functions (which is confusing), but
gimp_procedure_run() was actually a bit more generic, because it does not
necessarily calls GimpProcedure-s through the PDB! For instance, it can runs a
local GimpProcedure, such as the case of one procedure which would want to call
another procedure in the same plug-in, but without having to go through PDB. Of
course, for local code, you may as well run relevant functions directly, yet it
makes sense that if one of the redundant-looking function is removed, it should
be the more specific one. Also gimp_procedure_run() feels a lot simpler and
logical, API wise.

A main difference in usage is that now, plug-in developers have to first
explicitly look up the GimpPdbProcedure with gimp_pdb_lookup_procedure() when
they wish to call PDB procedures on the wire. This was done anyway in the
gimp_pdb_run_procedure*() code, now it's explicit (rather than calling by name
directly).

Concretely:

* gimp_pdb_run_procedure(), gimp_pdb_run_procedure_config() and
  gimp_pdb_run_procedure_valist() are removed.
* gimp_procedure_run() API is modified to use a variable args list instead of a
  GimpValueArray.
* gimp_procedure_run_config() and gimp_procedure_run_valist() are added.
* gimp_procedure_run_config() in particular will be the one used in bindings
  which don't have variable args support through a (rename-to
  gimp_procedure_run) annotation.
2023-10-18 17:11:20 +02:00
Jehan
701357c02f libgimp, plug-ins: no need for GType of argument in gimp_pdb_run_procedure().
Passing (name, type, value) triplets is actually useless because we can get the
type information from the procedure/config anyway. That only adds one more
verification to do. Let's just change the function so that we pass (name, value)
couples instead, pretty much like in `g_object_set()`.
2023-10-17 15:49:32 +02:00
Jehan
4693f1d824 Issue #10183: --iso-8601 is not a supported option by date CLI tool on macOS. 2023-10-17 15:23:30 +02:00
Luming Zh
aa8ab50a27 Update Chinese (China) translation 2023-10-16 20:38:01 +00:00
Jehan
475dafcee4 libgimp, pdb: make gimp_pdb_run_procedure_array() internal.
Apart from all regenerated PDB files, this commit fixes the few manual usages in
libgimp too.
2023-10-16 22:12:08 +02:00
Jehan
70438028aa libgimp: PDB procedure arguments are not order-based anymore (API-wise).
As far as plug-in API is concerned, at least the calling API, order of arguments
when calling PDB procedures doesn't matter anymore.

Order still matters for creating procedures with standard arguments (for
instance, "run-mode" is first, then image, or file, drawables or whatnot,
depending on the subtype of procedure), but not for calling with libgimp.

Concretely in this commit:

- gimp_pdb_run_procedure_argv() was removed as it's intrinsically order-based.
- gimp_pdb_run_procedure() and gimp_pdb_run_procedure_valist() stay but their
  semantic changes. Instead of an ordered list of (type, value) couple, it's now
  an unordered list of (name, type, value) triplets. This way, you can also
  ignore as many args as you want if you intend to keep them default. For
  instance, say you have a procedure with 20 args and you only want to change
  the last one and keep the 19 first with default values: while you used to have
  to write down all 20 args annoyingly, now you can just list the only arg you
  care about.

There are 2 important consequences here:

1. Calling PDB procedures becomes much more semantic, which means scripts with
   PDB calls are simpler (smaller list of arguments) and easier to read (when
   you had 5 int arguments in a row, you couldn't know what they refer to,
   except by always checking the PDB source; now you'll have associated names,
   such as "width", "height" and so on) hence maintain.
2. We will have the ability to add arguments and even order the new arguments in
   middle of existing arguments without breaking compatibility. The only thing
   which will matter will be that default values of new arguments will have to
   behave like when the arg didn't exist. This way, existing scripts will not be
   broken. This will avoid us having to always create variants of PDB procedure
   (like original "file-bla-save", then variant "file-bla-save-2" and so on)
   each time we add arguments.

Note: gimp_pdb_run_procedure_array() was not removed yet because it's currently
used by the PDB. To be followed.
2023-10-16 21:56:37 +02:00
Jehan
61e2faed1b app, plug-ins: port "file-gbr-save-internal" to multi-drawable API.
Similar to commit 6905b0bbef for "file-pat-save-internal". For interactive
usage, nothing is changed, but for non-interactive ones, we can now choose a
list of drawables to export.

Pending more changes, relative to the discussion in #7370.
2023-10-16 16:21:42 +02:00
Jehan
2728294063 app: rename "dummy-param" to "run-mode".
Since now the name of arguments will become more important, over order, let's
name the first parameter "run-mode" even in cases when this is a dummy argument
(most often the case when a procedure always acts the same, whether interactive
or not). I keep the mention of the parameter being useless in the nick and blurb
strings, as it's useful information. But let's keep using our "standard" arg
name "run-mode" for this first argument.
2023-10-16 14:49:17 +02:00
Jehan
8e66e5ae58 app: use "num-drawables" consistently for the array size argument of "drawables".
This is the naming we use everywhere else.
2023-10-16 14:45:04 +02:00
Jehan
a2c6a5ee72 NEWS: update. 2023-10-16 13:58:03 +02:00
Jehan
a101fd60eb libgimp: export again gimp_procedure_config_*_default() functions.
This partially revert some of the changes in commit 652a1b4388 because the
Windows CI suddenly failed because of this (my local build on Linux didn't have
any problem though) with:

> /usr/bin/x86_64-w64-mingw32-ld: libgimp/libgimpui-3.0-0.dll.p/gimpproceduredialog.c.obj: in function `gimp_procedure_dialog_save_defaults':
> /builds/GNOME/gimp/_build/../libgimp/gimpproceduredialog.c:2570:(.text+0x633): undefined reference to `_gimp_procedure_config_save_default'
> /usr/bin/x86_64-w64-mingw32-ld: /builds/GNOME/gimp/_build/../libgimp/gimpproceduredialog.c:2576:(.text+0x644): undefined reference to `_gimp_procedure_config_has_default'
> /usr/bin/x86_64-w64-mingw32-ld: libgimp/libgimpui-3.0-0.dll.p/gimpproceduredialog.c.obj: in function `gimp_procedure_dialog_load_defaults':
> /builds/GNOME/gimp/_build/../libgimp/gimpproceduredialog.c:2549:(.text+0xa2f): undefined reference to `_gimp_procedure_config_load_default'
> /usr/bin/x86_64-w64-mingw32-ld: libgimp/libgimpui-3.0-0.dll.p/gimpproceduredialog.c.obj: in function `gimp_procedure_dialog_constructed':
> /builds/GNOME/gimp/_build/../libgimp/gimpproceduredialog.c:368:(.text+0x11b1): undefined reference to `_gimp_procedure_config_has_default'

This is because these functions are used not only inside libgimp but also
across inside libgimpui. As a consequence, the build fails when linking
libgimpui.
2023-10-15 23:20:44 +02:00
Jehan
f25e0448b2 libgimp, plug-ins: gimp_procedure_config_[gs]et_values() not public anymore.
This goes with our planned change of not making GimpProcedure arguments order
relevant anymore regarding the PDB API. In particular, it means we don't want to
use GimpValueArray for various procedure arguments API, but directly
GimpProcedureConfig objects.

This change will allow to add or reorder arguments in the future, so that we
won't have to create new PDB procedures when adding new arguments, while still
keeping PDB API stability.
2023-10-15 22:10:38 +02:00
Asier Sarasua Garmendia
8881079d9d Update Basque translation 2023-10-15 18:51:34 +00:00
Alx Sa
65dd773163 plug-ins: Fix issue with RGBA 32BPP import
Resolves #10174.
The precision assignments for floating point versus integer options
were flipped by accident.
2023-10-15 15:37:13 +00:00
Jehan
652a1b4388 libgimp: do not export private GimpProcedureConfig functions in the lib.
Some of these should not even be visible by libgimp and were just fine as static
as well! For the rest, I make them really private (not only with a private
header).
2023-10-15 17:32:04 +02:00
Jehan
b2f633a26c libgimp: all _gimp_procedure_config_begin|end_*() functions made private.
Since now all GimpProcedure and subclasses run these before and after the
relevant run() functions, there is no need to keep these public.
2023-10-15 17:19:30 +02:00
Jehan
317be5f4ce Issue #3912: Object proxy management not happy with bindings.
We cannot be 100% sure generically (i.e. for all possible bindings available
with GObject Introspection) if bindings add their own reference to objects or
not. Clearly we have cases when they always do (Lua, Javascript), cases when
they do only in certain conditions (global Python variables) and cases when they
don't (Vala). What we know for sure is that in these script languages,
developers don't manually manage memory anyway. So the additional reference is
not their fact.

So let's just maintain a list of automatic memory managed binding languages,
among the few we officially support (i.e. the ones for which we have working
test plug-ins) and verify by executable extension if the plug-in is written in
one of these.
Both keeping a manually-updated list and verifying by extension are not so
pretty solution, but for now it will do.
2023-10-15 16:45:15 +02:00
Alx Sa
bd7423915c gui: Use "minimize" window hint on Windows
Resolves the second half of #300.

This adds conditional code to the gtk_window_present () call in gui.c
to prevent it from running if the user requested it stay minimized in the shortcut
or commandline call on Windows.
It also keeps the splashscreen minimized in that case.
2023-10-15 14:14:06 +00:00
Jehan
d1297b8c2b libgimp: do not unref the additional object reference hold by a plug-in.
As explained in the comment above, the reference might actually be owned by the
binding code (not by the plug-in code) and therefore can still be released
afterwards. Freeing it now while we don't own the reference exposes us to
double-free crashes.
2023-10-15 11:53:27 +00:00
Jehan
c9c372e77c build: missing dependencies at Windows build packaging stage.
This is unrelated to the Aarch64 changes. It was just already broken.
2023-10-15 11:53:27 +00:00
Jehan
fe465120be build: install lua5.1 instead of luajit on Windows/Aarch64. 2023-10-15 11:53:27 +00:00
Jehan
7f2b301d68 meson: search lua alternatively to luajit.
This will be needed in particular for GIMP on Windows/Aarch64. Also even on
other OSes, it is useful to support lua plug-ins not only with luajit but also
upstream lua.
2023-10-15 11:53:27 +00:00
Jehan
7a34282fa5 gitlab-ci, build: add Aarch64 build in our universal installer.
This is in part a port of commit 6f921b27bb from gimp-2-10 branch, except that I
could not easily cherry-pick because too much had changed already in the master
branch.
There are also a bunch of additional changes in some other glue scripts.

Also some rules which were in the 2.10 branch don't apply to the main one, such
as Python being copied from the x86 binaries, since clang-aarch64 has Python3
(unlike Python2).
2023-10-15 11:53:27 +00:00
Jehan
de126b0c32 build: split-debug-msys2.sh fails silently on Windows/Aarch64.
Fixes:

> $ C:\msys64\usr\bin\bash -lc "bash -x ../build/windows/gitlab-ci/split-debug-msys2.sh"
> + '[' -z '' ']'
> + find . '(' -iname '*.dll' -or -iname '*.exe' -or -iname '*.pyd' ')' -type f -exec objcopy -v --only-keep-debug '{}' '{}.debug' ';'
> C:/msys64/clangarm64/bin/objcopy.exe: error: unknown argument '-v'
2023-10-15 11:53:27 +00:00
U-YGGDRASIL\ender
050c56851b Installer: remove setup.ini (not used any more)
(cherry picked from commit 0793b2a796)
2023-10-15 11:53:27 +00:00
U-YGGDRASIL\ender
092be766e5 Installer: include file extension in association name
(cherry picked from commit 597e68a364)
2023-10-15 11:53:27 +00:00
Jehan
4426eef73a build: fix per-architecture directories and Vala plug-in build.
Thanks to Hernan Martinez for noticing this issue which should fix Vala building
both for i686 and Aarch64 builds.
2023-10-15 11:53:27 +00:00
Jehan
17688ffa3a build, gitlab-ci: taking one more patch from MSYS2 project.
This should hopefully fix this error in the CI:

> llvm-rc: Error in ICON statement (ID 1):

See: https://github.com/llvm/llvm-project/issues/51286
2023-10-15 11:53:27 +00:00
Jehan
823f24c401 build, gitlab-ci: temporary patch for the Windows/Aarch64 build.
See discussion in #9170 and !1091. It looks like this soon won't be a problem
with a recent llvm-windres (which is now patched). But until then, let's patch
upstream GIMP but only for this build.
2023-10-15 11:53:27 +00:00
Jehan
bb6ac317b8 build: luajit is currently not available in clangarm64 MSYS2 repository. 2023-10-15 11:53:27 +00:00
Jehan
b4a06737c0 build: testing a Windows/Aarch64 build.
Note: the additional `rm` call was done for this error:

> + mv _install-arm64 /home/SYSTEM
> mv: cannot move '_install-arm64' to '/home/SYSTEM/_install-arm64': Directory not empty

I guess the home directory is not properly wiped-out between runs, which is not
a huge problem as long as the runner is private to our project. Let's clean
things ourselves.
2023-10-15 11:53:27 +00:00
Anders Jonsson
5c28355d5e plug-ins: remove i18n for widget ID 2023-10-15 10:18:08 +00:00
Jehan
6d36e38018 app: fix a quite-random crash on exit with a race condition.
In some very hard-to-reproduce conditions, I experienced
tool_manager_selected_layers_changed() running on an invalid GimpToolManager
pointer (because tool_manager_exit() had already run) and therefore segfaulting
on quit. Let's make sure we disconnect the signal handler.
2023-10-15 11:45:16 +02:00
Martin
68928ac5ab Update Slovenian translation 2023-10-15 09:44:24 +00:00
Asier Sarasua Garmendia
d61b96cef1 Update Basque translation 2023-10-15 07:10:26 +00:00
Jehan
24a4b6bf65 plug-ins: mistakenly internationalized signal names and widget IDs.
Thanks to Anders Jonsson for noticing these.
2023-10-14 19:05:52 +02:00
Jehan
ccb8a7be2e meson: fix inserting generation date and time in authors.md. 2023-10-14 17:12:49 +02:00
Martin
8fcf4c44f9 Update Slovenian translation 2023-10-14 15:01:14 +00:00
Martin
56d415f10f Update Slovenian translation 2023-10-14 14:40:57 +00:00
Sabri Ünal
811ec0b908 Update Turkish translation 2023-10-14 12:53:51 +00:00
Sabri Ünal
6d9ab84781 Update Turkish translation 2023-10-14 12:52:46 +00:00
Sabri Ünal
1d17e114de Update Turkish translation 2023-10-14 12:52:18 +00:00
Sabri Ünal
202979b7d7 Update Turkish translation 2023-10-14 12:52:10 +00:00
Sabri Ünal
8b8a3ebd23 Update Turkish translation 2023-10-14 12:51:57 +00:00
Asier Sarasua Garmendia
220362bf05 Update Basque translation 2023-10-14 09:22:53 +00:00
Asier Sarasua Garmendia
02b5ed0a5c Update Basque translation 2023-10-14 09:22:12 +00:00
Asier Sarasua Garmendia
171a61e2ad Update Basque translation 2023-10-14 09:22:08 +00:00
Asier Sarasua Garmendia
d8791b28de Update Basque translation 2023-10-14 09:20:34 +00:00
Michael Schumacher
f8004c8167 Add a 'Allow resizing' toggle to Decor > Add Border
Add Border enlarges an image by twice the specified border size and creates the border in this
additional space. If an image already has the intended final size, this behaviour is not desired.
This change adds a toggle to (dis)allow resizing, similar to the drop shadow script.

This came up in a reddit thread by /u/rapidexchange
https://www.reddit.com/r/GIMP/comments/6csofx/im_new_to_gimp_so_sorry_if_this_is_a_stupid/
2023-10-13 13:17:11 -04:00
bootchk
24d3e94e2a Fix scripts after changes to text PDB API
Some scripts still broken until fixes re default font in ScriptFu.

Test scripts restored to working.
2023-10-13 09:38:21 -04:00
Ekaterine Papava
f76f6dc88e Update Georgian translation 2023-10-12 14:04:58 +00:00
Ekaterine Papava
7cf7393928 Update Georgian translation 2023-10-12 13:42:16 +00:00
Martin
08e77c8fbd Update Slovenian translation 2023-10-12 09:22:45 +00:00
Yuri Chornoivan
7bc554f42a Update Ukrainian translation 2023-10-12 06:46:38 +00:00
Martin
c7f46d9ec1 Update Slovenian translation 2023-10-11 15:52:00 +00:00
bootchk
b3cd0f2539 Fix #10162 critical on null brush to prop chooser widget 2023-10-11 08:59:27 -04:00
bootchk
039b25eb6e Fix clang build error void function should not return value 2023-10-11 08:09:54 -04:00
Alx Sa
968cf06a1c plug-ins: Load PSP selection block
Adds code to read in PSP_SELECTION_BLOCK.
If there was an active selection in the PSP file when it was
saved, that selection will now be active in GIMP as well on load.
2023-10-10 20:56:23 +00:00
Yuri Chornoivan
2de5d5d3e0 Update Ukrainian translation 2023-10-10 19:34:55 +00:00
Luming Zh
e8d879ba16 Update Chinese (China) translation 2023-10-10 18:52:38 +00:00
Martin
88505ac57c Update Slovenian translation 2023-10-10 07:12:06 +00:00
Martin
599963d3bb Update Slovenian translation 2023-10-10 07:05:31 +00:00
Martin
71763f0a48 Update Slovenian translation 2023-10-10 07:03:21 +00:00
Anders Jonsson
0389e50569 plug-ins: string fixes 2023-10-09 21:18:39 +00:00
Ekaterine Papava
322f17c7a0 Update Georgian translation 2023-10-09 20:48:30 +00:00
Yuri Chornoivan
744c173e7a Update Ukrainian translation 2023-10-09 18:31:42 +00:00
Yuri Chornoivan
4ad7e9fe83 Update Ukrainian translation 2023-10-09 18:28:31 +00:00
Jehan
1d8782915e Issue #10143: shift selecting is failing to highlight selected layers.
This is a consequence of commit 98f0c448. Apparently setting the tree view
cursor also reset visually the selection. So I make sure I only set the cursor
on the first path in the list of selected items.
2023-10-09 15:59:13 +02:00
Jehan
8f06421781 app: fix gimp-gegl-loops algorithm from commit dbaa8b6a1c.
Using gegl_parallel_distribute_area() for gimp_gegl_is_index_used() is just far
too slow by 2 order of magnitudes compared to a threaded implementation where I
process each buffer at once (but each in their own thread from a pool).
I guess the basic value check is too basic to warrant being done in threads
(note: even growing the distributed area by bumping the thread cost a lot was
not enough).

I didn't fixup commit dbaa8b6a1c directly so that we keep a trace of the
gegl_parallel_distribute_area() implementation in case we can do better later.

Additionally I fixed gimp_gegl_shift_index() to use the full drawable format,
including the possible alpha channel. Otherwise shifting indexes may result in
dropping the alpha value.
2023-10-09 15:44:31 +02:00
Jehan
c8de818349 app, menus: Colormap dockable now shows a delete button.
This comes with a "colormap-delete-color" into the "colormap" action group. The
action/button will be insensitive when the selected color is used in the image,
since it is only possible to delete unused colors.
2023-10-09 15:28:20 +02:00
Jehan
dbaa8b6a1c app, pdb: make it possible to delete a color from a colormap if unused.
Until now, it was not really possible to delete a colormap color, but since we
now use GimpPalette, people would definitely try to do so. It just makes sense
to allow doing this, but only if the color is unused.

Additionally when we do this, all the pixels refering to bigger indexes will be
edited so that they continue to refer to the same color (bigger indexes are
shifted by -1). Therefore removing an unused color does not change the image
render.

I wondered if we might want more options, e.g. the ability to delete a color
without fixing indexes (i.e. that colors over the deleted color index would
shift to the next color). This would even allow to delete used colors (though
now the last index would have to be unused one, unless we cycle colors).
Yet I don't think this should belong to this basic API. The most expected
behavior when deleting a color from an image colormap is to fix all indexes
stored in pixels so that the image still shows the same. So that's what this
function will do in this generic usage.
2023-10-09 15:28:20 +02:00
Jehan
c3c0a70dd5 app: reset the selected index when active palette changes.
This fixes some CRITICAL when switching active image while an item is selected.
2023-10-09 15:28:20 +02:00
Yuri Chornoivan
2a0f3b6340 Update Ukrainian translation 2023-10-09 06:30:10 +00:00
Jehan
4d03f7b04b app: also generate filename and save file of duplicate data immediately.
This fixes a CRITICAL when duplicating a resource data.
2023-10-08 23:22:58 +02:00
Martin
ab11569bfc Update Slovenian translation 2023-10-08 14:40:20 +00:00
Luming Zh
1864cbf3e2 Update Chinese (China) translation 2023-10-07 18:09:21 +00:00
Ekaterine Papava
e7b703bbaa Update Georgian translation 2023-10-07 17:51:06 +00:00
Jehan
378c3c525a po: missing new source file from POTFILES.in. 2023-10-07 18:32:26 +02:00
Alx Sa
33b88d2d3b po-plug-ins: Remove reference to selection-to-path-dialog.c
This file was removed in the port to GimpProcedureConfig.
Thanks to @piotrdrag for pointing that out!
2023-10-07 14:49:36 +00:00
Alx Sa
b641cec7d1 plug-ins: Remove reference to gimp_procedure_config_end_run
Missed an non-interactive call to gimp_procedure_config_end_run()
during the GimpProcedureConfig port.
2023-10-07 13:53:20 +00:00
bootchk
e029a96d50 Fix #10127
Improper counting of args declared by scripts versus pspecs in a ProcedureConfig.
Scripts don't declare run_mode, while pspecs have run_mode and an extra internal pspec
that is not an argument.
2023-10-07 06:04:00 -04:00
Sabri Ünal
e54ab26426 Update Turkish translation 2023-10-07 06:45:19 +00:00
Sabri Ünal
e99ac4dc8c Update Turkish translation 2023-10-07 06:42:59 +00:00
Ekaterine Papava
06be26938c Update Georgian translation 2023-10-06 20:41:53 +00:00
Jehan
d931098d36 app, libgimp, pdb: new gimp_image_get_palette().
This is meant to replace gimp_image_get_colormap() (see also #9477).

We likely won't need a gimp_image_set_palette() because we can simply edit the
image's colormap/palette with GimpPalette API now and it is directly updated.

For instance, the following code changes the first entry in the image palette to
red, immediately:

```python
i = Gimp.list_images()[0]
p = i.get_palette()
c = Gimp.RGB()
c.r = 1.0
p.entry_set_color(0, c)
```

For this to work fine, I added a new concept to GimpData, which is that they can
be tied to a GimpImage (instead of a GFile). Image palettes are not considered
internals, they are just tied to their image, therefore they can be edited by
scripts/plug-ins.

Additionally with this commit, editing an image's colormap from libgimp API also
generates undo steps now.
2023-10-06 22:04:34 +02:00
Alx Sa
c54a33f0ff config: Clarify color profile policy (@ellestone)
Original patch by @ellestone.
The current tooltip is somewhat confusing for two reasons: It doesn't 
mention the word "ICC", leaving room for doubt as to what a "color 
profile" might be. And as @TheTooleMan suggested, it's easier to read
and understand if the action (opening a file . . .) is in front of the 
modifier (. . . with an embedded ICC profile) instead of vice versa.
2023-10-06 19:08:40 +00:00
Jehan
dfe803e882 Issue #9478: gimp_image_get_thumbnail_data() is not introspectable. 2023-10-05 22:58:29 +02:00
Jehan
bdcd9cd38a libgimp, plug-ins: let's just call gegl_init() in gimp_ui_init().
bootchk had the case in commit 6781a35668. I again had it with gfig. I think it
just makes sense to init GEGL, especially as the errors are not that explicit
and that the plug-in code may not even call GEGL code directly (so it makes it
harder to guess).
2023-10-05 22:36:40 +02:00
Jehan
192c043d7b Issue #10120: CRITICAL in gimp_progress_bar_init().
This hightlighted a slightly more complicated use case when setting the handle
on a widget without its own GdkWindow.
2023-10-05 16:40:16 +02:00
Rodrigo Lledó
3d827148c9 Update Spanish translation 2023-10-05 13:25:21 +00:00
bootchk
6781a35668 Fix 10115 SF interface call gegl_init
Resource chooser widgets recently changed to use gegl.
2023-10-05 07:37:15 -04:00
Alx Sa
cbf14a7e2d plug-ins: Various warnings/code style fixes for plugins...
After the recent port.
* contrast-retinex: Initialize format & src_buffer to NULL
* curve-bend and map-object: Remove no longer needed functions
* file-load-gif: Fix C++ style comment
2023-10-04 20:27:17 +00:00
Jehan
98f0c44881 app: set keyboard focus to selected item in GimpContainerTreeView.
When the selection changes, the focus must be on one of the selected items. Not
doing this was creating a very annoying behavior where you would select an item
in the tree view with the pointer first, but then when moving up/down with the
keyboard arrow, the move originated from the previously set item. This was
because the arrow move used the "cursor path", i.e. the keyboard focus, and not
the item selection as origin.

In our case, let's make sure these match (i.e. the cursor path is the path of at
least one of the selected items, which is the most expected behavior for mixed
pointer/keyboard interactions).

See code in gtk_tree_view_move_cursor_up_down() from GTK code.
2023-10-04 15:17:43 +02:00
Idriss Fekir
68aadf4a27 Issue #9979:bold and italic broken 2023-10-04 12:01:06 +00:00
Alx Sa
f46160f29c plug-ins: Prevent infinite loop in film
Resolves #10119.

If the user sets the "Image Spacing" and "Hole Width" values
to 0, the hole creation code gets stuck in an infinite loop.
This patch adds a check to the allocation code for the hole
to make sure both its dimensions are greater than 0. If not,
then the hole is not created in the first place.
2023-10-04 11:12:42 +00:00
Jehan
04dcd11fd6 app: complete !1073 for case when transformed <shift>num action clashes…
… with another default shortcut.

This won't happen with the standard US layout, but among all the layouts which
exist (or will exist), there is no say that the characters behing <shift>2-5
keys are not another one of our default shortcuts for other actions. We don't
want to print this case, because it is special enough that it's really not a
bug. In this case, we just ignore the transformed shortcut on the zoom action
and be done with it.
2023-10-04 00:11:35 +02:00
programmer_ceds
13ec70bb16 Make Numeric Shift Shortcuts Work (Fixes issue #9798) 2023-10-03 21:44:59 +00:00
Jehan
ef65087c2b app: save new data to file immediately.
Calling gimp_resource_delete() on a data with a file which was not stored yet
would fail on missing file as reported by Lloyd in a comment in #9976. We could
just special-case the code to make the already-inexisting case acceptable on
deletion, but there are a few more issues.

In particular gimp_data_create_filename() relies on actually checking file
existence on the file system. Therefore generating the file path too early
(before any possible rename, i.e. for uniqueness or other formatting need) would
easily generate duplicate paths (which means one of the data object would be
overwritten on exit). It's better to kinda *reserve* the set file path
immediately by saving the data file.

The only drawback I could see on saving early is possible I/O slowdown if a
script were to create many data, but I actually don't think it's a valid use
case (no script should likely create enough data files that we would notice a
slowdown, i.e. likely creating hundreds of data objects at once) anyway. So
let's go with it, at least for now.
2023-10-03 14:40:33 +02:00
Jehan
03a6fec6b3 plug-ins: GimpUi should be loaded by default in the Python console. 2023-10-03 13:46:24 +02:00
Alx Sa
22963405ac plug-ins: Set Pixel Aspect Ratio for GIFs
If the GIF has a value other than 0 or 49 in its PixelAspectRatio 
header, then we now use it to set the non-square pixel resolution.
For reference, GIFs calculate this value like so:
PAR = (Value + 15) / (float) 64.
2023-10-03 02:14:59 +00:00
Jehan
fc6c0974ea Issue #9976: gimp-brush-new throws critical. 2023-10-03 00:02:33 +02:00
Jehan
eab9d8da28 app, libgimp, pdb: new PDB function gimp_fonts_get_by_name().
It returns all the fonts (possibly more than 1) with a given name. I left the
function gimp_font_get_by_name() as a utility when one don't want to choose (or
is not able anyway, e.g. a script with minimal information), though I wondered
if we should not simplify with a single function (the new one, which is the
correct one now that it is possible to have several fonts with a given name).

It is easy to test with fonts named the same. For instance I could find 2
different fonts, both named 'Holiday'. This call in the Python console returns
both:

> Gimp.fonts_get_by_name('Holiday')

As part of this commit, I also implemented resource arrays (or subtype arrays)
as PDB arguments and return types.
2023-10-02 23:22:49 +02:00
Jehan
66488ed958 plug-in: changed sign of descent in gimp_text_get_extents_font().
The film plug-in is the sole usage of gimp_text_get_extents_font().
2023-10-02 21:42:23 +02:00
Jehan
adce3179d4 app, libgimp, pdb: further fix gimp_text_get_extents_font() and improve…
… description.

- The returned value as width/height/etc. of the glyph extents (or bounding
  box), not "of the font" (which doesn't mean much).
- Adding some definition for ascent and descent. This text is straight out
  copied from Pango documentation comments in pango/pango-types.h.
- I don't see why we were negating the descent value. Let's keep the value sign
  as defined in Pango.
2023-10-02 21:30:20 +02:00
Jehan
a898641cd1 app: fix return type.
Fixes:

> warning: returning ‘void *’ from a function with return type ‘gboolean’
2023-10-02 20:56:19 +02:00
Jehan
24a85eebd6 Issue #9987: text related functions crash using string for font name.
- Fonctions were renamed: s/gimp_text_fontname/gimp_text_font/ and
  s/gimp_text_get_extents_fontname/gimp_text_get_extents_font/
- The size_type arguments were removed. Even in 2.10, this argument was marked
  as "dead" and ignored. It was only kept for API compatibility.
- The font name (string) was replaced by a GimpFont argument.

gimp_text_font() is easily tested in the Python console with:

> Gimp.text_font(Gimp.list_images()[0], None, 10, 40, "Hello World!", 1.0, True, 100, Gimp.context_get_font())

And gimp_text_get_extents_font() with:

> Gimp.text_get_extents_font("Hello World!", 100, Gimp.context_get_font())
2023-10-02 20:49:53 +02:00
Martin
0a77a8492f Update Slovenian translation 2023-10-02 14:52:08 +00:00
Martin
d40137a79d Update Slovenian translation 2023-10-02 14:50:35 +00:00
Martin
fa9d394569 Update Slovenian translation 2023-10-02 14:48:21 +00:00
Martin
5a4d5e7d2d Update Slovenian translation 2023-10-02 14:47:00 +00:00
Luming Zh
d3584d2d50 Update Chinese (China) translation 2023-10-02 13:45:37 +00:00
Luming Zh
a3c39531db Update Chinese (China) translation 2023-10-02 13:43:59 +00:00
Luming Zh
0b01c76808 Update Chinese (China) translation 2023-10-02 13:43:48 +00:00
Luming Zh
4f07172fac Update Chinese (China) translation 2023-10-02 13:42:45 +00:00
Ekaterine Papava
21d9ce5f31 Update Georgian translation 2023-10-02 12:30:21 +00:00
Ekaterine Papava
f67cc26a4b Update Georgian translation 2023-10-02 12:28:44 +00:00
Ekaterine Papava
5109772d28 Update Georgian translation 2023-10-02 12:28:07 +00:00
Ekaterine Papava
0709eebffe Update Georgian translation 2023-10-02 12:24:48 +00:00
Yuri Chornoivan
edddfa2052 Update Ukrainian translation 2023-10-02 06:58:32 +00:00
Yuri Chornoivan
53c70e47b6 Update Ukrainian translation 2023-10-02 06:57:30 +00:00
Yuri Chornoivan
d1d73541c1 Update Ukrainian translation 2023-10-02 06:56:11 +00:00
Yuri Chornoivan
11ef35f7de Update Ukrainian translation 2023-10-02 06:54:52 +00:00
Jehan
a186220e58 app: be more forgiving in reading shortcutsrc.
- First do not write the protocol-version (and therefore don't read it either
  nor compare it to the current one). This file does not depend on the protocol
  version.
- Secondly when reading an unknown identifier, simply print a message on stderr
  for debugging/reference, but ignore it up to the next closing parenthese.
- Finally do not use the file-version as a terminal error as well. When we read
  a shortcutsrc with the wrong version, we still try to read it as best as we
  can. There might be issues, but it's better than fully dropping the whole list
  of shortcuts as it's a pretty important file (people might have spent a lot of
  time tweaking their shortcuts!).
2023-10-02 01:30:02 +02:00
Jehan
278f78fee6 libgimp: fix various GIR build warnings breaking HTML reference generation.
- a few inconsistent parameter naming;
- broken links to other symbols.
2023-10-02 00:25:12 +02:00
Jehan
8694f67918 libgimp: fixing duplicate gimppropwidgets section for introspection docs.
Fixing:

> [809/2421] Generating libgimp/GimpUi-3.0.gir with a custom command (wrapped by meson to set env)
> libgimpwidgets/gimppropwidgets.c:37: Warning: GimpUi: multiple comment blocks documenting 'SECTION:gimppropwidgets:' identifier (already seen at gimppropwidgets.c:23).
2023-10-02 00:05:10 +02:00
Jehan
3acac137ae NEWS: update with all changes from MR !1065.
Only the DDS vulnerability item is not from this MR but from the rebase.
2023-10-01 23:02:12 +02:00
Jehan
5a5a94d9b7 plug-ins: port other Python plug-ins to new gimp_image_procedure_new().
SpyroGIMP will have to be ported to GimpProcedureDialog, or at least, it should
store its arguments. Currently they are resetted at each run.
2023-10-01 21:02:34 +02:00
Jehan
accf3b1e64 plug-ins: port histogram-export to new gimp_image_procedure_new() and…
… to GimpProcedureDialog.
2023-10-01 21:02:34 +02:00
Jehan
1d50c81130 libgimp, plug-ins, extensions: gimp_image_procedure_new2() renamed gimp_image_procedure_new(). 2023-10-01 21:02:34 +02:00
Alx Sa
5c8aa1f242 plug-ins: port lighting to gimp_image_procedure_new2()
...and to GimpProcedureDialog.
As with the last few, improvements could be made to the GUI, mneumonics,
and global variables used.
2023-10-01 21:02:34 +02:00
Alx Sa
5765240f6b plug-ins: port fractal-explorer to gimp_image_procedure_new2()
...and to GimpProcedureDialog.
Note that there are still some unnecessary global variables that could be refactored out.
2023-10-01 21:02:34 +02:00
Jehan
9a2d9991e5 plug-ins: get rid of hardcoded colors for built-in units.
Hardcoded colors don't work well with theme customization (on a dark theme in
particular, it was bad).

Anyway built-in units are already grayed-out and non-editable. I don't think
further styling is needed.
2023-10-01 21:02:34 +02:00
Jehan
0273c1031c app, libgimp, pdb: gimp_text_layer_new() now uses GimpFont.
This function is not perfect and in particular doesn't seem usable with binding
because of GimpUnit being some weird mix between an enum and some kind of class.

So this will have to be fixed too. See #8900.
2023-10-01 21:02:34 +02:00
Jehan
ea55b7a11a app, devel-docs, libgimp: updating gimp_text_layer_[gs]et_font() and new…
… function gimp_font_get_pango_font_description().

Also updating file-pdf-save which is the only plug-in using these right now.

Note that I am not fully happy with the new function
gimp_font_get_pango_font_description() because I experienced some weird behavior
in file-pdf-save which is that some fonts were wrong if this is called after
pango_cairo_font_map_set_resolution().
But let's say this is a first step looking for improvements.
2023-10-01 21:02:34 +02:00
Alx Sa
faae47a9a8 plug-ins: port map-object to gimp_image_procedure_new2()
...and to GimpProcedureDialog.
Also resolves #25 by adding the missing PDB parameters to the GUI.
Note that there are a few remaining tasks:
* The config values are being copied to mapvals. 
Eventually the rest of the code needs to be updated
to directly use the config.
* The material tab uses icons from the Lighting plug-in. They didn't show up before the port; this needs to be fixed.
* The drawable buttons are huge compared to the original plug-in. The styling needs to be looked at.
2023-10-01 21:02:34 +02:00
Alx Sa
640b0cffe0 plug-ins: port sample-colorize to gimp_image_procedure_new2()
..and to GimpProcedureDialog.
Note that the UI could be improved - happy to make changes based on
feedback!
2023-10-01 21:02:34 +02:00
Jehan
2f4d625059 app, libgimp, pdb: generate widgets for GIMP_PROC_ARG_LAYER|CHANNEL arguments.
I am using the same GimpDrawableChooser with an additional drawable_type
argument to only show the appropriate tab if we want to limit what can be
chosen.

None of our plug-ins actually use a GimpLayer or GimpChannel only arg so far,
but if we have some day, or if some third-party plug-ins want to have such arg,
now they quite easily can!
2023-10-01 21:02:34 +02:00
Jehan
4be1166982 app, libgimp: disable again cross-process transient setting.
After testing, setting a window as transient to another from another process is
still broken on Windows and it's hard to diagnose without using Windows
directly. Since it's not just broken, but it even hangs the whole process, which
is quite a blocker issue, let's disable again the whole code on Windows.
2023-10-01 21:02:34 +02:00
Alx Sa
7b29ac247a plug-ins: port compose to gimp_image_procedure_new2()
Converted to GimpProcedureDialog as well, and changed the
string argument for the combobox to GimpChoice.
Some widgets are still standalone and could be further improved
to work with GimpProcedureDialog.
2023-10-01 21:02:33 +02:00
Jehan
b7bff4ee9a libgimpconfig: a NULL GBytes is also a proper argument value.
Do not fail serialization when a GBytes argument is set to NULL by adding a
special case for this.
2023-10-01 21:02:33 +02:00
Alx Sa
e318651c99 plug-ins: port curve-bend to gimp_image_procedure_new2() and GimpProcedureDialog.
A new aux parameter for upper/lower border area was added so this could be generated
as part of the GUI.
I received warnings about serializing the FloatArray and GBytes parameters, so I did not integrate
the existing variables with GimpProcedureConfig in this current version.
2023-10-01 21:02:33 +02:00
Jehan
88c9d54709 plug-ins: port depth-merge to gimp_image_procedure_new2() and GimpProcedureDialog.
The only missing feature is that we don't constrain the various argument
drawables to RGB/grayscale or to the same dimension as the input drawable. This
could actually be quite easily implemented, either through a set of constraint
flags, or a more flexible callback function (similar to the API of
gimp_drawable_combo_box_new()). It could either be implemented on the argument
level (which has the advantage of letting libgimp handle argument sanity of
plug-in developers, even in non-interactive calls, with generic error messages)
or within the new GimpDrawableChooser API.

I was actually implementing this when I realized that this plug-in works fine
even with images of different dimensions. As for the format, GEGL handles format
conversion automatically. There is absolutely no reason to limit ourselves.

So let's drop this feature for now, because we should not over-engineer. If it
turns out useful and we get requests, we can always create later either a
specialized arg macro GIMP_PROC_ARG_CONSTRAINED_DRAWABLE() or a method to
specialize the widget with gimp_drawable_chooser_new_constrained() for
instance).
2023-10-01 21:02:33 +02:00
Jehan
1d16c1584f libgimp, pdb: (meson) fix building of libgimp/gimpenums.h inside the source tree.
This was not working properly and needed some external build script as well as
the stamp/bogus header trick like for other similar in-source generated code.

In the same time, I get rid of old meson code which was meant for when using
meson < 0.57.0 (since our requirement is now meson >= 0.59.0).
2023-10-01 21:02:33 +02:00
Jehan
a40357a165 libgimp: take into account case when gtk_settings_get_default() returns NULL.
I believe it should not happen in normal GUI case (which is when you create a
GimpProcedureDialog). I had the issue while moving around some plug-in code and
moved dialog creation before gimp_ui_init() by mistake. The issue was not
obvious until I followed the trace inside libgimp. This would be even more
frustrating for plug-in developers so let's have a clear warning message giving
the possible plug-in crash reason.
2023-10-01 21:02:33 +02:00
Jehan
36576c7276 libgimp: new GimpDrawableChooser widget, associated propwidget function and…
… generation of such a widget for drawable arguments in PDB procedures.
2023-10-01 21:02:33 +02:00
Jehan
236fd01a1c libgimpwidgets: new gimp_preview_area_reset() function.
The various drawing APIs are cumulative which is not right when we want to
change a preview (especially if the preview changes dimensions! Then we end up
with pieces of the previous drawing behind the new one).

This new function will allow to reset the whole drawing. Note that we may end up
with some black background if the preview are doesn't have the right dimensions.
This should be improved later too.
2023-10-01 21:02:33 +02:00
Jehan
63a97d3be6 app, libgimp, pdb: new PDB group gimpdrawableselect.
Similarly to the various GimpResource select PDB calls, this allows to call a
core dialog in order to choose a drawable which will be returned back to the
calling plug-in.

This new GimpPickableSelect dialog is a subclass of GimpPdbDialog and uses the
same GimpPickableChooser widget as GimpPickablePopup, except that since it's
inter-process window management, it is harder to make a popup positioned
accurately relatively to a parent (especially on Wayland). This is why it's a
separate widget as a simpler dialog (which we will still try to make transient
as much as possible across platforms).
2023-10-01 21:02:33 +02:00
Jehan
901f056878 app: improve GimpPickableButton and split GimpPickablePopup.
Improvements of GimpPickableButton:

- Update the selected pickable live as you choose it in the popup. This allows
  for instance to get live preview of GEGL operations while staying within the
  pickable popup.
- Store the initially selected pickable (before popping up) so that when one
  cancels (either with Esc key or by clicking outside the popup, but not on the
  parent button), the button comes back to the previous pickable.
- Properly destroy the popup when the parent widget is finalized to avoid
  annoying cases where the popup might still be alive.

Additionally I split the GimpPickablePopup with a GimpPickableChooser containing
most of the GUI, which will make it usable as plug-in pickable chooser as well!
2023-10-01 21:02:33 +02:00
Jehan
8059de502a app: clicking on the GimpPopup parent emits a "confirm" signal.
Clicking on the parent (typically a button, as in the GimpPickableButton case
used in GEGL operations' generated GUI) used to emit "cancel". Let's have it
emit "confirm" instead.
Also it makes for a "confirm" interaction through pointer action as there were
none until now (only key "confirm", e.g. Enter or Space keys), unless
implemented in a child class (e.g. GimpPickablePopup would emit "confirm" on
activate-item of the tree view widgets, e.g. when double-clicking an item; that
was not ideally discoverable).
2023-10-01 21:02:33 +02:00
Alx Sa
8be4592e38 plug-ins: Port gimpressionist to gimp_image_procedure_new2 ().
A few minor code style issues were also fixed.
Note that there's only one procedure parameter (Preset name), 
but it's not retained between runs.
I want to ask about this before making a full conversion to
GimpProcedureDialog widgets.
2023-10-01 21:02:33 +02:00
Alx Sa
7e25a6a1e4 plug-ins: port colormap-remap to gimp_image_procedure_new2()
Also fixing some formatting mistakes left in from the GAction port.
2023-10-01 21:02:33 +02:00
Jehan
62a3889617 libgimp: rename Gimp*SelectButton widgets to Gimp*Chooser.
This name was really irking me because it's not a button (anymore? Maybe it used
to be just a button). Depending on the specific widget, it will have several
sub-widgets, including a label. And it can theoretically even be something else
than a button.

So let's just rename these widgets with the more generic "chooser" name.
2023-10-01 21:02:33 +02:00
Jehan
55d6f6c26e libgimp: move GimpFont, GimpGradient and GimpPalette to their own file.
Even though we don't have specific additional functions right now, it's just
much more cleaner this way.
2023-10-01 21:02:33 +02:00
Jehan
457f52a6d1 app, libgimp, pdb: new gimp_pattern_get_buffer() and improved GimpPatternSelectButton.
Similar to the latest commits for GimpBrush:

- gimp_pattern_get_buffer() returns a GeglBuffer and allow getting a scaled
  version of the pattern.
- Old gimp_pattern_get_pixels() is made private.
- Moved GimpPattern into its own file and store the buffer to avoid re-querying
  it through PDB continuously.

No as for the widget to select a pattern:

- Preview frame ensured to be square.
- Default size increased.
- Drawing code using the new gimp_pattern_get_buffer().
- Cleaned up code.
2023-10-01 21:02:33 +02:00
Jehan
330d05e2fc libgimp: gimp_brush_get_buffer() returns a buffer with alpha.
So what I realized was that the core was sending contents without transparency.
Actually the mask was our transparency channel here. Since in most use cases,
what you want to do when you request a brush buffer is to be able to draw it
somewhere, having a buffer already with alpha is much better, even more because
by default, it looks like background color is black which is possibly not what
you expect usually from a brush preview.

If someone wants absolutely no-alpha, it's easy to get rid of the channel. It's
simply better that the default behavior is the most expected use case.
2023-10-01 21:02:33 +02:00
Jehan
0e6c06044c libgimp, plug-ins: massively improve GimpBrushSelectButton.
- Increase the default size to 40x40 and multiply it by the current window scale
  factor to have decent preview size.
- Make the brush preview always square with a GtkAspectFrame: even though
  brushes are not necessarily square, this is a much more obvious size rather
  than letting GTK choose a random allocation size which ends up very weird
  looking.
- Scale down the brush to the biggest possible dimensions which fit the square
  preview area (if the brush native size is already smaller, I don't scale up
  though) while keeping aspect ratio: previous implementation was really weird,
  as we were only seeing a tiny corner of much brushes as we weren't scaling
  them down. Obviously I use new gimp_brush_get_buffer|mask() functions for
  this as it supports scaling.
- Implement drawing color brushes too: the previous implementation was only
  drawing the brush mask, which was absolutely not what would be expected for
  such brushes.
- Add a white background behind color brushes with transparency.
- Simplify and clean up the code.

One of the consequences of this new implementation is obviously that it's
mandatory to call gegl_init() when using this widget.
2023-10-01 21:02:33 +02:00
Jehan
1ff9c12b1e libgimp, pdb: replacing gimp_brush_get_pixels() by gimp_brush_get_buffer()…
… and gimp_brush_get_mask().

gimp_brush_get_pixels() was a bit crappy, returning raw data with only
dimensions and bpp to go with (no color model/space, no bit depth…). So the
assumption is that we work with 8-bit per channel data, possibly with alpha
depending of number of channels as deduced from bpp, and very likely in sRGB
color space. It might be globally ok with many of the brush formats (and
historical brushes) but won't fare well as we improve brush capabilities.

- gimp_brush_get_pixels() is in fact made private.
- The 2 new functions are using this old PDB call _gimp_brush_get_pixels() to
  construct buffers. This has some limitations, in particular that it returns
  only 8-bit per channel sRGB data, but at least the signature won't change when
  we will improve things in the future (so if some day, we pass fancy brushes in
  high-bit depth, the method will stay the same).
- This new implementation also allows scaling down the brush (keeping aspect
  ratio) which is useful when you need to fit a brush preview into a drawing
  widget.
- Current implementation stores the buffers at native size in the libgimp's
  GimpBrush object, hence save re-querying the core every time you need an
  update. This can be improved as current implementation also means that you
  don't get updates if the brush changed. This should handle most common use
  cases for now, though.
- Also with this change, I move GimpBrush class implementation into its own
  dedicated file.
2023-10-01 21:02:33 +02:00
Jehan
ead5d01d27 libgimp*, plug-ins: reorganize the resource property choosers.
- Move the property widget functions for GimpResource properties into a new
  libgimp/gimppropwidgets.[ch] file. This mirrors the files
  libgimpwidgets/gimppropwidgets.[ch] which are for more generic property types.
- Rename the functions gimp_prop_chooser_*_new() to gimp_prop_*_chooser_new().
- gimp_prop_chooser_factory() doesn't need to be public.
- Add a label to GimpResourceSelectButton, make so that the
  gimp_prop_chooser_*_new() functions set the property nick to this label and
  add this label to the size group in GimpProcedureDialog.
2023-10-01 21:02:33 +02:00
Jehan
538cdea996 libgimp: make GimpResourceSelectButton abstract.
Rather than *saying* it is abstract, make it really so with
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE().
2023-10-01 21:02:33 +02:00
Jehan
66a05c885a app: fix a complicated race condition when callback from GimpPdbDialog and…
… from the plug-in normal runtime crossed streams!

I also add a huge comment in-code, because this was annoying enough to
understand and debug that I don't want someone to remove the idle without proper
consideration and testing in the future, thinking it's useless.
2023-10-01 21:02:33 +02:00
Jehan
d84c4d763b app, libgimp, pdb: all gimp_*_popup() PDB calls now take a resource object as…
… argument (not a resource name).
2023-10-01 21:02:33 +02:00
Jehan
b578fd8cf1 app, libgimp, plug-ins: a lot of cleanup in GimpResourceSelect* code.
- Removing useless or redundant code.
- Simplifying various logics.
- Using GimpResource directly in temporary PDB procedures, not resource names.
- Better cleanup of the core resource chooser when the plug-in dialog quits (we
  need it to ask core to close also any visible resource chooser dialog).
- Replace the "Close" button by more common OK/Cancel. In particular, the
  GimpPdbDialog now properly keeps track of the initial object and when hitting
  "Cancel" (or Escape key), this initial object is set back.
- Clean up some of the comments, especially when the code is self explanatory.

There is still much more to clean and improve, but it's a first welcome step.
2023-10-01 21:02:33 +02:00
Jehan
19a005ad0f libgimp: properly free resources from the config.
Found by the definitely useful libgimp warnings:

> gimp_plug_in_destroy_proxies: ERROR: GimpPattern proxy with ID 13 was refed by plug-in, it MUST NOT do that!
2023-10-01 21:02:33 +02:00
Jehan
6601e861c4 libgimp*: support having procedure arguments of generic type GimpResource. 2023-10-01 21:02:33 +02:00
Jehan
f759c1e3d9 app, libgimp, pdb: use objects in various gimp_*_set_popup() functions. 2023-10-01 21:02:33 +02:00
Jehan
c5bfe07deb app: default to the system defaults for header bar in GimpPdbDialog creation. 2023-10-01 21:02:33 +02:00
Alx Sa
192bd42510 plug-ins: Removing "args" reference from file-jp2-load
One instance of `(GIMP_VALUES_GET_INT (args, 0)` was missed during the initial conversion.
This caused a compiler error. The value is now retrieved from the GimpProcedureConfig 
object.
2023-10-01 21:02:33 +02:00
Jehan
6aeb456e17 app, libgimp, pdb: add a parent_window parameter to gimp_*_popup() PDB calls.
Brush, font, gradient, palette and pattern choices are currently chosen through
a dialog created by the core, which then returns the user choice to the calling
plug-in. This has the unfortunate consequence of having a pile of likely at
least 3 windows (main GIMP window by core process, plug-in window by plug-in
process, then the choice popup by the core process) shared in 2 processes, which
often end up under each other and that's messy. Even more as the choice popup is
kinda expected to be like a sub-part of the plug-in dialog.

So anyway, now the plug-in can send its window handle to the core so that the
resource choice dialog ends up always above the plug-in dialog.

Of course, it will always work only on platforms where we have working
inter-process transient support.
2023-10-01 21:02:33 +02:00
Jehan
d6a2deb305 libgimpwidgets: new function gimp_dialog_get_native_handle(). 2023-10-01 21:02:33 +02:00
Jehan
9a57ab54e9 app, libgimp*: window handle on Windows have the type HANDLE.
Instead of passing a guint32, pass the proper type, since our the HANDLE type
can be 64-bit on Windows (according to links I found).
I was hoping it might be the reason for the breakage under Windows, though I
also found Microsoft documentation saying that the 64-bit handle can be safely
truncated: https://learn.microsoft.com/en-us/windows/win32/winprog64/interprocess-communication?redirectedfrom=MSDN

Nevertheless I'd appreciate testing again from NikcDC or anyone else, as I
reactivated setting transient between processes on Windows.

Note that I also pass the proper types on X11 now (Window), even though guint32
worked fine. Better be thorough.
2023-10-01 21:02:33 +02:00
Jehan
73e6d4b76c plug-ins: make parent window identifier for Wayland in Freedesktop portal.
The format for this "common convention" argument is explained here:
https://flatpak.github.io/xdg-desktop-portal/#parent_window
2023-10-01 21:02:33 +02:00
Jehan
58b3b14082 app, libgimp*, pdb, plug-ins: reimplement generic inter-process transient window.
Having windows ID as guint32 is a mistake. Different systems have
different protocols. In Wayland in particular, Windows handles are
exchanged as strings. What this commit does is the following:

In core:

- get_window_id() virtual function in core GimpProgress is changed to
  return a GBytes, as a generic "data" to represent a window differently
  on different systems.
- All implementations of get_window_id() in various classes implementing
  this interface are updated accordingly:
  * GimpSubProgress
  * GimpDisplay returns the handle of its shell.
  * GimpDisplayShell now creates its window handle at construction with
    libgimpwidget's gimp_widget_set_native_handle() and simply return
    this handle every time it's requested.
  * GimpFileDialog also creates its window handle at construction with
    gimp_widget_set_native_handle().
- gimp_window_set_transient_for() in core is changed to take a
  GimpProgress as argument (instead of a guint32 ID), requests and
  process the ID itself, according to the running platform. In
  particular, the following were improved:
  * Unlike old code, it will work even if the window is not visible yet.
    In such a case, the function simply adds a signal handler to set
    transient at mapping. It makes it easier to use it at construction
    in a reliable way.
  * It now works for Wayland too, additionally to X11.
- GimpPdbProgress now exchanges a GBytes too with the command
  GIMP_PROGRESS_COMMAND_GET_WINDOW.
- display_get_window_id() in gimp-gui.h also returns a GBytes now.

PDB/libgimp:

- gimp_display_get_window_handle() and gimp_progress_get_window_handle()
  now return a GBytes to represent a window handle in an opaque way
  (depending on the running platform).

In libgimp:

- GimpProgress's get_window() virtual function changed to return a
  GBytes and renamed get_window_handle().
- In particular GimpProgressBar is the only implementation of
  get_window_handle(). It creates its handle at object construction with
  libgimpwidget's gimp_widget_set_native_handle() and the virtual
  method's implementation simply returns the GBytes.

In libgimpUi:

- gimp_ui_get_display_window() and gimp_ui_get_progress_window() were
  removed. We should not assume anymore that it is possible to create a
  GdkWindow to be used. For instance this is not possible with Wayland
  which has its own way to set a window transient with a string handle.
- gimp_window_set_transient_for_display() and
  gimp_window_set_transient() now use an internal implementation similar
  to core gimp_window_set_transient_for(), with the same improvements
  (works even at construction when the window is not visible yet + works
  for Wayland too).

In libgimpwidgets:

- New gimp_widget_set_native_handle() is a helper function used both in
  core and libgimp* libraries for widgets which we want to be usable as
  possible parents. It takes care of getting the relevant window handle
  (depending on the running platform) and stores it in a given pointer,
  either immediately or after a callback once the widget is mapped. So
  it can be used at construction. Also it sets a handle for X11 or
  Wayland.

In plug-ins:

- Screenshot uses the new gimp_progress_get_window_handle() directly now
  in its X11 code path and creates out of it a GdkWindows itself with
  gdk_x11_window_foreign_new_for_display().

Our inter-process transient implementation only worked for X11, and with
this commit, it works for Wayland too.

There is code for Windows but it is currently disabled as it apparently
hangs (there is a comment in-code which links to this old report:
https://bugzilla.gnome.org/show_bug.cgi?id=359538). NikcDC tested
yesterday with re-enabling the code and said they experienced a freeze.
;-(

Finally there is no infrastructure yet to make this work on macOS and
apparently there is no implementation of window handle in GDK for macOS
that I could find. I'm not sure if macOS doesn't have this concept of
setting transient on another processus's window or GDK is simply lacking
the implementation.
2023-10-01 21:02:33 +02:00
Alx Sa
bf210243f2 plug-ins: Port selection-to-path.c to gimp_image_procedure_new2()...
...and to GimpProcedureDialog.
selection-to-path-dialog.c was also removed as the code can now be contained
within selection-to-path.c thanks to the new API.
2023-10-01 21:02:33 +02:00
Jehan
dd1c12a0e1 plug-ins: port script-fu-script.c to gimp_image_procedure_new2(). 2023-10-01 21:02:33 +02:00
Jehan
7f34fb14f7 plug-ins: port pagecurl to gimp_image_procedure_new2() and GimpProcedureDialog.
I'm also changing various arguments to GimpChoice and making "opacity" into an
argument.
2023-10-01 21:02:33 +02:00
Jehan
77a30bfd28 app, libgimp: core loads thumbnail from metadata if no GimpThumbnailProcedure…
… is set.

The order for thumbnail creation in gimp_imagefile_create_thumbnail() is now:

1. If there is a GimpThumbnailProcedure, it is run first.
2. Otherwise we check if a thumbnail is in the metadata.
3. As last resort, we just load the full image.

Part of the fix was to copy gimp_image_metadata_load_thumbnail() into the core
code. I have been wondering if we could not drop the same function from libgimp
and remove the GimpThumbnailProcedure frome file-jpeg, since it just uses the
metadata thumbnail and it is the only plug-in using this code.
Also it is much faster to run this in core and it's generic function which makes
thumbnail loading from Exif data working for every format supported by Exiv2.

On the other hand, the file-jpeg thumbnail procedure also gathers a few more
useful information, such as the color model (in a reliably manner, since based
on JPEG header, unlike from metadata which may be wrong).
2023-10-01 21:02:33 +02:00
Jehan
742bdb4ebe app: fix handling of GimpThumbnailProcedure return values.
There were a bug in some array size check and the image type is an enum, not
simply an int.
2023-10-01 21:02:33 +02:00
Jehan
fa67a6ce0e libgimp, plug-ins: properly document the return values of GimpThumbnailProcedure.
The various information (width, height, image type and number of layers) are
those of the full image, not of the thumbnail. Make it clear in the docs of
GimpRunThumbnailFunc.

Additionally:

- file-xmc was returning the proper information but variables were wrongly
  named, which was confusing.
- Fix file-ico thumbnail proc which was returning the thumbnail width/height.
- In file-darktable, initialize width/height to 0 so that we just don't show any
  size when we don't get the information. It's better not to show anything than
  completely wrong information (the thumbnail target size).
2023-10-01 21:02:33 +02:00
Jehan
9124f9c627 plug-ins: fix algorithm for choosing the best thumbnail of ICNS image.
We were choosing the bigger icon in the ICNS list. Instead let's choose the
bigger icon within the target size bounding box. In case there is no smaller (or
equal size) icon, we falls back to the smallest bigger icon.

Also make sure we set width and height to the full image size, as this is used
as information on the full image (not the thumbnail).
2023-10-01 21:02:32 +02:00
Jehan
93ad26e6bc plug-ins: load SVG image at proper size.
SVG is a vector format which is easy to render exactly within the size×size
bounding box. Let's make sure we do so.
This makes for much sharper SVG thumbnails (and also possibly faster thumbnail
render).
2023-10-01 21:02:32 +02:00
Jehan
ed98b990c5 plug-ins, libgimp: GimpRunThumbnailFunc now uses a GimpProcedureConfig rather…
… than a GimpValueArray.

Similar to other GimpProcedure, move to using a config object. A difference is
that thumbnail procedures are always run non-interactively.

Also fixing WMF load thumbnail procedure: the dimension computation was wrong
when the image was wider than tall.
2023-10-01 21:02:32 +02:00
Jehan
601437addd plug-ins: file-openraster also moved to new gimp_load_procedure_new().
Additionally getting rid of a call to gimp_image_set_file() since we clarified
its docs as not being used for non-XCF files.
2023-10-01 21:02:32 +02:00
Jehan
9e2a7e8759 libgimp, plug-ins: rename gimp_load_procedure_new2() as gimp_load_procedure_new().
All C load procedures are now moved to the new API.
2023-10-01 21:02:32 +02:00
Jehan
136aca3c34 plug-ins: port all remaining C load procedures to gimp_load_procedure_new2(). 2023-10-01 21:02:29 +02:00
Jehan
d5607454b3 plug-ins: port file-cel to gimp_load_procedure_new2() and GimpProcedureDialog.
Also the palette argument is now a proper GFile argument (not a string).

There is also a palette argument for the export procedure, but it's currently
unused. A palette storing function will need to be implemented.

Some bit of additional logic cleanup was done.
2023-10-01 20:52:02 +02:00
Jehan
c256f63d63 plug-ins: port file-png to gimp_load_procedure_new2(). 2023-10-01 20:52:02 +02:00
Jehan
885bae59ba plug-ins: port file-pdf-load to gimp_load_procedure_new2().
I also did a bit of code cleanup in the main run() load code.
2023-10-01 20:52:02 +02:00
Jehan
2416b40c26 plug-ins: port file-svg to gimp_load_procedure_new2 and GimpProcedureDialog.
Again, I am losing a tiny bit of UI, in particular the ratio fields, but also
the update of the size label (this was kinda broken anyway, as it updated only
when updating some fields, not others).

Also moving the default resolution to 300 PPI.

Last but not least, I transformed the "paths" int argument to a GimpChoice
argument.
2023-10-01 20:52:02 +02:00
Jehan
7a0fd77b95 plug-ins: port file-wmf to gimp_load_procedure_new2 and GimpProcedureDialog.
The new dialog is not fully on-par with the old one. We lost the X and Y ratio
fields as well as the ability to constrain dimensions to each other. This should
be improved when we'll get proper automatically generated widgets for dimension
arguments.
2023-10-01 20:52:02 +02:00
Jehan
4a3fd7423a plug-ins: port various plug-ins to gimp_load_procedure_new2(). 2023-10-01 20:52:02 +02:00
Jehan
af644b1950 libgimp, libgimpbase: new gimp_load_procedure_new2() for run() function using…
… a GimpProcedureConfig for arguments.

This also factorizes the code to load metadata. By default, a GimpLoadProcedure
will try and load metadata from a file (if Exiv2 knows the format). The run()
function will be allowed to edit the GimpMetadata object but also the load flags
before it is actually attached to the image, allowing plug-ins to have custom
metadata handling code when needed.
2023-10-01 20:52:02 +02:00
Jehan
2d33f1fb39 plug-ins: "compression" arg of file-tiff-save now becomes a GimpParamChoice. 2023-10-01 20:52:02 +02:00
Jehan
d670ff9f82 libgimpbase, libgimpwidgets: add a concept of insensitive choices in GimpChoice.
This is used in the generated GUIs for GimpChoice arguments, but also for
validation of property setting.

New functions:

* gimp_choice_set_sensitive()
* gimp_string_combo_box_set_sensitivity()
2023-10-01 20:52:02 +02:00
Jehan
cedc45d8f3 plug-ins: change "format" aux argument to a GimpChoice. 2023-10-01 20:52:02 +02:00
Jehan
555c428b70 libgimp: new utility method gimp_procedure_config_get_choice_id().
This is just a method to simplify transforming a GimpChoice argument into an
enum value, which is easier to deal with, in C. It also allows to benefit from
switch() warnings or the like to make sure no cases are missing.
2023-10-01 20:52:02 +02:00
Jehan
9a0cfa67bf libgimp: generate a list of possible choices for a GimpChoice argument.
Developers won't have to maintain manually a list of the possible values in the
help string. It can now be generated from the GimpChoice and will be therefore
ensured to always be up-to-date, and nicely formatted.

I also add some pango markup to the type helper texts to differentiate it from
the main argument docs.
2023-10-01 20:52:02 +02:00
Jehan
4163a29af3 app, libgimp: new GimpChoice procedure argument.
These will replace the int arguments used in place of enums. The problem of int
arguments used as list of choices is that it makes calling PDB functions very
opaque. This is especially bad when a list is long, so you constantly have to
refer to the documentation to understand what a series of numbers mean in
argument lists.

And the second issue is that plug-in developers have to manually maintain a list
of values both in the GUI and in the documentation string. This help text may
get out-of-sync, may end up with missing values or whatnot. Also if it is used
as tooltips, it makes for very weird tooltips in the graphical interface, with
an overlong technical list of int-values mapping which should ideally only be
made visible in the PDB procedure browser listing.
2023-10-01 20:52:02 +02:00
Jehan
20923260cf libgimpwidgets: new GimpLabelStringWidget and update GimpStringComboBox.
- GimpLabelStringWidget widget makes any widget with a "value" string property
  into a GimpLabeled.
- Add a "value" string property to GimpStringComboBox (which makes it usable by
  GimpLabelStringWidget).
2023-10-01 20:52:02 +02:00
Jehan
7e6b01a4e5 libgimpbase: new GimpChoice class meant to represent a list of allowed values.
This will be used for creating limited lists of strings as argument types for
procedures.
Ideally enums are the best type for this, but it can only be used for generic
libgimp* enum types, not custom enums created only for a given plug-in. For
this, we currently just demote the args to ints which lose any semantic. A
limited list of string will give back some semantic and some better validation,
even though it's a tiny bit more annoying to work with strings than int types
(at least in C).
2023-10-01 20:52:02 +02:00
Jehan
29ce8f234f libgimp*: removing now useless Makefile.gi files.
These were include files for the autotools build and are now unused.
2023-10-01 20:52:02 +02:00
Jehan
1dc5635d32 libgimp: support all subtypes of GFile.
In particular if a GFile is created with g_file_new_for_path(), it will be a
GLocalFile. We need this to be supported too.
2023-10-01 20:52:02 +02:00
Alx Sa
3c53d5f38e plug-ins: port cml-explorer to gimp_image_procedure_new2()
Also fixes some spelling issues and removes a warning about an
uninitialized variable.
Currently the only argument is for non-interactive mode, so
the dialogue isn't ported to GimpProcedureDialog yet.
2023-10-01 20:52:02 +02:00
Alx Sa
22cb6b3bb6 plug-ins: port goat-exercise to gimp_image_procedure_new2()
Not yet porting to GimpProcedureDialog because there's no settings to import/export,
so it would add several unnecessary buttons.
2023-10-01 20:52:02 +02:00
Alx Sa
6dc21425c0 plug-ins: port smooth-palette to gimp_image_procedure_new2()
The dialog itself is ported to GimpProcedureDialog. However, the
width and height require another API that allows for size entries with
multiple fields before it can be considered finished.
2023-10-01 20:52:02 +02:00
Jehan
37a867d85a plug-ins: port file-farbfeld to new gimp_save_procedure_new().
This was not forgotten, simply this is a new plug-in which got into the tree
after a rebase. ;-)
2023-10-01 20:52:02 +02:00
Jehan
cd5d221cfa libgimpconfig: add (de)serialization support of GBytes arguments.
Basically the same as GimpParasite, except that we don't same a parasite name
and flags.
2023-10-01 20:52:02 +02:00
Jehan
69edf13e2c plug-ins: fix the GimpSaveProcedure plug-ins in Python.
As usual, these got forgotten!

Also colorxhtml is actually deeply broken by commit 89c359ce47 which removed
gimp_drawable_get_pixel() (Niels thought it was not used, whereas it was simply
harder to spot with bindings!).
This will have to be fixed eventually.
2023-10-01 20:52:02 +02:00
Jehan
fcc810d7d3 libgimp, plug-ins: rename to gimp_save_procedure_new().
Also the mimetype is already set by gimp_file_procedure_set_mime_types() so
transform the mimetype argument into an export_metadata argument.
2023-10-01 20:52:02 +02:00
Jehan
06bd1f1289 plug-ins: port file-gih to GimpSaveProcedureDialog.
I was hoping to redesign further but the whole logic of animated brush creation
is made so complicated that I think it would require a whole more complex GUI
with visual hints. So anyway I stopped at basic redesign and port to the new
dialog generation code.
It still makes the code much simpler and a bit more powerful (also less bugs
hopefully). I have also reviewed the procedure arguments, removing redundant
ones (display-cols and display-rows are just computed from cell-width and
cell-height) and adding some aux arguments instead to simplify dynamic GUI code.
2023-10-01 20:52:02 +02:00
Jehan
272bc69540 libgimpwidgets: improve gimp_label_spin_set_increments().
The assert tests were not taking well into account the case where upper == lower
or where it's an integer spin which is just separated by 1 (both cases seem
silly, but it makes sense in the case of generic — or even dynamic! — spin
widgets where we want to adjust the min and max, e.g. depending on the property
of the image, or on other settings.
2023-10-01 20:52:02 +02:00
Jehan
92e77a4541 libgimp: add ability to sync a label to a string property of a procedure.
Now gimp_procedure_dialog_get_label() can work both with an existing property ID
or a new property ID. In the former case, it will simply sync the label with the
procedure argument, which will make it easy to update the label contents. In the
latter case, it just initialize with the provided text.
2023-10-01 20:52:02 +02:00
Jehan
689e3da5b9 plug-ins: port the last GimpSaveProcedure to gimp_save_procedure_new2().
It's the basic stupid port, though this dialog is so bad that I think I'm going
for a second stage with a basic redesign of this GUI while also moving to
GimpSaveProcedureDialog. To be continued.
2023-10-01 20:52:02 +02:00
Jehan
9ed8f00e5b plug-ins: port most plug-ins to gimp_save_procedure_new2(). 2023-10-01 20:52:02 +02:00
Jehan
51b14a7978 libgimp: fix object memory management in GimpPlugIn.
The expectation of 2 references per object in gimp_plug_in_destroy_proxies() was
wrong. It is true during most of the plug-in life, because both the
GimpProcedure and the GimpPlugIn have a hash-table keeping their own reference
to it, except that in gimp_plug_in_pop_procedure(), we release the reference
owned by the procedure with _gimp_procedure_destroy_proxies() first. So at this
point of the object life, its reference count is supposed to be 1.

The source of the bug was in fact in _gimp_plug_in_get_*() (where * can be
display, image, item or resource) which was behaving differently the first time
it is called for an object with the successive calls. In the first call only, it
was creating then refing into the table (so the object started directly with 2
references) whereas on successive calls, it just returned the hashtable-looked
up reference. In other words, it behaved as a (transfer full) on the first call
and (transfer none) on successive calls. And so did all public API which were
making use of this infrastructure (in particular gimp_*_get_by_id() functions).
2023-10-01 20:52:01 +02:00
Jehan
44e2bab9ad plug-ins: remove "num-images" argument and improve error feedback.
The arg "num-images" is clearly redundant as the "images" array already has this
information. Moreover it is bug-prone, for instance running 'Repeat "Filmstrip"'
would crash the plug-in which was defaulting to NULL "images" and 1 "num-images"
(without any GimpItem serialization ability yet).
Of course, we could just fix this, but better remove the redundant arg and all
possibilities of future similar bugs.

Also I now display a proper error message when running without input images
which says: "\"Filmstrip\" cannot be run without any input images"
2023-10-01 20:52:01 +02:00
Jehan
df6ccf390f plug-ins: fix possibly unreffing a NULL pointer. 2023-10-01 20:52:01 +02:00
Jehan
48f0ac3ad5 libgimp: release leaked reference to resource object.
The widget_creator_func() given to gimp_prop_chooser_factory() will create an
object which will take its own reference. We must release the one we got with
g_object_get().
2023-10-01 20:52:01 +02:00
Jehan
dac29b17a8 libgimp: some memory leak fixed. 2023-10-01 20:52:01 +02:00
Jehan
14bcaa717b plug-ins: a bunch of more plug-ins ported to gimp_save_procedure_new2(). 2023-10-01 20:52:01 +02:00
Jehan
b23519a401 plug-ins: port to gimp_save_procedure_new2() all export procedures…
… which were using gimp_procedure_config_begin_export().
2023-10-01 20:52:01 +02:00
Jehan
da7e8f3388 libgimp: new gimp_save_procedure_new2() meant to replace gimp_save_procedure_new().
Metadata handling is also integrated in this API:

* while giving a possibility to disable metadata saving if you want to do it
  yourself (e.g. in file-heif), by setting a NULL MimeType;
* and the GimpMetadata object is added as run() argument, allowing one to edit
  the metadata during the run, while still letting the infrastucture handle the
  save (e.g. in file-jpeg);
* or to save intermediate metadata with gimp_procedure_config_save_metadata()
  (e.g. in file-tiff).
2023-10-01 20:52:01 +02:00
Jehan
602345143f libgimp: more removal of over-refing. 2023-10-01 20:52:01 +02:00
Jehan
f37c3c42c7 libgimp: simplify GimpFileProcedure public API with G_DECLARE_DERIVABLE_TYPE().
While we definitely should not use this inside app/, because having the private
structure easily accessible as a member is very convenient, it is clear that it
makes for a much nicer public signature. Also the priv member is of no help to
third-party developers using this API to make plug-ins and is better hidden in
such a case.
2023-10-01 20:52:01 +02:00
Alx Sa
e79de5db86 plug-ins: port small-tile to gimp_image_procedure_new2()
The dialog itself is ported to GimpProcedureDialog, but the original 
plug-in only had one config parameter (Number of Tiles).
Some of the other options might make sense as config parameters 
such as the horizontal/vertical toggles and opacity.
2023-10-01 20:52:01 +02:00
Jehan
3c1ecd53ff plug-ins: port film to GimpProcedureDialog.
I needed a few more GimpProcedureDialog widgets, which I now have. The only part
still not generated in this plug-in is the image selection. This is hundreds of
lines less!

It now has arguments for every usable setting (except "keep-height" which is an
aux arg because it is simulated with a 0 "film-height" in non-interactive mode).

Also the film-height/keep-height default in interactive mode is now much better.
I override the film-height default and set it to be the image's height. This
makes for a much better default at all time.

The "Reset" button in Advanced section is not useful anymore since we now have
the generic "Reset" (to Initial/Factory) of GimpProcedureDialog, though it
actually doesn't work right for the time being, as it fails serializing
GimpFont.
2023-10-01 20:52:01 +02:00
Jehan
5cc1c898d7 libgimp, plug-ins: enhance gimp_procedure_dialog_get_label() with markup and…
… mnemonic abilities.
2023-10-01 20:52:01 +02:00
Jehan
2f1c569249 libgimp: new gimp_procedure_dialog_fill_paned() function. 2023-10-01 20:52:01 +02:00
Jehan
334febdebb libgimp: new gimp_procedure_dialog_fill_notebook*() functions. 2023-10-01 20:52:01 +02:00
Jehan
fc9a720b31 libgimp: some debug printing for plug-in developers.
This will be useful for plug-in developers but also for us. Seeing we leak the
config object is often a good indication that something is wrong in our handling
of internal references (since everything relies on the config object in plug-ins
now, in particular all the GUI).
2023-10-01 20:52:01 +02:00
Jehan
e6e3545959 libgimp: all the over-reffing was wrong.
I was clearly confused when I wrote this. The sinking part matters to take
ownership of a reference in the widgets table, but we don't need to ref widgets
again before inserting them in containers. We were leaking widgets and as a
consequence the config object (and as a second consequence, some objects such as
resources for resource-selection widgets).
2023-10-01 20:52:01 +02:00
Jehan
99d4c504d0 plug-ins: port film to gimp_image_procedure_new2().
The dialog is not ported to GimpProcedureDialog yet. It will be worth doing it
as a second step.
2023-10-01 20:52:01 +02:00
Jehan
f5183cbd7b plug-ins: port warp to gimp_image_procedure_new2().
It would be worth porting when GimpDrawableComboBox widgets can be used as
GimpProcedureDialog generated widgets. Or even better, if the GimpPickableButton
were ported to libgimp to be used by plug-ins (since it's actually a lot more
usable).
2023-10-01 20:52:01 +02:00
Jehan
2f91e45b4f plug-ins: port easy plug-ins to gimp_image_procedure_new2().
These were the plug-ins already using gimp_procedure_config_*() API.
2023-10-01 20:52:01 +02:00
Jehan
2a21d45ada plug-ins: port grid to gimp_image_procedure_new2().
I didn't port to GimpProcedureDialog because we'd need first a GimpSizeEntry
generatable widget, which can map to several properties (here for instance 3
width properties).
2023-10-01 20:52:01 +02:00
Jehan
3c658789a6 plug-ins: now port to gimp_image_procedure_new2() all plug-ins without args. 2023-10-01 20:52:01 +02:00
Jehan
4f14f620c4 plug-ins: port to gimp_image_procedure_new2() all plug-ins which were already…
… working with a GimpProcedureConfig.

These are the easiest ones to port as most of the work was already done (mostly
just some now useless calls to remove).
2023-10-01 20:52:01 +02:00
Jehan
96b3302e65 plug-ins: port gradient-flare to gimp_image_procedure_new2() and GimpProcedureDialog.
The port to GimpProcedureDialog is partial as there are still quite a few pieces
which can be improved. But it's a good start.
2023-10-01 20:52:01 +02:00
Jehan
7da0db9e88 plug-ins: port tile to gimp_image_procedure_new2() and GimpProcedureDialog. 2023-10-01 20:52:01 +02:00
Jehan
8c8c64a9ee libgimp: temporary gimp_image_procedure_new2() until port is over.
Same as with gimp_procedure_new2(), I will end up renaming the function to
gimp_image_procedure_new() once all usage of this function will have been ported
to the new function using GimpProcedureConfig instead of GimpValueArray
arguments.
2023-10-01 20:52:01 +02:00
Jehan
3806b46fc5 plug-ins: forgotten Python plug-ins had to be ported to new Gimp.Procedure.new().
There was also one case of port to updated GimpResource API to get the name of a
palette.
2023-10-01 20:52:01 +02:00
Jehan
2b38a2df86 libgimp, plug-ins: rename gimp_procedure_new2() as gimp_procedure_new() and…
… remove the latter.

Now all GimpProcedure use this new implementation with use a config object.
2023-10-01 20:52:01 +02:00
Jehan
f6f622b93d libgimp: port 2 usages of gimp_procedure_new() to gimp_procedure_new2().
The one in GimpResourceSelect is a very nice example of why using config objects
is much nicer, getting arguments by their name instead of an index (which in
this case had to be tracked down by a private function to handle different
cases).
2023-10-01 20:52:01 +02:00
Jehan
a2acf24ecb libgimp, plug-ins: Script-fu scripts now use gimp_procedure_new2() too.
Also in gimp_procedure_config_begin_run(), make sure we sync the arguments with
the config object first thing, even in interactive and with-last-vals case
(where the args may be further overridden). This was especially important for
Script-fu scripts as the image and drawable were not provided separately, so we
need to make sure that the config file has the right values.
2023-10-01 20:52:01 +02:00
Jehan
5d3112a2f1 plug-ins, libgimp: move GimpBatchProcedure's run function to use config objects.
Also port more script-fu procedures to gimp_procedure_new2(), which were sharing
some code with the script-fu batch procedure.
2023-10-01 20:52:01 +02:00
Jehan
af00b66914 plug-ins: port the easy script-fu procedures to gimp_procedure_new2(). 2023-10-01 20:52:01 +02:00
Jehan
38ecbfc762 plug-ins: more plug-ins ported to gimp_procedure_new2(). 2023-10-01 20:52:01 +02:00
Jehan
c09711beaa libgimp: the default run (if no run-mode parameter) should be non-interactive.
Otherwise we will always try to reuse previous values or use the default,
bypassing the actual passed values.

I encountered this issue while porting file-glob and realizing that the
"pattern" argument was always passed to NULL, ignoring the explicitly set
pattern.

When a procedure has no run-mode argument, we should simply not assume anything
and use the passed arguments (which is what the non-interactive mode does).
2023-10-01 20:52:01 +02:00
Jehan
9b2240f51e plug-ins: port web-page to GimpProcedureDialog and gimp_procedure_new2().
Again a lot less lines for more functionalities (e.g. now it should work fine in
WITH_LAST_VALS mode).
2023-10-01 20:52:01 +02:00
Jehan
e92ef9d45a plug-ins: port several of the easy plug-ins to gimp_procedure_new2(). 2023-10-01 20:52:01 +02:00
Jehan
f6da799c11 plug-ins: port screenshot to GimpProcedureDialog and gimp_procedure_new2().
A lot less lines for the same functionalities!
This includes improvements too:

* "include-pointer" as new PDB argument;
* settings storage thanks to GimpProcedureDialog;
* it should hopefully work better in non-interactive (though it's untested).

The macOS and Windows screenshots are untested after this change, though they
should still work the same. Please report if there is any problem!
2023-10-01 20:52:01 +02:00
Jehan
60aeff5623 libgimp: new gimp_procedure_dialog_set_ok_label() function.
This allows to set a custom label for the OK button.
2023-10-01 20:52:01 +02:00
Jehan
59edcde06f libgimp: new function gimp_procedure_dialog_set_sensitive_if_in().
This function allows to change the sensitivity of a widget depending on the
value of another property.
We already had gimp_procedure_dialog_set_sensitive() except it was only syncing
with a boolean property, whereas the new function can compare with any property
type.
2023-10-01 20:52:01 +02:00
Jehan
edab39a868 libgimp: fix the sometimes wrong run-mode value in the config object. 2023-10-01 20:52:01 +02:00
Jehan
982764421f app: fixes the call to "plug-in-busy-dialog".
Fixes the following CRITICAL:

> g_value_set_int: assertion 'G_VALUE_HOLDS_INT (value)' failed
2023-10-01 20:52:01 +02:00
Jehan
7ab87d2b15 Issue #50: new gimp_procedure_new2() which automatically stores procedure config.
This new function is meant to replace gimp_procedure_new() when all plug-in
usage will have been switched.

This function creates the GimpProcedureConfig object on behalf of the plug-in
and calls gimp_procedure_config_begin_run() and gimp_procedure_config_end_run().
This way we ensure that all plug-in calls with successful result are properly
stored without asking the developer not to forget to call these (if a "good
practice" is in fact something we request to do every time, especially for good
user experience, we might as well make it rather a core process).

Advantages:

* Better interactive experience: using any plug-in will result in saved
  previously used settings.
* for developers, working on config objects is also much more comfortable than
  working on GValueArray;
* step forward for the future macro infrastructure: if we can ensure that all
  plug-in calls are properly logged, then we can replay plug-in actions, in
  NON_INTERACTIVE with the same settings.
2023-10-01 20:52:00 +02:00
Sabri Ünal
2003d26105 Update Turkish translation 2023-10-01 18:26:09 +00:00
Sabri Ünal
59fb6e0da5 Update Turkish translation 2023-10-01 18:26:01 +00:00
Alx Sa
6ad54ca3a3 plug-ins: Fix DDS vulnerability (ZDI-CAN-22093)
Resolves #10069

Currently, the DDS header information for the width, height, and bytes per scan line
are read in and assumed to be correct. As these values are used for memory allocation
and reading, it would be good to verify they do not exceed the file size.

This patch adds a condition after the header is read in to verify those values. If they exceed
the file size (mins an offset), the file is not read in and an error message is shown.
2023-10-01 17:06:25 +00:00
Jehan
0b307a3a1a NEWS: update. 2023-10-01 18:01:26 +02:00
Alx Sa
a87afa7255 themes: Set default background-color for buttons
Resolves #9996.
While GIMP has background-colors set for specific buttons,
it did not have a default button background-color. This resulted
in "random" buttons showing system theme colors like the
[Reload Current Theme] button.
This patch defines a default background-color while leaving the
specific button themes intact.
2023-09-30 01:38:37 +00:00
Anders Jonsson
56256e2721 Update Swedish translation 2023-09-29 21:02:45 +00:00
Alx Sa
865cc56894 plug-ins: Fix vulnerability in file-psd
Resolves #10101.
This patch adds a missing break statement after an error condition
is detected to prevent the code from continuing afterwards.
2023-09-29 20:38:51 +00:00
Alx Sa
e4c362a9c3 themes: Highlight when hovering over grid view icons
This adds a border when hovering over icons in various
grid views (brushes, gradients, etc). This makes it more
visually apparent which option you can click to select.
2023-09-28 19:01:05 +00:00
Vasil Pupkin
f22935d3de Update Belarusian translation 2023-09-28 17:59:51 +00:00
bootchk
89901c8466 Fix for 2.99 only #6157
Also refactoring: extract two functions

Add test case scripts/test/register-fail

Catches more registration errors.
Any errors not caught at least will not crash.

Remains to be ported to 2.10, but only a few lines,  without the refactoring.
2023-09-28 13:26:23 +00:00
Jehan
196f1d6e95 Issue #6165: crash when the system icon theme does not contain image-missing icon.
The bug is in fact in GTK. "image-missing" is supposed to never missing since
GTK embeds an icon as GResource. But it turns out that the code is buggy. So if
an icon is missing from GIMP theme, then system theme, then "icon-missing" icon
as well, GIMP crashes.

See: https://gitlab.gnome.org/GNOME/gtk/-/issues/3526

As a workaround for now, let's at least add our own "image-missing", at least in
our main themes (Color and Symbolic, not Legacy). This will make GIMP not
crashing at least by default when another icon is missing.
Of course a crash could still happen if one use Legacy or a third-party theme
and if their system theme doesn't contain "image-missing" as well, until GTK is
fixed.
2023-09-27 21:34:18 +02:00
Anders Jonsson
5b78437328 Update Swedish translation 2023-09-27 19:28:40 +00:00
Jehan
47133b48ef build: add new Belarusian translation in the installer.
This localization was added recently but it was not in the installer scripts.
Discovered with unit testing: meson test gimp:build / windows-installer-langs
2023-09-27 21:01:09 +02:00
Jehan
3dcc4196fb plug-ins: plugin-defs.pl also is a remnant from autotools! 2023-09-27 15:57:58 +02:00
Jehan
d88f6f9733 app, devel-socs, icons, plug-ins, tools: remove various autotools artifacts.
* generate-icon-makefiles.py was a tool to generate the icon-list.mk files.
* mkgen.pl was used to generate plug-ins/common/Makefile.am
2023-09-27 15:39:39 +02:00
Yuri Chornoivan
c8e4f399d0 Update Ukrainian translation 2023-09-26 16:44:30 +00:00
Vasil Pupkin
73f7e6ba44 Add Belarusian translation 2023-09-26 14:54:40 +00:00
Luming Zh
5724696105 Update Chinese (China) translation 2023-09-26 14:31:59 +00:00
Martin
b620927ee7 Update Slovenian translation 2023-09-26 13:07:06 +00:00
Mark
2e9823f8ea coffee fix 2023-09-26 10:32:55 +00:00
Jehan
f38449115f Issue #2902: Preference option to set "Interface/Theme" font size.
Though GTK+3 is supposed to take care of scaling fonts with high density
displays, it turns out it is not enough for many, for various reasons (taste,
eyesight, distance to the display…). So we add this additional settings to tweak
further the font size.

With Aryeom, we experimented/discussed both a percentage UI vs. an absolute font
size field (e.g. as they provide in GNOME Tweaks). In the end, we went for a
percentage UI because we realize that we don't necessarily know what is the
current size at all. Mostly you just want bigger or smaller, and don't
necessarily care so much at which value is the font size.

This settings only has a single limitation (that we could find), which is when
used on a theme with widget rules using absolute font-size rules (px, or
keywords such as small/medium/large). As long as the CSS rules are relative
though (either to the parent widget, or to the root size), then it works fine.
Basically a theme hard-coding font sizes won't fare well with this settings, but
since we can consider this bad practice, it's an acceptable limitation.
2023-09-25 23:05:38 +02:00
Luming Zh
f6310c3db7 Update Chinese (China) translation 2023-09-25 15:16:36 +00:00
Jehan
0a905649c2 themes: make the switch neutral in our Default theme.
Actually just use the foreground color as background when it is checked.
2023-09-25 15:19:56 +02:00
Jehan
823adbe9f9 Issue #9880: Crash on startup (invalid accelerator string '<Primary>VoidSymbol').
GTK docs is pretty clear:

> It is a programmer error to pass an invalid accelerator string. If you are
> unsure, check it with gtk_accelerator_parse() first.

So now we verify validity of accelerator strings before using shortcuts from
config files (which can be consider "human input" as the file can be modified).
2023-09-25 11:53:15 +02:00
Yuri Chornoivan
847afa116f Update Ukrainian translation 2023-09-25 06:54:33 +00:00
Ekaterine Papava
ddb8c7abad Update Georgian translation 2023-09-25 03:51:07 +00:00
Ekaterine Papava
3ba0faf87a Update Georgian translation 2023-09-25 03:49:11 +00:00
Jehan
d71cd9d277 Issue #9604: "view-zoom-*" actions should not be radio actions.
A first attempt at fixing this was going through the idea of changing the
concept of radio actions, such as allowing an active action in an action group
to be called again. Or having some action in the radio group which can be called
but never set active.

But in fact, I just realized that these zoom actions are simply not meant to be
radio actions. They are not stateful actions, nor are they exhaustive.

I also updated the `other_scale` storage logic. Instead of updating it each time
the zoom changed (which was even broken in some cases, like when changing zoom
through another action), I simply save the last custom zoom value. This is the
one which is reused across calls. I don't think always resetting to the current
zoom value is very useful (if you call this dialog, it's not to zoom to the
current zoom!). Also there was some concept of flagging this stored zoom value
as "dirty" by making it negative, but this was never actually used, which makes
me believe that current logic was not the original intent anyway.
Saving the previous custom zoom explicitly set seems to be a good enough
behavior, so let's go with it.
2023-09-24 23:51:14 +02:00
Luming Zh
589a278791 Update Chinese (China) translation 2023-09-24 17:41:44 +00:00
Yuri Chornoivan
abe67517b7 Update Ukrainian translation 2023-09-24 15:53:16 +00:00
Balázs Úr
82f8360b6c Update Hungarian translation 2023-09-24 13:33:39 +00:00
Piotr Drąg
7b018e45c7 Update Polish translation 2023-09-24 13:41:54 +02:00
Martin
9625cc2ef4 Update Slovenian translation 2023-09-24 06:14:02 +00:00
Alx Sa
cb352ab5b2 plug-ins: Add Esm Software PIX format import support 2023-09-23 21:26:47 +00:00
Martin
cf5d92aaf8 Update Slovenian translation 2023-09-23 21:13:55 +00:00
Alx Sa
96f536a335 plug-ins: Fix PSP vulnerability (ZDI-CAN-22096)
Resolves #10072.

The current PSP palette loading code does not check if
the file's palette entry count value is below the limit
(G_MAXUNIT32 / 4 due to each color being 4 bytes long).
This patch adds this check and stops loading if the count
is larger than GIMP currently supports.
2023-09-23 15:46:13 -04:00
Alx Sa
e1bfd87195 plug-ins: Fix PSP vulnerability (ZDI-CAN-22097)
Resolves #10071.

When reading RLE compressed data, a buffer was allocated to 127 bytes.
However, it can potentially be used to read 128 bytes, leading to a
off-by-one vulnerability. This patch allocates 128 bytes to the buffer
to prevent this from occurring.
2023-09-23 02:16:24 +00:00
Alx Sa
5211a2c3e8 themes: Define background color for spinbutton buttons
Resolves #9997.

Another system theme leak, this time for the +/- buttons on
GimpSpinButton. This patch specifically defines them to
bg-color.
2023-09-22 18:51:10 +00:00
Jehan
12d8401d65 app: better handling of failure of gimp_scanner_parse_string().
This fixes 2 issues:

1. gimp_scanner_parse_string() may fail, which here would indicate broken input.
   If it does, the string variable would not be set, so we need to initialize it
   to NULL, otherwise freeing it could crash GIMP.
2. The variables set by gimp_scanner_parse_string() must be freed.
2023-09-22 15:27:59 +02:00
Jehan
ae38b433f8 app: improve robustness of font detection algorithm, allowing for future fields.
While I was testing some fonts I had on my system which were named exactly the
same, I also realized that all their fields were identical (among the ones we
store at least), except for the hash obviously. While the hash is great to
differentiate fonts when we use exactly the same files, there are various
reasons where one could have the right font installed with a different hash
(e.g. a simple reason could be if it was stored in different font formats).

So I'm thinking that maybe we'll want to add more fields in the future (if there
are any more fields allowing to better discriminate among some fonts named
similarly). This commit will allow this version of GIMP to still work when
loading the future serialized fonts with new and unknown fields. The unknown
fields will be ignored but at least it will still do its best to find fonts with
the known fields. Therefore we won't have to bump the XCF format version if we
only add new fields.

Similarly this allows to add the fields in-between, reorder existing fields or
even remove some in the future if we realize something is really unneeded. It's
less a big deal than the ability to add new fields without bumping XCF version
though.
2023-09-22 15:16:52 +02:00
Jehan
6c40f10377 app: improve the double loops to deserialize GimpFont.
Rather than looping fully over the full list of fonts once more, and
re-computing a second time the same font similarity score (with the risk of
messing up the copy-paste), let's just store the indexes of "most similar" fonts
in the first loop, then only query and check the hash for these.
2023-09-22 14:09:00 +02:00
Alx Sa
59ce1a7255 themes: Define treeview checkbox colors
Resolves #8756 (along with !1065)

The system theme leaked due to the checkbox styling not being
defined for GtkTreeView checkboxes.
The background-image in particular overpowers other settings.
The normal checkbox styling is now specifically applied to
these checkboxes as well.
2023-09-21 22:36:31 +00:00
Jehan
8c4ee50867 NEWS: update. 2023-09-21 23:27:49 +02:00
Jehan
db4710de1c Issue #9154: incorrect corner is selected in text tool.
After reframing a rectangle item, make sure we restore its previous state.
2023-09-21 16:16:07 +02:00
Rodrigo Lledó
2ee2a4a2c0 Update Spanish translation 2023-09-21 11:53:29 +00:00
Kristjan SCHMIDT
08b9e899df Update Esperanto translation 2023-09-20 20:38:23 +00:00
Sabri Ünal
c29399314c Update Turkish translation 2023-09-20 19:08:00 +00:00
Jehan
231ca0c505 Issue #9994: do not call g_file_info_get_is_hidden() (and others) directly.
This is not the main reason for the specific output in #9994. These ones are
more probably because of similar usage in GTK (which updated its own calls to
g_file_info_get_is_hidden|backup() in version 3.24.38). But we should likely
also update the various calls we have to use the generic
g_file_info_get_attribute_*() variants.

To be fair, it is unclear to me when we can be sure that an attribute is set.
For instance, when we call g_file_enumerate_children() or g_file_query_info()
with specific attributes, docs say that it is still possible for these
attributes to not be set. So I assume it means we should never use direct
accessor functions.

The only exception is that I didn't remove usage of g_file_info_get_name(),
since its docs says:

> * Gets a display name for a file. This is guaranteed to always be set.

Even though it also says just after:

> * It is an error to call this if the #GFileInfo does not contain
> * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.

Which is very contradictory. But assuming that this error warning was
over-zealous documentation, I kept the direct accessors since they are supposed
to be slightly more optimized (still according to in-code documentation) so
let's priorize them when we know they are set for sure.
2023-09-19 15:34:48 +02:00
Alx Sa
d928bd2c93 themes: Define menu checkbox border color
Resolves #10015.

The border color of the menu checkboxes was not
specifically defined by the CSS stylesheet, causing
the boxes to appear invisible when unchecked in
certain system themes. This defines the border color
to the same as the menu text to ensure visibility.
2023-09-19 10:59:28 +00:00
Alx Sa
aa1cce620c themes: Define menu separator color
Resolves #10007.

The menu separator color was not defined in the stylesheet,
so it could vary based on the system stylesheet.
It is now set to @stronger-border-color.
2023-09-19 02:26:27 +00:00
Alx Sa
8653957b96 themes: Define Save Image actionbar border
Resolves #10040.

A System Theme leak could cause a large border to be drawn around
the export options at the bottom of the Save Image dialogue.
This patch defines them specifically as 1px border with the
@strong-border-color CSS styling.
2023-09-18 20:39:16 +00:00
Alx Sa
cb8384e213 themes: Define notebook header border color
Resolves #10000.

The border around notebook headers was not specifically defined in
GIMP's CSS stylesheet, so if the system theme used a different color this
would also change. It has now been defined as @strong-border-color.
The existing CSS was also moved to the same area as the other notebook
header definitions.
2023-09-18 19:32:13 +00:00
Alx Sa
eb1a623728 themes: Fix black border bug in scrolled window viewports
Resolves #10020
For some reason, not having the border-radius CSS style set
in widgets inside scrollwindow viewports causes them to have
a giant black order if they're not a full height. This was previously
fixed for GtkGrids. This patch fixes it for GtkBoxes as well, such as
the Procedure Browser description area.
2023-09-16 18:24:45 +00:00
Martin
04ae1e2d55 Update Slovenian translation 2023-09-15 20:38:25 +00:00
Luming Zh
9fb605db65 Update Chinese (China) translation 2023-09-15 18:26:14 +00:00
Yuri Chornoivan
6a2d782c73 Update Ukrainian translation 2023-09-15 17:28:31 +00:00
bootchk
bfaebccf4e ScriptFu: change binding of resource from string to int
Fix #9991

And change test cases

And fix string-prefix? function in testing framework
2023-09-15 11:02:46 +00:00
Ekaterine Papava
623becd72d Update Georgian translation 2023-09-15 03:46:28 +00:00
Alx Sa
9a15f65a64 core: Improve security of ASE palette loading
Per @Wormnest comment on ACB palette loading,
g_utf16_to_utf8 () now uses the string length rather than -1 to prevent malicious non-NULL terminated strings.
2023-09-14 23:00:07 +00:00
Alx Sa
ab29c4478e core: Add support for Adobe Color Book (ACB) Palettes 2023-09-14 23:00:07 +00:00
Anders Jonsson
6e6f81d23a Update Swedish translation 2023-09-14 22:23:21 +00:00
Luming Zh
030b74ad33 Update Chinese (China) translation 2023-09-14 01:15:19 +00:00
Yuri Chornoivan
32f6c59eca Update Ukrainian translation 2023-09-13 19:02:15 +00:00
Víttor Paulo Vieira da Costa
3c66f4a9fe Update Brazilian Portuguese translation 2023-09-12 17:15:50 +00:00
bootchk
ad78b6d7e6 Remove huge cruft file mistakenly added two commits earlier. 2023-09-12 16:54:59 +00:00
Martin
7fd02806c0 Update Slovenian translation 2023-09-12 16:14:17 +00:00
bootchk
fe0fe3e0bb ScriptFu: extract function marshall_pdb_return
This commit and the ones prior are simple refactoring,
with no intended functional changes.

In anticipation of enhancements 9608 and 8404
which make returned values more scheme like.

Also makes code more readable.
2023-09-12 15:02:15 +00:00
bootchk
d3706a62e3 ScriptFu: add function marshal_PDB_return_by_arity 2023-09-12 15:02:15 +00:00
bootchk
1a8bdf1acc ScriptFu: extract function marshal_pdb_return_values (plural) 2023-09-12 15:02:15 +00:00
bootchk
3e0f37d00a ScriptFu: Extract function marshal_returned_PDB_value 2023-09-12 15:02:15 +00:00
Jehan
e832b73e55 app: fix a few bug in text markup (de)serialization.
- g_str_equal() doesn't have the proper signature for g_slist_find_custom() so
  current code was never processing multiple subfonts in a markup layer text.
- Escape the font name parsed from the XCF. For old XCF format, it could contain
  forbidden characters. And even for new XCF files (with fonts names generated
  such as 'font123' so there should be no escapable characters), we should not
  trust that the XCF/parasite contents is correct. It can be wrong for various
  reasons.
- Search for ' font="%s"', otherwise the search-and-replace might catch other
  XML attributes. For instance we don't want the font "ultrabold" to match
  weight="ultrabold".
- The backward compatibility code didn't have code to stop 2 font name
  replacements to chain up, i.e. if a real world font was named "gimpfont123"
  and another "gimpfont321" and if our replacement code were to change
  "gimpfont123" to "gimpfont321" then "gimpfont321" to something else. In the
  end, we'd have only a single font. I am fixing it by replacing " font=" to
  " gimpfont=" then only correcting the attribute name at the end. This
  intermediate attribute name acts as a "done" flag.
2023-09-12 14:23:40 +00:00
Jehan
ed4c50ce2e app, libgimpconfig: make the code more robust to random text.
There are 3 fixes here:

1. First, searching for "\"GimpFont\"" to determine whether or not this is a new
   format text parasite is not enough, because this string can be found in a
   text layer with "GimpFont" only as contents. It will serialize as:

   > (text "GimpFont")

   Instead search for "(font \"GimpFont\"" which cannot be created as part of
   the text contents because of the unprotected double quotes).

2. We must verify that strstr() did not return NULL when searching for markup
   delimiters. It may happen if the parasite contents is invalid (we must always
   assume it can be, since it's user data).

3. When deserialization of a text from parasite fails (e.g. because parasite
   doesn't actually exist or its format is wrong), still make sure the GimpText
   has a font (setting the standard one before deserializing). Otherwise GIMP
   crashes down the line.

   For this, I also had to fix gimp_config_deserialize_object(): the object type
   name must be parsed even if an object was already set in a GObject property.
2023-09-12 14:23:40 +00:00
Jehan
6d5aaa995f app: new storage format for the text layer parasite implies XCF version bump.
The new parasite format cannot be loaded by old versions of GIMP. This means we
must bump the XCF version (even though technically we didn't really touch the
XCF format itself because text layers are stored in a hackish way, yet text
layers are just too important nowadays to not care).

Nevertheless if an old XCF with text layers was loaded and the text layers left
untouched, the old parasite will be saved back as-is. Therefore no need to bump
the XCF version in this specific case. Only when we created new text layers or
edited existing ones.
2023-09-12 14:23:40 +00:00
Jehan
bd9eb1d8ff meson: requires Pango >= 1.50.
New code uses pango_attribute_as_font_desc() which appeared with Pango 1.50.
Since it's currently present in Debian stable, I don't bother too much and bump
this dependency.

Also let's use the same version for pango, pangocairo and pangoft2. They all
come from the same project/repository, so we must likely expect them to be equal
(if they are not, there is likely a problem).
2023-09-12 14:23:40 +00:00
Jehan
68167ae01b app: fix counting of similar fonts with largest similarity value and a crash.
Previous code was incrementing the similar_fonts count each time we found a
better candidate. So we ended up computing the hash even when we had only 1
candidate with maximum similarity.

Moreover this commit fixes a crash happening with the "standard font". The
lookup name must always be allocated, even when it's an empty string (otherwise
it crashes at free).

Additionally this commit factorizes the code so that gimp_font_get_hash() takes
care of hash computation instead of duplicating code.

Finally I do some code organization.
2023-09-12 14:23:40 +00:00
Idriss Fekir
899dee5926 (De)Serialize fonts in pango markup 2023-09-12 14:23:40 +00:00
Idriss Fekir
7be3f56f5c Serialize GimpFont and fix loading older xcf files
MR #1011 breaks that because now we have a display name
and a lookup name, so font info is saved in the xcf file,
and when loading, the font which matches these info is used.

This doesn't fix pango markup having the wrong fonts names.
2023-09-12 14:23:40 +00:00
Idriss Fekir
a966297498 Port GimpText to GimpFont
In GimpText, The font used to be stored as a string containing its name,
Now, it is stored as a GimpFont object, which makes more sense and makes
operations on fonts easier (such as serialization).
2023-09-12 14:23:40 +00:00
Rafael Fontenelle
b5895aca9a Update Brazilian Portuguese translation 2023-09-12 13:44:20 +00:00
Alx Sa
f5ae105f49 themes: Add border for canvas size in Resize Dialog
Adds a class "gimp-offset-area-frame" to the frame containing a GimpOffsetArea in resize dialogues.
This allows the styling from 2.10 to be applied to indicate canvas size when resizing layers.
Since GimpOffsetArea is a GtkDrawingArea object, it can't have CSS directly
applied to it - that's why the class is added to the frame instead.
2023-09-11 20:07:17 +00:00
Vasil Pupkin
f0f7c0cd2c Update Belarusian translation 2023-09-09 23:05:49 +00:00
Vasil Pupkin
d0d4239e36 Update Belarusian translation 2023-09-09 09:54:48 +00:00
Sabri Ünal
b76947361e Update Turkish translation 2023-09-07 15:33:14 +00:00
Luming Zh
5e399ebd2b Update Chinese (China) translation 2023-09-07 13:48:06 +00:00
dimspingos
cf1dca4347 Updated Greek translation 2023-09-07 16:42:13 +03:00
Sabri Ünal
703be5a103 Update Turkish translation 2023-09-07 10:41:21 +00:00
Sabri Ünal
06e6aa14a3 Update Turkish translation 2023-09-07 10:34:42 +00:00
Martin
d2ea6617da Update Slovenian translation 2023-09-07 07:33:04 +00:00
Alx Sa
a69c7736c2 core: Handle ASE palettes with header padding
This removes any padding the color space label might have originally,
which interfered with g_str_has_prefix ().
2023-09-06 20:15:59 +00:00
Yuri Chornoivan
7372521802 Update Ukrainian translation 2023-09-06 17:43:04 +00:00
lillolollo
ade8cad5d1 gitlab-ci: Windows update python 3.11 2023-09-06 15:08:03 +02:00
bootchk
61c1acbead tinyscheme: enhance: rearrange error msg so error kind is stable prefix
Error kind should be first to read, is most important.

Makes testing error message easier when prefix is stable.
2023-09-06 06:37:29 -04:00
bootchk
14c30f6514 ScriptFu tests: Add some tests and remove hardcoded ID's
Buffer, palette, parasite, unit, context

Also test only a prefix of error message.
2023-09-06 09:53:31 +00:00
dimspingos
6b2cdb3154 Updated Greek translation 2023-09-06 10:24:09 +03:00
Jordi Mas
75033ab6b7 Update Catalan translation 2023-09-06 06:37:42 +02:00
Alx Sa
19050ce7c0 dialog: Use column value from imported palettes
GIMP's .gpl palette format and Swatchbooker's .sbz format can contain
metadata on the number of columns. This value was ignored before;
now the import dialogue checks for this value and uses it.
2023-09-06 01:12:48 +00:00
Alx Sa
6597dabeb3 core: Add support for SwatchBooker palettes 2023-09-06 01:12:48 +00:00
programmer_ceds
9e06e2aa53 Fix Zoom Shortcuts (fixes issue #9797) 2023-09-05 22:35:06 +00:00
Balázs Úr
9c965efd81 Update Hungarian translation 2023-09-05 19:02:16 +00:00
Heiko Becker
8b2574e917 meson: Add explicit options for cfitsio and openmp
...instead of automagically enabling them if the dependency happens
to be installed.
2023-09-03 22:41:04 +02:00
Luming Zh
6f77a661c9 Update Chinese (China) translation 2023-09-03 14:21:47 +00:00
Luming Zh
1d496c8c81 Update Chinese (China) translation 2023-09-03 14:17:02 +00:00
Idriss Fekir
e93e7a124c Improve text quality of UI on Windows
When using the default pangocairo backend (win32),
AA is not enabled.

Switching to the FontConfig backend fixes the problem.
2023-09-02 21:09:06 +00:00
Martin
73ea5464ef Update Slovenian translation 2023-09-02 20:39:08 +00:00
Yuri Chornoivan
e11e21b55d Update Ukrainian translation 2023-09-02 16:26:53 +00:00
Víttor Paulo Vieira da Costa
d812b0d9a6 Update Brazilian Portuguese translation 2023-09-02 13:11:23 +00:00
Víttor Paulo Vieira da Costa
d5805cba34 Update Brazilian Portuguese translation 2023-09-02 13:11:20 +00:00
Víttor Paulo Vieira da Costa
acc4fe982f Update Brazilian Portuguese translation 2023-09-02 13:11:14 +00:00
Alx Sa
531da1560d Issue #30: Add onClick, accesskey, and tabindex tags to Image Map plug-in 2023-09-02 03:30:35 +00:00
Jacob Boerema
b53f7c10e4 libgimp: fix #9902 Critical when calling gimp_text_layer_new ...
from plug-in

I get a critical error when calling gimp_text_layer_new and the function
doesn't return a GimpTextLayer:

(file-psd:47120): LibGimp-CRITICAL **: 16:00:59.035:
gimp_gp_param_to_value: type name GimpTextLayer is not registered

Adding the above line to libgimp/gimp.c fixes the problem.
2023-08-31 21:42:13 +00:00
Sabri Ünal
e425678bcf Update Turkish translation 2023-08-31 18:50:46 +00:00
Sabri Ünal
e22ddb7806 Update Turkish translation 2023-08-31 18:48:39 +00:00
Sabri Ünal
5657feded8 Update Turkish translation 2023-08-31 18:44:03 +00:00
Jehan
459836ee09 Issue #9710: layers borders not properly refreshed.
This was a regression appeared with commit 1b3af8a89b. We still don't want to
flush the whole image, but if the selected layers change, we want to flush the
display shell.
2023-08-31 20:33:31 +02:00
Jehan
79fe90646f NEWS: update. 2023-08-30 17:25:01 +02:00
Alx Sa
caff8dbb7b core: Fix crash when filling with Middle Gray color
Filling with Middle Gray requires getting the image format
for conversion from CIE Lab. This works when filling a layer,
but new images are not yet available in the context.
This adds the image to the context before gimp_drawable_fill ()
is called so it has access to the image format.
2023-08-28 22:42:31 +00:00
Martin
27f18ff872 Update Slovenian translation 2023-08-28 21:55:08 +00:00
Martin
9157211fa4 Update Slovenian translation 2023-08-28 21:53:03 +00:00
Yuri Chornoivan
4d1d8803c4 Update Ukrainian translation 2023-08-28 17:23:30 +00:00
Ekaterine Papava
a04c3cd614 Update Georgian translation 2023-08-28 04:36:54 +00:00
Tim Sabsch
bdf55cd9d4 Update German translation 2023-08-27 20:19:38 +00:00
Alx Sa
38495c7b2d Issue #9901: Add Adobe Swatch Exchange palette import 2023-08-27 16:51:02 +00:00
Piotr Drąg
081b8e65a4 Update Polish translation 2023-08-27 16:23:24 +02:00
Ekaterine Papava
21061bfa31 Update Georgian translation 2023-08-27 14:07:27 +00:00
Martin
63282d00b7 Update Slovenian translation 2023-08-27 05:41:45 +00:00
Martin
793ba32b5b Update Slovenian translation 2023-08-27 05:24:51 +00:00
bootchk
ddbb34f357 Fix #9660 ScriptFu flaws for atoms of type character, UTF-8 encoded
For characters outside ASCII:

1. repr is wrong in REPL

2. sharp constant #\<codepoint> fails to evaluate

3. sharp constant hex #\x<hexdigits> accepts invalid UTF-8 codepoints

4. a call to error with such a character eats the output string

Also, changed the repr of ASCII control characters (was #\x7)
to their unicode repr (now a box glyph with hex)
2023-08-26 18:46:56 +00:00
Yuri Chornoivan
1fddc3b1c4 Update Ukrainian translation 2023-08-26 18:43:35 +00:00
Yuri Chornoivan
2be4b6bf3d Update Ukrainian translation 2023-08-26 18:24:35 +00:00
Boyuan Yang
e28f6fa617 Update Chinese (China) translation 2023-08-26 18:17:49 +00:00
Sabri Ünal
f869a79812 data: add gimpsaveprocedure.c to the POTFILES.in
A leftover from my previous commit: b7ab467cde
2023-08-26 16:26:30 +03:00
Ekaterine Papava
8897574758 Update Georgian translation 2023-08-26 03:47:03 +00:00
Ekaterine Papava
d2ea72e371 Update Georgian translation 2023-08-26 03:41:35 +00:00
Danial Behzadi
e83f150fa3 Update Persian translation 2023-08-25 23:02:32 +00:00
MohammadSaleh Kamyab
50ccf34f8c Update Persian translation 2023-08-25 22:49:46 +00:00
bootchk
2f360ddb34 ScriptFu: #9755 Add test framework and tests for TS and PDB
Test framework and tests in Scheme, and portable.

Work in progress.  Expect commits for more tests.

Testing framework is stable, more or less.

Add more tests

Add tests layer and layerMask.

test Item methods

More tests, selection

Test memory, vector in TS.

More tests char functions

sharp expr tests
2023-08-25 21:39:29 +00:00
Alx Sa
dc50bf0601 menus: Rearrange Help menu
Moves "About Gimp" to end of menu to match common UX.
User Manual is also moved right after the Context Help option as
they are related items.
2023-08-25 21:13:03 +00:00
Sabri Ünal
05b808b095 plug-ins: Mark RAW export dialog related strings translatable
These strings are related to RAW export dialog which
some strings seem not marked as translatable.
2023-08-25 19:41:42 +00:00
Sabri Ünal
5725a3593e plug-ins: Mark PDF/PostScript export dialogs related strings translatable
These strings are related to PDF/PostScript export dialogs which
some strings seem not marked as translatable.
2023-08-25 19:41:42 +00:00
Sabri Ünal
d4146aba5c plug-ins: Mark TIFF export dialog related strings translatable
These strings are related to TIFF export dialog which
some strings seem not marked as translatable.
2023-08-25 19:41:42 +00:00
Sabri Ünal
b7ab467cde plug-ins: Mark JPEG export dialog related strings translatable
These strings are related to JPEG export dialog which
some strings seem not marked as translatable.
2023-08-25 19:41:42 +00:00
Yuri Chornoivan
69abfdbdcc Update Ukrainian translation 2023-08-25 11:52:13 +00:00
Alx Sa
0778b95847 plug-ins: Add support to load PSP ICC Profile data 2023-08-25 02:29:51 +00:00
Timo Jyrinki
05f54698f2 Update Finnish translation 2023-08-24 07:48:18 +00:00
Sabri Ünal
b2979e0534 Update Turkish translation 2023-08-22 20:20:27 +00:00
Sabri Ünal
c0ec541799 Update Turkish translation 2023-08-22 16:35:37 +00:00
Yuri Chornoivan
30c5e40461 Update Ukrainian translation 2023-08-21 19:59:29 +00:00
Jacob Boerema
c9d73e4da7 devel-docs: fix failure to build gir docs
Generating the devel docs fails on Windows because it can't find
Babl-0.1.gir, which is only available for me in GIMP's prefix.

Adding that path with -add-include-path fixes the issue for me.
2023-08-21 16:14:53 +00:00
Idriss Fekir
92f133558a gimptextlayout.c: Fix behaviour of RTL text 2023-08-21 13:21:19 +00:00
Martin
cd0524b383 Update Slovenian translation 2023-08-21 11:39:53 +00:00
Alx Sa
7a971ede15 scripts: Add Table of Contents to User Manual submenu
Resolves #1040.
Adds a [Table of Contents] link that directs users to
ID "gimp-main", the table of contents page.
2023-08-21 02:10:45 +00:00
bootchk
161644fdbc Delete obsolete scripts from 2.99
Moved to gimp-data-extras repo

    erase-rows fix #9885
    grid-system fix #8464
    select-to-brush fix #9878
    select-to-image
    select-to-pattern

Just deleted:

    script-fu-copy-visible fix #9868
2023-08-20 20:44:04 +00:00
bootchk
109f43750c Fix #9874 SF plugin script-fu-set-cmap.scm
New API for GByte to gimp-image-set-colormap
2023-08-20 20:44:04 +00:00
bootchk
7f3595285d Fix #9873 fix SF plugin ripply-anim.scm
Fix new multilayer API in call to to plug-in-tile
2023-08-20 20:44:04 +00:00
bootchk
d934d6d497 Fix #9866 burn-in-anim.scm SF plugin
Fix API change to gimp-image-set-file.
2023-08-20 20:44:04 +00:00
bootchk
8c3d3a5247 Enhance #9532 elide "Script-Fu" from SF plugin dialog title 2023-08-20 20:44:04 +00:00
Daniel Novomeský
8f0e2fd5aa flatpak: remove libjxl
We will use libjxl provided via org.gnome.Sdk//master instead.
2023-08-18 19:39:29 +00:00
Alx Sa
f67ba0d829 libgimpcolor: Remove warnings about uninitialized variables
While `length` is always assigned a value by gimp_color_profile_get_icc_profile (),
some compilers don't recognize this and warn about it being uninitialized.
This assigns six instance of `length` to 0 when declared to remove the warnings.
2023-08-18 10:54:06 +00:00
Alx Sa
0cfdd0a5df plug-ins: Fix crash in Map Palette
Per https://gitlab.gnome.org/GNOME/gimp/-/issues/9875#note_1817995,
the returned value of gimp_context_get_palette () shouldn't be freed in the
calling function.
2023-08-17 11:23:10 +00:00
Timo Jyrinki
491fc3120f Update Finnish translation 2023-08-17 07:58:21 +00:00
Jordi Mas
26454809a7 Update Catalan translation 2023-08-16 19:37:27 +02:00
Alx Sa
64eaed2ad7 modules: Add translation note for Clip warning
Resolves #8207. Adds a note to clarify the purpose of the
Clip Warning color display filter.
2023-08-15 17:09:14 +00:00
Jacob Boerema
40b2412fa4 plug-ins: add synchronization with certain Exif tags.
Exif tags Exif.Image.Artist, Exif.Image.ImageDescription, and
Exif.Image.Copyright were not being synchronized with their Xmp and
Iptc.IIM equivalents in the metadata-editor.

This commit adds synchronization of reading and writing of the metadata.

We adjust the struct for equivalent_metadata_tags by removing unused
fields and adding a field that points to the equivalent Exif tag in
a new struct called exif_tag_info.

On loading of the metadata tags we now also check a limited set of
Exif tags. If no value was set yet, we use the Exif value, or else
we check to make sure both had the same value. If not, print a
warning in the terminal.

On saving of metadata, we now also save to the marked Exif tags, or
if the value is NULL, we remove the tag.

In passing, we also fix two memory leaks by freeing with g_strfreev
temporary string lists.
2023-08-14 17:29:44 -04:00
Jacob Boerema
8495dd6eed plug-ins: improve creation date handling in metadata-editor
Dates in Xmp include a time and timezone, so add a default time when
selecting a date since we can't edit time and timezone yet.

So far, we didn't take into account that IPTC-IIM has separate date
and time+timezone values instead of the combined value in XMP for
DateCreated.

When loading DateCreated check if it has the same value as IPTC
values DateCreated and TimeCreated combined. If not, we show a
terminal error and ignore the IPTC values.
If neither Xmp nor Iptc has a DateCreated, then use Exif.Photo.
DateTimeOriginal combined with OffsetTimeOriginal to set an initial
value.

When saving, synchronize with IPTC-IIM by splitting the DateCreated
value in date and time+timezone and save each to the appropriate tag.
Also make sure that for IPTC-IIM the date separator is a '-'.
2023-08-14 16:50:15 -04:00
Jacob Boerema
83294ba4c7 plug-ins: improve spacing in metadata-editor
Adds a bottom margin to the grids because the horizontal scrollbar
was overlapping the bottom-most row of the grid.
Adds wordwrap and left/right margins to multiline text widgets,
mainly to make the text not start right at the edge of the widget.
2023-08-13 15:15:04 -04:00
Jacob Boerema
b97f96249a plug-ins: Xmp.plus.ImageSupplierName can only have one value
as used in metadata-editor:
Change from MODE_MULTI to MODE_SINGLE.
2023-08-13 15:15:04 -04:00
Jacob Boerema
c633091d54 plug-ins: in metadata-editor use array size constants...
instead of hard-coded numbers.
Also:
- remove unneeded set_tag_string for n_creatorContactInfoTags
- remove now unneeded structs
2023-08-13 15:15:04 -04:00
Jacob Boerema
4e40a3edd2 plug-ins: make mode in metadata-editor an enum
We were using a string for the metadata mode, meaning we had to compare
string values in a lot of places.

We simplify and probably speed-up comparisons here by replacing the
mode string by an enum value.

The only place still needing the string values sometimes is
metadata-impexp.[ch] where we added a conversion table to convert
the mode to a string.
2023-08-13 15:15:03 -04:00
Lukas Oberhuber
5ccac0dd9b macos: Remove DYLD_LIBRARY_PATH
Revert: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/561
2023-08-13 12:09:14 +00:00
lillolollo
b08602a6f4 libgimpwidgets: hintbox gtk_widget_show update with gtk_widget_set_visible 2023-08-13 12:05:58 +00:00
Stanislav Grinkov
9ab7547607 widgets: initialize TextTag's alpha channel when deserializing markup
Code location and fix found by Massimo Valentini.

Fixes: #6927 (GNOME/Gimp tracker)
2023-08-13 13:40:17 +06:00
Stanislav Grinkov
6947e80b0b icons: add white border to Color theme Dodge icon
Fixes: #9681 (GNOME/Gimp tracker)
2023-08-13 12:18:10 +06:00
Stanislav Grinkov
3f82a57f2d icons: add white border to Legacy Airbrush and Dodge tool icons
Fixes: #9681 (GNOME/Gimp tracker)
2023-08-13 12:18:10 +06:00
Stanislav Grinkov
83f6eec57b app: set the blank font name for the standard font instead of 'Standard'
to fix the issue when 'Standard' can be actual font from the list
or a font which starts with. (ie. Standard Symbols PS)

Fixes: #3104 (GNOME/Gimp tracker)
2023-08-13 12:15:27 +06:00
Luming Zh
e489dc6e53 Update Chinese (China) translation 2023-08-12 19:54:48 +00:00
Luming Zh
eb0c9b04ac Update Chinese (China) translation 2023-08-12 19:53:55 +00:00
Luming Zh
6bccd77e87 Update Chinese (China) translation 2023-08-12 19:52:52 +00:00
Jehan
63076ba342 devel-docs: add URLs to babl and GEGL gi-docgen documentation.
Note that these links are not valid yet. For now, documentations are only in
testing:
* babl: https://testing.developer.gimp.org/api/babl/
* GEGL: https://testing.developer.gimp.org/api/gegl/

The main links will appear next time we merge testing into the main developer
website, or at the next release of GIMP.
2023-08-12 21:09:30 +02:00
Jehan
661009d950 gitlab-ci: generating tarballs for babl and GEGL API reference documentation. 2023-08-12 17:33:54 +02:00
Anders Jonsson
369a7782a1 app, libgimp, libgimpbase: fix gi-docgen rendering 2023-08-12 14:52:52 +00:00
Martin
38b226a558 Update Slovenian translation 2023-08-11 23:22:00 +00:00
Martin
26cb91ddcf Update Slovenian translation 2023-08-11 23:16:41 +00:00
Martin
664de8f311 Update Slovenian translation 2023-08-11 23:13:50 +00:00
Yuri Chornoivan
83130f889b Update Ukrainian translation 2023-08-11 18:47:40 +00:00
Yuri Chornoivan
c9e8b2a120 Update Ukrainian translation 2023-08-11 18:45:12 +00:00
Sabri Ünal
67cd2a60d3 Update Turkish translation 2023-08-11 11:21:30 +00:00
Sabri Ünal
1f24773e0e Update Turkish translation 2023-08-11 11:17:32 +00:00
Sabri Ünal
a460650f75 Update Turkish translation 2023-08-11 11:17:26 +00:00
Sabri Ünal
8a6c385edf Update Turkish translation 2023-08-11 11:17:20 +00:00
Sabri Ünal
af7b3d7e53 Update Turkish translation 2023-08-11 11:15:42 +00:00
Ekaterine Papava
e24974ffc7 Update Georgian translation 2023-08-11 07:35:54 +00:00
Ekaterine Papava
494418f996 Update Georgian translation 2023-08-11 07:30:16 +00:00
Stanislav Grinkov
cbcb477182 core: add FG to Transparent (Hardedge) gradient
Fixes: #9849 (GNOME/Gimp tracker)
2023-08-11 13:01:20 +06:00
Luming Zh
955a890bbc Update Chinese (China) translation 2023-08-11 02:28:35 +00:00
Alx Sa
b459ce95bb plug-ins: Handle single-channel OpenEXR with unknown channel names
OpenEXR allows for arbitrary channel names. Instead of failing once the common ones are checked, this patch 
checks the number of channels in the file.
If there is only one channel, it is treated as 
grayscale (similar to OpenImageIO's behavior).
A debug warning with the channel name is also printed.
2023-08-10 19:37:25 +00:00
Stanislav Grinkov
4465db5223 tools: change text tool behavior when replacing a text
When replacing a selection, take and apply markup (if any)
from the first character of the selection for the entered
text.

This fixes the case when you no longer can change the
global layer text properties after replacing the text.

Also, this changes the behavior introduced in #1220.

Fixes: #7948 (GNOME/Gimp tracker)
2023-08-10 22:23:45 +06:00
lillolollo
4d7c2ab2b9 libgimp: missed break 2023-08-10 15:20:54 +00:00
Jehan
133acb2c99 NEWS: update. 2023-08-10 17:11:36 +02:00
Zander Brown
e00f2b3bf9 play: use GMenu directly 2023-08-10 12:11:01 +00:00
Zander Brown
ddd1a48825 remap: use GMenu directly 2023-08-10 12:11:01 +00:00
Zander Brown
adc7e5331c colourbutton: use GMenu directly 2023-08-10 12:11:01 +00:00
Zander Brown
efabebd0bb help-browser: move menu to XML 2023-08-10 12:11:01 +00:00
Zander Brown
7d1eac18ca ifs: move menu to XML
See: https://gitlab.gnome.org/GNOME/gimp/-/issues/9776
2023-08-10 12:11:01 +00:00
Martin
37220c5dab Update Slovenian translation 2023-08-10 10:55:09 +00:00
Yuri Chornoivan
24694e59c5 Update Ukrainian translation 2023-08-09 18:02:15 +00:00
Alx Sa
8709e91999 plug-ins: Make GFig menus translatable
Based on the IMAP port in !1031, this moves the menu code to a separate file
so that gettext can access it for translation.
2023-08-09 16:17:00 +00:00
Ekaterine Papava
2501807401 Update Georgian translation 2023-08-09 16:13:52 +00:00
Jehan
8a8451750d build: Imath is a dependency of OpenEXR.
Organizing sub-dependencies into modules helps. Later if for instance we need to
remove or change OpenEXR, we know that they are related and that Imath can be
removed if we remove OpenEXR.
2023-08-09 17:21:24 +02:00
lillolollo
8432c555a6 app: silencing warnings in switch statement
See MR !1007.
2023-08-09 15:20:52 +00:00
Zander Brown
3b6ea6f02e imap: generate sources
The targets were just being left floating, and the pre-generated in-tree
source were always used instead

When bison/flex are found, ensure we actually dep on their output - thus
actually running the targets - and only use the in-tree copies as a
fallback
2023-08-09 13:46:56 +00:00
Zander Brown
637385c7d1 imap: move menu to XML
Having it as an inline string doesn't make much sense, and makes it
untranslatable
2023-08-09 13:46:56 +00:00
Jehan
99bb342037 gitlab-ci: further fix the Windows nightly installer.
Continuation of commit 94344bdb46 which was not enough. I just need the full
pipeline from image to Debian GIMP, with dep job too.
2023-08-09 15:25:34 +02:00
mr.fantastic
75d758881d don't allow snapping hidden layers in bbox/equidistance snapping 2023-08-08 15:13:52 +00:00
lillolollo
93b4dbbbcd Update openexr to version 3 2023-08-07 22:45:40 +00:00
Jehan
5c96851431 devel-docs: for the 3.0 series, Win 10 becomes our minimal support.
After discussions on IRC with ender/Jernej and frogonia:

* exchndl.dll (drmingw) requires dbgcore.dll and dbghelp.dll which seem to ship
  with win10+, but not win7 (we don't know for Win8). So for Win7, Jernej had to
  manually add it back (otherwise, building then running on Win10, it looks
  fine, but GIMP fails to start on Win7).
* MSYS2 dropped Win7 support anyway and supports now Win 8.1+.
  See: https://www.msys2.org/docs/windows_support/
  So even though it looks like GIMP works fine on Win7 (after special-casing the
  2 DLLs above by adding them manually in the installed files), there might be
  unforeseen issues in the long run.
* Win7 official support by Microsoft now ended. And Win8 support is soon to be
  (it actually already has, "except for Server 2012 [based on Win8], which's
  supported for another 2 months"). Win8 never had much adoption anyway.
* frogonia confirms they didn't see many Win 7 reports, if at all, in the last
  year.

So based on all these, and in order not to make our life over-complicated, we
drop Win 7/8 support for the next 2.99 versions and for the upcoming stable 3.0
series.

Though we keep support to these versions in the 2.10 series, in order not to
disrupt current usage too much.
2023-08-07 23:52:17 +02:00
Jehan
00dd121ba0 build: sync nightly flatpak manifest with the beta branch on Flathub. 2023-08-07 20:28:46 +02:00
Jehan
342e9b10f6 gitlab-ci: crossroad repository was moved.
Crossroad repo was finally moved to Freedesktop.
See: https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/477

This should avoid the too many failures we have lately on TuxFamily
infrastructure (and also gives a proper bug tracker for Crossroad). I am very
thankful to TuxFamily for all these years! :-)
Let's not be said that I moved the repo because I don't like this friendly FLOSS
host anymore. I just needed something different for Crossroad project now.
2023-08-07 15:14:27 +02:00
Jehan
94344bdb46 gitlab-ci: fix the schedule pipeline for our nightly Windows installer.
This should fix:

> 'win-installer-nightly' job needs 'gimp-meson-debian' job, but 'gimp-meson-debian' is not in any previous stage
2023-08-07 14:32:00 +02:00
lillolollo
90cd3de741 Set the bug template as default 2023-08-06 20:45:25 +00:00
Idriss Fekir
89ad3a0ab5 Rename every font in fontconfig, not only the broken ones
Some fonts which pango identifies correctly, became broken
after renaming them in fontconfig, so the strategy was to
rename only fonts which pango can't see.

To check if pango got the correct font, the PangoFont
has to be loaded from PangoContext, which is costly.

It Turns out that querying FontConfig with more attributes
fixes this. Hence renaming every font doesn't affect
the fonts pango already sees.
2023-08-05 23:02:59 +00:00
Idriss Fekir
2b73a5996d Remove code path of not using fontconfig
We use fontconfig directly to rename fonts to fix some issues
with Pango (see MR !1011), and fontconfig is present on all
platforms supported by gimp (even on windows, pango is build with
fontconfig as a dependency), so it makes little sense to keep this
code path which is now never used.
2023-08-05 08:58:44 +01:00
Luming Zh
5c2353660f Update Chinese (China) translation 2023-08-04 20:32:37 +00:00
Luming Zh
9ff6c5c07c Update Chinese (China) translation 2023-08-04 19:49:09 +00:00
Luming Zh
eb6d1b485a Update Chinese (China) translation 2023-08-04 19:47:06 +00:00
Luming Zh
a265c9669a Update Chinese (China) translation 2023-08-02 18:48:19 +00:00
Boyuan Yang
45d644e4b8 Update Chinese (China) translation 2023-08-02 18:16:45 +00:00
Jacob Boerema
72ee6ff469 app: incorrect order of parameters in gimp_channel_select_round_rect
in gimpchannel-select.h
Looking at the version in gimpchannel-select.c, the calls made to it,
and also what is usual, the corner_radius_x should be before
corner_radius_y.

Found looking at the cppcheck logs.
2023-08-02 11:24:43 -04:00
Jacob Boerema
eee763b1c1 plug-ins: fix #9816 file-raw-data.exe Crash
When changing the width we got a division by zero crash because we
did not consider the case of bpp * bitspp being less than 8.

To fix this we check if bitspp is less than 8 and in that case multiply
the amount of bytes by 8 and then divide by the number of bits per
pixel.
2023-07-31 13:58:26 -04:00
Jacob Boerema
df8a349243 app: fix error on Windows with clang
When building using MSYS2 CLANG64 profile using clang 16, we get the
following error (besides other required patches):

../../gimp/app/widgets/gimpwidgets-utils.c:931:12: error: incompatible
pointer to integer conversion returning 'HGDIOBJ' (aka 'void *') from a
function with result type 'guint32' (aka 'unsigned int')
[-Wint-conversion]

For now, let's use the same GPOINTER_TO_INT macro we use in
gimpprogressbar.c. In the end, we need a 64-bit type available to
plug-ins, but that needs more work.
2023-07-31 13:58:26 -04:00
Jacob Boerema
b5be3376a9 ci: remove aalib artifact path
We don't build aalib ourselves anymore since it's now provided by MSYS2,
so this build artifact is obsolete. Let's remove it.
2023-07-31 13:58:26 -04:00
lillolollo
87ed4842b4 Update link to the performance log instructions 2023-07-31 03:46:35 +00:00
Alx Sa
4b54ceb023 plug-ins: Fix lava filter for non-square selections
Resolves issue #9809, fix by @mareroqpoland.
When "Separate Layer" is selected, the entire drawable is always
filled rather than using the selection. This patch uses the selection
instead (which will be "all" if there is no active selection)
2023-07-30 22:24:49 +00:00
Stanislav Grinkov
261eb28eb4 icons: add thin border around color/legacy tool-text icon...
... to make it visible on the dark themes.

Resolves: #9681 (Gitlab GNOME tracker)
2023-07-29 20:47:13 +06:00
Balázs Úr
30afce1cd0 Update Hungarian translation 2023-07-29 06:31:35 +00:00
Balázs Úr
a764bdcc7f Update Hungarian translation 2023-07-29 06:25:55 +00:00
Danial Behzadi
d4d2a09d8a Update Persian translation 2023-07-29 00:41:49 +00:00
Danial Behzadi
248cadcfd8 Update Persian translation 2023-07-29 00:36:28 +00:00
Danial Behzadi
9e72ad0cbb Update Persian translation 2023-07-29 00:33:06 +00:00
Yuri Chornoivan
2c9896506d Update Ukrainian translation 2023-07-28 13:39:26 +00:00
Yuri Chornoivan
37295576b5 Update Ukrainian translation 2023-07-28 13:35:49 +00:00
Martin
c64d7a71e3 Update Slovenian translation 2023-07-28 09:59:19 +00:00
Ekaterine Papava
c42e205efb Update Georgian translation 2023-07-28 03:53:10 +00:00
Jehan
22f120333f Issue #9655: both @blurb and @help arguments should be localized.
Looking further, the @help is only used in gimp_proc_view_new() so far (for the
Procedure Browser) where the blurb and argument descriptions are already
localized. It makes no sense to only keep this in English. So let's ask to have
both arguments translated.

Now clearly we should not ask for @help to be mandatory. Very often, it makes no
sense to have a longer help string (the small blurb and the few arguments may be
very self-explanatory). So I make this argument nullable.

There is only the @help_id which I wonder if we could not have a simpler
function gimp_procedure_set_documentation_uri(). Indeed while having a unified
infrastructure with a XML summary and help IDs and whatelse makes sense for GIMP
as a whole, I think that many third-party plug-ins would work much better with a
very simple direct URL. Or it could even be a GFile to a local file (for
plug-ins which want to embed their documentation in the plug-in folder for
instance). To be continued…
2023-07-27 22:59:51 +02:00
Jehan
ce0a84003c libgimp, libgimpconfig: GimpResource can now be (de)serialized.
I add a new class method deserialize_create() to GimpConfigInterface which
returns the GimpConfig object per deserialization, instead of modifying an
existing bare object.

This matters for cases like our GimpResource (and later our GimpItem) classes
which are fully managed by libgimp and should be unique objects per actual
resource. It should even be possible to compare the pointer itself for identity.
That's why we need to let GimpResource create the object (in reality request it
to the infra and only ref it) through this new class method.

With this commit and the previous ones, all GimpResource are now properly stored
as plug-in settings (e.g. the "film" plug-in has a font setting which is now
properly remembered).

These identifiers are not portable (across various installations and therefore
not for XCF either), but at least they are reasonably identifying data on a same
installation (unlike GimpResource's int ID which is only valid within a single
session) which makes them very fine for plug-in settings storage.

When a data file disappears, we fallback to the context default data instead.
2023-07-27 15:34:45 +02:00
Jehan
38c717b149 app, libgimp, pdb: private _gimp_resource_get_by_identifiers() PDB function.
This finds the core resource knowing its type, name, collection and internal
state (in other words, the values returned by _gimp_resource_get_identifiers()).
2023-07-27 15:32:16 +02:00
Jehan
fe58de7f81 app, libgimp, pdb: new private PDB call _gimp_resource_get_identifiers(). 2023-07-27 15:30:14 +02:00
Jehan
1a9c470b82 app: fix gimp_data_get_identifier() and add a concept of data collection.
The way we were creating a GimpData identifier was simply wrong, because it was
based on the assumption that the source file uniquely identifies a GimpData (cf.
gimp_tagged_get_identifier() which clearly says that the returned string must
uniquely identify this data). The very simple counter-examples for why this is
a mistake to consider a data file to be a good unique identifier are collection
files. For instance, TTC files (TrueType Collection) contain multiple fonts.

Instead I am adding the concept of "collection" with the assumption that
**within a given collection**, data names are unique (I do hope this to be and
stay true). So I add gimp_data_get_identifiers() and gimp_data_identify() to get
identifiers and check for identity.

The collection will use the old implementation of gimp_data_get_identifier()
because it is quite nice to have paths relative to data and config directories
(it allows some cases of data relocation without losing data identification).

The new implementation to compute a GimpTagged identifier on the other hand will
construct a string from the quality of being internal or not, the data name and
its collection.
2023-07-27 15:29:58 +02:00
Jehan
41ed091879 app, libgimp, pdb: add an internal gimp_context_get_resource().
This will be useful in an incoming code to serialize GimpResource PDB arguments.
2023-07-27 15:27:53 +02:00
Jehan
86cbb5232b pdb: fix a typo.
I guess we never use that type nowadays.
2023-07-27 15:27:29 +02:00
Jehan
d439e9ff5c app, libgimp, pdb: factorize a bunch of similar code into gimp_pdb_get_resource().
Rather than reimplementing the same checks for every possible resource data
type, just do it once and redirect to the correct factory container.

For the libgimp API, we leave per-type functions `gimp_*_get_by_name()` (where *
can be brush|gradient|font|palette|pattern so far), but internally they all use
gimp_pdb_get_resource().

Note that eventually we want these functions to return a list of resources as it
should be possible to have several resources of a given type with the same name
(since they are made by third-party who might have had the same idea of a name).
2023-07-27 15:25:32 +02:00
Jehan
ccde23ebaa libgimpconfig: don't break serializing properties if one property serialization…
… fails.

This happens for plug-in settings storage. Serialization stops at first failed
property serialization, whereas we could store more. This feels like the last
settings feature is broken.
2023-07-27 15:24:56 +02:00
Balázs Úr
13dcc85daa Update Hungarian translation 2023-07-26 23:40:40 +00:00
Alx Sa
f947109f92 build: Enable IFF format on Windows
Now that libiff and libilbm have been added to the MSYS2 repositories,
the plug-in can be built automatically on Windows.
2023-07-26 17:12:35 -04:00
Jacob Boerema
43a5b92c65 build: MSYS2 package python3-gobject was replaced by python-gobject 2023-07-26 16:29:22 -04:00
Jehan
b64543caff libgimpwidgets: create proper links in function documentation. 2023-07-26 15:25:39 +02:00
Martin
7b737ecff7 Update Slovenian translation 2023-07-26 08:57:13 +00:00
Martin
18081d1745 Update Slovenian translation 2023-07-26 08:55:42 +00:00
Ekaterine Papava
acc2baa7a6 Update Georgian translation 2023-07-26 03:57:22 +00:00
Ekaterine Papava
3d1325f52a Update Georgian translation 2023-07-26 03:49:57 +00:00
Jehan
269502cfe4 NEWS: update. 2023-07-26 00:53:00 +02:00
programmer-ceds
b84095d7c6 Fix Tools Shortcuts 2023-07-25 21:33:28 +00:00
Anders Jonsson
8b84c5551b plug-ins: add and correct gettext macros in Python 2023-07-25 21:26:57 +00:00
Jehan
21a329dae6 app: nearly all GimpFont object now have an associated file.
(except from the aliases "Sans-serif", "Serif" and "Monospace")

The code to get the file path was inspired by code in MR !1011 by Idriss Fekir.

My initial idea was to use FcFreeTypeQueryAll() when adding each font
individually through FcConfigAppFontAddFile() but we were only doing this for
our additional directories (not the system ones) and also before we actually
loaded all the fonts through FontConfig. So this would have required more work
to get right. Though it also means that now the ! USE_FONTCONFIG_DIRECTLY code
path is more broken than ever (as we consider this path information quite
important for plug-ins now).

Additionally to make this work, I got rid of the code making all GimpFont
objects internal data by default, which is nonsense to begin with. Fonts are not
writable by GIMP, sure, yet they are external to GIMP and loaded from a file!

This will be important for an upcoming commit (which is currently in a branch
related to issues #50 and #9250), where we want to implement GimpResource
storage as plug-in settings, because fonts were the only GimpData without a file
and we are using this information to generate a collection identifier.
2023-07-25 23:10:29 +02:00
Jehan
9f9c0b4ea6 app: GimpFontFactory doesn't force anymore unique font names.
Note that there is a `container_obsolete` too in GimpDataFactory and I don't
apply the "unique-name" property to it because I'm unsure what it is.

Furthermore, eventually we'll want all types of data to allow duplicate names
(brushes, patterns or whatnot may come from all sources and may be named the
same by different people). But for now, let's focus on fonts before breaking
other parts of the codebase which we might not look into right now.
2023-07-25 23:10:26 +02:00
Jehan
0226b3ff5e app: only display the number of ignored fonts (and full listing if…
… the GIMP_DEBUG_FONTS environment variable is set.

Turns out nearly a thousand font files get ignored on my installation (and I
don't install much; a lot of them seem to be bitmap fonts (PCF) in a X11
directory). I still want output so that this topic doesn't get forgotten and
hopefully some day, we can do better. But a single line on stderr (and an
environment variable for details) is enough for now.
2023-07-25 21:16:04 +02:00
Idriss Fekir
5972d8d97f Implement support for custom fonts
Remap font names to unique generated names
so that pango sees them.

keep the font name for display and the internal
name for everything else.

* Fonts are still broken When exporting to pdf

* Not sure if xcf files would be usable on other systems
maybe use hash of psname internally instead

* Not sure if plug-ins using text layer work correctly
(do they use internal font name or the actual name?)
2023-07-25 21:16:04 +02:00
Yuri Chornoivan
d337d2d196 Update Ukrainian translation 2023-07-25 19:04:17 +00:00
Jehan
490cb4ca3a app: rename snap data type to GimpImageSnapData and remove it from core-types.
This is definitely not core type material. Also it's much better in the proper
header gimpimage-snap.h and the type name should reflect the file namespace,
especially as we make it public.
2023-07-25 16:07:06 +02:00
mr.fantastic
a6cf90b208 Support showing distance by view unit in realtime alignment 2023-07-25 15:31:16 +02:00
mr.fantastic
9e793cfe87 Adding on canvas text for equidistance snapping visualization 2023-07-25 15:31:16 +02:00
mr.fantastic
58d85efe75 Adding visuals to snapping by bounding boxes and equidistance
- Avoid conflict between snapping to active point and bbox/alignment snapping
- rearrange bbox snapping calls to give layer center more priority
2023-07-25 15:31:16 +02:00
mr.fantastic
c47f4954ef Adding snapping by equidistance functionality 2023-07-25 15:31:16 +02:00
mr.fantastic
0aa8ac4660 Adding initial support for snapping layers/path_points by layers bounding boxes 2023-07-25 15:31:16 +02:00
Jordi Mas
54728e0fe1 Update Catalan translation 2023-07-25 10:53:09 +02:00
Shubham
a7379664e9 app: Fix extra drawing with airbrush tool on layers with offset
When using airbrush tool, if the layer has a offset, then the offset was
applied to the the coords multiple times creating a series of dots when
holding the airbrush still (from the gimp_airbrush_stamp function).
Fixed this problem by storing the original value of coords before it
gets updated.
2023-07-24 15:55:30 +00:00
Shubham
8463544502 app: fix broken symmetry on offset layers
Painting with symmetry enabled on layers with offset was broken. Fixed
it.
2023-07-24 15:55:30 +00:00
Martin
8f09092ed3 Update Slovenian translation 2023-07-24 10:33:25 +00:00
Idriss Fekir
959426d4ee Fix Font Inline completion not working in some cases
Inline completion is case sensitive, this makes it
broken, because fonts desplayed in the pop should be
quried in a case-insensitive manner.

This fixes #2832.

See gtk issue #275.
2023-07-23 22:29:02 +00:00
psykose
300ce655c3 create_test_env.sh: use sh instead of bash
this is actually a regular sh-portable script, and this prevents needing
bash at build time or for tests (for packaging from tarballs)
2023-07-23 21:06:49 +00:00
Yuri Chornoivan
0485e36cce Update Ukrainian translation 2023-07-23 18:04:04 +00:00
Yuri Chornoivan
690f8ae35e Update Ukrainian translation 2023-07-23 18:02:21 +00:00
Jehan
a7836feed3 NEWS: update. 2023-07-23 18:20:04 +02:00
Ekaterine Papava
c0915480d7 Update Georgian translation 2023-07-23 03:31:45 +00:00
Anders Jonsson
095af5629c extensions: more i18n for goat-exercises 2023-07-22 15:16:42 +00:00
Jehan
ba5b4794e1 libgimp: remove outdated recommendation about sending non-localized strings.
gimp_plug_in_set_translation_domain() was removed in GIMP 2.99.12. Plug-ins are
now fully responsible for their own localization.
2023-07-22 16:17:24 +02:00
Ekaterine Papava
56812b55ce Update Georgian translation 2023-07-22 03:57:00 +00:00
Martin
1c35aa797c Update Slovenian translation 2023-07-21 22:15:08 +00:00
Jacob Boerema
0fb801f7f5 pdb: forgot one case of behavior in previous commit 2023-07-21 17:03:32 -04:00
Jacob Boerema
18408ce966 app, libgimp, libgimpwidgets, plug-ins, etc: rename behaviour to behavior
We use US English which uses behavior. So we replace all occurrences of
behaviour.

Most notable is File Open behavior in preferences. Besides that several
mentions in function documentation and a few in comments.
2023-07-21 15:35:23 -04:00
programmer-ceds
4fa1472e9c Add terminating NULLs to the tools accelerator arrays 2023-07-20 22:59:51 +01:00
Yuri Chornoivan
53239a3ffa Update Ukrainian translation 2023-07-20 16:22:59 +00:00
Yuri Chornoivan
25f14743de Update Ukrainian translation 2023-07-20 15:59:46 +00:00
Martin
6efa8499e1 Update Slovenian translation 2023-07-19 06:33:11 +00:00
Ekaterine Papava
b242365908 Update Georgian translation 2023-07-19 04:17:18 +00:00
Ekaterine Papava
d8ea19fa0e Update Georgian translation 2023-07-19 04:15:28 +00:00
Alx Sa
d1864866ee plug-ins: Support Farbfeld image import/export 2023-07-19 00:37:54 +00:00
Martin
f7c3dee88d Update Slovenian translation 2023-07-18 22:15:58 +00:00
Sabri Ünal
66a5e30d5d menus: Use Header Capitalization in image-menu.ui
Follow Header Capitalization for The "Padding Color" string.

More information: https://developer.gnome.org/hig/guidelines/writing-style.html
2023-07-18 19:08:28 +03:00
Sabri Ünal
84124a9f40 app: Mark two strings as translatable
- Welcome
- Release Notes
2023-07-18 19:07:42 +03:00
Anders Jonsson
21152340c2 Update Esperanto translation 2023-07-18 15:15:02 +00:00
Lukas Oberhuber
c1b4770c40 debug: print stack trace without crashing 2023-07-18 10:24:17 +00:00
Ekaterine Papava
856fa41621 Update Georgian translation 2023-07-18 03:32:58 +00:00
Yuri Chornoivan
8754878dd6 Update Ukrainian translation 2023-07-17 21:08:04 +00:00
Yuri Chornoivan
b7ca157cf4 Update Ukrainian translation 2023-07-17 21:04:26 +00:00
Yuri Chornoivan
8e75c39164 Update Ukrainian translation 2023-07-17 20:57:06 +00:00
Martin
dfe086e88a Update Slovenian translation 2023-07-17 14:49:43 +00:00
Martin
619cb6fe6d Update Slovenian translation 2023-07-17 14:48:12 +00:00
Anders Jonsson
091893ddf5 menus, plug-ins: more tab menu translatability 2023-07-17 10:27:30 +00:00
Alx Sa
48845bdd6f themes: Prevent image tab close button from overflowing...
...the tab itself. Noted by @user062. This adds a right margin to the
close button on the image tabs so that the tab size is pushed out
to fit the button.
2023-07-17 06:43:23 +00:00
Boyuan Yang
9e6946f55e Update Chinese (China) translation 2023-07-16 23:45:39 +00:00
Jehan
b7da9e9cd7 app: fix removing items in GimpMenuModel.
Use the dedicated function rather than comparing strings.

Because of this, menu items for the "windows-display-*" actions were not
destroyed, neither were the relevant images because the proxy menu item was
keeping a reference to the image (for the small in-menu preview in Windows
menu).
2023-07-16 23:55:17 +02:00
Ekaterine Papava
a4afaecf6e Update Georgian translation 2023-07-16 04:53:00 +00:00
Anders Jonsson
87260fb8ac Update Swedish translation 2023-07-15 18:42:02 +00:00
Anders Jonsson
c1a8580215 Update Swedish translation 2023-07-15 18:41:17 +00:00
Anders Jonsson
f8fd1d9175 Update Swedish translation 2023-07-15 18:30:28 +00:00
Anders Jonsson
b9f2e157cb Update Swedish translation 2023-07-15 18:28:52 +00:00
Martin
fc43fe371c Update Slovenian translation 2023-07-15 16:50:35 +00:00
Martin
4396300a0c Update Slovenian translation 2023-07-15 16:49:31 +00:00
Martin
7ec86cd448 Update Slovenian translation 2023-07-15 16:47:57 +00:00
Jehan
42fc27763e menus: forward port 2.10 placeholder names into 3.0 section names.
It's nearly the same list of placeholders which will make it easier to
third-party developers (though format still changed, devs will have to add
square brackets for section names).

Now some section names are missing because we would need to break some list into
smaller sections yet want to avoid having separators everywhere. This makes me
wonder if removing my first placeholder implementation was the right idea.
Anyway this new implementation is cleaner and we should find a way to add
sub-sections without creating separators in menus.

Also I didn't try to add new section names (though I did once or twice, e.g. a
"Close" section around quit/close actions which didn't exist) but eventually we
should. Being able to name logically parts of the menus will make them even more
organized (if we can't name a group of actions, it may mean we didn't think
properly the organization and order).
2023-07-15 16:44:17 +02:00
Anders Jonsson
caff1e61e4 libgimpwidgets, plug-ins: translate dialog buttons
GTK no longer contains stock labels, so the button
labels needed to be marked as translatable.
2023-07-15 14:29:14 +00:00
Alx Sa
9c87aaeebd scripts: Fix warning in Java map tooltip text
Per @ajonsson, gettext does not like < or > used as symbols
and throws a warning. They are replaced with HTML entities
&lt; and &gt; to prevent the problem.
2023-07-15 14:23:01 +00:00
Jehan
dc8ba756e4 app: debug menu and playground should be visible on non-releases stable branch.
These should be hidden on stable releases and shown on unstable branch. But
we'll also want to show these in the stable branch, outside of release
(typically when we'll be at 3.0.1).
2023-07-15 15:06:51 +02:00
Jordi Mas
8d0393bd4d Update Catalan translation 2023-07-15 12:38:36 +02:00
Alx Sa
019c1ba5d9 themes: Remove "corners" around combo-boxes
The combo box button is contained within a box element.
The box was also having its background-color set,
so there were small square "corners" around each dropdown menu.
This patch separates the box color from the button color to prevent
this.
2023-07-15 02:51:41 +00:00
Jehan
e0c8358132 Issue #9322: pass the "hidden-when" attribute in gimp_menu_model_get_item_attributes().
This should hopefully hide (really this time?) the items we don't want to be
seen on macOS menu bar.
2023-07-15 01:37:37 +02:00
Jehan
502944fc02 Issue #9704: radio actions not showing as radio menu items on macOS.
This issue was also happening on other platforms when run with the
GIMP_GTK_MENUBAR codepath.
2023-07-15 01:15:45 +02:00
Jehan
dfdb698ce0 libgimp: update function's documentation. 2023-07-14 17:02:19 +02:00
Jehan
3b05315754 plug-ins: fix the Python test dialog.
With recent changes, a GimpResource's ID is not its name anymore.
2023-07-14 16:59:46 +02:00
Jehan
a964b80ad7 plug-ins: the Python test plug-in should be installed for unstable branch and…
… non-release builds.
2023-07-14 16:45:39 +02:00
Jehan
1b2f229bf6 app: top-level custom menus must be added before the "Windows" menu.
"Windows" and "Help" should always be last. New top-level menus (created by
plug-ins, scripts or GEGL ops) will be appended in the order of creation between
"Filters" and "Windows" menus.
2023-07-14 16:41:55 +02:00
Jehan
0bd3a45757 app: fix hiccups in creation of submenus by plug-ins/filters.
There were some mixups between a few representations of menus:

* "_Some Menu" and "Some Menu" should both map to an existing submenu "Some
  Menu" (in the GimpMenuModel, the stored path doesn't contain mnemonic).
* The menu item on the other hand should contain the mnemonic and not lose it.
* Not only this, but "Some _Menu" should still map to the same menu, even if it
  was already created with a different mnemonic. It means that the first
  registered menmonic "wins", as we don't want duplicate submenus with same
  title (even if they have different mnemonics).

So this new code is better handling the canonical menu path (no mnemonic, no
section name, no double slashes, no trailing slashes, etc.) vs. the
canonical-with-mnemonic menu path to avoid weird duplicates.

Some additional bugs are fixed where we were creating weird empty submenus
containing the same items as the parent menu as well, or when a submenu title
was a perfect prefix of another submenu title at the same level.
2023-07-14 16:21:57 +02:00
Martin
de7c74323f Update Slovenian translation 2023-07-14 09:05:55 +00:00
Martin
6040505563 Update Slovenian translation 2023-07-14 09:04:06 +00:00
Ekaterine Papava
d4e7b25a68 Update Georgian translation 2023-07-14 05:07:26 +00:00
Jehan
982d32e79e menus: hide some menu items on macOS.
File/Quit, Edit/Preferences|Input Devices|Keyboard Shortcuts should not be in
the main menu bar on macOS because they are already in the "app menu".

See #9322.
2023-07-13 23:41:18 +02:00
Jehan
4c1ae49fc9 plug-ins: update the Help/GIMP Online links.
- Remove the wiki which is now dead.
- Update the roadmap link and title it in plural.
- Move the "Bug Reports and Feature Requests" inside "GIMP Online/" submenu.
2023-07-13 23:13:19 +02:00
Anders Jonsson
d99b933243 menus: add missing submenus to image-menu.ui.in.in
This allows for translation and use of accelerators.
2023-07-13 21:30:14 +02:00
Martin
71e217617b Update Slovenian translation 2023-07-13 15:54:21 +00:00
Jehan
c369a5ed70 menus: make all section names non-translatable.
I'm not sure what's the default for random string attribute, but better be
explicit anyway. I think this way, we make sure that gettext won't try and
translate these.
2023-07-13 16:57:23 +02:00
Jehan
b9b1f4c53d app, menus: remove all placeholder code.
This is now fully replaced by the new section name code.
2023-07-13 16:53:11 +02:00
Jehan
9ad5049dec menus, plug-ins: now place various plug-ins in the right menu sections.
This removes a bunch of inconsistencies we had from the before-2.99.16 version
because new items from plug-ins were all added at the bottom of their respective
submenu.
2023-07-13 15:49:05 +02:00
Jehan
d9aa7a6ba1 app: allow a new attribute "section-name" to <section> of menus.
This will replace the "placeholder" concept where I was using an invisible item
with a label and no action, making it invisible. Instead let's just name
(internally) our sections. This has the following advantages:

* Conceptually more correct: basically we just want to place items among the
  same category of actions.
* Easier to search for plug-in developers who'll want to place their plug-in
  procedures in menus, because it uses an actually searchable attribute
  ("section-name").

This is used by the core by allowing a special syntax in menu paths: if finished
by "/[Section]" then the item will be place in the specific section named
"Section". In case one actually wanted to create a submenu called "[Section]",
they can use a double bracket: "[[Section]" and "[[Section]]" will both map to a
normal submenu (not a section name) titled "[Section]".
All other usage of square brackets will not be processed in a particular way.
E.g. "Hello [World]" will end a submenu titled "Hello [World]" or "Bye]" will be
a submenu and so on.

Finally this system is currently limited to the position of the item itself,
i.e. must be placed as last element in the path. In particular, you currently
cannot use it to position a new submenu inside a section. E.g. say that I want
to create a submenu "From Platforms" under the "Open" section of the File/ menu.
This is currently impossible. With this syntax, we can create new items directly
in the "Open" section, or create a "From Platforms" submenu in the end of the
File/ menu, containing our new procedures.
This could be a good improvement to come.
2023-07-13 15:39:50 +02:00
Ekaterine Papava
9efd5fd4f2 Update Georgian translation 2023-07-13 05:04:13 +00:00
Ekaterine Papava
04a39c2ca1 Update Georgian translation 2023-07-13 05:00:50 +00:00
Ekaterine Papava
26683e574a Update Georgian translation 2023-07-13 04:55:50 +00:00
Luming Zh
2e67a21bd7 Update Chinese (China) translation 2023-07-13 00:13:22 +00:00
Alx Sa
ab93a1484a meson: Add option to compile Amiga IFF
Code provided by @lillolollo
Since libilbm and libiff are not in all repositories yet, this adds an option so
it is not required when building GIMP.
2023-07-12 22:55:20 +00:00
Jacob Boerema
b82419305b plug-ins: fix formatting in animation-optimize
A lot of the function calls did not have a space between function name
and opening parenthesis.
2023-07-12 16:45:26 -04:00
Jacob Boerema
5cdfa6e891 plug-ins: fix resource leak in animation-optimize 2023-07-12 16:45:26 -04:00
Jacob Boerema
5f1b0aab87 plug-ins: reduce chance of buffer overflow when copying strings
Sphere-designer: Since some of the strings are translated versions, we
can't know in advance how long they are going to be.
Let's use string copy/cat functions that explicitly check the size and
are guaranteed to add a NULL.
2023-07-12 16:45:26 -04:00
Yuri Chornoivan
35fba13d96 Update Ukrainian translation 2023-07-12 15:07:27 +00:00
Martin
469f1a145c Update Slovenian translation 2023-07-12 14:15:14 +00:00
Anders Jonsson
4239d1af44 plug-ins: uncomment animation-play in POTFILES.in
The animation-play plug-in was readded in
6bb03dc21a

Also remove it from POTFILES.skip together with
curve-bend that already had been reactivated.
2023-07-12 13:22:26 +02:00
Jacob Boerema
6c8625e5fc plugins: fix #8082 XWD file renders incorrectly 2023-07-11 18:26:05 -04:00
Jacob Boerema
ea68d87b66 plug-ins: clean up file-xwd
- Add modern error handling using GError.
- Check return values of fseek and fgetc for errors.
- Remove most occurrences of g(u)long.
- Fixed overflow issue with maxred/green/blue found with coverity.
2023-07-11 18:17:42 -04:00
Jacob Boerema
6484193d8f script-fu: fix out-of-bounds array access
I noticed this in coverity. I couldn't find any actual script using
SF_DISPLAY, so the impact probably isn't very big.
Because the enums start at 0, the size of the array should be at least
one more than the value of the last enum, which was not the case here.

Increase the size of the array by 1, so that accessing SF_DISPLAY,
which is the enum with the highest value, is valid.
2023-07-11 12:04:24 -04:00
Alx Sa
624ae512fc plug-ins: Fix typo in gfig-arc
Resolves #5742.
The check is for a horizontal line (where the Y coordinate
would be the same for all three points), but the X axis was
checked instead due to a copy/paste error.
2023-07-11 15:25:39 +00:00
Jehan
ae29736ee0 app, libgimp, pdb: fix annotations for resources as return values.
Resources are stored by the plug-in infrastructure and their memory should not
be managed by plug-in code.

My commit 4f69995b46 was crappy and modified a generated function. I was just
too tired with all the heat in here, I guess!
2023-07-11 16:16:21 +02:00
Anders Jonsson
30319739ed .gitlab: update link in merge request template 2023-07-11 12:47:12 +00:00
Jehan
4be2dfdee2 devel-docs: our macOS package minimum requirement is now 10.13 (High Sierra). 2023-07-11 14:20:28 +02:00
Jehan
4f69995b46 libgimp: fix annotations for gimp_brush_get_by_name().
Similarly to how we handled image items, all resources are handled and stored by
the plug-in infrastructure and should not be destroyed. This wrong annotation
was triggering bindings to unref resources when going out of scope, hence
crashing plug-ins.
2023-07-11 12:00:22 +02:00
Jehan
d54c511968 plug-ins: use proper gimp_brush_get_by_name().
Note that in the future, we expect this to be possible to create other brushes
with a same name. Maybe we should have a special function allowing to request
core resources (the ones installed by GIMP itself).
2023-07-11 12:00:22 +02:00
Jacob Boerema
d43075dca0 plug-ins: incorrect order of parameters in load_image_resource
Even though these parameters are currently not used here, better use
the correct order.
2023-07-10 17:50:08 -04:00
Jacob Boerema
63bb893c06 plug-ins: fix resource leak in psd-load
Adding unsupported messages was overwriting the old message without
first freeing it. In addition, the first message was initialized
as a string constant.
We now start with duplicating the (empty) string, so that it can be
freed. We then add a define to reduce boilerplate to add the string
for each unsupported feature. The code in this define takes care of
adding the new message and freeing the old message.
2023-07-10 17:50:08 -04:00
Martin
a9f642322d Update Slovenian translation 2023-07-10 20:44:12 +00:00
Yuri Chornoivan
c7d32f37c6 Update Ukrainian translation 2023-07-10 19:44:56 +00:00
Jacob Boerema
bbbd149ba3 plug-ins: fix possible integer overflow on large images in jigsaw
Make sure we use gsize for intermediate results to not get integer
overflow on large image sizes.
This still is not ideal, but better than a crash, since we may (try to)
allocate a very large block of memory, which we should eventually fix
by looping over smaller size buffers.
2023-07-10 14:19:07 -04:00
Jacob Boerema
97a71cfd41 libgimp: fix resource leak in gimpimagemetadata-save 2023-07-10 14:19:07 -04:00
Ekaterine Papava
8febbf9da8 Update Georgian translation 2023-07-10 17:08:06 +00:00
Jacob Boerema
03e32e6fd3 app, pdb: silence coverity warning about integer overflow
Brushes can't be large enough to actually cause overflow here, but
since the result is gsize, it can't hurt to have the intermediate
results to gsize too.
2023-07-10 12:30:24 -04:00
Jacob Boerema
5645abc051 plug-ins: fix meson deprecated warning for file-icns 2023-07-10 12:30:24 -04:00
Anders Jonsson
44108eb9c3 app: make debug menu translatable 2023-07-10 14:58:49 +00:00
Jehan
e6ccea7c39 app: verify that the GimpUIManager exists.
Though I didn't encounter this bug in my commit 54b22c717a, 2 unit tests are now
failing with:

> Bail out! Gimp-Widgets-FATAL-CRITICAL: gimp_ui_manager_update: assertion 'GIMP_IS_UI_MANAGER (manager)' failed

I am assuming this is a consequence of this code I just changed.
2023-07-10 16:58:15 +02:00
Martin
82b1fd6c2e Update Slovenian translation 2023-07-10 13:56:48 +00:00
Jehan
4ddf6ae8f6 Issue #9725: top menus and sub menu not translated.
Adding 2 missing .ui files.
2023-07-10 12:11:34 +02:00
Jehan
54b22c717a app: make sure gimp_ui_manager_update() is run from the main thread.
This GTK widget code could be reach from a thread calling gimp_image_flush().
Yet all GUI-related code must happen in the main thread (also even though
actions are not GTK code anymore, they can trigger GUI updates).

No issue happened from this so far (that we know of), but a trace by SBDaule for
their growing layer project showed that we'd reach this code if calling
gimp_image_flush() from the paint thread.
2023-07-09 23:24:07 +02:00
Jehan
e465e867c1 NEWS: typo fix. 2023-07-09 22:21:00 +02:00
Jehan
760e912d20 INSTALL: add some packages in the optional packages list. 2023-07-09 13:32:51 +02:00
Niels De Graef
ed1ad72255 pdb: Fix size in gimp_image_get_colormap
It looks like we left out the multiplication by 3 when passing the
colormap size to get to the number of bytes in commit 89c359ce

This fixes a crash when saving an XPM file

Fixes: https://gitlab.gnome.org/GNOME/gimp/-/issues/9711
2023-07-08 23:08:54 +02:00
Alx Sa
b9e49a3fd9 tools: Fix hiding on-canvas text editor
After 59cb3e36, the GimpOverlayFrame that contains
the on-canvas text editor is still partially visible as a dot.
This patch now hides and shows that as well based on
the "Show On-Canvas Editor" option.
2023-07-07 23:11:22 +00:00
Alx Sa
69ddbeba29 themes: Hide 1/0 labels on GtkSwitch sliders
Resolves #9676.
Per @pixelmixer and @programmer_ceds's research,
setting the color attribute on the switch's image children
removes the 1/0 labels on non-System themes.
2023-07-07 18:56:34 +00:00
Jehan
2c608168a2 plug-ins: don't use Tabs indentation, only space.
This was introduced in commit 95fa902827. Unfortunately Gitlab web UI is really
not good at showing indentation issues (or any other space coding style issues,
for that matter).
2023-07-07 17:38:23 +02:00
Luming Zh
13dd829335 Update Chinese (China) translation 2023-07-07 12:13:43 +00:00
Luming Zh
b18894ccfd Update Chinese (China) translation 2023-07-07 12:09:41 +00:00
Jehan
1319523de7 app: no need to show the "Merge menu and title bar" option on macOS.
This doesn't do anything in this case, so better hide the settings.
2023-07-07 13:51:29 +02:00
Jehan
6d2580a421 meson.build: post-release version bump to 2.99.17. 2023-07-05 18:09:54 +02:00
Jehan
d3c5536ac8 Release development version GIMP 2.99.16. 2023-07-05 16:00:47 +02:00
Jehan
74fee1a957 desktop: update release date (to today) in AppStream file. 2023-07-05 15:57:24 +02:00
Jehan
18e47a29e0 NEWS: last update (this time really!) before GIMP 2.99.16 release. 2023-07-05 15:49:33 +02:00
Jordi Mas
daa19fc2db Update Catalan translation 2023-07-05 14:00:59 +02:00
Jehan
1b3af8a89b Issue #9648: don't flush the image when selecting items.
This results in an infinite loop and there is no change done, so no reason to
flush anything. Mitch had a fix for this (probably the same, per the IRC
discussion), but I really wanted to just release GIMP 2.99.16. So Mitch, if you
read this, sorry for not waiting for you to push this one!
2023-07-04 22:10:40 +02:00
Jehan
c95b8518fe app, icons: use the Python executable found by pythonmod.find_installation().
We already search for a compatible Python version in the root meson file, no
need to look up Python 3 again in the PATH, each time we run an external Python
script in the build.

This should hopefully fix #9687.
2023-07-04 19:00:55 +02:00
Jordi Mas
95fa902827 Specify no format to prevent the % to be interpreted as formatter by the gettext toolchain 2023-07-04 14:39:11 +02:00
Jordi Mas
ca404795e3 Update Catalan translation 2023-07-04 12:42:58 +02:00
Lukas Oberhuber
df4ed9c1ec app: Fix key presses not working on mac
Part fixes #9322. This was making GIMP on MacOS unusable.
2023-07-02 15:57:44 +01:00
Jordi Mas
780cda6f72 Update Catalan translation 2023-07-02 07:40:17 +02:00
Alexandre Prokoudine
df9a7f9ca1 Update Russian translation 2023-07-02 02:19:29 +02:00
Jehan
274b734e61 libgimp: fix double free crash in gimp_drawable_get_thumbnail(). 2023-07-01 23:24:33 +02:00
Jehan
8e4850dafe build: fix (hopefully) lua in the Windows installer.
See: https://gitlab.gnome.org/GNOME/gimp/-/issues/9653#note_1780587

Looking at MSYS2 logs, it looks like they very recently "fixed" the search paths
for lua files, which in turn broke our workaround (searching in subdirectories
of bin/ instead of share/ and lib/).

This should work better (though untested) with the workaround removed now.

Commit on luajit package at MSYS2:
703c7bae2f
2023-07-01 22:12:13 +02:00
Yuri Chornoivan
e32a67d948 Update Ukrainian translation 2023-07-01 20:06:36 +00:00
Yuri Chornoivan
1a23fc5e9a Update Ukrainian translation 2023-07-01 20:04:25 +00:00
Martin
1186a5dbcc Update Slovenian translation 2023-07-01 18:56:32 +00:00
Marco Ciampa
53f929dc9c Updated Italian translation 2023-07-01 12:00:38 +02:00
Marco Ciampa
95c141007c Updated Italian translation 2023-07-01 11:50:57 +02:00
Asier Sarasua Garmendia
7219245bfb Update Basque translation 2023-07-01 09:23:11 +00:00
Anders Jonsson
f8aa50204f Update Swedish translation 2023-07-01 09:13:23 +00:00
Ekaterine Papava
16a921da37 Update Georgian translation 2023-07-01 06:09:22 +00:00
Jacob Boerema
9038fd2c13 libgimpwidgets: issue #9673 screenshot plug-in crashes
In commit 48c27770 some unicode related changes were made. As a result of
that on Windows display_device, which was previously a duplicated string,
is now referenced directly.
However, the g_free was not removed, causing a crash.

We resolve this by removing the obsolete g_free.
2023-06-30 17:43:39 -04:00
Alx Sa
d68c7f612f plug-ins: Clarify JPEG subsampling option labels
Resolves #5525.
"4:4:0" is the more well-known term rather than "4:2:2 vertical" for this subsampling option.
2023-06-30 17:28:52 +00:00
Jehan
c21dbc8a20 tools: better support of using --runtime with --beta or --nightly. 2023-06-30 18:35:06 +02:00
Anders Jonsson
ba2b7550f7 Update Swedish translation 2023-06-30 16:26:03 +00:00
Alx Sa
3cf5a587ce plug-ins: Match RGB FITS orientation to SiriL
Switching to the cfitsio library's fits_read_img () function in 03ea666f 
caused RGB FITS images to be read in upside down per SiriL developers and
NASA standards (odd, since cfitsio is maintained by NASA). This flips them back.
2023-06-30 16:01:39 +00:00
Martin
71fa32424c Update Slovenian translation 2023-06-30 15:59:48 +00:00
Jacob Boerema
14cce79d16 app: use hyphen for the precision settings in Encoding submenu
The Microsoft style guide and other places online suggest that using a
hyphen is recommended between a number and the related word, when modifying
a noun, so let's do that in our Image -> Encoding submenu too.
2023-06-30 11:37:19 -04:00
Martin
3d7fa18c6d Update Slovenian translation 2023-06-30 15:29:06 +00:00
Martin
7f08ad4d76 Update Slovenian translation 2023-06-30 15:27:44 +00:00
Martin
7521c3dd70 Update Slovenian translation 2023-06-30 15:26:24 +00:00
Anders Jonsson
fee62e2b05 NEWS: Typo fixes 2023-06-30 12:21:09 +02:00
Asier Sarasua Garmendia
27acf41699 Update Basque translation 2023-06-30 08:01:45 +00:00
Alx Sa
03ea666fc8 plug-ins: Fix regression on importing RGB FITS
The developers of SiriL sent me some RGB FITS images that rendered incorrectly
after d4f42076. These must be read in as 
planes rather than individual rows.
2023-06-29 15:31:50 +00:00
Jehan
84fb879973 NEWS: possibly finale update before 2.99.16 release. 2023-06-29 12:13:33 +02:00
Jehan
e1203e9f76 gitlab-ci, build: create Windows installer files with the Linux build.
The creation of the BMP welcome images for the Windows installer (part of
-Dwindows-installer=true build option) fails in the Windows job. After much
debugging, I could run GIMP, yet it was not enough. One of my hypothesis so far
is that the environment variables for DLLs won't work, since all the DLLs must
be in the same directory as the main binary (though with the WSL thing, I am
unsure, maybe it is still supposed to work), which only happens once GIMP is
installed. So GIMP runs successfully but not plug-ins.

Anyway I wasted too much time working on this and without a local Windows, it
just takes too long (mostly testing thanks to the CI) and is frustrating. Let's
just move to building both the localization files and the images on the main
Debian job (gimp-meson-debian), then use these as dependencies of the
win-installer-nightly job, i.e. when building the installer.
2023-06-29 00:21:44 +02:00
Jehan
8db25f2246 build: prepend in case the environment variable already exists.
The common order logic for list of directories in environment variables is that
left paths have precedence. This is at least the case for LD_LIBRARY_PATH (and
probably GI_TYPELIB_PATH too).
Make sure that our local libraries and introspected binaries (in the build
directory) are used and not any version installed on the system or by previous
`ninja install` calls.
2023-06-29 00:21:29 +02:00
Jehan
757adf94bb app: do not load images interactively when we have no interface.
This includes both cases when running gimp-console or running GUI gimp with
--no-interface option.
2023-06-29 00:09:28 +02:00
Jehan
2825fa67e0 build: build images with gimp-console if available.
This was a first attempt at fixing this error on the CI:

> Cannot open display:

Though it was not enough (see next commit calling plug-ins as non-interactive
when called without interface), it is still a useful change overall.
2023-06-29 00:09:28 +02:00
Jehan
9d03cdd9ae build: remove test on now-removed Makefile.am for lang list consistency. 2023-06-29 00:09:28 +02:00
Jehan
f5001a4c8c plug-ins: we must output the dummy file in the same directory. 2023-06-29 00:09:28 +02:00
Alexandre Prokoudine
05b06b1c8d Update Russian translation 2023-06-28 02:00:26 +02:00
Jacob Boerema
f65d8e8730 app: silence warning in gimpimage-convert-indexed
We had the following warning:
In function 'make_remap_table',
    inlined from 'gimp_image_convert_indexed' at
  ../../gimp/app/core/gimpimage-convert-indexed.c:1057:7:
D:/msys64/mingw64/include/glib-2.0/glib/gmem.h:261:19: warning: argument 1
 range [18446744071562067968, 18446744073709551615] exceeds maximum object
 size 9223372036854775807 [-Walloc-size-larger-than=]

This is apparently caused by inlining in combination with using a signed
int.
See also: https://gcc.gnu.org/bugzilla//show_bug.cgi?id=85783

Casting to (guint) silences the warning here.
2023-06-27 14:15:34 -04:00
Alexandre Prokoudine
0c453edc78 Update Russian translation 2023-06-27 19:21:14 +02:00
Jehan
9e9fe1435a build, plug-ins, gitlab: make GIMP runnable from build directory without…
… being installed.

There is already most of the main code logic for this, though now plug-ins need
to be in their own subdirectories, which breaks for plug-ins/common/ and
plug-ins/python/, while I needed plug-ins in both these categories to generate
the Windows installer welcome images (file-png, and python-fu-eval in
particular).

Once again, meson was not very helpful, since all its functions still refuse to
output generated files in subdirectories, so I end up duplicating plug-in files
with a custom Python script.

This should fix the CI. It was working on my machine as GIMP was installed, but
such a build rule should work even without GIMP installed.
This will also be useful in the future when we'll want to run unit tests of
plug-ins through the finale GIMP binary itself.
2023-06-27 17:46:46 +02:00
Jehan
9ccdd56a36 build: run build/windows/meson.build before app/ plug-ins/ and extensions/.
Fixes:

> ../extensions/goat-exercises/meson.build:12:4: ERROR: Unknown variable "gimp_plugins_rc".
2023-06-27 01:01:50 +02:00
Jehan
2fd25fe6bd build: generate the Windows installer welcome images from the splash screen.
After discussion with Jernej, InnoSetup should now work better with rescaling
a big image properly to the window size, yet the ratio should still matter.
Apparently the welcome image is a hack and this is why it requires specific
ratio images. We don't use the big size yet, but since Jernej told me which
dimensions are expected, I already added the code for it to make it easier
later.

So anyway this code would allow us not to have to commit welcome images each
time, which are basically resized copy in BMP of the splash screen, slowly yet
surely filling up our repository with image duplicates.
After all, we develop a scriptable image editor! We should use it to edit images
and export in expected formats!

I only use this script for the devel installer for now, for testing and see how
it goes.
2023-06-27 00:39:17 +02:00
Yuri Chornoivan
8676907c6d Update Ukrainian translation 2023-06-26 18:58:17 +00:00
Yuri Chornoivan
3dadf8899a Update Ukrainian translation 2023-06-26 18:56:47 +00:00
Jehan
2696372680 build: add missing dependencies in packaging script.
While some packages may be needed only when building (and others only when
packaging), we should probably have a shared list of packages needed for both
steps so that we avoid discrepancies which lead to missing libraries in our
installer.

See: https://gitlab.gnome.org/GNOME/gimp/-/issues/9653#note_1777596
2023-06-26 19:27:59 +02:00
Anders Jonsson
0c464718b4 Update Swedish translation 2023-06-26 17:26:01 +00:00
Daniel Novomeský
a4f0239818 plug-ins: support libjxl v0.9 decoding API 2023-06-26 16:41:05 +02:00
Alx Sa
8a53b7c219 widgets: Fix compiler warning in gimpcontainerview
Initialize "border" to 0 to remove a warning that
"'border' may be used uninitialized"
2023-06-26 14:12:42 +00:00
Alexandre Franke
7f74ff976e Update French translation 2023-06-26 08:56:03 +00:00
Jehan
71e25a1ac1 NEWS: update. 2023-06-26 02:41:01 +02:00
Jehan
3cb43bef93 app: localize GEGL filter's action default short label template.
Even though it's just for 3 dots, this may actually be formatted differently in
different languages. Let's not assume we all share this punctuation mark.
2023-06-26 02:19:26 +02:00
Øyvind Kolås
7277baea54 meson,app: depend on GEGL-0.4.46 2023-06-26 00:56:58 +02:00
Niels De Graef
26f967e998 app: update relevant comments about Wayland hotspot 2023-06-25 22:21:37 +00:00
依云
edfded372d app: don't scale hotspot in Wayland
The hotspot coords are in the cairo surface's coords space, and the
cairo surface has half the size as the x2 pixbuf because of scale=2,
which makes the hotspot coords remain the same.

With regard to the referred code snippet in the comment[1], the coords
have been scaled in gdk_cursor_new_from_surface.

This fixes https://gitlab.gnome.org/GNOME/gimp/-/issues/9047.

[1]: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/545#note_1388777
2023-06-25 22:21:37 +00:00
Jehan
6a9838c804 plug-ins: fix build warnings.
Fixes several missing declaration warnings because in fact of missing include,
such as:

> warning: no previous declaration for ‘console_editor_new’ [-Wmissing-declarations]

Fixes 2 old-style definitions:

> warning: old-style function definition [-Wold-style-definition]
2023-06-25 23:43:40 +02:00
Alexander Shopov
f0ab126563 Update Bulgarian translation 2023-06-25 19:45:54 +00:00
Anders Jonsson
eb25374670 Update Swedish translation 2023-06-25 19:38:34 +00:00
bootchk
7b9b5db69e SF Console history persist as GStrv setting.
Other driveby format and wording changes to dialog title, welcome text.

Part of issue 9579 SF roadmap
2023-06-25 18:28:03 +00:00
lillolollo
691ec70c0e Eliminate warning: ‘gimp_unique_dbus_open’ defined but not used [-Wunused-function] 2023-06-25 18:01:45 +00:00
Jehan
23a87ce4e3 Issue #9350: fix GimpMenu separator lines being randomly thick (other case).
The previous commit did fix one such reason (multiple separators next to each
other), but I realized there is one other case where single separators are just
too big: when the menu is embedded in a GtkHeaderBar, each separator would have
a weird margin of several pixels (at least in my case, probably taken from the
underlying system theme). And worse, this margin was using another background
color.

So anyway this CSS rules takes care of not adding weird margins to menu
separators.
2023-06-25 19:28:54 +02:00
Anders Jonsson
c6240a2002 Update Swedish translation 2023-06-25 17:25:43 +00:00
Jehan
ff91a0ac3d Issue #9350: fix GimpMenu separator lines being randomly thick. 2023-06-25 19:04:37 +02:00
Yuri Chornoivan
5eaec7edf1 Update Ukrainian translation 2023-06-25 13:43:57 +00:00
Yuri Chornoivan
aae7d2f16a Update Ukrainian translation 2023-06-25 13:40:56 +00:00
Anders Jonsson
f6b0f7a50b Update Swedish translation 2023-06-25 13:00:01 +00:00
Anders Jonsson
fa04370cd1 Update Swedish translation 2023-06-25 10:33:35 +00:00
Jordi Mas
fb186a9846 Update Catalan translation 2023-06-25 09:40:32 +02:00
Ekaterine Papava
f3aaf876df Update Georgian translation 2023-06-25 07:22:33 +00:00
Martin
83c8cdaee9 Update Slovenian translation 2023-06-24 22:25:54 +00:00
Alx Sa
ca3c709d56 core: Add color/pattern only fill options
Resolves issue with #8461.
This provides a conditional value for the fill options to only show
a color and pattern, rather than fore/background colors.
Currently only used for the text editor.
2023-06-24 19:42:58 +00:00
Martin
fad2ab33fa Update Slovenian translation 2023-06-24 19:20:37 +00:00
Jehan
5bf0ece215 app: fix build warning.
Though not a bug, this change will get rid of the following warning:

> app/dialogs/module-dialog.c:291:28: warning: ‘location’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>   291 |       text[INFO_LOCATION]  = gimp_module_is_on_disk (module) ?
2023-06-24 18:42:44 +02:00
Alexander Shopov
6b6928192c Update Bulgarian translation 2023-06-24 09:04:22 +00:00
Martin
b43a7f5635 Update Slovenian translation 2023-06-23 21:18:56 +00:00
Alx Sa
280cde75f4 plug-ins: Port checkerboard to...
...GimpProcedureDialog
2023-06-23 14:13:29 +00:00
Alexander Shopov
d910d733e4 Update Bulgarian translation 2023-06-23 08:10:05 +00:00
Ekaterine Papava
6d346701cd Update Georgian translation 2023-06-23 03:28:15 +00:00
Jehan
aecf22defb libgimpwidgets: fix the non-resizing combo-box popup when switching from short…
… to long format of unit names.

We can clearly see that the main part of the widget is correctly resized but not
the popup. Unfortunately we don't have access to the popup widget which is
private data, so the best workaround I found so far was to pop the menu down and
up, which basically provokes a redraw to the correct size after contents change.

This fixes MR !385.
2023-06-23 00:46:20 +02:00
Venkatesh
dc3eb3b340 MR !385: resolve "GimpUnitComboBox doesn't show full unit names in 2.99" 2023-06-22 22:38:25 +00:00
Jehan
8ef8ac58aa app: fix crash when loading a XCF containing a text layer with pattern outline.
There was a bug in commit ca6b58e970 which went under the radar. The gimp
variable was not set at creation, so this line was crashing:

> container = gimp_data_factory_get_container (text->gimp->pattern_factory);
2023-06-22 22:23:05 +02:00
Jehan
cdc9fa9907 app: migrated (style solid) in gimprc.
Since MR !706, (style solid) doesn't exist anymore which makes gimprc parsing
fails (hence losing configuration).

This fixes:

> Gimp-Config-Message: 21:20:21.018: Error while parsing '/home/jehan/.config/GIMP/2.99/gimprc' in line 18: invalid value 'solid' for token style
> Gimp-Config-Message: 21:20:21.018: There was an error parsing your 'gimprc' file. Default values will be used. A backup of your configuration has been created at '/home/jehan/.config/GIMP/2.99/gimprc~'.
2023-06-22 21:30:13 +02:00
Alx Sa
ce6f7179ab core: Replace "Solid Colors" with "FG/BG Colors"
Replaces "Solid Colors" option in Fill Path with Foreground/Background
Colors options. This allows users to fill with either, rather than
having to switch the foreground color each time.
GIMP_CONTEXT_PROP_MASK_BACKGROUND was added to the fill and stroke
contexts to allow the background color to be recognized.
In places where Solid Color was used as a default, Foreground Color is
now used instead.
2023-06-22 18:46:14 +00:00
Ekaterine Papava
809713512d Update Georgian translation 2023-06-22 06:37:40 +00:00
Ekaterine Papava
2480de96fa Update Georgian translation 2023-06-22 06:31:29 +00:00
bootchk
ef662fa02a libgimp: fix #9304 API TextLayer
Adds needed change missing in commit that added class GimpTextLayer
2023-06-21 21:54:04 +00:00
Andras Timar
da0ea189fc Make transform matrix selectable
In our use case it is necessary to save the transform matrix, and the
easiest solution is to make the label selectable. If we print the
whole matrix into a single label, formatted with tabs and linefeeds,
then the whole matrix can be copied with a single operation.
2023-06-21 21:02:23 +00:00
Alx Sa
59cb3e36e1 app: Toggle on-canvas text editor visibility
This adds a new boolean to text options, "Show on-canvas editor".
When toggled, it immediately hides (or re-shows) the current
text layer's on-canvas text editor.
It uses the same signal and function as the "use-editor" property.
2023-06-21 20:17:27 +00:00
Jehan
b48ce94e6a app: replace g_action_map_lookup_action() by gimp_ui_manager_find_action().
With more recent logic, not all actions are inside the application's action map.
We need to look up actions in our GimpUIManager.
This fixes failing to find the actions with the "text-editor." prefix (in the
text tool editor's toolbar).
2023-06-21 22:17:09 +02:00
Alx Sa
01d7e7a992 actions: Fix "Raise or Open" to actually raise
Resolves #9636.
gimp_object_get_name (gimp_display_get_image (display)) returns NULL 
instead of the filename. documents_raise_display was changed to call 
gimp_image_get_imported_file () or gimp_image_get_file() instead to 
get the actual filename.
2023-06-21 20:10:12 +00:00
Jehan
a580f47e22 plug-ins: fix previous commit (!901).
Config string properties are allocated. We can't use static strings.

Also fixing an unused variable (mesg_body) warning.
2023-06-21 21:38:36 +02:00
Alx Sa
51cf74c036 plug-ins: Port mail to GimpProcedureDialog 2023-06-21 19:36:28 +00:00
Alx Sa
e152591e80 plug-ins: Don't run Depth-Merge when cancelled.
When porting depth-merge to GimpPlugin in 5154b271 the return statements
were not fully replicated. As a result, the depth-merge function was 
called even if the dialogue had been cancelled.
This patch adds the missing return statements to prevent this.
2023-06-21 19:01:32 +00:00
Jehan
2541389b0c plug-ins: don't use a hardcoded 256 as max border.
Half of the smaller dimension seem a better value, since once we reach any half,
it means we will compute using all pixels anyway. Any width higher than this is
useless.
2023-06-21 17:33:04 +02:00
Alx Sa
2baa518a30 libgimpwidgets: Don't call scaled digits on pixels
Adds a check to cast resolution to an int if units are pixels,
rather than calling gimp_unit_get_scaled_digits().
This prevents a LibGimp-CRITICAL about "_gimp_unit_cache_get_digits: 
assertion 'unit >= GIMP_UNIT_INCH' failed"
2023-06-21 14:05:19 +00:00
Alx Sa
519b627f5d plug-ins: Port border-average to...
...GimpProcedureDialog.
Also provides an example of the new 
gimp_procedure_dialog_get_size_entry () API.
2023-06-21 14:05:19 +00:00
Alx Sa
6be4549e46 libgimp: new gimp_procedure_get_size_entry ()
This allows plug-in developers to create GimpSizeEntry
widgets with the procedure dialog API.
2023-06-21 14:05:19 +00:00
Jehan
4136166d12 libgimp: fix gimp_drawable_get_sub_thumbnail_data().
Since commit 89c359ce47, it's supposed to return a GBytes, yet it was returning
raw data (probably intermediate hacking state which was not properly cleaned
up).

It was crashing for instance GimpDrawablePreview widgets at drawing time.
2023-06-21 00:12:20 +02:00
Alx Sa
4b8f2113f3 pdb: Fix datatype mismatch created by 2a946712 2023-06-20 17:03:21 +00:00
Alx Sa
2a94671269 pdb: Allow ripple to take floating point inputs
Partially resolves #7211.
plug-in-ripple is a wrapper for the GEGL ripple effect. GEGL allows for
double values for period and amplitude, while the GIMP PDB only allows 
integers. This patch aligns the datatypes.
Note that Angle and Phi are still limited to the current design.
2023-06-20 15:27:10 +00:00
bootchk
57909356ff Implement #9628 enhanced err msg for mismatched parens 2023-06-20 07:39:26 -04:00
bootchk
1bc2ed77a3 Fix #9554 (quit 1) must yield err msg
So that scripts have a way to declare an error.
2023-06-20 11:14:13 +00:00
Alexander Shopov
12a84988ed Update Bulgarian translation 2023-06-20 11:01:33 +00:00
Jordi Mas
a09609bb76 Removes spaces at the end of string and Compuserve company name which is not relevant in 2023 2023-06-19 20:47:51 +00:00
Jordi Mas
bb468d1f90 Update Catalan translation 2023-06-19 22:25:44 +02:00
Stephan Lenor
f5cc64ddd6 Speed up matrix operations (unit-wise, no interface is touched) 2023-06-19 15:45:32 +00:00
Jordi Mas
82d5743e77 Update Catalan translation 2023-06-18 21:09:40 +02:00
Alx Sa
762088f9de plug-ins: Show dimensions, BPP in ICO layer names 2023-06-18 05:11:44 +00:00
Øyvind Kolås
5b129f891a app: better synthesized short_label for gegl menu actions
For all the test-ops thus far in gegl, gimp:menu-label has been
the same as title + "..", to keep the number of duplicate strings
that need to be translated and the number of needed boiler-plate
lines of meta-data in GEGL down, this is the default behavior when
a title key exists.
2023-06-17 22:38:53 +02:00
Alx Sa
addc37880e themes: Fix "box" on highlighted checkbox label
The checkbox label wasn't included the :hover CSS, so its background
color didn't change. This created a "box" around the label without the
highlight color when the mouse was over it.
2023-06-17 19:01:39 +00:00
Mark
45e91bd550 fixes menu bar being todark for gray theme 2023-06-17 17:48:57 +00:00
Alx Sa
2065db7fe7 plug-ins: Don't load image for ICO thumbnail
Due to a small typo, GIMP always loaded the entire image as a thumbnail
even if a suitable one was found.
This patch fixes that typo.
2023-06-17 04:42:34 +00:00
Alx Sa
e5a4336604 plug-ins: Add width/height label to ICO export
Similar to the ICNS export, file-ico now shows the icon dimensions for 
all types in the export dialogue.
2023-06-16 23:44:36 +00:00
Jehan
07ee2fe776 Issue #9446: better logic to prevent multiple successive inhibition requests.
My previous commit was improving the case where we just get many "dirty" signals
and successful inhibition. But if the inhibition request was failing, we would
just retry again and again.

This new version will hold off on on requesting the inhibition for the next 10
minutes. Then it will try again, in case the failure reason might have been
temporary.
2023-06-16 22:53:59 +02:00
Jehan
863fb62581 Issue #9446: do not uninhibit/inhibit at every image change unless…
… the reason message changes (i.e. when number of dirty image changes).

Some actions in particular would trigger several "dirty" signals, there is no
reason to uninhibit then re-inhibit repeatedly. And as a more general rule,
there is no reason to do so even for different actions while we are not planning
to update the inhibition reason.

It may not be the main reason for #9446 (because if it hangs for several
minutes, there is likely something going on, deeper at the dbus call level), yet
it would definitely alleviate the issue (dividing the wait by as many times as
the dirty signal was emitted!).
2023-06-16 22:04:28 +02:00
Daniel Novomeský
69c81f1059 flatpak: upgrade libjxl 2023-06-16 13:15:14 +00:00
Alx Sa
d4260449fb app: fix some glib related deprecations
As in d16734a4, this checks the GLib version and conditionally uses 
G_APPLICATION_DEFAULT_FLAGS or G_APPLICATION_FLAGS_NONE for GimpApp.
2023-06-16 00:13:02 -04:00
Alx Sa
bf1e125138 widgets: Fix RGB histogram pixel/count values
The RGB histogram shows three histograms overlaid on each other.
This multiples the pixel and count attributes by 3. To correct this,
the result of gimp_histogram_get_count () is divided by 3 for the
pixel and count displays.
2023-06-15 19:24:49 -04:00
Ville Pätsi
c9cd4cea2a themes: less thick menu separators and thick dark borders in menu tooltips. 2023-06-16 01:15:39 +02:00
Alx Sa
9efc552069 plug-ins: Keep GIF's full palette on import
Resolves #414.
Currently GIMP only loads the palette colors used in a GIF, discarding 
the rest. This can cause issues when a consistent palette is required
(e.g. a video game sprite or background).
This patch uses either the global or local GIF max palette value to set 
the colormap size, thus retaining the full palette on import.
2023-06-15 21:07:22 +00:00
Lloyd Konneker
3cf3097d62 libgimpconfig: support GStrv aka string array 2023-06-15 17:12:44 +00:00
bootchk
5eac31f07f Refactor ScriptFu Console
Rename fields of ConsoleInterface more desciptive

Add c,h files for object editor and history

Extract object ConsoleEditor

Extract object ConsoleHistory

Extract TotalHistory methods
2023-06-15 13:26:00 +00:00
Jordi Mas
d7287e0f3b Update Catalan translation 2023-06-15 08:13:57 +02:00
Jordi Mas
e8a35c23e6 Fixes to Catalan translation 2023-06-14 00:11:25 +02:00
Øyvind Kolås
21411047ee app,pdb,plug-ins: %s/gegl_node_connect_to/gegl_node_connect/ 2023-06-13 19:58:42 +02:00
Øyvind Kolås
c4734a27b5 meson,app: depend on GEGL 0.4.45 2023-06-13 17:14:03 +02:00
Øyvind Kolås
6919d07b6c plugins/file-gegl: use gegl_node_link instad of gegl_node_connect_to 2023-06-13 17:14:03 +02:00
Øyvind Kolås
e7dcfb2927 app: use gegl_node_link and gegl_node_link_many
Instead of gegl_node_connect_to which is rather verbose, and slated for
deprecation in GEGL.
2023-06-13 17:14:03 +02:00
Martin
fe985c3961 Update Slovenian translation 2023-06-13 14:20:53 +00:00
Alx Sa
f92ecddd53 pdb: Fix NULL check in gimp-file-load-layers
As @bootchk noted, gimp-file-load-layers does not check the result of 
file_open_layers () but the final return variable
which is always NULL at this point in the function.
This patch corrects the problem so it checks the proper variable.
2023-06-13 04:55:13 +00:00
Ekaterine Papava
61ca8f211f Update Georgian translation 2023-06-13 03:58:11 +00:00
Ekaterine Papava
f9e3f28afd Update Georgian translation 2023-06-13 03:53:49 +00:00
Alx Sa
a04f287a4b script-fu: Fixed SF_ONE_OR_MORE_DRAWABLE option
The order of GIMP_PROCEDURE_SENSITIVE_DRAWABLE | 
GIMP_PROCEDURE_SENSITIVE_DRAWABLES was reversed in 
gimp_procedure_set_sensitivity_mask (), which caused scripts using 
SF_ONE_OR_MORE_DRAWABLE to crash.
2023-06-13 02:51:58 +00:00
Yuri Chornoivan
d6ba644575 Update Ukrainian translation 2023-06-12 20:24:10 +00:00
Jehan
90f155365b desktop: new AppStream metadata for upcoming 2.99.16 release. 2023-06-12 16:39:46 +02:00
Jehan
6c49cd65dd NEWS: remove mention of now removed ugly workaround. 2023-06-12 16:39:46 +02:00
Michael Natterer
563aabbf6d po: add resource-cmds.c to POTFILES.in 2023-06-12 16:21:40 +02:00
Jehan
4f600669a9 NEWS: update. 2023-06-12 01:49:42 +02:00
Jehan
7c1fb5bc67 app: return EXIT_FAILURE when failing to pass the batch commands to…
… the main instance.

Note that it doesn't say if the batch command succeded, only if they were
successfuly communicated to the main process for processing.
2023-06-12 01:20:11 +02:00
Jehan
eb0ee5f33a Issue #9598: do not rely on GApplication uniqueness feature.
When passing an application ID (which is necessary for application inhibition to
work, i.e. logoff/reboot/shutdown inhibition), GApplication will try to ensure
process uniqueness, which will trigger a new activation to an already running
process. Since our current code assumes that the application can be activated a
single time only, this was what was triggering a whole lot of errors (on the
first running process) in #9598 because there was all the initialization code
which ran again, whereas it was not supposed to.

This doubly-running initialization code was also what completely messed up the
session files, hence broke the GUI after a restart (#9599).

Therefore passing G_APPLICATION_NON_UNIQUE advertizes we don't want GIO to
handle process uniqueness for us.

Note that this is actually a very interesting feature which we have had in GIMP
codebase forever. It would be interesting to kill all our own uniqueness code in
favor of GIO code (and let them handle/maintain passing command line arguments
from one process to another, for all possible platforms). So I added a TODO for
this (for now, we just ignore this feature as it doesn't work well with current
codebase).
2023-06-12 01:10:59 +02:00
Jehan
7f83b27c3c Issue #5601: help icon in the action search.
Additionally to the F1 shortcut, a secondary icon is now shown in the
action search entry. It works exactly the same as F1, i.e. that by
default, it shows the action search manual page (when nothing is
selected), or the manual page for the specific action currently selected
otherwise.
2023-06-11 23:56:55 +02:00
Jehan
a13289672a Issue #5601: F1 in action search to load the action help page.
The default F1 result (if no action is selected) is to show the generic
help page for the action search. If an action is selected, it will show
the specific help for this action.
2023-06-11 23:02:15 +02:00
Yuri Chornoivan
f58900298b Update Ukrainian translation 2023-06-11 15:58:02 +00:00
Jehan
27f8448fa2 Issue #8204: link gimp-2.99 executable with the static libapp library.
Since we are already building a static (build-only) libapp, to be used with
tests or tools, let's also use it for the main (GUI) executable.

For the CLI executable though (gimp-console-2.99), we must re-compile
libapp_sources from scratch anyway, because we define the additional macro
'GIMP_CONSOLE_COMPILATION'.
2023-06-11 17:52:40 +02:00
Jehan
01e56545bc devel-docs, gitlab-ci: freeze our requirement updates to Debian 12 bookworm.
While Debian testing is the sensible choice for dependency requirements while we
are in full-dev mode, now we are getting closer to 3.0 release, and Debian 12
"bookworm" barely got out.
If we continue to develop at current pace, GIMP 3.0 should be released before
the next stable Debian, so we should not use dependencies unavailable on the
latest stable (otherwise GIMP 3.0 won't be distributable soon enough on Debian,
nor on Debian derivatives such as Ubuntu, Mint, etc.).

This is why we are now basing GIMP dependency requirement on Debian bookworm.
We'll likely get back to the next "testing" after GIMP 3.0 release.
2023-06-11 00:52:13 +02:00
Jehan
7f879d1d31 menus: move back the "GEGL Graph" action in Filters > Generic menu.
Now that we don't blindly generate a messy list of all non-special cased actions
in Filters > GEGL Operations, "GEGL Graph" is all alone in this submenu. It just
makes sense to bring it back to the Generic submenus where it used to be.
2023-06-10 23:13:02 +02:00
Jehan
6dc5f6792e app: use the new GEGL metadata "gimp:menu-path" and "gimp:menu-label".
Instead of unconditionally add all the non-special-cased GEGL operations into
the menu, only insert the ones which explicitly use the new "gimp:menu-path"
GEGL key.
See new operation "gegl:adaptive-threshold" added in commit 7c2a70eee for such
an example.

Note that the other operations will still get their own generated action (which
means for instance that you can still search them through the action search and
that you can create custom shortcuts for your favorite actions). But now you
won't get an overlong generic list of non-organized actions in a single submenu.
Some people were finding this messy when they had a lot of custom GEGL ops.

Also it means that GIMP doesn't assume that any custom GEGL op is usable in
GIMP. Indeed some ops are really not meant to be used as filters, which is why
we have the gimp_gegl_op_blacklisted() internal function; but this cannot apply
to custom operations. Therefore from now on, instead of GIMP guessing, operation
developers will have the say on whether their op should show in menus and in
which menu path exactly!

Moreover the "gimp:menu-label" key will be used as short label, i.e. the label
which is used in menus in particular, where the menu path is a helpful context
(hence allowing to use shorter menu labels).
The main "title" will still be used as long label, for places where there is no
such context, for instance the action search.
2023-06-10 23:09:00 +02:00
Jehan
b437552580 app: make sure that custom GEGL-operation generated actions have unique names.
When reverting commit d51c64ec06 and reimplementing as fa2e9adc29, the code to
make sure the generated per-op action name is unique disappeared. This code
ensures that the action name is indeed unique, otherwise the action will
override a previously registed action, which could be made from a plug-in, or
even by another GEGL operation. Indeed, while GEGL operation names are supposed
to be unique, they are post-processed to be valid GIO action names. So it is
totally possible to have 2 GEGL ops with different GEGL names, yet the same
GAction name.
2023-06-10 23:09:00 +02:00
Martin
1044c05cd5 Update Slovenian translation 2023-06-10 18:23:01 +00:00
Jordi Mas
828a8a7fe7 Update Catalan translation 2023-06-10 13:13:16 +02:00
Asier Sarasua Garmendia
0fa1f02459 Update Basque translation 2023-06-10 07:15:38 +00:00
Alx Sa
73d5dcecae plug-ins: Fix defaults for 1/4/8 bpp ICO export
8bpp and below ICO formats use a 1 bit mask for transparency.
When imported the mask is treated as an additional transparent color.
If the icon used the max palette (e.g. 2 colors for a 1bit icon),
the default export format will become larger than necessary.
This checks if the layer still has 1 bit alpha, and subtracts the
mask color from the count.
2023-06-09 22:12:43 +00:00
Jehan
317aa803d2 Issue #7172: option to apply Client-Side decoration on image windows.
This patch does the following things:

- An option "Merge menu and title bar" (this is hopefully more understandable
  than calling it "Client-side decoration" or again "header bar") is added in
  Preferences > Image Windows. This option triggers the restart warning.
  Moreover when checked a small warning message will tell that in some cases, it
  may not work (there are feedbacks of people having 2 title bars when using GTK
  applications using CSD).
- For the reason evoked above (sometimes 2 title bars) and also because the CSD
  concept seem really to divide people a lot (some love this as much as others
  hate this), this new option "custom-title-bar" on GimpGuiConfig is FALSE by
  default.
- When the option is checked, the image windows will use a GTK header bar
  containing the menu, the window title (image name and information) as well as
  the usual minimize/maximize/close buttons per your OS conventions.
- Since the header bar is set to be hidden when maximizing, if you checked "Show
  menubar" for the "Default Appearance in Fullscreen Mode" in Preferences >
  Image Windows > Appearance, the menu will be moved to its "old style"
  position, i.e. above the canvas. This makes the menu possibly visible (if
  relevant option is checked) even in fullscreen mode.
- I tweaked the Default theme to show the header bar with minimal height,
  because I find GTK default theme's headerbar height unreasonably high
  (especially if the point of the header bar is to save screen space). I am
  unsure if this was the right move though, because maybe the default theme
  should not do such choices (maybe this should go in the Compact theme?).
2023-06-09 20:19:01 +02:00
Jehan
10742367c5 app: create a dedicated UI manager for the quick mask popup.
I don't see a reason why the quick mask menu was sharing the same
manager as the image menu (the main top menu and on-canvas). This was
why it was receiving all notifications to create menu items on <Image>,
as registered by plug-ins.

Giving it its dedicated manager makes sure this doesn't happen.
2023-06-09 17:20:11 +02:00
Jehan
30c5e20ce7 Revert "app: fix bailout condition in gimp_menu_model_handles_subpath()"
This reverts commit 3a35974e3a.
This is not the right fix for the issue (which was happening on the
Quick Mask menu specifically) because root menu models are set with a
NULL path. So forbidding root menu models to handle new subpath means
preventing plug-ins to register new top-level menus.

The correct fix for the issue on the quick mask menu will happen in a
coming commit.
See issue #9586.
2023-06-09 17:15:38 +02:00
Jehan
c9b114e6e9 plug-ins: we still depends on librsvg 2.40.x.
In commits a6756b515b and 23da44e3c8, newer API of librsvg were used, over our
current minimum requirement. The reason why we don't bump this requirement is
that librsvg 2.40.x are the latest versions which are full-C. While we have
nothing against Rust, it is not available on all existing platforms, and we
really want to have GIMP buildable everywhere, while also have SVG support
always present (even though it's a vector format, it's an important one in
graphics work nowadays).
See issue #6821.

So in the end, let's keep the old minimum requirement, but test against librsvg
version to compiler either with old API or new one. The changes are limited
enough that it's not too much a bother.
2023-06-08 17:43:16 +02:00
MohammadSaleh Kamyab
ba66797abe Update Persian translation 2023-06-08 11:32:20 +00:00
Aryeom Han
7eea3c8622 data: new "Wilber Week 2023 edition" splash screen for GIMP 2.99.16. 2023-06-08 00:21:48 +02:00
Alexander Shopov
19a45577b6 Update Bulgarian translation 2023-06-07 21:20:57 +00:00
Jordi Mas
2815f7af94 Update Catalan translation 2023-06-07 19:44:03 +02:00
Alx Sa
e9fdd321cd widgets: Check if editor color is set before...
...trying to get the index. Resolve #9568.
The color picker tool calls this twice if you're in Add to Palette mode,
and the editor's color may not be set the first time it's run.
This adds a check to ensure the color is set before trying to retrieve
it from the palette to prevent a CRITICAL.
2023-06-07 12:19:56 +00:00
Jehan
d0ac96b8b3 build: fix nightly flatpak.
Don't set both a branch and a commit, otherwise flatpak-builder will
compare the HEAD of this branch (which may evolve with the commit).

Fixes:

> Failed to download sources: module qoi: Git commit for branch master is dfc056e813c98d307238d35f7f041a725d699dfc, but expected f6dffaf1e8170cdd79945a4fb60f6403e447e020
2023-06-07 12:24:11 +02:00
Jacob Boerema
0bcce39637 app: update help-ids for layer crop/resize commands
The layer resize to selection and crop to content menu commands were
using the same help ids. This made it difficult to have them both listed
separately in the index of the manual.

Since we use separate help ids everywhere else for menu commands, let's
give each its own help id here too.
2023-06-07 11:24:28 +02:00
Jehan
7f70aa0c61 gitlab-ci: one more missing artifact to fix dev-docs job. 2023-06-07 10:24:22 +02:00
Jehan
bf96451569 gitlab-ci: add more artifacts to gimp-meson-debian job.
This should hopefully fix the CI jobs "dev-docs" and "source-meson".
2023-06-07 00:43:26 +02:00
Jehan
3972122280 meson: remove a reference to autotools files in the meson dist script. 2023-06-06 23:49:39 +02:00
Jehan
0233531020 app: make sure the private variable is a valid object if set.
Though this doesn't make a problem in normal use (AFAICS), we have crash
in a unit test in CI because the action_factory object was apparently
invalid when calling gimp_action_factory_delete_group().
2023-06-06 22:30:03 +02:00
Jehan
36fe8a979d build: remnants of the autotools builds in installer creation script.
Because of this, the script was failing to get the version string, which
in turn was breaking InnoSetup.

This fixes the following InnoSetup bug:

> Error on line 116 in C:\_r\_builds\k3_3muaB\0\GNOME\gimp\build\windows\installer\gimp3264.iss: Value of [Setup] section directive "VersionInfoVersion" is invalid.
2023-06-06 20:45:09 +02:00
Jehan
12f349ef34 build: gobject-introspection was not pulling gobject-introspection-runtime.
This is an issue I'll have to fix in crossroad. Let's have the CI build
fixed for now.
2023-06-06 20:45:09 +02:00
Jehan
503324d348 gitlab-ci: switch to meson logs for CI artifacts.
config.log is an autotools artifact.
2023-06-06 20:45:09 +02:00
Michael Natterer
a858474fe8 pdb: GimpResource: add is_editable(), rename(), duplicate(). delete()
and remove the API from its subclasses.
2023-06-06 16:33:36 +02:00
Michael Natterer
018d9fb615 app: remove draw() from GimpComboTagEntry
We don't need to maanually draw the arrow. Fixes #9498
2023-06-06 16:32:15 +02:00
Martin
06c0a8ca81 Update Slovenian translation 2023-06-06 14:08:44 +00:00
Jehan
f746bfbaf2 gitlab-ci: one-line per installed package for dependency maintenance.
This commit makes no real changes but style.
As discussed, this makes it much easier to compare commit diffs, rather
than an overlong line where you have to search which package may have
been added/removed/changed.
2023-06-06 11:27:05 +02:00
lillolollo
ff0a4d012f Add aalib on crossroad 2023-06-05 23:16:59 +00:00
Alx Sa
aa2a565d60 widgets: Load simulation intent/bpc in preferences
Resolves #9560.
The Simulation Intent and BPC widgets in the Preference Dialogue needed
to be connected to their properties with `gimp_prop_*` when created to
show the saved default image values.
2023-06-05 19:12:18 +00:00
Alx Sa
6041d01655 dialogs: Set default response to "OK"
This allows users to just press Enter/Return to run it with defaults as
you could do in 2.10.
2023-06-05 13:25:45 +00:00
Michael Natterer
2adb283077 libgimp: add API docs for gimp_resource_get_by_name() 2023-06-05 14:41:57 +02:00
Michael Natterer
bb7ed43eac app: make the GimpResource dummy class the parent of GimpData
It does absolutely nothing except sitting there, providing an is-a
relation (both ways because GimpData is its only subclass). This will
simplify having more libgimp API on GimpResource, without having to
add different PDB code for app and libgimp.
2023-06-05 14:33:23 +02:00
Michael Natterer
a4920611d1 libgimp: remove gimpparamspecs-resource.h
and merge it into libgimp/gimpparamspecs.h
2023-06-05 13:06:01 +02:00
Asier Sarasua Garmendia
e3bf2c1f00 Update Basque translation 2023-06-04 07:35:44 +00:00
Rodrigo Lledó
a17a2529ae Update Spanish translation 2023-06-02 11:53:19 +00:00
Rodrigo Lledó
e579bb974e Update Spanish translation 2023-06-02 11:48:22 +00:00
Alx Sa
9058a460b0 core: Import .aco palettes with Babl
This replaces the various GimpHSV/GimpCMYK .aco palette conversions with
Babl.
As a result, it now possible to support importing CIE Lab palettes
(colorspace 7)
2023-06-01 10:56:10 -04:00
Alx Sa
5070e0e9ec plug-ins: Add additional DigitalSourceType...
types for the metadata editor.
2023-05-31 18:06:39 +00:00
Michael Natterer
5acdaac8e0 libgimp: remove getters and setters from GimpResourceSelectButton subclasses 2023-05-31 17:18:19 +02:00
Michael Natterer
8fba6da5db libgimp: remove gimp_resource_select_button_embed_interior()
and a whole bunch of useless code from all its subclasses.
2023-05-31 17:01:46 +02:00
Michael Natterer
9638102418 Introduce a global ID space for GimpData/GimpResource objects
Much like for images and items. Change the PDB to transmit IDs
instead of names for brush, pattern etc. and refactor a whole
lot of libgimp code to deal with it.

	modified:   libgimp/gimpplugin-private.h
2023-05-31 16:12:04 +02:00
Alx Sa
493156cc7a dialogs: Fix header bar assumption
The Extensions dialogue assumed that it had a header bar. Since this is 
not always the case, conditional checks were added to prevent
GtkHeaderBar code from running. This also fixes a crash when you
double-click to expand the extension description.
2023-05-31 03:19:24 +00:00
Jordi Mas
01785632cc Update Catalan translation 2023-05-30 06:47:37 +02:00
Jordi Mas
94572ba6eb Update Catalan translation 2023-05-29 14:26:05 +02:00
Ekaterine Papava
9a8262c991 Update Georgian translation 2023-05-29 05:09:02 +00:00
Jacob Boerema
7908ecfbcd plug-ins: synchronize name of nl-filter with manual
The name of the nl-filter plug-in in the manual was recently changed to be
more in line with its description.
Since that is already the name of the plug-in file here, let's also update
the name of PLUG_IN_PROC to be in line with this.
2023-05-27 23:12:11 -04:00
Michael Natterer
f1bbd8d2c6 app: make GimpNavigationEditor zooming much more responsive
Use g_idle_add() instead of g_timeout_add(300ms), which makes
it respond instantly, while still keeping the actual zoom
call out of the slider callback.

Fixes #9500
2023-05-27 13:32:24 +02:00
Michael Natterer
e12798be0d app: change GimpGeglProcedure to take (n-drawables, drawables)
because we treat it the same as a plug-in procedure.
2023-05-27 12:35:52 +02:00
Niels De Graef
413cf9ad85 app: Don't grab the pointer when doing scrolling
By doing `gimp_display_shell_pointer_grab()`, we actually prevent events
from a tablet coming through. There doesn't seem to be a reason to use
it and it's not regressing in functionality either, so let's just remove
it.

Fixes: https://gitlab.gnome.org/GNOME/gimp/-/issues/8016
2023-05-26 23:34:12 +00:00
Jehan
ebe63c215f INSTALL, meson: remove references to autotools and warning. 2023-05-27 00:33:17 +02:00
Jehan
3da0cdc03d desktop: removing autotools-only test files.
These are implemented directly in the meson build files.
2023-05-27 00:16:47 +02:00
Michael Natterer
26dce72d2c Remove autotools 2023-05-27 00:03:52 +02:00
Jacob Boerema
52fb1e93f9 libgimpbase: issue #1561 update Exif.Photo.PixelX/YDimension
Some images have Exif.Photo.PixelXDimension and Exif.Photo.PixelYDimension
metadata tags in addition to Exif.Image.ImageWidth and
Exif.Image.ImageHeight (mainly tiff images). So far, we were not updating
these optional tags, meaning they could get out-of-sync with the actual
dimensions when resizing and then exporting the image.

Since these tags are non essential, we will only update them if they are
already present.
2023-05-26 12:40:58 -04:00
Michael Natterer
0532cf31b9 app: move action/widget sensitivity logic from GimpMenu to GimpAction
This way we handle all kinds of proxies (particularly buttons).

Also add a small hack that prevents extended multiline tooltips of
GimpButton from being overwritten by gimp_action_update_proxy_tooltip().
2023-05-26 15:31:54 +02:00
Michael Natterer
c4f71f553c app: fix action_data_get_image() to return NULL more often
If "data" is a GimpItemTreeView or a GimpImageEditor, we REALLY want
only the image from these dialogs, even if NULL, and NOT some other
image from a display or context that randomly is around anyway. Fixes
the sensitivity states of lots of buttons in these dialogs.
2023-05-26 15:25:15 +02:00
Simon Budig
c9122fed2f gimp-atomic: drop the use of the volatile qualifier.
The underlying functions don't actually use thaat, so it gets dropped
anyway, causing a compiler warning.
2023-05-26 14:29:42 +02:00
Niels De Graef
85a77f8a64 plug-ins/grid: Make sure dest_buffer is initialized
Initialize to NULL at the very least
2023-05-26 12:45:50 +02:00
Carlos Garnacho
467fa6c5e7 app: Avoid double gtk_drag_finish() call on GimpToolbox
According to the ::drag-drop GTK documentation: "The call to gtk_drag_finish()
can be done either directly or in a “drag-data-received” handler which gets
triggered by calling gtk_drag_get_data()"

The GimpToolbox's vbox handling DnD chooses however to do both, the drag-drop
handler is calling gtk_drag_get_data() and invariably calling gtk_drag_finish()
to hint that the DnD operation is ending. While this worked in practice in X11,
This is a harder either/or in Wayland resulting in the transfer being cancelled.

In order to behave better wrt the documentation, and make DnD into the toolbox
work on both X11 and Wayland, avoid the first gtk_drag_finish() if the data is
being requested, and only bail out if no offered target matches what the widget
can handle. The handling done indirectly through gimp_toolbox_dnd_init() and
gimp_dnd_*_dest_add() will take care of finalizing the DnD data transfers
successfully.

Closes: https://gitlab.gnome.org/GNOME/gimp/-/issues/7373
2023-05-26 10:24:05 +00:00
Martin
310ab1f708 Update Slovenian translation 2023-05-26 07:34:20 +00:00
Martin
a9ac8a5a40 Update Slovenian translation 2023-05-26 07:26:14 +00:00
Yuri Chornoivan
9d684d4ddb Update Ukrainian translation 2023-05-26 06:53:45 +00:00
Alx Sa
fa22ee23c0 dialogs: Fix typo in "Lock Visibility" label 2023-05-26 03:27:55 +00:00
Michael Natterer
58c40a1871 app: add "lock visibility" to the layer,channel,path property dialogs
and make the lock toggles use the same icons as in in the popover in
the dockable dialogs.

Fixes #9306
2023-05-26 02:46:53 +02:00
Michael Natterer
b48846c752 app: remove the "Tab" accelerator from the "windows-hide-docks" action
Apparently this has never worked until we refactored our menus, now it
suddenly does but not as originally intended. Simply remove the
accelerator and let only the canvas event handler deal with the Tab
key. Restores 2.10 behavior which was quite ok.

Fixes #9352
2023-05-26 00:45:30 +02:00
Jehan
c5dd6e0e89 libgimp: fix a GBytes leak. 2023-05-26 00:32:28 +02:00
Jacob Boerema
671996e897 plug-ins: fix #8441 distress-selection.scm script failure
distress-selection.scm uses gimp-image-set-active-channel which has been
removed causing script failure when a channel is selected instead of a
layer.

Use the new multi-layer aware gimp-image-set-selected-channels and also
use the gimp-item-id-is-* functions instead of the deprecated
gimp-item-is-* functions.
2023-05-25 18:31:56 -04:00
Michael Natterer
2e219bccf2 app: one more fix like in the last commit in GimpLayerTreeView 2023-05-26 00:09:01 +02:00
Michael Natterer
6fcf25b3de app: can't rely on a context being set on a GimpItemTreeView
In GimpLayerTreeView, set the action states using GimpActionGroup
instead of using gimp->app directly to look up the actions ( after
trying to get the Gimp from a NULL GimpContext).

Fixes #9433
2023-05-25 23:52:40 +02:00
Niels De Graef
a411026b4c libgimpbase: Don't cast between guint32/gsize
I don't like C and I don't like crashes
2023-05-25 23:47:42 +02:00
Niels De Graef
275f7d5f4c libgimp: Fix checks when writing GdkPixbuf over the wire
* We need to check if `icon_bytes` is NULL, not `icon_data`
* We should not set `icon_bytes` if `gdk_pixbuf_save_to_buffer` fails
2023-05-25 23:19:58 +02:00
Michael Natterer
c9700680fe app: Issue #9490: limit the width of the palette preview
to GIMP_VIEWABLE_MAX_PREVIEW_SIZE in gimppaletteeditor.c
2023-05-25 19:37:41 +02:00
Jehan
821711badb themes: "System" theme should not use smaller font size.
What we call "System" theme should have very minimal edits over the
actual system theme. So let's drop all the "font-size" properties (one
"larger" one, but especially the many "smaller" ones).
This means that the "Default" theme also will keep system font size.

This is as discussed with Ville and Liam, the later saying he can barely
read dockable texts because of this.

On the other hand, we use "small" font size as a general rule in the
"Compact" theme, which is especially meant for people who want a compact
theme.
2023-05-25 18:10:56 +02:00
Michael Natterer
afa2a5ca96 app: fix typo in gimphelp-ids.h, spotted by Wormnest 2023-05-25 17:30:50 +02:00
Michael Natterer
41894be71a app: make the rotation import dialog more similar to profile import
and some general cleanup in both dialogs.
2023-05-25 16:56:07 +02:00
Michael Natterer
652fbe47fa app: use the prefs color management icon in the profile import dialog 2023-05-25 10:26:43 +02:00
Michael Natterer
ea0056ca46 app: set the file on all images immediately after loading
We removed gimp_image_set_file() from all plug-ins but forgot to do it
generically in the core...
2023-05-25 10:22:53 +02:00
Yuri Chornoivan
ce69a0ee2f Update Ukrainian translation 2023-05-25 06:52:07 +00:00
Jehan
097e683b07 NEWS: update. 2023-05-25 03:26:36 +02:00
Michael Natterer
fa2e9adc29 app: reimplement the stuff reverted below
but stay completely in filter-actions.c and filters-menus.c
2023-05-25 02:31:28 +02:00
Michael Natterer
4209a584fc app: clean up forgotten conflict removals from the reverts below 2023-05-25 02:31:28 +02:00
Michael Natterer
dc25c2bc97 Revert "app: add a "Filters > Generic > GEGL Operations" submenu with generated actions."
This reverts commit 747cbf70db.
2023-05-25 02:31:28 +02:00
Michael Natterer
39942c1260 Revert "Issue #9228: make GEGL Operation tool's operations their own actions too."
This reverts commit d51c64ec06.
2023-05-25 02:31:28 +02:00
Jehan
806f88b9a0 app: no longer name variant for "Preferences".
It doesn't feel to me like appending "Dialog" is needed for this
specific dialog.
2023-05-25 02:27:21 +02:00
Jehan
a660a378ac themes: updated Default theme by Ville Pätsi.
The Default theme may have been a bit too dark. Instead let's have it a
tiny bit lighter (and also foreground color a bit less white).

For now, the old "Default" dark theme doesn't disappear totally and is
moved to a "Darker" theme as we have been discussing and wondering on
whether this is prefered by some people (it is). Aryeom also thought a
darker theme may be a good idea.

Moreover Liam actually thought that losing some of the contrast
(especially with the text a tiny bit less white now) is not desired in
his case where eyes may not be as sharp as they used to. Therefore a
"High Contrast" theme may be needed.

Aryeom also suggested that sliders to choose colors could be a much more
generic solution, which might be possible yet would require more ugly
hacks generating on-the-fly theme changes (we do something similar for
dark theme choice already).

This is all work-in-progress and a result from Wilber Week 2023 work.
2023-05-25 02:23:24 +02:00
Michael Natterer
ea83d54cb1 app: move gimp_get_geglopclasses() to gegl/gimp-gegl-utils.[ch]
and rename it to gimp_gegl_get_op_classes(). This looks much cleaner,
just don't look at the internal op blacklisting code...
2023-05-25 01:04:54 +02:00
Michael Natterer
e9e09ceec4 app: vertically center the top-left icon in GimpViewableDialog 2023-05-24 23:37:43 +02:00
Jehan
88e82d57af build: install gobject-introspection with MSYS2 when cross-building…
… for Windows.

Though it's useless for actually building the GIR files, we still need
this package now, for building script-fu with introspection abilities,
to generate GIMP and GEGL enums.
See the 2 previous commits for more information.
2023-05-24 23:19:20 +02:00
Niels De Graef
305b27884d ci: Add gobject-introspection to win64 image 2023-05-24 23:19:20 +02:00
Niels De Graef
01e960e98e plug-ins/scheme-wrapper: Use GIR for enum values
This allows our script-fu plugins to use the GIMP enum values, just like
all our other plug-ins know them.

In other words:

* Names are consistent with those of other plug-ins
* Introspectable enums are automatically added as they are added to the
  introspection file, without even needing a recompile
* No need to keep track of our enum types anymore, as that is just a
  redundant implementation of introspection in practice. This in turn
  will let us simplify some of the pdb code
2023-05-24 23:19:20 +02:00
Niels De Graef
00415bed6a libgimp: Always pass size to g_bytes_unref_to_data
Unlike `g_bytes_get_data()`, the out argument for the size is not
optional, so if we try to pass `NULL` there, we actually get a segfault.
2023-05-24 23:16:36 +02:00
Alx Sa
e1e30c6f72 app: Scale pattern preview to show full image
Currently, patterns are loaded as-is - if the full pattern is larger
than the preview, its cut off and you only see the left corner.
In those cases, the pattern is scaled using gegl_buffer_get ()'s scale
parameter.
2023-05-24 19:44:11 +00:00
Michael Natterer
a8d30578cd script-fu: fix double free in script-fu-dialog.c
Spotted by Lloyd Konneker.
2023-05-24 21:35:48 +02:00
Alx Sa
7a1e6bedd5 plug-ins: Increase Script-fu Console size...
and Plug-in/Procedure Browser size.
gtk_widget_set_size_request () is applied to the dialog, as it does not
seem to bubble up from being applied to individual elements.
The existing 2.10 width/height values are used.
2023-05-24 18:56:23 +00:00
Michael Natterer
15d81b6b10 app: plug leaks in GimpExtensionManager 2023-05-24 18:27:00 +02:00
Michael Natterer
8d9eef875c libgimpwidgets: use gdk_seat_grab,ungrab() in gimphelpui.c,
getting rid of using the the deprecated pointer grab API.

Since there is something fishy and gtk_get_event_widget(event) always
returns the GtkInvisible we grab on (not the actual event widget), we
just steal the "find widget at pointer" code from gtkinspector and
find the help widget that way.
2023-05-24 17:18:38 +02:00
Michael Natterer
7e7a20530d libgimpwidgets: improve parameter names of gimp_grid_attach_aligned() 2023-05-24 15:59:34 +02:00
Michael Natterer
a12339c890 app: increase preview size in gimpviewablebox.c
The height of the boxes was never determined by the preview but by the
label+entry, causing vertical padding around the preview. Now the
preview fills the area in more cases, at the cost of a few less
horizontal pixels for the entry.
2023-05-24 15:20:03 +02:00
Michael Natterer
9c9d3aaa35 themes: minimize spinbutton height in docks too
but add 2px top and bottom padding so all of those entries don't look
like the just escaped the garbage compactor.
2023-05-24 15:17:27 +02:00
Michael Natterer
ee6108aa04 themes: minimize the height of all entries in docks 2023-05-24 14:47:42 +02:00
Michael Natterer
4fb27afd9e plug-ins: don't leak the comment string in file-psp.c 2023-05-24 14:32:00 +02:00
Michael Natterer
82e4bf5792 app: fix "active" state management in GimpToggleAction
gimp_toggle_action_real_toggle(): set "active" before emitting
"change-state" so we don't infinitely try to set the state in case of
a recursion.

gimp_toggle_action_toggle(): add notify("active") because it wasn't
done anywhere.

Fixes #9392
2023-05-24 14:09:50 +02:00
Michael Natterer
3a35974e3a app: fix bailout condition in gimp_menu_model_handles_subpath()
Fixes plug-in menus being added to all a GimpUIManager's menus,
even if they didn't match the menu_path
2023-05-24 13:43:35 +02:00
Michael Natterer
1d393fb926 app: don't try to break up a NULL menu_path in gimp_action_set_menu_path() 2023-05-24 13:41:37 +02:00
Simon Budig
f540e79172 screenshot: there actually is no need to preprocess the PNG data... 2023-05-24 11:32:05 +02:00
5923 changed files with 1082668 additions and 1102706 deletions

View File

@@ -9,15 +9,22 @@ BasedOnStyle: GNU
AlignAfterOpenBracket: Align
AlignArrayOfStructures: Left
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveDeclarations: Consecutive
AlignConsecutiveMacros: Consecutive
AlignConsecutiveAssignments: AcrossComments
AlignConsecutiveDeclarations: AcrossComments
AlignConsecutiveBitFields: AcrossComments
AlignConsecutiveMacros: AcrossComments
AlignEscapedNewlines: Left
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakAfterReturnType: AllDefinitions
BinPackParameters: false
BinPackArguments: true
# Uncomment when our CI uses LLVM 20.
# See: https://github.com/llvm/llvm-project/issues/117830
# BinPackParameters: AlwaysOnePerLine
BreakBeforeBinaryOperators: None
BreakBeforeBraces: GNU
BreakBeforeTernaryOperators: false
IndentWidth: 2
PointerAlignment: Right
UseTab: Never
@@ -36,9 +43,7 @@ SpaceAfterCStyleCast: true
ColumnLimit: 80
PenaltyBreakAssignment: 60
PenaltyBreakBeforeFirstCallParameter: 100
PenaltyBreakString: 60
# Uncomment this when we start using clang-format 14 in the CI.
# PenaltyBreakOpenParenthesis: 40
PenaltyBreakOpenParenthesis: 40
PenaltyExcessCharacter: 1
# Strings are more often longer by usage, so let's give these slightly
# more space to breath.

56
.gitignore vendored
View File

@@ -1,56 +0,0 @@
# Meson
/_build
/compile_commands.json
# Atom editor
/.vscode
# Autotools
*.la
*.lo
*.o
*~
/*.config
/*.creator
/*.creator.user
/*.files
/*.includes
/ChangeLog
/Gimp-3.0.gir
/Gimp-3.0.typelib
/INSTALL
/Makefile
/Makefile.in
/aclocal.m4
/authors.md
/autom4te.cache
/compile
/config.cache
/config.guess
/config.h
/config.h.in
/config.log
/config.rpath
/config.status
/config.status.lineno
/config.sub
/configure
/cscope.files
/cscope.out
/depcomp
/gimp-3.0.pc
/gimp-zip
/gimpthumb-3.0.pc
/gimpui-3.0.pc
/git-version.h
/gtk-doc.make
/install-sh
/libtool
/ltmain.sh
/missing
/mkinstalldirs
/py-compile
/stamp-h
/stamp-h.in
/stamp-h1
/test-driver

File diff suppressed because it is too large Load Diff

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

@@ -0,0 +1,48 @@
<!-- ⚠️ IMPORTANT: READ ME! ⚠️
This is the default template for bug reports.
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. -->
### 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 bug still exists
either in the last stable version of GIMP or on updated development code
(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. 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 writing only one bug per report created.
- Add full (not cropped) screenshots or other files using the clip button on GitLab. -->
### Reproduction
Is the bug reproducible? <!--[Always / Randomly / Happened only once ] (write it after the > symbol)-->
Reproduction steps:
1.
2.
3.
Expected result:
Actual result:
### Additional information
If you have a backtrace for a crash or a warning, paste it here.

View File

@@ -1,34 +0,0 @@
### Environment/Versions
- GIMP version:
- 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) -->
<!--Note: bug reporters are expected to have verified the bug still exists
either in the last stable version of GIMP or on updated development code
(master branch).-->
### Description of the bug
<!--Please describe your issue with details.
Add screenshot or other files if needed.(write it after the > symbol)-->
### Reproduction
Is the bug reproducible? <!--[Always / Randomly / Happened only once ] (write it after the > symbol)-->
Reproduction steps:
1.
2.
3.
Expected result:
Actual result:
### Additional information
If you have a backtrace for a crash or a warning, paste it here.

View File

@@ -1,15 +1,23 @@
**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
<!-- Please describe your feature with details.
Add screenshots, design images or other files which would help for
understanding the feature or for implementation.
Also add links when needed, for instance for implementation standards
or other relevant resources.-->
<!-- Please describe your feature with details. Also:
- If the feature is UI-related, please DO NOT REPORT HERE but on
gimp-ux: https://gitlab.gnome.org/Teams/GIMP/Design/gimp-ux/-/issues;
- If the feature is about some image file format on GIMP, first check if it
is not already listed on https://developer.gimp.org/core/standards/images,
then you can make the request, ideally linking relevant resources (e.g. specs);
- If you have a patch, see: https://developer.gimp.org/core/submit-patch/ -->
### Use cases
<!-- If not obvious, explain the use cases or problems to solve. -->
<!-- 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. -->
@@ -17,7 +24,7 @@ either in the last stable version of GIMP or on updated development code
<!-- Please record a performance log demonstrating the issue, and attach it to the report.
For more information, see
https://gitlab.gnome.org/GNOME/gimp/blob/master/devel-docs/performance-logs/performance-logs.md
https://developer.gimp.org/core/debug/performance-logs/
-->
@@ -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

@@ -1,15 +1,15 @@
Contribution guidelines:
<!-- Contribution guidelines:
- Follow our coding style, which is mostly the GNU coding style
with some specificities: see [HACKING](HACKING#L123).
with some specificities: see [Coding Style](https://developer.gimp.org/core/coding_style/).
- Make sure no trailing spaces or tabs are left out.
- Check the following option when making your request:
"*Allow commits from members who can merge to the target branch.*"
- Enable the container registry for your repository by following this
documentation, but enabling the feature instead of disabling it
(unlike what the docs says, Container Registry is disabled by default
on our Gitlab instance):
https://docs.gitlab.com/ee/user/packages/container_registry/#disable-the-container-registry-for-a-project
- No AI-generated contents allowed (neither code nor text, images…).
Only human created works please!
- You can request the devs to allow installable packages to be
generated from this MR by writing ~Package: in the comments -->

View File

@@ -0,0 +1,218 @@
#!/bin/sh
. .gitlab/search-common-ancestor.sh
# 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)
}
')
## 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="$(echo "$found_coreutils $coreutil" | sed 's|\\||g')"
fi
done
if [ "$found_coreutils" ]; then
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_list="
\.bat \
\.cmd \
\.ps1 \
'cmd' \
'powershell'
"
for ntutil in $ntutils_list; do
if echo "$diff" | grep -q "$ntutil"; then
found_ntutils="$(echo "$found_ntutils $ntutil" | sed 's|\\||g')"
fi
done
if [ "$found_ntutils" ]; then
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"
# 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
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
@@ -24,14 +22,16 @@ git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%
# fall back to `${CI_DEFAULT_BRANCH}` or `${CI_COMMIT_BRANCH}` respectively
# otherwise.
# add mr-origin
git remote add mr-origin ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}
# add patch-origin
git remote add patch-origin ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL:-${CI_PROJECT_URL}}
source_branch="${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-${CI_COMMIT_BRANCH}}"
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" mr-origin "${source_branch}" &> ./fetch_origin.log
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" patch-origin "${source_branch}" > ./fetch_origin.log 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 "mr-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."

4
.gitmodules vendored Normal file
View File

@@ -0,0 +1,4 @@
[submodule "gimp-data"]
path = gimp-data
url = https://gitlab.gnome.org/GNOME/gimp-data.git
shallow = true

11
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,11 @@
{
"C_Cpp.clang_format_fallbackStyle": "GNU",
"editor.rulers": [
80
],
"editor.tabSize": 2,
"editor.renderControlCharacters": true,
"editor.renderWhitespace": "trailing",
"files.trimTrailingWhitespace": true,
"files.eol": "\n"
}

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
@@ -61,6 +62,7 @@ The following people have contributed code to GIMP:
Jay Cox
Kevin Cozens
Jeremiah Darais
Shubham Daule
Michael Deal
Alexia Death
Brian Degenhardt
@@ -81,6 +83,7 @@ The following people have contributed code to GIMP:
Morton Eriksen
Larry Ewing
Dirk Farin
Idriss Fekir
Pedro Alonso Ferrer
Nick Fetchak
Piotr Filiciak
@@ -170,6 +173,7 @@ The following people have contributed code to GIMP:
Tobias Lenz
Frederic Leroy
Raph Levien
Bruno Lopes
Wing Tung Leung
Dave Lichterman
Adrian Likins
@@ -201,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
@@ -352,7 +357,9 @@ The following people have contributed art to GIMP:
Karl La Rocca
Andreas Nilsson
Ville Pätsi
Denis Rangelov
Mike Schaeffer
Sevenix
Carol Spears
Klaus Staedtler
Jakub Steiner

View File

@@ -1,17 +1,18 @@
---------------------------------------
--------------------------------------
Installation instructions for GIMP @GIMP_APP_VERSION@
---------------------------------------
--------------------------------------
There are some basic steps to building and installing GIMP.
GIMP @GIMP_APP_VERSION@ replaces earlier GIMP 2.99.x versions. It is advised to
uninstall them before installing GIMP @GIMP_APP_VERSION@. Since libgimp* libraries
and data are all versionned 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
@@ -37,8 +38,10 @@ help in that regard:
******************************************************************
1. You need to have installed a recent version of pkg-config (>= @GIMP_PKGCONFIG_VERSION@) available
from https://www.freedesktop.org/software/pkgconfig/.
1. You need to have installed a recent version of pkg-config available from:
https://www.freedesktop.org/software/pkgconfig/
The compatible pkgconf utility would also work.
2. You need gettext version 0.19.8 or newer. Older versions did not have support yet
@@ -59,7 +62,7 @@ help in that regard:
GIR data is when cross-compiling because of the difficulty to make cross-tools
for GObject Introspection.
Nevertheless if you have working GIR cross-tools, you can force the expected
behaviour with GIMP's meson option -Dcan-crosscompile-gir=true
behavior with GIMP's meson option -Dcan-crosscompile-gir=true
Optional:
@@ -77,7 +80,7 @@ help in that regard:
4. You need to have installed GTK version @GTK_REQUIRED_VERSION@ or newer.
GIMP also needs a recent version of GLib (>= @GLIB_REQUIRED_VERSION@), GDK-Pixbuf
(>= @GDK_PIXBUF_REQUIRED_VERSION@), and Pango (>= @PANGOCAIRO_REQUIRED_VERSION@). Sources for these can be grabbed
(>= @GDK_PIXBUF_REQUIRED_VERSION@), and Pango (>= @PANGO_REQUIRED_VERSION@). Sources for these can be grabbed
from https://download.gnome.org/sources/.
5. We use cairo >= @CAIRO_REQUIRED_VERSION@, which is hosted at
@@ -101,10 +104,15 @@ help in that regard:
be installed. All these libraries are required dependencies.
8. For metadata access GIMP requires the gexiv2 @GEXIV2_REQUIRED_VERSION@ or newer library.
It is hosted at: https://wiki.gnome.org/Projects/gexiv2
It is hosted at: https://gitlab.gnome.org/GNOME/gexiv2/
9. libpng, libjpeg, libtiff, librsvg and lcms are hard dependencies
that can not be disabled.
that can not be disabled. poppler is also a hard dependency because
PDF is too common nowadays for it to be an option (at least for
import); and poppler-data (CJK and Cyrillic support in PDF) is also
required because no languages should be considered "second class
citizen". If we support PDF, let's support it properly, i.e.
exhaustively.
There might be some issues with librsvg, based on the fact newer
versions are in Rust which is not buildable on all platforms. Yet
@@ -139,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
@@ -168,7 +169,7 @@ help in that regard:
For HTTP support (and many other schemes), on Linux at least, you
should install `gvfs`:
https://wiki.gnome.org/Projects/gvfs
https://gitlab.gnome.org/GNOME/gvfs/
It is unclear whether `gvfs` can be built and installed on other
platforms such as Windows and macOS.
@@ -193,10 +194,22 @@ help in that regard:
https://github.com/strukturag/libheif
Make sure you build libheif with libde265 and libx265 support (for
respectively decoding and encoding of HEVC, i.e. HEIC files), and
libaom decoder and encoder (for AV1, i.e. AVIF files), otherwise
the plug-in is mostly useless.
GIMP supports several HEIF variants (different coding formats in
the HEIF container), so you should make sure you build libheif with
proper encoders and decoders for these:
* HEIC: e.g. libde265 and libx265 support (for
respectively decoding and encoding of HEVC).
* AVIF: e.g. libaom decoder and encoder (for AV1 encoding and
decoding), preferred over rav1e.
* HEJ2: OpenJPEG (for JPEG2000 inside HEIF).
If you don't compile libheif with the correct flags (see libheif
README which has a table of supported codecs), the plug-in is
mostly useless.
If HEIF support doesn't look like it works on relocatable
environments, the environment variable LIBHEIF_PLUGIN_PATH may be
what you are looking for.
15. GObject Introspection requires the following dependencies to be
built and installed with introspection as well: babl, cairo,
@@ -208,29 +221,24 @@ help in that regard:
https://github.com/jrfonseca/drmingw
17. Configure GIMP by running `meson _build`. You may want to pass some
17. Optional step if compiling GIMP from git (unneeded from tarball): you need
to initialize submodules with command `git submodule update --init`.
18. Configure GIMP by running `meson _build`. You may want to pass some
options to it, see below.
Note that we now recommend officially to build GIMP with `meson`
instead of `autotools` (`configure` script, make, etc.).
The autotools build scripts are left alive a bit longer in the git
repository , so that we can revert the recommendation in case big
regressions were discovered.
So if you encounter issues with the meson build, now is the time to
report them!
19. Build GIMP by running `ninja -C _build'.
18. Build GIMP by running `ninja -C _build'.
19. Install GIMP by running `ninja -C _build install'. In order to
20. Install GIMP by running `ninja -C _build install'. In order to
avoid clashes with other versions of GIMP, we install a binary
called gimp-@GIMP_APP_VERSION@. By default there's also a link created so that
you can type 'gimp' to start gimp-@GIMP_APP_VERSION@.
20. Summary of required packages and what version you need:
21. Summary of required packages and what version you need:
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@
@@ -245,6 +253,8 @@ help in that regard:
GTK @GTK_REQUIRED_VERSION@
gvfs (on Linux)
HarfBuzz @HARFBUZZ_REQUIRED_VERSION@
json-glib @JSON_GLIB_REQUIRED_VERSION@
libarchive
libbzip2
libjpeg
liblzma @LIBLZMA_REQUIRED_VERSION@
@@ -254,20 +264,28 @@ help in that regard:
librsvg @RSVG_REQUIRED_VERSION@
libtiff @LIBTIFF_REQUIRED_VERSION@
Little CMS @LCMS_REQUIRED_VERSION@
mypaint-brushes-1.0
pangocairo @PANGOCAIRO_REQUIRED_VERSION@
mypaint-brushes-2.0
pangocairo @PANGO_REQUIRED_VERSION@
poppler-data @POPPLER_DATA_REQUIRED_VERSION@
PyGObject
Python @PYTHON3_REQUIRED_VERSION@
zlib
21. Summary of optional packages:
22. Summary of optional packages:
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
libheif @LIBHEIF_REQUIRED_VERSION@ HEIF (HEIC, AVIF)
libilbm - Amiga IFF/ILBM
libjxl @LIBJXL_REQUIRED_VERSION@ JPEG XL
libmng - MNG
libwebp @WEBP_REQUIRED_VERSION@ WebP (built with --enable-libwebpmux and --enable-libwebpdemux)
libwmf @WMF_REQUIRED_VERSION@ WMF
@@ -275,10 +293,11 @@ help in that regard:
libxpm - XPM
openexr @OPENEXR_REQUIRED_VERSION@ OpenEXR
OpenJPEG @OPENJPEG_REQUIRED_VERSION@ JPEG 2000
qoi - QOI
webkit @WEBKITGTK_REQUIRED_VERSION@ Help browser & webpage
vala - Vala plug-ins
22. Summary of optional runtime dependencies:
23. Summary of optional runtime dependencies:
darktable >= 1.7, with lua support enabled for raw loading
RawTherapee >= 5.2 for raw loading
@@ -286,12 +305,19 @@ help in that regard:
sendmail for sending emails if --with-sendmail enabled
gdb or lldb for our new bug-reporting dialog
"gegl:matting-levin" GEGL operation for alternative matting engine
Python @PYTHON3_REQUIRED_VERSION@ and PyGObject for Python 3 plug-ins
GJS for Javascript plug-ins
LuaJIT and LGI for Lua plug-ins
dot for "Show Image Graph" (unstable branches)
xdg-desktop-portal implemented for your desktop for various D-Bus API (screenshot, color-picking…)
24. Summary of experimental or unmaintained dependencies:
Lua 5.1 (or LuaJIT) and LGI: Lua plug-in example is disabled by
default because of stability issues with the Lua binding.
Webkit-GTK @WEBKITGTK_REQUIRED_VERSION@: the Help Browser and Webpage
plug-ins are disabled for lack of maintenance and issues with
Webkit-GTK
Generic instructions for configuring and compiling auto-configured
@@ -301,9 +327,9 @@ compilation and installation output is not shown.
% tar xvf gimp-@GIMP_VERSION@.tar.xz # unpack the sources
% cd gimp-@GIMP_VERSION@ # change to the toplevel directory
% meson _build # `configure' step
% ninja -C _build # build GIMP
% ninja -C _build install # install GIMP
% meson setup _build # `configure' step
% ninja -C _build # build GIMP
% ninja -C _build install # install GIMP
The `configure' step examines your system, and adapts GIMP to run on
@@ -327,9 +353,10 @@ These are:
a convenience for developers.
-Dgimpdir=DIR. This option changes the default directory GIMP uses to
search for its configuration files from ~/.config/GIMP/@GIMP_APP_VERSION@ (the
directory .config/GIMP/@GIMP_APP_VERSION@ in the user's home directory) to
~/.config/DIR/@GIMP_APP_VERSION@.
search for its configuration files from $XDG_CONFIG_HOME/GIMP/@GIMP_APP_VERSION@/
(per XDG Base Directory Specification, $XDG_CONFIG_HOME defaults to
the directory .config/ in the user's home directory) to
$XDG_CONFIG_HOME/DIR/@GIMP_APP_VERSION@/.
If DIR is an absolute path, the directory will be changed to DIR.
-Dshmem-type=[none|sysv|posix|win32|auto]. This option allows you to
@@ -368,10 +395,6 @@ These are:
-Dgi-docgen=enabled|disabled This option controls whether the libgimp
C API references will be created using gi-docgen.
-Dg-ir-doc=true This option controls whether the libgimp API
references for some binding languages will be created using
g-ir-doc-tool and yelp-build.
-Denable-multiproc=false This option allows you to disable support for
multiple processors. It is enabled by default.
@@ -388,14 +411,11 @@ These are:
gimp-console binary to be built in addition to the standard binary.
gimp-console is useful for command-line batch mode or as a server.
-Dpython=false If for some reason you don't want to install the
Python plug-ins, you can use -Dpython=false.
-Djavascript=false If for some reason you don't want to install the
-Djavascript=disabled If for some reason you don't want to install the
JavaScript plug-ins, you can use -Djavascript=false.
-Dlua=false If for some reason you don't want to install the
Lua plug-ins, you can use -Dlua=false.
-Dlua=true Lua binding is experimental because of stability issues.
You may test the feature by enabling it.
-Dvala-plugins=disabled If for some reason you don't want to install the
Vala plug-ins, you can use -Dvala-plugins=disabled.
@@ -421,73 +441,53 @@ was successful you should be able to run `gimp'.
When configure fails
======================
The configuration step uses pkg-config, a tool that replaces the old foo-config
scripts. The most recent version is available from
https://www.freedesktop.org/software/pkgconfig/
'configure' tries to compile and run a short GTK program. There are
several reasons why this might fail:
* pkg-config could not find the file 'gtk+-3.0.pc' that gets installed
with GTK. (This file is used to get information about where GTK+ is
installed.)
Fix: Either make sure that this file is in the path where pkg-config
looks for it (try 'pkg-config --debug' or add the location of
gtk+-3.0.pc to the environment variable PKG_CONFIG_PATH before running
configure.
* Libraries you installed are not found when you attempt to start GIMP.
The details of how to fix this problem will depend on the system:
On Linux and other systems using ELF libraries, add the directory to
holding the library to /etc/ld.so.conf or to the environment variable
LD_LIBRARY_PATH, and run 'ldconfig'.
On other systems, it may be necessary to encode this path
into the executable, by setting the LDFLAGS environment variable
before running configure. For example:
LDFLAGS="-R/home/joe/lib" ./configure
or
LDFLAGS="-Wl,-rpath -Wl,/home/joe/lib" ./configure
* An old version of the GTK libraries was found instead of
your newly installed version. This commonly happens if a
binary package of GTK was previously installed on your system,
and you later compiled GTK from source.
Fix: Remove the old libraries and include files. If you are afraid
that removing the old libraries may break other packages supplied by
your distributor, you can try installing GLib, GTK and other
libraries in a different prefix after setting the environment
variable PKG_CONFIG_LIBDIR to point to lib/pkgconfig/ in that new
prefix so that it does not try to read the *.pc files from the
default directory (/usr/lib/pkgconfig). However, removing the old
packages is often the easier solution.
The most important is to read the error output displayed by meson, as it
will very likely tell you the exact problem.
A detailed log of the meson output is written to the file meson-logs/meson-log.txt.
This may help diagnose problems.
The configuration step verify that various tools are installed, such as:
C and C++ compilers, pkg-config or pkgconf (tools that replaces the old
foo-config scripts), and more. Make sure these are installed.
When meson configure fails on plug-ins
======================================
Then it will try to search for various libraries, by looking up a `.pc`
file (used to get information on installation details). For instance if
pkg-config could not find the file 'gtk+-3.0.pc' that gets installed
with GTK, verify that the development package of GTK+3 is installed or
that you have a version equal or higher than the required version.
There are some GIMP plug-ins that need additional third-party libraries
installed on your system. For example to compile the plug-ins that load
and save JPEG, PNG or TIFF files you need the related libraries and header
files installed, otherwise you'll get a message that plug-in xyz will not
be built.
If you installed a supported version of a dependency but the configure
step still cannot find it, you may need to add the location of the .pc
file to the environment variable PKG_CONFIG_PATH before running meson
setup.
If you are sure that those libraries are correctly installed, but configure
fails to detect them, the following might help:
When you use custom installation prefixes for dependencies, you will
likely need to set more environment variables, such as LD_LIBRARY_PATH
or GI_TYPELIB_PATH, either for the configuration to succeed, the build
itself or to start GIMP at all.
Please check out our building tutorial for more in-depth details:
Set your LDFLAGS environment variable to look for the library in a certain
place, e.g. if you are working in a bash shell you would say:
export LDFLAGS="-L<path_to_library> -L<path_to_another_one>"
before you run configure.
https://developer.gimp.org/core/setup/build/
Set your CPPFLAGS environment variable to look for the header file in a
certain place, e.g. if you are working in a bash shell you would say:
export CPPFLAGS="-I<path_to_header_file> -I<path_to_another_one>"
before you run meson.
About optional features
=======================
When the configure step succeeds, it will display a summary of which
optional features or plug-ins will be installed.
There are some GIMP features, in particular for the support of more
recent or less used image formats, that need additional third-party
libraries installed on your system. You need the related libraries and
header files installed for these, otherwise the compiled GIMP will be a
minimal version without these features.
Once you installed them, run the following command to trigger a
reconfiguration:
% ninja reconfigure
Verify that the optional features you wanted are now shown as `true`,
otherwise follow similar advice as above to make sure they are
visible to your setup.

View File

@@ -1,167 +0,0 @@
## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
if WITH_PDBGEN
PDB = pdb
endif
SUBDIRS = \
m4macros \
cursors \
themes \
po \
po-libgimp \
po-plug-ins \
po-python \
po-script-fu \
po-tips \
po-windows-installer \
data \
desktop \
menus \
libgimpbase \
tools \
$(PDB) \
icons \
libgimpcolor \
libgimpmath \
libgimpconfig \
libgimpmodule \
libgimpthumb \
libgimpwidgets \
libgimp \
app \
app-tools \
$(GIMP_MODULES) \
$(GIMP_PLUGINS) \
$(GIMP_EXTENSIONS) \
etc \
devel-docs \
docs \
build
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \
gimp-@GIMP_PKGCONFIG_VERSION@.pc \
gimpthumb-@GIMP_PKGCONFIG_VERSION@.pc \
gimpui-@GIMP_PKGCONFIG_VERSION@.pc
AUTHORS: authors.xml authors.xsl
if HAVE_XSLTPROC
$(XSLTPROC) -o $(@) $(top_srcdir)/authors.xsl $< || rm -f $(@)
endif
authors.md: authors.xml authors4gimp-web.xsl
if HAVE_XSLTPROC
$(XSLTPROC) --stringparam today "`date --iso-8601=seconds`" -o $(@) $(top_srcdir)/authors4gimp-web.xsl $< || rm -f $(@)
endif
EXTRA_DIST = \
AUTHORS \
COPYING \
ChangeLog \
ChangeLog.pre-1-0 \
ChangeLog.pre-1-2 \
ChangeLog.pre-2-0 \
ChangeLog.pre-2-2 \
ChangeLog.pre-2-4 \
ChangeLog.pre-2-6 \
ChangeLog.pre-git \
INSTALL \
LICENSE \
NEWS \
NEWS.pre-2-0 \
NEWS.pre-2-2 \
NEWS.pre-2-4 \
NEWS.pre-2-6 \
NEWS.pre-2-8 \
NEWS.pre-2-10 \
README \
README.i18n \
authors.dtd \
authors.xml \
authors.xsl \
git-version.h
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gi-docgen --with-python=force --with-javascript=force --with-lua=force
check-defs:
@$(PYTHON) $(top_srcdir)/tools/defcheck.py $(top_srcdir) || \
( echo "*** .def files inconsistent ***"; exit 1; )
validate-authors:
if HAVE_XMLLINT
@cd $(srcdir); \
$(XMLLINT) --noout --valid authors.xml || \
( echo "*** authors.xml INVALID ***"; exit 1; )
endif
all-local: AUTHORS
dist-hook: check-defs validate-authors
CHANGELOG_START = 74424325abb54620b370f2595445b2b2a19fe5e7
ChangeLog: $(srcdir)/ChangeLog $(srcdir)/ChangeLog.pre-git
$(srcdir)/ChangeLog:
@echo Creating $@ based on git log
@if test -d "$(srcdir)/.git"; then \
(GIT_DIR=$(top_srcdir)/.git ./missing --run \
git log $(CHANGELOG_START)^.. --stat) | fmt --split-only > $@.tmp \
&& mv -f $@.tmp $@ && echo Appending ChangeLog.pre-git && cat ChangeLog.pre-git >> $@ \
|| ($(RM) $@.tmp; \
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
(test -f $@ || echo git-log is required to generate this file >> $@)); \
else \
test -f $@ || \
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
echo A git checkout and git-log is required to generate this file >> $@); \
fi
.PHONY: $(srcdir)/ChangeLog
generated_sources = \
git-version.h
# Build git-version.h before anything in the subdirs as this is needed
# in the about and debug dialog (app/) and in the debug tool (tools/).
BUILT_SOURCES = $(generated_sources)
CLEANFILES = $(generated_sources)
# If git is available, always check if git-version.h should be
# updated. If git is not available, don't do anything if git-version.h
# already exists because then we are probably working with a tarball
# in which case the git-version.h we ship is correct.
git-version.h: update-git-version-header
@if test -e "$(top_srcdir)/.git"; then \
git_version="`git --git-dir=$(top_srcdir)/.git describe --always`"; \
git_version_abbrev="`git --git-dir=$(top_srcdir)/.git rev-parse --short HEAD`"; \
git_last_commit_year="`git --git-dir=$(top_srcdir)/.git log -n1 --reverse --pretty=%ci | cut -b 1-4`"; \
elif test ! -f "$@"; then \
git_version="Unknown, shouldn't happen"; \
git_version_abbrev="$$git_version"; \
git_last_commit_timestamp=-1; \
git_last_commit_year="`date -u '+%Y'`"; \
fi; \
if test -n "$$git_version"; then \
echo "#ifndef __GIT_VERSION_H__" > "$@.tmp"; \
echo "#define __GIT_VERSION_H__" >> "$@.tmp"; \
echo "#define GIMP_GIT_VERSION \"$$git_version\"" >> "$@.tmp"; \
echo "#define GIMP_GIT_VERSION_ABBREV \"$$git_version_abbrev\"" >> "$@.tmp"; \
echo "#define GIMP_GIT_LAST_COMMIT_YEAR \"$$git_last_commit_year\"" >> "$@.tmp"; \
echo "#endif /* __GIT_VERSION_H__ */" >> "$@.tmp"; \
fi
@if ( test -f "$@.tmp" && test -f "$@" && cmp "$@.tmp" "$@" > /dev/null ); then \
rm -f "$@.tmp"; \
elif test -f "$@.tmp"; then \
mv "$@.tmp" "$@"; \
echo " git HEAD changed: $@ regenerated"; \
fi
.PHONY: update-git-version-header

2284
NEWS

File diff suppressed because it is too large Load Diff

3519
NEWS.pre-3-0 Normal file

File diff suppressed because it is too large Load Diff

42
README
View File

@@ -1,16 +1,14 @@
------------------------------
GNU Image Manipulation Program
2.99 Development Branch
3.1 Development Branch
------------------------------
This is an unstable development release, an intermediate state on the
way to the next stable release: GIMP 3.0. GIMP 2.99 may or may not do
what you expect. Save your work early and often. If you want a stable
version, please use GIMP 2.10 instead.
This is 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
still being worked on and obviously not quite finished yet.
still being worked on and obviously not quite finished yet. If neither
of these, please report it!
If you want to hack on GIMP, please read the file devel-docs/README.md.
For detailed installation instructions, see the file INSTALL.
@@ -24,12 +22,16 @@ GIMP's home page is at:
https://www.gimp.org/
Please be sure to visit this site for information, documentation,
tutorials, news, etc. All things GIMP-ish are available from there.
tutorials, news, etc. All things GIMP-ish are available from there.
The latest version of GIMP can be found at:
https://www.gimp.org/downloads/
We also have a website dedicated to documentation at:
https://docs.gimp.org/
2. Contributing
===============
@@ -58,28 +60,18 @@ development discussion. There is more info at:
https://www.gimp.org/discuss.html
Links to several archives of the mailing lists are included in that page.
Gimp-user-list is a mailing list dedicated to user problems, hints and
tips, discussion of cool effects, etc. Gimp-developer-list is oriented
to GIMP core and plug-in developers. Gimp-gui-list is for discussing
about GIMP interface to improve user experience. Most people will only
want to be subscribed to gimp-user-list. If you want to help develop
GIMP, the gimp-developer mailing list is a good starting point; if you
want to help with GUI design, the gimp-gui list is where you want to
subscribe.
Other discussion channels can be listed on this page when they are
moderated by a team member, such as forums.
Finally, for the real junkies, there are IRC channels devoted to GIMP.
On GIMPNet (a private free software oriented network) there is #gimp.
For the real junkies, there are IRC channels (e.g. #gimp or #gimp-user)
devoted to GIMP on GIMPNet (a private free software oriented network).
Many of the developers hang out there. Some of the GIMPNet servers are:
irc.gimp.org:6667
irc.us.gimp.org:6667
irc.eu.gimp.org:6667
More discussion channels, such as forums, will be listed on the above
"discuss" page when they are moderated by a team member.
Links to archives of former discussion methods (e.g. mailing lists) are
also included in that page.
4. Customizing
==============
@@ -87,11 +79,11 @@ Many of the developers hang out there. Some of the GIMPNet servers are:
The look of GIMP's interface can be customized like any other GTK+ app
by editing files in `${XDG_CONFIG_HOME}/gtk-3.0/` (settings.ini and
gtk.css in particular) or by using "themes" (ready-made customizations).
Additionally, GIMP reads `${XDG_CONFIG_HOME}/GIMP/2.99/gimp.css` so you
Additionally, GIMP reads `${XDG_CONFIG_HOME}/GIMP/3.0/gimp.css` so you
can have settings that only apply to GIMP.
You can also manually change the keybindings to any of your choice by
editing: `${XDG_CONFIG_HOME}/GIMP/2.99/shortcutsrc`.
editing: `${XDG_CONFIG_HOME}/GIMP/3.0/shortcutsrc`.
Have fun,

View File

@@ -19,13 +19,13 @@ GIMP is different
not one catalog but many. For a full translation of GIMP's UI, you
will have to add translations for the following catalogs:
po/gimp20.po -- the core
po-libgimp/gimp20-libgimp.pot -- the libgimp library
po-plugins/gimp20-std-plugins.pot -- the C plug-ins
po-python/gimp20-python.pot -- the pygimp plug-ins
po-script-fu/gimp20-script-fu.pot -- the script-fu scripts
po-tips/gimp20-tips.pot -- the startup tips
po-windows-installer/gimp20-windows-installer.pot -- the windows installer
po/gimp30.pot -- the core
po-libgimp/gimp30-libgimp.pot -- the libgimp library
po-plugins/gimp30-std-plugins.pot -- the C plug-ins
po-python/gimp30-python.pot -- the pygimp plug-ins
po-script-fu/gimp30-script-fu.pot -- the script-fu scripts
po-tips/gimp30-tips.pot -- the startup tips
po-windows-installer/gimp30-windows-installer.pot -- the windows installer
If you are looking for the translations of gimp-perl, please note that
gimp-perl has been moved into it's own git module called

View File

@@ -1,9 +0,0 @@
m4_include([m4macros/alsa.m4])
m4_include([m4macros/ax_compare_version.m4])
m4_include([m4macros/ax_cxx_compile_stdcxx.m4])
m4_include([m4macros/ax_gcc_func_attribute.m4])
m4_include([m4macros/ax_prog_cc_for_build.m4])
m4_include([m4macros/ax_prog_perl_version.m4])
m4_include([m4macros/detectcflags.m4])
m4_include([m4macros/python3dev.m4])
m4_include([m4macros/vapigen.m4])

View File

@@ -1,6 +0,0 @@
/Makefile
/Makefile.in
/.deps
/.libs
/gimp-debug-tool-2.99
/gimp-debug-tool-2.99.exe

View File

@@ -1,85 +0,0 @@
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = subdir-objects
libapp = $(top_builddir)/app/libapp.a
libappwidgets = $(top_builddir)/app/widgets/libappwidgets.a
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
xobjective_cxx = "-xobjective-c++"
xnone = "-xnone"
framework_appkit = -framework AppKit
endif
if OS_WIN32
bin_PROGRAMS = gimp-debug-tool-@GIMP_TOOL_VERSION@
else
if PLATFORM_OSX
bin_PROGRAMS = gimp-debug-tool-@GIMP_TOOL_VERSION@
else
libexec_PROGRAMS = gimp-debug-tool-@GIMP_TOOL_VERSION@
endif
endif
gimp_debug_tool_@GIMP_TOOL_VERSION@_SOURCES = \
gimp-debug-tool.c
gimp_debug_tool_@GIMP_TOOL_VERSION@_CPPFLAGS = \
-DCC_VERSION=\""$(CC_VERSION)"\" \
-I$(top_srcdir)/app \
-I$(top_builddir)/app \
$(AM_CPPFLAGS) \
$(GIO_CFLAGS) \
$(GEGL_CFLAGS) \
$(GTK_CFLAGS) \
$(FONTCONFIG_CFLAGS)
gimp_debug_tool_@GIMP_TOOL_VERSION@_LDADD = \
$(libappwidgets) \
$(libapp) \
$(libgimpbase) \
$(GIO_LIBS) \
$(GEGL_LIBS) \
$(GTK_LIBS) \
$(FONTCONFIG_LIBS)
AM_CPPFLAGS = \
-DGIMP_APP_VERSION=\"@GIMP_APP_VERSION@\" \
-DLOCALEDIR=\""$(gimplocaledir)"\" \
-DPREFIX=\""$(prefix)"\" \
-DEXEC_PREFIX=\""$(exec_prefix)"\" \
-DBINDIR=\""$(bindir)"\" \
-DSBINDIR=\""$(sbindir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
-DDATAROOTDIR=\""$(datarootdir)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DSHAREDSTATEDIR=\""$(sharedstatedir)"\" \
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DINFODIR=\""$(infodir)"\" \
-DMANDIR=\""$(mandir)"\" \
-DGIMPPLUGINDIR=\""$(gimpplugindir)"\" \
-DGIMPDATADIR=\""$(gimpdatadir)"\" \
-DCC=\""$(CC)"\" \
-DGIMPDIR=\""$(gimpdir)"\" \
-DGIMP_PLUGIN_VERSION=\""$(GIMP_PLUGIN_VERSION)"\" \
-I$(top_srcdir) \
$(GTK_CFLAGS) \
-I$(includedir)
AM_CFLAGS = \
$(xobjective_c)
AM_CXXFLAGS = \
$(xobjective_cxx)
AM_LDFLAGS = \
$(framework_appkit) \
$(xnone)

View File

@@ -23,9 +23,18 @@ gimp_debug_tool = executable('gimp-debug-tool' + exec_ver,
install_dir: gimp_debug_tool_dir
)
if enable_default_bin and meson.version().version_compare('>=0.61.0')
install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimp_debug_tool.full_path()),
install_dir: gimp_debug_tool_dir
)
if enable_default_bin
if not platform_windows
install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, ''),
pointing_to: fs.name(gimp_debug_tool.full_path()),
install_dir: gimp_debug_tool_dir)
install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, '-@0@'.format(api_version_major)),
pointing_to: fs.name(gimp_debug_tool.full_path()),
install_dir: gimp_debug_tool_dir)
else
meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; 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

9
app/.gitignore vendored
View File

@@ -1,9 +0,0 @@
/.deps
/.libs
/Makefile
/Makefile.in
/gimp-2.*
/gimp-console-2.*
/gimp.rc
/libapp.a
/makefile.mingw

View File

@@ -1,297 +0,0 @@
## Process this file with automake to produce Makefile.in
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
xobjective_cxx = "-xobjective-c++"
xnone = "-xnone"
endif
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).la
libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
libgimpthumb = $(top_builddir)/libgimpthumb/libgimpthumb-$(GIMP_API_VERSION).la
# Sort this by architectural dependencies, lowest level at the top,
# so that when e.g. changing a header-file the subdirs are built in
# the right order
SUBDIRS = \
config \
core \
operations \
gegl \
text \
vectors \
paint \
plug-in \
xcf \
file \
file-data \
pdb \
widgets \
propgui \
display \
tools \
dialogs \
actions \
menus \
gui \
. \
tests
# Put the GIMP core in a lib so we can conveniently link against that
# in test cases
noinst_LIBRARIES = libapp.a
if ENABLE_GIMP_CONSOLE
bin_PROGRAMS = gimp-@GIMP_APP_VERSION@ gimp-console-@GIMP_APP_VERSION@
else
bin_PROGRAMS = gimp-@GIMP_APP_VERSION@
endif
libapp_sources = \
about.h \
app.c \
app.h \
errors.c \
errors.h \
gimpcoreapp.c \
gimpcoreapp.h \
gimpconsoleapp.c \
gimpconsoleapp.h \
language.c \
language.h \
sanity.c \
sanity.h \
signals.c \
signals.h \
unique.c \
unique.h \
gimp-debug.c \
gimp-debug.h \
gimp-intl.h \
gimp-log.c \
gimp-log.h \
gimp-priorities.h \
gimp-update.c \
gimp-update.h \
gimp-version.c \
gimp-version.h
libapp_a_SOURCES = $(libapp_sources)
gimp_@GIMP_APP_VERSION@_SOURCES = $(libapp_sources) main.c
if PLATFORM_LINUX
libdl = -ldl
endif
if PLATFORM_OSX
framework_cocoa = -framework Cocoa
endif
if OS_WIN32
win32_ldflags = -mwindows -Wl,--tsaware $(WIN32_LARGE_ADDRESS_AWARE)
# for GimpDashboard and GimpBacktrace
psapi_cflags = -DPSAPI_VERSION=1
libpsapi = -lpsapi
# for GimpBacktrace
libdbghelp = -ldbghelp
# for I_RpcExceptionFilter()
librpcrt4 = -lrpcrt4
if HAVE_EXCHNDL
exchndl = -lexchndl
endif
else
libm = -lm
endif
if ENABLE_RELOCATABLE_RESOURCES
munix = -Wl,-rpath '-Wl,$$ORIGIN/../lib'
endif
if HAVE_WINDRES
include $(top_srcdir)/build/windows/gimprc.rule
GIMPRC = gimp-$(GIMP_APP_VERSION).rc.o
GIMPCONSOLERC = gimp-console-$(GIMP_APP_VERSION).rc.o
endif
AM_CPPFLAGS = \
-DGIMPDIR=\""$(gimpdir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DGIMP_USER_VERSION=\"$(GIMP_USER_VERSION)\" \
-DGIMP_TOOL_VERSION=\"$(GIMP_TOOL_VERSION)\" \
-DG_LOG_DOMAIN=\"Gimp\" \
-DGIMP_APP_GLUE_COMPILATION \
-DCC_VERSION=\""$(CC_VERSION)"\" \
-I$(top_srcdir) \
$(GTK_CFLAGS) \
$(PANGOCAIRO_CFLAGS) \
$(GEGL_CFLAGS) \
$(LCMS_CFLAGS) \
$(GEXIV2_CFLAGS) \
$(psapi_cflags) \
$(xobjective_c) \
-I$(includedir) \
-I$(builddir)/gui
# We need this due to circular dependencies
AM_LDFLAGS = \
$(munix) \
-Wl,-u,$(SYMPREFIX)gimp_vectors_undo_get_type \
-Wl,-u,$(SYMPREFIX)gimp_vectors_mod_undo_get_type \
-Wl,-u,$(SYMPREFIX)gimp_config_param_spec_duplicate \
-Wl,-u,$(SYMPREFIX)gimp_operations_init \
-Wl,-u,$(SYMPREFIX)xcf_init \
-Wl,-u,$(SYMPREFIX)internal_procs_init \
-Wl,-u,$(SYMPREFIX)gimp_pdb_compat_procs_register \
-Wl,-u,$(SYMPREFIX)gimp_plug_in_manager_restore \
-Wl,-u,$(SYMPREFIX)gimp_layer_mode_is_legacy \
-Wl,-u,$(SYMPREFIX)gimp_parallel_init \
-Wl,-u,$(SYMPREFIX)gimp_async_set_new \
-Wl,-u,$(SYMPREFIX)gimp_uncancelable_waitable_new
gimpconsoleldadd = \
xcf/libappxcf.a \
pdb/libappinternal-procs.a \
pdb/libapppdb.a \
plug-in/libappplug-in.a \
vectors/libappvectors.a \
core/libappcore.a \
file/libappfile.a \
file-data/libappfile-data.a \
text/libapptext.a \
paint/libapppaint.a \
operations/libappoperations.a \
operations/layer-modes/libapplayermodes.a \
operations/layer-modes-legacy/libapplayermodeslegacy.a \
gegl/libappgegl.a \
config/libappconfig.a \
$(libgimpconfig) \
$(libgimpmath) \
$(libgimpthumb) \
$(libgimpcolor) \
$(libgimpmodule) \
$(libgimpbase) \
$(APPSTREAM_GLIB_LIBS) \
$(GDK_PIXBUF_LIBS) \
$(FREETYPE_LIBS) \
$(FONTCONFIG_LIBS) \
$(PANGOCAIRO_LIBS) \
$(HARFBUZZ_LIBS) \
$(CAIRO_LIBS) \
$(GIO_UNIX_LIBS) \
$(GIO_WINDOWS_LIBS) \
$(GEGL_LIBS) \
$(GLIB_LIBS) \
$(LCMS_LIBS) \
$(GEXIV2_LIBS) \
$(Z_LIBS) \
$(JSON_C_LIBS) \
$(LIBARCHIVE_LIBS) \
$(LIBMYPAINT_LIBS) \
$(LIBBACKTRACE_LIBS) \
$(LIBUNWIND_LIBS) \
$(INTLLIBS) \
$(RT_LIBS) \
$(libm) \
$(libdl) \
$(libpsapi) \
$(libdbghelp) \
$(librpcrt4)
gimp_@GIMP_APP_VERSION@_LDFLAGS = \
$(AM_LDFLAGS) \
$(win32_ldflags) \
$(framework_cocoa) \
-Wl,-u,$(SYMPREFIX)gimp_lebl_dialog \
-Wl,-u,$(SYMPREFIX)gimp_core_pixbufs_get_resource \
-Wl,-u,$(SYMPREFIX)gimp_tool_cursors_get_resource
gimp_@GIMP_APP_VERSION@_LDADD = \
gui/libappgui.a \
menus/libappmenus.a \
actions/libappactions.a \
dialogs/libappdialogs.a \
tools/libapptools.a \
display/libappdisplay.a \
propgui/libapppropgui.a \
widgets/libappwidgets.a \
$(libgimpwidgets) \
$(GTK_LIBS) \
$(GTK_MAC_INTEGRATION_LIBS) \
$(gimpconsoleldadd) \
$(exchndl) \
$(GIMPRC)
if ENABLE_GIMP_CONSOLE
gimp_console_@GIMP_APP_VERSION@_SOURCES = $(libapp_sources) main.c
gimp_console_@GIMP_APP_VERSION@_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DGIMP_CONSOLE_COMPILATION
gimp_console_@GIMP_APP_VERSION@_LDADD = \
$(gimpconsoleldadd) \
$(GIMPCONSOLERC)
endif
install-exec-hook:
if DEFAULT_BINARY
cd $(DESTDIR)$(bindir) \
&& rm -f gimp$(EXEEXT) \
&& $(LN_S) gimp-$(GIMP_APP_VERSION)$(EXEEXT) gimp$(EXEEXT)
if ENABLE_GIMP_CONSOLE
cd $(DESTDIR)$(bindir) \
&& rm -f gimp-console$(EXEEXT) \
&& $(LN_S) gimp-console-$(GIMP_APP_VERSION)$(EXEEXT) gimp-console$(EXEEXT)
endif
endif
uninstall-local:
if DEFAULT_BINARY
rm -f $(DESTDIR)$(bindir)/gimp$(EXEEXT)
if ENABLE_GIMP_CONSOLE
rm -f $(DESTDIR)$(bindir)/gimp-console$(EXEEXT)
endif
endif
# require gimp-console when making dist
#
if ENABLE_GIMP_CONSOLE
dist-check-gimp-console:
else
dist-check-gimp-console:
@echo "*** gimp-console must be enabled in order to make dist"
@false
endif
# hook to assure that the system gimprc and the gimprc manpage are
# uptodate when a release is made
#
dist-dump-gimprc: gimp-console-$(GIMP_APP_VERSION)$(EXEEXT)
./$< --dump-gimprc-system > gimprc.tmp \
&& (cmp -s gimprc.tmp $(top_srcdir)/etc/gimprc.in || \
cp gimprc.tmp $(top_srcdir)/etc/gimprc.in) \
&& rm gimprc.tmp
./$< --dump-gimprc-manpage > gimprc.tmp \
&& (cmp -s gimprc.tmp $(top_srcdir)/docs/gimprc.5.in ||\
cp gimprc.tmp $(top_srcdir)/docs/gimprc.5.in) \
&& rm gimprc.tmp
dist-hook: dist-check-gimp-console dist-dump-gimprc

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

@@ -1,7 +0,0 @@
/Makefile
/Makefile.in
/.deps
/.libs
/*.lo
/libappactions.a
/libappactions.la

View File

@@ -1,206 +0,0 @@
## Process this file with automake to produce Makefile.in
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gimp-Actions\" \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_builddir)/app \
-I$(top_srcdir)/app \
$(GEGL_CFLAGS) \
$(GTK_CFLAGS) \
-I$(includedir)
noinst_LIBRARIES = libappactions.a
libappactions_a_SOURCES = \
actions-types.h \
actions.c \
actions.h \
\
gimpgeglprocedure.c \
gimpgeglprocedure.h \
\
brush-editor-actions.c \
brush-editor-actions.h \
brushes-actions.c \
brushes-actions.h \
buffers-actions.c \
buffers-actions.h \
buffers-commands.c \
buffers-commands.h \
channels-actions.c \
channels-actions.h \
channels-commands.c \
channels-commands.h \
colormap-actions.c \
colormap-actions.h \
colormap-commands.c \
colormap-commands.h \
context-actions.c \
context-actions.h \
context-commands.c \
context-commands.h \
cursor-info-actions.c \
cursor-info-actions.h \
cursor-info-commands.c \
cursor-info-commands.h \
dashboard-actions.c \
dashboard-actions.h \
dashboard-commands.c \
dashboard-commands.h \
data-commands.c \
data-commands.h \
data-editor-commands.c \
data-editor-commands.h \
debug-actions.c \
debug-actions.h \
debug-commands.c \
debug-commands.h \
dialogs-actions.c \
dialogs-actions.h \
dialogs-commands.c \
dialogs-commands.h \
dock-actions.c \
dock-actions.h \
dock-commands.c \
dock-commands.h \
dockable-actions.c \
dockable-actions.h \
dockable-commands.c \
dockable-commands.h \
documents-actions.c \
documents-actions.h \
documents-commands.c \
documents-commands.h \
drawable-actions.c \
drawable-actions.h \
drawable-commands.c \
drawable-commands.h \
dynamics-actions.c \
dynamics-actions.h \
dynamics-editor-actions.c \
dynamics-editor-actions.h \
edit-actions.c \
edit-actions.h \
edit-commands.c \
edit-commands.h \
error-console-actions.c \
error-console-actions.h \
error-console-commands.c \
error-console-commands.h \
file-actions.c \
file-actions.h \
file-commands.c \
file-commands.h \
filters-actions.c \
filters-actions.h \
filters-commands.c \
filters-commands.h \
fonts-actions.c \
fonts-actions.h \
gradient-editor-actions.c \
gradient-editor-actions.h \
gradient-editor-commands.c \
gradient-editor-commands.h \
gradients-actions.c \
gradients-actions.h \
gradients-commands.c \
gradients-commands.h \
help-actions.c \
help-actions.h \
help-commands.c \
help-commands.h \
image-actions.c \
image-actions.h \
image-commands.c \
image-commands.h \
images-actions.c \
images-actions.h \
images-commands.c \
images-commands.h \
items-commands.c \
items-commands.h \
items-actions.c \
items-actions.h \
layers-actions.c \
layers-actions.h \
layers-commands.c \
layers-commands.h \
mypaint-brushes-actions.c \
mypaint-brushes-actions.h \
palette-editor-actions.c \
palette-editor-actions.h \
palette-editor-commands.c \
palette-editor-commands.h \
palettes-actions.c \
palettes-actions.h \
palettes-commands.c \
palettes-commands.h \
patterns-actions.c \
patterns-actions.h \
plug-in-actions.c \
plug-in-actions.h \
plug-in-commands.c \
plug-in-commands.h \
procedure-commands.c \
procedure-commands.h \
quick-mask-actions.c \
quick-mask-actions.h \
quick-mask-commands.c \
quick-mask-commands.h \
sample-points-actions.c \
sample-points-actions.h \
sample-points-commands.c \
sample-points-commands.h \
select-actions.c \
select-actions.h \
select-commands.c \
select-commands.h \
templates-actions.c \
templates-actions.h \
templates-commands.c \
templates-commands.h \
text-editor-actions.c \
text-editor-actions.h \
text-editor-commands.c \
text-editor-commands.h \
text-tool-actions.c \
text-tool-actions.h \
text-tool-commands.c \
text-tool-commands.h \
tool-options-actions.c \
tool-options-actions.h \
tool-options-commands.c \
tool-options-commands.h \
tool-presets-actions.c \
tool-presets-actions.h \
tool-presets-commands.c \
tool-presets-commands.h \
tool-preset-editor-actions.c \
tool-preset-editor-actions.h \
tool-preset-editor-commands.c \
tool-preset-editor-commands.h \
tools-actions.c \
tools-actions.h \
tools-commands.c \
tools-commands.h \
vector-toolpath-actions.c \
vector-toolpath-actions.h \
vector-toolpath-commands.c \
vector-toolpath-commands.h \
vectors-actions.c \
vectors-actions.h \
vectors-commands.c \
vectors-commands.h \
view-actions.c \
view-actions.h \
view-commands.c \
view-commands.h \
window-actions.c \
window-actions.h \
window-commands.c \
window-commands.h \
windows-actions.c \
windows-actions.h \
windows-commands.c \
windows-commands.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"
@@ -36,7 +34,9 @@ typedef enum
GIMP_ACTION_SELECT_SKIP_PREVIOUS = -8,
GIMP_ACTION_SELECT_SKIP_NEXT = -9,
GIMP_ACTION_SELECT_PERCENT_PREVIOUS = -10,
GIMP_ACTION_SELECT_PERCENT_NEXT = -11
GIMP_ACTION_SELECT_PERCENT_NEXT = -11,
GIMP_ACTION_SELECT_FLAT_PREVIOUS = -12,
GIMP_ACTION_SELECT_FLAT_NEXT = -13,
} GimpActionSelectType;
typedef enum
@@ -49,6 +49,3 @@ typedef enum
GIMP_SAVE_MODE_EXPORT_AS,
GIMP_SAVE_MODE_OVERWRITE
} GimpSaveMode;
#endif /* __ACTIONS_TYPES_H__ */

View File

@@ -28,6 +28,7 @@
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpitem.h"
#include "core/gimptooloptions.h"
#include "core/gimptoolinfo.h"
@@ -80,6 +81,7 @@
#include "mypaint-brushes-actions.h"
#include "palette-editor-actions.h"
#include "palettes-actions.h"
#include "paths-actions.h"
#include "patterns-actions.h"
#include "plug-in-actions.h"
#include "quick-mask-actions.h"
@@ -89,11 +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 "vectors-actions.h"
#include "view-actions.h"
#include "windows-actions.h"
@@ -103,6 +104,7 @@
/* global variables */
GimpActionFactory *global_action_factory = NULL;
GHashTable *aux_filter_hash_table = NULL;
/* private variables */
@@ -232,15 +234,15 @@ 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 },
{ "vectors", N_("Paths"), GIMP_ICON_PATH,
vectors_actions_setup,
vectors_actions_update },
{ "paths", N_("Paths"), GIMP_ICON_PATH,
paths_actions_setup,
paths_actions_update },
{ "view", N_("View"), GIMP_ICON_VISIBLE,
view_actions_setup,
view_actions_update },
@@ -269,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
@@ -279,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 *
@@ -365,9 +386,17 @@ action_data_get_image (gpointer data)
recursion = TRUE;
if (GIMP_IS_ITEM_TREE_VIEW (data))
result = gimp_item_tree_view_get_image ((GimpItemTreeView *) data);
{
result = gimp_item_tree_view_get_image ((GimpItemTreeView *) data);
recursion = FALSE;
return result;
}
else if (GIMP_IS_IMAGE_EDITOR (data))
result = ((GimpImageEditor *) data)->image;
{
result = ((GimpImageEditor *) data)->image;
recursion = FALSE;
return result;
}
if (! result)
{
@@ -481,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
{
@@ -721,6 +749,91 @@ action_select_object (GimpActionSelectType select_type,
select_index = gimp_container_get_child_index (container, current) + 10;
break;
case GIMP_ACTION_SELECT_FLAT_PREVIOUS:
/* XXX We only support this case and the next for GimpItem
* containers.
*/
g_return_val_if_fail (GIMP_IS_ITEM (current), NULL);
select_index = gimp_container_get_child_index (container, current) - 1;
if (select_index < 0)
{
GimpItem *parent = gimp_item_get_parent (GIMP_ITEM (current));
if (parent)
return GIMP_OBJECT (parent);
else
return current;
}
else
{
GimpObject *prev;
GimpContainer *prev_container;
prev = gimp_container_get_child_by_index (container, select_index);
while ((prev_container = gimp_viewable_get_children (GIMP_VIEWABLE (prev))) != NULL)
{
if (gimp_viewable_get_expanded (GIMP_VIEWABLE (prev)))
{
gint n_prev_children;
n_prev_children = gimp_container_get_n_children (prev_container);
if (n_prev_children > 0)
{
select_index = n_prev_children - 1;
container = prev_container;
prev = gimp_container_get_child_by_index (container, select_index);
continue;
}
}
break;
}
}
break;
case GIMP_ACTION_SELECT_FLAT_NEXT:
{
GimpContainer *current_container;
g_return_val_if_fail (GIMP_IS_ITEM (current), NULL);
if ((current_container = gimp_viewable_get_children (GIMP_VIEWABLE (current))) != NULL &&
gimp_viewable_get_expanded (GIMP_VIEWABLE (current)) &&
gimp_container_get_n_children (current_container) > 0)
{
select_index = 0;
container = current_container;
}
else
{
select_index = gimp_container_get_child_index (container, current) + 1;
if (select_index >= n_children)
{
while (TRUE)
{
GimpItem *parent;
GimpContainer *parent_container;
gint n_parent_children;
parent = gimp_item_get_parent (GIMP_ITEM (current));
if (parent == NULL)
break;
parent_container = gimp_item_get_container (parent);
n_parent_children = gimp_container_get_n_children (parent_container);
if (gimp_container_get_child_index (parent_container, GIMP_OBJECT (parent)) + 1 < n_parent_children)
{
container = parent_container;
select_index = gimp_container_get_child_index (parent_container, GIMP_OBJECT (parent)) + 1;
break;
}
current = GIMP_OBJECT (parent);
}
}
}
}
break;
default:
if ((gint) select_type >= 0)
select_index = (gint) select_type;
@@ -729,6 +842,7 @@ action_select_object (GimpActionSelectType select_type,
break;
}
n_children = gimp_container_get_n_children (container);
select_index = CLAMP (select_index, 0, n_children - 1);
return gimp_container_get_child_by_index (container, select_index);

View File

@@ -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);
@@ -109,11 +111,8 @@ void action_message (GimpDisplay *display,
if (! channels) \
return
#define return_if_no_vectors_list(image,list,data) \
#define return_if_no_paths(image,paths,data) \
return_if_no_image (image,data); \
list = gimp_image_get_selected_vectors (image); \
if (! list) \
paths = gimp_image_get_selected_paths (image); \
if (! paths) \
return
#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

@@ -20,6 +20,7 @@
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
@@ -125,7 +126,7 @@ buffers_paste_as_new_image_cmd_callback (GimpAction *action,
GIMP_OBJECT (buffer),
context);
gimp_create_display (context->gimp, new_image,
GIMP_UNIT_PIXEL, 1.0,
gimp_unit_pixel (), 1.0,
G_OBJECT (gimp_widget_get_monitor (widget)));
g_object_unref (new_image);
}

View File

@@ -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

@@ -273,6 +273,8 @@ channels_actions_update (GimpActionGroup *group,
gint n_channels = 0;
gboolean have_prev = FALSE; /* At least 1 selected channel has a previous sibling. */
gboolean have_next = FALSE; /* At least 1 selected channel has a next sibling. */
gboolean first_selected = FALSE; /* First channel is selected */
gboolean last_selected = FALSE; /* Last channel is selected */
if (image)
{
@@ -302,14 +304,16 @@ channels_actions_update (GimpActionGroup *group,
if (list)
{
if (gimp_item_get_index (list->data) == 0)
first_selected = TRUE;
if (gimp_item_get_index (list->data) == n_channels - 1)
last_selected = TRUE;
if (g_list_previous (list))
have_prev = TRUE;
if (g_list_next (list))
have_next = TRUE;
}
if (have_prev && have_next)
break;
}
}
}
@@ -324,9 +328,9 @@ channels_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("channels-duplicate", !fs && (n_selected_channels > 0 || component));
SET_SENSITIVE ("channels-delete", !fs && n_selected_channels > 0);
SET_SENSITIVE ("channels-raise", !fs && n_selected_channels > 0 && have_prev);
SET_SENSITIVE ("channels-raise", !fs && n_selected_channels > 0 && have_prev && !first_selected);
SET_SENSITIVE ("channels-raise-to-top", !fs && n_selected_channels > 0 && have_prev);
SET_SENSITIVE ("channels-lower", !fs && n_selected_channels > 0 && have_next);
SET_SENSITIVE ("channels-lower", !fs && n_selected_channels > 0 && have_next && !last_selected);
SET_SENSITIVE ("channels-lower-to-bottom", !fs && n_selected_channels > 0 && have_next);
SET_SENSITIVE ("channels-selection-replace", !fs && (n_selected_channels > 0 || component));

View File

@@ -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

@@ -65,24 +65,26 @@ static void channels_new_callback (GtkWidget *dialog,
GimpChannel *channel,
GimpContext *context,
const gchar *channel_name,
const GimpRGB *channel_color,
GeglColor *channel_color,
gboolean save_selection,
gboolean channel_visible,
GimpColorTag channel_color_tag,
gboolean channel_lock_content,
gboolean channel_lock_position,
gboolean channel_lock_visibility,
gpointer user_data);
static void channels_edit_attributes_callback (GtkWidget *dialog,
GimpImage *image,
GimpChannel *channel,
GimpContext *context,
const gchar *channel_name,
const GimpRGB *channel_color,
GeglColor *channel_color,
gboolean save_selection,
gboolean channel_visible,
GimpColorTag channel_color_tag,
gboolean channel_lock_content,
gboolean channel_lock_position,
gboolean channel_lock_visibility,
gpointer user_data);
@@ -125,11 +127,12 @@ channels_edit_attributes_cmd_callback (GimpAction *action,
_("_Fill opacity:"),
FALSE,
gimp_object_get_name (channel),
&channel->color,
channel->color,
gimp_item_get_visible (item),
gimp_item_get_color_tag (item),
gimp_item_get_lock_content (item),
gimp_item_get_lock_position (item),
gimp_item_get_lock_visibility (item),
channels_edit_attributes_callback,
NULL);
@@ -170,11 +173,12 @@ channels_new_cmd_callback (GimpAction *action,
_("_Fill opacity:"),
TRUE,
config->channel_new_name,
&config->channel_new_color,
config->channel_new_color,
TRUE,
GIMP_COLOR_TAG_NONE,
FALSE,
FALSE,
FALSE,
channels_new_callback,
NULL);
@@ -200,7 +204,7 @@ channels_new_last_vals_cmd_callback (GimpAction *action,
gimp_image_get_width (image),
gimp_image_get_height (image),
config->channel_new_name,
&config->channel_new_color);
config->channel_new_color);
gimp_drawable_fill (GIMP_DRAWABLE (channel),
action_data_get_context (data),
@@ -228,7 +232,15 @@ channels_raise_cmd_callback (GimpAction *action,
index = gimp_item_get_index (iter->data);
if (index > 0)
raised_channels = g_list_prepend (raised_channels, iter->data);
{
raised_channels = g_list_prepend (raised_channels, iter->data);
}
else
{
gimp_image_flush (image);
g_list_free (raised_channels);
return;
}
}
gimp_image_undo_group_start (image,
@@ -236,7 +248,7 @@ channels_raise_cmd_callback (GimpAction *action,
ngettext ("Raise Channel",
"Raise Channels",
g_list_length (raised_channels)));
raised_channels = g_list_reverse (raised_channels);
for (iter = raised_channels; iter; iter = iter->next)
gimp_image_raise_item (image, iter->data, NULL);
@@ -300,7 +312,15 @@ channels_lower_cmd_callback (GimpAction *action,
layer_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
index = gimp_item_get_index (iter->data);
if (index < g_list_length (layer_list) - 1)
lowered_channels = g_list_prepend (lowered_channels, iter->data);
{
lowered_channels = g_list_prepend (lowered_channels, iter->data);
}
else
{
gimp_image_flush (image);
g_list_free (lowered_channels);
return;
}
}
gimp_image_undo_group_start (image,
@@ -363,7 +383,6 @@ channels_duplicate_cmd_callback (GimpAction *action,
GimpImage *image = NULL;
GList *channels;
GimpChannel *parent = GIMP_IMAGE_ACTIVE_PARENT;
return_if_no_channels (image, channels, data);
if (GIMP_IS_COMPONENT_EDITOR (data))
{
@@ -372,6 +391,8 @@ channels_duplicate_cmd_callback (GimpAction *action,
const gchar *desc;
gchar *name;
return_if_no_image (image, data);
component = GIMP_COMPONENT_EDITOR (data)->clicked_component;
gimp_enum_get_value (GIMP_TYPE_CHANNEL_TYPE, component,
@@ -395,6 +416,8 @@ channels_duplicate_cmd_callback (GimpAction *action,
GList *new_channels = NULL;
GList *iter;
return_if_no_channels (image, channels, data);
channels = g_list_copy (channels);
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_CHANNEL_ADD,
@@ -609,12 +632,13 @@ channels_new_callback (GtkWidget *dialog,
GimpChannel *channel,
GimpContext *context,
const gchar *channel_name,
const GimpRGB *channel_color,
GeglColor *channel_color,
gboolean save_selection,
gboolean channel_visible,
GimpColorTag channel_color_tag,
gboolean channel_lock_content,
gboolean channel_lock_position,
gboolean channel_lock_visibility,
gpointer user_data)
{
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
@@ -633,7 +657,7 @@ channels_new_callback (GtkWidget *dialog,
gimp_object_set_name (GIMP_OBJECT (channel),
config->channel_new_name);
gimp_channel_set_color (channel, &config->channel_new_color, FALSE);
gimp_channel_set_color (channel, config->channel_new_color, FALSE);
}
else
{
@@ -641,7 +665,7 @@ channels_new_callback (GtkWidget *dialog,
gimp_image_get_width (image),
gimp_image_get_height (image),
config->channel_new_name,
&config->channel_new_color);
config->channel_new_color);
gimp_drawable_fill (GIMP_DRAWABLE (channel), context,
GIMP_FILL_TRANSPARENT);
@@ -651,6 +675,7 @@ channels_new_callback (GtkWidget *dialog,
gimp_item_set_color_tag (GIMP_ITEM (channel), channel_color_tag, FALSE);
gimp_item_set_lock_content (GIMP_ITEM (channel), channel_lock_content, FALSE);
gimp_item_set_lock_position (GIMP_ITEM (channel), channel_lock_position, FALSE);
gimp_item_set_lock_visibility (GIMP_ITEM (channel), channel_lock_visibility, FALSE);
gimp_image_add_channel (image, channel,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
@@ -665,22 +690,24 @@ channels_edit_attributes_callback (GtkWidget *dialog,
GimpChannel *channel,
GimpContext *context,
const gchar *channel_name,
const GimpRGB *channel_color,
GeglColor *channel_color,
gboolean save_selection,
gboolean channel_visible,
GimpColorTag channel_color_tag,
gboolean channel_lock_content,
gboolean channel_lock_position,
gboolean channel_lock_visibility,
gpointer user_data)
{
GimpItem *item = GIMP_ITEM (channel);
if (strcmp (channel_name, gimp_object_get_name (channel)) ||
gimp_rgba_distance (channel_color, &channel->color) > RGBA_EPSILON ||
channel_visible != gimp_item_get_visible (item) ||
channel_color_tag != gimp_item_get_color_tag (item) ||
channel_lock_content != gimp_item_get_lock_content (item) ||
channel_lock_position != gimp_item_get_lock_position (item))
if (strcmp (channel_name, gimp_object_get_name (channel)) ||
! gimp_color_is_perceptually_identical (channel_color, channel->color) ||
channel_visible != gimp_item_get_visible (item) ||
channel_color_tag != gimp_item_get_color_tag (item) ||
channel_lock_content != gimp_item_get_lock_content (item) ||
channel_lock_position != gimp_item_get_lock_position (item) ||
channel_lock_visibility != gimp_item_get_lock_visibility (item))
{
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_ITEM_PROPERTIES,
@@ -689,7 +716,7 @@ channels_edit_attributes_callback (GtkWidget *dialog,
if (strcmp (channel_name, gimp_object_get_name (channel)))
gimp_item_rename (GIMP_ITEM (channel), channel_name, NULL);
if (gimp_rgba_distance (channel_color, &channel->color) > RGBA_EPSILON)
if (! gimp_color_is_perceptually_identical (channel_color, channel->color))
gimp_channel_set_color (channel, channel_color, TRUE);
if (channel_visible != gimp_item_get_visible (item))
@@ -704,6 +731,9 @@ channels_edit_attributes_callback (GtkWidget *dialog,
if (channel_lock_position != gimp_item_get_lock_position (item))
gimp_item_set_lock_position (item, channel_lock_position, TRUE);
if (channel_lock_visibility != gimp_item_get_lock_visibility (item))
gimp_item_set_lock_visibility (item, channel_lock_visibility, TRUE);
gimp_image_undo_group_end (image);
gimp_image_flush (image);

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

@@ -28,8 +28,10 @@
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "core/gimpimage-colormap.h"
#include "core/gimppalette.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpcolormapeditor.h"
#include "widgets/gimphelp-ids.h"
#include "actions.h"
@@ -45,6 +47,12 @@ static const GimpActionEntry colormap_actions[] =
NC_("colormap-action", "_Edit Color..."), NULL, { NULL },
NC_("colormap-action", "Edit this color"),
colormap_edit_color_cmd_callback,
GIMP_HELP_INDEXED_PALETTE_EDIT },
{ "colormap-delete-color", GIMP_ICON_EDIT_DELETE,
NC_("colormap-action", "_Delete Color..."), NULL, { NULL },
NC_("colormap-action", "Delete this color"),
colormap_delete_color_cmd_callback,
GIMP_HELP_INDEXED_PALETTE_EDIT }
};
@@ -112,13 +120,12 @@ void
colormap_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *image = action_data_get_image (data);
GimpContext *context = action_data_get_context (data);
gboolean indexed = FALSE;
gboolean drawable_indexed = FALSE;
gint num_colors = 0;
GimpRGB fg;
GimpRGB bg;
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
GimpImage *image = action_data_get_image (data);
GimpContext *context = action_data_get_context (data);
gboolean indexed = FALSE;
gboolean drawable_indexed = FALSE;
gint num_colors = 0;
if (image)
{
@@ -128,7 +135,7 @@ colormap_actions_update (GimpActionGroup *group,
{
GList *drawables = gimp_image_get_selected_drawables (image);
num_colors = gimp_image_get_colormap_size (image);
num_colors = gimp_palette_get_n_colors (gimp_image_get_colormap_palette ((image)));
if (g_list_length (drawables) == 1)
drawable_indexed = gimp_drawable_is_indexed (drawables->data);
@@ -137,12 +144,6 @@ colormap_actions_update (GimpActionGroup *group,
}
}
if (context)
{
gimp_context_get_foreground (context, &fg);
gimp_context_get_background (context, &bg);
}
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
#define SET_COLOR(action,color) \
@@ -150,14 +151,17 @@ colormap_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("colormap-edit-color",
indexed && num_colors > 0);
SET_SENSITIVE ("colormap-delete-color",
indexed && num_colors > 0 &&
gimp_colormap_editor_is_color_deletable (editor));
SET_SENSITIVE ("colormap-add-color-from-fg",
indexed && num_colors < 256);
SET_SENSITIVE ("colormap-add-color-from-bg",
indexed && num_colors < 256);
SET_COLOR ("colormap-add-color-from-fg", context ? &fg : NULL);
SET_COLOR ("colormap-add-color-from-bg", context ? &bg : NULL);
SET_COLOR ("colormap-add-color-from-fg", context ? gimp_context_get_foreground (context) : NULL);
SET_COLOR ("colormap-add-color-from-bg", context ? gimp_context_get_background (context) : NULL);
SET_SENSITIVE ("colormap-selection-replace",
drawable_indexed && num_colors > 0);

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

@@ -26,6 +26,7 @@
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpimage-colormap.h"
#include "core/gimppalette.h"
#include "widgets/gimpcolormapeditor.h"
#include "widgets/gimpcolormapselection.h"
@@ -46,6 +47,16 @@ colormap_edit_color_cmd_callback (GimpAction *action,
gimp_colormap_editor_edit_color (editor);
}
void
colormap_delete_color_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
gimp_colormap_editor_delete_color (editor);
}
void
colormap_add_color_cmd_callback (GimpAction *action,
GVariant *value,
@@ -59,16 +70,16 @@ colormap_add_color_cmd_callback (GimpAction *action,
background = (gboolean) g_variant_get_int32 (value);
if (gimp_image_get_colormap_size (image) < 256)
if (gimp_palette_get_n_colors (gimp_image_get_colormap_palette ((image))) < 256)
{
GimpRGB color;
GeglColor *color;
if (background)
gimp_context_get_background (context, &color);
color = gimp_context_get_background (context);
else
gimp_context_get_foreground (context, &color);
color = gimp_context_get_foreground (context);
gimp_image_add_colormap_entry (image, &color);
gimp_image_add_colormap_entry (image, color);
gimp_image_flush (image);
}
}

View File

@@ -15,19 +15,18 @@
* 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,
GVariant *value,
gpointer data);
void colormap_delete_color_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void colormap_add_color_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
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

@@ -34,6 +34,7 @@
#include "core/gimpbrushgenerated.h"
#include "core/gimpcontext.h"
#include "core/gimpdatafactory.h"
#include "core/gimpimage.h"
#include "core/gimplist.h"
#include "core/gimppaintinfo.h"
#include "core/gimptoolinfo.h"
@@ -61,19 +62,19 @@ static gint context_paint_mode_index (GimpLayerMode paint_mode,
gint n_modes);
static void context_select_color (GimpActionSelectType select_type,
GimpRGB *color,
GeglColor *color,
gboolean use_colormap,
gboolean use_palette);
static gint context_get_color_index (gboolean use_colormap,
gboolean use_palette,
const GimpRGB *color);
GeglColor *color);
static gint context_max_color_index (gboolean use_colormap,
gboolean use_palette);
static gboolean context_set_color_index (gint index,
gboolean use_colormap,
gboolean use_palette,
GimpRGB *color);
GeglColor *color);
static GimpPaletteEditor * context_get_palette_editor (void);
static GimpColormapEditor * context_get_colormap_editor (void);
@@ -110,16 +111,17 @@ context_##name##_##fgbg##ground_cmd_callback (GimpAction *action, \
gpointer data) \
{ \
GimpContext *context; \
GimpRGB color; \
GeglColor *color; \
GimpActionSelectType select_type; \
return_if_no_context (context, data); \
\
select_type = (GimpActionSelectType) g_variant_get_int32 (value); \
\
gimp_context_get_##fgbg##ground (context, &color); \
context_select_color (select_type, &color, \
color = gegl_color_duplicate (gimp_context_get_##fgbg##ground (context)); \
context_select_color (select_type, color, \
use_colormap, use_palette); \
gimp_context_set_##fgbg##ground (context, &color); \
gimp_context_set_##fgbg##ground (context, color); \
g_object_unref (color); \
}
SELECT_COLOR_CMD_CALLBACK (palette, fore, FALSE, TRUE)
@@ -135,18 +137,30 @@ context_foreground_red_cmd_callback (GimpAction *action,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GeglColor *color;
const Babl *format;
gdouble pixel[4];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_foreground (context, &color);
color.r = action_select_value (select_type,
color.r,
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
gimp_context_set_foreground (context, &color);
color = gegl_color_duplicate (gimp_context_get_foreground (context));
format = gimp_context_get_rgba_format (context, color, "double", NULL);
gegl_color_get_pixel (color, format, pixel);
/* TODO: if value was already out-of-gamut, say we want to decrease it
* progressively. Should the algorithm allow it to be decreased while still
* staying out-of-gamut? Currently the function always clamps the result to
* min/max.
*/
pixel[0] = action_select_value (select_type,
pixel[0],
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, format, pixel);
gimp_context_set_foreground (context, color);
g_object_unref (color);
}
void
@@ -155,18 +169,25 @@ context_foreground_green_cmd_callback (GimpAction *action,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GeglColor *color;
const Babl *format;
gdouble pixel[4];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_foreground (context, &color);
color.g = action_select_value (select_type,
color.g,
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
gimp_context_set_foreground (context, &color);
color = gegl_color_duplicate (gimp_context_get_foreground (context));
format = gimp_context_get_rgba_format (context, color, "double", NULL);
gegl_color_get_pixel (color, format, pixel);
pixel[1] = action_select_value (select_type,
pixel[1],
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, format, pixel);
gimp_context_set_foreground (context, color);
g_object_unref (color);
}
void
@@ -175,18 +196,25 @@ context_foreground_blue_cmd_callback (GimpAction *action,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GeglColor *color;
const Babl *format;
gdouble pixel[4];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_foreground (context, &color);
color.b = action_select_value (select_type,
color.b,
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
gimp_context_set_foreground (context, &color);
color = gegl_color_duplicate (gimp_context_get_foreground (context));
format = gimp_context_get_rgba_format (context, color, "double", NULL);
gegl_color_get_pixel (color, format, pixel);
pixel[2] = action_select_value (select_type,
pixel[2],
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, format, pixel);
gimp_context_set_foreground (context, color);
g_object_unref (color);
}
void
@@ -195,18 +223,25 @@ context_background_red_cmd_callback (GimpAction *action,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GeglColor *color;
const Babl *format;
gdouble pixel[4];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_background (context, &color);
color.r = action_select_value (select_type,
color.r,
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
gimp_context_set_background (context, &color);
color = gegl_color_duplicate (gimp_context_get_background (context));
format = gimp_context_get_rgba_format (context, color, "double", NULL);
gegl_color_get_pixel (color, format, pixel);
pixel[0] = action_select_value (select_type,
pixel[0],
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, format, pixel);
gimp_context_set_background (context, color);
g_object_unref (color);
}
void
@@ -215,18 +250,25 @@ context_background_green_cmd_callback (GimpAction *action,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GeglColor *color;
const Babl *format;
gdouble pixel[4];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_background (context, &color);
color.g = action_select_value (select_type,
color.g,
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
gimp_context_set_background (context, &color);
color = gegl_color_duplicate (gimp_context_get_background (context));
format = gimp_context_get_rgba_format (context, color, "double", NULL);
gegl_color_get_pixel (color, format, pixel);
pixel[1] = action_select_value (select_type,
pixel[1],
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, format, pixel);
gimp_context_set_background (context, color);
g_object_unref (color);
}
void
@@ -235,18 +277,25 @@ context_background_blue_cmd_callback (GimpAction *action,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GeglColor *color;
const Babl *format;
gdouble pixel[4];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_background (context, &color);
color.b = action_select_value (select_type,
color.b,
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
gimp_context_set_background (context, &color);
color = gegl_color_duplicate (gimp_context_get_background (context));
format = gimp_context_get_rgba_format (context, color, "double", NULL);
gegl_color_get_pixel (color, format, pixel);
pixel[2] = action_select_value (select_type,
pixel[2],
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, format, pixel);
gimp_context_set_background (context, color);
g_object_unref (color);
}
void
@@ -255,21 +304,22 @@ context_foreground_hue_cmd_callback (GimpAction *action,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GeglColor *color;
gfloat pixel[3];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_foreground (context, &color);
gimp_rgb_to_hsv (&color, &hsv);
hsv.h = action_select_value (select_type,
hsv.h,
0.0, 1.0, 1.0,
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
gimp_hsv_to_rgb (&hsv, &color);
gimp_context_set_foreground (context, &color);
color = gegl_color_duplicate (gimp_context_get_foreground (context));
gegl_color_get_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
pixel[0] = (gfloat) action_select_value (select_type,
pixel[0],
0.0, 1.0, 1.0,
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
gimp_context_set_foreground (context, color);
g_object_unref (color);
}
void
@@ -278,21 +328,22 @@ context_foreground_saturation_cmd_callback (GimpAction *action,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GeglColor *color;
gfloat pixel[3];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_foreground (context, &color);
gimp_rgb_to_hsv (&color, &hsv);
hsv.s = action_select_value (select_type,
hsv.s,
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gimp_hsv_to_rgb (&hsv, &color);
gimp_context_set_foreground (context, &color);
color = gegl_color_duplicate (gimp_context_get_foreground (context));
gegl_color_get_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
pixel[1] = (gfloat) action_select_value (select_type,
pixel[1],
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
gimp_context_set_foreground (context, color);
g_object_unref (color);
}
void
@@ -301,21 +352,22 @@ context_foreground_value_cmd_callback (GimpAction *action,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GeglColor *color;
gfloat pixel[3];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_foreground (context, &color);
gimp_rgb_to_hsv (&color, &hsv);
hsv.v = action_select_value (select_type,
hsv.v,
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gimp_hsv_to_rgb (&hsv, &color);
gimp_context_set_foreground (context, &color);
color = gegl_color_duplicate (gimp_context_get_foreground (context));
gegl_color_get_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
pixel[2] = (gfloat) action_select_value (select_type,
pixel[2],
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
gimp_context_set_foreground (context, color);
g_object_unref (color);
}
void
@@ -324,21 +376,22 @@ context_background_hue_cmd_callback (GimpAction *action,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GeglColor *color;
gfloat pixel[3];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_background (context, &color);
gimp_rgb_to_hsv (&color, &hsv);
hsv.h = action_select_value (select_type,
hsv.h,
0.0, 1.0, 1.0,
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
gimp_hsv_to_rgb (&hsv, &color);
gimp_context_set_background (context, &color);
color = gegl_color_duplicate (gimp_context_get_background (context));
gegl_color_get_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
pixel[0] = (gfloat) action_select_value (select_type,
pixel[0],
0.0, 1.0, 1.0,
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
gimp_context_set_background (context, color);
g_object_unref (color);
}
void
@@ -347,21 +400,22 @@ context_background_saturation_cmd_callback (GimpAction *action,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GeglColor *color;
gfloat pixel[3];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_background (context, &color);
gimp_rgb_to_hsv (&color, &hsv);
hsv.s = action_select_value (select_type,
hsv.s,
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gimp_hsv_to_rgb (&hsv, &color);
gimp_context_set_background (context, &color);
color = gegl_color_duplicate (gimp_context_get_background (context));
gegl_color_get_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
pixel[1] = (gfloat) action_select_value (select_type,
pixel[1],
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
gimp_context_set_background (context, color);
g_object_unref (color);
}
void
@@ -370,21 +424,22 @@ context_background_value_cmd_callback (GimpAction *action,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GeglColor *color;
gfloat pixel[3];
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_background (context, &color);
gimp_rgb_to_hsv (&color, &hsv);
hsv.v = action_select_value (select_type,
hsv.v,
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gimp_hsv_to_rgb (&hsv, &color);
gimp_context_set_background (context, &color);
color = gegl_color_duplicate (gimp_context_get_background (context));
gegl_color_get_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
pixel[2] = (gfloat) action_select_value (select_type,
pixel[2],
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
gegl_color_set_pixel (color, babl_format_with_space ("HSV float", NULL), pixel);
gimp_context_set_background (context, color);
g_object_unref (color);
}
void
@@ -664,7 +719,7 @@ context_brush_radius_cmd_callback (GimpAction *action,
radius = action_select_value (select_type,
radius,
min_radius, 4000.0, min_radius,
min_radius, GIMP_BRUSH_GENERATED_MAX_RADIUS, min_radius,
0.1, 1.0, 10.0, 0.05, FALSE);
gimp_brush_generated_set_radius (generated, radius);
@@ -840,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
@@ -868,7 +922,7 @@ context_paint_mode_index (GimpLayerMode paint_mode,
static void
context_select_color (GimpActionSelectType select_type,
GimpRGB *color,
GeglColor *color,
gboolean use_colormap,
gboolean use_palette)
{
@@ -887,9 +941,9 @@ context_select_color (GimpActionSelectType select_type,
}
static gint
context_get_color_index (gboolean use_colormap,
gboolean use_palette,
const GimpRGB *color)
context_get_color_index (gboolean use_colormap,
gboolean use_palette,
GeglColor *color)
{
if (use_colormap)
{
@@ -954,10 +1008,10 @@ context_max_color_index (gboolean use_colormap,
}
static gboolean
context_set_color_index (gint index,
gboolean use_colormap,
gboolean use_palette,
GimpRGB *color)
context_set_color_index (gint index,
gboolean use_colormap,
gboolean use_palette,
GeglColor *color)
{
if (use_colormap)
{

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

@@ -111,6 +111,9 @@ dashboard_log_record_cmd_callback (GimpAction *action,
GtkWidget *label;
GtkWidget *spinbutton;
GtkWidget *toggle;
GDateTime *datetime;
gchar *timestamp;
gchar *default_filename;
dialog = gtk_file_chooser_dialog_new (
"Record Performance Log", NULL, GTK_FILE_CHOOSER_ACTION_SAVE,
@@ -168,8 +171,19 @@ dashboard_log_record_cmd_callback (GimpAction *action,
GTK_FILE_CHOOSER (dialog), info->folder, NULL);
}
datetime = g_date_time_new_now_local ();
/* Since Windows doesn't allow colons in filenames,
* we use ISO 8601 basic format for the timestamp */
timestamp = g_date_time_format (datetime, "%Y%m%dT%H%M%SZ");
default_filename = g_strdup_printf ("gimp-performance-%s.log",
timestamp);
g_date_time_unref (datetime);
g_free (timestamp);
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog),
"gimp-performance.log");
default_filename);
g_free (default_filename);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), hbox);
@@ -248,7 +262,7 @@ dashboard_log_record_cmd_callback (GimpAction *action,
G_CALLBACK (gtk_true),
NULL);
gimp_help_connect (dialog, gimp_standard_help_func,
gimp_help_connect (dialog, NULL, gimp_standard_help_func,
GIMP_HELP_DASHBOARD_LOG_RECORD, NULL, NULL);
dialogs_attach_dialog (G_OBJECT (dashboard), LOG_RECORD_KEY, dialog);

View File

@@ -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))
{
@@ -116,11 +116,15 @@ data_new_cmd_callback (GimpAction *action,
if (data)
{
GtkWidget *edit_button;
gimp_context_set_by_type (context,
gimp_data_factory_view_get_children_type (view),
gimp_data_factory_view_get_child_type (view),
GIMP_OBJECT (data));
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
edit_button = gimp_data_factory_view_get_edit_button (view);
if (edit_button && gtk_widget_get_visible (edit_button))
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
}
}
}
@@ -138,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)))
{
@@ -148,11 +152,15 @@ data_duplicate_cmd_callback (GimpAction *action,
if (new_data)
{
GtkWidget *edit_button;
gimp_context_set_by_type (context,
gimp_data_factory_view_get_children_type (view),
gimp_data_factory_view_get_child_type (view),
GIMP_OBJECT (new_data));
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
edit_button = gimp_data_factory_view_get_edit_button (view);
if (edit_button && gtk_widget_get_visible (edit_button))
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
}
}
}
@@ -170,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)
{
@@ -199,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)
{
@@ -235,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) &&
@@ -280,12 +288,13 @@ 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)))
{
GdkMonitor *monitor = gimp_widget_get_monitor (GTK_WIDGET (view));
GtkWidget *dockable;
GtkWidget *editor = NULL;
dockable =
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (context->gimp)),
@@ -295,7 +304,10 @@ data_edit_cmd_callback (GimpAction *action,
g_variant_get_string (value,
NULL));
gimp_data_editor_set_data (GIMP_DATA_EDITOR (gtk_bin_get_child (GTK_BIN (dockable))),
data);
if (dockable)
editor = gtk_bin_get_child (GTK_BIN (dockable));
if (editor && GIMP_IS_DATA_EDITOR (editor))
gimp_data_editor_set_data (GIMP_DATA_EDITOR (editor), data);
}
}

View File

@@ -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

@@ -31,40 +31,42 @@
#include "debug-actions.h"
#include "debug-commands.h"
#include "gimp-intl.h"
static const GimpActionEntry debug_actions[] =
{
{ "debug-gtk-inspector", NULL,
"Start _GtkInspector", NULL, { NULL }, NULL,
N_("Start _GtkInspector"), NULL, { NULL }, NULL,
debug_gtk_inspector_cmd_callback,
NULL },
{ "debug-mem-profile", NULL,
"_Memory Profile", NULL, { NULL }, NULL,
N_("_Memory Profile"), NULL, { NULL }, NULL,
debug_mem_profile_cmd_callback,
NULL },
{ "debug-benchmark-projection", NULL,
"Benchmark _Projection", NULL, { NULL },
"Invalidates the entire projection, measures the time it takes to "
N_("Benchmark _Projection"), NULL, { NULL },
N_("Invalidates the entire projection, measures the time it takes to "
"validate (render) the part that is visible in the active display, "
"and print the result to stdout.",
"and print the result to stdout."),
debug_benchmark_projection_cmd_callback,
NULL },
{ "debug-show-image-graph", NULL,
"Show Image _Graph", NULL, { NULL },
"Creates a new image showing the GEGL graph of this image",
N_("Show Image _Graph"), NULL, { NULL },
N_("Creates a new image showing the GEGL graph of this image"),
debug_show_image_graph_cmd_callback,
NULL },
{ "debug-dump-keyboard-shortcuts", NULL,
"Dump _Keyboard Shortcuts", NULL, { NULL }, NULL,
N_("Dump _Keyboard Shortcuts"), NULL, { NULL }, NULL,
debug_dump_keyboard_shortcuts_cmd_callback,
NULL },
{ "debug-dump-attached-data", NULL,
"Dump Attached Data", NULL, { NULL }, NULL,
N_("Dump _Attached Data"), NULL, { NULL }, NULL,
debug_dump_attached_data_cmd_callback,
NULL }
};

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,
@@ -307,7 +307,7 @@ gint n_dialogs_dockable_actions = G_N_ELEMENTS (dialogs_dockable_actions);
static const GimpStringActionEntry dialogs_toplevel_actions[] =
{
{ "dialogs-preferences", GIMP_ICON_PREFERENCES_SYSTEM,
NC_("dialogs-action", "_Preferences Dialog"),
NC_("dialogs-action", "_Preferences"),
NC_("dialogs-action", "_Preferences"),
{ NULL },
NC_("dialogs-action", "Open the preferences dialog"),
@@ -355,8 +355,6 @@ static const GimpStringActionEntry dialogs_toplevel_actions[] =
{ "dialogs-about", GIMP_ICON_HELP_ABOUT,
#if defined(G_OS_WIN32)
NC_("dialogs-action", "About GIMP"),
#elif defined(PLATFORM_OSX)
NC_("dialogs-action", "About"),
#else /* UNIX: use GNOME HIG */
NC_("dialogs-action", "_About"),
#endif
@@ -372,12 +370,14 @@ static const GimpStringActionEntry dialogs_toplevel_actions[] =
"gimp-action-search-dialog",
GIMP_HELP_ACTION_SEARCH_DIALOG },
#ifndef GIMP_RELEASE
{ "dialogs-extensions", GIMP_ICON_PLUGIN,
NC_("dialogs-action", "Manage _Extensions"), NULL,
{ NULL },
NC_("dialogs-action", "Manage Extensions: search, install, uninstall, update."),
"gimp-extensions-dialog",
GIMP_HELP_EXTENSIONS_DIALOG }
#endif
};

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

@@ -276,6 +276,17 @@ dockable_actions_update (GimpActionGroup *group,
SET_ACTIVE ("dockable-lock-tab", locked);
/* Submenus become invisible if all options inside them are hidden. */
SET_VISIBLE ("dockable-preview-size-gigantic", view_size != -1);
SET_VISIBLE ("dockable-preview-size-enormous", view_size != -1);
SET_VISIBLE ("dockable-preview-size-huge", view_size != -1);
SET_VISIBLE ("dockable-preview-size-extra-large", view_size != -1);
SET_VISIBLE ("dockable-preview-size-large", view_size != -1);
SET_VISIBLE ("dockable-preview-size-medium", view_size != -1);
SET_VISIBLE ("dockable-preview-size-small", view_size != -1);
SET_VISIBLE ("dockable-preview-size-extra-small", view_size != -1);
SET_VISIBLE ("dockable-preview-size-tiny", view_size != -1);
if (view_size != -1)
{
if (view_size >= GIMP_VIEW_SIZE_GIGANTIC)

View File

@@ -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

@@ -34,6 +34,7 @@
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpimagefile.h"
#include "core/gimpimage.h"
#include "file/file-open.h"
@@ -121,7 +122,7 @@ documents_raise_or_open_cmd_callback (GimpAction *action,
closure.name = gimp_object_get_name (imagefile);
closure.found = FALSE;
gimp_container_foreach (context->gimp->displays,
gimp_container_foreach (GIMP_CONTAINER (context->gimp->displays),
(GFunc) documents_raise_display,
&closure);
@@ -399,11 +400,24 @@ static void
documents_raise_display (GimpDisplay *display,
RaiseClosure *closure)
{
const gchar *uri = gimp_object_get_name (gimp_display_get_image (display));
GimpImage *image;
GFile *file;
gchar *uri = NULL;
image = gimp_display_get_image (display);
file = gimp_image_get_file (image);
if (! file)
file = gimp_image_get_imported_file (image);
if (file)
uri = g_file_get_uri (file);
if (! g_strcmp0 (closure->name, uri))
{
closure->found = TRUE;
gimp_display_shell_present (gimp_display_get_shell (display));
}
g_free (uri);
}

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

@@ -99,19 +99,19 @@ static const GimpEnumActionEntry drawable_rotate_actions[] =
{ "drawable-rotate-90", GIMP_ICON_OBJECT_ROTATE_90,
NC_("drawable-action", "Rotate 90° _clockwise"), NULL, { NULL },
NC_("drawable-action", "Rotate drawable 90 degrees to the right"),
GIMP_ROTATE_90, FALSE,
GIMP_ROTATE_DEGREES90, FALSE,
GIMP_HELP_LAYER_ROTATE_90 },
{ "drawable-rotate-180", GIMP_ICON_OBJECT_ROTATE_180,
NC_("drawable-action", "Rotate _180°"), NULL, { NULL },
NC_("drawable-action", "Turn drawable upside-down"),
GIMP_ROTATE_180, FALSE,
GIMP_ROTATE_DEGREES180, FALSE,
GIMP_HELP_LAYER_ROTATE_180 },
{ "drawable-rotate-270", GIMP_ICON_OBJECT_ROTATE_270,
NC_("drawable-action", "Rotate 90° counter-clock_wise"), NULL, { NULL },
NC_("drawable-action", "Rotate drawable 90 degrees to the left"),
GIMP_ROTATE_270, FALSE,
GIMP_ROTATE_DEGREES270, FALSE,
GIMP_HELP_LAYER_ROTATE_270 }
};
@@ -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

@@ -50,10 +50,10 @@
/* local function prototypes */
static void edit_actions_foreground_changed (GimpContext *context,
const GimpRGB *color,
GeglColor *color,
GimpActionGroup *group);
static void edit_actions_background_changed (GimpContext *context,
const GimpRGB *color,
GeglColor *color,
GimpActionGroup *group);
static void edit_actions_pattern_changed (GimpContext *context,
GimpPattern *pattern,
@@ -180,19 +180,31 @@ static const GimpEnumActionEntry edit_paste_actions[] =
GIMP_HELP_EDIT_PASTE_IN_PLACE },
{ "edit-paste-into", GIMP_ICON_EDIT_PASTE_INTO,
NC_("edit-action", "Paste _Into Selection"), NULL, { NULL },
NC_("edit-action", "Paste as Floating Data _Into Selection"), NULL, { NULL },
NC_("edit-action",
"Paste the content of the clipboard into the current selection"),
GIMP_PASTE_TYPE_FLOATING_INTO, FALSE,
GIMP_HELP_EDIT_PASTE_INTO },
{ "edit-paste-into-in-place", GIMP_ICON_EDIT_PASTE_INTO,
NC_("edit-action", "Paste Int_o Selection In Place"), NULL, { NULL },
NC_("edit-action", "Paste as Floating Data Int_o Selection In Place"), NULL, { NULL },
NC_("edit-action",
"Paste the content of the clipboard into the current selection "
"at its original position"),
GIMP_PASTE_TYPE_FLOATING_INTO_IN_PLACE, FALSE,
GIMP_HELP_EDIT_PASTE_INTO_IN_PLACE }
GIMP_HELP_EDIT_PASTE_INTO_IN_PLACE },
{ "edit-paste-float", GIMP_ICON_EDIT_PASTE,
NC_("edit-action", "Paste as _Floating Data"), NULL, { NULL },
NC_("edit-action", "Paste the content of the clipboard as Floating Data"),
GIMP_PASTE_TYPE_FLOATING, FALSE,
GIMP_HELP_EDIT_PASTE_FLOAT },
{ "edit-paste-float-in-place", GIMP_ICON_EDIT_PASTE,
NC_("edit-action", "Paste as Floa_ting Data In Place"), NULL, { NULL },
NC_("edit-action", "Paste the content of the clipboard as Floating Data at its original position"),
GIMP_PASTE_TYPE_FLOATING_IN_PLACE, FALSE,
GIMP_HELP_EDIT_PASTE_FLOAT_IN_PLACE }
};
static const GimpEnumActionEntry edit_fill_actions[] =
@@ -221,7 +233,7 @@ void
edit_actions_setup (GimpActionGroup *group)
{
GimpContext *context = gimp_get_user_context (group->gimp);
GimpRGB color;
GeglColor *color;
GimpPattern *pattern;
gimp_action_group_add_actions (group, "edit-action",
@@ -248,11 +260,11 @@ edit_actions_setup (GimpActionGroup *group)
G_CALLBACK (edit_actions_pattern_changed),
group, 0);
gimp_context_get_foreground (context, &color);
edit_actions_foreground_changed (context, &color, group);
color = gimp_context_get_foreground (context);
edit_actions_foreground_changed (context, color, group);
gimp_context_get_background (context, &color);
edit_actions_background_changed (context, &color, group);
color = gimp_context_get_background (context);
edit_actions_background_changed (context, color, group);
pattern = gimp_context_get_pattern (context);
edit_actions_pattern_changed (context, pattern, group);
@@ -368,7 +380,7 @@ edit_actions_update (GimpActionGroup *group,
static void
edit_actions_foreground_changed (GimpContext *context,
const GimpRGB *color,
GeglColor *color,
GimpActionGroup *group)
{
gimp_action_group_set_action_color (group, "edit-fill-fg", color, FALSE);
@@ -376,7 +388,7 @@ edit_actions_foreground_changed (GimpContext *context,
static void
edit_actions_background_changed (GimpContext *context,
const GimpRGB *color,
GeglColor *color,
GimpActionGroup *group)
{
gimp_action_group_set_action_color (group, "edit-fill-bg", color, FALSE);

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

@@ -37,10 +37,11 @@
#include "core/gimplayer.h"
#include "core/gimplayer-new.h"
#include "core/gimplayermask.h"
#include "core/gimplist.h"
#include "core/gimpimage.h"
#include "core/gimpimage-undo.h"
#include "vectors/gimpvectors-import.h"
#include "path/gimppath-import.h"
#include "widgets/gimpclipboard.h"
#include "widgets/gimphelp-ids.h"
@@ -280,7 +281,7 @@ edit_copy_cmd_callback (GimpAction *action,
return_if_no_drawables (image, drawables, data);
copy = gimp_edit_copy (image, drawables, action_data_get_context (data),
&error);
FALSE, &error);
if (copy)
{
@@ -402,7 +403,7 @@ edit_paste_cmd_callback (GimpAction *action,
GIMP_PASTE_TYPE_NEW_LAYER :
GIMP_PASTE_TYPE_NEW_LAYER_IN_PLACE;
edit_paste (display, converted_type, merged, FALSE);
edit_paste (display, converted_type, merged, TRUE);
}
g_list_free (drawables);
@@ -433,7 +434,7 @@ edit_paste_as_new_image_cmd_callback (GimpAction *action,
if (image)
{
gimp_create_display (gimp, image, GIMP_UNIT_PIXEL, 1.0,
gimp_create_display (gimp, image, gimp_unit_pixel (), 1.0,
G_OBJECT (gimp_widget_get_monitor (widget)));
g_object_unref (image);
}
@@ -655,10 +656,10 @@ edit_paste (GimpDisplay *display,
if (svg)
{
if (gimp_vectors_import_buffer (image, svg, svg_size,
TRUE, FALSE,
GIMP_IMAGE_ACTIVE_PARENT, -1,
NULL, NULL))
if (gimp_path_import_buffer (image, svg, svg_size,
TRUE, FALSE,
GIMP_IMAGE_ACTIVE_PARENT, -1,
NULL, NULL))
{
gimp_image_flush (image);
}
@@ -718,6 +719,7 @@ edit_paste (GimpDisplay *display,
merged, x, y, width, height)))
{
gimp_image_set_selected_layers (image, pasted_layers);
g_list_free (pasted_layers);
gimp_image_flush (image);
}

View File

@@ -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

@@ -30,6 +30,7 @@
#include "widgets/gimperrorconsole.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimptextbuffer.h"
#include "widgets/gimpwidgets-utils.h"
#include "error-console-commands.h"
@@ -104,9 +105,9 @@ error_console_save_cmd_callback (GimpAction *action,
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
console->save_selection = selection;
@@ -127,11 +128,15 @@ error_console_save_cmd_callback (GimpAction *action,
G_CALLBACK (gtk_true),
NULL);
gimp_help_connect (dialog, gimp_standard_help_func,
gimp_help_connect (dialog, NULL, gimp_standard_help_func,
GIMP_HELP_ERRORS_DIALOG, NULL, NULL);
}
gtk_window_present (GTK_WINDOW (console->file_dialog));
#ifdef G_OS_WIN32
gimp_window_set_title_bar_theme (console->gimp, console->file_dialog);
#endif
}
void

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"),
@@ -309,14 +316,34 @@ file_actions_update (GimpActionGroup *group,
if (export)
{
gchar *label = file_actions_create_label (_("Export to %s"), export);
GimpAction *action;
gchar *label = file_actions_create_label (_("Export to %s"),
export);
gimp_action_group_set_action_label (group, "file-export", label);
action = gimp_action_group_get_action (group, "file-export");
g_object_set (action,
"ellipsize", PANGO_ELLIPSIZE_MIDDLE,
"max-width-chars", 40,
NULL);
g_free (label);
}
else if (show_overwrite)
{
gchar *label = file_actions_create_label (_("Over_write %s"), source);
GimpAction *action;
gchar *label = file_actions_create_label (_("Over_write %s"),
source);
gimp_action_group_set_action_label (group, "file-overwrite", label);
action = gimp_action_group_get_action (group, "file-overwrite");
g_object_set (action,
"ellipsize", PANGO_ELLIPSIZE_MIDDLE,
"max-width-chars", 40,
NULL);
g_free (label);
}
else
@@ -381,11 +408,13 @@ file_actions_last_opened_update (GimpContainer *container,
label = g_strdup_printf (_("Open \"%s\""), escaped);
g_object_set (action,
"label", label,
"short-label", escaped,
"tooltip", name,
"visible", TRUE,
"viewable", imagefile,
"label", label,
"short-label", escaped,
"tooltip", name,
"visible", TRUE,
"viewable", imagefile,
"ellipsize", PANGO_ELLIPSIZE_MIDDLE,
"max-width-chars", 40,
NULL);
g_free (label);
@@ -395,10 +424,12 @@ file_actions_last_opened_update (GimpContainer *container,
else
{
g_object_set (action,
"label", name,
"tooltip", NULL,
"visible", FALSE,
"viewable", NULL,
"label", name,
"tooltip", NULL,
"visible", FALSE,
"viewable", NULL,
"ellipsize", PANGO_ELLIPSIZE_MIDDLE,
"max-width-chars", 40,
NULL);
}
@@ -410,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, 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

@@ -18,22 +18,31 @@
#include "config.h"
#include <gegl.h>
#include <gegl-plugin.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "core/gimp-filter.h"
#include "gegl/gimp-gegl-utils.h"
#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"
#include "actions.h"
#include "filters-actions.h"
@@ -44,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 */
@@ -274,7 +284,7 @@ static const GimpStringActionEntry filters_interactive_actions[] =
GIMP_HELP_FILTER_EDGE },
{ "filters-edge-laplace", GIMP_ICON_GEGL,
NC_("filters-action", "_Laplace"), NULL, { NULL }, NULL,
NC_("filters-action", "_Laplace..."), NULL, { NULL }, NULL,
"gegl:edge-laplace",
GIMP_HELP_FILTER_EDGE_LAPLACE },
@@ -744,9 +754,13 @@ static const GimpEnumActionEntry filters_repeat_actions[] =
void
filters_actions_setup (GimpActionGroup *group)
{
static gboolean first_setup = TRUE;
GimpProcedureActionEntry *entries;
gint n_entries;
gint i;
GList *op_classes;
GList *iter;
GStrvBuilder *gegl_actions;
gimp_action_group_add_string_actions (group, "filters-action",
filters_actions,
@@ -769,6 +783,137 @@ 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 (TRUE);
for (iter = op_classes; iter; iter = iter->next)
{
GeglOperationClass *op_class = GEGL_OPERATION_CLASS (iter->data);
GimpStringActionEntry entry = { 0, };
gchar *formatted_op_name;
gchar *action_name;
const gchar *title;
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);
i = 2;
while (gimp_action_group_get_action (group, action_name) != NULL)
{
/* In the off-chance that after formatting to a valid action name, 2
* operations end up generating the same action name. Typically we
* don't want a third-party operation called "my-op" to have the same
* action name than "my_op" (which is to say that one will be
* overridden by the other).
*/
g_free (action_name);
action_name = g_strdup_printf ("filters-%s-%d", formatted_op_name, i++);
}
title = gegl_operation_class_get_key (op_class, "title");
op_name = op_class->name;
if (g_str_has_prefix (op_name, "gegl:"))
op_name += strlen ("gegl:");
if (title)
label = g_strdup_printf ("%s (%s)", title, op_name);
else
label = g_strdup (op_name);
entry.name = action_name;
entry.icon_name = GIMP_ICON_GEGL;
entry.label = label;
entry.tooltip = gegl_operation_class_get_key (op_class, "description");
entry.value = op_class->name;
entry.help_id = GIMP_HELP_TOOL_GEGL;
if (gegl_operation_class_get_key (op_class, "gimp:menu-path") &&
g_str_has_prefix (op_class->name, "gegl:"))
/* We automatically create an help ID from the operation name
* for all core GEGL operations with a menu path key.
*/
entry.help_id = formatted_op_name;
gimp_action_group_add_string_actions (group, "filters-action",
&entry, 1,
filters_apply_interactive_cmd_callback);
if (gegl_operation_class_get_key (op_class, "gimp:menu-label"))
{
GimpAction *action;
action = gimp_action_group_get_action (group, action_name);
gimp_action_set_short_label (action,
gegl_operation_class_get_key (op_class,
"gimp:menu-label"));
}
else if (title)
{
GimpAction *action;
/* TRANSLATORS: %s is the title of a GEGL operation (filter), after
* which we append "..." as the standardized labelling to indicate
* that this action raises a dialog.
*/
gchar *short_label = g_strdup_printf (_("%s..."), title);
action = gimp_action_group_get_action (group, action_name);
gimp_action_set_short_label (action, short_label);
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);
g_free (action_name);
g_free (formatted_op_name);
}
g_object_set_data_full (G_OBJECT (group),
"filters-group-generated-gegl-actions",
g_strv_builder_end (gegl_actions),
(GDestroyNotify) g_strfreev);
g_strv_builder_unref (gegl_actions);
g_list_free (op_classes);
gimp_action_group_add_enum_actions (group, "filters-action",
filters_repeat_actions,
G_N_ELEMENTS (filters_repeat_actions),
@@ -804,6 +949,8 @@ filters_actions_setup (GimpActionGroup *group)
group, 0);
filters_actions_history_changed (group->gimp, group);
first_setup = FALSE;
}
void
@@ -811,10 +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);
@@ -841,7 +992,12 @@ filters_actions_update (GimpActionGroup *group,
writable = ! gimp_item_is_content_locked (item, NULL);
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
writable = FALSE;
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);
@@ -850,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);
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);
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);
SET_SENSITIVE ("filters-displace", writable);
SET_SENSITIVE ("filters-distance-map", writable);
SET_SENSITIVE ("filters-dropshadow", writable && alpha);
SET_SENSITIVE ("filters-edge", writable);
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);
SET_SENSITIVE ("filters-gegl-graph", writable);
SET_SENSITIVE ("filters-grid", writable);
SET_SENSITIVE ("filters-high-pass", writable);
SET_SENSITIVE ("filters-hue-chroma", writable);
SET_SENSITIVE ("filters-edge", writable && !is_group);
SET_SENSITIVE ("filters-hue-saturation", writable && !gray);
SET_SENSITIVE ("filters-illusion", writable);
SET_SENSITIVE ("filters-invert-linear", writable);
SET_SENSITIVE ("filters-invert-perceptual", writable);
SET_SENSITIVE ("filters-invert-value", writable);
SET_SENSITIVE ("filters-image-gradient", writable);
SET_SENSITIVE ("filters-kaleidoscope", writable);
SET_SENSITIVE ("filters-lens-blur", writable);
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);
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);
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
@@ -1016,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,
@@ -1162,12 +1296,26 @@ filters_actions_history_changed (Gimp *gimp,
sensitive = gimp_action_get_sensitive (actual_action, NULL);
g_object_set (action,
"visible", TRUE,
"sensitive", sensitive,
"procedure", proc,
"label", label,
"icon-name", gimp_viewable_get_icon_name (GIMP_VIEWABLE (proc)),
"tooltip", gimp_procedure_get_blurb (proc),
/* It is very important that "visible" is set at the
* end, because the docs says that:
*
* > "notify" signals are queued and only emitted (in reverse order) after all properties have been set.
*
* If "visible" is set before "label" in particular,
* we end up in the inconsistent situation where the
* "visible" callbacks have not been run yet, so
* menus don't have the corresponding item whereas
* the action already shows as visible. In
* particular, g_menu_model_items_changed() may
* crash on an empty item list in GIMP_GTK_MENUBAR
* codepath.
*/
"visible", TRUE,
NULL);
}
@@ -1185,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

@@ -32,7 +32,7 @@
#include "operations/gimpoperationsettings.h"
#include "core/gimp.h"
#include "core/gimp-filter.h"
#include "core/gimp-filter-history.h"
#include "core/gimpimage.h"
#include "core/gimpprogress.h"
@@ -51,12 +51,6 @@ static gchar * filters_parse_operation (Gimp *gimp,
const gchar *icon_name,
GimpObject **settings);
static void filters_run_procedure (Gimp *gimp,
GimpDisplay *display,
GimpProcedure *procedure,
GimpRunMode run_mode);
/* public functions */
void
@@ -86,6 +80,7 @@ filters_apply_cmd_callback (GimpAction *action,
&settings);
procedure = gimp_gegl_procedure_new (image->gimp,
NULL,
GIMP_RUN_NONINTERACTIVE, settings,
operation,
gimp_action_get_name (action),
@@ -130,6 +125,7 @@ filters_apply_interactive_cmd_callback (GimpAction *action,
}
procedure = gimp_gegl_procedure_new (image->gimp,
NULL,
GIMP_RUN_INTERACTIVE, NULL,
g_variant_get_string (value, NULL),
gimp_action_get_name (action),
@@ -240,7 +236,7 @@ filters_parse_operation (Gimp *gimp,
return g_strdup (operation_str);
}
static void
void
filters_run_procedure (Gimp *gimp,
GimpDisplay *display,
GimpProcedure *procedure,
@@ -281,7 +277,17 @@ filters_run_procedure (Gimp *gimp,
display);
}
if (success)
if (success &&
(! GIMP_IS_GEGL_PROCEDURE (procedure) ||
/* XXX GimpGeglProcedure made for filter-editing are
* short-lived and should not be added to history. I'm not
* sure it makes sense UX-wise anyway ("used" filters are for
* first calls, not edits).
* If ever we decide to change this UX logic, some code logic
* changes are needed too. Cf. crash report #12576 and my
* (Jehan's) technical comment in there..
*/
! gimp_gegl_procedure_is_editing_filter (GIMP_GEGL_PROCEDURE (procedure))))
gimp_filter_history_add (gimp, procedure);
gimp_value_array_unref (args);

View File

@@ -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,
@@ -33,5 +32,7 @@ void filters_history_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __FILTERS_COMMANDS_H__ */
void filters_run_procedure (Gimp *gimp,
GimpDisplay *display,
GimpProcedure *procedure,
GimpRunMode run_mode);

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

@@ -41,12 +41,19 @@
#include "core/gimpcontext.h"
#include "core/gimpdisplay.h"
#include "core/gimpdrawable-operation.h"
#include "core/gimpdrawablefilter.h"
#include "core/gimpimage.h"
#include "core/gimplayermask.h"
#include "core/gimpparamspecs.h"
#include "core/gimpsettings.h"
#include "core/gimptoolinfo.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpstringaction.h"
#include "widgets/gimpuimanager.h"
#include "tools/gimpoperationtool.h"
#include "tools/tool_manager.h"
@@ -63,6 +70,7 @@ static gint64 gimp_gegl_procedure_get_memsize (GimpObject *object,
static gchar * gimp_gegl_procedure_get_description (GimpViewable *viewable,
gchar **tooltip);
static const gchar * gimp_gegl_procedure_get_help_id (GimpProcedure *procedure);
static const gchar * gimp_gegl_procedure_get_menu_label (GimpProcedure *procedure);
static gboolean gimp_gegl_procedure_get_sensitive (GimpProcedure *procedure,
GimpObject *object,
@@ -102,6 +110,7 @@ gimp_gegl_procedure_class_init (GimpGeglProcedureClass *klass)
viewable_class->default_icon_name = "gimp-gegl";
viewable_class->get_description = gimp_gegl_procedure_get_description;
proc_class->get_help_id = gimp_gegl_procedure_get_help_id;
proc_class->get_menu_label = gimp_gegl_procedure_get_menu_label;
proc_class->get_sensitive = gimp_gegl_procedure_get_sensitive;
proc_class->execute = gimp_gegl_procedure_execute;
@@ -152,6 +161,41 @@ gimp_gegl_procedure_get_description (GimpViewable *viewable,
return g_strdup (gimp_procedure_get_label (procedure));
}
static const gchar *
gimp_gegl_procedure_get_help_id (GimpProcedure *procedure)
{
GimpGeglProcedure *proc = GIMP_GEGL_PROCEDURE (procedure);
GList *managers;
GimpActionGroup *group;
const gchar *help_id = NULL;
managers = gimp_ui_managers_from_name ("<Image>");
group = gimp_ui_manager_get_action_group (managers->data, "filters");
if (procedure->help_id)
{
return procedure->help_id;
}
else if (group)
{
GList *actions;
GList *iter;
actions = gimp_action_group_list_actions (group);
for (iter = actions; iter; iter = iter->next)
if (GIMP_IS_STRING_ACTION (iter->data) &&
g_strcmp0 (GIMP_STRING_ACTION (iter->data)->value, proc->operation) == 0)
{
help_id = gimp_action_get_help_id (iter->data);
break;
}
g_list_free (actions);
}
return help_id == NULL ? GIMP_HELP_TOOL_GEGL : help_id;
}
static const gchar *
gimp_gegl_procedure_get_menu_label (GimpProcedure *procedure)
{
@@ -190,6 +234,7 @@ gimp_gegl_procedure_get_sensitive (GimpProcedure *procedure,
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
sensitive = FALSE;
}
g_list_free (drawables);
return sensitive;
@@ -203,30 +248,39 @@ gimp_gegl_procedure_execute (GimpProcedure *procedure,
GimpValueArray *args,
GError **error)
{
GimpImage *image;
GimpDrawable *drawable;
GObject *config;
GeglNode *node;
GimpImage *image;
gint n_drawables;
GObject **drawables;
GObject *config;
image = g_value_get_object (gimp_value_array_index (args, 1));
drawable = g_value_get_object (gimp_value_array_index (args, 2));
config = g_value_get_object (gimp_value_array_index (args, 3));
image = g_value_get_object (gimp_value_array_index (args, 1));
drawables = g_value_get_boxed (gimp_value_array_index (args, 2));
config = g_value_get_object (gimp_value_array_index (args, 3));
node = gegl_node_new_child (NULL,
"operation",
GIMP_GEGL_PROCEDURE (procedure)->operation,
NULL);
n_drawables = gimp_core_object_array_get_length ((GObject **) drawables);
gimp_drawable_apply_operation_with_config (
drawable,
progress, gimp_procedure_get_label (procedure),
node, config);
if (n_drawables == 1)
{
GeglNode *node;
g_object_unref (node);
node = gegl_node_new_child (NULL,
"operation",
GIMP_GEGL_PROCEDURE (procedure)->operation,
NULL);
gimp_image_flush (image);
gimp_drawable_apply_operation_with_config (GIMP_DRAWABLE (drawables[0]),
progress,
gimp_procedure_get_label (procedure),
node, config);
return gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_object_unref (node);
gimp_image_flush (image);
return gimp_procedure_get_return_values (procedure, TRUE, NULL);
}
return gimp_procedure_get_return_values (procedure, FALSE, NULL);
}
static void
@@ -357,6 +411,7 @@ gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
if (! strcmp (tool_name, "gimp-operation-tool"))
{
gimp_operation_tool_set_operation (GIMP_OPERATION_TOOL (active_tool),
gegl_procedure->filter,
gegl_procedure->operation,
gimp_procedure_get_label (procedure),
gimp_procedure_get_label (procedure),
@@ -365,8 +420,80 @@ gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
gimp_procedure_get_help_id (procedure));
}
/* For custom GIMP operations, we need to set the existing filter to edit
* before initializing so it doesn't create a separate filter. */
if (gegl_procedure->filter)
GIMP_FILTER_TOOL (active_tool)->existing_filter = gegl_procedure->filter;
tool_manager_initialize_active (gimp, display);
/* For GIMP-specific GEGL operations, we need to copy over the
* config object stored in the GeglNode */
if (gegl_procedure->filter)
{
GeglNode *node;
gimp_filter_set_active (GIMP_FILTER (gegl_procedure->filter), FALSE);
node = gimp_drawable_filter_get_operation (gegl_procedure->filter);
if (gimp_operation_config_is_custom (gimp, gegl_procedure->operation))
{
gegl_node_get (node,
"config", &settings,
NULL);
}
else
{
GParamSpec **pspecs;
guint n_pspecs;
gdouble opacity;
GimpLayerMode paint_mode;
GimpFilterRegion region;
opacity = gimp_drawable_filter_get_opacity (gegl_procedure->filter);
paint_mode = gimp_drawable_filter_get_paint_mode (gegl_procedure->filter);
region = gimp_drawable_filter_get_region (gegl_procedure->filter);
settings =
g_object_new (gimp_operation_config_get_type (active_tool->tool_info->gimp,
gegl_procedure->operation,
gimp_tool_get_icon_name (active_tool),
GIMP_TYPE_OPERATION_SETTINGS),
NULL);
pspecs = gegl_operation_list_properties (gegl_procedure->operation, &n_pspecs);
for (gint i = 0; i < n_pspecs; i++)
{
GValue value = G_VALUE_INIT;
GParamSpec *pspec = pspecs[i];
GParamSpec *gimp_pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (settings),
pspec->name);
g_value_init (&value, pspec->value_type);
gegl_node_get_property (node, pspec->name,
&value);
if (gimp_pspec)
g_object_set_property (G_OBJECT (settings), gimp_pspec->name,
&value);
else
g_critical ("%s: property '%s' of operation '%s' doesn't exist in config %s",
G_STRFUNC, pspec->name, gegl_procedure->operation,
g_type_name (G_TYPE_FROM_INSTANCE (settings)));
g_value_unset (&value);
}
g_free (pspecs);
g_object_set (settings,
"gimp-opacity", opacity,
"gimp-mode", paint_mode,
"gimp-region", region,
NULL);
}
}
if (settings)
gimp_filter_tool_set_config (GIMP_FILTER_TOOL (active_tool),
GIMP_CONFIG (settings));
@@ -377,15 +504,16 @@ gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
/* public functions */
GimpProcedure *
gimp_gegl_procedure_new (Gimp *gimp,
GimpRunMode default_run_mode,
GimpObject *default_settings,
const gchar *operation,
const gchar *name,
const gchar *menu_label,
const gchar *tooltip,
const gchar *icon_name,
const gchar *help_id)
gimp_gegl_procedure_new (Gimp *gimp,
GimpDrawableFilter *filter_to_edit,
GimpRunMode default_run_mode,
GimpObject *default_settings,
const gchar *operation,
const gchar *name,
const gchar *menu_label,
const gchar *tooltip,
const gchar *icon_name,
const gchar *help_id)
{
GimpProcedure *procedure;
GimpGeglProcedure *gegl_procedure;
@@ -403,6 +531,7 @@ gimp_gegl_procedure_new (Gimp *gimp,
gegl_procedure = GIMP_GEGL_PROCEDURE (procedure);
gegl_procedure->filter = filter_to_edit;
gegl_procedure->operation = g_strdup (operation);
gegl_procedure->default_run_mode = default_run_mode;
gegl_procedure->menu_label = g_strdup (menu_label);
@@ -433,11 +562,11 @@ gimp_gegl_procedure_new (Gimp *gimp,
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable ("drawable",
"Drawable",
"Input drawable",
TRUE,
GIMP_PARAM_READWRITE));
gimp_param_spec_core_object_array ("drawables",
"Drawables",
"Input drawables",
GIMP_TYPE_DRAWABLE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_object ("settings",
"Settings",
@@ -447,3 +576,11 @@ gimp_gegl_procedure_new (Gimp *gimp,
return procedure;
}
gboolean
gimp_gegl_procedure_is_editing_filter (GimpGeglProcedure *procedure)
{
g_return_val_if_fail (GIMP_IS_GEGL_PROCEDURE (procedure), FALSE);
return (procedure->filter != NULL);
}

View File

@@ -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"
@@ -40,12 +38,13 @@ struct _GimpGeglProcedure
{
GimpProcedure parent_instance;
gchar *operation;
GimpDrawableFilter *filter;
gchar *operation;
GimpRunMode default_run_mode;
GimpObject *default_settings;
GimpRunMode default_run_mode;
GimpObject *default_settings;
gchar *menu_label;
gchar *menu_label;
};
struct _GimpGeglProcedureClass
@@ -56,15 +55,14 @@ struct _GimpGeglProcedureClass
GType gimp_gegl_procedure_get_type (void) G_GNUC_CONST;
GimpProcedure * gimp_gegl_procedure_new (Gimp *gimp,
GimpRunMode default_run_mode,
GimpObject *default_settings,
const gchar *operation,
const gchar *name,
const gchar *menu_label,
const gchar *tooltip,
const gchar *icon_name,
const gchar *help_id);
#endif /* __GIMP_GEGL_PROCEDURE_H__ */
GimpProcedure * gimp_gegl_procedure_new (Gimp *gimp,
GimpDrawableFilter *filter_to_edit,
GimpRunMode default_run_mode,
GimpObject *default_settings,
const gchar *operation,
const gchar *name,
const gchar *menu_label,
const gchar *tooltip,
const gchar *icon_name,
const gchar *help_id);
gboolean gimp_gegl_procedure_is_editing_filter (GimpGeglProcedure *procedure);

View File

@@ -461,23 +461,22 @@ void
gradient_editor_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
GimpGradient *gradient;
gboolean editable = FALSE;
GimpRGB left_color;
GimpRGB right_color;
GimpRGB left_seg_color;
GimpRGB right_seg_color;
GimpRGB fg;
GimpRGB bg;
gboolean blending_equal = TRUE;
gboolean coloring_equal = TRUE;
gboolean left_editable = TRUE;
gboolean right_editable = TRUE;
gboolean selection = FALSE;
gboolean delete = FALSE;
gboolean edit_active = FALSE;
gboolean editable = FALSE;
GeglColor *color;
GeglColor *left_color = NULL;
GeglColor *right_color = NULL;
GeglColor *left_seg_color = NULL;
GeglColor *right_seg_color = NULL;
gboolean blending_equal = TRUE;
gboolean coloring_equal = TRUE;
gboolean left_editable = TRUE;
gboolean right_editable = TRUE;
gboolean selection = FALSE;
gboolean delete = FALSE;
gboolean edit_active = FALSE;
gradient = GIMP_GRADIENT (data_editor->data);
@@ -492,35 +491,31 @@ gradient_editor_actions_update (GimpActionGroup *group,
if (data_editor->data_editable)
editable = TRUE;
gimp_gradient_segment_get_left_flat_color (gradient,
data_editor->context,
editor->control_sel_l,
&left_color);
left_color = gimp_gradient_segment_get_left_flat_color (gradient,
data_editor->context,
editor->control_sel_l);
if (editor->control_sel_l->prev)
left_seg = editor->control_sel_l->prev;
else
left_seg = gimp_gradient_segment_get_last (editor->control_sel_l);
gimp_gradient_segment_get_right_flat_color (gradient,
data_editor->context,
left_seg,
&left_seg_color);
left_seg_color = gimp_gradient_segment_get_right_flat_color (gradient,
data_editor->context,
left_seg);
gimp_gradient_segment_get_right_flat_color (gradient,
data_editor->context,
editor->control_sel_r,
&right_color);
right_color = gimp_gradient_segment_get_right_flat_color (gradient,
data_editor->context,
editor->control_sel_r);
if (editor->control_sel_r->next)
right_seg = editor->control_sel_r->next;
else
right_seg = gimp_gradient_segment_get_first (editor->control_sel_r);
gimp_gradient_segment_get_left_flat_color (gradient,
data_editor->context,
right_seg,
&right_seg_color);
right_seg_color = gimp_gradient_segment_get_left_flat_color (gradient,
data_editor->context,
right_seg);
left_editable = (editor->control_sel_l->left_color_type ==
GIMP_GRADIENT_COLOR_FIXED);
@@ -546,12 +541,6 @@ gradient_editor_actions_update (GimpActionGroup *group,
delete = (editor->control_sel_l->prev || editor->control_sel_r->next);
}
if (data_editor->context)
{
gimp_context_get_foreground (data_editor->context, &fg);
gimp_context_get_background (data_editor->context, &bg);
}
/* pretend the gradient not being editable while the dialog is
* insensitive. prevents the gradient from being modified while a
* dialog is running. bug #161411 --mitch
@@ -613,23 +602,22 @@ gradient_editor_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("gradient-editor-load-left-left-neighbor", editable);
SET_SENSITIVE ("gradient-editor-load-left-right-endpoint", editable);
color = gegl_color_new (NULL);
if (gradient)
{
SET_COLOR ("gradient-editor-left-color",
&left_color, FALSE);
SET_COLOR ("gradient-editor-load-left-left-neighbor",
&left_seg_color, FALSE);
SET_COLOR ("gradient-editor-load-left-right-endpoint",
&right_color, FALSE);
SET_COLOR ("gradient-editor-left-color", left_color, FALSE);
SET_COLOR ("gradient-editor-load-left-left-neighbor", left_seg_color, FALSE);
SET_COLOR ("gradient-editor-load-left-right-endpoint", right_color, FALSE);
}
SET_SENSITIVE ("gradient-editor-load-left-fg", left_editable);
SET_SENSITIVE ("gradient-editor-load-left-bg", left_editable);
SET_COLOR ("gradient-editor-load-left-fg",
data_editor->context ? &fg : NULL, FALSE);
data_editor->context ? gimp_context_get_foreground (data_editor->context) : NULL, FALSE);
SET_COLOR ("gradient-editor-load-left-bg",
data_editor->context ? &bg : NULL, FALSE);
data_editor->context ? gimp_context_get_background (data_editor->context) : NULL, FALSE);
SET_SENSITIVE ("gradient-editor-load-left-01", left_editable);
SET_SENSITIVE ("gradient-editor-load-left-02", left_editable);
@@ -642,16 +630,16 @@ gradient_editor_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("gradient-editor-load-left-09", left_editable);
SET_SENSITIVE ("gradient-editor-load-left-10", left_editable);
SET_COLOR ("gradient-editor-load-left-01", &editor->saved_colors[0], TRUE);
SET_COLOR ("gradient-editor-load-left-02", &editor->saved_colors[1], TRUE);
SET_COLOR ("gradient-editor-load-left-03", &editor->saved_colors[2], TRUE);
SET_COLOR ("gradient-editor-load-left-04", &editor->saved_colors[3], TRUE);
SET_COLOR ("gradient-editor-load-left-05", &editor->saved_colors[4], TRUE);
SET_COLOR ("gradient-editor-load-left-06", &editor->saved_colors[5], TRUE);
SET_COLOR ("gradient-editor-load-left-07", &editor->saved_colors[6], TRUE);
SET_COLOR ("gradient-editor-load-left-08", &editor->saved_colors[7], TRUE);
SET_COLOR ("gradient-editor-load-left-09", &editor->saved_colors[8], TRUE);
SET_COLOR ("gradient-editor-load-left-10", &editor->saved_colors[9], TRUE);
SET_COLOR ("gradient-editor-load-left-01", editor->saved_colors[0], TRUE);
SET_COLOR ("gradient-editor-load-left-02", editor->saved_colors[1], TRUE);
SET_COLOR ("gradient-editor-load-left-03", editor->saved_colors[2], TRUE);
SET_COLOR ("gradient-editor-load-left-04", editor->saved_colors[3], TRUE);
SET_COLOR ("gradient-editor-load-left-05", editor->saved_colors[4], TRUE);
SET_COLOR ("gradient-editor-load-left-06", editor->saved_colors[5], TRUE);
SET_COLOR ("gradient-editor-load-left-07", editor->saved_colors[6], TRUE);
SET_COLOR ("gradient-editor-load-left-08", editor->saved_colors[7], TRUE);
SET_COLOR ("gradient-editor-load-left-09", editor->saved_colors[8], TRUE);
SET_COLOR ("gradient-editor-load-left-10", editor->saved_colors[9], TRUE);
SET_SENSITIVE ("gradient-editor-save-left-01", gradient);
SET_SENSITIVE ("gradient-editor-save-left-02", gradient);
@@ -664,16 +652,16 @@ gradient_editor_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("gradient-editor-save-left-09", gradient);
SET_SENSITIVE ("gradient-editor-save-left-10", gradient);
SET_COLOR ("gradient-editor-save-left-01", &editor->saved_colors[0], TRUE);
SET_COLOR ("gradient-editor-save-left-02", &editor->saved_colors[1], TRUE);
SET_COLOR ("gradient-editor-save-left-03", &editor->saved_colors[2], TRUE);
SET_COLOR ("gradient-editor-save-left-04", &editor->saved_colors[3], TRUE);
SET_COLOR ("gradient-editor-save-left-05", &editor->saved_colors[4], TRUE);
SET_COLOR ("gradient-editor-save-left-06", &editor->saved_colors[5], TRUE);
SET_COLOR ("gradient-editor-save-left-07", &editor->saved_colors[6], TRUE);
SET_COLOR ("gradient-editor-save-left-08", &editor->saved_colors[7], TRUE);
SET_COLOR ("gradient-editor-save-left-09", &editor->saved_colors[8], TRUE);
SET_COLOR ("gradient-editor-save-left-10", &editor->saved_colors[9], TRUE);
SET_COLOR ("gradient-editor-save-left-01", editor->saved_colors[0], TRUE);
SET_COLOR ("gradient-editor-save-left-02", editor->saved_colors[1], TRUE);
SET_COLOR ("gradient-editor-save-left-03", editor->saved_colors[2], TRUE);
SET_COLOR ("gradient-editor-save-left-04", editor->saved_colors[3], TRUE);
SET_COLOR ("gradient-editor-save-left-05", editor->saved_colors[4], TRUE);
SET_COLOR ("gradient-editor-save-left-06", editor->saved_colors[5], TRUE);
SET_COLOR ("gradient-editor-save-left-07", editor->saved_colors[6], TRUE);
SET_COLOR ("gradient-editor-save-left-08", editor->saved_colors[7], TRUE);
SET_COLOR ("gradient-editor-save-left-09", editor->saved_colors[8], TRUE);
SET_COLOR ("gradient-editor-save-left-10", editor->saved_colors[9], TRUE);
SET_SENSITIVE ("gradient-editor-right-color-fixed", editable);
SET_SENSITIVE ("gradient-editor-right-color-foreground", editable);
@@ -709,21 +697,18 @@ gradient_editor_actions_update (GimpActionGroup *group,
if (gradient)
{
SET_COLOR ("gradient-editor-right-color",
&right_color, FALSE);
SET_COLOR ("gradient-editor-load-right-right-neighbor",
&right_seg_color, FALSE);
SET_COLOR ("gradient-editor-load-right-left-endpoint",
&left_color, FALSE);
SET_COLOR ("gradient-editor-right-color", right_color, FALSE);
SET_COLOR ("gradient-editor-load-right-right-neighbor", right_seg_color, FALSE);
SET_COLOR ("gradient-editor-load-right-left-endpoint", left_color, FALSE);
}
SET_SENSITIVE ("gradient-editor-load-right-fg", right_editable);
SET_SENSITIVE ("gradient-editor-load-right-bg", right_editable);
SET_COLOR ("gradient-editor-load-right-fg",
data_editor->context ? &fg : NULL, FALSE);
data_editor->context ? gimp_context_get_foreground (data_editor->context) : NULL, FALSE);
SET_COLOR ("gradient-editor-load-right-bg",
data_editor->context ? &bg : NULL, FALSE);
data_editor->context ? gimp_context_get_background (data_editor->context) : NULL, FALSE);
SET_SENSITIVE ("gradient-editor-load-right-01", right_editable);
SET_SENSITIVE ("gradient-editor-load-right-02", right_editable);
@@ -736,16 +721,16 @@ gradient_editor_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("gradient-editor-load-right-09", right_editable);
SET_SENSITIVE ("gradient-editor-load-right-10", right_editable);
SET_COLOR ("gradient-editor-load-right-01", &editor->saved_colors[0], TRUE);
SET_COLOR ("gradient-editor-load-right-02", &editor->saved_colors[1], TRUE);
SET_COLOR ("gradient-editor-load-right-03", &editor->saved_colors[2], TRUE);
SET_COLOR ("gradient-editor-load-right-04", &editor->saved_colors[3], TRUE);
SET_COLOR ("gradient-editor-load-right-05", &editor->saved_colors[4], TRUE);
SET_COLOR ("gradient-editor-load-right-06", &editor->saved_colors[5], TRUE);
SET_COLOR ("gradient-editor-load-right-07", &editor->saved_colors[6], TRUE);
SET_COLOR ("gradient-editor-load-right-08", &editor->saved_colors[7], TRUE);
SET_COLOR ("gradient-editor-load-right-09", &editor->saved_colors[8], TRUE);
SET_COLOR ("gradient-editor-load-right-10", &editor->saved_colors[9], TRUE);
SET_COLOR ("gradient-editor-load-right-01", editor->saved_colors[0], TRUE);
SET_COLOR ("gradient-editor-load-right-02", editor->saved_colors[1], TRUE);
SET_COLOR ("gradient-editor-load-right-03", editor->saved_colors[2], TRUE);
SET_COLOR ("gradient-editor-load-right-04", editor->saved_colors[3], TRUE);
SET_COLOR ("gradient-editor-load-right-05", editor->saved_colors[4], TRUE);
SET_COLOR ("gradient-editor-load-right-06", editor->saved_colors[5], TRUE);
SET_COLOR ("gradient-editor-load-right-07", editor->saved_colors[6], TRUE);
SET_COLOR ("gradient-editor-load-right-08", editor->saved_colors[7], TRUE);
SET_COLOR ("gradient-editor-load-right-09", editor->saved_colors[8], TRUE);
SET_COLOR ("gradient-editor-load-right-10", editor->saved_colors[9], TRUE);
SET_SENSITIVE ("gradient-editor-save-right-01", gradient);
SET_SENSITIVE ("gradient-editor-save-right-02", gradient);
@@ -758,16 +743,16 @@ gradient_editor_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("gradient-editor-save-right-09", gradient);
SET_SENSITIVE ("gradient-editor-save-right-10", gradient);
SET_COLOR ("gradient-editor-save-right-01", &editor->saved_colors[0], TRUE);
SET_COLOR ("gradient-editor-save-right-02", &editor->saved_colors[1], TRUE);
SET_COLOR ("gradient-editor-save-right-03", &editor->saved_colors[2], TRUE);
SET_COLOR ("gradient-editor-save-right-04", &editor->saved_colors[3], TRUE);
SET_COLOR ("gradient-editor-save-right-05", &editor->saved_colors[4], TRUE);
SET_COLOR ("gradient-editor-save-right-06", &editor->saved_colors[5], TRUE);
SET_COLOR ("gradient-editor-save-right-07", &editor->saved_colors[6], TRUE);
SET_COLOR ("gradient-editor-save-right-08", &editor->saved_colors[7], TRUE);
SET_COLOR ("gradient-editor-save-right-09", &editor->saved_colors[8], TRUE);
SET_COLOR ("gradient-editor-save-right-10", &editor->saved_colors[9], TRUE);
SET_COLOR ("gradient-editor-save-right-01", editor->saved_colors[0], TRUE);
SET_COLOR ("gradient-editor-save-right-02", editor->saved_colors[1], TRUE);
SET_COLOR ("gradient-editor-save-right-03", editor->saved_colors[2], TRUE);
SET_COLOR ("gradient-editor-save-right-04", editor->saved_colors[3], TRUE);
SET_COLOR ("gradient-editor-save-right-05", editor->saved_colors[4], TRUE);
SET_COLOR ("gradient-editor-save-right-06", editor->saved_colors[5], TRUE);
SET_COLOR ("gradient-editor-save-right-07", editor->saved_colors[6], TRUE);
SET_COLOR ("gradient-editor-save-right-08", editor->saved_colors[7], TRUE);
SET_COLOR ("gradient-editor-save-right-09", editor->saved_colors[8], TRUE);
SET_COLOR ("gradient-editor-save-right-10", editor->saved_colors[9], TRUE);
SET_SENSITIVE ("gradient-editor-flip", editable);
SET_SENSITIVE ("gradient-editor-replicate", editable);
@@ -902,4 +887,10 @@ gradient_editor_actions_update (GimpActionGroup *group,
#undef SET_LABEL
#undef SET_SENSITIVE
#undef SET_VISIBLE
g_object_unref (color);
g_clear_object (&left_color);
g_clear_object (&right_color);
g_clear_object (&left_seg_color);
g_clear_object (&right_seg_color);
}

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

@@ -80,18 +80,21 @@ gradient_editor_left_color_type_cmd_callback (GimpAction *action,
color_type !=
gimp_gradient_segment_get_left_color_type (gradient, left))
{
GimpRGB color;
gimp_gradient_segment_get_left_flat_color (gradient,
GIMP_DATA_EDITOR (editor)->context,
left, &color);
gimp_data_freeze (GIMP_DATA (gradient));
gimp_gradient_segment_set_left_color_type (gradient, left, color_type);
if (color_type == GIMP_GRADIENT_COLOR_FIXED)
gimp_gradient_segment_set_left_color (gradient, left, &color);
{
GeglColor *color;
color = gimp_gradient_segment_get_left_flat_color (gradient,
GIMP_DATA_EDITOR (editor)->context,
left);
gimp_gradient_segment_set_left_color (gradient, left, color);
g_object_unref (color);
}
gimp_data_thaw (GIMP_DATA (gradient));
}
@@ -108,7 +111,7 @@ gradient_editor_load_left_cmd_callback (GimpAction *action,
GimpGradientSegment *left;
GimpGradientSegment *right;
GimpGradientSegment *seg;
GimpRGB color;
GeglColor *color;
GimpGradientColor color_type = GIMP_GRADIENT_COLOR_FIXED;
gint index = g_variant_get_int32 (value);
@@ -132,11 +135,11 @@ gradient_editor_load_left_cmd_callback (GimpAction *action,
break;
case GRADIENT_EDITOR_COLOR_FOREGROUND:
gimp_context_get_foreground (data_editor->context, &color);
color = gimp_context_get_foreground (data_editor->context);
break;
case GRADIENT_EDITOR_COLOR_BACKGROUND:
gimp_context_get_background (data_editor->context, &color);
color = gimp_context_get_background (data_editor->context);
break;
default: /* Load a color */
@@ -146,10 +149,8 @@ gradient_editor_load_left_cmd_callback (GimpAction *action,
gimp_data_freeze (GIMP_DATA (gradient));
gimp_gradient_segment_range_blend (gradient, left, right,
&color,
&right->right_color,
TRUE, TRUE);
gimp_gradient_segment_range_blend (gradient, left, right, color,
right->right_color, TRUE, TRUE);
gimp_gradient_segment_set_left_color_type (gradient, left, color_type);
gimp_data_thaw (GIMP_DATA (gradient));
@@ -167,8 +168,8 @@ gradient_editor_save_left_cmd_callback (GimpAction *action,
gimp_gradient_editor_get_selection (editor, &gradient, &left, NULL);
gimp_gradient_segment_get_left_color (gradient, left,
&editor->saved_colors[index]);
g_clear_object (&editor->saved_colors[index]);
editor->saved_colors[index] = gegl_color_duplicate (gimp_gradient_segment_get_left_color (gradient, left));
}
void
@@ -200,18 +201,20 @@ gradient_editor_right_color_type_cmd_callback (GimpAction *action,
color_type !=
gimp_gradient_segment_get_right_color_type (gradient, right))
{
GimpRGB color;
gimp_gradient_segment_get_right_flat_color (gradient,
GIMP_DATA_EDITOR (editor)->context,
right, &color);
gimp_data_freeze (GIMP_DATA (gradient));
gimp_gradient_segment_set_right_color_type (gradient, right, color_type);
if (color_type == GIMP_GRADIENT_COLOR_FIXED)
gimp_gradient_segment_set_right_color (gradient, right, &color);
{
GeglColor *color;
color = gimp_gradient_segment_get_right_flat_color (gradient, GIMP_DATA_EDITOR (editor)->context,
right);
gimp_gradient_segment_set_right_color (gradient, right, color);
g_object_unref (color);
}
gimp_data_thaw (GIMP_DATA (gradient));
}
@@ -228,7 +231,7 @@ gradient_editor_load_right_cmd_callback (GimpAction *action,
GimpGradientSegment *left;
GimpGradientSegment *right;
GimpGradientSegment *seg;
GimpRGB color;
GeglColor *color;
GimpGradientColor color_type = GIMP_GRADIENT_COLOR_FIXED;
gint index = g_variant_get_int32 (value);
@@ -252,11 +255,11 @@ gradient_editor_load_right_cmd_callback (GimpAction *action,
break;
case GRADIENT_EDITOR_COLOR_FOREGROUND:
gimp_context_get_foreground (data_editor->context, &color);
color = gimp_context_get_foreground (data_editor->context);
break;
case GRADIENT_EDITOR_COLOR_BACKGROUND:
gimp_context_get_background (data_editor->context, &color);
color = gimp_context_get_background (data_editor->context);
break;
default: /* Load a color */
@@ -266,10 +269,8 @@ gradient_editor_load_right_cmd_callback (GimpAction *action,
gimp_data_freeze (GIMP_DATA (gradient));
gimp_gradient_segment_range_blend (gradient, left, right,
&left->left_color,
&color,
TRUE, TRUE);
gimp_gradient_segment_range_blend (gradient, left, right, left->left_color,
color, TRUE, TRUE);
gimp_gradient_segment_set_right_color_type (gradient, left, color_type);
gimp_data_thaw (GIMP_DATA (gradient));
@@ -287,8 +288,8 @@ gradient_editor_save_right_cmd_callback (GimpAction *action,
gimp_gradient_editor_get_selection (editor, &gradient, NULL, &right);
gimp_gradient_segment_get_right_color (gradient, right,
&editor->saved_colors[index]);
g_clear_object (&editor->saved_colors[index]);
editor->saved_colors[index] = gegl_color_duplicate (gimp_gradient_segment_get_right_color (gradient, right));
}
void
@@ -629,8 +630,8 @@ gradient_editor_blend_color_cmd_callback (GimpAction *action,
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
gimp_gradient_segment_range_blend (gradient, left, right,
&left->left_color,
&right->right_color,
left->left_color,
right->right_color,
TRUE, FALSE);
}
@@ -647,8 +648,8 @@ gradient_editor_blend_opacity_cmd_callback (GimpAction *action,
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
gimp_gradient_segment_range_blend (gradient, left, right,
&left->left_color,
&right->right_color,
left->left_color,
right->right_color,
FALSE, TRUE);
}

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__ */

Some files were not shown because too many files have changed in this diff Show More