Commit Graph

51357 Commits

Author SHA1 Message Date
Jordi Mas e0373fba91 Update Catalan translation 2024-01-27 09:35:32 +01:00
Jacob Boerema 2bb0e2a636 tests: fix typo in function name 2024-01-26 13:49:48 -05:00
Jacob Boerema e1c9ec5a06 tests: mark tests skipped due to no display as skipped
We were skipping tests when there is no display, which is always the
case on Windows. However, these tests always showed as succeeded.
Unless you looked at the test log, you wouldn't noticed that most of
the tests weren't actually performed.

Exit these tests with the value GIMP_EXIT_TEST_SKIPPED instead of
EXIT_SUCCESS.
2024-01-26 13:47:20 -05:00
Jacob Boerema 064fd69f18 tests: fix #10694 test suite fails due to use of g_assert
You are not supposed to use g_assert in tests because g_assert can be
disabled using -DG_DISABLE_ASSERT, which makes tests fail.

Instead let's use the recommended replacement g_assert_true. At this
time we are not bothering using more specific g_assert_* functions,
since there are plans to change our test suite.
2024-01-26 13:44:30 -05:00
Daniel Novomeský 1148213825
build: Install QOI header manually 2024-01-26 14:47:00 +01:00
Yuri Chornoivan 7ff284c56f Update Ukrainian translation 2024-01-26 13:18:11 +00:00
Alx Sa 4a10b11e3e libgimpconfig: Fix cross-platform gsize warning
gimp_config_writer_printf () is used to print out a gsize variable, data_length.
gsize's actual size varies depending on platform, so using the format "%lu" throws
a warning on some platforms and switching to "%llu" throws a warning on others.
@Wormnest suggested ("%" G_GSIZE_FORMAT) as a universal format to resolve
this warning.
2024-01-26 12:08:18 +00:00
Jehan c32e803679 app, themes: merge the Gray and Default themes and add theme color scheme concept.
Until now, we were following a similar concept of color schemes as what most OS
are doing. For instance, Freedesktop recently introduced a tri-state color
scheme of "Prefer Light", "Prefer Dark" and "Default", the latter being either
whatever the software prefers (e.g. we prefer either Dark or Gray for graphics
software usually) or what the system prefers. See #8675.

Until now, with GTK, we only had a boolean "prefer dark" setting through the
"gtk-application-prefer-dark-theme" settings. There is not even a "prefer
light".

