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

Compare commits

...

98 Commits

Author SHA1 Message Date
Gabriele
cb5d8ac8a3 Merge branch 'gabrybarbe-fix-color-area-update' into 'master'
issue #14883: make color preview update immediate

Closes #14883

See merge request GNOME/gimp!2465
2025-10-05 00:38:42 +02:00
Bruno Lopes
d8d73266bc build/linux: Update poppler module to 25.10
Synced from
6d4124f7b8
2025-10-04 18:51:18 -03:00
Bruno Lopes
356c2baec5 gitlab-ci, build/windows: Remove forgotten comment about fixed #12284 2025-10-04 16:16:49 -03:00
Bruno Lopes
aea7042aa1 meson: Support Windows native paths (aka backslashes) on -Dprefix
Closes: #12284
2025-10-04 16:12:00 -03:00
Alan Mortensen
97944a5415 Update Danish translation
(cherry picked from commit d81cfcc325)
2025-10-04 12:48:26 +00:00
Alx Sa
a5182a010f tools: Fix missing cursor for MyPaint Brush tool
Resolves #15001
In the MyPaint Brushes v2 port (ea8b9dc1),
I implemented a cursor_update () function from the
parent class. However, I did not call the parent's
version of the function afterwards, so the MyPaint
Brush cursor was not being redrawn. This patch
adds the call to fix the cursor display issue.
2025-10-03 22:14:52 +00:00
Øyvind Kolås
9c2c5ff183 meson, app: depend on GEGL-0.4.64 2025-10-03 23:56:36 +02:00
Bruno Lopes
f09007507f Declare gexiv2 dependency on many targets (due to gimpmetadata.h)
Our build files were relying 'sysroot' to find gexiv2.h but this is
not possible with Apple Clang om which sysroot points to macOS SDK.
So, exotic environments like Homebrew were failing. Let's fix this.
2025-10-03 18:31:53 -03:00
Bruno Lopes
2b91551f4e gitlab-ci: Complete cbe56ff3 2025-10-03 09:03:26 -03:00
Bruno Lopes
cbe56ff388 gitlab-ci: Remove dangling MSYSTEM_PREFIX on Win job names
It makes them consistent with other non-Windows jobs so
easier to read.
2025-10-02 21:37:33 -03:00
Anders Jonsson
7cec3f52b9 .gitlab: fix template typo 2025-10-03 00:54:09 +02:00
Alx Sa
81c67e5614 tools: Don't commit Filter Tool without a filter
The Filter Tool is a "hidden" tool that we switch to
when applying a filter. Like other tools, it commits when
we save our image. However, we may no longer have an
active filter in the tool when we do so (like, after applying
an NDE filter). Because we check the drawable from the
filter to confirm whether we should force NDE or not,
this can cause a CRITICAL when we try to access a now
non-existent filter.

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

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

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

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

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

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

We cannot pop an error up every time:

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

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

This fixes such error message:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

```
[0/2] Running external command gimp30-windows-installer-pot
/usr/bin/xgettext: warning: ITS rule file 'gimp-ms-installer-config.its' does not exist; check your gettext installation
/usr/bin/xgettext: warning: file 'build/windows/installer/lang/setup.isl.xml.in' extension 'xml' is unknown; will try C
```
2025-09-23 12:13:48 +02:00
Jehan
b50781730c NEWS: update. 2025-09-23 11:56:04 +02:00
Emin Tufan Çetin
2b669917c2 Update Turkish translation 2025-09-23 09:54:29 +00:00
Martin
7d22110cfb Update Slovenian translation 2025-09-23 07:33:11 +00:00
luming zh
86cc15cbf0 Update Chinese (China) translation 2025-09-23 00:31:05 +00:00
luming zh
865e6363e1 Update Chinese (China) translation 2025-09-23 00:24:04 +00:00
Jehan
789d82355c app, pdb: "Add Layer Mask" dialog asks whether to edit mask immediately.
While there are cases when you want to edit the mask straight away (this is
often the case when starting with a white or black mask), in many other cases,
the mask may be already as you want it per its initialization (e.g. when
initializing with a channel, selection, the alpha channel, etc.).

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

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

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

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

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

Cf. commit Infrastructure/gimp-web@bca40810
2025-09-22 12:30:08 +02:00
Gabriele Barbero
9d64379b1c libgimpcolor, libgimpwidgets: make color preview update immediate
Previously, the `gimp_color_area_set_color` function compared the new color
to the current one using perceptual similarity. This caused small or gradual
color changes to be missed, resulting in a "laggy" update of the color preview
in GimpColorSelection.

Now, the check is performed on the actual color difference, and the preview
is updated every time the color changes, even for minimal variations.
This ensures the color preview is always immediate.
2025-09-13 00:44:51 +02:00
176 changed files with 25896 additions and 22679 deletions

View File

