Compare commits

...

383 commits

Author SHA1 Message Date
luming zh
1f749e3781 Update Chinese (China) translation 2026-04-08 23:28:25 +00:00
Alx Sa
beb0d85224 plug-ins: Fix unused variable warning in file-xpm
In file-xpm, use_x_api is only used when
GDK_WINDOWING_X11 is defined. However, it was
included as a general variable so it threw an unused variable
warning when compiled on other systems.
This patch moves the variable declaration inside the first
#ifdef GDK_WINDOWING_X11 block of the parse_colors ()
function.
2026-04-08 20:52:35 +00:00
Martin
f61c326e65 Update Slovenian translation 2026-04-08 20:38:16 +00:00
Anders Jonsson
e58505f872 Update Swedish translation 2026-04-08 20:17:57 +00:00
Anders Jonsson
70cab79f3a Update Swedish translation 2026-04-08 20:05:08 +00:00
Jehan
62a8a8de8d Issue #16169: salvage XCF files with empty (markup "") tag.
We introduced a bug in GIMP 3.2.2 where some text layers with NULL
markup (i.e. defined as bare text) would store an empty markup inside
the XCF. As a consequence, this empty markup string would override the
text.

This bug got fixed with my previous commit. Unfortunately the XCF files
would still be available in the wild and they would still lose their
content upon editing the text layer, if we were to only fix the XCF
saving. This additional commit will add some special-casing to handle
this edge case, which would simply delete the empty markup upon
encountering it. This makes our XCF loading robust to faulty XCF files.
2026-04-08 21:20:32 +02:00
Jehan
aa7c2a55d6 Issue #16169: do not serialize empty string value.
Reverting a part of commit fa097df9 which should not have been merged,
and in fact which was not useful anymore for fixing the original issue.

This fixes part of #16169, which is that because of this change, we were
creating broken XCF containing both a text and a markup variant for
text-only text layers. Typically it was storing:

> (text "I love GIMP")
> (markup "")

Now we don't create such broken XCF anymore, but I'll want to strengthen
reading code too, so that we can salvage such XCF files, already
existing in the wild.
2026-04-08 21:20:32 +02:00
Yuri Chornoivan
edc7a14127 Update Ukrainian translation 2026-04-08 18:13:03 +00:00
Alx Sa
86740b51e8 plug-ins: Add Windows WIA scanner plug-in
We dropped 32bit Windows support in
GIMP 3.2.2, which also removed the
32bit-only TWAIN scanner plug-in.

This patch adds a new plug-in that uses
the 64bit compatible WIA API for scanning.
It should restore the support for scanning on
Windows.
2026-04-08 17:20:06 +00:00
Martin
a377367145 Update Slovenian translation 2026-04-08 13:28:52 +00:00
Bruno Lopes
c88dad5036 gitlab-ci, build/linux: Bump flatpak distribution to GNOME/CITemplates@b8e6f8f5
There is no explanation about why we are now not generating static deltas, but
let's trust GNOME guys expertise.
2026-04-08 10:14:17 -03:00
Bruno Lopes
4d6ee89a62 build/linux: Fix eval of flatpak_ci_initiative.yml
At least on my tests on macOS (zsh), it was broken.
2026-04-08 10:14:17 -03:00
Bruno Lopes
397e97dcf9 gitlab-ci, build/linux: Set commit of flatpak_ci_initiative.yml on dist script
Let's avoid surprises on the .sh too.
2026-04-08 10:14:17 -03:00
Gabriele Barbero
691785113a plug-ins: validate fcTL frame dimensions...
...against IHDR bounds in APNG loader

The pixel buffer is allocated using base image dimensions from the IHDR
chunk, but row write offsets were computed using the per-frame dimensions
from the fcTL chunk with no bounds check. A crafted APNG file with
fcTL.width > IHDR.width or fcTL.height > IHDR.height would cause
out-of-bounds writes into the heap on every row after row 0.

Reject fcTL frames whose dimensions or offsets extend beyond the base
image dimensions before proceeding with decoding.
2026-04-08 11:47:05 +02:00
Jehan
6c04ce939f NEWS: update. 2026-04-08 11:29:26 +02:00
Bruno Lopes
a66d203d1b Revert "meson: Bump python3_minver to 3.10"
This reverts commit c77e0b7faa.

Let's ensure retrocompatibility
2026-04-08 06:05:04 -03:00
Jehan
7ea9f7873b desktop: prepare GIMP 3.2.4 metadata. 2026-04-08 10:38:33 +02:00
Jehan
5a046df819 gimp-data: bump (fixing RC text shown on git builds). 2026-04-07 21:54:55 +02:00
Jehan
862bc8d2c1 NEWS: update. 2026-04-07 21:22:00 +02:00
Jehan
dababa26d6 app, pdb: (gimp-quit) PDB procedure is also deprecated.
Even the fact we have a libgimp gimp_quit() function which was not
calling the PDB proc of the same name (and indeed doing something
differently) was weird and confusing.

Anyway we should not allow random plug-ins to basically kill GIMP
without any way to do anything about it, and probably lose all your
unsaved work. This is just wrong IMO.
We'll see if anyone wants to disagree, since anyway this won't be
removed until GIMP 4.
2026-04-07 20:13:31 +02:00
Jehan
309f137ae0 libgimp: gimp_quit() is now deprecated. 2026-04-07 20:08:48 +02:00
Jehan
941bfcf918 plug-ins: remove gimp_quit() calls from the Script-Fu server.
And exit gracefully with error messages to display when any of the
critical errors which may occur does (e.g. network errors when creating
a socket).
2026-04-07 19:25:35 +02:00
Jehan
cf6871763c plug-ins: remove all gimp_quit() calls from PSD export code.
Now instead of just unexpectedly ending the plug-in process, let's
gracefully return with a GIMP_PDB_EXECUTION_ERROR and proper error
message, when any of the stream-writing function fails.
2026-04-07 18:22:43 +02:00
Jehan
73440b1627 plug-ins: get rid of various gimp_quit().
I am going to deprecate this function. We should stop just killing
plug-ins randomly when things are bugged. Instead we should still try
and return cleanly (with an error status and message).
2026-04-07 18:22:43 +02:00
Jehan
b9277e094a app: allow pango_context not existing.
This fixes a CRITICAL on exit when calling GIMP with --no-fonts:

> g_object_unref: assertion 'G_IS_OBJECT (object)' failed
2026-04-07 18:22:43 +02:00
Flynn Peck
00e9ad2f77 Update Cornish translation 2026-04-07 09:20:20 +00:00
Bruno Lopes
cc849cf189 build/macos: Update background path for local .dmg creation (not used) 2026-04-06 21:49:00 -03:00
Bruno Lopes
43a7d725bf tools: Support alternative iso_639-3 domain
This is one of the official filenames listed on iso-codes meson.build and
it is needed to work with iso-codes from vcpkg which uses that domain.
https://salsa.debian.org/iso-codes-team/iso-codes/-/blob/main/meson.build?ref_type=heads

The reason it was working with MSYS2 until now is that somehow
meson from MSYS2 manually copy the symlinks as files.
2026-04-06 21:33:33 -03:00
Bruno Lopes
608c4cca73 build/windows: iso-codes is now available on vcpkg
See: https://github.com/microsoft/vcpkg/pull/50955
2026-04-06 21:33:23 -03:00
Bruno Lopes
449889295f gitlab-ci: Add cppcheck to issue-bot needs: 2026-04-06 20:19:53 -03:00
Bruno Lopes
8c0fc54b80 gitlab-ci: Only add issue-bot to 'test_pipeline' pipelines
It is really useful on pipelines used only for testing:
- GIMP_CI_MESON_CLANG
- GIMP_CI_MESON_MSVC
- GIMP_CI_MESON_APPLECLANG
- GIMP_CI_RASTER_ICONS
- GIMP_CI_CPPCHECK

This fixes issue-bot wrongly in the middle of nightly packages,
which was not my intention, since these pipelines are flaky
and all are run with CI_COMMIT_TAG before the releases (with
exception of the flatpak, which is checked by the packager when
syncing the manifest, so issue-bot is also useless there)
2026-04-06 20:15:44 -03:00
Bruno Lopes
2a3480cc1b build: Anotate some dependencies limitations for packaging 2026-04-06 19:50:16 -03:00
Bruno Lopes
6316479440 build/linux: Update openexr and libwmf modules
Synced from 8ee51ad2f1
2026-04-06 15:45:33 -03:00
Jehan
68fab913c6 libgimpbase: add and improve some docs.
This is a fixup for commit a85e5286fd.
While neither gimp_env_init() and gimp_env_exit() are supposed to be
part of the public API (therefore these docs won't be part of the
gi-docgen docs either), it's better to properly document this with
explicit text.
2026-04-06 17:56:32 +02:00
Jehan
abd22d0059 NEWS: update. 2026-04-06 17:54:39 +02:00
Jehan
30ced82bf4 Revert "INSTALL: Fix alignment of optional dependencies table"
This mostly reverts commit 987dc52160
(with some conflicts fixed as the file got further touched).

This table was already properly aligned as what matters is the generated
INSTALL file, which is what will end up in our source tarballs. This
file is also published on the developer website. The reverted commit was
completely breaking the formatting. 😅
2026-04-06 17:47:04 +02:00
Jehan
1fa1f2384b gimp-data: update to latest (improved image scripts error messages). 2026-04-06 16:49:39 +02:00
Jehan
a85e5286fd Issue #14681: Permission denied opening image - /tmp/gimp/3.0/ cannot be shared.
Let's create the folder returned by gimp_temp_directory() ourselves, the
first time this function is called, using a randomized name. This will
ensure that we won't conflict with another user running GIMP on the same
machine if using the base /tmp/ (which is usually the case on Linux).

