Commit Graph

48933 Commits

Author SHA1 Message Date
Alx Sa 0f323d0279 plug-ins: Use CMYK profile stored in GimpImage
CMYK profile is now stored in GimpImage on load 
(rather than being discarded) and it's used for export rather than
the default simulation profile stored in Preferences
2022-07-19 19:26:45 +00:00
Jehan f152e825bf NEWS: update. 2022-07-19 21:11:35 +02:00
Jehan 240dc12912 Issue #8385: problem importing SVG containing huge data.
libxml has a XML_PARSE_HUGE parsing option, which can be turned on with
the RSVG_HANDLE_FLAG_UNLIMITED option in librsvg.
We cannot just set this option by default because it is a security
hazard as a maliciously malformed SVG could use this to consume too much
memory.

Instead, let's just propose the option interactively when we fail to
create a rsvg handle. Unfortunately right now we can't single out this
specific error because librsvg actually returns an unrelated (false
positive created by the huge data) error. So we just propose the option
for any kind of handle creation failure.

Furthermore, the option is only available on interactive plug-in calls
so far. In particular, the PDB API doesn't have an option allowing a
script writer to run "file-svg-load" with the huge data option.

As for the thumbnail API, it is never meant to be used interactively and
not really as a common script function, so it won't have the huge data
option either.
2022-07-19 18:29:28 +02:00
Hugo Carvalho fa38f75d5c Update Portuguese translation 2022-07-19 12:56:38 +00:00
Jehan 6a08fd6596 libgimpwidgets: fix segfaults on wrongly handled referencing.
gimp_color_config_get_simulation_color_profile() is returning a new
object, so we had 2 code paths giving either allocated data or not.

Therefore simply ref the passed softproof profile in the second code
path, and don't ref it anymore when caching it (especially as it might
also be NULL at that point).
2022-07-18 14:33:42 +02:00
Yuri Chornoivan d0dd97cbc2 Update Ukrainian translation 2022-07-17 18:42:16 +00:00
Alx Sa 984586f623 plug-ins: Store CMYK profile in image on TIFF load
Now that images can contain their simulation profile,
we can use gimp_image_set_simulation_profile() to retain
the CMYK profile when a TIFF image is loaded.
It will then be accessible in GIMP's Image menu.
2022-07-17 17:12:45 +00:00
Jehan 12c7501552 plug-ins: fix small memory leak from MR !627. 2022-07-17 19:08:37 +02:00
Nikc 714b74568b plugins: fix #356 Add export option for CMYK TIFFs
Adds support for saving 8 and 16 BIT CMYK/A TIFF files using the
image's simulation profile. If no profile or a non-CMYK profile
is set for the simulation profile, naive conversion is used instead.
2022-07-17 16:09:22 +00:00
Martin 620fefac84 Update Slovenian translation 2022-07-16 20:00:45 +00:00
Øyvind Kolås 6cc1e035f1 app, configure, meson: depend on GEGL-0.4.38 2022-07-13 23:31:24 +02:00
MohammadSaleh Kamyab d627f72b92 Update Persian translation 2022-07-12 20:46:08 +00:00
Rodrigo Lledó 1f92db3eea Update Spanish translation 2022-07-12 17:40:11 +00:00
Rodrigo Lledó 24d775cc00 Update Spanish translation 2022-07-12 17:36:42 +00:00
Hugo Carvalho 6aadd6f862 Update Portuguese translation 2022-07-11 15:28:28 +00:00
Yuri Chornoivan a2f5551e6d Update Ukrainian translation 2022-07-09 15:32:02 +00:00
Jehan e1c0c80007 po-plug-ins: adding plug-ins/common/file-wbmp.c to POTFILES.
Thanks to Piotr Drąg for reminding us!
2022-07-09 13:22:30 +02:00
Martin 70331d843d Update Slovenian translation 2022-07-08 17:47:41 +00:00
Martin 7d10a70134 Update Slovenian translation 2022-07-08 17:45:30 +00:00
Hugo Carvalho a872191393 Update Portuguese translation 2022-07-08 13:36:40 +00:00
Hugo Carvalho 74b208df86 Update Portuguese translation 2022-07-08 13:34:54 +00:00
Hugo Carvalho d25750f018 Update Portuguese translation 2022-07-08 13:32:41 +00:00
Niels De Graef 1308df4dc1 meson: Fix windows installer translations 2022-07-08 10:08:14 +02:00
Niels De Graef 526a28de3f plug-ins: Make sure we initalize GimpVector4
This fixes a warning about the variable being used uninitialized.
2022-07-08 09:50:25 +02:00
Alexander Shopov 958bd47427 Update Bulgarian translation 2022-07-07 21:03:35 +00:00
Jehan 5a78326589 app: allows for empty string as language.
Language detection was not working fine on Windows when the language was
an empty string rather than NULL.
2022-07-07 22:13:28 +02:00
Jehan 32501f502b plug-ins: fix generated common plug-in files and file-wbmp localization.
The Makefile.am was apparently updated by hand in !662.

