Commit Graph

52873 Commits

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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