@@ -13,7 +13,7 @@ spec:
test_pipeline:
description: 'Pipelines used only for testing'
options:
- GIMP_CI_MESON_GCC #trigger the Debian GCC build (rare usefulness)
- GIMP_CI_MESON_CLANG #trigger the Debian Clang build (rare usefulness)
- GIMP_CI_RASTER_ICONS #trigger the Debian Clang build without vector icons (rare usefulness)
- GIMP_CI_CPPCHECK #trigger cppcheck (static code analysis)
- none
@@ -30,7 +30,7 @@ workflow:
##################################################
## 1. On MERGE REQUESTS, the following are triggered:
## - Abbreviated Linux Clang build
## - Abbreviated Linux build
## - Building quality tests (static code analysis)
## - clang-format (static code analysis)
## - Execution tests (dynamic code analysis)
@@ -44,7 +44,7 @@ workflow:
# GitLab is quite sensitive about rules 'if' order so be careful
## 3. On COMMITS except tags.
## - Linux Clang build
## - Linux build
## - Building quality tests (static code analysis)
## - Execution tests (dynamic code analysis)
## - Source tarball
@@ -84,6 +84,7 @@ workflow:
image: $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}
variables:
DEB_VERSION: "bookworm"
UMFPACK: libumfpack5
RUNNER: "x86_64_v3"
# Common cloning procedure
GIT_DEPTH: "1"
@@ -102,27 +103,30 @@ stages:
- analysis
- distribution
## AppImage CI (Debian) ##
.debian:
## Common GNU/Linux 64-bit CI (Debian) ##
.debian-nonreloc:
extends: .default
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:AppImage.*/'
interruptible: true
- if: '$GIMP_CI_APPIMAGE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_APPIMAGE.*/'
- <<: *CI_MERGE
- <<: *CI_COMMIT
variables: {}
- if: '$GIMP_CI_MESON_CLANG != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_CLANG.*/'
variables:
CC: clang
CXX: clang++
CC_LD: lld
CXX_LD: lld
TOOLCHAIN: "clang lld"
VARIANT: -clang
- if: '$GIMP_CI_RASTER_ICONS != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_RASTER_ICONS.*/'
variables:
MESON_OPTIONS: "-Dvector-icons=false"
VARIANT: "-raster"
- <<: *CI_RELEASE
parallel:
matrix:
- RUNNER: [aarch64, x86_64_v3]
tags:
- $RUNNER
variables:
CC: "clang"
CXX: "clang++"
CC_LD: lld
CXX_LD: lld
before_script:
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install-${RUNNER}"
timeout: 20m
timeout: 30m
.debian_environ: &ENVIRON
# See: https://testing.developer.gimp.org/core/setup/build/#preparing-for-building
@@ -138,13 +142,12 @@ stages:
- export GI_TYPELIB_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
- printf "\e[0Ksection_end:`date +%s`:environ\r\e[0K\n"
deps-debian:
extends: .debian
deps-debian-nonreloc:
extends: .debian-nonreloc
stage: dependencies
image: quay.io/buildah/stable
variables:
GIT_STRATEGY: none
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
script:
- export BUILDAH_FORMAT=docker
- export STORAGE_DRIVER=vfs
@@ -158,16 +161,15 @@ deps-debian:
- echo "RUN apt-get install -qq -y --no-install-recommends ca-certificates" >> Dockerfile
## Build-time only dependencies
- echo "RUN apt-get install -qq -y --no-install-recommends \\" >> Dockerfile
- echo "appstream
- echo "${TOOLCHAIN:-build-essential}
appstream
bison
clang
desktop-file-utils
flex
gi-docgen
git
gobject-introspection
libgtk-3-bin
lld
meson
valac
xsltproc" >> Dockerfile
@@ -194,6 +196,7 @@ deps-debian:
libgtk-3-dev
libgudev-1.0-dev
libheif-dev
$LIBHEIF_PLUGINS
libjson-glib-dev
libjxl-dev
liblcms2-dev
@@ -209,7 +212,7 @@ deps-debian:
librsvg2-dev
libsuitesparse-dev
libtiff-dev
libumfpack5
$UMFPACK
libunwind-dev
libwebp-dev
libwmf-dev
@@ -226,10 +229,12 @@ deps-debian:
- echo "RUN printf \"\e[0Ksection_start:`date +%s`:environ[collapsed=true]\r\e[0KPreparing build environment\n\"" >> Dockerfile2;
- echo "ENV PKG_CONFIG_PATH=\"${GIMP_PREFIX}/lib/$([ "$(uname -m)" = 'aarch64' ] && echo "aarch64-linux-gnu/" || echo "x86_64-linux-gnu/")pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}\"" >> Dockerfile2;
- echo "ENV XDG_DATA_DIRS=\"${GIMP_PREFIX}/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}\"" >> Dockerfile2;
- echo "ENV CC=\"$CC\"" >> Dockerfile2;
- echo "ENV CXX=\"$CXX\"" >> Dockerfile2;
- echo "ENV CC_LD=\"$CC_LD\"" >> Dockerfile2;
- echo "ENV CXX_LD=\"$CXX_LD\"" >> Dockerfile2;
- if [ "$VARIANT" = "-clang" ]; then
echo "ENV CC=\"$CC\"" >> Dockerfile2;
echo "ENV CXX=\"$CXX\"" >> Dockerfile2;
echo "ENV CC_LD=\"$CC_LD\"" >> Dockerfile2;
echo "ENV CXX_LD=\"$CXX_LD\"" >> Dockerfile2;
fi
- echo "ENV CLICOLOR_FORCE=\"1\"" >> Dockerfile2;
- echo "RUN printf \"\e[0Ksection_end:`date +%s`:environ\r\e[0K\n\"" >> Dockerfile2;
# Build some dependencies
@@ -259,11 +264,88 @@ deps-debian:
- gegl/_build-${RUNNER}/config.h
expire_in: 2 hours
gimp-debian-nonreloc:
extends: .debian-nonreloc
needs: ["deps-debian-nonreloc"]
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- *ENVIRON
# Check building
- printf "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP\n"
- meson setup _build-${RUNNER} -Dprefix="${GIMP_PREFIX}"
-Dfile-plug-ins-test=true
$MESON_OPTIONS
- cd _build-${RUNNER}
- ninja
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
# Check execution
- printf "\e[0Ksection_start:`date +%s`:gimp_test[collapsed=true]\r\e[0KTesting GIMP execution\n"
- ninja test
- printf "\e[0Ksection_end:`date +%s`:gimp_test\r\e[0K\n"
# Check source
- printf "\e[0Ksection_start:`date +%s`:gimp_tar[collapsed=true]\r\e[0KChecking GIMP source\n"
- if [ $(git diff |wc -l) -ne 0 ]; then
printf "ERROR. A generated file was updated without the source:\n";
git diff;
exit 1;
fi
- if [ "$VARIANT" != "-clang" ] && [ "$VARIANT" != "-raster" ] && [ "$CI_PIPELINE_SOURCE" != "merge_request_event" ]; then
ninja dist > ninja_dist.log 2>&1 || { cat ninja_dist.log; exit 1; };
fi
- printf "\e[0Ksection_end:`date +%s`:gimp_tar\r\e[0K\n"
# Check install
- printf "\e[0Ksection_start:`date +%s`:gimp_install[collapsed=true]\r\e[0KChecking GIMP installation\n"
- ninja install > ninja_install.log 2>&1 || { cat ninja_install.log; exit 1; };
- printf "\e[0Ksection_end:`date +%s`:gimp_install\r\e[0K\n"
artifacts:
paths:
- _install-${RUNNER}/
- _build-${RUNNER}/meson-logs/meson-log.txt
- _build-${RUNNER}/meson-dist/
- _build-${RUNNER}/config.h
reports:
junit: "_build-${RUNNER}/meson-logs/testlog.junit.xml"
expire_in: 2 days
## AppImage CI (Debian) ##
.debian:
extends: .debian-nonreloc
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:AppImage.*/'
interruptible: true
- if: '$GIMP_CI_APPIMAGE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_APPIMAGE.*/'
- <<: *CI_RELEASE
parallel:
matrix:
- RUNNER: [aarch64, x86_64_v3]
tags:
- $RUNNER
variables:
#FIXME: remove this variables: key and go back to relying on .default DEB_VERSION on GIMP 3.3/3.4
DEB_VERSION: "trixie"
UMFPACK: libumfpack6
LIBHEIF_PLUGINS: "libheif-plugin-dav1d libheif-plugin-aomenc libheif-plugin-libde265 libheif-plugin-x265 libheif-plugin-j2kdec libheif-plugin-j2kenc"
deps-debian:
extends: .debian
stage: !reference [deps-debian-nonreloc, stage]
image: !reference [deps-debian-nonreloc, image]
variables:
GIT_STRATEGY: none
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
script:
- !reference [deps-debian-nonreloc, script]
artifacts: !reference [deps-debian-nonreloc, artifacts]
gimp-debian:
extends: .debian
needs: ["deps-debian"]
stage: build
stage: !reference [gimp-debian-nonreloc, stage]
variables:
#FIXME: remove this variables: key and go back to relying on gimp-debian-nonreloc variables: on GIMP 3.3/3.4
GIT_SUBMODULE_STRATEGY: recursive
script:
- *ENVIRON
@@ -293,85 +375,6 @@ gimp-debian:
expire_in: 2 days
## GNU/Linux 64-bit CIs (Debian) ##
.debian-nonreloc:
extends: .debian
rules:
- <<: *CI_MERGE
- <<: *CI_COMMIT
variables: {}
- if: '$GIMP_CI_MESON_GCC != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_GCC.*/'
variables:
CC: "cc"
CXX: "c++"
CC_LD: bfd
CXX_LD: bfd
VARIANT: "-gcc"
- if: '$GIMP_CI_RASTER_ICONS != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_RASTER_ICONS.*/'
variables:
MESON_OPTIONS: "-Dvector-icons=false"
VARIANT: "-raster"
- <<: *CI_RELEASE
parallel:
matrix:
- RUNNER: x86_64_v3
tags: []
deps-debian-nonreloc:
extends: .debian-nonreloc
stage: !reference [deps-debian, stage]
image: !reference [deps-debian, image]
variables:
GIT_STRATEGY: none
script:
- !reference [deps-debian, script]
artifacts: !reference [deps-debian, artifacts]
gimp-debian-nonreloc:
extends: .debian-nonreloc
needs: ["deps-debian-nonreloc"]
stage: !reference [gimp-debian, stage]
variables: !reference [gimp-debian, variables]
script:
- *ENVIRON
# Check building
- printf "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP\n"
- meson setup _build-${RUNNER} -Dprefix="${GIMP_PREFIX}"
-Dfile-plug-ins-test=true
$MESON_OPTIONS
- cd _build-${RUNNER}
- ninja
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
# Check execution
- printf "\e[0Ksection_start:`date +%s`:gimp_test[collapsed=true]\r\e[0KTesting GIMP execution\n"
- ninja test
- printf "\e[0Ksection_end:`date +%s`:gimp_test\r\e[0K\n"
# Check source
- printf "\e[0Ksection_start:`date +%s`:gimp_tar[collapsed=true]\r\e[0KChecking GIMP source\n"
- if [ $(git diff |wc -l) -ne 0 ]; then
printf "ERROR. A generated file was updated without the source:\n";
git diff;
exit 1;
fi
- if [ "$VARIANT" != "-gcc" ] && [ "$VARIANT" != "-raster" ] && [ "$CI_PIPELINE_SOURCE" != "merge_request_event" ]; then
ninja dist > ninja_dist.log 2>&1 || { cat ninja_dist.log; exit 1; };
fi
- printf "\e[0Ksection_end:`date +%s`:gimp_tar\r\e[0K\n"
# Check install
- printf "\e[0Ksection_start:`date +%s`:gimp_install[collapsed=true]\r\e[0KChecking GIMP installation\n"
- ninja install > ninja_install.log 2>&1 || { cat ninja_install.log; exit 1; };
- printf "\e[0Ksection_end:`date +%s`:gimp_install\r\e[0K\n"
artifacts:
paths:
- _install-${RUNNER}/
- _build-${RUNNER}/meson-logs/meson-log.txt
- _build-${RUNNER}/meson-dist/
- _build-${RUNNER}/config.h
reports:
junit: "_build-${RUNNER}/meson-logs/testlog.junit.xml"
expire_in: 2 days
## Flatpak CI (Fedora) ##
.flatpak:
extends: .default
@@ -392,7 +395,7 @@ gimp-debian-nonreloc:
MESON_DIST: 0
before_script:
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install"
timeout: 90m
timeout: 30m
deps-flatpak:
extends: .flatpak
@@ -401,8 +404,7 @@ deps-flatpak:
- sh build/linux/flatpak/1_build-deps-flatpakbuilder.sh
artifacts:
paths:
- _build-$RUNNER.tar
- flatpak-builder.log
- _build-$RUNNER.tar.zst
- babl-meson-log.tar
- gegl-meson-log.tar
expire_in: 2 hours
@@ -440,7 +442,7 @@ gimp-flatpak:
variables:
SNAPCRAFT_BASE_VERSION: "8_core24"
RUNNER: x86_64_v3
timeout: 20m
timeout: 30m
deps-snap:
extends: .snap
@@ -530,10 +532,7 @@ gimp-snap:
STORE_OPTION: '-Dms-store=true'
parallel:
matrix:
- RUNNER: windows-aarch64
MSYSTEM_PREFIX: clangarm64
- RUNNER: win32-ps
MSYSTEM_PREFIX: clang64
- RUNNER: [windows-aarch64, win32-ps]
tags:
- $RUNNER
variables:
@@ -541,9 +540,9 @@ gimp-snap:
#meson.build forces non-relocatable .pc. See: https://github.com/mesonbuild/meson/issues/14346
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
before_script:
# FIXME:'gimpenv' have buggy code about Windows paths. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/12284
- $GIMP_PREFIX = "$PWD\_install-$MSYSTEM_PREFIX".Replace('\', '/')
timeout: 40m
- if (-not $env:MSYSTEM_PREFIX) { $env:MSYSTEM_PREFIX = if ((Get-WmiObject Win32_ComputerSystem).SystemType -like 'ARM64*') { 'clangarm64' } else { 'clang64' }}
- $GIMP_PREFIX = "$PWD\_install-$env:MSYSTEM_PREFIX"
timeout: 30m
.win_environ: &WIN_ENVIRON
# See: https://testing.developer.gimp.org/core/setup/build/windows/#prepare-for-building
@@ -563,9 +562,9 @@ deps-win:
- build\windows\1_build-deps-msys2.ps1
artifacts:
paths:
- _install-$MSYSTEM_PREFIX/
- babl/_build-$MSYSTEM_PREFIX/meson-logs/meson-log.txt
- gegl/_build-$MSYSTEM_PREFIX/meson-logs/meson-log.txt
- _install-*/
- babl/_build-*/meson-logs/meson-log.txt
- gegl/_build-*/meson-logs/meson-log.txt
expire_in: 2 hours
gimp-win:
@@ -581,14 +580,14 @@ gimp-win:
- build\windows\2_build-gimp-msys2.ps1
artifacts:
paths:
- gimp-$MSYSTEM_PREFIX/
- _build-$MSYSTEM_PREFIX/meson-logs/meson-log.txt
- _build-$MSYSTEM_PREFIX/done-dll.list
- gimp-*/
- _build-*/meson-logs/meson-log.txt
- _build-*/done-dll.list
# Needed by dist-installer-weekly and dist-store-weekly
- _build-$MSYSTEM_PREFIX/config.h
- _build-$MSYSTEM_PREFIX/plug-ins/file_associations.list
- _build-$MSYSTEM_PREFIX/build/windows/installer/
- _build-$MSYSTEM_PREFIX/build/windows/store/
- _build-*/config.h
- _build-*/plug-ins/file_associations.list
- _build-*/build/windows/installer/
- _build-*/build/windows/store/
expire_in: 2 days
@@ -597,12 +596,10 @@ gimp-win:
extends: .win
parallel:
matrix:
- RUNNER: win32-ps
MSYSTEM_PREFIX: mingw32
- RUNNER: [win32-ps]
variables:
MSYSTEM_PREFIX: mingw32
MINGW_PACKAGE_PREFIX: mingw-w64-i686
CC: cc
CXX: c++
deps-win-eol:
extends: .win-eol
@@ -672,6 +669,8 @@ meson-health:
- <<: *CI_MERGE
- <<: *CI_COMMIT
stage: analysis
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- apt-get update -qq
- apt-get install -qq -y --no-install-recommends git shellcheck devscripts

View File

@@ -24,7 +24,7 @@ https://gitlab.gnome.org/GNOME/gimp/-/issues/?sort=updated_desc&state=all&label_
- "Be considerate and respectful". This is our main rule.
E.g. avoid negative emotional writing which only generates more upsetting
interactions.
- Stay on topic by writting only one bug per report created.
- Stay on topic by writing only one bug per report created.
- Add full (not cropped) screenshots or other files using the clip button on GitLab. -->
### Reproduction

View File

@@ -12,4 +12,4 @@
Only human created works please!
- You can request the devs to allow installable packages to be
generated from this MR by writting ~Package: in the comments -->
generated from this MR by writing ~Package: in the comments -->

View File

@@ -5,7 +5,18 @@
# CHECK SCRIPTS RUNNED BY MESON (ALL OSes)
printf "\e[0Ksection_start:`date +%s`:nonunix_test[collapsed=false]\r\e[0KChecking for non-Unix compatibility\n"
diff=$(git diff -U0 --no-color "${newest_common_ancestor_sha}" -- '*.build' '*.py' | grep -E '^\+[^+]' | sed 's/^+//')
diff=$(git diff -U0 --no-color --submodule=diff "${newest_common_ancestor_sha}" \
| awk '
/^diff --git a\/.*\.(build|py)/ {
sub(/^diff --git a\//, "", $0)
sub(/ b\/.*$/, "", $0)
file = $0
next
}
/^\+[^+]/ && file != "" {
print file ":" substr($0, 2)
}
')
## List of commonly used utilities on Unix world
## See the context: https://gitlab.gnome.org/GNOME/gimp/-/issues/11385
@@ -168,10 +179,21 @@ printf "\e[0Ksection_end:`date +%s`:nonunix_test\r\e[0K\n"
# 1) contain bash shebang or are called by bash;
# 2) contain bashisms.
printf "\e[0Ksection_start:`date +%s`:unix_test[collapsed=false]\r\e[0KChecking for Unix portability (optional)\n"
diff=$(git diff -U0 --no-color "${newest_common_ancestor_sha}" | grep -E '^\+[^+]' | sed 's/^+//')
diff=$(git diff -U0 --no-color --submodule=diff "${newest_common_ancestor_sha}" \
| awk '
/^diff --git a\// {
sub(/^diff --git a\//, "", $0)
sub(/ b\/.*$/, "", $0)
file = $0
next
}
/^\+[^+]/ && file != "" {
print file ":" substr($0, 2)
}
')
## Check shebang and external call (1)
echo "$diff" | grep -E '^#!\s*/usr/bin/env\s+bash|^#!\s*/(usr/bin|bin)/bash(\s|$)' && found_bashism='extrinsic_bashism'
echo "$diff" | grep -E '#!\s*/usr/bin/env\s+bash|#!\s*/(usr/bin|bin)/bash(\s|$)' && found_bashism='extrinsic_bashism'
echo "$diff" | grep -E "bash\s+.*\.sh" && found_bashism='extrinsic_bashism'
## Check content with shellcheck and checkbashisms (2)

View File

@@ -201,7 +201,7 @@ help in that regard:
* HEIC: e.g. libde265 and libx265 support (for
respectively decoding and encoding of HEVC).
* AVIF: e.g. libaom decoder and encoder (for AV1 encoding and
decoding), prefered over rav1e.
decoding), preferred over rav1e.
* HEJ2: OpenJPEG (for JPEG2000 inside HEIF).
If you don't compile libheif with the correct flags (see libheif
@@ -489,5 +489,5 @@ reconfiguration:
% ninja reconfigure
Verify that the optional features you wanted are now shown as `true`,
otherwise follow similar advices than above to make sure they are
otherwise follow similar advice as above to make sure they are
visible to your setup.

45
NEWS
View File

@@ -11,21 +11,26 @@ Overview of Changes from GIMP 3.1.4 to GIMP 3.2-RC1
Core:
- Improve Export to SVG of paths by not exporting the DTD and adding
an explicit SVG version.
- macOS: "Quit" from the dock's right-click menu will now follow our
standard Quit procedure, by intercepting the
applicationShouldTerminate signal, instead of forcing the
application to close (hence losing unsaved changes).
- "Add Layer Mask" will now have an "Edit mask immediately" checkbox
allowing to decide whether to go into Edit Mask state or not. This
setting is saved across repetitive actions, as all other settings in
this dialog.
Graphical User Interface:
- "Monitor Linked Image" and "Discard Link Information" menu items
added to Layer menu when the selected layer is a link layer.
- Palette Import dialog now display file format filters, both to let
users hide irrelevant files from view and to highlight which formats
we support.
- The GimpColorHexEntry will now update the chosen color as you type.
- Use a standard, yet extended, AppMenu on macOS.
Plug-Ins:
- Fixed vulnerabilities: ZDI-CAN-27684, ZDI-CAN-27863, ZDI-CAN-27878,
ZDI-CAN-27836, ZDI-CAN-27823, ZDI-CAN-27793
- file-compressor: add zip decompression support. This allows support
for .hgt.zip files, as well as other formats compressed with zip.
API:
@@ -58,15 +63,23 @@ API:
* gimp_vector_layer_set_stroke_miter_limit
* gimp_vector_layer_set_stroke_width
* gimp_vector_layer_set_stroke_width_unit
Build:
- CI:
* Linux builds ported from unmaintained Kaniko to Buildah.
* Colored output and .pdb support for builds of dependency using
CMake.
* Ability to apply remote patches on dependency builds.
* gimp_item_is_vector_layer
* gimp_item_id_is_link_layer
* gimp_item_is_link_layer
* gimp_link_layer_discard
* gimp_link_layer_get_by_id
* gimp_link_layer_get_file
* gimp_link_layer_get_type
* gimp_link_layer_monitor
* gimp_link_layer_new
* gimp_link_layer_set_file
* gimp_param_link_layer_get_type
* gimp_param_spec_link_layer
* gimp_procedure_add_link_layer_argument
* gimp_procedure_add_link_layer_aux_argument
* gimp_procedure_add_link_layer_return_value
* gimp_link_layer_get_mime_type
- New libgimp class: GimpLinkLayer
Overview of Changes from GIMP 3.1.2 to GIMP 3.1.4

View File

@@ -307,13 +307,8 @@ gint n_dialogs_dockable_actions = G_N_ELEMENTS (dialogs_dockable_actions);
static const GimpStringActionEntry dialogs_toplevel_actions[] =
{
{ "dialogs-preferences", GIMP_ICON_PREFERENCES_SYSTEM,
#if defined(PLATFORM_OSX)
NC_("dialogs-action", "_Settings..."),
NC_("dialogs-action", "_Settings..."),
#else
NC_("dialogs-action", "_Preferences"),
NC_("dialogs-action", "_Preferences"),
#endif
{ NULL },
NC_("dialogs-action", "Open the preferences dialog"),
"gimp-preferences-dialog",
@@ -360,8 +355,6 @@ static const GimpStringActionEntry dialogs_toplevel_actions[] =
{ "dialogs-about", GIMP_ICON_HELP_ABOUT,
#if defined(G_OS_WIN32)
NC_("dialogs-action", "About GIMP"),
#elif defined(PLATFORM_OSX)
NC_("dialogs-action", "About"),
#else /* UNIX: use GNOME HIG */
NC_("dialogs-action", "_About"),
#endif

View File

@@ -824,7 +824,7 @@ filters_actions_setup (GimpActionGroup *group)
* operations end up generating the same action name. Typically we
* don't want a third-party operation called "my-op" to have the same
* action name than "my_op" (which is to say that one will be
* overrided by the other).
* overridden by the other).
*/
g_free (action_name);
action_name = g_strdup_printf ("filters-%s-%d", formatted_op_name, i++);

View File

@@ -150,6 +150,7 @@ static void layers_add_mask_callback (GtkWidget *dialog,
GimpAddMaskType add_mask_type,
GimpChannel *channel,
gboolean invert,
gboolean edit_mask,
gpointer user_data);
static void layers_scale_callback (GtkWidget *dialog,
GimpViewable *viewable,
@@ -1568,6 +1569,7 @@ layers_mask_add_cmd_callback (GimpAction *action,
widget,
config->layer_add_mask_type,
config->layer_add_mask_invert,
config->layer_add_mask_edit_mask,
layers_add_mask_callback,
NULL);
@@ -1643,7 +1645,9 @@ layers_mask_add_last_vals_cmd_callback (GimpAction *action,
if (config->layer_add_mask_invert)
gimp_channel_invert (GIMP_CHANNEL (mask), FALSE);
gimp_layer_add_mask (iter->data, mask, TRUE, NULL);
gimp_layer_add_mask (iter->data, mask,
config->layer_add_mask_edit_mask,
TRUE, NULL);
}
gimp_image_undo_group_end (image);
@@ -1760,7 +1764,7 @@ layers_mask_show_cmd_callback (GimpAction *action,
{
/* if switching "show mask" on, and any selected layer's
* mask is already visible, bail out because that's
* exactly the logic we use in the ui for multile
* exactly the logic we use in the ui for multiple
* visible layer masks.
*/
return;
@@ -1811,7 +1815,7 @@ layers_mask_disable_cmd_callback (GimpAction *action,
{
/* if switching "disable mask" on, and any selected
* layer's mask is already disabled, bail out because
* that's exactly the logic we use in the ui for multile
* that's exactly the logic we use in the ui for multiple
* disabled layer masks.
*/
return;
@@ -2591,6 +2595,7 @@ layers_add_mask_callback (GtkWidget *dialog,
GimpAddMaskType add_mask_type,
GimpChannel *channel,
gboolean invert,
gboolean edit_mask,
gpointer user_data)
{
GimpImage *image = gimp_item_get_image (GIMP_ITEM (layers->data));
@@ -2600,8 +2605,9 @@ layers_add_mask_callback (GtkWidget *dialog,
GError *error = NULL;
g_object_set (config,
"layer-add-mask-type", add_mask_type,
"layer-add-mask-invert", invert,
"layer-add-mask-type", add_mask_type,
"layer-add-mask-invert", invert,
"layer-add-mask-edit-mask", edit_mask,
NULL);
gimp_image_undo_group_start (image,
@@ -2617,7 +2623,7 @@ layers_add_mask_callback (GtkWidget *dialog,
if (config->layer_add_mask_invert)
gimp_channel_invert (GIMP_CHANNEL (mask), FALSE);
if (! gimp_layer_add_mask (iter->data, mask, TRUE, &error))
if (! gimp_layer_add_mask (iter->data, mask, edit_mask, TRUE, &error))
{
gimp_message_literal (image->gimp,
G_OBJECT (dialog), GIMP_MESSAGE_WARNING,

View File

@@ -101,6 +101,6 @@ libappactions = static_library('appactions',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-Actions"',
dependencies: [
gegl, gdk_pixbuf, gtk3,
gegl, gdk_pixbuf, gtk3, gexiv2,
],
)

View File

@@ -81,6 +81,7 @@ enum
PROP_LAYER_ADD_MASK_TYPE,
PROP_LAYER_ADD_MASK_INVERT,
PROP_LAYER_ADD_MASK_EDIT_MASK,
PROP_LAYER_MERGE_TYPE,
PROP_LAYER_MERGE_ACTIVE_GROUP_ONLY,
@@ -389,6 +390,13 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass)
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_LAYER_ADD_MASK_EDIT_MASK,
"layer-add-mask-edit-mask",
"Default layer mask: edit mask immediately",
LAYER_ADD_MASK_EDIT_MASK,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_MERGE_TYPE,
"layer-merge-type",
"Default layer merge type",
@@ -716,6 +724,9 @@ gimp_dialog_config_set_property (GObject *object,
case PROP_LAYER_ADD_MASK_INVERT:
config->layer_add_mask_invert = g_value_get_boolean (value);
break;
case PROP_LAYER_ADD_MASK_EDIT_MASK:
config->layer_add_mask_edit_mask = g_value_get_boolean (value);
break;
case PROP_LAYER_MERGE_TYPE:
config->layer_merge_type = g_value_get_enum (value);
@@ -908,6 +919,9 @@ gimp_dialog_config_get_property (GObject *object,
case PROP_LAYER_ADD_MASK_INVERT:
g_value_set_boolean (value, config->layer_add_mask_invert);
break;
case PROP_LAYER_ADD_MASK_EDIT_MASK:
g_value_set_boolean (value, config->layer_add_mask_edit_mask);
break;
case PROP_LAYER_MERGE_TYPE:
g_value_set_enum (value, config->layer_merge_type);

View File

@@ -78,6 +78,7 @@ struct _GimpDialogConfig
GimpAddMaskType layer_add_mask_type;
gboolean layer_add_mask_invert;
gboolean layer_add_mask_edit_mask;
GimpMergeType layer_merge_type;
gboolean layer_merge_active_group_only;

View File

@@ -659,6 +659,9 @@ _("Sets the default mask for the 'Add Layer Mask' dialog.")
#define LAYER_ADD_MASK_INVERT_BLURB \
_("Sets the default 'invert mask' state for the 'Add Layer Mask' dialog.")
#define LAYER_ADD_MASK_EDIT_MASK \
_("Sets the default 'edit mask' state for the 'Add Layer Mask' dialog.")
#define LAYER_MERGE_TYPE_BLURB \
_("Sets the default merge type for the 'Merge Visible Layers' dialog.")

View File

@@ -44,7 +44,7 @@ libappconfig = static_library('appconfig',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-Config"',
dependencies: [
cairo, gegl, gdk_pixbuf, gio, gio_specific, libmypaint,
cairo, gegl, gdk_pixbuf, gexiv2, gio, gio_specific, libmypaint,
],
)

View File

@@ -353,7 +353,7 @@ gimp_transform_resize_crop (const GimpVector2 *orig_points,
if (r.area == 0)
{
/* saveguard if something went wrong, adjust and give warning */
/* safeguard if something went wrong, adjust and give warning */
gimp_transform_resize_adjust (orig_points, n_points,
x1, y1, x2, y2);
g_printerr ("no rectangle found by algorithm, no cropping done\n");

View File

@@ -605,7 +605,7 @@ gimp_get_fill_params (GimpContext *context,
* @start_y:
* @end_x:
* @end_y:
* @n_snap_lines: Number evenly disributed lines to snap to.
* @n_snap_lines: Number evenly distributed lines to snap to.
* @offset_angle: The angle by which to offset the lines, in degrees.
* @xres: The horizontal resolution.
* @yres: The vertical resolution.

View File

@@ -271,7 +271,7 @@ gimp_brush_pipe_select_brush (GimpBrush *brush,
break;
case PIPE_SELECT_ANGULAR:
/* Coords angle is already nomalized,
/* Coords angle is already normalized,
* offset by 90 degrees is still needed
* because hoses were made PS compatible*/
ix = (gint) RINT ((1.0 - current_coords->direction + 0.25) * pipe->rank[i]) % pipe->rank[i];

View File

@@ -152,7 +152,7 @@ gimp_id_table_insert (GimpIdTable *id_table, gpointer data)
* @data: The data to associate with the id
*
* Insert data in the id table with a specific ID. If data already
* exsts with the given ID, this function fails.
* exists with the given ID, this function fails.
*
* Returns: The used ID if successful, -1 if it was already in use.
**/

View File

@@ -960,6 +960,7 @@ gimp_image_undo_push_layer_mask_add (GimpImage *image,
GIMP_DIRTY_IMAGE_STRUCTURE,
"item", layer,
"layer-mask", mask,
"edit-mask", FALSE,
NULL);
}
@@ -982,6 +983,7 @@ gimp_image_undo_push_layer_mask_remove (GimpImage *image,
GIMP_DIRTY_IMAGE_STRUCTURE,
"item", layer,
"layer-mask", mask,
"edit-mask", gimp_layer_get_edit_mask (layer),
NULL);
}

View File

@@ -3012,7 +3012,7 @@ gimp_image_get_xcf_version (GimpImage *image,
/* The blending space variant corresponding to SPACE_RGB_PERCEPTUAL in <3.0
* corresponds to R'G'B'A which is NON_LINEAR in babl. Perceptual in babl is
* R~G~B~A, >= 3.0 the code, comments and usage matches the existing enum value
* as being NON_LINEAR and new layers created use the new interger value for
* as being NON_LINEAR and new layers created use the new integer value for
* PERCEPTUAL.
*/
version = MAX (23, version);
@@ -3166,7 +3166,7 @@ gimp_image_get_xcf_version (GimpImage *image,
/* Note: user unit storage was changed in XCF 21, but we can still
* easily save older XCF (we use the unit name for both singular and
* plural forms). Therefore we don't bump the XCF version unecessarily
* plural forms). Therefore we don't bump the XCF version unnecessarily
* and don't add any test.
*/

View File

@@ -991,10 +991,10 @@ gimp_layer_duplicate (GimpItem *item,
mask = gimp_item_duplicate (GIMP_ITEM (layer->mask),
G_TYPE_FROM_INSTANCE (layer->mask));
gimp_layer_add_mask (new_layer, GIMP_LAYER_MASK (mask), FALSE, NULL);
gimp_layer_add_mask (new_layer, GIMP_LAYER_MASK (mask),
layer->edit_mask, FALSE, NULL);
new_layer->apply_mask = layer->apply_mask;
new_layer->edit_mask = layer->edit_mask;
new_layer->show_mask = layer->show_mask;
}
}
@@ -1917,6 +1917,7 @@ gimp_layer_get_mask (GimpLayer *layer)
GimpLayerMask *
gimp_layer_add_mask (GimpLayer *layer,
GimpLayerMask *mask,
gboolean edit_mask,
gboolean push_undo,
GError **error)
{
@@ -1958,7 +1959,7 @@ gimp_layer_add_mask (GimpLayer *layer,
layer->mask = g_object_ref_sink (mask);
layer->apply_mask = TRUE;
layer->edit_mask = TRUE;
layer->edit_mask = edit_mask;
layer->show_mask = FALSE;
gimp_layer_mask_set_layer (mask, layer);

View File

@@ -159,6 +159,7 @@ GimpLayerMask * gimp_layer_create_mask (GimpLayer *layer,
GimpChannel *channel);
GimpLayerMask * gimp_layer_add_mask (GimpLayer *layer,
GimpLayerMask *mask,
gboolean edit_mask,
gboolean push_undo,
GError **error);
void gimp_layer_apply_mask (GimpLayer *layer,

View File

@@ -33,7 +33,8 @@
enum
{
PROP_0,
PROP_LAYER_MASK
PROP_LAYER_MASK,
PROP_EDIT_MASK
};
@@ -83,6 +84,11 @@ gimp_layer_mask_undo_class_init (GimpLayerMaskUndoClass *klass)
GIMP_TYPE_LAYER_MASK,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class, PROP_EDIT_MASK,
g_param_spec_boolean ("edit-mask", NULL, NULL,
FALSE,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
}
static void
@@ -114,6 +120,9 @@ gimp_layer_mask_undo_set_property (GObject *object,
case PROP_LAYER_MASK:
layer_mask_undo->layer_mask = g_value_dup_object (value);
break;
case PROP_EDIT_MASK:
layer_mask_undo->edit_mask = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -134,6 +143,9 @@ gimp_layer_mask_undo_get_property (GObject *object,
case PROP_LAYER_MASK:
g_value_set_object (value, layer_mask_undo->layer_mask);
break;
case PROP_EDIT_MASK:
g_value_set_boolean (value, layer_mask_undo->edit_mask);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -175,13 +187,15 @@ gimp_layer_mask_undo_pop (GimpUndo *undo,
{
/* remove layer mask */
layer_mask_undo->edit_mask = gimp_layer_get_edit_mask (layer);
gimp_layer_apply_mask (layer, GIMP_MASK_DISCARD, FALSE);
}
else
{
/* restore layer mask */
gimp_layer_add_mask (layer, layer_mask_undo->layer_mask, FALSE, NULL);
gimp_layer_add_mask (layer, layer_mask_undo->layer_mask,
layer_mask_undo->edit_mask, FALSE, NULL);
}
}

View File

@@ -36,6 +36,7 @@ struct _GimpLayerMaskUndo
GimpItemUndo parent_instance;
GimpLayerMask *layer_mask;
gboolean edit_mask;
};
struct _GimpLayerMaskUndoClass

View File

@@ -76,6 +76,7 @@ struct _GimpLinkPrivate
GimpImageBaseType base_type;
GimpPrecision precision;
GimpPlugInProcedure *load_proc;
const gchar *mime_type;
};
static void gimp_link_finalize (GObject *object);
@@ -298,8 +299,8 @@ gimp_link_update_buffer (GimpLink *link,
{
GimpImage *image;
GimpPDBStatusType status;
const gchar *mime_type = NULL;
link->p->mime_type = NULL;
image = file_open_image (link->p->gimp,
gimp_get_user_context (link->p->gimp),
progress,
@@ -313,7 +314,8 @@ gimp_link_update_buffer (GimpLink *link,
*/
GIMP_RUN_NONINTERACTIVE,
&link->p->is_vector,
&status, &mime_type, &real_error);
&status, &link->p->mime_type,
&real_error);
if (image && status == GIMP_PDB_SUCCESS)
{
@@ -635,6 +637,14 @@ gimp_link_set_absolute_path (GimpLink *link,
link->p->absolute_path = absolute_path;
}
const gchar *
gimp_link_get_mime_type (GimpLink *link)
{
g_return_val_if_fail (GIMP_IS_LINK (link), NULL);
return link->p->mime_type;
}
void
gimp_link_freeze (GimpLink *link)
{

View File

@@ -73,6 +73,9 @@ void gimp_link_set_file (GimpLink *layer,
gboolean gimp_link_get_absolute_path (GimpLink *link);
void gimp_link_set_absolute_path (GimpLink *link,
gboolean absolute_path);
const gchar * gimp_link_get_mime_type (GimpLink *link);
void gimp_link_freeze (GimpLink *link);
void gimp_link_thaw (GimpLink *link);
gboolean gimp_link_is_monitored (GimpLink *link);

View File

@@ -36,6 +36,7 @@
#include "gimpimage.h"
#include "gimplayer.h"
#include "gimplayermask.h"
#include "gimplinklayer.h"
#include "gimppalette.h"
#include "gimpparamspecs.h"
#include "gimppattern.h"

View File

@@ -249,9 +249,14 @@ file_open_dialog_open_image (GtkWidget *dialog,
if (! image && status != GIMP_PDB_SUCCESS && status != GIMP_PDB_CANCEL)
{
gimp_message (gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
_("Opening '%s' failed:\n\n%s"),
gimp_file_get_utf8_name (file), error->message);
if (error)
gimp_message (gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
_("Opening '%s' failed:\n\n%s"),
gimp_file_get_utf8_name (file), error->message);
else
gimp_message (gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
_("Opening '%s' failed."),
gimp_file_get_utf8_name (file));
g_clear_error (&error);
}

View File

@@ -50,6 +50,7 @@ struct _LayerAddMaskDialog
GimpAddMaskType add_mask_type;
GimpChannel *channel;
gboolean invert;
gboolean edit_mask;
GimpAddMaskCallback callback;
gpointer user_data;
};
@@ -73,12 +74,14 @@ layer_add_mask_dialog_new (GList *layers,
GtkWidget *parent,
GimpAddMaskType add_mask_type,
gboolean invert,
gboolean edit_mask,
GimpAddMaskCallback callback,
gpointer user_data)
{
LayerAddMaskDialog *private;
GtkWidget *dialog;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *frame;
GtkWidget *combo;
GtkWidget *button;
@@ -98,6 +101,7 @@ layer_add_mask_dialog_new (GList *layers,
private->layers = layers;
private->add_mask_type = add_mask_type;
private->invert = invert;
private->edit_mask = edit_mask;
private->callback = callback;
private->user_data = user_data;
@@ -180,15 +184,28 @@ layer_add_mask_dialog_new (GList *layers,
gimp_container_view_set_1_selected (GIMP_CONTAINER_VIEW (combo),
GIMP_VIEWABLE (channel));
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 1);
gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
button = gtk_check_button_new_with_mnemonic (_("In_vert mask"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), private->invert);
gtk_box_pack_end (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (button, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&private->invert);
button = gtk_check_button_new_with_mnemonic (_("_Edit mask immediately"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), private->edit_mask);
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (button, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&private->edit_mask);
return dialog;
}
@@ -224,6 +241,7 @@ layer_add_mask_dialog_response (GtkWidget *dialog,
private->add_mask_type,
private->channel,
private->invert,
private->edit_mask,
private->user_data);
}
else

View File

@@ -23,6 +23,7 @@ typedef void (* GimpAddMaskCallback) (GtkWidget *dialog,
GimpAddMaskType add_mask_type,
GimpChannel *channel,
gboolean invert,
gboolean edit_mask,
gpointer user_data);
@@ -31,5 +32,6 @@ GtkWidget * layer_add_mask_dialog_new (GList *layers,
GtkWidget *parent,
GimpAddMaskType add_mask_type,
gboolean invert,
gboolean edit_mask,
GimpAddMaskCallback callback,
gpointer user_data);

View File

@@ -2476,6 +2476,9 @@ prefs_dialog_new (Gimp *gimp,
prefs_check_button_add (object, "layer-add-mask-invert",
_("Invert mask"),
GTK_BOX (vbox2));
prefs_check_button_add (object, "layer-add-mask-edit-mask",
_("Edit mask immediately"),
GTK_BOX (vbox2));
/* Merge Layers Dialog */
vbox2 = prefs_frame_new (_("Merge Layers Dialog"),

View File

@@ -539,16 +539,16 @@ welcome_dialog_create_welcome_page (Gimp *gimp,
/* "globe with meridians" emoticone in UTF-8. */
"\xf0\x9f\x8c\x90",
_("GIMP website"), "https://www.gimp.org/");
welcome_add_link (GTK_GRID (grid), 0, &row,
/* "graduation cap" emoticone in UTF-8. */
"\xf0\x9f\x8e\x93",
_("Tutorials"),
"https://www.gimp.org/tutorials/");
welcome_add_link (GTK_GRID (grid), 0, &row,
/* "open book" emoticone in UTF-8. */
"\xf0\x9f\x93\x96",
_("Documentation"),
"https://docs.gimp.org/");
welcome_add_link (GTK_GRID (grid), 0, &row,
/* "graduation cap" emoticone in UTF-8. */
"\xf0\x9f\x8e\x93",
_("Community Tutorials"),
"https://www.gimp.org/tutorials/");
/* XXX: should we add API docs for plug-in developers once it's
* properly set up? */
@@ -1125,10 +1125,19 @@ welcome_dialog_create_release_page (Gimp *gimp,
tmp = g_strdup_printf (GIMP_VERSION);
if (GIMP_MINOR_VERSION % 2 == 0 && ! strstr (tmp, "RC"))
release_link = g_strdup_printf ("https://www.gimp.org/release-notes/gimp-%d.%d.html",
GIMP_MAJOR_VERSION, GIMP_MINOR_VERSION);
{
if (GIMP_MICRO_VERSION == 0 && ! strstr (tmp, "RC"))
release_link = g_strdup_printf ("https://www.gimp.org/release-notes/gimp-%d.%d.html",
GIMP_MAJOR_VERSION, GIMP_MINOR_VERSION);
else
release_link = g_strdup_printf ("https://www.gimp.org/release/%d.%d.%d/",
GIMP_MAJOR_VERSION, GIMP_MINOR_VERSION,
GIMP_MICRO_VERSION);
}
else
release_link = g_strdup ("https://www.gimp.org/");
{
release_link = g_strdup ("https://www.gimp.org/");
}
g_free (tmp);
widget = gtk_link_button_new_with_label (release_link, _("Learn more"));
@@ -1382,7 +1391,7 @@ welcome_dialog_release_item_activated (GtkListBox *listbox,
{
GList *windows = gimp_get_image_windows (gimp);
/* Losing forcus on the welcome dialog on purpose for the main GUI
/* Losing focus on the welcome dialog on purpose for the main GUI
* to be more readable.
*/
if (windows)

View File

@@ -246,7 +246,7 @@ gimp_display_shell_scale_get_image_size (GimpDisplayShell *shell,
* @w:
* @h:
*
* Gets the screen-space boudning box of the image, after it has
* Gets the screen-space bounding box of the image, after it has
* been transformed (i.e., scaled, rotated, and scrolled).
**/
void
@@ -290,7 +290,7 @@ gimp_display_shell_scale_get_image_bounds (GimpDisplayShell *shell,
* @w:
* @h:
*
* Gets the screen-space boudning box of the image, after it has
* Gets the screen-space bounding box of the image, after it has
* been scaled and scrolled, but before it has been rotated.
**/
void
@@ -320,7 +320,7 @@ gimp_display_shell_scale_get_image_unrotated_bounds (GimpDisplayShell *shell,
* @w:
* @h:
*
* Gets the screen-space boudning box of the image content, after it has
* Gets the screen-space bounding box of the image content, after it has
* been transformed (i.e., scaled, rotated, and scrolled).
**/
void
@@ -375,7 +375,7 @@ gimp_display_shell_scale_get_image_bounding_box (GimpDisplayShell *shell,
* @w:
* @h:
*
* Gets the screen-space boudning box of the image content, after it has
* Gets the screen-space bounding box of the image content, after it has
* been scaled and scrolled, but before it has been rotated.
**/
void

View File

@@ -464,12 +464,10 @@ gimp_image_window_constructed (GObject *object)
}
}
#ifndef GDK_WINDOWING_QUARTZ
/* Docs says that macOS always returns FALSE but we actually want to create
* our custom macOS menu.
*/
#ifdef GDK_WINDOWING_QUARTZ
menus_quartz_app_menu (private->gimp);
#else
use_app_menu = gtk_application_prefers_app_menu (GTK_APPLICATION (private->gimp->app));
#endif /* !GDK_WINDOWING_QUARTZ */
if (use_app_menu)
{
@@ -482,6 +480,7 @@ gimp_image_window_constructed (GObject *object)
gtk_application_set_app_menu (GTK_APPLICATION (private->gimp->app),
G_MENU_MODEL (app_menu_model));
}
#endif
/* Create the hbox that contains docks and images */
private->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -706,7 +705,7 @@ gimp_image_window_configure_event (GtkWidget *widget,
if (GTK_WIDGET_CLASS (parent_class)->configure_event)
GTK_WIDGET_CLASS (parent_class)->configure_event (widget, event);
/* If the window size has changed, make sure additoinal logic is run
/* If the window size has changed, make sure additional logic is run
* in the display shell's size-allocate
*/
if (event->width != current_width ||

View File

@@ -558,7 +558,7 @@ gimp_tool_polygon_fit_segment (GimpToolPolygon *polygon,
dest_end = &dest_points[n_points - 1];
/* Transate to origin */
/* Translate to origin */
gimp_vector2_sub (&origo_translation_offset,
&vector2_zero,
&dest_points[0]);

View File

@@ -122,6 +122,6 @@ libappdisplay = static_library('appdisplay',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-Display"',
dependencies: [
gegl, gtk3, cairo,
gegl, gtk3, cairo, gexiv2
],
)

View File

@@ -16,6 +16,7 @@ libappfiledata = static_library('appfiledata',
cairo,
gdk_pixbuf,
gegl,
gexiv2,
libarchive,
],
)

View File

@@ -139,7 +139,7 @@ file_open_image (Gimp *gimp,
}
}
if (! file_open_valid_permissions (file, error))
if (g_file_is_native (file) && ! file_open_valid_permissions (file, error))
return NULL;
if (! file_proc)
@@ -248,7 +248,15 @@ file_open_image (Gimp *gimp,
{
if (image)
{
/* Only set the load procedure if it hasn't already been set. */
/* Only set the load procedure if it hasn't already been set.
* The reason is that we want to know the information of the
* inner format, in case loading the file went through
* intermediate container file formats procedures, typically
* the procedures registered by the file-compressor plug-in.
*
* E.g. it could be used for our compressed XCF, but also for
* commonly compressed formats such as .hgt.zip.
*/
if (! gimp_image_get_load_proc (image))
gimp_image_set_load_proc (image, file_proc);
@@ -789,7 +797,7 @@ file_open_link_image (Gimp *gimp,
GIMP_FILE_PROCEDURE_GROUP_OPEN,
file, error);
if (! file_open_valid_permissions (file, error))
if (g_file_is_native (file) && ! file_open_valid_permissions (file, error))
return NULL;
if (g_file_is_native (file) && file_proc != NULL)
@@ -815,7 +823,9 @@ file_open_link_image (Gimp *gimp,
layer = gimp_link_layer_new (image, link);
gimp_image_add_layer (image, layer, NULL, 0, FALSE);
gimp_image_set_load_proc (image, gimp_link_get_load_proc (link));
if (! gimp_image_get_load_proc (image))
gimp_image_set_load_proc (image, gimp_link_get_load_proc (link));
file_proc = gimp_image_get_load_proc (image);
if (mime_type)
*mime_type = g_slist_nth_data (file_proc->mime_types_list, 0);
@@ -945,14 +955,11 @@ file_open_file_proc_is_import (GimpPlugInProcedure *file_proc)
proc_name = gimp_object_get_name (file_proc);
return (g_strcmp0 (proc_name, "gimp-xcf-load") != 0 &&
/* Assuming that all file-compressor file are XCF.
* So far, this is always true with current file-compressor
* implementation.
*/
g_strcmp0 (proc_name, "file-gz-load") != 0 &&
g_strcmp0 (proc_name, "file-bz2-load") != 0 &&
g_strcmp0 (proc_name, "file-xz-load") != 0);
/* Even when loading through an intermediate container format plug-in
* (e.g. file-compressor), the stored procedure shall be the inner
* format.
*/
return (g_strcmp0 (proc_name, "gimp-xcf-load") != 0);
}
static gboolean

View File

@@ -11,6 +11,6 @@ libappfile = static_library('appfile',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-File"',
dependencies: [
gegl, gdk_pixbuf,
gegl, gdk_pixbuf, gexiv2
],
)

View File

@@ -56,5 +56,6 @@ libappgegl = static_library('appgegl',
cairo,
gegl,
gdk_pixbuf,
gexiv2
],
)

View File

@@ -414,8 +414,30 @@ gimp_check_updates_callback (GObject *source,
{
gchar *uri = g_file_get_uri (G_FILE (source));
#ifndef GIMP_CONSOLE_COMPILATION
if (error->domain == G_IO_ERROR &&
error->code == G_IO_ERROR_NOT_SUPPORTED)
{
#ifndef G_OS_WIN32
g_message ("%s: loading of %s failed: %s\n\n%s",
G_STRFUNC, uri, error->message,
_("Perhaps you are missing GIO backends and need "
"to install GVFS?"));
#else
g_message ("%s: loading of %s failed: %s\n\n%s",
G_STRFUNC, uri, error->message,
_("Perhaps you are missing GIO backends."));
#endif /* G_OS_WIN32 */
}
else
{
g_printerr ("%s: loading of %s failed: %s\n", G_STRFUNC,
uri, error->message);
}
#else
g_printerr ("%s: loading of %s failed: %s\n", G_STRFUNC,
uri, error->message);
#endif /* GIMP_CONSOLE_COMPILATION */
g_free (uri);
g_clear_error (&error);

View File

@@ -41,6 +41,10 @@
#include "file/file-open.h"
#include "menus/menus.h"
#include "widgets/gimpuimanager.h"
#include "gimpdbusservice.h"
#include "gui-unique.h"
#include "themes.h"
@@ -56,14 +60,19 @@ static HWND proxy_window = NULL;
#elif defined (GDK_WINDOWING_QUARTZ)
static void gui_unique_quartz_init (Gimp *gimp);
static void gui_unique_quartz_exit (void);
static void gui_unique_quartz_init (Gimp *gimp);
static void gui_unique_quartz_exit (void);
static gboolean gui_unique_quartz_trigger_quit (gpointer data);
@interface GimpAppleEventHandler : NSObject {}
- (void) handleEvent:(NSAppleEventDescriptor *) inEvent
andReplyWith:(NSAppleEventDescriptor *) replyEvent;
@end
@interface GimpAppDelegate : NSObject <NSApplicationDelegate>
@end
static Gimp *unique_gimp = NULL;
static GimpAppleEventHandler *event_handler = NULL;
static void (^themeChangeHandler) (NSNotification *) = NULL;
@@ -339,6 +348,15 @@ gui_unique_quartz_idle_open (GFile *file)
}
@end
@implementation GimpAppDelegate
- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication *) sender
{
g_idle_add ((GSourceFunc) gui_unique_quartz_trigger_quit, unique_gimp);
return NSTerminateCancel;
}
@end
static void
gui_unique_quartz_init (Gimp *gimp)
{
@@ -375,6 +393,13 @@ gui_unique_quartz_init (Gimp *gimp)
andSelector: @selector (handleEvent: andReplyWith:)
forEventClass: kCoreEventClass
andEventID: kAEOpenDocuments];
/* When quitting the application using "Quit" from the dock's right-click menu,
* GIMP does not follow our standard quit procedure. Instead, macOS forces the
* application to close, which may result in losing unsaved changes.
* This delegate intercepts the applicationShouldTerminate call and uses our
* existing quit code, preventing macOS from handling the shutdown directly. */
[NSApp setDelegate:[[GimpAppDelegate alloc] init]];
}
static void
@@ -399,6 +424,17 @@ gui_unique_quartz_exit (void)
event_handler = NULL;
}
static gboolean
gui_unique_quartz_trigger_quit (gpointer data)
{
Gimp *gimp = (Gimp *)data;
GimpUIManager *ui_manager = menus_get_image_manager_singleton (gimp);
gimp_ui_manager_activate_action (ui_manager, "file", "file-quit");
return FALSE;
}
#else
static void

View File

@@ -220,7 +220,7 @@ icon_themes_current_prefer_symbolic (Gimp *gimp)
* override the "prefer-symbolic-icons" property, not only to avoid
* discrepancies, but even more to avoid weird cases where we end up using
* icons from the system icon theme while the chosen theme has the right icon
* (yet simply not in the prefered style). See Issue #9410.
* (yet simply not in the preferred style). See Issue #9410.
*/
if (gtk_icon_theme_has_icon (icon_theme, GIMP_ICON_WILBER) &&
! gtk_icon_theme_has_icon (icon_theme, GIMP_ICON_WILBER "-symbolic"))

View File

@@ -31,7 +31,7 @@ libappgui = static_library('appgui',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-GUI"',
dependencies: [
cairo, gegl, gdk_pixbuf, gio_specific, gtk3
cairo, gegl, gdk_pixbuf, gexiv2, gio_specific, gtk3
],
install: false,
)

View File

@@ -805,7 +805,7 @@ language_get_system_lang_id (void)
#elif defined PLATFORM_OSX
NSString *langs;
/* In macOS, the user sets a list of prefered languages and the
/* In macOS, the user sets a list of preferred languages and the
* software respects this preference order. I.e. that just storing the
* top-prefered lang would not be enough. What if GIMP didn't have
* translations for it, then it would fallback to the second lang. If

View File

@@ -1,4 +1,4 @@
/* GIMP - The GNU Image Manipulation Program
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
@@ -475,7 +475,7 @@ gimp_early_configuration (void)
if (user_gimprc)
user_gimprc_file = g_file_new_for_commandline_arg (user_gimprc);
/* GimpEarlyRc is reponsible for reading "gimprc" files for the
/* GimpEarlyRc is responsible for reading "gimprc" files for the
* sole purpose of getting some configuration data that is needed
* in the early initialization phase
*/
@@ -761,10 +761,10 @@ main (int argc,
/* The GIMP option group is just an empty option group, created for
* the sole purpose of running a post-parse hook before any other of
* dependant libraries are run. This makes it possible to apply
* dependent libraries are run. This makes it possible to apply
* options from configuration data obtained from "gimprc" files,
* before other libraries have a chance to run some of their
* intialization code.
* initialization code.
*/
gimp_group = g_option_group_new ("gimp", "", "", NULL, NULL);
g_option_group_set_parse_hooks (gimp_group, NULL,

View File

@@ -20,6 +20,10 @@
#include <gegl.h>
#include <gtk/gtk.h>
#ifdef PLATFORM_OSX
#include <AppKit/AppKit.h>
#endif
#include "libgimpbase/gimpbase.h"
#include "menus-types.h"
@@ -52,7 +56,11 @@
/* private variables */
static gboolean menurc_deleted = FALSE;
static gboolean menurc_deleted = FALSE;
#ifdef PLATFORM_OSX
static Gimp *unique_gimp = NULL;
#endif
/* public functions */
@@ -542,3 +550,115 @@ menus_get_image_manager_singleton (Gimp *gimp)
return image_ui_manager;
}
#ifdef PLATFORM_OSX
@interface GimpappMenuHandler : NSObject
@end
@implementation GimpappMenuHandler
+ (void) gimpShowAbout:(id) sender
{
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-about");
}
+ (void) gimpShowWelcomeDialog:(id) sender
{
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-welcome");
}
+ (void) gimpShowPreferences:(id) sender
{
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-preferences");
}
+ (void) gimpShowInputDevices:(id) sender
{
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-input-devices");
}
+ (void) gimpShowKeyboardShortcuts:(id) sender
{
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-keyboard-shortcuts");
}
+ (void) gimpQuit:(id) sender
{
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
gimp_ui_manager_activate_action (ui_manager, "file", "file-quit");
}
@end
void
menus_quartz_app_menu (Gimp *gimp)
{
NSMenu *main_menu;
NSMenuItem *app_menu_item;
NSMenu *app_menu;
NSInteger last_index;
NSMenuItem *item;
g_return_if_fail (GIMP_IS_GIMP (gimp));
unique_gimp = gimp;
main_menu = [NSApp mainMenu];
app_menu_item = [main_menu itemAtIndex:0];
app_menu = [app_menu_item submenu];
/* On macOS, some standard menu items (e.g. "Hide", "Hide Others", "Show All", "Quit")
* are automatically provided by the system rather than created by our application.
* For the items we need to customize, we override their default behavior with our own
* implementations. In addition, we extend the menu with extra entries specific to
* our applications functionality. */
[app_menu setTitle:@"GIMP"];
/* About */
item = [app_menu itemAtIndex:0];
[item setTarget:[GimpappMenuHandler class]];
[item setAction:@selector (gimpShowAbout:)];
/* Welcome Dialog */
item = [[NSMenuItem alloc] initWithTitle:@"Welcome Dialog"
action:@selector (gimpShowWelcomeDialog:)
keyEquivalent:@""];
[item setTarget:[GimpappMenuHandler class]];
[app_menu insertItem:item atIndex:1];
/* Settings */
item = [app_menu itemAtIndex:3];
[item setTarget:[GimpappMenuHandler class]];
[item setAction:@selector (gimpShowPreferences:)];
/* Input Devices */
item = [[NSMenuItem alloc] initWithTitle:@"Input Devices"
action:@selector (gimpShowInputDevices:)
keyEquivalent:@""];
[item setTarget:[GimpappMenuHandler class]];
[app_menu insertItem:item atIndex:4];
/* Keyboard Shortcuts */
item = [[NSMenuItem alloc] initWithTitle:@"Keyboard Shortcuts"
action:@selector (gimpShowKeyboardShortcuts:)
keyEquivalent:@""];
[item setTarget:[GimpappMenuHandler class]];
[app_menu insertItem:item atIndex:5];
/* Quit */
last_index = [app_menu numberOfItems] - 1;
item = [app_menu itemAtIndex:last_index];
[item setTarget:[GimpappMenuHandler class]];
[item setAction:@selector (gimpQuit:)];
}
#endif

View File

@@ -31,3 +31,7 @@ void menus_remove (Gimp *gimp);
GimpMenuFactory * menus_get_global_menu_factory (Gimp *gimp);
GimpUIManager * menus_get_image_manager_singleton (Gimp *gimp);
#ifdef PLATFORM_OSX
void menus_quartz_app_menu (Gimp *gimp);
#endif

View File

@@ -16,6 +16,6 @@ libappmenus = static_library('appmenus',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-Menus"',
dependencies: [
gegl, gtk3
gegl, gtk3, gexiv2
],
)

View File

@@ -25,6 +25,6 @@ libapplayermodeslegacy = static_library('applayermodeslegacy',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-Layer-Modes-Legacy"',
dependencies: [
cairo, gegl, gdk_pixbuf,
cairo, gegl, gdk_pixbuf, gexiv2
],
)

View File

@@ -50,5 +50,6 @@ libapplayermodes = static_library('applayermodes',
cairo,
gegl,
gdk_pixbuf,
gexiv2
],
)

View File

@@ -66,7 +66,7 @@ libappoperations = static_library('appoperations',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-Operations"',
dependencies: [
cairo, gegl, gdk_pixbuf,
cairo, gegl, gdk_pixbuf, gexiv2
],
)

View File

@@ -63,6 +63,6 @@ libapppaint = static_library('apppaint',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-Paint"',
dependencies: [
cairo, gegl, gdk_pixbuf, libmypaint,
cairo, gegl, gdk_pixbuf, gexiv2, libmypaint,
],
)

View File

@@ -523,7 +523,7 @@ gimp_vector_layer_removed_options_path (GimpVectorLayer *layer)
if (layer->options)
{
gimp_image_undo_push_vector_layer (gimp_item_get_image (GIMP_ITEM (layer)),
_("Discard Vector Informations"),
_("Discard Vector Information"),
layer, NULL);
g_object_set (layer->options, "path", NULL, NULL);

View File

@@ -22,6 +22,6 @@ libapppath = static_library('apppath',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-Path"',
dependencies: [
cairo, gegl, gdk_pixbuf,
cairo, gegl, gdk_pixbuf, gexiv2
],
)

View File

@@ -84,8 +84,17 @@ file_load_invoker (GimpProcedure *procedure,
gimp_value_array_index (new_args, 1));
for (i = 2; i < proc->num_args; i++)
if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
g_value_set_static_string (gimp_value_array_index (new_args, i), "");
if (GIMP_IS_PARAM_SPEC_CHOICE (proc->args[i]))
{
GParamSpecString *string_spec = G_PARAM_SPEC_STRING (proc->args[i]);
g_value_set_static_string (gimp_value_array_index (new_args, i),
string_spec->default_value);
}
else if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
{
g_value_set_static_string (gimp_value_array_index (new_args, i), "");
}
return_vals =
gimp_pdb_execute_procedure_by_name_args (gimp->pdb,
@@ -103,7 +112,16 @@ file_load_invoker (GimpProcedure *procedure,
{
GimpImage *image =
g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_image_set_load_proc (image, file_proc);
if (! gimp_image_get_load_proc (image))
/* Leave the initial load procedure if it already exists as
* it will give information about the source format. See
* similar code in file_open_image().
*/
gimp_image_set_load_proc (image, file_proc);
if (! gimp_image_get_file (image))
gimp_image_set_imported_file (image, file);
}
}

View File

@@ -223,7 +223,7 @@ temp_file_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
return return_vals;
}

View File

@@ -2318,13 +2318,15 @@ image_get_file_invoker (GimpProcedure *procedure,
if (success)
{
file = gimp_image_get_any_file (image);
if (file)
g_object_ref (file);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
return return_vals;
}
@@ -2396,13 +2398,15 @@ image_get_xcf_file_invoker (GimpProcedure *procedure,
if (success)
{
file = gimp_image_get_file (image);
if (file)
g_object_ref (file);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
return return_vals;
}
@@ -2425,13 +2429,15 @@ image_get_imported_file_invoker (GimpProcedure *procedure,
if (success)
{
file = gimp_image_get_imported_file (image);
if (file)
g_object_ref (file);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
return return_vals;
}
@@ -2454,13 +2460,15 @@ image_get_exported_file_invoker (GimpProcedure *procedure,
if (success)
{
file = gimp_image_get_exported_file (image);
if (file)
g_object_ref (file);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
return return_vals;
}

View File

@@ -30,26 +30,26 @@
#include "internal-procs.h"
/* 752 procedures registered total */
/* 759 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)
{
g_return_if_fail (GIMP_IS_PDB (pdb));
register_brush_procs (pdb);
register_brush_select_procs (pdb);
register_brush_procs (pdb);
register_brushes_procs (pdb);
register_buffer_procs (pdb);
register_channel_procs (pdb);
register_context_procs (pdb);
register_debug_procs (pdb);
register_display_procs (pdb);
register_drawable_procs (pdb);
register_drawable_color_procs (pdb);
register_drawable_edit_procs (pdb);
register_drawable_filter_procs (pdb);
register_drawable_select_procs (pdb);
register_drawable_procs (pdb);
register_dynamics_procs (pdb);
register_edit_procs (pdb);
register_file_procs (pdb);
@@ -59,12 +59,11 @@ internal_procs_init (GimpPDB *pdb)
register_fonts_procs (pdb);
register_gimp_procs (pdb);
register_gimprc_procs (pdb);
register_gradient_procs (pdb);
register_gradient_select_procs (pdb);
register_gradient_procs (pdb);
register_gradients_procs (pdb);
register_group_layer_procs (pdb);
register_help_procs (pdb);
register_image_procs (pdb);
register_image_autocrop_procs (pdb);
register_image_color_profile_procs (pdb);
register_image_convert_procs (pdb);
@@ -74,17 +73,19 @@ internal_procs_init (GimpPDB *pdb)
register_image_select_procs (pdb);
register_image_transform_procs (pdb);
register_image_undo_procs (pdb);
register_item_procs (pdb);
register_image_procs (pdb);
register_item_transform_procs (pdb);
register_item_procs (pdb);
register_layer_procs (pdb);
register_link_layer_procs (pdb);
register_message_procs (pdb);
register_paint_tools_procs (pdb);
register_palette_procs (pdb);
register_palette_select_procs (pdb);
register_palette_procs (pdb);
register_palettes_procs (pdb);
register_path_procs (pdb);
register_pattern_procs (pdb);
register_pattern_select_procs (pdb);
register_pattern_procs (pdb);
register_patterns_procs (pdb);
register_pdb_procs (pdb);
register_plug_in_procs (pdb);

View File

@@ -24,19 +24,19 @@ void internal_procs_init (GimpPDB *pdb);
/* Forward declarations for registering PDB procs */
void register_brush_procs (GimpPDB *pdb);
void register_brush_select_procs (GimpPDB *pdb);
void register_brush_procs (GimpPDB *pdb);
void register_brushes_procs (GimpPDB *pdb);
void register_buffer_procs (GimpPDB *pdb);
void register_channel_procs (GimpPDB *pdb);
void register_context_procs (GimpPDB *pdb);
void register_debug_procs (GimpPDB *pdb);
void register_display_procs (GimpPDB *pdb);
void register_drawable_procs (GimpPDB *pdb);
void register_drawable_color_procs (GimpPDB *pdb);
void register_drawable_edit_procs (GimpPDB *pdb);
void register_drawable_filter_procs (GimpPDB *pdb);
void register_drawable_select_procs (GimpPDB *pdb);
void register_drawable_procs (GimpPDB *pdb);
void register_dynamics_procs (GimpPDB *pdb);
void register_edit_procs (GimpPDB *pdb);
void register_file_procs (GimpPDB *pdb);
@@ -46,12 +46,11 @@ void register_font_select_procs (GimpPDB *pdb);
void register_fonts_procs (GimpPDB *pdb);
void register_gimp_procs (GimpPDB *pdb);
void register_gimprc_procs (GimpPDB *pdb);
void register_gradient_procs (GimpPDB *pdb);
void register_gradient_select_procs (GimpPDB *pdb);
void register_gradient_procs (GimpPDB *pdb);
void register_gradients_procs (GimpPDB *pdb);
void register_group_layer_procs (GimpPDB *pdb);
void register_help_procs (GimpPDB *pdb);
void register_image_procs (GimpPDB *pdb);
void register_image_autocrop_procs (GimpPDB *pdb);
void register_image_color_profile_procs (GimpPDB *pdb);
void register_image_convert_procs (GimpPDB *pdb);
@@ -61,17 +60,19 @@ void register_image_sample_points_procs (GimpPDB *pdb);
void register_image_select_procs (GimpPDB *pdb);
void register_image_transform_procs (GimpPDB *pdb);
void register_image_undo_procs (GimpPDB *pdb);
void register_item_procs (GimpPDB *pdb);
void register_image_procs (GimpPDB *pdb);
void register_item_transform_procs (GimpPDB *pdb);
void register_item_procs (GimpPDB *pdb);
void register_layer_procs (GimpPDB *pdb);
void register_link_layer_procs (GimpPDB *pdb);
void register_message_procs (GimpPDB *pdb);
void register_paint_tools_procs (GimpPDB *pdb);
void register_palette_procs (GimpPDB *pdb);
void register_palette_select_procs (GimpPDB *pdb);
void register_palette_procs (GimpPDB *pdb);
void register_palettes_procs (GimpPDB *pdb);
void register_path_procs (GimpPDB *pdb);
void register_pattern_procs (GimpPDB *pdb);
void register_pattern_select_procs (GimpPDB *pdb);
void register_pattern_procs (GimpPDB *pdb);
void register_patterns_procs (GimpPDB *pdb);
void register_pdb_procs (GimpPDB *pdb);
void register_plug_in_procs (GimpPDB *pdb);

View File

@@ -35,6 +35,7 @@
#include "core/gimpimage.h"
#include "core/gimpitem.h"
#include "core/gimplayermask.h"
#include "core/gimplinklayer.h"
#include "core/gimplist.h"
#include "core/gimpparamspecs.h"
#include "core/gimpselection.h"
@@ -244,6 +245,39 @@ item_id_is_group_layer_invoker (GimpProcedure *procedure,
return return_vals;
}
static GimpValueArray *
item_id_is_link_layer_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gint item_id;
gboolean text_layer = FALSE;
item_id = g_value_get_int (gimp_value_array_index (args, 0));
if (success)
{
GimpItem *item = gimp_item_get_by_id (gimp, item_id);
text_layer = (GIMP_IS_LAYER (item) &&
! gimp_item_is_removed (item) &&
gimp_item_is_link_layer (item));
}
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), text_layer);
return return_vals;
}
static GimpValueArray *
item_id_is_channel_invoker (GimpProcedure *procedure,
Gimp *gimp,
@@ -1287,6 +1321,37 @@ register_item_procs (GimpPDB *pdb)
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-item-id-is-link-layer
*/
procedure = gimp_procedure_new (item_id_is_link_layer_invoker, FALSE);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-item-id-is-link-layer");
gimp_procedure_set_static_help (procedure,
"Returns whether the item ID is a link layer.",
"This procedure returns %TRUE if the specified item ID is a link layer.\n"
"\n"
"*Note*: in most use cases, you should not use this function. See [func@Gimp.Item.id_is_layer] for a discussion on alternatives.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Jehan",
"Jehan",
"2025");
gimp_procedure_add_argument (procedure,
g_param_spec_int ("item-id",
"item id",
"The item ID",
G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("text-layer",
"text layer",
"TRUE if the item is a text layer, FALSE otherwise.",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-item-id-is-channel
*/

View File

@@ -622,7 +622,7 @@ layer_add_mask_invoker (GimpProcedure *procedure,
if (gimp_pdb_item_is_floating (GIMP_ITEM (mask),
gimp_item_get_image (GIMP_ITEM (layer)),
error))
success = (gimp_layer_add_mask (layer, mask, TRUE, error) == mask);
success = (gimp_layer_add_mask (layer, mask, TRUE, TRUE, error) == mask);
else
success = FALSE;
}

427
app/pdb/link-layer-cmds.c Normal file
View File

@@ -0,0 +1,427 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995-2003 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/* NOTE: This file is auto-generated by pdbgen.pl. */
#include "config.h"
#include "stamp-pdbgen.h"
#include <gegl.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "libgimpbase/gimpbase.h"
#include "pdb-types.h"
#include "core/gimpimage.h"
#include "core/gimplink.h"
#include "core/gimplinklayer.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimppdberror.h"
#include "gimpprocedure.h"
#include "internal-procs.h"
#include "gimp-intl.h"
static GimpValueArray *
link_layer_new_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
GimpImage *image;
GFile *file;
GimpLinkLayer *layer = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0));
file = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
if (file == NULL)
{
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
_("Failed to create link layer"));
success = FALSE;
}
if (success)
{
GimpLink *link;
link = gimp_link_new (gimp, file, 0, 0, TRUE, NULL, error);
if (link == NULL)
{
success = FALSE;
}
else
{
layer = GIMP_LINK_LAYER (gimp_link_layer_new (image, link));
if (! layer)
{
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
_("Failed to create link layer"));
success = FALSE;
}
}
g_clear_object (&link);
}
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
return return_vals;
}
static GimpValueArray *
link_layer_discard_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpLinkLayer *layer;
layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
gimp_link_layer_discard (layer);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
link_layer_monitor_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpLinkLayer *layer;
layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
gimp_link_layer_monitor (layer);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
link_layer_get_file_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
GimpLinkLayer *layer;
GFile *file = NULL;
layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
file = g_object_ref (gimp_link_get_file (gimp_link_layer_get_link (layer), NULL, NULL));
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
return return_vals;
}
static GimpValueArray *
link_layer_set_file_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpLinkLayer *layer;
GFile *file;
layer = g_value_get_object (gimp_value_array_index (args, 0));
file = g_value_get_object (gimp_value_array_index (args, 1));
if (success)
{
GimpLink *link = gimp_link_new (gimp, file, 0, 0, TRUE, NULL, error);
if (link)
{
gimp_link_layer_set_link (layer, link, TRUE);
}
else
{
success = FALSE;
}
g_clear_object (&link);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
link_layer_get_mime_type_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
GimpLinkLayer *layer;
gchar *mimetype = NULL;
layer = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
mimetype = g_strdup (gimp_link_get_mime_type (gimp_link_layer_get_link (layer)));
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_take_string (gimp_value_array_index (return_vals, 1), mimetype);
return return_vals;
}
void
register_link_layer_procs (GimpPDB *pdb)
{
GimpProcedure *procedure;
/*
* gimp-link-layer-new
*/
procedure = gimp_procedure_new (link_layer_new_invoker, FALSE);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-link-layer-new");
gimp_procedure_set_static_help (procedure,
"Creates a new link layer.",
"This procedure creates a link layer monitoring the specified @file.\n"
"\n"
"The new layer still needs to be added to the image as this is not automatic. Add the new layer with the [method@Image.insert_layer] method.\n"
"\n"
"The arguments are kept as simple as necessary for the basic case. All link attributes, however, can be modified with the appropriate `gimp_link_layer_set_*()` procedures.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Jehan",
"Jehan",
"2025");
gimp_procedure_add_argument (procedure,
gimp_param_spec_image ("image",
"image",
"The image",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_object ("file",
"file",
"The file this link layer will monitor",
G_TYPE_FILE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_link_layer ("layer",
"layer",
"The new link layer. The object belongs to libgimp and you should not free it.",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-link-layer-discard
*/
procedure = gimp_procedure_new (link_layer_discard_invoker, FALSE);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-link-layer-discard");
gimp_procedure_set_static_help (procedure,
"Discard the link layer information.",
"Discards the link information. This makes the layer behave like a normal layer.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Jehan",
"Jehan",
"2025");
gimp_procedure_add_argument (procedure,
gimp_param_spec_link_layer ("layer",
"layer",
"The link layer",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-link-layer-monitor
*/
procedure = gimp_procedure_new (link_layer_monitor_invoker, FALSE);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-link-layer-monitor");
gimp_procedure_set_static_help (procedure,
"Retrieve the link layer information.",
"Retrieve the link information. This makes the layer behave like a link layer after the link information has been discarded.\n"
"Since the source file will be monitored again, it may change the layer's render.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Jehan",
"Jehan",
"2025");
gimp_procedure_add_argument (procedure,
gimp_param_spec_link_layer ("layer",
"layer",
"The link layer",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-link-layer-get-file
*/
procedure = gimp_procedure_new (link_layer_get_file_invoker, FALSE);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-link-layer-get-file");
gimp_procedure_set_static_help (procedure,
"Get the monitored file.",
"This procedure returns the file which is being monitored.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Jehan",
"Jehan",
"2025");
gimp_procedure_add_argument (procedure,
gimp_param_spec_link_layer ("layer",
"layer",
"The link layer",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_object ("file",
"file",
"The monitored file",
G_TYPE_FILE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-link-layer-set-file
*/
procedure = gimp_procedure_new (link_layer_set_file_invoker, FALSE);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-link-layer-set-file");
gimp_procedure_set_static_help (procedure,
"Set the monitored file.",
"This procedure sets the file to be monitored. It may change the layer's render.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Jehan",
"Jehan",
"2025");
gimp_procedure_add_argument (procedure,
gimp_param_spec_link_layer ("layer",
"layer",
"The link layer",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_object ("file",
"file",
"The file to monitor",
G_TYPE_FILE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-link-layer-get-mime-type
*/
procedure = gimp_procedure_new (link_layer_get_mime_type_invoker, FALSE);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-link-layer-get-mime-type");
gimp_procedure_set_static_help (procedure,
"Get the mime type of the monitored file.",
"This procedure returns the mime type of the file which is being monitored by @layer.\n"
"\n"
"Note that this will be the real mime type, corresponding to our format support, as returned by the [class@Gimp.LoadProcedure] which actually performs the external image file import.\n"
"\n"
"This function may also return %NULL in case of error (for instance if the external file doesn't exist anymore).",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Jehan",
"Jehan",
"2025");
gimp_procedure_add_argument (procedure,
gimp_param_spec_link_layer ("layer",
"layer",
"The link layer",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("mimetype",
"mimetype",
"The mime type of the monitored file",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
}

View File

@@ -49,6 +49,7 @@ libappinternalprocs_sources = [
'item-cmds.c',
'item-transform-cmds.c',
'layer-cmds.c',
'link-layer-cmds.c',
'message-cmds.c',
'paint-tools-cmds.c',
'palette-cmds.c',
@@ -74,7 +75,7 @@ libapppdb = static_library('apppdb',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-PDB"',
dependencies: [
cairo, gegl, gdk_pixbuf,
cairo, gegl, gdk_pixbuf, gexiv2
],
)
@@ -84,7 +85,7 @@ libappinternalprocs = static_library('appinternalprocs',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-PDB"',
dependencies: [
cairo, gegl, gdk_pixbuf, pangocairo, pango,
cairo, gegl, gdk_pixbuf, gexiv2, pangocairo, pango,
],
sources: [
pdbgen

View File

@@ -40,6 +40,7 @@
#include "core/gimpimage.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
#include "core/gimplinklayer.h"
#include "core/gimppalette.h"
#include "core/gimppattern.h"
#include "core/gimpselection.h"

View File

@@ -56,6 +56,6 @@ libappplugin = static_library('appplug-in',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-Plug-In"',
dependencies: [
cairo, gegl, gdk_pixbuf,
cairo, gegl, gdk_pixbuf, gexiv2,
],
)

View File

@@ -28,6 +28,6 @@ libapppropgui = static_library('apppropgui',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-PropGUI"',
dependencies: [
gegl, gtk3,
gegl, gtk3, gexiv2
],
)

View File

@@ -464,7 +464,7 @@ sanity_check_babl (void)
#define BABL_REQUIRED_MAJOR 0
#define BABL_REQUIRED_MINOR 1
#define BABL_REQUIRED_MICRO 114
#define BABL_REQUIRED_MICRO 116
babl_get_version (&babl_major_version,
&babl_minor_version,
@@ -502,7 +502,7 @@ sanity_check_gegl (void)
#define GEGL_REQUIRED_MAJOR 0
#define GEGL_REQUIRED_MINOR 4
#define GEGL_REQUIRED_MICRO 62
#define GEGL_REQUIRED_MICRO 64
gegl_get_version (&gegl_major_version,
&gegl_minor_version,

View File

@@ -398,7 +398,7 @@ crop_tool_can_crop (GimpTestFixture *fixture,
gint cropped_w = 20;
gint cropped_h = 30;
/* Fit display and pause and let it stabalize (two idlings seems to
/* Fit display and pause and let it stabilize (two idlings seems to
* always be enough)
*/
gimp_ui_manager_activate_action (gimp_test_utils_get_ui_manager (gimp),

View File

@@ -430,8 +430,9 @@ gimp_create_mainimage (Gimp *gimp,
NULL /*channel*/);
gimp_layer_add_mask (layer,
layer_mask,
FALSE /*push_undo*/,
NULL /*error*/);
TRUE /* edit_mask */,
FALSE /* push_undo */,
NULL /* error */);
/* Image compression type
*

View File

@@ -42,6 +42,6 @@ libapptext = static_library('apptext',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-Text"',
dependencies: [
gegl, gdk_pixbuf, harfbuzz, pangocairo, pangoft2,
gegl, gdk_pixbuf, gexiv2, harfbuzz, pangocairo, pangoft2,
],
)

View File

@@ -39,6 +39,7 @@
#include "core/gimpimageproxy.h"
#include "core/gimpitem.h"
#include "core/gimplineart.h"
#include "core/gimplinklayer.h"
#include "core/gimppickable.h"
#include "core/gimppickable-contiguous-region.h"
#include "core/gimpprogress.h"
@@ -50,6 +51,8 @@
#include "operations/layer-modes/gimp-layer-modes.h"
#include "path/gimpvectorlayer.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpwidgets-utils.h"
@@ -620,7 +623,21 @@ gimp_bucket_fill_tool_button_press (GimpTool *tool,
return;
}
if (gimp_item_is_content_locked (GIMP_ITEM (drawable), &locked_item))
if (gimp_item_is_link_layer (GIMP_ITEM (drawable)))
{
gimp_tool_message_literal (tool, display,
_("Link layers must be rasterized "
"before they can be painted on."));
return;
}
else if (gimp_item_is_vector_layer (GIMP_ITEM (drawable)))
{
gimp_tool_message_literal (tool, display,
_("Vector layers must be rasterized "
"before they can be painted on."));
return;
}
else if (gimp_item_is_content_locked (GIMP_ITEM (drawable), &locked_item))
{
gimp_tool_message_literal (tool, display,
_("The selected layer's pixels are locked."));

View File

@@ -562,48 +562,50 @@ gimp_filter_tool_control (GimpTool *tool,
case GIMP_TOOL_ACTION_COMMIT:
if (filter_tool->filter)
drawable = gimp_drawable_filter_get_drawable (filter_tool->filter);
/* TODO: Expand non-destructive editing to other drawables
* besides layers and channels */
if ((! GIMP_IS_LAYER (drawable) && ! GIMP_IS_CHANNEL (drawable)) ||
GIMP_IS_LAYER_MASK (drawable) ||
(! filter_tool->existing_filter && options->merge_filter))
non_destructive = FALSE;
if (filter_tool->operation)
{
gegl_node_get (filter_tool->operation,
"operation", &operation_name,
NULL);
drawable = gimp_drawable_filter_get_drawable (filter_tool->filter);
if (! g_strcmp0 (operation_name, "gegl:nop"))
/* TODO: Expand non-destructive editing to other drawables
* besides layers and channels */
if ((! GIMP_IS_LAYER (drawable) && ! GIMP_IS_CHANNEL (drawable)) ||
GIMP_IS_LAYER_MASK (drawable) ||
(! filter_tool->existing_filter && options->merge_filter))
non_destructive = FALSE;
/* TODO: Once we can serialize GimpDrawable, remove so that filters with
* aux nodes can be non-destructive */
if (gegl_node_has_pad (filter_tool->operation, "aux") ||
/* GEGL graph is dangerous even without using third-party
* effects, because it may run any effect. E.g. it can
* run sink effects overwriting any local files with user
* rights. We leave a way in through an environment
* variable because it is a useful tool for GEGL ops
* developers but it should only be set while knowing what
* you are doing.
*/
(g_strcmp0 (operation_name, "gegl:gegl") == 0 &&
g_getenv ("GIMP_ALLOW_GEGL_GRAPH_LAYER_EFFECT") == NULL))
non_destructive = FALSE;
if (filter_tool->operation)
{
gegl_node_get (filter_tool->operation,
"operation", &operation_name,
NULL);
g_free (operation_name);
if (! g_strcmp0 (operation_name, "gegl:nop"))
non_destructive = FALSE;
/* TODO: Once we can serialize GimpDrawable, remove so that
* filters with aux nodes can be non-destructive */
if (gegl_node_has_pad (filter_tool->operation, "aux") ||
/* GEGL graph is dangerous even without using third-party
* effects, because it may run any effect. E.g. it can
* run sink effects overwriting any local files with user
* rights. We leave a way in through an environment
* variable because it is a useful tool for GEGL ops
* developers but it should only be set while knowing what
* you are doing.
*/
(g_strcmp0 (operation_name, "gegl:gegl") == 0 &&
g_getenv ("GIMP_ALLOW_GEGL_GRAPH_LAYER_EFFECT") == NULL))
non_destructive = FALSE;
g_free (operation_name);
}
/* Ensure that filters applied to group, vector or link layers are
* non-destructive */
if (GIMP_IS_GROUP_LAYER (drawable) ||
gimp_item_is_vector_layer (GIMP_ITEM (drawable)) ||
gimp_item_is_link_layer (GIMP_ITEM (drawable)))
non_destructive = TRUE;
}
/* Ensure that filters applied to group, vector or link layers are non-destructive */
if (GIMP_IS_GROUP_LAYER (drawable) ||
gimp_item_is_vector_layer (GIMP_ITEM (drawable)) ||
gimp_item_is_link_layer (GIMP_ITEM (drawable)))
non_destructive = TRUE;
gimp_filter_tool_commit (filter_tool, non_destructive);
break;
}

View File

@@ -127,6 +127,8 @@ static void gimp_mybrush_tool_cursor_update (GimpTool *tool,
options->view_zoom = (gimp_zoom_model_get_factor (shell->zoom) > 0.0f) ?
gimp_zoom_model_get_factor (shell->zoom) : 1.0f;
options->view_rotation = shell->rotate_angle;
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, display);
}
static void

View File

@@ -143,6 +143,6 @@ libapptools = static_library('apptools',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-Tools"',
dependencies: [
gegl, gtk3,
gegl, gtk3, gexiv2,
],
)

View File

@@ -3319,7 +3319,7 @@ gimp_dashboard_field_to_string (GimpDashboard *dashboard,
const FieldInfo *field_info = &group_info->fields[field];
const VariableInfo *variable_info = &variables[field_info->variable];
const VariableData *variable_data = &priv->variables[field_info->variable];
/* Tranlators: "N/A" is an abbreviation for "not available" */
/* Translators: "N/A" is an abbreviation for "not available" */
const gchar *str = C_("dashboard-value", "N/A");
gboolean static_str = TRUE;
gboolean show_limit = TRUE;

View File

@@ -2011,7 +2011,7 @@ control_compress_left (GimpGradient *gradient,
range_l = range_r = drag_seg;
}
/* Calculate left bound for dragged hadle */
/* Calculate left bound for dragged handle */
if (drag_seg == range_l)
lbound = range_l->prev->left + 2.0 * EPSILON;

View File

@@ -2245,7 +2245,7 @@ gimp_item_tree_view_popover_button_press (GtkWidget *widget,
/* Also immediately pass a release event at same position.
* Without this, we get weird pointer as though a quick drag'n
* drop occured.
* drop occurred.
*/
new_event->type = GDK_BUTTON_RELEASE;
gtk_main_do_event (new_event);

View File

@@ -222,7 +222,7 @@ gimp_palette_view_button_press (GtkWidget *widget,
gimp_palette_view_select_entry (view, entry);
/* Usually the menu is provided by a GimpEditor.
* Make sure it's also run by returning FALSE here */
* Make sure it's also run by returning FALSE here */
return FALSE;
}
else if (bevent->button == 1)

View File

@@ -386,7 +386,7 @@ gimp_shortcut_button_focus_out_event (GimpShortcutButton* button,
gpointer user_data)
{
/* On losing focus, we untoggle, so we don't have to grab anything.
* Let's avoid cases with several shortcut buttons all grabing the
* Let's avoid cases with several shortcut buttons all grabbing the
* same shortcuts for instance.
*/
if (button->priv->timer != 0)

View File

@@ -161,13 +161,12 @@ gimp_view_renderer_palette_render (GimpViewRenderer *renderer,
if ((y % renderpal->cell_height) == 0)
{
guchar rgba[4];
gint n = 0;
guchar *d = row;
for (x = 0; x < renderer->width; x++, d += 4)
{
guchar rgba[4];
if ((x % renderpal->cell_width) == 0)
{
if (list && n < renderpal->columns &&

View File

@@ -280,6 +280,6 @@ libappwidgets = static_library('appwidgets',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-Widgets"',
dependencies: [
gegl, gtk3,
gegl, gtk3, gexiv2,
],
)

View File

@@ -13,6 +13,6 @@ libappxcf = static_library('appxcf',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-XCF"',
dependencies: [
cairo, gegl, gdk_pixbuf, zlib
cairo, gegl, gdk_pixbuf, gexiv2, zlib
],
)

View File

@@ -1234,10 +1234,9 @@ xcf_load_add_masks (GimpImage *image)
show_mask = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (layer),
"gimp-layer-mask-show"));
gimp_layer_add_mask (layer, mask, FALSE, NULL);
gimp_layer_add_mask (layer, mask, edit_mask, FALSE, NULL);
gimp_layer_set_apply_mask (layer, apply_mask, FALSE);
gimp_layer_set_edit_mask (layer, edit_mask);
gimp_layer_set_show_mask (layer, show_mask, FALSE);
g_object_set_data (G_OBJECT (layer), "gimp-layer-mask", NULL);

View File

@@ -304,6 +304,7 @@ prep_pkg "xapps-common"
bund_usr "$UNIX_PREFIX" "share/glib-*/schemas"
### Glib commonly required modules
bund_usr "$UNIX_PREFIX" "lib/gvfs/*.so"
bund_usr "$UNIX_PREFIX" "lib/libproxy/libpxbackend*.so" --dest "${LIB_DIR}/${LIB_SUBDIR}"
bund_usr "$UNIX_PREFIX" "lib/gio/modules/*"
conf_app GIO_MODULE_DIR "${LIB_DIR}/${LIB_SUBDIR}gio/modules"
conf_app GIO_EXTRA_MODULES "" --no-expand
@@ -324,6 +325,7 @@ conf_app GTK_PATH "${LIB_DIR}/${LIB_SUBDIR}gtk-3.0"
prep_pkg "ibus-gtk3"
bund_usr "$UNIX_PREFIX" "lib/gtk-3.0/*.*.*/immodules/*.so" --bundler
conf_app GTK_IM_MODULE_FILE "${LIB_DIR}/${LIB_SUBDIR}gtk-3.0/*.*.*/immodules.cache"
conf_app GTK_MODULES "" --no-expand
## Core features
bund_usr "$GIMP_PREFIX" "lib/libbabl*"
@@ -352,9 +354,16 @@ bund_usr "$GIMP_PREFIX" "etc/gimp"
## Other features and plug-ins
### mypaint brushes
bund_usr "$UNIX_PREFIX" "share/mypaint-data/2.0"
####https://salsa.debian.org/multimedia-team/mypaint-brushes/-/merge_requests/2
for myb in $(find "$USR_DIR/share/mypaint-data/2.0/brushes/Dieterle" -iname "*.myb"); do
sed -i -e 's|surfacemap_x|gridmap_x|g' -e 's|surfacemap_y|gridmap_y|g' $myb;
done
### Needed for 'th' word breaking in Text tool etc
bund_usr "$UNIX_PREFIX" "share/libthai"
conf_app LIBTHAI_DICTDIR "share/libthai"
### Needed for file-heif work
bund_usr "$UNIX_PREFIX" "lib/libheif/plugins/*.so"
conf_app LIBHEIF_PLUGIN_PATH "${LIB_DIR}/${LIB_SUBDIR}libheif/plugins"
### Needed for full CJK and Cyrillic support in file-pdf
bund_usr "$UNIX_PREFIX" "share/poppler"
### Needed for file-ps work. See: #14785
@@ -375,9 +384,6 @@ if [ "$GIMP_UNSTABLE" ] || [ -z "$GIMP_RELEASE" ]; then
### Needed for GTK inspector
bund_usr "$UNIX_PREFIX" "lib/libEGL*"
bund_usr "$UNIX_PREFIX" "lib/libGL*"
bund_usr "$UNIX_PREFIX" "lib/dri*"
#TODO: remove this on Debian Trixie (which have Mesa 24.2)
conf_app LIBGL_DRIVERS_PATH "${LIB_DIR}/${LIB_SUBDIR}dri"
fi
### Debug dialog
bund_usr "$GIMP_PREFIX" "bin/gimp-debug-tool*" --dest "libexec"
@@ -391,7 +397,8 @@ wipe_usr ${LIB_DIR}/*.pyc
conf_app PYTHONDONTWRITEBYTECODE "1" --no-expand
#### JavaScript plug-ins support
bund_usr "$UNIX_PREFIX" "bin/gjs*"
bund_usr "$UNIX_PREFIX" "lib/gjs/girepository-1.0/Gjs*" --dest "${LIB_DIR}/${LIB_SUBDIR}girepository-1.0"
bund_usr "$UNIX_PREFIX" "lib/gjs/girepository-*/Gjs*.typelib" --dest "${LIB_DIR}/${LIB_SUBDIR}girepository-1.0"
bund_usr "$UNIX_PREFIX" "lib/girepository-*/GioUnix*.typelib"
####FIXME: lua crashes with loop: See: #11895
#bund_usr "$UNIX_PREFIX" "bin/luajit" --rename "lua"
#bund_usr "$UNIX_PREFIX" "lib/liblua5.1-lgi*"

View File

@@ -8,11 +8,11 @@ if [ -z "$APPDIR" ]; then
fi
## Minimum runtime-sandboxed paths. See: #13527, #13603 and #13001
## Minimum runtime paths. See: #13527 and #13603
export PATH="${APPDIR}/usr/bin/:$PATH"
unset LD_PRELOAD
unset LD_LIBRARY_PATH
export XDG_DATA_DIRS="${APPDIR}/usr/share/"
export XDG_DATA_DIRS="${APPDIR}/usr/share/:$XDG_DATA_DIRS"
## Other needed runtime paths (added by 3_dist-gimp-goappimage.sh)

View File

@@ -60,10 +60,19 @@ if [ "$CI_PIPELINE_SOURCE" = 'schedule' ]; then
printf "(INFO): All dependencies sources are up to date. Building them...\n"
fi
fi
## (The deps building is too long and no complete output would be collected,
## even from GitLab runner messages. So, let's silent and save logs as a file.)
if [ "$GITLAB_CI" ]; then
built_deps_image="quay.io/gnome_infrastructure/gnome-nightly-cache:$(uname -m)-$(echo "org.gimp.GIMP.Nightly" | tr 'A-Z' 'a-z')-master"
oras pull $built_deps_image && oras logout quay.io || true
tar --zstd --xattrs -xf _build-$RUNNER.tar.zst || true
fi
eval $FLATPAK_BUILDER --force-clean --disable-rofiles-fuse --keep-build-dirs --build-only --stop-at=babl \
"$GIMP_PREFIX" build/linux/flatpak/org.gimp.GIMP-nightly.json > flatpak-builder.log 2>&1
"$GIMP_PREFIX" build/linux/flatpak/org.gimp.GIMP-nightly.json
if [ "$GITLAB_CI" ] && [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ]; then
tar --zstd --xattrs --exclude=.flatpak-builder/build/babl-1 --exclude=.flatpak-builder/build/gegl-1 -cf _build-$RUNNER.tar.zst .flatpak-builder/
cat $NIGHTLY_CACHE_ORAS_TOKEN_FILE | oras login -u "${NIGHTLY_CACHE_ORAS_USER}" --password-stdin quay.io || true
oras push $built_deps_image _build-$RUNNER.tar.zst && oras logout quay.io || true
rm _build-$RUNNER.tar.zst
fi
printf "\e[0Ksection_end:`date +%s`:deps_build\r\e[0K\n"
printf "\e[0Ksection_start:`date +%s`:babl_build[collapsed=true]\r\e[0KBuilding babl\n"
@@ -82,5 +91,5 @@ if [ "$GITLAB_CI" ]; then
printf "\e[0Ksection_end:`date +%s`:gegl_build\r\e[0K\n"
## Save built deps for 'gimp-flatpak' job
tar cf _build-$RUNNER.tar .flatpak-builder/
tar --zstd --xattrs -cf _build-$RUNNER.tar.zst .flatpak-builder/
fi

View File

@@ -23,7 +23,7 @@ eval "$(sed -n '/Install part/,/End of check/p' build/linux/flatpak/1_build-deps
if [ "$GITLAB_CI" ]; then
# Extract deps from previous job
tar xf _build-$RUNNER.tar
tar xf _build-$RUNNER.tar.zst
fi

View File

@@ -29,6 +29,7 @@
"--filesystem=/tmp",
"--filesystem=xdg-run/gvfs",
"--filesystem=xdg-run/gvfsd",
"--unset-env=GTK_MODULES",
"--talk-name=org.gtk.vfs.*",
"--talk-name=org.freedesktop.FileManager1",
"--talk-name=org.gnome.Shell.Screenshot",
@@ -230,7 +231,7 @@
"builddir": true,
"config-opts": [
"-DOJPH_ENABLE_TIFF_SUPPORT=OFF",
"-DOJPH_BUILD_EXECUTABLES=OFF"
"-DOJPH_BUILD_EXECUTABLES=OFF"
],
"cleanup": [
"/include",
@@ -244,8 +245,8 @@
"sources": [
{
"type": "archive",
"url": "https://poppler.freedesktop.org/poppler-25.09.1.tar.xz",
"sha256": "0c1091d01d3dd1664a13816861e812d02b29201e96665454b81b52d261fad658",
"url": "https://poppler.freedesktop.org/poppler-25.10.0.tar.xz",
"sha256": "6b5e9bb64dabb15787a14db1675291c7afaf9387438cc93a4fb7f6aec4ee6fe0",
"x-checker-data": {
"type": "anitya",
"project-id": 3686,
@@ -608,9 +609,9 @@
]
}
],
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DUTILS=OFF",
"-DTESTS=OFF"
],

View File

@@ -21,14 +21,16 @@ apps:
desktop: usr/share/applications/gimp.desktop
environment:
HOME: $SNAP_REAL_HOME
#Matting Leving support on FG select
LD_LIBRARY_PATH: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/blas:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/lapack:$LD_LIBRARY_PATH
#Internet connection and Matting Leving support on FG select
LD_LIBRARY_PATH: $SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libproxy:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/blas:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/lapack:$LD_LIBRARY_PATH
#JavaScript plug-ins support
GI_TYPELIB_PATH: $SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gjs/girepository-1.0:$GI_TYPELIB_PATH
#AVIF, HEIC and HEJ2 plug-ins support
LIBHEIF_PLUGIN_PATH: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libheif/plugins
#PostScript plug-in support
GS_LIB: $SNAP/usr/share/ghostscript/10.02.1/Resource/Init
#Acessibility support
GTK_MODULES: ""
slots:
- dbus-gimp
plugs:
@@ -164,3 +166,7 @@ parts:
# get gimp icon for proper desktop integration
cp $CRAFT_STAGE/usr/share/icons/hicolor/scalable/apps/gimp.svg $CRAFT_PRIME/gimp
craftctl default
#https://salsa.debian.org/multimedia-team/mypaint-brushes/-/merge_requests/2
for myb in $(find "$CRAFT_PRIME/usr/share/mypaint-data/2.0/brushes/Dieterle" -iname "*.myb"); do
sed -i -e 's|surfacemap_x|gridmap_x|g' -e 's|surfacemap_y|gridmap_y|g' $myb;
done

View File

@@ -32,8 +32,7 @@ if ($GITLAB_CI)
# Prepare env
if (-not $GIMP_PREFIX)
{
#FIXME:'gimpenv' have buggy code about Windows paths. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/12284
$GIMP_PREFIX = "$PWD\..\_install".Replace('\', '/')
$GIMP_PREFIX = "$PWD\..\_install"
}
Invoke-Expression ((Get-Content .gitlab-ci.yml | Select-String 'win_environ\[' -Context 0,7) -replace '> ','' -replace '- ','')

View File

@@ -26,7 +26,7 @@ Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0)
## Install or Update Inno (if needed)
## (We need to ensure that TLS 1.2 is enabled because of some runners)
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest https://jrsoftware.org/download.php/is.exe -OutFile ..\is.exe
Invoke-WebRequest https://files.jrsoftware.org/is/6/innosetup-6.5.4.exe -OutFile ..\is.exe
$inno_version_downloaded = (Get-Item ..\is.exe).VersionInfo.ProductVersion -replace ' ',''
$broken_inno = Get-ChildItem $env:TMP -Filter *.isl.bak -ErrorAction SilentlyContinue
$inno_version = Get-ItemProperty Registry::'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup*' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty DisplayVersion

View File

@@ -140,10 +140,12 @@
;3 INSTALLER SOURCE
#define ASSETS_DIR BUILD_DIR + "\build\windows\installer"
;3.1.1 Icons and other files
#define ASSETS_DIR BUILD_DIR + "\build\windows\installer"
#include ASSETS_DIR + "\splash-dimensions.h"
#define WIZARD_SMALL_IMAGE ASSETS_DIR + "\gimp.scale-100.bmp," + ASSETS_DIR + "\gimp.scale-125.bmp," + ASSETS_DIR + "\gimp.scale-150.bmp," + ASSETS_DIR + "\gimp.scale-175.bmp," + ASSETS_DIR + "\gimp.scale-200.bmp," + ASSETS_DIR + "\gimp.scale-225.bmp," + ASSETS_DIR + "\gimp.scale-250.bmp"
#define WIZARD_IMAGE ASSETS_DIR + "\install-end.scale-100.bmp," + ASSETS_DIR + "\install-end.scale-125.bmp," + ASSETS_DIR + "\install-end.scale-150.bmp," + ASSETS_DIR + "\install-end.scale-175.bmp," + ASSETS_DIR + "\install-end.scale-200.bmp," + ASSETS_DIR + "\install-end.scale-225.bmp," + ASSETS_DIR + "\install-end.scale-250.bmp"
;3.1.2 Installer lang files
[Languages]
@@ -247,8 +249,9 @@ AlwaysShowDirOnReadyPage=yes
WizardStyle=modern
WizardSizePercent=100
WizardResizable=no
WizardSmallImageFile={#ASSETS_DIR}\gimp.scale-100.bmp,{#ASSETS_DIR}\gimp.scale-125.bmp,{#ASSETS_DIR}\gimp.scale-150.bmp,{#ASSETS_DIR}\gimp.scale-175.bmp,{#ASSETS_DIR}\gimp.scale-200.bmp,{#ASSETS_DIR}\gimp.scale-225.bmp,{#ASSETS_DIR}\gimp.scale-250.bmp
WizardImageFile={#ASSETS_DIR}\install-end.scale-100.bmp,{#ASSETS_DIR}\install-end.scale-125.bmp,{#ASSETS_DIR}\install-end.scale-150.bmp,{#ASSETS_DIR}\install-end.scale-175.bmp,{#ASSETS_DIR}\install-end.scale-200.bmp,{#ASSETS_DIR}\install-end.scale-225.bmp,{#ASSETS_DIR}\install-end.scale-250.bmp
WizardImageAlphaFormat=defined
WizardSmallImageFile={#WIZARD_SMALL_IMAGE}
WizardImageFile={#WIZARD_IMAGE}
WizardImageStretch=yes
[LangOptions]
DialogFontName=Segoe UI

View File

@@ -48,7 +48,7 @@ if have_vala and have_gobject_introspection
'goat-exercise-vala.vala',
include_directories: [ rootInclude, ],
dependencies: [
libgimp_vapi, libgimpui_vapi, gtk3, gegl, math,
libgimp_vapi, libgimpui_vapi, libgimpui_dep, math,
],
c_args: [
'-DGETTEXT_PACKAGE="@0@"'.format('org.gimp.extension.goat-exercises'),

View File

@@ -601,6 +601,7 @@ EXPORTS
gimp_item_id_is_group_layer
gimp_item_id_is_layer
gimp_item_id_is_layer_mask
gimp_item_id_is_link_layer
gimp_item_id_is_path
gimp_item_id_is_selection
gimp_item_id_is_text_layer
@@ -612,10 +613,12 @@ EXPORTS
gimp_item_is_group_layer
gimp_item_is_layer
gimp_item_is_layer_mask
gimp_item_is_link_layer
gimp_item_is_path
gimp_item_is_selection
gimp_item_is_text_layer
gimp_item_is_valid
gimp_item_is_vector_layer
gimp_item_list_children
gimp_item_set_color_tag
gimp_item_set_expanded
@@ -678,6 +681,14 @@ EXPORTS
gimp_layer_set_offsets
gimp_layer_set_opacity
gimp_layer_set_show_mask
gimp_link_layer_discard
gimp_link_layer_get_by_id
gimp_link_layer_get_file
gimp_link_layer_get_mime_type
gimp_link_layer_get_type
gimp_link_layer_monitor
gimp_link_layer_new
gimp_link_layer_set_file
gimp_list_images
gimp_load_procedure_get_handles_raw
gimp_load_procedure_get_thumbnail_loader
@@ -724,6 +735,7 @@ EXPORTS
gimp_param_item_get_type
gimp_param_layer_get_type
gimp_param_layer_mask_get_type
gimp_param_link_layer_get_type
gimp_param_palette_get_type
gimp_param_path_get_type
gimp_param_pattern_get_type
@@ -746,6 +758,7 @@ EXPORTS
gimp_param_spec_item_none_allowed
gimp_param_spec_layer
gimp_param_spec_layer_mask
gimp_param_spec_link_layer
gimp_param_spec_palette
gimp_param_spec_path
gimp_param_spec_pattern
@@ -882,6 +895,9 @@ EXPORTS
gimp_procedure_add_layer_mask_aux_argument
gimp_procedure_add_layer_mask_return_value
gimp_procedure_add_layer_return_value
gimp_procedure_add_link_layer_argument
gimp_procedure_add_link_layer_aux_argument
gimp_procedure_add_link_layer_return_value
gimp_procedure_add_menu_path
gimp_procedure_add_palette_argument
gimp_procedure_add_palette_aux_argument

View File

@@ -57,6 +57,7 @@
#include <libgimp/gimpitem.h>
#include <libgimp/gimplayer.h>
#include <libgimp/gimplayermask.h>
#include <libgimp/gimplinklayer.h>
#include <libgimp/gimploadprocedure.h>
#include <libgimp/gimppalette.h>
#include <libgimp/gimpparamspecs.h>

View File

@@ -67,6 +67,7 @@
#include <libgimp/gimpitem_pdb.h>
#include <libgimp/gimpitemtransform_pdb.h>
#include <libgimp/gimplayer_pdb.h>
#include <libgimp/gimplinklayer_pdb.h>
#include <libgimp/gimpmessage_pdb.h>
#include <libgimp/gimppainttools_pdb.h>
#include <libgimp/gimppalette_pdb.h>

View File

@@ -28,7 +28,7 @@
* GimpFileProcedure:
*
* File procedures implement file support. They cannot be created directly.
* Instead, you will create an instance of one of the sublasses (such as export
* Instead, you will create an instance of one of the subclasses (such as export
* or load procedures). This provides a common interface for file-related
* functions on these objects.
**/

View File

@@ -289,6 +289,11 @@ _gimp_gp_param_def_to_param_spec (const GPParamDef *param_def)
param_def->meta.m_id.none_ok,
flags);
if (! strcmp (param_def->type_name, "GimpParamLinkLayer"))
return gimp_param_spec_link_layer (name, nick, blurb,
param_def->meta.m_id.none_ok,
flags);
if (! strcmp (param_def->type_name, "GimpParamGroupLayer"))
return gimp_param_spec_group_layer (name, nick, blurb,
param_def->meta.m_id.none_ok,
@@ -725,6 +730,10 @@ _gimp_param_spec_to_gp_param_def (GParamSpec *pspec,
{
type_name = "GimpParamVectorLayer";
}
else if (value_type == GIMP_TYPE_LINK_LAYER)
{
type_name = "GimpParamLinkLayer";
}
else if (value_type == GIMP_TYPE_GROUP_LAYER)
{
type_name = "GimpParamGroupLayer";

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