Nevertheless for graphics application, there is clearly a third case (fourth if
we added a "follow system color preferences" which we don't implement for now):
gray mode and in particular middle gray. Having a middle gray UI is often
considered a necessity when working on colors in order to protect our perception
of color from being influenced by surrounding UI.
To fill this need, we were proposing a Default vs. a Gray theme in GIMP, but
this was a bit confusing and felt illogical, as discussed on IRC some time ago.
Also depending on whether you chose "prefer dark" or not for the gray theme,
this one was itself 2 themes, which made things odd and harder to work on.

Instead this commit:

- adds a color scheme concept in GIMP with 3 variants so far: light, gray and
  dark. A possible fourth (future) variant might be to follow the system
  preference (do all OS provide such a queriable option?).
- Our Gray theme is merged into Default (as the gray color scheme variant).
- Custom themes can add the following CSS files: gimp-light.css, gimp-gray.css,
  gimp-dark.css which are the base file for their respective scheme. gimp.css is
  still used as a fallback though it is not necessary (our own Default theme
  does not provide a gimp.css anymore). Custom themes don't have to provide all
  3 variants. A theme can just provide one or 2 variants if it only wants to
  support 1 or 2 use cases.
2024-01-25 18:56:13 +01:00
Sabri Ünal e741920d8e Update Turkish translation 2024-01-25 14:42:40 +00:00
bootchk 69fedf6995 Fix #10475 double popup context menu on RMB in dockable chooser
Chooser return GDK_EVENT_STOP so parent manager does not also popup second menu.
Specifically, return the result of the call to gimp_editor_popup_menu_at_pointer.
When a menu does pop up (for a dockable), that result is GDK_EVENT_STOP
and the event does not propagate to the parent widget.

Added a comment about why we ignore the result of a call
to gimp_editor_popup_menu_at_pointer in another place,
since it is not obvious why that call is different.

All other current behavior retained.
Other current behavior might be separate issue:
LMB or RMB outside any item, or in the current selected item,
in the chooser that popups from the toolbox,
should probably close the popup chooser, or give an audible alert,
because it does nothing.
Note that a chooser is also used in a remote dialog for a plugin,
and it closes a different way, choosing an OK button.
2024-01-25 14:13:00 +00:00
Jehan 0ea48926aa NEWS: update. 2024-01-25 15:08:13 +01:00
Yuri Chornoivan 743230fbe6 Update Ukrainian translation 2024-01-25 13:56:14 +00:00
Marco Ciampa ecfc90d202 Updated Italian translation (WIP) 2024-01-25 11:17:03 +01:00
bootchk 6aa9f97819 Fix #10690 build broken on GLib < 2.74
Use 0 instead of new symbol G_CONNECT_DEFAULT first defined in glib2.74
2024-01-24 13:30:10 -05:00
Jacob Boerema f78186e03b Get rid of old Windows specific defines
MINGW64
- uses 0x601 as value for _WIN32_WINNT. No need for us to define
it to that value or even lower values in some places.
This also gets rid of:  warning: "_WIN32_WINNT" redefined
- has 0x0502 for WINVER, so get rid of us setting it to 0x0500 in
gimp-app-test-utils.h. It also seems that the need to use G_OS_WIN32
has disappeared here.
- DIRECTINPUT_VERSION is 0x0800, no need for us to set it to that value.
- AI_ADDRCONFIG was apparently missing from the MINGW headers in the
past, but not anymore.
2024-01-24 12:10:00 -05:00
Anders Jonsson be1259de2b Update POTFILES.in 2024-01-24 09:18:47 +01:00
Ekaterine Papava 6c21b03631 Update Georgian translation 2024-01-23 21:30:33 +00:00
Ekaterine Papava 1c0c8ac38f Update Georgian translation 2024-01-23 21:24:51 +00:00
Jehan d1ea2f35c3 desktop: update the <release> info in AppStream metadata. 2024-01-23 22:09:03 +01:00
Anders Jonsson e3896352b9 app: fix test-ui typo 2024-01-23 20:46:01 +00:00
Yuri Chornoivan 65f99b66fa Update Ukrainian translation 2024-01-23 20:44:10 +00:00
Yuri Chornoivan cdde3f220f Update Ukrainian translation 2024-01-23 19:36:48 +00:00
bootchk 25280ffdb1 test: add tests of paint ops. 2024-01-23 18:30:32 +00:00
Jehan 3f54d83bac app: do not maintain manually the list of core ops with custom config object.
The list of objects where the config object is a dedicated custom class (instead
of a runtime-registered class) is well known. These are the operations
registered inside gimp_operations_init().

The list inside gimp_gegl_procedure_execute_async() which the previous commit
was updating was not right: it was still missing "gimp:hue-saturation" and
"gimp:threshold" should not have been on the list (this was generating a
CRITICAL when trying to get the "config" property on this object).

Instead let's add some init/exit() functions in gimp-operation-config API to
distinguish the operations with custom config (registered during init) with all
the others. Then we add gimp_operation_config_is_custom() which can be used
everywhere where we want to verify if an operation is using a custom-made config
object or a generated class just mirroring the operation properties.

This way, we should not get out-of-sync anymore.
2024-01-23 15:39:09 +00:00
Alx Sa 7a05a8956f tools: Fix Color Balance editing crash
Adds gimp:color-balance to the list of
GIMP-specific GEGL operations we
retrieve the GimpConfig settings from.
Also prevents trying to set a GEGL
property when editing if it couldn't be
converted properly (e.g. GimpConfig)
2024-01-23 15:39:09 +00:00
Jehan 956f16e173 Issue #10566: support GimpConfig and enum arguments and a few more fixes.
Now that we save GEGL operation arguments ourselves (instead of relying on
GEGL-generated XML), we can serialize and deserialize GimpConfig arguments which
are used in various operations implemented within GIMP core code.

Additionally:

- Also support saving and loading all enum types.
- PROP_EFFECT_ARGUMENT renamed to PROP_FILTER_ARGUMENT for consistent naming.
- A bit more accurate handling on save and load errors with dedicated messages
  to various issues.
- Use PROP_FLOAT_OPACITY instead of the obsolete 8-bit PROP_OPACITY (actually
  32-bit but stored as 0-255 int).
- Fix a leaking string.
2024-01-23 15:39:09 +00:00
Alx Sa 8b2975e0e8 Additional minor fixes
*It's possible to have one layer selected but edit the filter of another layer.
The FilterTool code was updated to use the filter's drawable if editing.
*Prevents editing if multiple layers are selected.
This is a current limitation of the filter tool itself, but it was causing issues with NDE.
*If an XCF with a filter from a third-party plug-in is loaded, the filter won't be
created if the user doesn't have it installed.
Note that GEGL still throws a lot of warnings about missing properties - not sure how to resolve that.
*Refresh drawable when finished editing a filter to fix issue with lingering preview splits
*Fix issue with loading more than one filter after XCF format changes
2024-01-23 15:39:09 +00:00
Jehan a489345e77 app: a few fixups to MR !958 (initial non-destructive editing).
- Do not leak allocated return value of gegl_node_to_xml_full().
- When merging layer effects, use gimp_drawable_filter_commit(), making
  sure we use the exact same code path as when applying layer effects
  destructively from the start. This also ensures that filters are
  properly removed from the filter stack (unlike
  gimp_drawable_merge_filter()), which was the reason why the rendering
  was wrong (hence getting the buffer without effects first, then
  reapplying it after was only a workaround to an actual bug).
- When removing a filter, verify the object still exists before doing
  anything with it. If this was the last reference, we don't want to
  call functions on this object. In gimp_drawable_filter_commit(), we
  set up a weak pointer. In gimp_drawable_filter_remove_filter() itself,
  we save the pointer to the filter's drawable before actual removal (as
  we don't want to dereference a freed object later on).
- export_merge_layer_effects() should merge filters recursively through
  layer groups.
- clean up the XCF code:
  * No need to wrap the effect pointers list into 2 zero offset. Only
    have one zero offset to indicate the list end.
  * Add the layer effect mask in the effect structure (not in the layer
    structure), similar as for layer masks.
  * Effect name and icon made as main data in the structure, not as
    properties.
2024-01-23 15:39:09 +00:00
Alx Sa e678a20951 core: Initial non-destructive editing implementation
This patch implements an initial form of
non-destructive editing. Filters now stay active
instead of being immediately merged down.
A new column is added to the layer tree view, which
can be clicked to show a pop-over menu.
Filters can currently be hidden/shown, edited, reordered,
deleted, and merged down from this pop-over menu.

Currently, this works on layers and layer selections only.
Plenty of room for improvement!
2024-01-23 15:39:09 +00:00
bootchk ec90cd1d9a Add more tests of PDB API in ScriptFu. 2024-01-23 07:19:09 -05:00
Jordi Mas aab48a7c89 Fixes to Catalan translation 2024-01-22 21:36:30 +01:00
bootchk 784cde7f14 Fix #10496 crash on RMB in chooser item not the current selection
Use g_signal_connect_object to ensure object passed to handler
is not destroyed in the middle of the handler by knock-on signal handling.

Note there are comments about this in gimpcontainertreeview.c line 1592.
And similar code i.e. calls to gimp_container_view_get_container
that seem to be intended to solve but might actually also be susceptible.
Those calls in icon view throw CRITICALs during this issue.
But testing of the tree view (a list instead of a grid)
doesn't seem to crash, so leave well enough alone.
2024-01-22 18:29:20 +00:00
Vasil Pupkin 7d8495fdd2 Update Belarusian translation 2024-01-22 18:27:38 +00:00
Sabri Ünal 84c2b63212 Update Turkish translation 2024-01-22 12:40:07 +00:00
Sabri Ünal dff4486ab9 Update Turkish translation 2024-01-22 12:28:47 +00:00
Jordi Mas a90f731d11 Update Catalan translation 2024-01-21 20:34:21 +01:00
Bruno Lopes c60604a535 Partially revert "build/flatpak: Drop 'gimp_app_version' hardcoding"
As suggested by Jehan, the manifest will be configured by meson.
Of course, for CI compliance, this pushes the job to a further stage:
'packaging', which is what Flatpak is about, after all.

The distribution job name has also been changed, because when Store job
is merged, this will be the new nomenclature of the distribution jobs,
which was not changed since !1171 by lack of time.
2024-01-21 14:04:35 +00:00
dimspingos 0445f0b9ed Updated Greek Translation 2024-01-21 15:14:30 +02:00
Alx Sa 1b5c6630c3 widgets: Add MacOS-compatible menu separator
Per @lukaso, the "rightwards triangle arrowhead" character
doesn't render on MacOS. This patch uses a different character
for MacOS only until a standard character can be decided on.
2024-01-20 18:48:45 +00:00
Jürgen Benvenuti 462b874ae8 Update German translation 2024-01-20 18:45:20 +00:00
Kolbjørn Stuestøl 9a586890cf Update Norwegian Nynorsk translation 2024-01-20 15:26:58 +00:00
Bruno Lopes ddf6d6e513 build/windows: Remove GTK patches
There is no point in keeping .patches in our source since we aren't applying
them and there are "backup" MRs in GTK: GNOME/gtk!3275 and GNOME/gtk!4432.
2024-01-20 09:47:48 -03:00
Boyuan Yang 182d3cece6 Update Chinese (China) translation 2024-01-20 01:55:17 +00:00
Boyuan Yang 1bccd22595 Update Chinese (China) translation 2024-01-20 01:53:35 +00:00
Boyuan Yang f81be6d5b3 Update Chinese (China) translation 2024-01-20 01:53:20 +00:00
Alx Sa bfcc812623 core: Fix warning when pasting to a mask
Resolves #10657.
d120e592 fixed a crash when pasting into an empty image.
However, it created a new issue when pasting into a layer mask.
It caused a later call to gimp_drawable_convert_type () to fail, as
the pasted image would not need to be converted if the image's
settings were used rather than the drawable.
This patch fixes both issues by checking if the selection/image is empty,
and assigned the base type and precision values from either the selection
or the image accordingly.
2024-01-19 22:44:51 +00:00
Bruno Lopes 161d6e6932 Add .vscode/settings.json compliant with Coding Style
As recommended in the Coding Style "Code editor" section:
https://developer.gimp.org/core/coding_style/#code-editor--integrated-development-environment-ide
2024-01-19 16:06:06 -03:00
Bruno Lopes e653535ed2 .gitignore: Delete unused exceptions
The '_build' and '.vscode' folders (this in particular makes impossible
to commit settings.json) are not welcome in this general file, according
to Jehan comment:
https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1021#note_1801018
2024-01-19 15:43:46 -03:00
Jordi Mas 5a4a58a728 Update Catalan translation 2024-01-19 16:07:11 +01:00
Alx Sa 21d24467ad scripts: Fix "Remove all Guides" script bug
Resolves #10651
The "Remove All Guides" script calls
gimp-image-find-next-guide, which per
its description can take in 0. However,
the parameter sets 1 as the minimum
value.
This patch fixes the range so that it can
accept 0, which enables the Remove All
Guides script to work again.
It also updates the script to the new
multi-layer aware API.
2024-01-19 11:17:36 +00:00