Commit Graph

48399 Commits

Author SHA1 Message Date
Hugo Carvalho 0e80f4467d Update Portuguese translation 2022-05-18 14:39:33 +00:00
Jacob Boerema e268d38fb1 plug-ins: remove unnecessary Windows specific code in tinyscheme
Removal of the snprintf define was also part of the UCRT Windows patch
in MINGW. Although it builds fine without this change, there is no need
anymore to redefine snprintf. In addition, I seem to remember that
_snprintf had a shortcoming.

So let's remove the Windows specific code, since it works fine without it.
2022-05-17 17:23:06 -04:00
Jacob Boerema ef817dc452 plug-ins: fix Windows build in UCRT environment
The UCRT environment is a successor to the MINGW environment on Windows
with a more modern C runtime library.
Building under UCRT we get this error:
../../gimp/plug-ins/file-raw/file-darktable.c:420:7: error:
 function '__p__environ' is initialized like a variable"

To fix this we use the relevant part of patch 6 from:
https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-gimp
2022-05-17 17:23:06 -04:00
Yuri Chornoivan 7450af8fd1 Update Ukrainian translation 2022-05-17 16:55:15 +00:00
Alexandre Prokoudine 6bdff26969 Deweirdify recent Russian translation update, part 2 of many 2022-05-17 10:34:21 +03:00
Alexandre Prokoudine 5da57f9c51 Deweirdify recent Russian translation update, part 1 of many 2022-05-16 22:03:00 +03:00
Nikc 42cbaff322 Issue #4492: Add "Flip image", save visible layers feature to DDS 2022-05-16 18:56:16 +00:00
Jacob Boerema 3644b9010a plug-ins: fix #1351 Raw Data Import Creates Blank/White Image...
when Offset and Dimensions Bigger than File Size.

If we didn't read the exact amount of bytes, the whole image would be
filled with white.

Let's change this, so we read as much bytes as we can, and fill the rest
with white.
2022-05-16 14:00:17 -04:00
Yuri Chornoivan ed5d842a0b Update Ukrainian translation 2022-05-16 16:19:20 +00:00
Jacob Boerema 980e604880 plug-ins: fix reading of FLI files where the filesize is off-by-on 2022-05-16 11:22:14 -04:00
Jacob Boerema ca8eee1755 plug-ins: improve error handling of FLI export
Added GError parameters to all static file write functions, check for
failed writing and return an error if that is the case.

Additionally, at end of file make sure the last dummy byte is written to
make chunks an even size.
2022-05-16 11:22:14 -04:00
Nikc fccc13b782 Issue #4: Enable loading transparent .EPS files 2022-05-16 14:31:50 +00:00
Aleksandr Melman 18c80c0710 Update Russian translation 2022-05-15 14:35:36 +00:00
Aleksandr Melman baa406b821 Update Russian translation 2022-05-15 14:16:04 +00:00
Piotr Drąg 8f0a5f2da5 Update Polish translation 2022-05-15 14:16:29 +02:00
Anders Jonsson 5924196007 Update Swedish translation 2022-05-14 18:45:13 +00:00
Jehan 84a21eacb8 devel-docs: work-around the g-ir-docs bugs in autotools too. 2022-05-14 19:55:11 +02:00
Hugo Carvalho 8ef8774d90 Update Portuguese translation 2022-05-14 17:27:05 +00:00
Hugo Carvalho 8f96af147b Update Portuguese translation 2022-05-14 17:23:59 +00:00
Jehan 6f14db9ea2 devel-docs: fix again
This will work around such errors from the g-ir-doc build:

> devel-docs/g-ir-docs/pages/python/Gimp-3.0/Gimp.checks_get_colors.page:46: parser error : EntityRef: expecting ';'
> gimp_checks_get_colors (gimp_check_type (), &color1, &color2);
>                                                    ^

Similar to commit 7123b6c466, it cannot really be considered a proper
fix, barely a workaround for g-ir-doc-tool not even able to produce
valid XML. Here we have ampersands which it should have espaced into XML
entities.
Anyway this will do for now (until we just decide to drop the g-ir-docs
tools?).
2022-05-14 18:47:53 +02:00
Jehan b0384e8e4f NEWS: updates. 2022-05-14 17:43:39 +02:00
Jehan 0c01a44369 devel-docs, libgimpbase: getting rid of gimp_checks_get_shades().
In the original gimp-2-10 branch where this feature was originally
worked on, we had to keep gimp_checks_get_shades(). But on `master`
where we will reset and break API, let's get rid of this function which
should not be used anymore.
2022-05-14 17:43:39 +02:00
Jehan 8d61c4211f plug-ins: replace gimp_checks_get_shades() by gimp_checks_get_colors().
The animation playback now follows user preferences for checkboard
rendering.
Also fixing a small bug there, as the GIMP_CHECK_SIZE_SMALL_CHECKS was
the wrong type (it needed a check type, not a check size parameter).
2022-05-14 17:43:39 +02:00
Yuri Chornoivan de246c5fba Update Ukrainian translation 2022-05-14 15:20:31 +00:00
Yuri Chornoivan 64bfebc7a0 Update Ukrainian translation 2022-05-14 15:18:08 +00:00
Jehan b112e708f5 libgimpbase: bump the protocol version.
Since we changed it, the version must be incremented too. It means that
third-party developers will have to rebuild their plug-ins.