Furthermore, since we create the temp folder at this level, we will also
delete it when quitting (but only if it's empty, as it should). Also I
use a single-level folder above the generic temporary directory, this
way, it's easier to track and we don't have to delete 2 levels of
directories anymore.

When the environment variable GIMP3_TEMPDIR is set though, we do not
create the folder, nor do we try and delete it.
2026-04-06 16:29:40 +02:00
Jehan
7dc8fefbfd app, libgimp, pdb, plug-ins: new gimp_resources_loaded() function.
And use the function in script-fu. While we want wrong resource names to
trigger WARNINGs in Script-Fu scripts and plug-ins (because these can be
considered as a bug), we don't want it to happen when the resource is
not loaded on purpose (mostly it means that we run GIMP with --no-data
or --no-fonts). This was happening in our own builds when running GIMP
through the in-build-gimp.py script and that was always very annoying.

Now in such a case, we will only output an INFO message on stderr (it's
still a good idea to warn about this, because if we imagined someone was
running a script non-interactively, which called one of these
procedures, they may have relied on the default value of some arguments.
Therefore they'd want to know about such a behavior change).
2026-04-06 16:29:40 +02:00
Jehan
9cab16c193 tools: fix defcheck.
We don't have excluded symbols in GIMP codebase.
2026-04-06 16:29:40 +02:00
Jehan
f00bf531ae app: do not warn for stray images from command lines.
The INFO message "a stray image seems to have been left around by a
plug-in" was annoying when GIMP is run non-interactively, and when it
was about images open from command lines. Typically this message would
be visible on our CI when the various gimp-data scripts would fail. This
could only confuse script developers.

The fact is that while a plug-in (or batch script) should definitely
clean after itself by deleting images it created (unless it gave it a
display, in which case ownership is moved to the GUI), it is absolutely
expected that images opened through the command line would still exist
at exit.
2026-04-06 16:29:40 +02:00
Denis Rangelov2
1332a755eb Update Russian translation 2026-04-06 11:52:44 +00:00
Jehan
04ae810258 tools: add newline to debug strings.
Unlike print(), sys.std*.write() does not add a newline, which makes for
hard-to-visually-parse debug lines, all clumped up together.
2026-04-04 23:05:26 +02:00
Jehan
1107d0f7af app, pdb, plug-ins: improve error feedback for gimp_temp_file().
It is not a fix yet for #14681 but would provide nicer and earlier error
when a call to gimp_temp_file() fails, which may happen in some cases.
E.g. if the temp directory doesn't exist and we fail to create it.

As a test, if I delete /tmp/gimp/3.2/ and give root ownership to
/tmp/gimp/, now the error when opening our gimp-splash.xcf.xz is:

GIMP-Error: Opening '/path/to/gimp/gimp-data/images/gimp-splash.xcf.xz' failed: Error creating directory /tmp/gimp/3.2: Permission denied
2026-04-04 23:05:26 +02:00
Bruno Lopes
088b1f2426 gitlab-ci: Fix typo 2026-04-04 17:08:03 -03:00
Bruno Lopes
13e5fb2231 gitlab-ci: Small organization of build-time and runtime deps 2026-04-04 17:02:07 -03:00
Jehan
fd9484a8b8 plug-ins: better error message for file-compressor for specific issues.
This is a further improvement, for the specific case which appeared on
issue #16160. Basically here for the specific case when we have
permission issues, or other similar issues where we fail to either load
the input image, or export to the temporary file, we would get more
explicit error messages. And this would also show in the stderr output
of the in-build-gimp.py script.

In particular, when reproducing #16160 permission issue, the build logs
now contain this error:

GIMP-Error: Opening '/path/to/gimp/gimp-data/images/gimp-splash.xcf.xz' failed: Error creating temporary file '/tmp/gimp/3.2/gimp-temp-1719540.xcf': Permission denied

This should better help diagnose similar issues in the future.
2026-04-04 17:21:45 +02:00
Jehan
864abd6be0 app: print error message when failing to open from command line…
… even when we have no display.

gimp_message() supports a NULL handler object and we get proper
GIMP-Error message printed on stderr, e.g. when GIMP is run from the
build system.
We want as much info as possible when debugging our build scripts.
This is part of fixes to improve situations such as seen in #16160.
2026-04-04 17:21:45 +02:00
João Pedro Pitarelo
c1a228ea48 Update Brazilian Portuguese translation 2026-04-04 13:37:33 +00:00
Alx Sa
d88cd4cb7a plug-ins: Improve color detection in file-pdf-export
Resolves #14583
If the user chooses to vectorize PDF layers with single colors,
get_layer_color () is run to use histograms to determine if they
are indeed a single color. gimp_drawable_histogram () is used to
get the RGB values as averages. This function returns values in the
0...255 range for 8-bit images and 0.0...1.0 range for all the
other precisions.

However, we did not properly normalize the values, resulting in
blown-out white layers when exporting 8-bit images. This patch
checks if the image is 8-bit and divides all values by 255.0f in
that case.

It also checks if the image is in linear precision or not, as
gegl_color_set_rgba () assumes the color values are linear. If not,
gegl_color_set_pixel () is used instead. Finally, the color mode
checks are made a bit more robust in preparation for future color
modes like CMYK.
2026-04-04 12:38:36 +00:00
Kristjan ESPERANTO
b41deb138d Update Esperanto translation 2026-04-03 22:18:46 +00:00
v4vansh
620850715e Core: Fix stale thumbnails after mode conversion 2026-04-03 16:17:47 +00:00
Bruno Lopes
60d8c4cbbe build/windows: Update MSVC patch since we now have more packages 2026-04-03 11:48:00 -03:00
Bruno Lopes
40ccc60d14 gitlab-ci: Make vcpkg specific variables more neutral
Now, with x64-windows-release, we don't have the debug binaries, so
we can search recursively for executables on tools/ to add on PATH.
2026-04-03 11:09:54 -03:00
Bruno Lopes
9aef11022a plug-ins: Use _fileno on Windows 2026-04-03 11:09:54 -03:00
Bruno Lopes
f788cdac9d build/windows: Build more packages now that we use x64-windows-release
Also list gettext and python3 which were already installed.
2026-04-03 11:09:34 -03:00
Bruno Lopes
e1abd061a9 gitlab-ci, build/windows: Use VCPKG_DEFAULT_HOST_TRIPLET
We were using VCPKG_DEFAULT_TRIPLET, which makes impossible to
use x64-windows-release triplet since vcpkg starts to crosscompile
(even on the same arch). Let's fix this by using the right env var.
2026-04-03 08:33:23 -03:00
Bruno Lopes
9926795610 plug-ins: Include <memory> when on MSVC 2026-04-03 08:29:52 -03:00
Bruno Lopes
06aa66428d plug-ins: Add HAVE_SYS_TIME_H check on file-heif
This fixes a build error on MSVC
2026-04-03 08:12:08 -03:00
Alx Sa
13e2823a03 pdb: Allow pixels as unit in PDB calls
In GIMP 2.10, the PDB call
gimp-context-set-line-width-unit allowed
for Pixels to be set as a unit. In 3.0, we
changed GimpUnit to be a proper object
and gave it options to allow pixels or not.
The default setting is 'no pixels allowed',
which caused the unchanged
gimp-context-set-line-width-unit parameter
to no longer accept pixels as a unit.
This patch adds `allow_pixel => 1` to the
PDB set-up for setting units to fix this
oversight.
2026-04-03 10:58:10 +00:00
Alx Sa
65e06ab42b actions: Better protect layers from Fill menu
Resolves #16019
The Edit -> Fill with... options did not respect if
layers could not be filled (such as linked layers or
multiple selected layers with some layers being
pixel locked). This patch adds checks instead of
unconditionally filling those layers.
It also adds the text & vector specific fills from 916cf84e
to keep this action consistent.
2026-04-03 03:38:58 +00:00
Bruno Lopes
ee06c790c3 build: Make generic CWD error message more consistent 2026-04-02 23:23:09 -03:00
Bruno Lopes
9cfccfb968 build/macos: Fix macOS CWD error message
It should direct to gimp-web-devel
2026-04-02 23:19:04 -03:00
Bruno Lopes
a9e1f665dd build: Make gimp build scripts work on tarballs too 2026-04-02 23:12:49 -03:00
Bruno Lopes
febeb89c55 build: Add check for 'git' on Windows and macOS deps scripts
Since git is actually not a dependency, we need to do some checks.

See: https://gitlab.gnome.org/Infrastructure/gimp-web-devel/-/issues/54
2026-04-02 22:24:22 -03:00
Bruno Lopes
65f4c6c47f build/windows: List some already installed vcpkg deps 2026-04-02 16:13:45 -03:00
Bruno Lopes
e88053628a build/windows: Remove binutils from all-deps-uni
It was there just because on crossroads era we needed it for bundling
(since crossroads does not support installing package groups like toolchain).
2026-04-02 15:39:08 -03:00
Bruno Lopes
c034549574 build/windows: Remove virtual headers-git from all-deps-uni
It is already provided by toolchain group package.
2026-04-02 15:35:19 -03:00
Bruno Lopes
d5b087d656 build/macos: Complete a bit homebrew dependencies list
This adds aalib, gi-docgen, libheif, libmng and vala.

The homebrew list was originally minified since all-deps-uni was
ported from the treatment of vcpkg on build/windows all-deps-uni.
But since on homebrew we don't build anything, let's install them.

This also adds to the list deps already installed recursively.
2026-04-02 14:50:10 -03:00
Bruno Lopes
ff3c56ba1f build/macos: Add perl to all-deps-uni list 2026-04-02 14:50:10 -03:00
Bruno Lopes
c77e0b7faa meson: Bump python3_minver to 3.10
Pygobject requires 3.9 which already reached EOL.
Pycairo requires 3.10 which is lower than on Bookworm.
2026-04-02 14:34:11 -03:00
Bruno Lopes
37c11d1748 build: List some missing packages for parity with INSTALL file 2026-04-02 13:18:15 -03:00
Alx Sa
55256210f8 plug-ins: Fix algorithm check for PAA import
Resolves #16151
The original implementation mixed up the variable that
needed to be used for boundary checks - it should be
"estimated_size" and not "flags". This patch fixes the issue
to prevent a buffer overflow.
2026-04-02 14:02:28 +00:00
Bruno Lopes
3e21884883 INSTALL: Remove webkit from optional dependencies list
It is already listed on the unmaintained dependencies
2026-04-02 11:00:51 -03:00
Bruno Lopes
987dc52160 INSTALL: Fix alignment of optional dependencies table 2026-04-02 10:59:45 -03:00
Bruno Lopes
2637492ef1 INSTALL: Mention requirement of GObject Introspection for Gexiv2 2026-04-02 10:53:21 -03:00
Jehan
4f69cd039c app: get rid of some unused internal API.
I noticed this yesterday, especially through gimp_image_get_active_array()
and gimp_image_get_visible_array() which are looping through
MAX_CHANNELS, hence assuming the passed components arrays are of
sufficient size. I could have just added some comment to document that
we must be careful when calling this, but this is currently completely
unused code. So I prefer to just clean it out.

If we need something like this in the future, we can just do it better.
2026-04-02 11:45:25 +02:00
Alx Sa
bfec7079f0 plug-ins: Prevent attack via APNG transparent chunk
Resolves #16150
Per Bronson Yen, it's possible to create a transparent chunk
that's larger than 256 index values. In that case, the trans[]
array will overflow since we initialize it to 256 indexes.
This patch adds a check to make sure the iterator used for the
transparency for loop does not exceed the array size even if
the chunk size does.
2026-04-02 05:34:45 +00:00
Ekaterine Papava
7c604fc722 Update Georgian translation 2026-04-02 03:48:40 +00:00
Bruno Lopes
27bb2a8721 meson: Do not enable OpenMP on clang-cl
Closes: #16145
2026-04-01 21:40:41 -03:00
Bruno Lopes
2832b15f0a gitlab-ci: Ensure recent meson on MSVC builds 2026-04-01 21:40:41 -03:00
Gabriele Barbero
8af15d525a tools: fix font size jump when using shortcuts
Previously, when using shortcuts to increase or decrease the font size of
the selected text, the size would jump to 0. This behavior occurred because,
if the text did not yet have a font tag, the initial font size was evaluated as 0.

This commit ensures that the text tool's default font size is used when
no font tag is present. This prevents the font size from jumping to 0 the
first time the shortcuts are used.
2026-04-02 00:24:26 +02:00
Bruno Lopes
d63687aefd gitlab-ci: Fix typo on issue-bot needs: 2026-04-01 18:50:03 -03:00
Bruno Lopes
e7bca20795 gitlab-ci: Run issue-bot when scheduled Clang build check fails 2026-04-01 18:35:34 -03:00
Sabri Ünal
48ecc40599 Update Turkish translation 2026-04-01 21:27:12 +00:00
Sabri Ünal
e79c142d1c Update Turkish translation 2026-04-01 21:19:38 +00:00
Jan Papež
26322f0f43 Update Czech translation 2026-04-01 20:13:33 +00:00
Jehan
b402e7d73b Revert "meson: Set -Wno-vla-cxx-extension"
This reverts commit 6f655967dc.

This should not be needed anymore.
2026-04-01 18:52:45 +02:00
Jehan
2c8d91c3cc app: further remove a variable length array.
Fixes when compiling:

> error: variable length array ‘mask_row_buf’ is used

With this and previous commit, we can now compile with C++ flags
-Werror=vla and get no build failures.
2026-04-01 18:52:45 +02:00
Jehan
9257af7570 app: do not use variable length arrays.
Fixing in the gimp-macos-inhouse: [arm64] job:

> ../app/core/gimpbrush-transform.cc:869:17: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]

Also adding some asserts in some places where we rely on the
MAX_CHANNELS constant so that we will quickly detect if this variable
needs to be further bumped in the future (especially as we will add
CMYK+ support as backend format).
2026-04-01 18:52:45 +02:00
Bruno Lopes
08121e09bd build/linux: Update poppler module to 26.04 2026-04-01 11:37:33 -03:00
Bruno Lopes
1dd77b6fdf plug-ins: No need to clang-specific pragma
This partially reverts 94f77bd2
2026-04-01 09:47:56 -03:00
Bruno Lopes
2e7ab376bf gitlab-ci: Fix MSYS_ROOT leaking to MSVC builds 2026-04-01 09:25:48 -03:00
Bruno Lopes
bf9e206c39 build/windows: Fail on warnings on Clang-CL builds for gimp sake 2026-04-01 08:44:37 -03:00
Bruno Lopes
9df9cf7ed1 libgimp: Fix last MSVC warning 2026-04-01 08:43:00 -03:00
Bruno Lopes
ca7da0080a libgimpwidgets: Use gdk_pixbuf_get_pixels on older gdk_pixbuf
Since our minimum version is 2.30.8.

This solves a warning from Clang-CL.
2026-04-01 08:42:48 -03:00
Bruno Lopes
eaa472158c plug-ins: Silence deprecation warning about rsvg_handle_set_size_callback 2026-04-01 08:04:56 -03:00
Bruno Lopes
d025b02823 plug-ins: Use localtime_s on Windows to fix CRT_INSECURE_DEPRECATE warns 2026-04-01 07:38:12 -03:00
Bruno Lopes
fe95ec6ecf libgimpconfig: Use strcat_s on Windows to fix CRT_INSECURE_DEPRECATE warns 2026-04-01 07:16:40 -03:00
Bruno Lopes
f4969c2f80 plug-ins: Use fopen_s on Windows to fix CRT_INSECURE_DEPRECATE warns 2026-04-01 07:16:32 -03:00
Bruno Lopes
f14f9516e2 plug-ins: Fix some problematic Windows functions
The macro should be enough but
on these source files it does not work.
2026-03-31 21:44:51 -03:00
Bruno Lopes
dae02feed3 plug-ins: Use Glib date-time functions 2026-03-31 21:44:51 -03:00
Bruno Lopes
4643f7898f plug-ins: More casting fixes 2026-03-31 21:44:51 -03:00
Bruno Lopes
3807b2f311 app, plug-ins: More sscanf_s on Windows 2026-03-31 21:44:51 -03:00
Bruno Lopes
8aeb5d6f53 app, libgimpwidgets: More strcpy_s on Windows 2026-03-31 21:44:51 -03:00
Alx Sa
a749329ab6 tools: Turn off floating selection outline when moving
When moving a floating layer or selection, we draw a solid
border around the object. However, we also let the "marching
ants" selection continue (if the user has it enabled). This slows
down performance when moving, especially on large selections.

This patch incorporates logic from the Selection tools into the
Edit Selection tool (which the Move Tool uses for translation).
It stores the user's "Show Selection" setting, sets it to FALSE
while moving the layer or selection, then restores it to its
prior value when the cursor is released.

This logic also extends to using Ctrl + Alt to drag a floating
selection out of a layer that already has a selection.
2026-03-31 23:46:05 +00:00
Bruno Lopes
e97e3d0e35 plug-ins: Forgot a macro 2026-03-31 18:58:47 -03:00
Bruno Lopes
55cf88f2c8 build/macos: Fail on warnings on Apple Clang builds for gimp sake 2026-03-31 18:58:47 -03:00
Bruno Lopes
6f655967dc meson: Set -Wno-vla-cxx-extension
As briefly discussed with @ok and @cmyk.student on IRC,
it seems reasonable, specially considering it is C++.
2026-03-31 18:58:42 -03:00
Bruno Lopes
d5d0527955 gitlab-ci: Make branches-check interruptible 2026-03-31 16:30:56 -03:00
Alx Sa
127510cd81 core: Use MAX_CHANNELS for Histogram limit
gimphistogram.c used its own custom MAX_N_COMPONENTS
define for the max value of its "n-components" property.
Since this value is the same as MAX_CHANNELS, it would be
good to use the global constant so the histogram limit automatically
updates when we added a new format with a larger number of components
such as CMYKA.
2026-03-31 19:28:05 +00:00
Bruno Lopes
657dceb3ed app: Use g_strerror 2026-03-31 16:27:25 -03:00
Bruno Lopes
d254c5684c app, libgimp*, plug-ins: Use strtok_s on Windows to fix CRT_INSECURE_DEPRECATE 2026-03-31 16:27:25 -03:00
Bruno Lopes
b5ca37f192 app: Properly fix unused eek_handled
Proper fix after 189598c3
2026-03-31 16:27:25 -03:00
Bruno Lopes
7ce3ed457e app, libgimp*, modules: More type <> casting fixes 2026-03-31 16:27:25 -03:00
Jehan
3668ee5562 NEWS: update. 2026-03-31 19:16:35 +02:00
Bruno Lopes
ed3611efa6 app, libgimp*, plug-ins: Use strncpy_s on Windows to fix CRT_INSECURE_DEPRECATE 2026-03-31 13:31:33 -03:00
Bruno Lopes
fe185577e2 libgimp: Use new datetime functions to fix CRT_INSECURE_DEPRECATE warnings 2026-03-31 13:31:33 -03:00
Bruno Lopes
3c71c42c31 app, app-tools, libgimp: Use freopen_s on Windows to fix CRT_INSECURE_DEPRECATE 2026-03-31 13:31:33 -03:00
Bruno Lopes
b9ec00c334 libgimpbase, libgimpconfig: Fix some castings 2026-03-31 13:31:33 -03:00
Bruno Lopes
84c7274c70 plug-ins: Use fscanf_s on Windows to fix CRT_INSECURE_DEPRECATE warnings 2026-03-31 13:31:33 -03:00
Ondřej Míchal
6aaefa73c2 libgimp: Sanitize path separators in menu paths
Technically not problematic but when inspecting using Plugin Browser,
the resulting hierarchy is confusing because it sometimes shows actions
to be inside "empty" directories if there are doubled path separators or
trailing ones. Let's not depend on the user to do this correctly when we
can do it for them.
2026-03-31 18:02:44 +03:00
Gabriele Barbero
2d83568bb9 tools: prioritize proxy bindings over IM context in text tool
Try proxy bindings before the IM context. On macOS and Windows,
the IM context consumes Alt+key events (Option produces special
characters on macOS; Alt triggers alt-codes on Windows), so
bindings such as Alt+Plus/Minus (size) and Alt+arrows
(baseline/kerning) would never be reached otherwise.
2026-03-31 15:31:25 +02:00
Bruno Lopes
189598c330 Revert "app: Add macro to fix unused eek_handled variable"
This reverts commit 499e18f84e.
2026-03-31 07:34:49 -03:00
Bruno Lopes
499e18f84e app: Add macro to fix unused eek_handled variable 2026-03-30 22:52:45 -03:00
Bruno Lopes
1c59ad3f17 libgimpwidgets: Comment unused remove_input_window_class function 2026-03-30 22:48:35 -03:00
Bruno Lopes
a146c4ae56 plug-ins: Do not redefine math macros on MSVC 2026-03-30 22:32:01 -03:00
Bruno Lopes
77682518b9 app, plug-ins: Use strcpy_s on Windows to fix CRT_INSECURE_DEPRECATE warnings 2026-03-30 22:32:01 -03:00
Bruno Lopes
2066844166 app, lib*, plug-ins: Use sscanf_s on Windows to fix CRT_INSECURE_DEPRECATE warns 2026-03-30 22:31:57 -03:00
Bruno Lopes
6f33a6a896 modules: Comment unused gimp_input_device_store_remove 2026-03-30 21:37:04 -03:00
Bruno Lopes
8b9ee6d2a8 app, tools: Use cross-platform g_getenv, not getenv
It uses the safe URCT function under the hood.
2026-03-30 21:36:54 -03:00
Bruno Lopes
854caadbc3 build/windows: Update MSVC patch after md generation commit 2026-03-30 17:50:52 -03:00
Bruno Lopes
2a341b815c app: Change some booleans on propgui-types to unsigned integers
This fixes an Apple Clang warning about implicit truncation
from 'int' to a one-bit wide bit-field
2026-03-30 16:09:13 -03:00
Bruno Lopes
c19ed5ca98 plug-ins: Cast g_string_append_c argument to gchar on file-tiff
Silences an Apple Clang warning
2026-03-30 16:09:13 -03:00
Bruno Lopes
811c0c8546 app: Use posix_spawn on macOS
Fixes a Apple Clang warning.
vfork is considered deprecated and unsafe on such platform
2026-03-30 16:09:13 -03:00
Bruno Lopes
ae0a6b028e libgimpwidgets: Remove apparently bogus variable 2026-03-30 16:09:13 -03:00
Kolbjørn Stuestøl
82f4ffefa9 Update Norwegian Nynorsk translation 2026-03-30 18:54:10 +00:00
Yuri Chornoivan
3b7a92fc5d Update Ukrainian translation 2026-03-30 18:51:39 +00:00
Kolbjørn Stuestøl
e9a608a0f5 Update Norwegian Nynorsk translation 2026-03-30 18:51:16 +00:00
Kolbjørn Stuestøl
774c3988bb Update Norwegian Nynorsk translation 2026-03-30 18:46:04 +00:00
Kolbjørn Stuestøl
d6fa046f4f Update Norwegian Nynorsk translation 2026-03-30 18:38:51 +00:00
Kolbjørn Stuestøl
1116615856 Update Norwegian Nynorsk translation 2026-03-30 18:37:36 +00:00
Bruno Lopes
ae339e180e libgimp: Support GLib 2.87.3 platform-specific introspection 2026-03-30 12:31:37 -03:00
Jehan
0148fcbac1 docs, tools: generate Mardown versions of the man pages directly…
… from the main repository.

The new script is basically a copy of tools/man_to_md.py from the
gimp-web repository, with a few improvements.

This is meant to improve our release procedure, with much more
automatization and less manual steps.
2026-03-30 11:34:25 +02:00
Марко Костић
79d37e234b Update Serbian translation 2026-03-30 07:08:01 +00:00
Bruno Lopes
74efec2b76 app: Fix mixed declaration and code of infoCount 2026-03-29 21:07:00 -03:00
Bruno Lopes
e6eeaba58e app: Explicity cast third argument of gimp_enum_radio_box_add to gint
To fix a Apple Clang warning.

gint is what the function on app/widgets/gimpwidgets-utils.h expects.
2026-03-29 21:07:00 -03:00
Bruno Lopes
6300b7377f app: Fix mix of declaration and code on *request and *session 2026-03-29 21:07:00 -03:00
Bruno Lopes
9b533c5099 libgimpwidgets: Use NSWindowStyleMaskBorderless and NSEventTypeMouseEntered 2026-03-29 21:07:00 -03:00
Bruno Lopes
9e664f140d app: Do not set max_n_props array length with const as per Apple Clang warning 2026-03-29 21:07:00 -03:00
Bruno Lopes
94f77bd256 plug-ins: Silence 'register' storage class specifier warning on Clang too 2026-03-29 21:07:00 -03:00
luming zh
1cc5458558 Update Chinese (China) translation 2026-03-29 23:28:51 +00:00
Bruno Lopes
a71ecd0dda app: Import all Foundation headers needed for NSLocale
The previous NSLocale.h include was limited and not enough,
causing warnings from Apple Clang. Let's fix that.
2026-03-29 18:56:51 -03:00
Bruno Lopes
8c0ce0cd64 plug-ins: Fix many type conversions on file-psd
As per Apple Clang warnings.
2026-03-29 18:31:52 -03:00
Bruno Lopes
c69549aff5 app, libgimpwidgets: Fix some declarations mixed with code 2026-03-29 17:19:42 -03:00
Bruno Lopes
af1dac3c51 app, plug-ins: Comment unused stuff on macOS
This fixes Apple Clang warnings about:

- idx
- count_large
- count_nan
- n
- iteration
- original_id
- real_pos
2026-03-29 17:19:42 -03:00
Bruno Lopes
f4f1baf5ef app, libgimp, libgimpbase, libgimpwidgets, plug-ins: Add macro to unused code
This fixes Apple Clang warnings about:

- xdiff
- ydiff
- gimp_ui_get_foreign_window
- locale_parser_parse
- use_app_menu
- gimp_unique_dbus*
- transient_set
- gimp_get_foreign_window
- support
2026-03-29 17:19:42 -03:00
Baurzhan Muftakhidinov
f99fbdca8a Update Kazakh translation 2026-03-29 17:17:39 +00:00
Baurzhan Muftakhidinov
0bbddc6cda Update Kazakh translation 2026-03-29 17:17:16 +00:00
Baurzhan Muftakhidinov
f629be96a1 Update Kazakh translation 2026-03-29 17:16:53 +00:00
Martin
ee9447bf06 Update Slovenian translation 2026-03-29 17:06:11 +00:00
Bruno Lopes
2bdc93281c build, libgimpwidgets, meson: Add ScreenCaptureKit support
Inspired by https://github.com/neutralinojs/neutralinojs/pull/1477/changes
which was found by Alex.

This makes possible to build GIMP on macOS 12+ targets, which is
useful for local builds. We, however, will keep targeting macOS 11.
2026-03-29 11:55:36 -03:00
Bruno Lopes
4f1c6a2a8b build/macos: Improve gexiv 0.16 patch for Homebrew builds
This makes building less noisy while we don't support the new API.
2026-03-29 10:42:44 -03:00
Alx Sa
8eae22306a widgets: Block signals when changing visible filters
eec9d512 did not block calls to
gimp_drawable_filters_editor_visible_all_toggled () when
updating the "All Visible" toggle button in
gimp_drawable_filters_editor_set_sensitive (). This resulted
in unexpected visibility changes in some combinations of
filters being turned on and off.
This patch adds the blocking calls around the call to
gtk_toggle_button_set_active () to keep this consistent.
2026-03-29 12:36:39 +00:00
Bruno Lopes
1d4f942239 meson: Assorted fixes 2026-03-29 07:47:52 -03:00
Bruno Lopes
e2549ef383 meson: Move pango checks to relevant section 2026-03-29 07:47:52 -03:00
Bruno Lopes
3a4ceb0b3a meson: Unify scattered macOS-specific code 2026-03-29 07:47:52 -03:00
Bruno Lopes
66d5e9c9f9 meson: Move gimpdir and project_subdir to relevant section 2026-03-29 07:47:52 -03:00
Bruno Lopes
497ffd8eff meson: Move exec_ver to relevant section 2026-03-29 07:47:52 -03:00
Bruno Lopes
ec22a2f058 build/macos: Fallback to SDK version on Assets.car generation
This is needed when MACOSX_DEPLOYMENT_TARGET is not set.
2026-03-29 07:47:32 -03:00
Bruno Lopes
f8a5b2ebb9 gitlab-ci: Do not pull MacPorts cache on Homebrew builds 2026-03-28 22:16:16 -03:00
Anders Jonsson
69c32c89eb app, etc: fix presets typo in blurb 2026-03-29 01:03:59 +01:00
Bruno Lopes
477c751562 gitlab-ci: Fail on warnings on GNU Clang builds for gimp sake
Closes: #8033
2026-03-28 19:51:25 -03:00
Bruno Lopes
e64058d23b app: Silence variable is not needed and will not be emitted warnings 2026-03-28 19:51:25 -03:00
Bruno Lopes
2381ec5c7c app: Convert history_duration to gdouble for unambiguous division 2026-03-28 19:51:25 -03:00
Bruno Lopes
3835167be6 app: Convert some vars to guint so make bitwise operation unambiguous
Silences a GNU Clang warning.
2026-03-28 19:51:25 -03:00
Bruno Lopes
0530069052 app: Convert color_type to signed int so make the check meaningful
This fixes a GNU Clang warning:

warning: result of comparison of unsigned enum expression >= 0 is always true
2026-03-28 19:51:25 -03:00
Bruno Lopes
0834c7c954 app, plug-ins: Use GINT_TO_POINTER / GPOINTER_TO_INT for portability
Doing traditional explicit conversion (casting) causes warnings.
See: https://docs.gtk.org/glib/conversion-macros.html
2026-03-28 19:51:25 -03:00
Bruno Lopes
41c9d8ce9c plug-ins: Initialize raw_len32 2026-03-28 19:51:25 -03:00
Bruno Lopes
c8c420aa18 app, plug-ins: Comment pixel, total, flags and count unused variables 2026-03-28 19:51:25 -03:00
Jehan
0cb6d9cf7b Post-release version bump to GIMP 3.2.3. 2026-03-28 20:46:29 +01:00
Jehan
c6e8b5f7ec build: set Snapcrash to nightly build. 2026-03-28 20:45:05 +01:00
Bruno Lopes
81f7b3ad6e build/windows: No need to download .NET for PowerShell
It is already bundled on the .zip we download.

Reapplied after 6e5c6b83
2026-03-28 11:21:56 -03:00
Bruno Lopes
6e5c6b83f0 Revert "build/windows: No need to download .NET for PowerShell"
This reverts commit 963c896313.

Ouch, here we go again with git flaky LF/CRLF line ending handling.
2026-03-28 11:17:13 -03:00
Bruno Lopes
963c896313 build/windows: No need to download .NET for PowerShell
It is already bundled on the .zip we download.
2026-03-28 11:09:54 -03:00
Bruno Lopes
eb119759ca build/macos: maxflow is now available on MacPorts
See: 70daadd5fb
2026-03-28 09:55:34 -03:00
Bruno Lopes
456de6761e meson: Fix typo on have_lua_lgi check
Closes #16120
2026-03-28 09:00:42 -03:00
Bruno Lopes
476407cd1b build/windows: Different .NET versions should be installed on same DOTNET_ROOT 2026-03-28 07:57:14 -03:00
Jehan
aca680a1b1 Release GIMP 3.2.2. 2026-03-28 09:20:30 +01:00
Jehan
4c085b947f build: update Snapcraft. 2026-03-28 09:19:07 +01:00
Jehan
160bb39912 NEWS: update. 2026-03-28 08:19:59 +01:00
Jehan
fff91c4ce7 desktop: let's release GIMP 3.2.2 today. 2026-03-28 08:14:11 +01:00
Alx Sa
2f7b49dfea plug-ins: Change TIM texture indexed conversion
There are reports that clang-based compilers create
a TIM plug-in that crashes when exporting. This seems
related to the method used to convert RGB images to
indexed when choosing TIM textures with palettes on export.

This patch switches to using gimp-image-convert-indexed
instead, to prevent the format mismatch crash on initial export.
2026-03-28 05:56:29 +00:00
Alx Sa
43c57af5d7 libgimp:
Resolves #16102
The active selection can impact the other NDE filters
when exporting, resulting in empty spaces displayed when
the filter is outside the area of that selection.

Similar to what we do with XCF saving, we temporarily save
and clear the selection in the duplicated image. Then we
merge the filters and restore the active selection.
2026-03-28 05:09:31 +00:00
Bruno Lopes
e0e4285b73 meson: Fix shared-mime-info being wrongly required on Windows
This fixes a regression introduced by ac73289f
2026-03-27 21:14:15 -03:00
Bruno Lopes
566d562b4f build/windows: Wipe obsolete /twain dir from previous installs
Following cbc81507
2026-03-27 21:06:12 -03:00
Bruno Lopes
a0c065b02b build/windows: Update MSVC patch after gimprc and python updates 2026-03-27 20:39:15 -03:00
Bruno Lopes
807e21c6ab gitlab-ci: Try to fix needs: chain of Homebrew pipeline
Following ab0b0413

Another fix after the x64 builds (which we don't use with Homebrew)
2026-03-27 19:27:37 -03:00
Bruno Lopes
b3c40c7be1 build/linux: Enable "Send by email" on AppImage
Hmmm why this was not already enabled? On my tests, it works.
Don't remember why I have not handled this before.

This commit also reorder the xdg-mail position on macOS script.
2026-03-27 18:59:50 -03:00
Alx Sa
6369574261 dialogs: Make Metadata Rotation images clickable
This patch makes it so that you can click the preview for
Original and Rotated images in the Metadata Rotation Import Dialog,
and have it open the image rotated as shown in the preview.
This supplements the existing button options, and matches how other
software works.
When hovering over the images, the cursor turns into a pointer to
further suggest it is clickable.
2026-03-27 21:21:39 +00:00
Jehan
73b54f4b87 NEWS: update. 2026-03-27 22:13:27 +01:00
Jehan
9bf31a4d55 tools: don't load fcntl on platforms where it's unavailable.
In particular, on Windows, we get this error:

> ModuleNotFoundError: No module named 'fcntl'

But we don't care about this module there anyway. This is only for macOS
builds.
2026-03-27 22:08:14 +01:00
Bruno Lopes
ca20e2a341 build/linux: Add MIDI (ALSA) support to Snap package 2026-03-27 17:47:43 -03:00
Bruno Lopes
2c8548e111 build/linux: Update v3.4.7.tar.gz to 3.4.8
Synced from 138e9910a5
2026-03-27 17:08:59 -03:00
Aditya Tiwari
48e194532e app: show "Tab" accelerator label for windows-hide-docks
Tab was intentionally removed from the action entry to avoid overriding
its standard accessibility usage across the software, leaving the menu
item and shortcut editor showing no shortcut. This adds a cosmetic hint
in gimp_action_get_display_accels() to show 'Tab' without registering a
real accelerator.
2026-03-27 18:06:17 +01:00
Jehan
daff399b4d meson, INSTALL: also document the required version for PyGObject. 2026-03-27 17:39:44 +01:00
Jehan
91f78f58c4 meson: make error messages a bit more accurate on what was tested.
As a follow-up of the previous INSTALL update (complement for #16115).
2026-03-27 17:34:06 +01:00
Bruno Lopes
c039f82640 INSTALL: List Pycairo on required packages
Closes: https://gitlab.gnome.org/GNOME/gimp/-/issues/16115

Also know as python3-cairo or py-cairo, it is needed
to complete the Cairo override provided by 'gi' module.
See: #13105
2026-03-27 13:22:45 -03:00
Bruno Lopes
424f090100 meson: Do not warn about xdg-email on macOS
There is no such thing from Freedesktop for macOS. What we
use (at packaging phase) is an AppleScript by Alex Samorukov
at build/macos/patches/xdg-email.

So, makes no sense having that warning on macOS since such
custom script does not exist anywhere to be found at build-time.
2026-03-27 13:13:03 -03:00
Jehan
2012a9afc9 gimp-data: bump to remove now unneeded dependency chaining trick on macOS. 2026-03-27 17:08:55 +01:00
Jehan
a7e39c16b1 tools: lock the script so that it can only be run once at a time on macOS.
This will be an alternative way to fix #14236, without needing to have
every usage depend on another (which is messy and bug-prone because then
we have to follow the list of dependencies and see which was the last
use of gimp_exe, and with the risk of errors depending on which build
options are ON or OFF).

This fixes such errors:

> error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
> for: /Users/Shared/work/GNOME/gimp/_build-x86_64/plug-ins/common/test-plug-ins/film/film (for architecture x86_64)
> option "-add_rpath /Users/Shared/work/GNOME/gimp/_build-x86_64/libgimpcolor" would duplicate path, file already
> has LC_RPATH for: /Users/Shared/work/GNOME/gimp/_build-x86_64/libgimpcolor
2026-03-27 16:03:33 +00:00
Jehan
75eb99dca3 app: use build-time paths, not run-time ones for the gimprc man dump.
The problem especially occurs for our new build rule where we generate
the gimprc man page from within the build. In particular, it uses a
temporary config folder generated on the fly (with a random folder name)
and sets various environment variables such as GIMP3_SYSCONFDIR. So if
we use the runtime paths, our man page will be full of bogus paths.

In any case, for a man page, it just makes sense to use the real install
prefix. This of course assumes non-relocatable builds, and an
XDG-compliant installation (as it uses the $XDG_CONFIG_HOME variable),
but that was already what we were showing in the template man page, and
man pages are mostly for Linux, *BSD, etc. So that works fine.
2026-03-27 16:03:33 +00:00
Jehan
d2f6867064 tools: print both errors and informational messages to stderr.
This script is now also used for usage where we pipe directly the stdout
output to a file, e.g. now to create the gimprc man page. We don't want
to have INFO messages in there.
2026-03-27 16:03:33 +00:00
v4vansh
f3b14044e4 app/config: natively expand paths in gimprc manpage 2026-03-27 16:03:33 +00:00
v4vansh
fa097df908 app/config, docs: fix gimprc manpage regeneration 2026-03-27 16:03:33 +00:00
Bruno Lopes
ac73289f18 meson: Do not warn about pixbuf loaders.cache on native Windows builds
This is distracting, being only useful on crossbuilds.
Since many years, MSYS2 runs such command at install.
2026-03-27 12:46:30 -03:00
Bruno Lopes
9686f94f1d build/linux: Fix for pango/libthai test on Snap 2026-03-27 12:31:47 -03:00
Bruno Lopes
1437c84d07 plug-ins: Fix meson warning about missing check: kwarg 2026-03-27 09:53:03 -03:00
Frank Teklote
061a7eada2 file-psd: fix ordering of loaded Photoshop paths
Previously, paths from Photoshop TIFF files were appended via
gimp_image_insert_path(..., -1), which caused the displayed order to be
reversed. This change preserves the original ordering while keeping the
'Working Path' as the last element.
2026-03-27 11:57:50 +00:00
Bruno Lopes
6661004e5e build/macos: Remove 'source' bashism recently introduced on DMG script
As per 'meson-health' job advice
2026-03-27 06:41:59 -03:00
Bruno Lopes
8da8d9a478 build/macos: Use ds_store Python package on DMG creation
The pre-made .DS_Store(.tar.xz) got broken after version bumps.
2026-03-26 19:02:58 -03:00
Kristjan ESPERANTO
5046b0d3d5 Update Esperanto translation 2026-03-26 21:32:11 +00:00
Jehan
69359272a4 NEWS: update. 2026-03-26 17:31:48 +01:00
Alx Sa
ca5438c6da widgets: Prevent deleting temporary filters
Resolves #12791 (again)
After cleaning up and separating the filter pop-up code
from GimpItemTreeView to GimpDrawableTreeView-Filters,
we accidentally lost the checks that prevent deleting filters
that have not yet been applied (thus causing a crash).
This patch restores the checks for the filter to not be temporary
before you can delete it.
2026-03-26 15:26:10 +00:00
balooii
8bdb5cbfd7 app: Fix duplicating vector layers 2026-03-26 11:52:24 -03:00
Alx Sa
d1662f8f2c core: Stop double-resizing on Fit Canvas to Layers
Resolves #16018
This patch extends a2c5d70c to also apply to the
"Fit Canvas to Layers" action. It prevents the non-rasterized
vector layer from being shifted out of place when the
canvas is resized.
2026-03-26 05:44:27 +00:00
Alx Sa
a131100075 core: Prevent double-resizing on vector image crop
Resolves #16045
This patch extends a2c5d70c to also apply to the Crop Tool.
It prevents the non-rasterized vector layer from being shifted
out of place when cropped.
2026-03-26 05:02:52 +00:00
Bruno Lopes
45a764504e build/linux: Fix third-party plug-ins not finding babl extensions
Closes: #16038

This may be related to how our babl relocatable heuristics works
on Linux: depending on the process path, which is tricky on Snap,
specially for 3P plug-ins which have their own sandboxed processes.

Ideally, we should fix it on babl but this workaround if good enough.
2026-03-25 21:48:23 -03:00
balooii balooii
a2c5d70c92 core, path: Fix image transforms with vector layers
(Modified by CmykStudent from balooii's original merge request)
When performing image-level operations (resize, crop, scale, flip,
rotate, arbitrary transform), paths referenced by non-rasterized vector
layers were being transformed twice:

1. Via the vector layer's overrides, which explicitly transforms
   the referenced path to keep it in sync
2. Via the image-level queue that processes all paths independently

This patch adds a check for whether the layer has been rasterized.
If so, we bypass the vector layer's transform so the path is not
transformed a second time.
2026-03-25 20:29:17 -04:00
Jehan
80d11e2104 gitlab-ci: make so the CI works both with HEAD of babl and last release.
While we want to try with the last tagged release (babl 0.1.124), we
still need the CI to work with the latest code. So let's add one more
temporary fix.
2026-03-25 17:01:14 +01:00
Alx Sa
c3cbd5c21f core: Use selection when counting colors...
...in Histogram Editor.
The 2.10 Colorcube Analysis plug-in took into
account the selection when displaying the colors.
The Histogram Editor itself does as well, but our
unique color count did not.
This patch adds a check in gimp_histogram_unique_colors ()
to see if there's an active selection in the image.
If so, we get its area and use that as the bounds in
gegl_buffer_iterator_new () instead of setting it to NULL.
2026-03-25 12:43:00 +00:00
Anders Jonsson
aed086ecfa Update Swedish translation 2026-03-25 12:36:41 +00:00
Bruno Lopes
4ad7e7bdd3 build/windows: Set new expire date for CLIENT_SECRET 2026-03-25 09:11:04 -03:00
Anders Jonsson
5575a0f6e1 Update Swedish translation 2026-03-25 11:46:56 +00:00
Alx Sa
f52ae69532 plug-ins: Small code style updates to prior commit 2026-03-25 03:29:55 +00:00
Frank Teklote
0de2a56176 file-psd: scan 'ImageSourceData' for 'Layr' block before parsing layers
When loading layer metadata from TIFF 'ImageSourceData' Tag, don't assume
'Layr' is the first 8BIM block. Iterate over 8BIM/MIB8 blocks, skip non
'Layr' blocks, and rewind 4 bytes before calling read_layer_block() so it
can read the length field as expected. Limit mask_layer_len to the
selected block (including padding).
2026-03-24 23:52:50 +00:00
Bruno Lopes
01268d9f5e build/macos: Avoid unexpected ports upgrades
We need to add this condition otherwise ports would
be updated on gimp job causing disparity with deps job.
2026-03-24 20:51:23 -03:00
Bruno Lopes
9ac87044ad gitlab-ci: Bump some timeouts to 240min for consistency 2026-03-24 20:48:06 -03:00
Bruno Lopes
d5e51bd464 gitlab-ci: Bump some timeouts to 40min
This is specially needed for the Snap builds.
2026-03-24 20:46:25 -03:00
Bruno Lopes
4a0d99872a gitlab-ci: Change deps artifacts expire_in to 4 hours
This is specially needed for the macOS builds.
2026-03-24 20:23:47 -03:00
Jehan
8d9a05b8bf gitlab-ci, build: temporarily revert the -Drelocatable-bundle option…
… rename for babl.

As we are doing test build for the release, we are in this in-between
situation where GEGL has the newly named option, but not babl (because
we don't have a new babl release).
I don't know if we'll have a babl release by the time we'll get GIMP
3.2.2 out, but for now, let's use the old option name.

This commit will have to be reverted later, after we release.
2026-03-24 22:11:43 +01:00
Alx Sa
3f17f528d1 plug-ins: Load more multichannel PSD channels
Multichannel PSD images reuse their first channel as the
main grayscale "layer". Our PSD plug-in did not take this
into account, resulting in the channels being off-by-one and
mislabeled.

This patch prevents chn_a[0].data from being freed after
it is used to load the layer, and then resets the counts so that
it is reused as the first imported channel.
2026-03-24 20:58:29 +00:00
Jehan
7436b8dcbd build: prepare Snapcraft for the 3.2.2 release. 2026-03-24 21:28:12 +01:00
Anders Jonsson
76eaccc7b6 Update Swedish translation 2026-03-24 20:21:18 +00:00
Jehan
112276d8c8 desktop: adding AppStream metadata for GIMP 3.2.2. 2026-03-24 21:09:57 +01:00
Jehan
7f67536f1a Issue #16010: do not mind buffers with non-0 offsets in the case of group layers.
In fact, the previous commit was unneeded and we could have done without
reverting the old commit. On the other hand, a buffer using another
buffer as "source" may be nicer in memory.

But the previous commit alone was not right as group boundaries were
wrong. In fact, right now, we can see that group boundaries are computed
using only the children layers (except for pass-through of course), not
including any effects they might have. And the buffer passed to
gimp_drawable_set_buffer_full() was the projection's buffer itself — it
was shared, which was also why copying at setting time was wrong —, in
the case of a group layer. That means that when we translated to (0, 0)
offset, either we would have moved the render to the wrong place, or
moved the boundaries to the wrong place.
The offset needs to stay what it is, even when it's not (0, 0), for
group layers.

Another alternative fix would be instead to fix layer groups' boundaries
to encompass the full projection's render. But I just went with this
special-casing of group layers instead.
2026-03-24 20:41:53 +01:00
Jehan
af44043108 Issue #16010: adding a layer with filter to a group makes it invisible.
Part of it reverts commit 3a53e4743e.
Another part is a fix to the CRITICAL mentioned in this commit.

This being said, it's clearly not entirely right yet. The boundaries of
the layer when the filter is merged are not correct, which is especially
visible when trying to draw on this layer afterwards.
Also the layer group boundaries (when reproducing the steps in #16010)
are clearly wrong too.
2026-03-24 20:37:00 +01:00
Jehan
78de1080ce libgimpbase: fix leak from commit 2f76be13cb. 2026-03-24 20:20:34 +01:00
Jehan
63a57d68cb NEWS: update. 2026-03-24 20:20:34 +01:00
Bruno Lopes
3a90c48d6e build/macos: Try to fix MacPorts packages not being upgraded 2026-03-24 15:12:08 -03:00
Bruno Lopes
54e3a9777d build/linux: Update v0.3.31.tar.gz to 0.3.32
Synced from 1fc57c7b1e
2026-03-24 13:59:43 -03:00
Ondřej Míchal
2f76be13cb libgimpbase: Correctly free duplicate nicks in GimpChoice
A crash could happen when a duplicate nick was found due to incorrectly
freeing the content of 'choice->keys' which holds the nicks and not
GimpChoiceDesc. Instead, the nick needs to be simply freed.
2026-03-24 18:14:14 +02:00
Bruno Lopes
06d8bd6c54 build/windows: Do not allow cancelling itReinstall nor itUpdate
As said on cbe2f6be, Inno does not support modifying installations at
all, not even canceling/undoing modifications like reinstall and update.

This limitation become more apparent after the fix 24e42dd1 so
let's prevent the users being damaged by such major Inno pitfall.
2026-03-24 10:00:23 -03:00
Bruno Lopes
cbc8150749 build/windows: Wipe obsolete /32 dir from previous installs
Following 3d026f3d
2026-03-24 08:25:51 -03:00
Bruno Lopes
24e42dd1fc build/windows: Wipe versioned dep files on upgrades from Installer
Closes #16087
2026-03-24 07:14:00 -03:00
Bruno Lopes
aba2a9b852 meson, tools: Add check for GDB when debug-self-in-build option is set 2026-03-24 06:58:30 -03:00
luming zh
21721eafa3 Update Chinese (China) translation 2026-03-24 03:33:43 +00:00
Марко Костић
1b9a3fcfb1 Update Serbian translation 2026-03-23 23:36:43 +00:00
Martin
ef0a9822be Update Slovenian translation 2026-03-23 23:30:11 +00:00
Bruno Lopes
ab0b041321 gitlab-ci: Fix typo on Homebrew rule 2026-03-23 18:05:25 -03:00
Bruno Lopes
e75d758712 build/windows: Ops, forgot about -ErrorAction SilentlyContinue 2026-03-23 16:14:29 -03:00
Bruno Lopes
a791238394 build/windows: Evaluate inno_version to the highest versioned Inno
Following 37dd5755
2026-03-23 16:02:26 -03:00
Yuri Chornoivan
f96b5f18d7 Update Ukrainian translation 2026-03-23 16:41:18 +00:00
Alx Sa
680ebede22 plug-ins: Read full channel data for PSP selection
968cf06a only loaded the rectangle area that the
selection was contained in, rather than the actual
channel data. This patch extended the code to
also read in the PSP_CHANNEL_BLOCK data, add
it to the selection GeglBuffer, and then shift it over
into the correct location.
2026-03-23 15:07:33 +00:00
Yuri Chornoivan
fdeb87946f Update Ukrainian translation 2026-03-23 12:55:20 +00:00
Bruno Lopes
1d4b1e098b app: Add support to installing gimp-help on GIMP*_DIRECTORY
See: https://gitlab.gnome.org/GNOME/gimp-help/-/issues/553

This is needed for some read-only packages.
2026-03-22 22:20:18 -03:00
Bruno Lopes
0c6711a646 build/windows: Avoid bundling build-time libLLVM*.dll
That shared library is giant and not needed at runtime.
2026-03-22 21:30:21 -03:00
luming zh
a2e19a8411 Update Chinese (China) translation 2026-03-23 00:28:15 +00:00
Anders Jonsson
a62aeb3012 Update Swedish translation 2026-03-22 21:18:25 +00:00
Bruno Lopes
89be7ef6c7 build/windows: Fix deleted line by accident 2026-03-22 16:59:43 -03:00
Bruno Lopes
4f76429885 tools: Fix GIMP_PYTHON_WITH_GI breaking cross-building
Closes: https://gitlab.gnome.org/GNOME/gimp/-/issues/16085
2026-03-22 16:32:38 -03:00
Bruno Lopes
3b5056e392 build/windows: Cosmetic changes for some arch lines on .iss
This also fixes a warning from Inno.
2026-03-22 16:30:45 -03:00
Bruno Lopes
077be60a6a build/windows: FileCopy is now CopyFile on Inno 2026-03-22 16:24:38 -03:00
Bruno Lopes
a506b72186 build/windows: IsComponentSelected is now WizardIsComponentSelected on Inno 2026-03-22 16:21:03 -03:00
Bruno Lopes
9a95de2cce build/windows: Remove some unused variables as per Inno warnings 2026-03-22 16:19:05 -03:00
Bruno Lopes
59b6e92878 build/windows: Evaluate INNO_PATH to the highest versioned Inno
This way, the script will not break when Inno Setup 7.0.0 is released.

Commited again due to 44b52efb3e
2026-03-22 15:51:59 -03:00
Bruno Lopes
44b52efb3e Revert "build/windows: Evaluate INNO_PATH to the highest versioned Inno"
This reverts commit 37dd5755aa.

I think the line breaking or other thing changed. This is wrong.
2026-03-22 15:50:14 -03:00
Bruno Lopes
37dd5755aa build/windows: Evaluate INNO_PATH to the highest versioned Inno
This way, the script will not break when Inno Setup 7.0.0 is released.
2026-03-22 15:35:33 -03:00
Jiri Grönroos
2c632ce957 Update Finnish translation 2026-03-22 15:30:55 +00:00
Jiri Grönroos
279bf03839 Update Finnish translation 2026-03-22 15:06:14 +00:00
Bruno Lopes
b697dc8a48 app: Fix critical at user_install_detect_old on distro and Flatpak packages
Closes: #16067

This fixes a regression introduced by 62467359
2026-03-22 08:17:15 -03:00
Alx Sa
7f39ea1fa9 path: Conditionally scale imported paths
The Path Import dialog has an option to choose whether
the imported paths scale to match the dimensions of the
image or not. While this variable guards scaling the paths
themselves, it did not prevent the viewbox from being scaled
Thus, the paths always appeared to be scaled.

This patch adds a check for the scale parameter in parse_svg_viewbox ()
and conditionally scales the viewbox based on user input.
2026-03-22 01:51:21 +00:00
Bruno Lopes
a4fd6a6298 build/macos: Remove didatic README
Now the in-house macOS builds are so pristine that
does not make sense to link to the legacy CircleCI.
2026-03-21 21:48:24 -03:00
Bruno Lopes
8c3a9dd4a8 gitlab-ci, build: Add x64 macOS builds with Rosetta emulation
See: https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/2166
2026-03-21 21:46:35 -03:00
Bruno Lopes
cb9e1c9ac1 devel-docs: List build/macos/Info.plist on os-support 2026-03-21 21:44:36 -03:00
Bruno Lopes
6a35db6ec2 build/macos, libgimpbase: Support both in-house and CircleCI relocatable bundles
This was the last patch. Now, GIMP can finally be built without patches on Mac.
2026-03-21 21:39:42 -03:00
Bruno Lopes
16fc8d6306 gitlab-ci, build: Add comments about Meson weak .pc relocatability support
This limitation was already documented on Windows but
not on other platforms affected yet. Let's just paste it.
2026-03-21 20:50:29 -03:00
Bruno Lopes
f677365c72 build/windows: Conform installer .iss to Coding Style by removing tabs
It have been so annoying to check the commit diff on GitLab and
noticing that it is widely different from the one on the IDE.

After all, there is a reason for the Coding Style prohibiting tabs...
2026-03-21 20:44:58 -03:00
Martin
e1e7df2951 Update Slovenian translation 2026-03-21 21:32:02 +00:00
Bruno Lopes
85044d78d1 app, build/macos: Move PYTHONHOME logic from .patch to core code
This was tested with both in-house MacPorts, in-house HomeBrew and
legacy CircleCI builds and I confirmed it works (it is needed only
by the in-house MacPorts builds).
2026-03-21 17:34:30 -03:00
Bruno Lopes
9231db6473 build/windows: Update MSVC patch after new python detection 2026-03-21 15:03:15 -03:00
Alx Sa
51f1de8844 plug-ins: Add bounds checks to JIF loading
Resolves #16076
As reported by chamal, it is possible to craft a
Jeff's Image Format image with header values that
are larger than the file size. This can lead to buffer
overflows when loading the data. This patch adds
bounding checks based on the size of the stream.
2026-03-21 17:33:39 +00:00
Bruno Lopes
9db6c35ac5 build/windows: Fix installer one-arch support (for forks) after .iss unification
This fixes a regression introduced by a19ef562
2026-03-21 13:11:37 -03:00
Bruno Lopes
7a928ee3ed meson: Ensure unversioned python is properly found on Windows 2026-03-21 13:11:37 -03:00
Alx Sa
ccb3cc3ae8 plug-ins: Add bounds check for SFW plug-in
Resolves #16075
As noted by chamal, it is possible to cause a buffer overflow
in a crafted SFW file. This patch adds bounds checks to prevent
this from occurring.
2026-03-21 15:57:01 +00:00
Bruno Lopes
e14f1d7f0b build/linux: Update graphviz-14.1.3.tar.gz to 14.1.4
Synced from a042ca0c4f
2026-03-21 11:51:25 -03:00
Bruno Lopes
9ba96014bc build/windows: Bump custom exiv2 build to 0.28.8 after MSYS2 gexiv2 rebuild
See:  21895406db

Due to gexiv2 rebuilding it now links to exiv2 0.28.8 released recently.
As a result, gimp-console started to fail with Windows error 3221226505 at
splash image generation, because exiv2 from msys2 don't have our workaround.
Let's fix by bumping our custom build so gexiv2 can find it properly.
2026-03-21 11:26:22 -03:00
Марко Костић
047ab24186 Update Serbian translation 2026-03-21 11:56:57 +00:00
Bruno Lopes
e453dac63b tools: Forgot to exclude Windows from a section 2026-03-21 07:37:48 -03:00
Bruno Lopes
8427c76467 build/linux: Update openexr and ghostscript modules
Synced from e1e6d5270b
2026-03-20 23:01:51 -03:00
Bruno Lopes
e83eef67a9 tools: Ensure python3 in-build symlinking does not run on Windows 2026-03-20 22:56:31 -03:00
Bruno Lopes
92a860d5c9 app, meson: Make python check more robust to work with MacPorts etc
Partially reverts 9be1af2b

See the context: https://gitlab.gnome.org/Infrastructure/gimp-macos-build/-/merge_requests/408#note_2642419
2026-03-20 22:56:31 -03:00
Alx Sa
7612363d8c plug-ins: Clean up PVR import
Resolves #16058

Per mzfr's observations, this patch adds more
safeguards to PVR import. Memory for data and pixels
is allocated and checked rather than using arrays.
Twiddled patterns are increased to 2048 and we
verify the dimensions are in that range before trying
to access. If users share an image that is larger than
that, we can increase this limit further.
2026-03-20 23:33:19 +00:00
Martin
5f5f6fd055 Update Slovenian translation 2026-03-20 17:22:39 +00:00
Bruno Lopes
6d28b4852a build/windows: Do not change CWD while making the installer
Thanks to the various improvements, the .iss script does not rely on
CWD or relative paths anymore. Let's clean up things.
2026-03-20 12:42:26 -03:00
Bruno Lopes
c44c0dacde build/windows: Add Serbian Cyrillic code to meson.build
Following 5251f29b
2026-03-20 11:21:59 -03:00
Alx Sa
3264a67112 plug-ins: Clean up ICNS file loading
Resolves #16056
Per mzfr, we should check if the cursor exceeds the
icon total size in icns_slurp () (per OSX icons) as we
do already in icns_decompress ().

Additionally, we were not deleting the temp_image created
to load each icon, and in fact we were making an unnecessary
blank temp_image before receiving the one from the PNG &
JPEG2000 procedures. This patch fixes both problems.
2026-03-20 14:10:15 +00:00
Bruno Lopes
5251f29b55 build/windows: Add Serbian Cyrillic inno_code to iso_639_custom.xml
Following 5af6e7d2
2026-03-20 09:32:26 -03:00
Alx Sa
bb3bf0ae5b plug-ins: Allocate memory in PAA plug-in
Per mzfr, we should dynamically allocate memory
for the PAA plug-in pixel data rather than rely on the image
being small enough for an array to store its information.
2026-03-20 12:24:47 +00:00
Mateusz Jastrząb
34f980108d Update Polish translation 2026-03-20 11:59:40 +00:00
Bruno Lopes
dd5349a9f5 app, build: Use gimp_installation_directory() on macOS wrapper
It is more packaging-agnostic than the previous hardcoded code.
I confirmed it works with both in-house and CircleCI builds.
2026-03-19 21:06:40 -03:00
Martin
2c2f9216bd Update Slovenian translation 2026-03-19 22:18:19 +00:00
Martin
a7032e8e05 Update Slovenian translation 2026-03-19 22:12:54 +00:00
Bruno Lopes
91b840f557 build/macos: Remove uneded GIMP3_ vars set after symlinks
Following 2cbfad8e
2026-03-19 13:28:48 -03:00
Alx Sa
b6d43ec0fe plug-ins: Allocate more space for 4bpp TIM textures
Resolves #16052
Per mzfr, the pixel array for 4bpp TIM textures needs to
be allocated twice as large since each byte in the file
stores two pixel indexes when opened.
2026-03-19 12:39:06 +00:00
Alx Sa
e0bd82f290 plug-ins: Protect against too-large FITS images
Resolves #16051
As reported by mzfr, it is possible to crash the FITS plug-in
if a large enough image is read in. This patch implements their
suggestions of using g_try_malloc () over malloc () (and checking
if it returns NULL), as well as verifying the width & height are
within GIMP's image range.
2026-03-19 12:05:47 +00:00
Ekaterine Papava
2557d6a178 Update Georgian translation 2026-03-19 08:10:17 +00:00
Alx Sa
337cfb6a31 plug-ins: Remove unneeded gegl_buffer_iterator_add()
Resolves #5553
As noted by Massimo, in the Sparkle plug-in there is an
extra gegl_buffer_iterator_add () that is not used in the following
gegl_buffer_iterator_next (iter) loop. Since this adds dest_buffer
which is also written to in the loop in the fspike () functions,
it can cause data to be overwritten. This patch removes the
unneeded extra function call.
2026-03-19 04:07:58 +00:00
luming zh
f4d71a874a Update Chinese (China) translation 2026-03-19 02:55:53 +00:00
luming zh
4ca657e728 Update Chinese (China) translation 2026-03-19 02:45:38 +00:00
Alx Sa
5b5a39390a libgimp: Connect ResourceChooser mnemonics to button
While it's possible to set mnemonics on GimpResourceChooser
properties (brushes, gradients, palettes, etc), the accelerator
itself wouldn't work because the label wasn't connected to the
button widget.
The buttons are created externally and connected in
_gimp_resource_chooser_set_clickable (). This patch adds a call
to gtk_label_set_mnemonic_widget () if there is a label, so that
pressing the accelerator key on the label triggers the button
click function.
2026-03-18 23:49:46 +00:00
Bruno Lopes
db36fa3371 gitlab-ci: Remove a remnant of the legacy 32-bit job
This completes 0a8e21c4
2026-03-18 20:27:20 -03:00
Jehan
040fac494e app: do not leak string allocated by g_ascii_strdown(). 2026-03-18 23:36:56 +01:00
Jehan
f4f83b973c app: SwatchBooker support also uses libarchive and has similar bugs! 2026-03-18 23:11:20 +01:00
Jehan
b3eaf3a577 app: better handle error cases for invalid Swatches palette.
My use case was loading a 0-bytes swatches palette. This would crash
GIMP. And so would likely a zip archive suffixed .swatches with no .json
file in it, or a corrupted archive which would return ARCHIVE_FATAL when
attempting to read entries…

This patch fixes these edge cases. It also better handle the various
return values of libarchive. E.g. we should not abandon reading when we
get ARCHIVE_RETRY; and ARCHIVE_WARN is also a success case (despite
having some warning message).

Finally I break from the archive reading loop at the first JSON file, so
that we don't leak memory if there are several JSON file. It does raise
the question if this palette format allows such use case (several
palettes in a single .swatches archive).
2026-03-18 22:41:14 +01:00
Jehan
591518fdb1 app: fix failure to read a Procreate palette with no profiles.
The sample in the description of !2613 was failing to load with a bunch
of criticals. That was because when profiles == NULL, we would call
json_reader_end_member() while we never called the associated
json_reader_read_member(). Inverting the order of tests fix this.
2026-03-18 22:32:31 +01:00
Bruno Lopes
a00a227f54 plug-ins: Comment some unused functions on file-dds
To fix GNU Clang warnings
2026-03-18 18:04:11 -03:00
Bruno Lopes
23a17ee000 plug-ins: Comment unused function on sphere-designer
This fixes a warning from GNU CLang
2026-03-18 18:04:11 -03:00
Bruno Lopes
487ee4f5da plug-ins: Clean unused srcrow and src_bytes variables on warp
It was causing warnings on GNU CLang
2026-03-18 18:04:11 -03:00
Марко Костић
653d61e1cb Update Serbian translation 2026-03-18 20:56:33 +00:00
Марко Костић
7664cc7590 Update Serbian translation 2026-03-18 20:48:54 +00:00
Марко Костић
5ef15ef576 Update Serbian translation 2026-03-18 20:42:07 +00:00
Марко Костић
a08411f1ba Update Serbian translation 2026-03-18 20:29:53 +00:00
Марко Костић
5af6e7d249 Add Serbian translation 2026-03-18 20:02:31 +00:00
Марко Костић
ffb275bf2a Update Serbian translation 2026-03-18 19:49:48 +00:00
Yuri Chornoivan
625106a974 Update Ukrainian translation 2026-03-18 18:52:28 +00:00
Марко Костић
0454a81d23 Update Serbian translation 2026-03-18 18:52:13 +00:00
Yuri Chornoivan
20419baf21 Update Ukrainian translation 2026-03-18 18:44:54 +00:00
Yuri Chornoivan
70ae6af83b Update Ukrainian translation 2026-03-18 18:32:49 +00:00
Jehan
fdda75deb8 app: localize some more strings.
Also give a bit more accurate error message when possible, e.g. when we
may have an error message from libarchive.
2026-03-18 17:57:23 +01:00
Jehan
85ad553b09 plug-ins: localize a string. 2026-03-18 17:18:08 +01:00
Jehan
c837fda1e4 app: localize some error messages.
Also use the proper and more common wording "circular reference".
2026-03-18 17:17:13 +01:00
Jehan
b822a56d10 app: localize "Pressure Curve" instead of breaking into 2 words.
Much easier to localize, and it's actually our only case for input
device axis curve so far. Let's simplify.
2026-03-18 16:34:55 +01:00
Martin
ad30eff447 Update Slovenian translation 2026-03-18 13:06:28 +00:00
luming zh
b1d5bad01a Update Chinese (China) translation 2026-03-18 08:47:27 +00:00
luming zh
d574292d68 Update Chinese (China) translation 2026-03-18 08:29:56 +00:00
Alx Sa
1d6e8a3a9c display: Simplify vector code from 916cf84e
This patch updates the vector layer DnD code to
use gimp_vector_layer_set (), instead of grabbing
the VectorLayerOptions and then FillOptions objects.
2026-03-18 02:48:56 +00:00
Alx Sa
7b09835370 themes: Define GimpColorSelect button margin
Another addition to 9e277c39. The buttons in the
Color dock had incorrect margins, leading to some
buttons sticking out further than others.
This patch gives them a consistent definition of 2px
margins for both Default and System themes.
2026-03-18 02:15:46 +00:00
Bruno Lopes
71c3f29df8 plug-ins: Fix warnings about unused profile_label and cmyk_profile in file-jp2 2026-03-17 22:30:47 -03:00
Bruno Lopes
375bdd7946 build/windows: Fail on warnings on Clang-CL builds for gegl sake
Following 5013aca0

We stll have work to do regarding ctx support but
we are getting there.
2026-03-17 22:23:49 -03:00
Alx Sa
eec9d51236 widgets: Sync filter visibility with toggle button
Resolves #16002

Since the "Toggle All Filter Visibility" button's state
is only updated when the NDE filter popover first
appears, it could get out of sync with the current state
of the filter stack.
(For instance, if you open the popover and turn all the
filters' visibility off, then clicked the button, it would try
to turn them off again)

This patch adds a check for gimp_drawable_has_visible_filters ()
whenever the filter changes, and updates the toggle button
with that value.

This patch also condenses the filter visibility check to use
the existing function rather than its own custom code.
2026-03-18 01:11:18 +00:00
balooii balooii
4026ec4828 Issue #15328: Fix crash with smudge tool and auto expand layers 2026-03-17 22:18:53 +00:00
Sabri Ünal
3a60f800d4 i18n: Mark "Mask image" as translatable
Mark the "Mask image" string as translatable.
2026-03-17 19:10:33 -03:00
Bruno Lopes
50627a445c meson: Restore virtual support to install .pdb generated by GCC
We will not use it since GCC is still broken (59d0e828)
but it is always good to have a complete script.
2026-03-17 18:59:18 -03:00
Yuri Chornoivan
0c49b92da9 Update Ukrainian translation 2026-03-17 21:12:26 +00:00
Martin
be32a75ee9 Update Slovenian translation 2026-03-17 20:02:49 +00:00
Jehan
9a7ec09dab gitlab-ci, build: -Drelocatable renamed as -Drelocatable-bundle and…
… changed into a combo in babl and GEGL.
2026-03-17 20:51:25 +01:00
Alx Sa
ff647fccb0 path, core: Create gimp_vector_layer_set ()
Currently to change vector layer properties,
you need to grab the VectorLayerOptions
and then grab its FillOptions or the
StrokeOptions to make changes.
To make this process more self-contained,
this patch creates a gimp_vector_layer_set ()
function that operates in the same manner
as gimp_text_layer_set (). 
This patch adds properties for Fill -
Stroke properties will be added in a
follow-up commit.
This also adds
automatic tracking for Undoing/Redoing
vector property settings.
A demonstration of its use in DnD colors
and patterns onto the layer dock is
included.
2026-03-17 19:32:51 +00:00
Bruno Lopes
59d0e82850 Partially revert "Reenable .pdb building on GCC (for MINGW64/UCRT64 sake)"
This partially reverts b705bfb660

.pdb building is still broken on GCC (not on babl anymore but
while building script-fu).
2026-03-17 16:26:31 -03:00
Jehan
27af187e02 NEWS: switch to the 3.2 stable branch and archive the older NEWS file. 2026-03-17 18:18:04 +01:00
Bruno Lopes
6ec98fac00 tools: Support GNU objdump (from MSYS2) on defcheck.py 2026-03-17 12:56:34 -03:00
Rodrigo Lledó
a03ccc91da Update Spanish translation 2026-03-17 15:11:55 +00:00
Bruno Lopes
b705bfb660 build, meson: Reenable .pdb building on GCC (for MINGW64/UCRT64 sake) 2026-03-17 09:56:20 -03:00
Bruno Lopes
a19ef56214 build: Unify .isi modules into just one (giant) .isi
This is way easier to maintain to me, who have been
doing the installer work from some years 90% alone.
2026-03-17 09:56:20 -03:00
Bruno Lopes
7ff91e9a8d build: Do not ship 32-bit binaries for native installation on Installer 2026-03-17 09:56:20 -03:00
Bruno Lopes
3d026f3d14 build: Remove Wintel support from the .exe installer
It was only used for TWAIN, which we do not distribute anymore.

(Emulation binaries were already not on the MSIX since its first version).
2026-03-17 09:56:20 -03:00
Bruno Lopes
3fef9e5dc6 meson, app: Remove Wintel emulation layer after TWAIN disabling
Since we will not distribute 32-bit TWAIN with the intaller anymore,
GIMP is now architecture-native on Windows like on Linux and macOS,
so there is no use for WoW64 emulation on native 64-bit installations.

Users that need to use TWAIN can build GIMP on MINGW32 shell,
using -Dtwain-unmaintained=true build option at meson setup.
2026-03-17 09:56:20 -03:00
Bruno Lopes
9fb127f684 meson: Add explicit build option to build 32-bit TWAIN
It is long-time unmaintained on our repo, with no issues being fixed. Now that
32-bit binaries are not distributed, we can safely move to unmaintained section.
2026-03-17 09:56:20 -03:00
Bruno Lopes
2319bbe689 build/windows: Remove special-casing for MINGW32 on deps and bundling script
This also removes the special case for 'perl' since it
is available on CLANG64 and CLANGARM64.
2026-03-17 09:56:20 -03:00
Bruno Lopes
0a8e21c4b1 gitlab-ci: Remove 32-bit special pipeline 2026-03-17 09:56:20 -03:00
Aleksandr Prokudin
fb3e10f3a5 Fix Russian translation 2026-03-16 13:45:25 +01:00
Alx Sa
60d3caa2e2 plug-ins: Copy profile with Tile plug-in
If the user chooses to make a new image when
running the Tile plug-in, the color profile is not
carried over. This can result in the tiled image
looking different. This patch adds calls to
gimp_image_get_color_profile () and
gimp_image_set_color_profile () to ensure the
profile is carried over.
2026-03-15 23:13:14 +00:00
Alfred Wingate
2185168536 tools: include error message to ease debugging
Signed-off-by: Alfred Wingate <parona@protonmail.com>
2026-03-15 18:24:30 -03:00
Alfred Wingate
4828b2d3f7 tools: allow use of NM env variable
Bug: https://bugs.gentoo.org/968162
Signed-off-by: Alfred Wingate <parona@protonmail.com>
2026-03-15 18:24:30 -03:00
Jiri Grönroos
8184f55c54 Update Finnish translation 2026-03-15 20:46:28 +00:00
Jiri Grönroos
79f4d4ab0f Update Finnish translation 2026-03-15 20:27:27 +00:00
Jiri Grönroos
06ae3fd5f1 Update Finnish translation 2026-03-15 20:16:45 +00:00
Jiri Grönroos
ab05373a76 Update Finnish translation 2026-03-15 20:07:11 +00:00
Jiri Grönroos
58ee4f3c97 Update Finnish translation 2026-03-15 19:56:21 +00:00
Jiri Grönroos
2df481de31 Update Finnish translation 2026-03-15 19:36:07 +00:00
Anders Jonsson
a057c2340b themes: Define radio ButtonBox margin-right on System theme
Adding onto 8be2c6c00e. The buttons still had varying width
when using System theme.
2026-03-15 18:41:06 +01:00
Alx Sa
81cdda873d path: Don't transform rasterized vector layers...
...as vectors
Resolves #15997

For vector layers, we transform either the path
or the layer pixels depending on whether it is
rasterized or not. However, the check for this had
not been updated to account for the new
GimpRasterizable interface, so it did not work
properly.

This patch updates the check to use
gimp_item_is_vector_layer () instead of just
checking if the path exists, as this function
also verifies it hasn't been rasterized yet.
2026-03-15 01:40:32 +00:00
Jehan
82b327db47 Revert "Temporary revert just to fix the Windows installer for the 3.2.0 series."
This reverts commit ec5ddde643.

Gets back to post-release version, GIMP 3.2.1.
2026-03-14 19:52:40 +01:00
312 changed files with 117129 additions and 115158 deletions

View file

@ -131,7 +131,7 @@ stages:
- <<: *CI_RELEASE
before_script:
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install-${RUNNER}"
timeout: 30m
timeout: 40m
.debian_environ: &ENVIRON
# See: https://testing.developer.gimp.org/core/setup/build/#preparing-for-building
@ -161,25 +161,25 @@ deps-debian-nonreloc:
# Install deps
- echo "FROM debian:${DEB_VERSION}" > Dockerfile
- echo "WORKDIR $CI_PROJECT_DIR" >> Dockerfile
## 'ca-certificates' is NOT a gimp dep, it is installed only to our Docker image work
- echo "RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends ca-certificates \\" >> Dockerfile
## 'ca-certificates' and 'git' are NOT gimp deps, they are installed only to our Docker image work
- echo "RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends ca-certificates git \\" >> Dockerfile
## Build-time only dependencies
- echo "${TOOLCHAIN:-build-essential}
appstream
bison
desktop-file-utils
flex
gettext
gi-docgen
git
gobject-introspection
libgtk-3-bin
locales
meson
valac
xsltproc \\" >> Dockerfile
## Runtime dependencies
- echo "at-spi2-core
ffmpeg
gettext
gjs
glib-networking
graphviz
@ -214,19 +214,19 @@ deps-debian-nonreloc:
libqoi-dev
librsvg2-dev
libsuitesparse-dev
libtiff-dev
$UMFPACK
libtiff-dev
libunwind-dev
libwebp-dev
libwmf-dev
libxmu-dev
libxpm-dev
locales
mypaint-brushes
poppler-data
python3
python3-gi
python3-gi-cairo" >> Dockerfile
python3-gi-cairo
xdg-utils" >> Dockerfile
- echo "RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen" >> Dockerfile
# Prepare environ
- echo "FROM $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}" > Dockerfile2;
@ -245,7 +245,9 @@ deps-debian-nonreloc:
## Build babl
- echo "RUN printf \"\e[0Ksection_start:\`date +%s\`:babl_build[collapsed=true]\r\e[0KBuilding babl\n\"" >> Dockerfile2;
- echo "RUN git clone --branch \"\$([ \"$CI_COMMIT_TAG\" ] && echo \"\$(git ls-remote --tags --exit-code --refs https://gitlab.gnome.org/GNOME/babl.git | grep -oi \"BABL_[0-9]*_[0-9]*_[0-9]*\" | sort --version-sort | tail -1)\" || echo \"master\")\" --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git" babl >> Dockerfile2;
- echo "RUN meson setup babl/_build-${RUNNER} babl -Dprefix=\"${GIMP_PREFIX}\" $RELOCATABLE_OPTION $PKGCONF_RELOCATABLE_OPTION $WARN_AS_ERROR_ON_CI" >> Dockerfile2;
# TODO: remove this line once we have a babl 0.1.126. Takes care of an option name change.
- export BABL_RELOCATABLE_OPTION=$(([ $CI_COMMIT_TAG ] && (([ $RELOCATABLE_OPTION ] && echo -Drelocatable=enabled) || true)) || echo $RELOCATABLE_OPTION)
- echo "RUN meson setup babl/_build-${RUNNER} babl -Dprefix=\"${GIMP_PREFIX}\" $BABL_RELOCATABLE_OPTION $PKGCONF_RELOCATABLE_OPTION $WARN_AS_ERROR_ON_CI" >> Dockerfile2;
- echo "RUN ninja -C babl/_build-${RUNNER}" >> Dockerfile2;
- echo "RUN ninja -C babl/_build-${RUNNER} install" >> Dockerfile2;
- echo "RUN printf \"\e[0Ksection_end:\`date +%s\`:babl_build\r\e[0K\n\"" >> Dockerfile2;
@ -269,7 +271,7 @@ deps-debian-nonreloc:
- babl/_build-${RUNNER}/config.h
- gegl/_build-${RUNNER}/meson-logs/meson-log.txt
- gegl/_build-${RUNNER}/config.h
expire_in: 2 hours
expire_in: 4 hours
gimp-debian-nonreloc:
extends: .debian-nonreloc
@ -283,7 +285,7 @@ gimp-debian-nonreloc:
- printf "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP\n"
- meson setup _build-${RUNNER} -Dprefix="${GIMP_PREFIX}"
-Dfile-plug-ins-test=true
$MESON_OPTIONS
$MESON_OPTIONS $WARN_AS_ERROR_ON_CI
- cd _build-${RUNNER}
- ninja
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
@ -342,7 +344,8 @@ deps-debian:
image: !reference [deps-debian-nonreloc, image]
variables:
GIT_STRATEGY: none
RELOCATABLE_OPTION: '-Drelocatable=enabled'
RELOCATABLE_OPTION: '-Drelocatable-bundle=yes'
#meson.build forces non-relocatable .pc. See: https://github.com/mesonbuild/meson/issues/14346
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
script:
- !reference [deps-debian-nonreloc, script]
@ -403,8 +406,8 @@ gimp-debian:
MESON_DIST: 0
before_script:
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install"
#30min is enough only if no module was updated/rebuilt, we need more time in case of module bumps
timeout: 90m
#40min is enough only if no module was updated/rebuilt, we need more time in case of module bumps
timeout: 240m
deps-flatpak:
extends: .flatpak
@ -417,7 +420,7 @@ deps-flatpak:
- flatpak-builder.log
- babl-meson-log.txt
- gegl-meson-log.txt
expire_in: 2 hours
expire_in: 4 hours
gimp-flatpak:
extends: .flatpak
@ -453,7 +456,7 @@ gimp-flatpak:
variables:
SNAPCRAFT_BASE_VERSION: "8_core24"
RUNNER: x86_64_v3
timeout: 30m
timeout: 40m
deps-snap:
extends: .snap
@ -491,7 +494,7 @@ deps-snap:
- _build-$RUNNER.tar
- babl-meson-log.tar
- gegl-meson-log.tar
expire_in: 2 hours
expire_in: 4 hours
gimp-snap:
extends: .snap
@ -526,7 +529,7 @@ gimp-snap:
interruptible: true
variables:
INSTALLER_OPTION: '-Dwindows-installer=true'
- if: '($CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/ || $CI_MERGE_REQUEST_DESCRIPTION =~ /.*Package:Microsoft Store.*/) && $CI_JOB_NAME !~ /.*eol.*/ && $CI_JOB_NAME !~ /.*installer.*/'
- if: '($CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/ || $CI_MERGE_REQUEST_DESCRIPTION =~ /.*Package:Microsoft Store.*/) && $CI_JOB_NAME !~ /.*installer.*/'
interruptible: true
variables:
STORE_OPTION: '-Dms-store=true'
@ -537,11 +540,12 @@ gimp-snap:
- if: '($GIMP_CI_WIN_INSTALLER != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_WIN_INSTALLER.*/) && $CI_JOB_NAME !~ /.*store.*/'
variables:
INSTALLER_OPTION: '-Dwindows-installer=true'
- if: '($GIMP_CI_MS_STORE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_MS_STORE.*/) && $CI_JOB_NAME !~ /.*eol.*/ && $CI_JOB_NAME !~ /.*installer.*/'
- if: '($GIMP_CI_MS_STORE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_MS_STORE.*/) && $CI_JOB_NAME !~ /.*installer.*/'
variables:
STORE_OPTION: '-Dms-store=true'
- if: '($GIMP_CI_MESON_MSVC != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_MSVC.*/) && $CI_JOB_NAME !~ /.*installer.*/ && $CI_JOB_NAME !~ /.*store.*/ && $CI_JOB_NAME !~ /.*eol.*/ && $CI_JOB_NAME !~ /.*aarch64.*/'
- if: '($GIMP_CI_MESON_MSVC != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_MSVC.*/) && $CI_JOB_NAME !~ /.*installer.*/ && $CI_JOB_NAME !~ /.*store.*/ && $CI_JOB_NAME !~ /.*aarch64.*/'
variables:
MSYS_ROOT: ""
VCPKG_ROOT: "$CI_PROJECT_DIR/vcpkg"
WARN_AS_ERROR_ON_CI: '-Dwerror=true'
VARIANT: "-msvc"
@ -562,23 +566,23 @@ gimp-snap:
#meson.build forces non-relocatable .pc. See: https://github.com/mesonbuild/meson/issues/14346
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
before_script:
- $GIMP_PREFIX = "$PWD\_install-$(if (-not $env:MSYSTEM_PREFIX) { $(((Get-WmiObject Win32_ComputerSystem).SystemType).Split('-')[0].Trim().ToLower()) } else { $env:MSYSTEM_PREFIX })"
- if ("$VARIANT" -eq '-msvc') { if (-not (Test-Path $env:VCPKG_ROOT)) { git clone --depth 1 https://github.com/microsoft/vcpkg; .\vcpkg\bootstrap-vcpkg.bat }; pip install meson }
- $GIMP_PREFIX = "$PWD\_install-$(((Get-WmiObject Win32_ComputerSystem).SystemType).Split('-')[0].Trim().ToLower())"
- if ("$VARIANT" -eq '-msvc') { if (-not (Test-Path $env:VCPKG_ROOT)) { git clone --depth 1 https://github.com/microsoft/vcpkg; .\vcpkg\bootstrap-vcpkg.bat }; pip install --upgrade meson }
- if ("$VARIANT" -eq '-msvc') { $VSINSTALLDIR = $(vswhere -products * -latest -property installationPath); Import-Module "$VSINSTALLDIR\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"; Enter-VsDevShell -VsInstallPath "$VSINSTALLDIR" -SkipAutomaticLocation -DevCmdArguments "-arch=$(((Get-WmiObject Win32_ComputerSystem).SystemType).Split('-')[0].Trim().ToLower())" }
#30min is enough only on msys2 or if no vcpkg port was updated/rebuilt, we need more time in case of port bumps
timeout: 150m
#40min is enough only on msys2 or if no vcpkg port was updated/rebuilt, we need more time in case of port bumps
timeout: 240m
.win_environ: &WIN_ENVIRON
# See: https://testing.developer.gimp.org/core/setup/build/windows/#prepare-for-building
- Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0):win_environ[collapsed=true]$([char]13)$([char]27)[0KPreparing build environment"
## Build-time vars
- $env:PKG_CONFIG_PATH = "$GIMP_PREFIX/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/share/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share/pkgconfig"
- $env:XDG_DATA_DIRS = "$GIMP_PREFIX/share;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/share;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share"
- $env:PKG_CONFIG_PATH = "$GIMP_PREFIX/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/share/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share/pkgconfig"
- $env:XDG_DATA_DIRS = "$GIMP_PREFIX/share;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/share;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share"
## Runtime vars
- $env:PATH = "$GIMP_PREFIX/bin;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/bin;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/bin;$env:PATH"
- $env:GI_TYPELIB_PATH = "$GIMP_PREFIX/lib/girepository-1.0;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/lib/girepository-1.0;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/girepository-1.0"
- $env:PATH = "$GIMP_PREFIX/bin;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/bin;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/bin;$env:PATH"
- $env:GI_TYPELIB_PATH = "$GIMP_PREFIX/lib/girepository-1.0;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/lib/girepository-1.0;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/girepository-1.0"
## MSVC-specific vars
- if ($env:VCPKG_ROOT) { $env:CC='clang-cl'; $env:CXX='clang-cl'; $env:PKG_CONFIG="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\pkgconf\pkgconf.exe"; $env:PATH="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\glib;$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\gdk-pixbuf;$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\gettext\bin;$(Resolve-Path $env:VCPKG_ROOT\downloads\tools\perl\*.*\perl\bin -ErrorAction SilentlyContinue);$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\libxml2;$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\libxslt;$env:PATH"; $env:GIO_MODULE_DIR="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\plugins\glib-networking" }
- if ($env:VCPKG_ROOT) { $env:CC='clang-cl'; $env:CXX='clang-cl'; $env:PKG_CONFIG="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_HOST_TRIPLET\tools\pkgconf\pkgconf.exe"; $env:PATH="$((Get-ChildItem "$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_HOST_TRIPLET\tools" -Recurse -Filter *.exe -ErrorAction SilentlyContinue | Select-Object -ExpandProperty DirectoryName -Unique) -join ';');$(Resolve-Path $env:VCPKG_ROOT\downloads\tools\perl\*.*\perl\bin -ErrorAction SilentlyContinue);$env:PATH"; $env:GIO_MODULE_DIR="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_HOST_TRIPLET\plugins\glib-networking"; $env:LIBHEIF_PLUGIN_PATH="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_HOST_TRIPLET\plugins\libheif" }
- Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):win_environ$([char]13)$([char]27)[0K"
deps-win:
@ -591,7 +595,7 @@ deps-win:
- _install-*/
- babl/_build-*/meson-logs/meson-log.txt
- gegl/_build-*/meson-logs/meson-log.txt
expire_in: 2 hours
expire_in: 4 hours
gimp-win:
extends: .win
@ -617,35 +621,6 @@ gimp-win:
expire_in: 2 days
## WINDOWS x86 legacy CI (native MSYS2) ##
.win-eol:
extends: .win
parallel:
matrix:
- RUNNER: [win32-ps]
variables:
MSYSTEM_PREFIX: mingw32
MINGW_PACKAGE_PREFIX: mingw-w64-i686
deps-win-eol:
extends: .win-eol
stage: !reference [deps-win, stage]
script:
- !reference [deps-win, script]
artifacts: !reference [deps-win, artifacts]
gimp-win-eol:
extends: .win-eol
needs: ["deps-win-eol"]
stage: !reference [gimp-win, stage]
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- $env:PATH = "C:/msys64/usr/bin;" + $env:PATH
- !reference [gimp-win, script]
artifacts: !reference [gimp-win, artifacts]
## macOS pipelines (MacPorts) ##
.macos-inhouse:
extends: .default
@ -659,22 +634,27 @@ gimp-win-eol:
variables:
OPT_PREFIX: /opt/macports
DMG_OPTION: '-Ddmg=true'
- if: '($GIMP_CI_MESON_APPLECLANG != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_APPLECLANG.*/) && $CI_JOB_NAME !~ /.*-part.*/ && $CI_JOB_NAME !~ /.*dist-mac-.*/'
- if: '($GIMP_CI_MESON_APPLECLANG != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_APPLECLANG.*/) && $CI_JOB_NAME !~ /.*x86_64.*/ && $CI_JOB_NAME !~ /.*dist-mac-.*/'
variables:
OPT_PREFIX: /opt/homebrew
WARN_AS_ERROR_ON_CI: '-Dwerror=true'
VARIANT: -homebrew
parallel:
matrix:
- ARCH: [arm64, x86_64]
tags:
- macos
- marathon
variables:
ARCH: arm64
ORKA_RUNNER: tahoe-1
#meson.build forces non-relocatable .pc. See: https://github.com/mesonbuild/meson/issues/14346
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
before_script:
- export GIMP_PREFIX="$PWD/_install-$(uname -m)"
- export GIMP_PREFIX="$PWD/_install-$ARCH"
- export PATH="$OPT_PREFIX/bin:$PATH"
timeout: 4h
- if [ "$ARCH" = 'x86_64' ]; then softwareupdate --install-rosetta --agree-to-license; fi
#4h is enough only on arm64 or if no macports port was updated/rebuilt, we need more time in case of port bumps
timeout: 24h
.macos_environ: &MAC_ENVIRON
- printf "\e[0Ksection_start:`date +%s`:macos_environ[collapsed=true]\r\e[0KPreparing build environment\n"
@ -690,36 +670,39 @@ deps-macos-inhouse:
extends: .macos-inhouse
stage: dependencies
cache:
- key: $CI_PROJECT_NAMESPACE-$ARCH
- key: $CI_PROJECT_NAMESPACE-$ARCH${VARIANT}
unprotect: true
paths:
- macports-cached-$ARCH
script:
# Do not call sh since it is old bash on macOS, not the default zsh
- zsh build/macos/1_build-deps-macports.sh
- arch -${ARCH} zsh build/macos/1_build-deps-macports.sh
artifacts:
paths:
- _install-*
# The full build dir is needed due to its .o for .dSYM creation on next job
- babl/_build-*
- gegl/_build-*
expire_in: 2 hours
expire_in: 4 hours
gimp-macos-inhouse:
extends: .macos-inhouse
needs: ["deps-macos-inhouse"]
needs:
- job: deps-macos-inhouse
#to allow running Homebrew builds
optional: true
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
cache:
- key: $CI_PROJECT_NAMESPACE-$ARCH
- key: $CI_PROJECT_NAMESPACE-$ARCH${VARIANT}
unprotect: true
paths:
- macports-cached-$ARCH
policy: pull
script:
# Do not call sh since it is old bash on macOS, not the default zsh
- zsh build/macos/2_build-gimp-macports.sh
- arch -${ARCH} zsh build/macos/2_build-gimp-macports.sh
artifacts:
paths:
- gimp-*.app
@ -774,7 +757,6 @@ file-plug-in-tests:
reports:
junit: "_log/import-tests.xml"
expire_in: 2 days
timeout: 30m
meson-health:
extends: .default
@ -812,6 +794,7 @@ branches-check:
extends: .default
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS == null && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
interruptible: true
stage: analysis
variables:
GIT_DEPTH: "0"
@ -838,6 +821,33 @@ cppcheck:
- report/
expire_in: 8 days
issue-bot:
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && ($GIMP_CI_MESON_CLANG != null || $GIMP_CI_MESON_MSVC != null || $GIMP_CI_MESON_APPLECLANG != null)
when: on_failure
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && ($GIMP_CI_RASTER_ICONS != null || $GIMP_CI_CPPCHECK != null)
when: on_failure
needs:
- job: gimp-debian-nonreloc
optional: true
- job: gimp-win
optional: true
- job: gimp-macos-inhouse
optional: true
- job: cppcheck
optional: true
stage: analysis
image: registry.gitlab.com/gitlab-org/distribution/issue-bot:latest
variables:
ISSUE_BOT_API_TOKEN: $WILBER_BOT
script:
- LATEST_API_TOKEN=20270330
- printf "(INFO) Token expire date is $(date -d "$LATEST_API_TOKEN" +"%x")\n"
- if [ "$(date +%Y%m%d)" -ge "$LATEST_API_TOKEN" ]; then
printf '\033[31m(ERROR)\033[0m API token for bot expired. Please ask the maintainer to issue a new one then save its value on WILBER_BOT protected var.\n';
exit 1;
fi
- /issue-bot
## Ready-to-distribute ##
@ -938,7 +948,8 @@ include:
project: GNOME/citemplates
file: flatpak/flatpak_ci_initiative.yml
#flatpak_ci_initiative.yml is extremely pervasive. See: https://gitlab.gnome.org/GNOME/citemplates/-/issues/35
ref: 42fbc2526a7680b6a4f284a210e63e3973ea6dae
#keep 'ref:' synced with submission section of build/linux/flatpak/3_dist-gimp-flatpakbuilder.sh
ref: b8e6f8f5a6d2f39b2852d165cc2ab3550ac9e3fb
dist-flatpak-weekly:
extends:
@ -983,7 +994,6 @@ dist-installer-weekly:
- job: gimp-win
#to allow running outside 'GNOME/gimp' namespace (on MRs)
optional: true
- job: gimp-win-eol
stage: distribution
tags:
- win32-ps

View file

@ -212,7 +212,7 @@ help in that regard:
15. GObject Introspection requires the following dependencies to be
built and installed with introspection as well: babl, cairo,
GdkPixbuf, GEGL, GIO, GLib, GObject and GTK.
GdkPixbuf, GEGL, GIO, GLib, GObject, GTK and Gexiv2.
16. Windows builds can now generate backtrace logs upon a crash.
The logs will be available in: %APPDATA%\GIMP\@GIMP_APP_VERSION@\CrashLog\
@ -282,7 +282,8 @@ help in that regard:
mypaint-brushes-2.0
pangocairo @PANGO_REQUIRED_VERSION@
poppler-data @POPPLER_DATA_REQUIRED_VERSION@
PyGObject
Pycairo
PyGObject @PYGOBJECT_REQUIRED_VERSION@
Python @PYTHON3_REQUIRED_VERSION@
zlib
@ -310,7 +311,6 @@ help in that regard:
openexr @OPENEXR_REQUIRED_VERSION@ OpenEXR
OpenJPEG @OPENJPEG_REQUIRED_VERSION@ JPEG 2000
qoi - QOI
webkit @WEBKITGTK_REQUIRED_VERSION@ Help browser & webpage
vala - Vala plug-ins
24. Summary of optional runtime dependencies:

1209
NEWS

File diff suppressed because it is too large Load diff

1128
NEWS.pre-3-2 Normal file

File diff suppressed because it is too large Load diff

View file

@ -65,8 +65,19 @@ main (int argc,
if (AttachConsole (ATTACH_PARENT_PROCESS) != 0 && ! g_getenv ("TERM") && ! g_getenv ("SHELL"))
{
/* 'r' is needed to prevent interleaving and '+' to support colors */
#ifndef _UCRT
freopen ("CONOUT$", "r+", stdout);
freopen ("CONOUT$", "r+", stderr);
#else
FILE* fileOut;
FILE* fileErr;
errno_t errOut = freopen_s (&fileOut, "CONOUT$", "r+", stdout);
errno_t errErr = freopen_s (&fileErr, "CONOUT$", "r+", stderr);
if (errOut != 0 || errErr != 0)
g_warning ("Failed to redirect streams to CONOUT$. stdout: %d, stderr: %d", errOut, errErr);
#endif
_flushall ();
{

View file

@ -37,11 +37,15 @@
#include "core/gimplayer.h"
#include "core/gimplayer-new.h"
#include "core/gimplayermask.h"
#include "core/gimplinklayer.h"
#include "core/gimplist.h"
#include "core/gimpimage.h"
#include "core/gimpimage-undo.h"
#include "path/gimppath-import.h"
#include "path/gimpvectorlayer.h"
#include "text/gimptextlayer.h"
#include "widgets/gimpclipboard.h"
#include "widgets/gimphelp-ids.h"
@ -586,7 +590,60 @@ edit_fill_cmd_callback (GimpAction *action,
gimp_fill_options_get_undo_desc (options));
for (iter = drawables; iter; iter = iter->next)
gimp_drawable_edit_fill (iter->data, options, NULL);
{
/* Skip layers that can't be filled, like pixel-locked layers */
if (gimp_item_is_content_locked (GIMP_ITEM (iter->data), NULL) ||
gimp_item_is_link_layer (GIMP_ITEM (iter->data)))
continue;
if (gimp_item_is_text_layer (iter->data) ||
gimp_item_is_vector_layer (iter->data))
{
GimpPattern *pattern = NULL;
GeglColor *color = NULL;
if (gimp_fill_options_get_style (options) == GIMP_FILL_STYLE_FG_COLOR)
color = gimp_context_get_foreground (GIMP_CONTEXT (options));
else if (gimp_fill_options_get_style (options) == GIMP_FILL_STYLE_BG_COLOR)
color = gimp_context_get_background (GIMP_CONTEXT (options));
else
pattern = gimp_context_get_pattern (GIMP_CONTEXT (options));
if (color)
{
if (gimp_item_is_vector_layer (iter->data))
{
gimp_vector_layer_set (GIMP_VECTOR_LAYER (iter->data),
NULL,
"fill-style",
GIMP_CUSTOM_STYLE_SOLID_COLOR,
"fill-color",
color, NULL);
gimp_vector_layer_refresh (iter->data);
}
else
{
gimp_text_layer_set (iter->data, NULL, "color", color,
NULL);
}
}
else if (pattern &&
gimp_item_is_vector_layer (iter->data))
{
gimp_vector_layer_set (GIMP_VECTOR_LAYER (iter->data), NULL,
"fill-style",
GIMP_CUSTOM_STYLE_PATTERN,
"fill-pattern",
pattern,
NULL);
gimp_vector_layer_refresh (iter->data);
}
}
else
{
gimp_drawable_edit_fill (iter->data, options, NULL);
}
}
gimp_image_undo_group_end (image);
gimp_image_flush (image);

View file

@ -76,7 +76,7 @@ gradient_editor_left_color_type_cmd_callback (GimpAction *action,
gimp_gradient_editor_get_selection (editor, &gradient, &left, NULL);
if (gradient &&
color_type >= 0 &&
(gint) color_type >= 0 &&
color_type !=
gimp_gradient_segment_get_left_color_type (gradient, left))
{
@ -197,7 +197,7 @@ gradient_editor_right_color_type_cmd_callback (GimpAction *action,
gimp_gradient_editor_get_selection (editor, &gradient, NULL, &right);
if (gradient &&
color_type >= 0 &&
(gint) color_type >= 0 &&
color_type !=
gimp_gradient_segment_get_right_color_type (gradient, right))
{

View file

@ -321,15 +321,15 @@ app_run (const gchar *full_prog_name,
if (gimp->be_verbose)
g_print ("EXIT: %s\n", G_STRFUNC);
while (g_main_context_pending (NULL))
g_main_context_iteration (NULL, TRUE);
g_clear_object (&app);
gimp_gegl_exit (gimp);
errors_exit ();
while (g_main_context_pending (NULL))
g_main_context_iteration (NULL, TRUE);
g_object_unref (gimp);
gimp_debug_instances ();

View file

@ -181,8 +181,9 @@ dump_gimprc_system (GimpConfig *rc,
}
else if (! strcmp (prop_spec->name, "mypaint-brush-path"))
{
gchar *path = g_strdup_printf ("@mypaint_brushes_dir@%s"
gchar *path = g_strdup_printf ("%s%s"
"~/.mypaint/brushes",
MYPAINT_BRUSHES_DIR,
G_SEARCHPATH_SEPARATOR_S);
gimp_config_writer_open (writer, "mypaint-brush-path");
@ -215,7 +216,7 @@ static const gchar man_page_header[] =
".B gimprc\n"
"file is a configuration file read by GIMP when it starts up. There\n"
"are two of these: one system-wide one stored in\n"
"@gimpsysconfdir@/gimprc and a per-user @manpage_gimpdir@/gimprc\n"
"%s/gimprc and a per-user %s/gimprc\n"
"which may override system settings.\n"
"\n"
"Comments are introduced by a hash sign (#), and continue until the end\n"
@ -257,22 +258,22 @@ static const gchar *man_page_path =
".TP\n"
".I gimp_dir\n"
"The personal gimp directory which is set to the value of the environment\n"
"variable GIMP3_DIRECTORY or to @manpage_gimpdir@.\n"
"variable GIMP3_DIRECTORY or to %s.\n"
".TP\n"
".I gimp_data_dir\n"
"Base for paths to shareable data, which is set to the value of the\n"
"environment variable GIMP3_DATADIR or to the compiled-in default value\n"
"@gimpdatadir@.\n"
"%s.\n"
".TP\n"
".I gimp_plug_in_dir\n"
"Base to paths for architecture-specific plug-ins and modules, which is set\n"
"to the value of the environment variable GIMP3_PLUGINDIR or to the\n"
"compiled-in default value @gimpplugindir@.\n"
"compiled-in default value %s.\n"
".TP\n"
".I gimp_sysconf_dir\n"
"Path to configuration files, which is set to the value of the environment\n"
"variable GIMP3_SYSCONFDIR or to the compiled-in default value \n"
"@gimpsysconfdir@.\n"
"%s.\n"
".TP\n"
".I gimp_cache_dir\n"
"Path to cached files, which is set to the value of the environment\n"
@ -286,10 +287,10 @@ static const gchar *man_page_path =
static const gchar man_page_footer[] =
".SH FILES\n"
".TP\n"
".I @gimpsysconfdir@/gimprc\n"
".I %s/gimprc\n"
"System-wide configuration file\n"
".TP\n"
".I @manpage_gimpdir@/gimprc\n"
".I %s/gimprc\n"
"Per-user configuration file\n"
"\n"
".SH \"SEE ALSO\"\n"
@ -307,7 +308,9 @@ dump_gimprc_manpage (GimpConfig *rc,
guint i;
g_output_stream_printf (output, NULL, NULL, NULL,
"%s", man_page_header);
man_page_header,
GIMPSYSCONFDIR,
"$XDG_CONFIG_HOME" G_DIR_SEPARATOR_S GIMPDIR G_DIR_SEPARATOR_S GIMP_USER_VERSION);
klass = G_OBJECT_GET_CLASS (rc);
property_specs = g_object_class_list_properties (klass, &n_property_specs);
@ -353,8 +356,9 @@ dump_gimprc_manpage (GimpConfig *rc,
}
else if (! strcmp (prop_spec->name, "mypaint-brush-path"))
{
gchar *path = g_strdup_printf ("@mypaint_brushes_dir@%s"
gchar *path = g_strdup_printf ("%s%s"
"~/.mypaint/brushes",
MYPAINT_BRUSHES_DIR,
G_SEARCHPATH_SEPARATOR_S);
gimp_config_writer_open (writer, "mypaint-brush-path");
@ -389,9 +393,15 @@ dump_gimprc_manpage (GimpConfig *rc,
g_free (property_specs);
g_output_stream_printf (output, NULL, NULL, NULL,
"%s", man_page_path);
man_page_path,
"$XDG_CONFIG_HOME" G_DIR_SEPARATOR_S GIMPDIR G_DIR_SEPARATOR_S GIMP_USER_VERSION,
GIMPDATADIR,
GIMPPLUGINDIR,
GIMPSYSCONFDIR);
g_output_stream_printf (output, NULL, NULL, NULL,
"%s", man_page_footer);
man_page_footer,
GIMPSYSCONFDIR,
"$XDG_CONFIG_HOME" G_DIR_SEPARATOR_S GIMPDIR G_DIR_SEPARATOR_S GIMP_USER_VERSION);
}

View file

@ -198,8 +198,8 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_CONFIG_PROP_STRING (object_class, PROP_PREV_LANGUAGE,
"prev-language",
"Language used in previous run",
NULL, NULL,
GIMP_PARAM_STATIC_STRINGS);
PREV_LANGUAGE_BLURB,
NULL, GIMP_PARAM_STATIC_STRINGS);
/* This is the version of the config files, which must map to the
* version of GIMP. It is used right now only to detect the last run
@ -682,7 +682,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_CONFIG_PROP_STRING (object_class, PROP_LAST_RELEASE_COMMENT,
"last-release-comment",
"Comment for last release",
LAST_KNOWN_RELEASE_BLURB,
LAST_RELEASE_COMMENT_BLURB,
NULL,
GIMP_PARAM_STATIC_STRINGS);

View file

@ -525,7 +525,7 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SHOW_WELCOME_DIALOG,
"show-welcome-dialog",
"Show Welcome Dialog each time",
NULL, TRUE,
SHOW_WELCOME_DIALOG_BLURB, TRUE,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
GIMP_PARAM_STATIC_STRINGS);

View file

@ -20,6 +20,15 @@ _("When enabled, an image will become the active image when its image " \
#define DYNAMICS_PATH_BLURB \
_("Sets the dynamics search path.")
#define PREV_LANGUAGE_BLURB \
_("Specifies the language the user interface was previously displayed in.")
#define LAST_RELEASE_COMMENT_BLURB \
_("The comment for the last known release.")
#define SHOW_WELCOME_DIALOG_BLURB \
_("Show a welcome dialog when GIMP starts.")
#define DYNAMICS_PATH_WRITABLE_BLURB ""
#define TOOL_PRESET_PATH_BLURB \
@ -73,7 +82,7 @@ _("Context-dependent mouse pointers are helpful. They are enabled by " \
#define DEFAULT_TOOL_PRESET_BLURB \
"Specify a default tool preset. The tool preset is searched for in the " \
"specified tool prests path."
"specified tool presets path."
#define CUSTOM_TITLE_BAR_BLURB \
_("Merge menu and title bar (client-side decoration)")

View file

@ -1224,6 +1224,7 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_GROUP_EDIT_PASTE, "GIMP_UNDO_GROUP_EDIT_PASTE", "group-edit-paste" },
{ GIMP_UNDO_GROUP_EDIT_CUT, "GIMP_UNDO_GROUP_EDIT_CUT", "group-edit-cut" },
{ GIMP_UNDO_GROUP_TEXT, "GIMP_UNDO_GROUP_TEXT", "group-text" },
{ GIMP_UNDO_GROUP_VECTOR, "GIMP_UNDO_GROUP_VECTOR", "group-vector" },
{ GIMP_UNDO_GROUP_TRANSFORM, "GIMP_UNDO_GROUP_TRANSFORM", "group-transform" },
{ GIMP_UNDO_GROUP_PAINT, "GIMP_UNDO_GROUP_PAINT", "group-paint" },
{ GIMP_UNDO_GROUP_PARASITE_ATTACH, "GIMP_UNDO_GROUP_PARASITE_ATTACH", "group-parasite-attach" },
@ -1339,6 +1340,7 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_GROUP_EDIT_PASTE, NC_("undo-type", "Paste"), NULL },
{ GIMP_UNDO_GROUP_EDIT_CUT, NC_("undo-type", "Cut"), NULL },
{ GIMP_UNDO_GROUP_TEXT, NC_("undo-type", "Text"), NULL },
{ GIMP_UNDO_GROUP_VECTOR, NC_("undo-type", "Vector"), NULL },
{ GIMP_UNDO_GROUP_TRANSFORM, NC_("undo-type", "Transform"), NULL },
{ GIMP_UNDO_GROUP_PAINT, NC_("undo-type", "Paint"), NULL },
{ GIMP_UNDO_GROUP_PARASITE_ATTACH, NC_("undo-type", "Attach parasite"), NULL },

View file

@ -571,6 +571,7 @@ typedef enum /*< pdb-skip >*/
GIMP_UNDO_GROUP_EDIT_PASTE, /*< desc="Paste" >*/
GIMP_UNDO_GROUP_EDIT_CUT, /*< desc="Cut" >*/
GIMP_UNDO_GROUP_TEXT, /*< desc="Text" >*/
GIMP_UNDO_GROUP_VECTOR, /*< desc="Vector" >*/
GIMP_UNDO_GROUP_TRANSFORM, /*< desc="Transform" >*/
GIMP_UNDO_GROUP_PAINT, /*< desc="Paint" >*/
GIMP_UNDO_GROUP_PARASITE_ATTACH, /*< desc="Attach parasite" >*/

View file

@ -30,7 +30,7 @@
/* former base/ defines */
#define MAX_CHANNELS 4
#define MAX_CHANNELS 5
#define RED 0
#define GREEN 1

View file

@ -38,6 +38,10 @@
#include <io.h>
#endif
#ifdef __APPLE__
#include <spawn.h>
#endif
#include "core-types.h"
#include "gimp-spawn.h"
@ -167,7 +171,7 @@ gimp_spawn_async (gchar **argv,
g_return_val_if_fail (argv != NULL, FALSE);
g_return_val_if_fail (argv[0] != NULL, FALSE);
#ifdef HAVE_VFORK
#if defined(HAVE_VFORK) && !defined(__APPLE__)
if (flags == (G_SPAWN_LEAVE_DESCRIPTORS_OPEN |
G_SPAWN_DO_NOT_REAP_CHILD |
G_SPAWN_CHILD_INHERITS_STDIN))
@ -232,7 +236,36 @@ gimp_spawn_async (gchar **argv,
return TRUE;
}
}
#endif /* HAVE_VFORK */
#elif defined(__APPLE__)
if (flags == (G_SPAWN_LEAVE_DESCRIPTORS_OPEN |
G_SPAWN_DO_NOT_REAP_CHILD |
G_SPAWN_CHILD_INHERITS_STDIN))
{
pid_t pid;
int status;
extern char **environ;
char **child_env = envp ? envp : environ;
/* posix_spawn combines fork and exec */
status = posix_spawn (&pid, argv[0], NULL, NULL, argv, child_env);
if (status != 0)
{
g_set_error (error,
G_SPAWN_ERROR,
exec_err_to_g_error (status),
_("Failed to execute child process “%s” (%s)"),
argv[0],
g_strerror (status));
return FALSE;
}
if (child_pid) *child_pid = pid;
return TRUE;
}
#endif
return g_spawn_async (NULL, argv, envp, flags, NULL, NULL, child_pid, error);
}

View file

@ -398,6 +398,7 @@ user_install_detect_old (GimpUserInstall *install,
migrate = g_file_test (snap_dir, G_FILE_TEST_IS_DIR);
if (! migrate &&
g_getenv ("SNAP") != NULL &&
g_file_test (g_getenv ("SNAP"), G_FILE_TEST_IS_DIR) &&
g_getenv ("SNAP_USER_DATA") != NULL)
{

View file

@ -165,17 +165,17 @@ gimp_get_default_language (const gchar *category)
#ifdef G_OS_WIN32
p = getenv ("LC_ALL");
p = (gchar *) g_getenv ("LC_ALL");
if (p != NULL)
lang = g_strdup (p);
else
{
p = getenv ("LANG");
p = (gchar *) g_getenv ("LANG");
if (p != NULL)
lang = g_strdup (p);
else
{
p = getenv (category);
p = (gchar *) g_getenv (category);
if (p != NULL)
lang = g_strdup (p);
else
@ -428,7 +428,11 @@ unescape_gstring (GString *string)
{
gchar buf[8];
char_str (l, buf);
#ifndef _UCRT
strcpy (to, buf);
#else
strcpy_s (to, 8, buf);
#endif
to += strlen (buf) - 1;
from = end;
}

View file

@ -28,6 +28,8 @@
#include "core-types.h"
#include "gimpcoreapp.h"
#include "config/gimprc.h"
#include "gegl/gimp-babl.h"
@ -1273,8 +1275,9 @@ gimp_image_opened (Gimp *gimp,
}
GFile *
gimp_get_temp_file (Gimp *gimp,
const gchar *extension)
gimp_get_temp_file (Gimp *gimp,
const gchar *extension,
GError **error)
{
static gint id = 0;
static gint pid;
@ -1293,13 +1296,24 @@ gimp_get_temp_file (Gimp *gimp,
basename = g_strdup_printf ("gimp-temp-%d%d", pid, id++);
dir = gimp_file_new_for_config_path (GIMP_GEGL_CONFIG (gimp->config)->temp_path,
NULL);
error);
if (dir == NULL)
{
g_free (basename);
return NULL;
}
if (! g_file_query_exists (dir, NULL))
{
/* Try to make the temp directory if it doesn't exist.
* Ignore any error.
*/
g_file_make_directory_with_parents (dir, NULL, NULL);
if (! g_file_make_directory_with_parents (dir, NULL, error))
{
g_free (basename);
g_object_unref (dir);
return NULL;
}
}
file = g_file_get_child (dir, basename);
g_free (basename);
@ -1356,9 +1370,20 @@ gimp_exit_idle_cleanup_stray_images (Gimp *gimp)
{
GimpImage *image = image_iter->data;
/* TODO: localize after string freeze. */
g_printerr ("INFO: a stray image seems to have been left around by a plug-in: \"%s\"",
gimp_image_get_display_name (image));
/* Plug-in developers are expected to free the images they
* created, unless they add a display (while in GUI mode), in
* which case the user gets ownership of the image and it will be
* freed as any other image by the GUI.
* On the other hand, images created from command lines are very
* likely to still exist when the software exits, if it was closed
* by the --quit argument, or run without an interface. This is
* normal use case.
*/
if (! gimp_image_get_from_command_line (image) ||
(! gimp->no_interface && ! gimp_core_app_get_quit (GIMP_CORE_APP (gimp->app))))
/* TODO: localize after string freeze. */
g_printerr ("INFO: a stray image seems to have been left around by a plug-in: \"%s\"\n",
gimp_image_get_display_name (image));
g_object_unref (image);
}

View file

@ -256,7 +256,8 @@ void gimp_image_opened (Gimp *gimp,
GFile *file);
GFile * gimp_get_temp_file (Gimp *gimp,
const gchar *extension);
const gchar *extension,
GError **error);
GimpDataFactory *
gimp_get_data_factory (Gimp *gimp,

View file

@ -237,7 +237,7 @@ gimp_backtrace_exception_handler (PEXCEPTION_POINTERS info)
if (info->ExceptionRecord != NULL &&
info->ExceptionRecord->ExceptionCode == EXCEPTION_SET_THREAD_NAME &&
info->ExceptionRecord->NumberParameters *
info->ExceptionRecord->NumberParameters *
sizeof (ULONG_PTR) == sizeof (THREADNAME_INFO))
{
THREADNAME_INFO name_info;
@ -644,7 +644,11 @@ utf8_copy_sized (char *dest,
if (size == 0)
return;
#ifndef _UCRT
strncpy (dest, src, size);
#else
strncpy_s (dest, sizeof (dest), src, size);
#endif
if (dest[size - 1] != 0)
{

View file

@ -841,6 +841,9 @@ gimp_brush_transform_blur (GimpTempBuf *buf,
if (rw <= 0 || rh <= 0)
return;
/* Making sure we have enough elements for acc array. */
g_return_if_fail (components <= MAX_CHANNELS);
sums = g_new (Sums, width * height * components);
gegl_parallel_distribute_range (
@ -866,7 +869,7 @@ gimp_brush_transform_blur (GimpTempBuf *buf,
gint weighted_sum;
gint leading_sum;
gint leading_weighted_sum;
} acc[components];
} acc[MAX_CHANNELS];
memset (acc, 0, sizeof (acc));
@ -946,7 +949,7 @@ gimp_brush_transform_blur (GimpTempBuf *buf,
gfloat weighted_sum;
gint leading_sum;
gint trailing_sum;
} acc[components];
} acc[MAX_CHANNELS];
memset (acc, 0, sizeof (acc));

View file

@ -142,8 +142,6 @@ static void gimp_channel_convert_type (GimpDrawable *drawable,
gboolean push_undo,
GimpProgress *progress);
static void gimp_channel_invalidate_boundary (GimpDrawable *drawable);
static void gimp_channel_get_active_components (GimpDrawable *drawable,
gboolean *active);
static void gimp_channel_set_buffer (GimpDrawable *drawable,
gboolean push_undo,
@ -274,7 +272,6 @@ gimp_channel_class_init (GimpChannelClass *klass)
drawable_class->convert_type = gimp_channel_convert_type;
drawable_class->invalidate_boundary = gimp_channel_invalidate_boundary;
drawable_class->get_active_components = gimp_channel_get_active_components;
drawable_class->set_buffer = gimp_channel_set_buffer;
klass->boundary = gimp_channel_real_boundary;
@ -943,15 +940,6 @@ gimp_channel_invalidate_boundary (GimpDrawable *drawable)
channel->bounds_known = FALSE;
}
static void
gimp_channel_get_active_components (GimpDrawable *drawable,
gboolean *active)
{
/* Make sure that the alpha channel is not valid. */
active[GRAY] = TRUE;
active[ALPHA_G] = FALSE;
}
static void
gimp_channel_set_buffer (GimpDrawable *drawable,
gboolean push_undo,

View file

@ -48,6 +48,7 @@
#include "gimpdrawablefilter.h"
#include "gimpdrawablefiltermask.h"
#include "gimpfilterstack.h"
#include "gimpgrouplayer.h"
#include "gimpimage.h"
#include "gimpimage-colormap.h"
#include "gimpimage-undo-push.h"
@ -322,7 +323,6 @@ gimp_drawable_class_init (GimpDrawableClass *klass)
klass->estimate_memsize = gimp_drawable_real_estimate_memsize;
klass->update_all = gimp_drawable_real_update_all;
klass->invalidate_boundary = NULL;
klass->get_active_components = NULL;
klass->get_active_mask = gimp_drawable_real_get_active_mask;
klass->supports_alpha = gimp_drawable_real_supports_alpha;
klass->convert_type = gimp_drawable_real_convert_type;
@ -1033,21 +1033,24 @@ gimp_drawable_real_set_buffer (GimpDrawable *drawable,
old_has_alpha = gimp_drawable_has_alpha (drawable);
}
if (extent->x != 0 || extent->y != 0)
if (! GIMP_IS_GROUP_LAYER (drawable) && (extent->x != 0 || extent->y != 0))
{
/* Drawable buffers are always stored with a (0, 0) origin. When
* setting a buffer with a different origin, we will assume we
* instead want to update the offset a bit.
* This may happen for instance when merging filters which may
* render in negative coordinates.
*
* The only exception to this is group layers. Group layer's
* boundaries will be determined by children layers, but the
* render may extend outside the boundaries (if children have
* effects).
*/
GeglBuffer *buffer2;
GeglRectangle extent2 = { 0, 0, extent->width, extent->height };
buffer2 = gegl_buffer_new (&extent2, gegl_buffer_get_format (buffer));
gimp_gegl_buffer_copy (buffer, extent, GEGL_ABYSS_NONE, buffer2, &extent2);
buffer = buffer2;
buffer = g_object_new (GEGL_TYPE_BUFFER,
"source", buffer,
"shift-x", extent->x,
"shift-y", extent->y,
NULL);
free_buffer = TRUE;
}
@ -1063,7 +1066,10 @@ gimp_drawable_real_set_buffer (GimpDrawable *drawable,
"buffer", gimp_drawable_get_buffer (drawable),
NULL);
gimp_item_set_offset (item, bounds->x + extent->x, bounds->y + extent->y);
if (GIMP_IS_GROUP_LAYER (drawable))
gimp_item_set_offset (item, bounds->x, bounds->y);
else
gimp_item_set_offset (item, bounds->x + extent->x, bounds->y + extent->y);
gimp_item_set_size (item,
bounds->width ? bounds->width :
gegl_buffer_get_width (buffer),
@ -1357,21 +1363,6 @@ gimp_drawable_invalidate_boundary (GimpDrawable *drawable)
drawable_class->invalidate_boundary (drawable);
}
void
gimp_drawable_get_active_components (GimpDrawable *drawable,
gboolean *active)
{
GimpDrawableClass *drawable_class;
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (active != NULL);
drawable_class = GIMP_DRAWABLE_GET_CLASS (drawable);
if (drawable_class->get_active_components)
drawable_class->get_active_components (drawable, active);
}
GimpComponentMask
gimp_drawable_get_active_mask (GimpDrawable *drawable)
{

View file

@ -60,8 +60,6 @@ struct _GimpDrawableClass
gint height);
void (* update_all) (GimpDrawable *drawable);
void (* invalidate_boundary) (GimpDrawable *drawable);
void (* get_active_components) (GimpDrawable *drawable,
gboolean *active);
GimpComponentMask (* get_active_mask) (GimpDrawable *drawable);
gboolean (* supports_alpha) (GimpDrawable *drawable);
void (* convert_type) (GimpDrawable *drawable,
@ -135,8 +133,6 @@ void gimp_drawable_update_all (GimpDrawable *drawa
void gimp_drawable_filters_changed (GimpDrawable *drawable);
void gimp_drawable_invalidate_boundary (GimpDrawable *drawable);
void gimp_drawable_get_active_components (GimpDrawable *drawable,
gboolean *active);
GimpComponentMask gimp_drawable_get_active_mask (GimpDrawable *drawable);
gboolean gimp_drawable_supports_alpha (GimpDrawable *drawable);

View file

@ -89,13 +89,13 @@ gimp_drawable_undo_class_init (GimpDrawableUndoClass *klass)
g_object_class_install_property (object_class, PROP_X,
g_param_spec_int ("x", NULL, NULL,
0, GIMP_MAX_IMAGE_SIZE, 0,
-GIMP_MAX_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE, 0,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class, PROP_Y,
g_param_spec_int ("y", NULL, NULL,
0, GIMP_MAX_IMAGE_SIZE, 0,
-GIMP_MAX_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE, 0,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
}

View file

@ -135,6 +135,7 @@ gimp_gradient_load (GimpContext *context,
gint right_color_type;
gdouble left_rgba[4];
gdouble right_rgba[4];
gint n_matched;
seg = gimp_gradient_segment_new ();
@ -175,9 +176,16 @@ gimp_gradient_load (GimpContext *context,
gegl_color_set_pixel (seg->left_color, babl_format ("R'G'B'A double"), left_rgba);
gegl_color_set_pixel (seg->right_color, babl_format ("R'G'B'A double"), right_rgba);
switch (sscanf (end, "%d %d %d %d",
&type, &color,
&left_color_type, &right_color_type))
#ifndef _UCRT
n_matched = sscanf (end, "%d %d %d %d",
&type, &color,
&left_color_type, &right_color_type);
#else
n_matched = sscanf_s (end, "%d %d %d %d",
&type, &color,
&left_color_type, &right_color_type);
#endif
switch (n_matched)
{
case 4:
seg->left_color_type = (GimpGradientColor) left_color_type;

View file

@ -37,12 +37,13 @@
#include "gimp-atomic.h"
#include "gimp-parallel.h"
#include "gimpasync.h"
#include "gimpchannel.h"
#include "gimpdrawable.h"
#include "gimphistogram.h"
#include "gimpimage.h"
#include "gimpwaitable.h"
#define MAX_N_COMPONENTS 4
#define N_DERIVED_CHANNELS 2
#define PIXELS_PER_THREAD \
@ -144,7 +145,7 @@ gimp_histogram_class_init (GimpHistogramClass *klass)
g_object_class_install_property (object_class, PROP_N_COMPONENTS,
g_param_spec_int ("n-components", NULL, NULL,
0, MAX_N_COMPONENTS, 0,
0, MAX_CHANNELS, 0,
GIMP_PARAM_READABLE));
g_object_class_install_property (object_class, PROP_N_BINS,
@ -1281,19 +1282,29 @@ gimp_histogram_calculate_async_callback (GimpAsync *async,
guint
gimp_histogram_unique_colors (GimpDrawable *drawable)
{
GimpImage *image;
const Babl *format;
guint bpp;
GeglBufferIterator *iter;
GHashTable *hash_table;
guint uniques = 0;
gboolean selection_empty;
GeglRectangle area;
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), 0);
image = gimp_item_get_image (GIMP_ITEM (drawable));
format = gimp_drawable_get_format (drawable);
bpp = babl_format_get_bytes_per_pixel (format);
selection_empty = gimp_channel_is_empty (gimp_image_get_mask (image));
if (! selection_empty)
gimp_item_mask_intersect (GIMP_ITEM (drawable), &area.x, &area.y,
&area.width, &area.height);
iter = gegl_buffer_iterator_new (gimp_drawable_get_buffer (drawable),
NULL, 0, format,
selection_empty ? NULL : &area,
0, format,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE, 1);

View file

@ -993,19 +993,18 @@ gimp_image_convert_profile_colormap (GimpImage *image,
GimpProgress *progress)
{
GimpImagePrivate *private = GIMP_IMAGE_GET_PRIVATE (image);
GimpColorTransformFlags flags = 0;
/*GimpColorTransformFlags flags = 0;*/
GimpPalette *palette;
const Babl *space;
const Babl *format;
/* TODO: current implementation ignores the black point compensation
* choice because babl doesn't have BCP support yet.
* Previous code was using gimp_color_transform_new() which used
* LittleCMS directly instead.
* This should be fixed.
if (bpc)
/* TODO: current implementation ignores the black point compensation
* choice because babl doesn't have BCP support yet.
* Previous code was using gimp_color_transform_new() which used
* LittleCMS directly instead.
* This should be fixed.
*/
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION;
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION; */
palette = gimp_image_get_colormap_palette (image);
space = gimp_image_get_layer_space (image);

View file

@ -22,6 +22,8 @@
#include "core-types.h"
#include "path/gimpvectorlayer.h"
#include "gimp.h"
#include "gimpcontext.h"
#include "gimpguide.h"
@ -120,6 +122,9 @@ gimp_image_crop (GimpImage *image,
list = g_list_next (list);
if (gimp_item_is_vector_layer (item))
continue;
gimp_item_translate (item, -x, -y, TRUE);
if (crop_layers && ! gimp_item_is_content_locked (item, NULL))

View file

@ -336,6 +336,11 @@ gimp_image_duplicate_paths (GimpImage *image,
GimpPath *path = list->data;
GimpPath *new_path;
/* If the path is attached to a vector layer, it will be
* duplicated already */
if (gimp_path_attached_to_vector_layer (path, image))
continue;
new_path = GIMP_PATH (gimp_image_duplicate_item (GIMP_ITEM (path),
new_image));

View file

@ -24,6 +24,8 @@
#include "core-types.h"
#include "path/gimpvectorlayer.h"
#include "gimp.h"
#include "gimpchannel.h"
#include "gimpcontainer.h"
@ -234,6 +236,10 @@ gimp_image_flip_full (GimpImage *image,
while ((item = gimp_object_queue_pop (queue)))
{
gboolean clip = FALSE;
/* Non-rasterized vector layers will be transformed when their path is */
if (gimp_item_is_vector_layer (item))
continue;
if (GIMP_IS_CHANNEL (item))
clip = clip_result;

View file

@ -148,6 +148,8 @@ struct _GimpImagePrivate
/* Signal emission accumulator */
GimpImageFlushAccumulator flush_accum;
gboolean from_command_line;
};
#define GIMP_IMAGE_GET_PRIVATE(image) (((GimpImage *) (image))->priv)

View file

@ -42,6 +42,8 @@
#include "text/gimptextlayer.h"
#include "path/gimpvectorlayer.h"
#include "gimp-intl.h"
@ -115,6 +117,9 @@ gimp_image_resize_with_layers (GimpImage *image,
{
GimpItem *item = list->data;
if (gimp_item_is_vector_layer (item))
continue;
gimp_item_translate (item, offset_x, offset_y, TRUE);
}

View file

@ -44,6 +44,7 @@
#include "gimpsamplepoint.h"
#include "path/gimppath.h"
#include "path/gimpvectorlayer.h"
static void gimp_image_rotate_item_offset (GimpImage *image,
@ -138,6 +139,10 @@ gimp_image_rotate (GimpImage *image,
gint off_x;
gint off_y;
/* Non-rasterized vector layers will be rotated when their path is */
if (gimp_item_is_vector_layer (item))
continue;
gimp_item_get_offset (item, &off_x, &off_y);
gimp_item_rotate (item, context, rotate_type, center_x, center_y, FALSE);

View file

@ -22,6 +22,8 @@
#include "core-types.h"
#include "path/gimpvectorlayer.h"
#include "gimp.h"
#include "gimpcontainer.h"
#include "gimpguide.h"
@ -106,6 +108,10 @@ gimp_image_scale (GimpImage *image,
/* Scale all layers, channels (including selection mask), and paths */
while ((item = gimp_object_queue_pop (queue)))
{
/* Non-rasterized vector layers will be transformed when their path is */
if (gimp_item_is_vector_layer (item))
continue;
if (! gimp_item_scale_by_factors (item,
img_scale_w, img_scale_h,
interpolation_type, progress))

View file

@ -28,6 +28,7 @@
#include "core-types.h"
#include "path/gimppath.h"
#include "path/gimpvectorlayer.h"
#include "gimp.h"
#include "gimp-transform-resize.h"
@ -284,6 +285,10 @@ gimp_image_transform (GimpImage *image,
{
GimpTransformResize clip = GIMP_TRANSFORM_RESIZE_ADJUST;
/* Non-rasterized vector layers will be transformed when their path is */
if (gimp_item_is_vector_layer (item))
continue;
if (GIMP_IS_CHANNEL (item))
clip = clip_result;

View file

@ -909,6 +909,8 @@ gimp_image_init (GimpImage *image)
private->flush_accum.mask_changed = FALSE;
private->flush_accum.floating_selection_changed = FALSE;
private->flush_accum.preview_invalidated = FALSE;
private->from_command_line = FALSE;
}
static void
@ -1388,6 +1390,8 @@ static void
gimp_image_real_mode_changed (GimpImage *image)
{
gimp_projectable_structure_changed (GIMP_PROJECTABLE (image));
gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (image));
}
static void
@ -3694,22 +3698,6 @@ gimp_image_get_component_active (GimpImage *image,
return FALSE;
}
void
gimp_image_get_active_array (GimpImage *image,
gboolean *components)
{
GimpImagePrivate *private;
gint i;
g_return_if_fail (GIMP_IS_IMAGE (image));
g_return_if_fail (components != NULL);
private = GIMP_IMAGE_GET_PRIVATE (image);
for (i = 0; i < MAX_CHANNELS; i++)
components[i] = private->active[i];
}
GimpComponentMask
gimp_image_get_active_mask (GimpImage *image)
{
@ -3794,22 +3782,6 @@ gimp_image_get_component_visible (GimpImage *image,
return FALSE;
}
void
gimp_image_get_visible_array (GimpImage *image,
gboolean *components)
{
GimpImagePrivate *private;
gint i;
g_return_if_fail (GIMP_IS_IMAGE (image));
g_return_if_fail (components != NULL);
private = GIMP_IMAGE_GET_PRIVATE (image);
for (i = 0; i < MAX_CHANNELS; i++)
components[i] = private->visible[i];
}
GimpComponentMask
gimp_image_get_visible_mask (GimpImage *image)
{
@ -6438,3 +6410,28 @@ gimp_image_get_converting (GimpImage *image)
return private->converting;
}
void
gimp_image_set_from_command_line (GimpImage *image,
gboolean from_command_line)
{
GimpImagePrivate *private;
g_return_if_fail (GIMP_IS_IMAGE (image));
private = GIMP_IMAGE_GET_PRIVATE (image);
private->from_command_line = from_command_line;
}
gboolean
gimp_image_get_from_command_line (GimpImage *image)
{
GimpImagePrivate *private;
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
private = GIMP_IMAGE_GET_PRIVATE (image);
return private->from_command_line;
}

View file

@ -237,8 +237,6 @@ void gimp_image_set_component_active (GimpImage *image,
gboolean active);
gboolean gimp_image_get_component_active (GimpImage *image,
GimpChannelType type);
void gimp_image_get_active_array (GimpImage *image,
gboolean *components);
GimpComponentMask gimp_image_get_active_mask (GimpImage *image);
void gimp_image_set_component_visible (GimpImage *image,
@ -246,8 +244,6 @@ void gimp_image_set_component_visible (GimpImage *image,
gboolean visible);
gboolean gimp_image_get_component_visible (GimpImage *image,
GimpChannelType type);
void gimp_image_get_visible_array (GimpImage *image,
gboolean *components);
GimpComponentMask gimp_image_get_visible_mask (GimpImage *image);
@ -512,3 +508,7 @@ void gimp_image_invalidate_previews (GimpImage *image);
void gimp_image_set_converting (GimpImage *image,
gboolean converting);
gboolean gimp_image_get_converting (GimpImage *image);
void gimp_image_set_from_command_line (GimpImage *image,
gboolean from_command_line);
gboolean gimp_image_get_from_command_line (GimpImage *image);

View file

@ -194,8 +194,6 @@ static void gimp_layer_convert_type (GimpDrawable *drawable,
gboolean push_undo,
GimpProgress *progress);
static void gimp_layer_invalidate_boundary (GimpDrawable *drawable);
static void gimp_layer_get_active_components (GimpDrawable *drawable,
gboolean *active);
static GimpComponentMask
gimp_layer_get_active_mask (GimpDrawable *drawable);
static void gimp_layer_set_buffer (GimpDrawable *drawable,
@ -448,7 +446,6 @@ gimp_layer_class_init (GimpLayerClass *klass)
drawable_class->supports_alpha = gimp_layer_supports_alpha;
drawable_class->convert_type = gimp_layer_convert_type;
drawable_class->invalidate_boundary = gimp_layer_invalidate_boundary;
drawable_class->get_active_components = gimp_layer_get_active_components;
drawable_class->get_active_mask = gimp_layer_get_active_mask;
drawable_class->set_buffer = gimp_layer_set_buffer;
drawable_class->get_bounding_box = gimp_layer_get_bounding_box;
@ -1511,22 +1508,6 @@ gimp_layer_invalidate_boundary (GimpDrawable *drawable)
floating_sel_invalidate (layer);
}
static void
gimp_layer_get_active_components (GimpDrawable *drawable,
gboolean *active)
{
GimpLayer *layer = GIMP_LAYER (drawable);
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
const Babl *format = gimp_drawable_get_format (drawable);
/* first copy the image active channels */
gimp_image_get_active_array (image, active);
if (gimp_drawable_has_alpha (drawable) &&
gimp_layer_is_alpha_locked (layer, NULL))
active[babl_format_get_n_components (format) - 1] = FALSE;
}
static GimpComponentMask
gimp_layer_get_active_mask (GimpDrawable *drawable)
{

View file

@ -198,8 +198,15 @@ gimp_palette_load (GimpContext *context,
{
GeglColor *color = gegl_color_new ("black");
guint8 rgb[3] = { 0 };
#ifdef _UCRT
gchar *context = NULL;
#endif
#ifndef _UCRT
tok = strtok (str, " \t");
#else
tok = strtok_s (str, " \t", &context);
#endif
if (tok)
{
if (atoi (tok) < 0 || atoi (tok) > 255)
@ -216,7 +223,12 @@ gimp_palette_load (GimpContext *context,
gimp_file_get_utf8_name (file), linenum);
}
#ifndef _UCRT
tok = strtok (NULL, " \t");
#else
tok = strtok_s (NULL, " \t", &context);
#endif
if (tok)
{
if (atoi (tok) < 0 || atoi (tok) > 255)
@ -233,7 +245,11 @@ gimp_palette_load (GimpContext *context,
gimp_file_get_utf8_name (file), linenum);
}
#ifndef _UCRT
tok = strtok (NULL, " \t");
#else
tok = strtok_s (NULL, " \t", &context);
#endif
if (tok)
{
if (atoi (tok) < 0 || atoi (tok) > 255)
@ -251,7 +267,11 @@ gimp_palette_load (GimpContext *context,
}
/* optional name */
#ifndef _UCRT
tok = strtok (NULL, "\n");
#else
tok = strtok_s (NULL, "\n", &context);
#endif
/* Historical .gpl format is sRGB. */
gegl_color_set_pixel (color, babl_format ("R'G'B' u8"), rgb);
@ -1391,28 +1411,51 @@ gimp_palette_load_sbz (GimpContext *context,
if ((a = archive_read_new ()))
{
const gchar *name = gimp_file_get_utf8_name (file);
int archive_ret;
archive_read_support_format_all (a);
r = archive_read_open_filename (a, name, 10240);
if (r != ARCHIVE_OK)
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Unable to read SBZ file: %s"),
archive_error_string (a));
archive_read_free (a);
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Unable to read SBZ file"));
return NULL;
}
while (archive_read_next_header (a, &entry) == ARCHIVE_OK)
while ((archive_ret = archive_read_next_header (a, &entry)) != ARCHIVE_EOF)
{
const gchar *lower = g_ascii_strdown (archive_entry_pathname (entry), -1);
const char *pathname;
gchar *lower;
if (archive_ret == ARCHIVE_RETRY)
continue;
else if (archive_ret == ARCHIVE_FATAL)
break;
pathname = archive_entry_pathname (entry);
lower = g_ascii_strdown (pathname, -1);
if (g_str_has_suffix (lower, ".xml"))
{
entry_size = archive_entry_size (entry);
xml_data = (gchar *) g_malloc (entry_size);
if (xml_data == NULL)
{
entry_size = archive_entry_size (entry);
xml_data = (gchar *) g_malloc (entry_size);
r = archive_read_data (a, xml_data, entry_size);
r = archive_read_data (a, xml_data, entry_size);
}
else
{
/* This format only seems to allow for 1 XML in the
* zip, so if there are several, let's ignore it, yet
* not completely silently.
*/
g_printerr ("Ignoring second XML file '%s' in SBZ palette: %s",
pathname, gimp_file_get_utf8_name (file));
}
}
else if (g_str_has_suffix (lower, ".icc") || g_str_has_suffix (lower, ".icm"))
{
@ -1438,6 +1481,18 @@ gimp_palette_load_sbz (GimpContext *context,
g_list_append (sbz_data.embedded_profiles, sbz_profile);
}
}
g_free (lower);
}
if (archive_ret == ARCHIVE_FATAL)
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Unable to read SBZ file: %s"),
archive_error_string (a));
archive_read_free (a);
return NULL;
}
if (xml_data)
@ -1458,6 +1513,15 @@ gimp_palette_load_sbz (GimpContext *context,
g_free (xml_data);
}
else
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Unable to open SBZ file"));
archive_read_free (a);
return NULL;
}
r = archive_read_free (a);
}
@ -1491,30 +1555,55 @@ gimp_palette_load_procreate (GimpContext *context,
if ((a = archive_read_new ()))
{
const gchar *name = gimp_file_get_utf8_name (file);
int archive_ret;
archive_read_support_format_all (a);
r = archive_read_open_filename (a, name, 10240);
if (r != ARCHIVE_OK)
{
archive_read_free (a);
/* TODO: Translate after string freeze */
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
"Unable to read Procreate swatches file");
_("Unable to read Procreate swatches file: %s"),
archive_error_string (a));
archive_read_free (a);
return NULL;
}
while (archive_read_next_header (a, &entry) == ARCHIVE_OK)
while ((archive_ret = archive_read_next_header (a, &entry)) != ARCHIVE_EOF)
{
const gchar *lower = g_ascii_strdown (archive_entry_pathname (entry), -1);
gchar *lower;
if (archive_ret == ARCHIVE_RETRY)
continue;
else if (archive_ret == ARCHIVE_FATAL)
break;
/* Here we returned either with ARCHIVE_OK or ARCHIVE_WARN
* which are both successes (we ignore the non-critical error
* in the WARN case).
*/
lower = g_ascii_strdown (archive_entry_pathname (entry), -1);
if (g_str_has_suffix (lower, ".json"))
{
entry_size = archive_entry_size (entry);
json_data = (gchar *) g_malloc (entry_size);
r = archive_read_data (a, json_data, entry_size);
g_free (lower);
break;
}
g_free (lower);
}
if (archive_ret == ARCHIVE_FATAL)
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Unable to read Procreate swatches file: %s"),
archive_error_string (a));
archive_read_free (a);
return NULL;
}
if (json_data)
@ -1656,8 +1745,8 @@ gimp_palette_load_procreate (GimpContext *context,
GeglColor *color = gegl_color_new (NULL);
const Babl *space = NULL;
if (profiles &&
json_reader_read_member (reader, "colorProfile") &&
if (json_reader_read_member (reader, "colorProfile") &&
profiles &&
json_reader_is_value (reader))
{
GList *profile_list;
@ -1712,14 +1801,21 @@ gimp_palette_load_procreate (GimpContext *context,
g_clear_object (&reader);
g_clear_object (&parser);
}
else
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Unable to read Procreate swatches file"));
archive_read_free (a);
return NULL;
}
r = archive_read_free (a);
}
else
{
/* TODO: Translate after string freeze */
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
"Unable to read Procreate swatches file");
_("Unable to read Procreate swatches file"));
return NULL;
}
@ -1735,69 +1831,77 @@ swatchbooker_load_start_element (GMarkupParseContext *context,
GError **error)
{
SwatchBookerData *sbz_data = user_data;
gchar *lower_elt_name;
sbz_data->copy_values = FALSE;
sbz_data->color_model = NULL;
sbz_data->color_space = NULL;
if (! strcmp (g_ascii_strdown (element_name, -1), "color"))
lower_elt_name = g_ascii_strdown (element_name, -1);
if (! strcmp (lower_elt_name, "color"))
{
sbz_data->in_color_tag = TRUE;
}
else if (! strcmp (g_ascii_strdown (element_name, -1), "dc:identifier"))
else if (! strcmp (lower_elt_name, "dc:identifier"))
{
if (sbz_data->in_color_tag)
sbz_data->copy_name = TRUE;
}
else if (! strcmp (g_ascii_strdown (element_name, -1), "values"))
else if (! strcmp (lower_elt_name, "values"))
{
while (*attribute_names)
{
if (! strcmp (g_ascii_strdown (*attribute_names, -1), "model"))
{
sbz_data->color_model =
g_strdup (g_ascii_strdown (*attribute_values, -1));
}
else if (! strcmp (g_ascii_strdown (*attribute_names, -1), "space"))
{
sbz_data->color_space = g_strdup (*attribute_values);
}
gchar *lower_att_name = g_ascii_strdown (*attribute_names, -1);
if (! strcmp (lower_att_name, "model"))
sbz_data->color_model = g_ascii_strdown (*attribute_values, -1);
else if (! strcmp (lower_att_name, "space"))
sbz_data->color_space = g_strdup (*attribute_values);
attribute_names++;
attribute_values++;
g_free (lower_att_name);
}
sbz_data->copy_values = TRUE;
}
else if (! strcmp (g_ascii_strdown (element_name, -1), "book"))
else if (! strcmp (lower_elt_name, "book"))
{
sbz_data->in_book_tag = TRUE;
while (*attribute_names)
{
if (! strcmp (g_ascii_strdown (*attribute_names, -1), "columns"))
gchar *lower_att_name = g_ascii_strdown (*attribute_names, -1);
if (! strcmp (lower_att_name, "columns"))
{
gint columns = atoi (*attribute_values);
if (columns > 0)
gimp_palette_set_columns (sbz_data->palette, columns);
g_free (lower_att_name);
break;
}
attribute_names++;
attribute_values++;
g_free (lower_att_name);
}
}
else if (! strcmp (g_ascii_strdown (element_name, -1), "swatch") &&
else if (! strcmp (lower_elt_name, "swatch") &&
sbz_data->in_book_tag)
{
while (*attribute_names)
{
if (! strcmp (g_ascii_strdown (*attribute_names, -1), "material"))
gchar *lower_att_name = g_ascii_strdown (*attribute_names, -1);
if (! strcmp (lower_att_name, "material"))
{
GList *cols;
gint original_id = 0;
/*gint original_id = 0;*/
for (cols = gimp_palette_get_colors (sbz_data->palette);
cols;
@ -1813,15 +1917,21 @@ swatchbooker_load_start_element (GMarkupParseContext *context,
sbz_data->sorted_position++;
break;
}
original_id++;
/*original_id++;*/
}
g_free (lower_att_name);
break;
}
attribute_names++;
attribute_values++;
g_free (lower_att_name);
}
}
g_free (lower_elt_name);
}
static void
@ -1831,11 +1941,15 @@ swatchbooker_load_end_element (GMarkupParseContext *context,
GError **error)
{
SwatchBookerData *sbz_data = user_data;
gchar *lower_elt_name;
if (! strcmp (g_ascii_strdown (element_name, -1), "color"))
lower_elt_name = g_ascii_strdown (element_name, -1);
if (! strcmp (lower_elt_name, "color"))
sbz_data->in_color_tag = FALSE;
else if (! strcmp (g_ascii_strdown (element_name, -1), "book"))
else if (! strcmp (lower_elt_name, "book"))
sbz_data->in_book_tag = FALSE;
g_free (lower_elt_name);
}
static void

View file

@ -72,7 +72,7 @@ gimp_pickable_auto_shrink (GimpPickable *pickable,
GeglBuffer *buffer;
GeglRectangle rect;
ColorsEqualFunc colors_equal_func;
guchar bgcolor[MAX_CHANNELS] = { 0, 0, 0, 0 };
guchar bgcolor[MAX_CHANNELS] = { 0 };
guchar *buf = NULL;
gint x1, y1, x2, y2;
gint width, height;

View file

@ -48,6 +48,9 @@ extern "C"
(/* each thread costs as much as */ 64.0 * 64.0 /* pixels */)
static gfloat *mask_row_buf = NULL;
static gsize mask_row_buf_size = 0;
typedef struct
{
gint x;
@ -148,6 +151,9 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable,
format = choose_format (src_buffer, select_criterion,
&n_components, &has_alpha);
g_return_val_if_fail (n_components <= MAX_CHANNELS, NULL);
gegl_buffer_sample (src_buffer, x, y, NULL, start_col, format,
GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
@ -186,6 +192,9 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable,
}
g_clear_object (&src_buffer);
g_clear_pointer (&mask_row_buf, g_free);
mask_row_buf_size = 0;
return mask_buffer;
}
@ -228,6 +237,8 @@ gimp_pickable_contiguous_region_by_color (GimpPickable *pickable,
format = choose_format (src_buffer, select_criterion,
&n_components, &has_alpha);
g_return_val_if_fail (n_components <= MAX_CHANNELS, NULL);
gegl_color_get_pixel (color, format, start_col);
if (has_alpha)
@ -689,6 +700,9 @@ gimp_pickable_contiguous_region_by_line_art (GimpPickable *pickable,
if (free_src_buffer)
g_object_unref (src_buffer);
g_clear_pointer (&mask_row_buf, g_free);
mask_row_buf_size = 0;
return mask_buffer;
}
@ -985,10 +999,19 @@ find_contiguous_segment (const gfloat *col,
gfloat *row)
{
gfloat *s;
gfloat mask_row_buf[src_extent->width];
gfloat *mask_row = mask_row_buf - src_extent->x;
gfloat *mask_row;
gfloat diff;
if (mask_row_buf == NULL ||
(gsize) src_extent->width > mask_row_buf_size)
{
mask_row_buf_size = src_extent->width;
mask_row_buf = (gfloat *) g_realloc_n ((gpointer) mask_row_buf,
mask_row_buf_size,
sizeof (gfloat));
}
mask_row = mask_row_buf - src_extent->x;
#ifdef FETCH_ROW
gegl_buffer_get (src_buffer, GEGL_RECTANGLE (0, initial_y, width, 1), 1.0,
src_format,

View file

@ -43,14 +43,18 @@
#include "gimp-intl.h"
static GimpMetadataRotationPolicy gimp_image_metadata_rotate_dialog (GimpImage *image,
GimpContext *context,
GtkWidget *parent,
GExiv2Orientation orientation,
gboolean *dont_ask);
static GdkPixbuf * gimp_image_metadata_rotate_pixbuf (GdkPixbuf *pixbuf,
GExiv2Orientation orientation);
static GimpMetadataRotationPolicy gimp_image_metadata_rotate_dialog (GimpImage *image,
GimpContext *context,
GtkWidget *parent,
GExiv2Orientation orientation,
gboolean *dont_ask);
static GdkPixbuf * gimp_image_metadata_rotate_pixbuf (GdkPixbuf *pixbuf,
GExiv2Orientation orientation);
static gboolean gimp_image_metadata_rotate_release (GtkWidget *widget,
GdkEvent *event,
GtkDialog *dialog);
static void gimp_image_metadata_rotate_realize (GtkWidget *widget);
/* public functions */
@ -169,6 +173,7 @@ gimp_image_metadata_rotate_dialog (GimpImage *image,
GdkPixbuf *rotated;
GtkWidget *hbox;
GtkWidget *image;
GtkWidget *event_box;
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
@ -187,9 +192,22 @@ gimp_image_metadata_rotate_dialog (GimpImage *image,
gtk_box_pack_end (GTK_BOX (vbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
image = gtk_image_new_from_pixbuf (pixbuf);
gtk_box_pack_end (GTK_BOX (vbox), image, FALSE, FALSE, 0);
gtk_widget_show (image);
event_box = gtk_event_box_new ();
image = gtk_image_new_from_pixbuf (pixbuf);
gtk_container_add (GTK_CONTAINER (event_box), image);
gtk_box_pack_end (GTK_BOX (vbox), event_box, FALSE, FALSE, 0);
gtk_widget_set_visible (image, TRUE);
gtk_widget_set_visible (event_box, TRUE);
g_object_set_data (G_OBJECT (event_box), "metadata-rotation-response",
GINT_TO_POINTER (GTK_RESPONSE_CANCEL));
g_signal_connect_object (event_box, "button-release-event",
G_CALLBACK (gimp_image_metadata_rotate_release),
dialog, 0);
g_signal_connect (event_box, "realize",
G_CALLBACK (gimp_image_metadata_rotate_realize),
NULL);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
@ -204,11 +222,23 @@ gimp_image_metadata_rotate_dialog (GimpImage *image,
rotated = gimp_image_metadata_rotate_pixbuf (pixbuf, orientation);
image = gtk_image_new_from_pixbuf (rotated);
event_box = gtk_event_box_new ();
image = gtk_image_new_from_pixbuf (rotated);
g_object_unref (rotated);
gtk_box_pack_end (GTK_BOX (vbox), image, FALSE, FALSE, 0);
gtk_widget_show (image);
gtk_container_add (GTK_CONTAINER (event_box), image);
gtk_box_pack_end (GTK_BOX (vbox), event_box, FALSE, FALSE, 0);
gtk_widget_set_visible (image, TRUE);
gtk_widget_set_visible (event_box, TRUE);
g_object_set_data (G_OBJECT (event_box), "metadata-rotation-response",
GINT_TO_POINTER (GTK_RESPONSE_OK));
g_signal_connect_object (event_box, "button-release-event",
G_CALLBACK (gimp_image_metadata_rotate_release),
dialog, 0);
g_signal_connect (event_box, "realize",
G_CALLBACK (gimp_image_metadata_rotate_realize),
NULL);
}
label = g_object_new (GTK_TYPE_LABEL,
@ -235,8 +265,8 @@ gimp_image_metadata_rotate_dialog (GimpImage *image,
gtk_widget_destroy (dialog);
return (response == GTK_RESPONSE_OK) ?
GIMP_METADATA_ROTATION_POLICY_ROTATE :
GIMP_METADATA_ROTATION_POLICY_KEEP;
GIMP_METADATA_ROTATION_POLICY_ROTATE :
GIMP_METADATA_ROTATION_POLICY_KEEP;
}
static GdkPixbuf *
@ -291,3 +321,29 @@ gimp_image_metadata_rotate_pixbuf (GdkPixbuf *pixbuf,
return rotated;
}
static gboolean
gimp_image_metadata_rotate_release (GtkWidget *widget,
GdkEvent *event,
GtkDialog *dialog)
{
gint response_id;
response_id =
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget),
"metadata-rotation-response"));
gtk_dialog_response (dialog, response_id);
return FALSE;
}
static void
gimp_image_metadata_rotate_realize (GtkWidget *widget)
{
GdkCursor *cursor;
cursor = gdk_cursor_new_from_name (gtk_widget_get_display (widget),
"pointer");
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
g_object_unref (cursor);
}

View file

@ -51,7 +51,6 @@
#include "path/gimppath.h"
#include "path/gimppath-import.h"
#include "path/gimpvectorlayer.h"
#include "path/gimpvectorlayeroptions.h"
#include "text/gimptext.h"
#include "text/gimptextlayer.h"
@ -438,15 +437,8 @@ gimp_display_shell_dnd_fill (GimpDisplayShell *shell,
if (gimp_item_is_text_layer (iter->data) ||
gimp_item_is_vector_layer (iter->data))
{
GimpVectorLayerOptions *vector_options = NULL;
GimpFillOptions *vector_fill = NULL;
GimpPattern *pattern = NULL;
GeglColor *color = NULL;
if (gimp_item_is_vector_layer (iter->data))
vector_options = gimp_vector_layer_get_options (iter->data);
if (vector_options)
vector_fill = vector_options->fill_options;
GimpPattern *pattern = NULL;
GeglColor *color = NULL;
if (gimp_fill_options_get_style (options) == GIMP_FILL_STYLE_FG_COLOR)
color = gimp_context_get_foreground (GIMP_CONTEXT (options));
@ -457,12 +449,13 @@ gimp_display_shell_dnd_fill (GimpDisplayShell *shell,
if (color)
{
if (vector_fill)
if (gimp_item_is_vector_layer (iter->data))
{
gimp_context_set_foreground (GIMP_CONTEXT (vector_fill),
color);
gimp_fill_options_set_custom_style (vector_fill,
GIMP_CUSTOM_STYLE_SOLID_COLOR);
gimp_vector_layer_set (GIMP_VECTOR_LAYER (iter->data), NULL,
"fill-style",
GIMP_CUSTOM_STYLE_SOLID_COLOR,
"fill-color",
color, NULL);
gimp_vector_layer_refresh (iter->data);
}
else
@ -470,16 +463,14 @@ gimp_display_shell_dnd_fill (GimpDisplayShell *shell,
gimp_text_layer_set (iter->data, NULL, "color", color, NULL);
}
}
else if (pattern)
else if (pattern &&
gimp_item_is_vector_layer (iter->data))
{
if (vector_fill)
{
gimp_context_set_pattern (GIMP_CONTEXT (vector_fill),
pattern);
gimp_fill_options_set_custom_style (vector_fill,
GIMP_CUSTOM_STYLE_PATTERN);
gimp_vector_layer_refresh (iter->data);
}
gimp_vector_layer_set (GIMP_VECTOR_LAYER (iter->data), NULL,
"fill-style", GIMP_CUSTOM_STYLE_PATTERN,
"fill-pattern", pattern,
NULL);
gimp_vector_layer_refresh (iter->data);
}
}
else

View file

@ -2005,7 +2005,7 @@ gimp_display_shell_rotate_gesture_maybe_get_state (GtkGestureRotate *gesture,
* last_event happens to not have it. Thus we store the last valid state
* and only update it if we get a valid state from last_event.
*/
guint state = 0;
GdkModifierType state = 0;
const GdkEvent *last_event;
last_event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);

View file

@ -371,7 +371,9 @@ gimp_image_window_constructed (GObject *object)
GimpGuiConfig *config;
GimpDeviceManager *device_manager;
gboolean use_gtk_menubar = TRUE;
#ifndef GDK_WINDOWING_QUARTZ
gboolean use_app_menu = TRUE;
#endif
G_OBJECT_CLASS (parent_class)->constructed (object);
@ -1144,7 +1146,11 @@ gimp_image_window_set_aux_info (GimpSessionManaged *session_managed,
maximized = TRUE;
if (width)
#ifndef _UCRT
sscanf (aux->value, "%d", width);
#else
sscanf_s (aux->value, "%d", width);
#endif
/* compat handling for right docks */
if (! strcmp (aux->name, GIMP_IMAGE_WINDOW_RIGHT_DOCKS_POS))

View file

@ -1944,7 +1944,13 @@ gimp_statusbar_shell_scaled (GimpDisplayShell *shell,
sizeof (statusbar->cursor_format_str),
"%%s%%.%df%%s%%.%df%%s",
w_digits, h_digits);
#ifndef _UCRT
strcpy (statusbar->cursor_format_str_f, statusbar->cursor_format_str);
#else
strcpy_s (statusbar->cursor_format_str_f,
sizeof (statusbar->cursor_format_str_f),
statusbar->cursor_format_str);
#endif
g_snprintf (statusbar->length_format_str,
sizeof (statusbar->length_format_str),
"%%s%%.%df%%s", MAX (w_digits, h_digits));

View file

@ -293,7 +293,9 @@ gimp_eek (const gchar *reason,
gboolean use_handler)
{
GimpCoreConfig *config = the_errors_gimp->config;
#if !defined(G_OS_WIN32) || !defined(GIMP_CONSOLE_COMPILATION)
gboolean eek_handled = FALSE;
#endif
GimpDebugPolicy debug_policy;
GList *iter;
gint num_idx;

View file

@ -690,11 +690,12 @@ file_open_from_command_line (Gimp *gimp,
{
success = TRUE;
gimp_image_set_from_command_line (image, TRUE);
g_object_set_data_full (G_OBJECT (gimp), GIMP_FILE_OPEN_LAST_FILE_KEY,
g_object_ref (file),
(GDestroyNotify) g_object_unref);
}
else if (status != GIMP_PDB_SUCCESS && status != GIMP_PDB_CANCEL && display)
else if (status != GIMP_PDB_SUCCESS && status != GIMP_PDB_CANCEL)
{
gimp_message (gimp, G_OBJECT (display), GIMP_MESSAGE_ERROR,
_("Opening '%s' failed: %s"),
@ -1007,8 +1008,7 @@ file_open_pre_check (Gimp *gimp,
g_clear_error (error);
if (error && ! *error)
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
/* TODO: localize after string freeze ends. */
"Cycling link detected with %s.",
_("Circular reference detected with '%s'."),
g_file_peek_path (file));
return FALSE;

View file

@ -258,13 +258,13 @@ file_remote_get_temp_file (Gimp *gimp,
const gchar *ext = strchr (basename, '.');
if (ext && strlen (ext))
temp_file = gimp_get_temp_file (gimp, ext + 1);
temp_file = gimp_get_temp_file (gimp, ext + 1, NULL);
g_free (basename);
}
if (! temp_file)
temp_file = gimp_get_temp_file (gimp, "xxx");
temp_file = gimp_get_temp_file (gimp, "xxx", NULL);
return temp_file;
}

View file

@ -604,15 +604,17 @@ void
gimp_update_check (GimpCoreConfig *config)
{
#ifdef PLATFORM_OSX
const gchar *gimp_versions;
const gchar *gimp_versions;
NSMutableURLRequest *request;
NSURLSession *session;
gimp_versions = gimp_get_version_url ();
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
request = [[NSMutableURLRequest alloc] init];
[request setURL:[NSURL URLWithString:@(gimp_versions)]];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
/* completionHandler is called on a background thread */
[[session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *reply;

View file

@ -33,7 +33,7 @@
#include <winnls.h>
#endif
#ifdef PLATFORM_OSX
#include <Foundation/NSLocale.h>
#import <Foundation/Foundation.h>
#endif
#include "language.h"

View file

@ -350,27 +350,26 @@ gimp_macos_setenv (const char * progname)
gchar *etc_dir;
size_t path_len;
struct stat sb;
gboolean need_pythonhome = TRUE;
bin_dir = g_path_get_dirname (resolved_path);
tmp = g_strdup_printf ("%s/../Resources/lib", bin_dir);
tmp = g_strdup_printf ("%s/lib", gimp_installation_directory());
lib_dir = g_canonicalize_filename (tmp, NULL);
g_free (tmp);
tmp = g_strdup_printf ("%s/../Resources/share", bin_dir);
tmp = g_strdup_printf ("%s/share", gimp_installation_directory());
share_dir = g_canonicalize_filename (tmp, NULL);
g_free (tmp);
tmp = g_strdup_printf ("%s/../Resources/etc", bin_dir);
tmp = g_strdup_printf ("%s/etc", gimp_installation_directory());
etc_dir = g_canonicalize_filename (tmp, NULL);
g_free (tmp);
/* Detect if we are running from bundle or from prefix */
if (share_dir && !stat (share_dir, &sb) && S_ISDIR (sb.st_mode))
if (g_str_has_suffix (bin_dir, "MacOS"))
{
g_print ("GIMP is started as MacOS application\n");
}
else
{
tmp = g_strdup_printf ("%s/../share", bin_dir);
tmp = g_strdup_printf ("%s/share", gimp_installation_directory());
share_dir = g_canonicalize_filename (tmp, NULL);
g_free (tmp);
if (share_dir && !stat (share_dir, &sb) && S_ISDIR (sb.st_mode))
@ -379,7 +378,7 @@ gimp_macos_setenv (const char * progname)
g_print ("GIMP is started in the build directory\n");
tmp = g_strdup_printf ("%s/..", bin_dir); /* running in build dir */
tmp = g_strdup_printf ("%s", gimp_installation_directory()); /* running in build dir */
share_dir = g_canonicalize_filename (tmp, NULL);
g_free (tmp);
}
@ -390,23 +389,6 @@ gimp_macos_setenv (const char * progname)
}
}
/* Detect we were built in homebrew for MacOS (for PYTHONHOME purposes) */
tmp = g_strdup_printf ("%s/../Frameworks/Python.framework", share_dir);
if (tmp && !stat (tmp, &sb) && S_ISDIR (sb.st_mode))
{
g_print ("GIMP was built with homebrew\n");
need_pythonhome = FALSE;
}
g_free (tmp);
/* Detect we were built in MacPorts for MacOS (for PYTHONHOME purposes) */
tmp = g_strdup_printf ("%s/../Library/Frameworks/Python.framework", share_dir);
if (tmp && !stat (tmp, &sb) && S_ISDIR (sb.st_mode))
{
g_print ("GIMP was built with MacPorts\n");
need_pythonhome = FALSE;
}
g_free (tmp);
/* Minimum runtime paths */
path_len = strlen (g_getenv ("PATH") ? g_getenv ("PATH") : "") + strlen (bin_dir) + 2;
path = g_try_malloc (path_len);
@ -469,12 +451,13 @@ gimp_macos_setenv (const char * progname)
tmp = g_strdup_printf ("%s/girepository-1.0", lib_dir);
g_setenv ("GI_TYPELIB_PATH", tmp, TRUE);
g_free (tmp);
if (need_pythonhome)
tmp = g_strdup_printf ("%s/Frameworks/Python.framework/Versions/%s", gimp_installation_directory(), PYTHON_VERSION);
if (tmp && !stat (tmp, &sb) && S_ISDIR (sb.st_mode))
{
tmp = g_strdup_printf ("%s/Library/Frameworks/Python.framework/Versions/%s", share_dir, PYTHON_VERSION);
g_setenv ("PYTHONHOME", tmp, TRUE);
g_free (tmp);
}
g_free (tmp);
g_free (lib_dir);
g_free (share_dir);
g_free (etc_dir);
@ -587,12 +570,15 @@ main (int argc,
#endif
gint retval;
gint i;
#if defined(ENABLE_RELOCATABLE_RESOURCES) && defined(__APPLE__)
gint newargc;
#endif
gimp_attach_console_window ();
#if defined(ENABLE_RELOCATABLE_RESOURCES) && defined(__APPLE__)
/* remove MacOS session identifier from the command line args */
gint newargc = 0;
newargc = 0;
for (gint i = 0; i < argc; i++)
{
if (!g_str_has_prefix (argv[i], "-psn_"))
@ -923,6 +909,8 @@ main (int argc,
pdb_compat_mode,
backtrace_file);
gimp_env_exit (FALSE);
g_free (backtrace_file);
g_clear_object (&system_gimprc_file);
@ -976,8 +964,19 @@ gimp_attach_console_window (void)
if (AttachConsole (ATTACH_PARENT_PROCESS) != 0)
{
/* 'r' is needed to prevent interleaving and '+' to support colors */
#ifndef _UCRT
freopen ("CONOUT$", "r+", stdout);
freopen ("CONOUT$", "r+", stderr);
#else
FILE* fileOut;
FILE* fileErr;
errno_t errOut = freopen_s (&fileOut, "CONOUT$", "r+", stdout);
errno_t errErr = freopen_s (&fileErr, "CONOUT$", "r+", stderr);
if (errOut != 0 || errErr != 0)
g_warning ("Failed to redirect streams to CONOUT$. stdout: %d, stderr: %d", errOut, errErr);
#endif
_flushall ();
{

View file

@ -587,8 +587,13 @@ gimp_curves_config_load_cruft (GimpCurvesConfig *config,
return FALSE;
}
#ifndef _UCRT
if (sscanf (x_str, "%d", &index[i][j]) != 1 ||
sscanf (y_str, "%d", &value[i][j]) != 1)
#else
if (sscanf_s (x_str, "%d", &index[i][j]) != 1 ||
sscanf_s (y_str, "%d", &value[i][j]) != 1)
#endif
{
g_set_error_literal (error,
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_PARSE,

View file

@ -904,12 +904,21 @@ gimp_levels_config_load_cruft (GimpLevelsConfig *config,
return FALSE;
}
#ifndef _UCRT
fields = sscanf (line, "%d %d %d %d %31s",
&low_input[i],
&high_input[i],
&low_output[i],
&high_output[i],
float_buf);
#else
fields = sscanf_s (line, "%d %d %d %d %31s",
&low_input[i],
&high_input[i],
&low_output[i],
&high_output[i],
float_buf, (unsigned) sizeof (float_buf));
#endif
g_free (line);

View file

@ -591,7 +591,7 @@ struct PaintBuf : Base
}
};
static BasicDispatch<PaintBuf, ALGORITHM_PAINT_BUF> dispatch_paint_buf;
static BasicDispatch<PaintBuf, ALGORITHM_PAINT_BUF> G_GNUC_UNUSED dispatch_paint_buf;
/* PaintMask, dispatch_paint_mask():
@ -691,7 +691,7 @@ struct DispatchStipple
else
visitor (identity<Stipple<Algorithm, FALSE>> ());
}
} static dispatch_stipple;
} static G_GNUC_UNUSED dispatch_stipple;
/* CompMask, dispatch_comp_mask(), has_comp_mask(), comp_mask_data():
@ -734,7 +734,7 @@ struct CompMask : Base
};
};
static BasicDispatch<CompMask, ALGORITHM_COMP_MASK> dispatch_comp_mask;
static BasicDispatch<CompMask, ALGORITHM_COMP_MASK> G_GNUC_UNUSED dispatch_comp_mask;
template <class Base>
static constexpr gboolean
@ -815,7 +815,7 @@ static BasicDispatch<
TempCompMask,
ALGORITHM_TEMP_COMP_MASK,
decltype (dispatch_comp_mask)
> dispatch_temp_comp_mask;
> G_GNUC_UNUSED dispatch_temp_comp_mask;
/* CompBuffer, dispatch_comp_buffer(), has_comp_buffer(), comp_buffer_data():
@ -858,7 +858,7 @@ struct CompBuffer : Base
};
};
static BasicDispatch<CompBuffer, ALGORITHM_COMP_BUFFER> dispatch_comp_buffer;
static BasicDispatch<CompBuffer, ALGORITHM_COMP_BUFFER> G_GNUC_UNUSED dispatch_comp_buffer;
template <class Base>
static constexpr gboolean
@ -939,7 +939,7 @@ static BasicDispatch<
TempCompBuffer,
ALGORITHM_TEMP_COMP_BUFFER,
decltype (dispatch_comp_buffer)
> dispatch_temp_comp_buffer;
> G_GNUC_UNUSED dispatch_temp_comp_buffer;
/* CanvasBufferIterator, DispatchCanvasBufferIterator:

View file

@ -1287,10 +1287,10 @@ static const gchar *expand_props[] =
"expand-mask-fill-type",
};
static const gint max_n_props = (G_N_ELEMENTS (brush_props) +
G_N_ELEMENTS (dynamics_props) +
G_N_ELEMENTS (gradient_props) +
G_N_ELEMENTS (expand_props));
#define max_n_props (G_N_ELEMENTS (brush_props) + \
G_N_ELEMENTS (dynamics_props) + \
G_N_ELEMENTS (gradient_props) + \
G_N_ELEMENTS (expand_props))
gboolean
gimp_paint_options_is_prop (const gchar *prop_name,
@ -1377,3 +1377,5 @@ gimp_paint_options_copy_props (GimpPaintOptions *src,
g_value_unset (&values[n_props]);
}
}
#undef max_n_props

View file

@ -246,8 +246,6 @@ gimp_smudge_start (GimpPaintCore *paint_core,
dest_pickable_off_y = 0;
}
pickable_buffer = gimp_pickable_get_buffer (dest_pickable);
n_strokes = gimp_symmetry_get_size (sym);
for (i = 0; i < n_strokes; i++)
{
@ -280,6 +278,11 @@ gimp_smudge_start (GimpPaintCore *paint_core,
if (! paint_buffer)
continue;
/* Fetch the buffer _after_ gimp_paint_core_get_paint_buffer() as it
* may have expanded the drawable when "Expand Layers" is enabled.
*/
pickable_buffer = gimp_pickable_get_buffer (dest_pickable);
gimp_smudge_accumulator_coords (paint_core, &coords, 0, &x, &y);
/* If clipped, prefill the smudge buffer with the color at the

View file

@ -207,7 +207,8 @@ static gboolean parse_svg_length (const gchar *value,
static gboolean parse_svg_viewbox (const gchar *value,
gdouble *width,
gdouble *height,
GimpMatrix3 *matrix);
GimpMatrix3 *matrix,
gboolean scale);
static gboolean parse_svg_transform (const gchar *value,
GimpMatrix3 *matrix);
static GList * parse_path_data (const gchar *data);
@ -636,7 +637,7 @@ svg_handler_svg_start (SvgHandler *handler,
gimp_matrix3_translate (matrix, x, y);
}
if (viewbox && parse_svg_viewbox (viewbox, &w, &h, &box))
if (viewbox && parse_svg_viewbox (viewbox, &w, &h, &box, parser->scale))
{
gimp_matrix3_mult (&box, matrix);
}
@ -1212,28 +1213,48 @@ static gboolean
parse_svg_viewbox (const gchar *value,
gdouble *width,
gdouble *height,
GimpMatrix3 *matrix)
GimpMatrix3 *matrix,
gboolean scale)
{
gdouble x, y, w, h;
gchar *tok;
gchar *str = g_strdup (value);
gboolean success = FALSE;
#ifdef _UCRT
gchar *context = NULL;
#endif
x = y = w = h = 0;
#ifndef _UCRT
tok = strtok (str, ", \t");
#else
tok = strtok_s (str, ", \t", &context);
#endif
if (tok)
{
x = g_ascii_strtod (tok, NULL);
#ifndef _UCRT
tok = strtok (NULL, ", \t");
#else
tok = strtok_s (NULL, ", \t", &context);
#endif
if (tok)
{
y = g_ascii_strtod (tok, NULL);
#ifndef _UCRT
tok = strtok (NULL, ", \t");
#else
tok = strtok_s (NULL, ", \t", &context);
#endif
if (tok != NULL)
{
w = g_ascii_strtod (tok, NULL);
#ifndef _UCRT
tok = strtok (NULL, ", \t");
#else
tok = strtok_s (NULL, ", \t", &context);
#endif
if (tok)
{
h = g_ascii_strtod (tok, NULL);
@ -1252,7 +1273,8 @@ parse_svg_viewbox (const gchar *value,
if (w > 0.0 && h > 0.0)
{
gimp_matrix3_scale (matrix, *width / w, *height / h);
if (scale)
gimp_matrix3_scale (matrix, *width / w, *height / h);
}
else /* disable rendering of the element */
{

View file

@ -113,6 +113,13 @@ static void gimp_vector_layer_scale (GimpItem *ite
gint new_offset_y,
GimpInterpolationType interp_type,
GimpProgress *progress);
static void gimp_vector_layer_resize (GimpItem *item,
GimpContext *context,
GimpFillType fill_type,
gint new_width,
gint new_height,
gint offset_x,
gint offset_y);
static void gimp_vector_layer_flip (GimpItem *item,
GimpContext *context,
GimpOrientationType flip_type,
@ -180,6 +187,7 @@ gimp_vector_layer_class_init (GimpVectorLayerClass *klass)
item_class->duplicate = gimp_vector_layer_duplicate;
item_class->rename = gimp_rasterizable_rename;
item_class->scale = gimp_vector_layer_scale;
item_class->resize = gimp_vector_layer_resize;
item_class->flip = gimp_vector_layer_flip;
item_class->rotate = gimp_vector_layer_rotate;
item_class->transform = gimp_vector_layer_transform;
@ -390,10 +398,10 @@ gimp_vector_layer_convert (GimpItem *item,
if (path)
{
gimp_item_convert (GIMP_ITEM (path), dest_image, GIMP_TYPE_PATH);
GIMP_ITEM_GET_CLASS (path)->convert (GIMP_ITEM (path), dest_image,
G_TYPE_FROM_INSTANCE (path));
if (! gimp_item_is_attached (GIMP_ITEM (path)) &&
gimp_item_get_image (GIMP_ITEM (path)) == dest_image)
if (! gimp_item_is_attached (GIMP_ITEM (path)))
gimp_image_add_path (dest_image, path, NULL, -1, FALSE);
}
@ -452,7 +460,7 @@ gimp_vector_layer_translate (GimpLayer *layer,
{
GimpVectorLayer *vector_layer = GIMP_VECTOR_LAYER (layer);
if (vector_layer->options && vector_layer->options->path)
if (gimp_item_is_vector_layer (GIMP_ITEM (layer)))
{
gimp_item_translate (GIMP_ITEM (vector_layer->options->path),
offset_x, offset_y, FALSE);
@ -474,11 +482,14 @@ gimp_vector_layer_scale (GimpItem *item,
{
GimpVectorLayer *vector_layer = GIMP_VECTOR_LAYER (item);
if (vector_layer->options && vector_layer->options->path)
if (gimp_item_is_vector_layer (item))
{
gimp_item_scale (GIMP_ITEM (vector_layer->options->path),
new_width, new_height, new_offset_x, new_offset_y,
interp_type, progress);
gdouble scale_x = new_width / (gdouble) gimp_item_get_width (item);
gdouble scale_y = new_height / (gdouble) gimp_item_get_height (item);
gimp_item_scale_by_factors (GIMP_ITEM (vector_layer->options->path),
scale_x, scale_y,
interp_type, progress);
}
else
{
@ -488,6 +499,31 @@ gimp_vector_layer_scale (GimpItem *item,
}
}
static void
gimp_vector_layer_resize (GimpItem *item,
GimpContext *context,
GimpFillType fill_type,
gint new_width,
gint new_height,
gint offset_x,
gint offset_y)
{
GimpVectorLayer *vector_layer = GIMP_VECTOR_LAYER (item);
if (gimp_item_is_vector_layer (item))
{
gimp_item_resize (GIMP_ITEM (vector_layer->options->path),
context, fill_type, new_width, new_height,
offset_x, offset_y);
}
else
{
GIMP_ITEM_CLASS (parent_class)->resize (item, context, fill_type,
new_width, new_height, offset_x,
offset_y);
}
}
static void
gimp_vector_layer_flip (GimpItem *item,
GimpContext *context,
@ -497,7 +533,7 @@ gimp_vector_layer_flip (GimpItem *item,
{
GimpVectorLayer *vector_layer = GIMP_VECTOR_LAYER (item);
if (vector_layer->options && vector_layer->options->path)
if (gimp_item_is_vector_layer (item))
{
gimp_item_flip (GIMP_ITEM (vector_layer->options->path),
context, flip_type, axis, clip_result);
@ -519,7 +555,7 @@ gimp_vector_layer_rotate (GimpItem *item,
{
GimpVectorLayer *vector_layer = GIMP_VECTOR_LAYER (item);
if (vector_layer->options && vector_layer->options->path)
if (gimp_item_is_vector_layer (item))
{
gimp_item_rotate (GIMP_ITEM (vector_layer->options->path),
context, rotate_type, center_x, center_y, clip_result);
@ -543,7 +579,7 @@ gimp_vector_layer_transform (GimpItem *item,
{
GimpVectorLayer *vector_layer = GIMP_VECTOR_LAYER (item);
if (vector_layer->options && vector_layer->options->path)
if (gimp_item_is_vector_layer (item))
{
gimp_item_transform (GIMP_ITEM (vector_layer->options->path),
context, matrix, direction, interp_type,
@ -702,6 +738,49 @@ gimp_vector_layer_get_options (GimpVectorLayer *layer)
return NULL;
}
void
gimp_vector_layer_set (GimpVectorLayer *layer,
const gchar *undo_desc,
const gchar *first_property_name,
...)
{
GimpImage *image;
GimpVectorLayerOptions *options;
va_list var_args;
g_return_if_fail (gimp_item_is_vector_layer (GIMP_ITEM (layer)));
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (layer)));
options = layer->options;
if (! options)
return;
image = gimp_item_get_image (GIMP_ITEM (layer));
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_VECTOR, undo_desc);
g_object_freeze_notify (G_OBJECT (layer));
if (gimp_rasterizable_is_rasterized (GIMP_RASTERIZABLE (layer)))
gimp_image_undo_push_drawable_mod (image, NULL,
GIMP_DRAWABLE (layer), TRUE);
gimp_image_undo_push_vector_layer (image, undo_desc, layer, NULL);
va_start (var_args, first_property_name);
g_object_set_valist (G_OBJECT (options), first_property_name,
var_args);
va_end (var_args);
if (gimp_rasterizable_is_rasterized (GIMP_RASTERIZABLE (layer)))
gimp_rasterizable_restore (GIMP_RASTERIZABLE (layer));
g_object_thaw_notify (G_OBJECT (layer));
gimp_image_undo_group_end (image);
}
void
gimp_vector_layer_refresh (GimpVectorLayer *layer)
{

View file

@ -62,6 +62,11 @@ GimpPath * gimp_vector_layer_get_path (GimpVectorLayer *layer)
GimpVectorLayerOptions * gimp_vector_layer_get_options (GimpVectorLayer *layer);
void gimp_vector_layer_set (GimpVectorLayer *layer,
const gchar *undo_desc,
const gchar *first_property_name,
...) G_GNUC_NULL_TERMINATED;
void gimp_vector_layer_refresh (GimpVectorLayer *layer);
gboolean gimp_item_is_vector_layer (GimpItem *item);

View file

@ -32,7 +32,9 @@
#include "path-types.h"
#include "core/gimp.h"
#include "core/gimpfilloptions.h"
#include "core/gimpimage.h"
#include "core/gimppattern.h"
#include "core/gimpstrokeoptions.h"
#include "gimppath.h"
@ -51,7 +53,11 @@ enum
PROP_ENABLE_FILL,
PROP_FILL_OPTIONS,
PROP_ENABLE_STROKE,
PROP_STROKE_OPTIONS
PROP_STROKE_OPTIONS,
/* Individual Fill Options */
PROP_FILL_STYLE,
PROP_FILL_COLOR,
PROP_FILL_PATTERN
};
@ -85,6 +91,7 @@ static void
gimp_vector_layer_options_class_init (GimpVectorLayerOptionsClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GeglColor *black = gegl_color_new ("black");
object_class->constructor = gimp_vector_layer_options_constructor;
object_class->finalize = gimp_vector_layer_options_finalize;
@ -132,6 +139,28 @@ gimp_vector_layer_options_class_init (GimpVectorLayerOptionsClass *klass)
GIMP_TYPE_STROKE_OPTIONS,
G_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_AGGREGATE);
/* Alias for fill properties */
GIMP_CONFIG_PROP_ENUM (object_class, PROP_FILL_STYLE,
"fill-style",
NULL, NULL,
GIMP_TYPE_CUSTOM_STYLE,
GIMP_CUSTOM_STYLE_SOLID_COLOR,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_COLOR (object_class, PROP_FILL_COLOR,
"fill-color",
NULL, NULL,
FALSE, black,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_OBJECT (object_class, PROP_FILL_PATTERN,
"fill-pattern",
NULL, NULL,
GIMP_TYPE_PATTERN,
GIMP_PARAM_STATIC_STRINGS);
g_object_unref (black);
}
static void
@ -218,6 +247,12 @@ gimp_vector_layer_options_get_property (GObject *object,
g_value_set_object (value, options->stroke_options);
break;
/* Alias for fill properties */
case PROP_FILL_STYLE:
case PROP_FILL_COLOR:
case PROP_FILL_PATTERN:
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@ -301,6 +336,24 @@ gimp_vector_layer_options_set_property (GObject *object,
}
break;
/* Alias for fill properties */
case PROP_FILL_STYLE:
if (options->fill_options)
g_object_set (GIMP_FILL_OPTIONS (options->fill_options),
"custom-style", g_value_get_enum (value),
NULL);
break;
case PROP_FILL_COLOR:
gimp_context_set_foreground (GIMP_CONTEXT (options->fill_options),
g_value_get_object (value));
break;
case PROP_FILL_PATTERN:
gimp_context_set_pattern (GIMP_CONTEXT (options->fill_options),
g_value_get_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;

View file

@ -3735,7 +3735,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_unit ("line-width-unit",
"line width unit",
"The line width setting unit",
FALSE,
TRUE,
FALSE,
gimp_unit_inch (),
GIMP_PARAM_READWRITE));

View file

@ -219,7 +219,8 @@ temp_file_invoker (GimpProcedure *procedure,
if (success)
{
file = gimp_get_temp_file (gimp, extension);
file = gimp_get_temp_file (gimp, extension, error);
success = (file != NULL);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
@ -291,12 +292,18 @@ register_gimp_procs (GimpPDB *pdb)
"gimp-quit");
gimp_procedure_set_static_help (procedure,
"Causes GIMP to exit gracefully.",
"If there are unsaved images in an interactive GIMP session, the user will be asked for confirmation. If force is TRUE, the application is quit without querying the user to save any dirty images.",
"If there are unsaved images in an interactive GIMP session, the user will be asked for confirmation. If force is TRUE, the application is quit without querying the user to save any dirty images.\n"
"\n"
"This procedure is deprecated without any replacement. Scripts and plug-ins should not request the main process to exit. If you wish to run GIMP non-interactively so that it exits immediately when the batch script ends, call the executable with option `--quit`.\n"
"\n"
"Deprecated: There is no replacement for this procedure.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996");
gimp_procedure_set_deprecated (procedure,
"NONE");
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("force",
"force",

View file

@ -30,7 +30,7 @@
#include "internal-procs.h"
/* 785 procedures registered total */
/* 786 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)

View file

@ -48,6 +48,38 @@
#include "gimp-intl.h"
static GimpValueArray *
resources_loaded_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
const gchar *type_name;
gboolean loaded = FALSE;
type_name = g_value_get_string (gimp_value_array_index (args, 0));
if (success)
{
if (g_type_from_name (type_name) == GIMP_TYPE_FONT)
loaded = ! gimp->no_fonts;
else
loaded = ! gimp->no_data;
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_boolean (gimp_value_array_index (return_vals, 1), loaded);
return return_vals;
}
static GimpValueArray *
resource_get_by_name_invoker (GimpProcedure *procedure,
Gimp *gimp,
@ -510,6 +542,37 @@ register_resource_procs (GimpPDB *pdb)
{
GimpProcedure *procedure;
/*
* gimp-resources-loaded
*/
procedure = gimp_procedure_new (resources_loaded_invoker, TRUE);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-resources-loaded");
gimp_procedure_set_static_help (procedure,
"Returns whether resource of a given type were loaded.",
"Returns whether resources of a given type were loaded.\n"
"In particular, it would return FALSE if GIMP was started with `--no-data` or `--no-fonts` for fonts.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Jehan",
"Jehan",
"2026");
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("type-name",
"type name",
"The name of the resource type e.g. GimpFont",
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("loaded",
"loaded",
"Whether resources of @type_name were loaded",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-resource-get-by-name
*/

View file

@ -1851,7 +1851,7 @@ register_vector_layer_procs (GimpPDB *pdb)
gimp_param_spec_unit ("unit",
"unit",
"The stroke width unit.",
FALSE,
TRUE,
FALSE,
gimp_unit_inch (),
GIMP_PARAM_READWRITE));

View file

@ -111,10 +111,6 @@ static gboolean gimp_plug_in_write (GIOChannel *channel,
static gboolean gimp_plug_in_flush (GIOChannel *channel,
gpointer data);
#if defined G_OS_WIN32 && defined WIN32_32BIT_DLL_FOLDER
static void gimp_plug_in_set_dll_directory (const gchar *path);
#endif
#ifndef G_OS_WIN32
static void gimp_plug_in_close_waitpid (GPid pid,
gint status,
@ -361,39 +357,6 @@ gimp_plug_in_flush (GIOChannel *channel,
return TRUE;
}
#if defined G_OS_WIN32 && defined WIN32_32BIT_DLL_FOLDER
static void
gimp_plug_in_set_dll_directory (const gchar *path)
{
LPWSTR w_path;
const gchar *install_dir;
gchar *bin_dir;
LPWSTR w_bin_dir;
DWORD BinaryType;
w_path = NULL;
w_bin_dir = NULL;
install_dir = gimp_installation_directory ();
if (path &&
(w_path = g_utf8_to_utf16 (path, -1, NULL, NULL, NULL)) &&
GetBinaryTypeW (w_path, &BinaryType) &&
BinaryType == SCS_32BIT_BINARY)
bin_dir = g_build_filename (install_dir, WIN32_32BIT_DLL_FOLDER, NULL);
else
bin_dir = g_build_filename (install_dir, "bin", NULL);
w_bin_dir = g_utf8_to_utf16 (bin_dir, -1, NULL, NULL, NULL);
if (w_bin_dir)
{
SetDllDirectoryW (w_bin_dir);
g_free (w_bin_dir);
}
g_free (bin_dir);
g_free (w_path);
}
#endif
#ifndef G_OS_WIN32
static void
gimp_plug_in_close_waitpid (GPid pid,
@ -649,9 +612,6 @@ gimp_plug_in_open (GimpPlugIn *plug_in,
/* Fork another process. We'll remember the process id so that we
* can later use it to kill the filter if necessary.
*/
#if defined G_OS_WIN32 && defined WIN32_32BIT_DLL_FOLDER
gimp_plug_in_set_dll_directory (argv[0]);
#endif
if (! gimp_spawn_async (argv, envp, spawn_flags, &plug_in->pid, &error))
{
gimp_message (plug_in->manager->gimp, NULL, GIMP_MESSAGE_ERROR,
@ -690,10 +650,6 @@ gimp_plug_in_open (GimpPlugIn *plug_in,
cleanup:
#if defined G_OS_WIN32 && defined WIN32_32BIT_DLL_FOLDER
gimp_plug_in_set_dll_directory (NULL);
#endif
if (debug)
g_free (argv);

View file

@ -588,7 +588,11 @@ file_convert_string (const gchar *instr,
}
*tmpptr = '\0';
#ifndef _UCRT
sscanf ((gchar *) tmp, "%o", &k);
#else
sscanf_s ((gchar *) tmp, "%o", &k);
#endif
*(uout++) = k;
break;
@ -626,7 +630,12 @@ file_check_single_magic (const gchar *offset,
gchar num_operator;
/* Check offset */
#ifndef _UCRT
if (sscanf (offset, "%ld", &offs) != 1)
#else
if (sscanf_s (offset, "%ld", &offs) != 1)
#endif
return FILE_MATCH_NONE;
/* Check type of test */
@ -667,11 +676,23 @@ file_check_single_magic (const gchar *offset,
if (g_ascii_isdigit (num_operator_ptr[1]))
{
if (num_operator_ptr[1] != '0') /* decimal */
#ifndef _UCRT
sscanf (num_operator_ptr+1, "%lu", &num_operator_val);
#else
sscanf_s (num_operator_ptr+1, "%lu", &num_operator_val);
#endif
else if (num_operator_ptr[2] == 'x') /* hexadecimal */
#ifndef _UCRT
sscanf (num_operator_ptr+3, "%lx", &num_operator_val);
#else
sscanf_s (num_operator_ptr+3, "%lx", &num_operator_val);
#endif
else /* octal */
#ifndef _UCRT
sscanf (num_operator_ptr+2, "%lo", &num_operator_val);
#else
sscanf_s (num_operator_ptr+2, "%lo", &num_operator_val);
#endif
num_operator = *num_operator_ptr;
}

View file

@ -1117,17 +1117,28 @@ extensions_parse (gchar *extensions)
{
gchar *extension;
gchar *next_token;
#ifdef _UCRT
gchar *context = NULL;
#endif
/* work on a copy */
extensions = g_strdup (extensions);
next_token = extensions;
#ifndef _UCRT
extension = strtok (next_token, " \t,");
#else
extension = strtok_s (next_token, " \t,", &context);
#endif
while (extension)
{
list = g_slist_prepend (list, g_strdup (extension));
#ifndef _UCRT
extension = strtok (NULL, " \t,");
#else
extension = strtok_s (NULL, " \t,", &context);
#endif
}
g_free (extensions);

View file

@ -43,12 +43,12 @@ typedef struct
gdouble min; /* minimal allowable slider value */
gdouble max; /* maximal allowable slider value */
gboolean visible : 1; /* slider is visible */
gboolean selectable : 1; /* slider is selectable */
gboolean movable : 1; /* slider movable */
gboolean removable : 1; /* slider is removable */
guint visible : 1; /* slider is visible */
guint selectable : 1; /* slider is selectable */
guint movable : 1; /* slider movable */
guint removable : 1; /* slider is removable */
gboolean autohide : 1; /* whether to autohide the slider */
guint autohide : 1; /* whether to autohide the slider */
GimpHandleType type; /* slider handle type */
gdouble size; /* slider handle size, as a fraction of *
* the default size */

View file

@ -217,7 +217,7 @@ gimp_font_factory_finalize (GObject *object)
g_slist_free_full (GET_PRIVATE (font_factory)->fonts_renaming_config, (GDestroyNotify) g_free);
g_free (GET_PRIVATE (font_factory)->sysconf);
g_free (GET_PRIVATE (font_factory)->conf);
g_object_unref (GET_PRIVATE (font_factory)->pango_context);
g_clear_object (&GET_PRIVATE (font_factory)->pango_context);
FcConfigDestroy (FcConfigGetCurrent ());
G_OBJECT_CLASS (parent_class)->finalize (object);
@ -867,7 +867,7 @@ gimp_font_factory_load_names (GimpFontFactory *factory)
fd = g_open ((gchar *) file, O_RDONLY, 0);
if (fd == -1)
{
g_string_append_printf (ignored_fonts, "- %s (access error: %s)\n", file, strerror (errno));
g_string_append_printf (ignored_fonts, "- %s (access error: %s)\n", file, g_strerror (errno));
n_ignored++;
continue;
}

View file

@ -89,6 +89,22 @@ gimp_text_from_parasite (const GimpParasite *parasite,
gboolean has_markup = g_str_has_prefix (parasite_data, "(markup ");
GimpParasite *new_parasite = NULL;
GString *new_data;
gboolean edited_data = FALSE;
if (! has_markup && strstr (parasite_data, "(markup \"\")") != NULL)
{
/* A bug in GIMP 3.2.2 may have created files with both a text
* and an empty markup. Get rid of the markup which is invalid
* anyway, so that it doesn't override the bare text.
* See #16169.
*/
new_data = g_string_new (parasite_data);
g_string_replace (new_data, "(markup \"\")", "", 1);
parasite_data = g_string_free (new_data, FALSE);
parasite_data_size = strlen (parasite_data) + 1;
edited_data = TRUE;
}
*before_xcf_v19 = (strstr (parasite_data, "(font \"GimpFont\"") == NULL);
/* This is for backward compatibility with older xcf files.
@ -177,6 +193,14 @@ gimp_text_from_parasite (const GimpParasite *parasite,
g_string_free (new_data, TRUE);
}
else if (edited_data)
{
new_parasite = gimp_parasite_new (gimp_parasite_get_name (parasite),
gimp_parasite_get_flags (parasite),
parasite_data_size,
parasite_data);
parasite = new_parasite;
}
if (error == NULL || *error == NULL)
gimp_config_deserialize_parasite (GIMP_CONFIG (text),
@ -185,6 +209,8 @@ gimp_text_from_parasite (const GimpParasite *parasite,
error);
gimp_parasite_free (new_parasite);
if (edited_data)
g_free (parasite_data);
}
else
{

View file

@ -106,11 +106,19 @@ gimp_text_font_name_from_xlfd (const gchar *xlfd)
switch (*fields[i])
{
case 'i':
#ifndef _UCRT
strcpy (buffers[i], "italic");
#else
strcpy_s (buffers[i], sizeof (buffers[i]), "italic");
#endif
i++;
break;
case 'o':
#ifndef _UCRT
strcpy (buffers[i], "oblique");
#else
strcpy_s (buffers[i], sizeof (buffers[i]), "oblique");
#endif
i++;
break;
case 'r':

View file

@ -112,6 +112,8 @@ struct _GimpEditSelectionTool
gdouble last_motion_x; /* Previous coords sent to _motion */
gdouble last_motion_y;
gboolean saved_show_selection;
};
struct _GimpEditSelectionToolClass
@ -177,7 +179,8 @@ gimp_edit_selection_tool_init (GimpEditSelectionTool *edit_select)
{
GimpTool *tool = GIMP_TOOL (edit_select);
edit_select->first_move = TRUE;
edit_select->first_move = TRUE;
edit_select->saved_show_selection = FALSE;
gimp_tool_control_set_active_modifiers (tool->control,
GIMP_TOOL_ACTIVE_MODIFIERS_SEPARATE);
@ -228,6 +231,9 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool,
shell = gimp_display_get_shell (display);
image = gimp_display_get_image (display);
edit_select->saved_show_selection =
gimp_display_shell_get_show_selection (shell);
/* Make a check to see if it should be a floating selection translation */
if ((edit_mode == GIMP_TRANSLATE_MODE_MASK_TO_LAYER ||
edit_mode == GIMP_TRANSLATE_MODE_MASK_COPY_TO_LAYER) &&
@ -244,6 +250,11 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool,
edit_mode = GIMP_TRANSLATE_MODE_FLOATING_SEL;
}
/* Turn off "marching ants" when moving selections or floating layers
* for better performance. */
if (edit_mode == GIMP_TRANSLATE_MODE_FLOATING_SEL)
gimp_display_shell_set_show_selection (shell, FALSE);
edit_select->edit_mode = edit_mode;
gimp_edit_selection_tool_start_undo_group (edit_select, image);
@ -460,6 +471,9 @@ gimp_edit_selection_tool_button_release (GimpTool *tool,
shell->equidistance_side_vertical = GIMP_ARRANGE_HFILL;
shell->snapped_side_horizontal = GIMP_ARRANGE_HFILL;
shell->snapped_side_vertical = GIMP_ARRANGE_HFILL;
gimp_display_shell_set_show_selection (shell,
edit_select->saved_show_selection);
}
static void

View file

@ -612,6 +612,7 @@ gimp_selection_tool_start_edit (GimpSelectionTool *sel_tool,
{
GimpTool *tool;
GimpSelectionOptions *options;
GimpDisplayShell *shell;
GError *error = NULL;
g_return_val_if_fail (GIMP_IS_SELECTION_TOOL (sel_tool), FALSE);
@ -620,6 +621,7 @@ gimp_selection_tool_start_edit (GimpSelectionTool *sel_tool,
tool = GIMP_TOOL (sel_tool);
options = GIMP_SELECTION_TOOL_GET_OPTIONS (sel_tool);
shell = gimp_display_get_shell (display);
g_return_val_if_fail (gimp_tool_control_is_active (tool->control) == FALSE,
FALSE);
@ -658,6 +660,9 @@ gimp_selection_tool_start_edit (GimpSelectionTool *sel_tool,
gimp_edit_selection_tool_start (tool, display, coords,
edit_mode, FALSE);
/* Turn off selection for performance if moved as floating selection */
gimp_display_shell_set_show_selection (shell, FALSE);
return TRUE;
}

View file

@ -26,6 +26,7 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
@ -538,14 +539,6 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
}
}
if (gtk_im_context_filter_keypress (text_tool->im_context, kevent))
{
text_tool->needs_im_reset = TRUE;
text_tool->x_pos = -1;
return TRUE;
}
gimp_text_tool_convert_gdkkeyevent (text_tool, kevent);
gimp_text_tool_ensure_proxy (text_tool);
@ -558,6 +551,14 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
return TRUE;
}
if (gtk_im_context_filter_keypress (text_tool->im_context, kevent))
{
text_tool->needs_im_reset = TRUE;
text_tool->x_pos = -1;
return TRUE;
}
gtk_text_buffer_get_iter_at_mark (buffer, &cursor,
gtk_text_buffer_get_insert (buffer));
gtk_text_buffer_get_iter_at_mark (buffer, &selection,
@ -1357,6 +1358,13 @@ gimp_text_tool_change_size (GimpTextTool *text_tool,
GtkTextBuffer *buffer = GTK_TEXT_BUFFER (text_tool->buffer);
GtkTextIter start;
GtkTextIter end;
gdouble default_size;
gdouble x_res, y_res;
gimp_image_get_resolution (text_tool->image, &x_res, &y_res);
default_size = gimp_units_to_points (text_tool->text->font_size,
text_tool->text->unit, y_res);
if (! gtk_text_buffer_get_selection_bounds (buffer, &start, &end))
{
@ -1365,7 +1373,7 @@ gimp_text_tool_change_size (GimpTextTool *text_tool,
gtk_text_iter_order (&start, &end);
gimp_text_buffer_change_size (text_tool->buffer, &start, &end,
amount * PANGO_SCALE);
amount * PANGO_SCALE, default_size * PANGO_SCALE);
}
static void

View file

@ -32,12 +32,12 @@
#include "unique.h"
#ifndef G_OS_WIN32
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
static gboolean gimp_unique_dbus_open (const gchar **filenames,
gboolean as_new);
static gboolean gimp_unique_dbus_batch_run (const gchar *batch_interpreter,
const gchar **batch_commands);
#else
#elif defined(G_OS_WIN32)
static gboolean gimp_unique_win32_open (const gchar **filenames,
gboolean as_new);
#endif
@ -147,7 +147,7 @@ gimp_unique_win32_open (const gchar **filenames,
return FALSE;
}
#else
#elif !defined(PLATFORM_OSX)
static gboolean
gimp_unique_dbus_open (const gchar **filenames,

View file

@ -632,6 +632,20 @@ gimp_action_get_display_accels (GimpAction *action)
accels = g_strdupv (GET_PRIVATE (action)->accels);
/* "windows-hide-docks" has no registered accelerator because Tab takes
* precedence over standard accessibility usage across the whole software.
* Inject a cosmetic display hint so the menu label and shortcut editor
* both show "Tab" without registering a real accelerator.
*/
if ((accels == NULL || accels[0] == NULL) &&
g_strcmp0 (gimp_action_get_name (action), "windows-hide-docks") == 0)
{
g_strfreev (accels);
accels = g_new0 (gchar *, 2);
accels[0] = gtk_accelerator_get_label (GDK_KEY_Tab, 0);
return accels;
}
for (i = 0; accels != NULL && accels[i] != NULL; i++)
{
guint accel_key = 0;

View file

@ -369,7 +369,7 @@ gimp_colormap_editor_color_update (GimpColorDialog *dialog,
{
push_undo = TRUE;
if (state & gimp_get_toggle_behavior_mask ())
if ((guint)state & (guint)gimp_get_toggle_behavior_mask ())
gimp_context_set_background (image_editor->context, color);
else
gimp_context_set_foreground (image_editor->context, color);

View file

@ -163,7 +163,7 @@ gimp_container_tree_view_drop_status (GimpContainerTreeView *tree_view,
target_list = gtk_drag_dest_get_target_list (GTK_WIDGET (tree_view->view));
target_atom = gtk_drag_dest_find_target (GTK_WIDGET (tree_view->view),
context, target_list);
if (! gtk_target_list_find (target_list, target_atom, &src_type))
if (! gtk_target_list_find (target_list, target_atom, (guint *) &src_type))
goto drop_impossible;
switch (src_type)

View file

@ -1229,7 +1229,7 @@ gimp_dashboard_init (GimpDashboard *dashboard)
gimp_meter_set_history_resolution (GIMP_METER (meter),
interval / 1000.0);
gimp_meter_set_history_duration (GIMP_METER (meter),
priv->history_duration / 1000.0);
(gdouble) priv->history_duration / 1000.0);
gtk_box_pack_start (GTK_BOX (vbox2), meter, FALSE, FALSE, 0);
gtk_widget_show (meter);
@ -2418,6 +2418,11 @@ static void
gimp_dashboard_sample_memory_used (GimpDashboard *dashboard,
Variable variable)
{
#ifdef TASK_VM_INFO_REV0_COUNT
task_vm_info_data_t info;
mach_msg_type_number_t infoCount;
#endif
GimpDashboardPrivate *priv = dashboard->priv;
VariableData *variable_data = &priv->variables[variable];
@ -2433,8 +2438,7 @@ gimp_dashboard_sample_memory_used (GimpDashboard *dashboard,
variable_data->available = TRUE;
variable_data->value.size = info.resident_size;
#else
task_vm_info_data_t info;
mach_msg_type_number_t infoCount = TASK_VM_INFO_COUNT;
infoCount = TASK_VM_INFO_COUNT;
if( task_info(mach_task_self (), TASK_VM_INFO,
(task_info_t)&info, &infoCount ) != KERN_SUCCESS )
@ -2585,7 +2589,11 @@ gimp_dashboard_sample_memory_used (GimpDashboard *dashboard,
buffer[size] = '\0';
#ifndef _UCRT
if (sscanf (buffer, "%*u %llu %llu", &resident, &shared) != 2)
#else
if (sscanf_s (buffer, "%*u %llu %llu", &resident, &shared) != 2)
#endif
return;
variable_data->available = TRUE;
@ -4970,7 +4978,7 @@ gimp_dashboard_set_history_duration (GimpDashboard *dashboard,
if (group_data->meter)
{
gimp_meter_set_history_duration (group_data->meter,
history_duration / 1000.0);
(gdouble) history_duration / 1000.0);
}
}

View file

@ -795,7 +795,11 @@ gimp_device_info_pad_action_map_foreach (GimpPadActions *pad_actions,
label = g_strdup (gimp_action_get_label (action));
accel_pos = g_utf8_strchr (label, -1, '_');
if (accel_pos)
#ifndef _UCRT
strcpy (accel_pos, accel_pos + 1);
#else
strcpy_s (accel_pos, strlen (accel_pos), accel_pos + 1);
#endif
gtk_pad_controller_set_action (controller,
/* Action type enums are binary compatible */

View file

@ -297,7 +297,6 @@ gimp_device_info_editor_constructed (GObject *object)
* not break anything in this use case anyway).
*/
GimpCurve *curve;
gchar *title;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *view;
@ -305,22 +304,10 @@ gimp_device_info_editor_constructed (GObject *object)
GtkWidget *combo;
GtkWidget *button;
/* TODO: right now this string is split in 2 localized strings,
* to avoid breaking string freeze. After GIMP 3.2, we should just
* create the "Pressure Curve" string because that's our only
* case so far.
*/
/* e.g. "Pressure Curve" for mapping input device axes */
title = g_strdup_printf (_("%s Curve"),
_("Pressure"));
frame = gimp_frame_new (title);
frame = gimp_frame_new (_("Pressure Curve"));
gtk_box_pack_start (GTK_BOX (editor), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
g_free (title);
curve = gimp_device_info_get_curve (private->info, GDK_AXIS_PRESSURE);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);

View file

@ -126,7 +126,6 @@ _gimp_drawable_tree_view_filter_editor_show (GimpDrawableTreeView *view,
GimpDrawableTreeViewFiltersEditor *editor = view->editor;
GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (view);
GimpContainer *filters;
GList *list;
gint n_editable;
gboolean visible = FALSE;
@ -285,17 +284,7 @@ _gimp_drawable_tree_view_filter_editor_show (GimpDrawableTreeView *view,
}
filters = gimp_drawable_get_filters (drawable);
for (list = GIMP_LIST (filters)->queue->tail;
list;
list = g_list_previous (list))
{
if (GIMP_IS_DRAWABLE_FILTER (list->data))
{
if (gimp_filter_get_active (list->data))
visible = TRUE;
}
}
visible = gimp_drawable_has_visible_filters (drawable);
/* Set the initial value for the effect visibility toggle */
g_signal_handlers_block_by_func (editor->visible_button,
@ -444,6 +433,7 @@ gimp_drawable_filters_editor_set_sensitive (GimpDrawableTreeView *view)
GimpContainer *filters;
gboolean is_group = FALSE;
gboolean is_editable = FALSE;
gboolean is_temporary;
gboolean has_visible_filters;
gint index;
@ -451,6 +441,8 @@ gimp_drawable_filters_editor_set_sensitive (GimpDrawableTreeView *view)
index = gimp_container_get_child_index (filters,
GIMP_OBJECT (editor->filter));
is_temporary = (gimp_drawable_filter_get_temporary (editor->filter) ||
! gimp_drawable_filter_get_mask (editor->filter));
/* do not allow merging down effects on group layers */
if (gimp_viewable_get_children (GIMP_VIEWABLE (editor->drawable)))
@ -462,10 +454,19 @@ gimp_drawable_filters_editor_set_sensitive (GimpDrawableTreeView *view)
is_editable = (index >= first_editable &&
index <= last_editable);
g_signal_handlers_block_by_func (editor->visible_button,
gimp_drawable_filters_editor_visible_all_toggled,
view);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->visible_button),
has_visible_filters);
g_signal_handlers_unblock_by_func (editor->visible_button,
gimp_drawable_filters_editor_visible_all_toggled,
view);
gtk_widget_set_sensitive (editor->visible_button,
TRUE);
gtk_widget_set_sensitive (editor->edit_button,
is_editable);
is_editable && ! is_temporary);
gtk_widget_set_sensitive (editor->raise_button,
index > first_editable);
gtk_widget_set_sensitive (editor->lower_button,
@ -473,10 +474,11 @@ gimp_drawable_filters_editor_set_sensitive (GimpDrawableTreeView *view)
gtk_widget_set_sensitive (editor->merge_button,
! is_group &&
has_visible_filters &&
! is_temporary &&
(! GIMP_IS_RASTERIZABLE (editor->drawable) ||
gimp_rasterizable_is_rasterized (GIMP_RASTERIZABLE (editor->drawable))));
gtk_widget_set_sensitive (editor->remove_button,
is_editable);
is_editable && ! is_temporary);
if (is_group ||
(GIMP_IS_RASTERIZABLE (editor->drawable) &&

View file

@ -504,9 +504,17 @@ gimp_file_proc_view_pattern_from_extension (const gchar *extension,
pattern = g_new (gchar, 6 + 4 * len);
if (is_meta)
#ifndef _UCRT
strcpy (pattern, "*.*.");
#else
strcpy_s (pattern, 6 + 4 * len, "*.*.");
#endif
else
#ifndef _UCRT
strcpy (pattern, "*.");
#else
strcpy_s (pattern, 6 + 4 * len, "*.");
#endif
for (i = 0, p = pattern + 2; i < len; i++, p+= 4)
{

View file

@ -190,8 +190,8 @@ gimp_fill_editor_constructed (GObject *object)
"pattern-view-size");
gimp_enum_radio_box_add (GTK_BOX (box), pattern_box,
(editor->use_custom_style ?
GIMP_CUSTOM_STYLE_PATTERN :
GIMP_FILL_STYLE_PATTERN),
(gint) GIMP_CUSTOM_STYLE_PATTERN :
(gint) GIMP_FILL_STYLE_PATTERN),
FALSE);
}

View file

@ -729,7 +729,20 @@ gimp_help_get_locales (Gimp *gimp)
static GFile *
gimp_help_get_user_manual_basedir (void)
{
return gimp_data_directory_file ("help", NULL);
GFile *user_dir;
GFile *sys_dir;
/* 1. Help is on user settings (e.g. for AppImage, macOS .app) */
user_dir = gimp_directory_file ("help", NULL);
if (g_file_query_exists (user_dir, NULL))
{
return user_dir;
}
/* 2. Fallback: help is on user installation */
g_object_unref (user_dir);
sys_dir = gimp_data_directory_file ("help", NULL);
return sys_dir;
}
static void

View file

@ -40,7 +40,6 @@
#include "core/gimpchannel.h"
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpfilloptions.h"
#include "core/gimpimage-undo.h"
#include "core/gimpimage-undo-push.h"
#include "core/gimpimage.h"
@ -53,7 +52,6 @@
#include "core/gimptreehandler.h"
#include "path/gimpvectorlayer.h"
#include "path/gimpvectorlayeroptions.h"
#include "text/gimptextlayer.h"
@ -757,25 +755,14 @@ gimp_layer_tree_view_drop_viewables (GimpContainerTreeView *view,
gimp_item_is_vector_layer (GIMP_ITEM (dest_viewable)) &&
GIMP_IS_PATTERN (src_viewable))
{
GimpVectorLayerOptions *vector_options = NULL;
GimpFillOptions *vector_fill = NULL;
gimp_vector_layer_set (GIMP_VECTOR_LAYER (dest_viewable), NULL,
"fill-style", GIMP_CUSTOM_STYLE_PATTERN,
"fill-pattern", GIMP_PATTERN (src_viewable),
NULL);
vector_options =
gimp_vector_layer_get_options (GIMP_VECTOR_LAYER (dest_viewable));
if (vector_options)
vector_fill = vector_options->fill_options;
if (vector_fill)
{
gimp_context_set_pattern (GIMP_CONTEXT (vector_fill),
GIMP_PATTERN (src_viewable));
gimp_fill_options_set_custom_style (vector_fill,
GIMP_CUSTOM_STYLE_PATTERN);
gimp_vector_layer_refresh (GIMP_VECTOR_LAYER (dest_viewable));
gimp_image_flush (gimp_item_tree_view_get_image (item_view));
return;
}
gimp_vector_layer_refresh (GIMP_VECTOR_LAYER (dest_viewable));
gimp_image_flush (gimp_item_tree_view_get_image (item_view));
return;
}
}
@ -803,24 +790,14 @@ gimp_layer_tree_view_drop_color (GimpContainerTreeView *view,
}
else if (gimp_item_is_vector_layer (GIMP_ITEM (dest_viewable)))
{
GimpVectorLayerOptions *vector_options = NULL;
GimpFillOptions *vector_fill = NULL;
gimp_vector_layer_set (GIMP_VECTOR_LAYER (dest_viewable), NULL,
"fill-style", GIMP_CUSTOM_STYLE_SOLID_COLOR,
"fill-color", color,
NULL);
vector_options =
gimp_vector_layer_get_options (GIMP_VECTOR_LAYER (dest_viewable));
if (vector_options)
vector_fill = vector_options->fill_options;
if (vector_fill)
{
gimp_context_set_foreground (GIMP_CONTEXT (vector_fill), color);
gimp_fill_options_set_custom_style (vector_fill,
GIMP_CUSTOM_STYLE_SOLID_COLOR);
gimp_vector_layer_refresh (GIMP_VECTOR_LAYER (dest_viewable));
gimp_image_flush (gimp_item_tree_view_get_image (item_view));
return;
}
gimp_vector_layer_refresh (GIMP_VECTOR_LAYER (dest_viewable));
gimp_image_flush (gimp_item_tree_view_get_image (item_view));
return;
}
GIMP_CONTAINER_TREE_VIEW_CLASS (parent_class)->drop_color (view, color,

View file

@ -593,7 +593,7 @@ gimp_menu_section_items_changed (GMenuModel *model,
GtkWidget *separator;
gboolean found = FALSE;
gint count = position;
gint real_pos = 0;
/*gint real_pos = 0;*/
separator = g_hash_table_lookup (menu->priv->sections, model);
g_return_if_fail (separator != NULL);
@ -601,7 +601,7 @@ gimp_menu_section_items_changed (GMenuModel *model,
children = gtk_container_get_children (GTK_CONTAINER (menu));
for (iter = children; iter; iter = iter->next)
{
real_pos++;
/*real_pos++;*/
if (! found)
{

View file

@ -599,7 +599,7 @@ gimp_modifiers_editor_notify_accelerator (GtkWidget *widget,
GdkModifierType old_modifiers;
GdkModifierType modifiers;
old_modifiers = (GdkModifierType) g_object_get_data (G_OBJECT (widget), "shortcut-modifiers");
old_modifiers = (GdkModifierType) GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "shortcut-modifiers"));
shortcut = g_object_get_data (G_OBJECT (widget), "shortcut-button");
combo = g_object_get_data (G_OBJECT (widget), "shortcut-action");

View file

@ -588,8 +588,13 @@ gimp_selection_data_get_image (GtkSelectionData *selection,
gint pid;
gint ID;
#ifndef _UCRT
if (sscanf (str, "%i:%i", &pid, &ID) == 2 &&
pid == gimp_get_pid ())
#else
if (sscanf_s (str, "%i:%i", &pid, &ID) == 2 &&
pid == gimp_get_pid ())
#endif
{
return gimp_image_get_by_id (gimp, ID);
}
@ -639,8 +644,13 @@ gimp_selection_data_get_component (GtkSelectionData *selection,
gint ID;
gint ch;
#ifndef _UCRT
if (sscanf (str, "%i:%i:%i", &pid, &ID, &ch) == 3 &&
pid == gimp_get_pid ())
#else
if (sscanf_s (str, "%i:%i:%i", &pid, &ID, &ch) == 3 &&
pid == gimp_get_pid ())
#endif
{
GimpImage *image = gimp_image_get_by_id (gimp, ID);
@ -688,8 +698,13 @@ gimp_selection_data_get_item (GtkSelectionData *selection,
gint pid;
gint ID;
#ifndef _UCRT
if (sscanf (str, "%i:%i", &pid, &ID) == 2 &&
pid == gimp_get_pid ())
#else
if (sscanf_s (str, "%i:%i", &pid, &ID) == 2 &&
pid == gimp_get_pid ())
#endif
{
return gimp_item_get_by_id (gimp, ID);
}
@ -961,8 +976,13 @@ gimp_selection_data_get_object (GtkSelectionData *selection,
gpointer object_addr;
gint name_offset = 0;
#ifndef _UCRT
if (sscanf (str, "%i:%p:%n", &pid, &object_addr, &name_offset) >= 2 &&
pid == gimp_get_pid () && name_offset > 0)
#else
if (sscanf_s (str, "%i:%p:%n", &pid, &object_addr, &name_offset) >= 2 &&
pid == gimp_get_pid () && name_offset > 0)
#endif
{
const gchar *name = str + name_offset;

View file

@ -442,7 +442,8 @@ void
gimp_text_buffer_change_size (GimpTextBuffer *buffer,
const GtkTextIter *start,
const GtkTextIter *end,
gint count)
gint count,
gint default_size)
{
GtkTextIter iter;
GtkTextIter span_start;
@ -479,16 +480,19 @@ gimp_text_buffer_change_size (GimpTextBuffer *buffer,
if (iter_size != span_size ||
gtk_text_iter_compare (&iter, end) >= 0)
{
gint base_size = (span_size == 0) ? default_size : span_size;
gint new_size = base_size + count;
if (span_size != 0)
{
gtk_text_buffer_remove_tag (GTK_TEXT_BUFFER (buffer), span_tag,
&span_start, &span_end);
}
if ((span_size + count) > 0)
if (new_size > 0)
{
span_tag = gimp_text_buffer_get_size_tag (buffer,
span_size + count);
new_size);
gtk_text_buffer_apply_tag (GTK_TEXT_BUFFER (buffer), span_tag,
&span_start, &span_end);
@ -1376,7 +1380,11 @@ gimp_text_buffer_name_to_tag (GimpTextBuffer *buffer,
guint r, g, b;
guchar rgb[3];
#ifndef _UCRT
sscanf (value, "#%02x%02x%02x", &r, &g, &b);
#else
sscanf_s (value, "#%02x%02x%02x", &r, &g, &b);
#endif
rgb[0] = r;
rgb[1] = g;
rgb[2] = b;

View file

@ -91,7 +91,8 @@ void gimp_text_buffer_set_size (GimpTextBuffer *buff
void gimp_text_buffer_change_size (GimpTextBuffer *buffer,
const GtkTextIter *start,
const GtkTextIter *end,
gint amount);
gint amount,
gint default_size);
GtkTextTag * gimp_text_buffer_get_iter_baseline (GimpTextBuffer *buffer,
const GtkTextIter *iter,

View file

@ -923,7 +923,7 @@ gimp_window_set_hint (GtkWindow *window,
/* similar to what we have in libgimp/gimpui.c */
/* TODO: Restore when we use it on Windows */
#ifndef G_OS_WIN32
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
static GdkWindow *
gimp_get_foreign_window (gpointer window)
{
@ -2595,7 +2595,7 @@ gimp_window_set_transient_cb (GtkWidget *window,
GdkEventAny *event G_GNUC_UNUSED,
GBytes *handle)
{
#ifndef G_OS_WIN32
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
gboolean transient_set = FALSE;
#endif

View file

@ -2613,8 +2613,8 @@ xcf_load_layer_props (XcfInfo *info,
{
gimp_message (info->gimp, G_OBJECT (info->progress),
GIMP_MESSAGE_WARNING,
"XCF Warning: invalid link in XCF file. "
"The link layer \"%s\" is downgraded to a raster layer.",
_("XCF Warning: invalid link in XCF file. "
"The link layer \"%s\" is downgraded to a raster layer."),
gimp_object_get_name (*layer));
}
else
@ -2633,8 +2633,8 @@ xcf_load_layer_props (XcfInfo *info,
{
gimp_message (info->gimp, G_OBJECT (info->progress),
GIMP_MESSAGE_WARNING,
"XCF Warning: cycling link detected in XCF file. "
"The link layer \"%s\" is downgraded to a raster layer.",
_("XCF Warning: circular reference detected in XCF file. "
"The link layer \"%s\" is downgraded to a raster layer."),
gimp_object_get_name (*layer));
ignore = TRUE;
break;
@ -4939,7 +4939,7 @@ xcf_load_tile_rle (XcfInfo *info,
{
guchar *data = tile_data + i;
gint size = tile_rect->width * tile_rect->height;
gint count = 0;
/*gint count = 0;*/
guchar val;
gint length;
gint j;
@ -4968,7 +4968,7 @@ xcf_load_tile_rle (XcfInfo *info,
xcfdata += 2;
}
count += length;
/*count += length;*/
size -= length;
if (size < 0)
@ -5002,7 +5002,7 @@ xcf_load_tile_rle (XcfInfo *info,
xcfdata += 2;
}
count += length;
/*count += length;*/
size -= length;
if (size < 0)

View file

@ -332,7 +332,11 @@ xcf_save_image (XcfInfo *info,
}
else
{
#ifndef _UCRT
strcpy (version_tag, "gimp xcf file");
#else
strcpy_s (version_tag, sizeof (version_tag), "gimp xcf file");
#endif
}
xcf_write_int8_check_error (info, (guint8 *) version_tag, 14, ;);
@ -1861,7 +1865,7 @@ xcf_save_prop (XcfInfo *info,
g_return_val_if_reached (FALSE);
xcf_write_int32_check_error (info, &item_type, 1, va_end (args));
if (! gimp_item_list_is_pattern (set, &method))
if (! gimp_item_list_is_pattern (set, (GimpSelectMethod *) &method))
method = G_MAXUINT32;
xcf_write_int32_check_error (info, &method, 1, va_end (args));

View file

@ -19,7 +19,7 @@ case $(readlink /proc/$$/exe) in
esac
set -e
if [ "$0" != 'build/linux/appimage/3_dist-gimp-goappimage.sh' ] && [ $(basename "$PWD") != 'appimage' ]; then
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n'
exit 1
elif [ $(basename "$PWD") = 'appimage' ]; then
cd ../../..
@ -380,6 +380,8 @@ conf_app GS_LIB "share/ghostscript/10*/Resource/Init"
### file-wmf support
bund_usr "$UNIX_PREFIX" "share/fonts/type1/urw-base35/Nimbus*" --dest "share/libwmf/fonts"
bund_usr "$UNIX_PREFIX" "share/fonts/type1/urw-base35/StandardSymbols*" --dest "share/libwmf/fonts"
### "Send by Email" support
bund_usr "$UNIX_PREFIX" "bin/xdg-email"
### Debug menu: if show_debug_menu is true in app/main.c or --show-debug-menu CLI option is set
#### Image graph support
bund_usr "$UNIX_PREFIX" "bin/libgvc*" --rename "bin/dot"

View file

@ -14,7 +14,7 @@ elif [ $(basename "$PWD") = 'flatpak' ]; then
cd ../../..
fi
if [ -z "$GITLAB_CI" ]; then
git submodule update --init
git submodule update --init || true #true is for this script work on tarballs too
fi

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