Also fixing plug-in label and doc localization, since this changed
recently and must now be localized directly on plug-in side.
2022-07-07 21:27:39 +02:00
ktoyle d1fac7bfa9 plug-ins: Create wbmp plug-in
Added plug-in that would let the Gimp program to read WBPM image files.

See #2508 and !662.
2022-07-07 19:23:35 +00:00
Jehan 25e35e17fe app: detect system language with a more robust logic.
langinfo.h is not on all systems apparently and/or the locale item we
test for may not be available everywhere. Actually even on Linux, after
testing more deeply, I could create cases where nl_langinfo() would not
return a result (if the locale is broken through environment variable
for instance). setlocale() seems to always return usable value so far,
so I fallback on it. As a last resort, I look at environment variables
(even though these may contain invalid contents.

As for Windows and macOS, I try to use more platform-specific methods.
In macOS in particular, as I understood from reports, GIMP follows
correctly the language preference order, which means we should not look
at a single (top) lang, but at the whole list of prefered languages as a
single settings to determine whether the language was changed or not.

Should fix on Windows:

> fatal error: langinfo.h: No such file or directory

and on macOS:

> error: use of undeclared identifier '_NL_IDENTIFICATION_LANGUAGE'
2022-07-07 18:58:50 +02:00
Yuri Chornoivan ccf6ecf43f Update Ukrainian translation 2022-07-07 16:44:41 +00:00
Yuri Chornoivan 4383f6aa13 Update Ukrainian translation 2022-07-07 16:43:41 +00:00
Anders Jonsson e601a6c7de Change GTK+ to GTK
GTK got rid of the + in 2019:
https://lwn.net/Articles/779305/
2022-07-07 14:02:36 +00:00
Jehan 07cd09e290 gitignore: hide various files copied by the autogen.sh step.
These files seem to have appear ever since the recent gettext changes in
commit f663d26ab5.
In particular, the call to autoreconf seems to be creating these.
2022-07-07 15:39:54 +02:00
Hugo Carvalho 15b31d1b72 Update Portuguese translation 2022-07-07 11:35:43 +00:00
Hugo Carvalho c1f0055794 Update Portuguese translation 2022-07-07 11:24:15 +00:00
Hugo Carvalho 4c0951a687 Update Portuguese translation 2022-07-07 11:21:21 +00:00
Hugo Carvalho 997edb278c Update Portuguese translation 2022-07-07 11:15:44 +00:00
Maíra Canal bc170d278b Update Brazilian Portuguese translation 2022-07-07 01:31:07 +00:00
Rodrigo Lledó 8f1f698b91 Update Spanish translation 2022-07-06 22:57:04 +00:00
Jehan 0cff1ebe91 Revert "app: force re-querying all plug-ins after a language change."
This reverts commit 82f9ae1ab7.

This is not needed anymore. Cf. previous commit which implements the
force-requery differently and much more widely based on actual language
being stored and compared between runs.
2022-07-06 19:41:00 +02:00
Jehan a7a027706b app: reload plug-ins when language changes between runs.
Since localization is fully handled plug-in side now (see #8124), we
need to make sure the query functions are run again for all plug-ins
when the UI language changes (otherwise we might end up with
localizations from the previously used languages).

We were already reloading plug-ins when explicitly changing the lang in
the Preferences, but this new implementation is much better as it's
generic. In particular, it will also handle the case when the system
language changes (or when you play with locale environment variables).
2022-07-06 19:33:00 +02:00
Jehan ca1a0e3650 plug-ins: gimp-plug-in-domain-register PDB procedure doesn't exist…
… any longer.

It's not deprecated in favor of a new name, it just doesn't exist as it
was removed in commit 81b569cb8c.
2022-07-06 16:14:03 +02:00
Jehan 9ace442ca3 NEWS: update. 2022-07-06 16:08:34 +02:00
Lukas Oberhuber 83397cbb15 quit-dialog: stops crashing on quit dialog
@jralls found uninitialized variables in the quit dialog that can cause
crashes.
2022-07-06 12:54:04 +00:00
lloyd konneker c2b13d6f91 ScriptFu: register args with proper GParamSpecs
Resolves #8328

Except existing GimpParamSpecs seem inadequate to specify less generic widget kinds.
2022-07-05 19:17:52 +00:00
Yuri Chornoivan 1ee477d45b Update Ukrainian translation 2022-07-05 14:47:43 +00:00
Lukas Oberhuber 042eddfb0a canvas: remove limits on ruler & statusbar updates
This removes rate limiting of ruler and statusbar updates which were
required to get acceptable performance on mac for drawing on the canvas.

This requires the latest changes on in Gtk 3.24 to be incorporated.
2022-07-05 13:02:30 +00:00
Jehan 27b09104d9 libgimp: procedure's arguments labels are now localized plug-in side.
Continuing the changes in #8124, let's have properties labels and blurbs
both localized on plug-in code, i.e. with gettext calls directly in
GIMP_PROC_ARG_*() calls.
Note that it was already the case for blurbs (longer description,
tooltip) as I couldn't find code where we'd localize it further down the
line. But we were running gettext on nicks (shorter description, label)
inside GimpProcedureDialog code. Let's not do this anymore.

This will make the whole localization much more clear and obvious. There
is no "later localized" case anymore. Now let's localize everything
directly when the arguments are created.
2022-07-05 14:02:10 +02:00
Jehan df074bfe09 plug-ins: label and documentation of plug-ins localized plug-in side.
This is the consequence of previous commit. Plug-ins' label and
documentation are now localized before sending these data to GIMP core.
In other words, we replace N_() macros with basic gettext calls.
2022-07-05 12:23:51 +02:00
Jehan 81b569cb8c Issue #8124: plug-in localization now totally moved plug-in side.
Plug-in localization was always partially plug-in side, especially for
things like custom GUI. But labels or blurb in GIMP (such as in menus or
action search) were localizing GIMP side.

It had many drawbacks:

- To get menu localization, a plug-in had to set up gettext, even though
  they might want to use something else for their GUI (after all, giving
  facilities for gettext is a good idea, but there is no reason to force
  using this system).
- There was a complex internal system passing the localization domain
  name, as well as the catalog file system path to core, then through
  various classes which we can now get rid of.
- There could be domain name clashes, if 2 plug-ins were to use the same
  i18n domain name. This was handled in now removed functions
  gimp_plug_in_manager_get_locale_domains() by simply keeping a unique
  one (and gimp_plug_in_manager_bind_text_domains() would just bind the
  domain to the kept directory). In other words, one of the duplicate
  plug-ins would use the wrong catalog. We could try to make the whole
  thing more complicated or try to forbid plug-ins to use any random
  name (in particular made easier with the new extension wrapper). But
  anyway this whole issue doesn't happen anymore if localization is
  fully made plug-in side, so why bother?

I tried to evaluate the advantages of the core-side localization of
plug-in labels/blurbs and could only find one theoretical: if we wanted
to keep access to the original English text. This could be useful
(theoretically) if we wanted to search (e.g. in the action search) in
both localized and English text; or if we wanted to be able to swap
easily en/l10n text in a UI without reload. But even if we were to ever
do this, it would only be possible for plug-ins (GEGL operations in
particular are localized GEGL-side), so it lacks consistency. And it's
unsure why special-casing English should really make sense for other
language natives who want text in their lang, and search in their lang.
They don't necessarily care about original.

So in the end, I decided to simplify the whole thing, make localization
of plug-ins a plug-in side thing. Core will only receive translated text
and that's it. It cuts a lot of code out of the core, simplify runtime
processing and make plug-in creation simpler to understand.

The only think I still want to look at is how exactly menu paths are
translated right now. Note that it still works, but it's possible that
some things may be worth improving/simplifying on this side too.
2022-07-05 12:22:32 +02:00