Fixed Conflicts from !274:
	libgimpbase/gimpprotocol.h
2022-05-14 16:31:58 +02:00
Jehan 916c5f9d11 app, libgimpbase: improve preferences and checkboard defaults.
- Slightly nicer layout for the checkboard color widgets.
- Also set the 2 color widgets insensitive when the check type is not
  GIMP_CHECK_TYPE_CUSTOM_CHECKS.
- Default the custom colors to the same colors as the basic default
  grayscale. I mean, red and blue defaults are fun and all, but that's
  like radioactive colors burning the eyes! Ahahah!
- Unlike the gimp-2-10 commit (cf. !274), on the main dev branch, use
  the new GimpLabelColor widget.

Fixed Conflicts from !274:
	app/dialogs/preferences-dialog.c
2022-05-14 16:31:58 +02:00
Jehan 1787492710 plug-ins: tile-small should respect the user-set transparency rendering.
Right now, the various Gimp*Preview classes have code initializing their
transparency colors correctly. Some plug-ins, such as tile-small are
directly using a GimpPreviewArea and need to be initialized directly by
the plug-in.

I also realized that several plug-ins (such as gradient-flare) are
rendering their own alpha checkboard, despite using a GimpPreviewArea
(maybe was it code from a time before this class had support for alpha
checkboard rendering?). So this would have to be improved later.
2022-05-14 16:31:58 +02:00
Jehan 87f7a92786 app, libgimp, libgimpbase, libgimpwidgets: better checkboard colors API.
- Some coding style fixes (alignment, etc.).
- Adding missing "Since: 3.0" annotations. We are still wondering
  whether this should go in 2.10, in which case, it would become
  "Since: 2.10.32" annotations. See discussion in !274.
- Changing gimp_checks_get_colors() signature: merge the 4 color
  arguments into 2 (inout) arguments which seems a bit nicer in C,
  whereas binding handles such arguments correctly. The other
  alternative would have been to at least change the order to have out
  arguments in the end.

  I also hesitated to get another API in libgimp, which would have been
  config-aware (just returning the 2 check colors, depending on user-set
  Preferences), then having GimpPreviewArea handling 2 colors (without a
  GimpCheckType input). But actually, doing this, we'd remove the nice
  menu popup where one could choose a generic check type (not everyone
  wants to play with specific non-gray colors) in Gimp*Preview widgets.
  So in the end, I left this whole thing as-is.
  Instead I document the function with code sample to initialize
  properly the GimpPreviewArea (since libgimpwidgets/ are independent
  with no knowledge of the core config) in order to respect user
  preferences.
- Hide the color properties in gimp_preview_area_menu_new() because
  anyway gimp_preview_area_menu_new() does not support GimpRGB
  properties right now (so all we get are warnings). It's still possible
  to select custom colors on GimpPreviewArea, simply we are stuck at the
  ones set in Preferences globally for now (unless a plug-in creates
  custom GUI to set these).

Fixed Conflicts from !274:
	libgimp/gimp.h
	libgimpwidgets/gimppreviewarea.c
2022-05-14 16:31:50 +02:00
Jehan a241538da7 libgimp: fix def files.
Fixing the CI for MR !274.
2022-05-14 16:27:26 +02:00
Ben Rogalski d90b84ba9d Custom transparency checkerboard colors
Reviewer (Jehan) note: cherry picked from MR !274. Still deciding
whether this will be pushed to gimp-2-10 branch too.

Fixed Conflicts from !274:
	app/dialogs/preferences-dialog.c
	app/display/gimpdisplayshell-draw.c
	app/plug-in/gimppluginmanager-call.c
	libgimp/gimp.c
	libgimp/gimp.h
	libgimpwidgets/gimppreviewarea.c
	libgimpwidgets/gimppreviewarea.h
	libgimpwidgets/gimpscrolledpreview.c
2022-05-14 16:27:15 +02:00
Niels De Graef e5caf21bcb pickbutton: Add version check for XDG portal
`PickColor()` API only got added in version 2, so check for that before
trying to use it.
2022-05-13 11:28:28 +02:00
Hugo Carvalho ff4e9c649a Update Portuguese translation 2022-05-12 22:06:15 +00:00
Yuri Chornoivan 8cdaf1b686 Update Ukrainian translation 2022-05-12 11:42:06 +00:00
Jacob Boerema 7a2dd01a3a plug-ins: fix wrong return types forgotten in previous commit 2022-05-11 18:37:55 -04:00
Jacob Boerema dd7c067715 plug-ins: further improvements in error handling in FLI/FLC loading
- Changed all static read functions to have a GError parameter, use a
  parameter for the value read, and return a gboolean that will be FALSE
  when reading from file failed.
- Check the return values of all read functions and set GError when
  needed.
- Added more error checking, like comparing real filesize with what the
  header tells us, check for valid speed and number of frames.
- Added some gdebug statements for easier debugging.
- Don't assume that all FLI/FLC writers followed the specs and wrote an
  even number of bytes per chunk.
- Skip "frames" that do not have the FRAME type (in most cases this is
  a PREFIX chunk).
2022-05-11 16:28:58 -04:00
Jacob Boerema 317e0ca21e plug-ins: update public FLI functions to add a GError and return gboolean
Improvements to the FLI loading and exporting plug-in:
- I added a GError parameter to all public read/write functions.
- All public functions now return a gboolean result to show if they
succeeded or failed. Before most functions were void. For the non void
returns (the two fli_write_color functions) I added a gboolean
parameter.
- Do cleanup if we fail to read a frame. If at least one frame was read
successfully, we will keep the incomplete image/animation.
- Change name of layer to include the delay in ms.
2022-05-11 16:28:58 -04:00
Martin 56cac1cda4 Update Slovenian translation 2022-05-11 10:03:31 +00:00
Martin c25adf501e Update Slovenian translation 2022-05-11 10:00:05 +00:00
Hugo Carvalho 4823074ec7 Update Portuguese translation 2022-05-10 21:10:20 +00:00
Rodrigo Lledó 3156c7b5c6 Update Spanish translation 2022-05-10 13:02:00 +00:00
Yuri Chornoivan 1448560fbb Update Ukrainian translation 2022-05-09 20:07:15 +00:00
Jehan 45a99ae270 plug-ins: make the BigTIFF warning translatable. 2022-05-09 19:56:46 +02:00
lloyd konneker 5e9c92c5de plug-ins: fix script-fu-font-map error receiving GStrv
Why: MR !389 changed the signature of PDB procedures to return GStrv instead of (int, GimpStringArray)
This changes handling of results from a call to such a changed signature, in a Scheme script.

The symptom was a cryptic TinyScheme "Error: car: argument 1 must be : pair"

Most changed procedures are named like "-list".
I did a cursory grep to look for other instances.

Updated porting guide doc.
2022-05-07 19:14:42 +00:00
Jacob Boerema b072a42bb7 plug-ins: silence warnings about missing mnemonics in file-fli-save
Also remove the unneeded setting of labeled text.
2022-05-07 14:19:30 -04:00
Jacob Boerema d143a2d55f plug-ins: fix #5315 Opening FLI with one frame fails
Fix as suggested by Lloyd Konneker.
Even though a one frame animation isn't really an animation, there is no
reason why we can't or shouldn't load it.
2022-05-07 14:19:30 -04:00
Jacob Boerema 5ecf46ccef plug-ins: cleanup of fli plug-in, use glib types and change ulong to guint32
The unsigned long type in this plug-in is always used for reading/writing
32-bit unsigned integers, so let's change it to guin32 to not get
confused.
Changed unsigned short to gushort, unsigned char to guchar.
2022-05-07 14:19:30 -04:00
lloyd konneker 1846f91305 Fix #6026, SF scripts use v3 API for multilayer gimp-edit-copy, -cut, -paste.
Why: in v3 the signature for gimp-edit-foo PDB procedures changed to support multilayer selection.

This finishes the task for ScriptFu scripts in the GIMP repo.
This is not a complete list, since some calls were changed incidentally by prior commits.
You can grep for "edit-copy" etc. in script-fu/scripts to find instances.

This also makes incidental changes, to script calls to plug-in-tile,
which now also has a changed signature to support multilayer.

The changes are simple code transformations.
The changes to gimp-edit-paste calls are more complex,
a mixed bag of a few lines transformed to more lines.
I did not try to understand the larger logic of the changed plugins.
I did not test the changed plugins functionally.
I used a harness to call each changed plugin with improvised parameters,
only checking that the test plugin did not throw runtime errors,
not checking that they produced correct images.

As noted in the issue, this might be undone if the original signatures
for gimp-edit-foo are restored as convenience functions.
2022-05-06 20:44:33 +00:00
Hugo Carvalho 45c2a0b6af Update Portuguese translation 2022-05-06 09:49:25 +00:00
Alan Mortensen 82f45b07d5 Update Danish translation 2022-05-05 17:29:11 +00:00