Commit graph

46506 commits

Author SHA1 Message Date
Érico Rolim
dfbf1d5d7b app/widgets/gimpactiongroup: protect against calling gettext with NULL msgid
Use the same conditional that was being used for
g_dpgettext2(entries[i].tooltip) with gettext(entries[i].tooltip).
2020-12-20 22:06:35 -03:00
Érico Rolim
aa151a08a0 app/dialogs: protect against calling gettext(NULL).
In gimp_dialog_factory_register_entry(), strings were passed to gettext
without checking for a NULL pointer. The gettext documentation [1]
points out that that's undefined behavior, and musl libc's
implementation of gettext segfaults in that case.

[1] https://www.gnu.org/software/gettext/manual/gettext.html#Interface-to-gettext
2020-12-20 22:06:35 -03:00
bartoszek
daea111efc autotools: bump GEGL dependency to 0.4.28. 2020-12-20 17:01:00 +00:00
Øyvind Kolås
2d5aa81456 depend on GEGL-0.4.28 2020-12-20 13:37:08 +01:00
Piotr Drąg
8040813a4f Update Polish translation 2020-12-20 12:42:38 +01:00
Yuri Chornoivan
277a086c68 Update Ukrainian translation 2020-12-20 07:43:44 +00:00
Jehan
15c1e04c27 INSTALL: update a bit the installation instructions. 2020-12-20 04:00:06 +01:00
Jehan
2ffedd1db6 desktop: AppData updated for upcoming 2.99.4 release. 2020-12-20 02:22:52 +01:00
Jehan
d9b25b8b50 app: do not ask about conversion for an image using a preferred profile.
If setting a RGB or Grayscale "preferred" profile, it usually means
these are profiles we are commonly working with, and it is to be
expected that images one might load may already have said profile. In
this case, don't ask what to do with this profile (keep, convert…). The
graphist kind of already answered this by explicitly listing this
profile as a "preferred" one.

Note that I also check for the built-in profile equality, though it
doesn't look like it is useful (gimp_image_get_color_profile() will
return NULL for an imported image which uses the built-in profile).
This is mostly to be thorough.
2020-12-20 02:04:51 +01:00
Jehan
12348f5241 app: fix some RGB/sRGB mixup in 2 labels. 2020-12-19 21:43:09 +01:00
Jacob Boerema
0d7c26f129 plug-ins: add missing define G_LOG_DOMAIN in file-psd for the meson build. 2020-12-18 14:00:48 -05:00
Yuri Chornoivan
43c3369b36 Update Ukrainian translation 2020-12-18 18:59:18 +00:00
Jacob Boerema
c05abcefc6 plug-ins: fix #4176 color displayed wrong in multi page tiffs with linear TRC.
If we were loading multi page tif images as layers then only the tif pages
that had a color profile attached would get set as linear (and each tiff page
can have a color profile). Since most of the time only the first page has a
color profile this caused us to load linear tiff pages incorrectly.

Also we were overwriting the color profile if there was more than one since
GIMP can only load one per image. Instead of using the last one we see
use the first one and notify if we encounter more than one.
2020-12-18 10:56:45 -05:00
Jehan
9893f60d8c plug-ins: changed GTK_RESPONSE_YES|NO into GTK_RESPONSE_OK|CANCEL.
Without the proper button response associated, we don't have the right
button order, as standardized by various desktops.
2020-12-18 01:24:52 +01:00
bootchk
59f2ba44c7 libgimp, devel-docs: enhance GIMP-PLUGIN-DEBUG backtrace 2020-12-18 01:17:54 +01:00
Jehan
c10ffd4f38 libgimp: fix the def file. 2020-12-17 23:46:36 +01:00
Anders Jonsson
f68d91e87f Update Swedish translation 2020-12-17 21:41:08 +00:00
Jehan
2b75b63ab7 app: keep error dialog above.
In some cases, error dialogs may end up below other windows and stay
unnoticed because of how dialogs are raised and hidden on various
platforms. This is not very constructive. It's much better to make sure
one sees an error when it happens (in some cases, it may mean possible
data loss, so it should be at least acknowledged; also seeing it later
may mean you can't know anymore which action triggered this error,
making the whole process kind of meaningless and hard to debug).

So anyway, let's make error messages prominent by having them always
above.
2020-12-17 22:27:01 +01:00
Yuri Chornoivan
fdd949ae69 Update Ukrainian translation 2020-12-17 19:56:09 +00:00
Jehan
c1c2b8e304 libgimp, plug-ins: add an "(edit)" link next to "Metadata" frame in…
… GimpSaveProcedureDialog.

See issue #6092 and the discussion with Jacob. Basically we are trying
to improve the metadata situation with more edit abilities and
awareness, while in the same time having the export dialogs less of a
mess (the "Comment" input in particular will most likely move to the
metadata editor itself; I left it for now, until the move is done).

The "(edit)" link will basically just run "plug-in-metadata-editor".

Also as a side note: I realized that gimp_pdb_run_procedure() runs
procedures synchronously and wait for a result, which is fine for quick
non-interactive plug-ins, but freezes the calling process otherwise.
Actually even when we want synchronous result, we should allow for GUI
events to be processed (otherwise the OS just thinks the calling export
plug-in is a zombie and proposes to kill it). This API should probably
be improved (and an alternative async version added as well).
2020-12-17 19:11:51 +01:00
Jehan
c0972eebb5 app: hide the export file dialog when showing the plug-in dialog.
We are piling up the export dialog, then the specific plug-in dialog,
then possibly more dialog (cf. upcoming commits for metadata handling).
It's just too much and we end up in a mess of dialogs.
Of course, if the export fails or it is canceled, we are back to the
file dialog, which gets shown again, whereas if it succeeds, the file
dialog is destroyed (just as it already used to be).

Also anyway the file dialog is completely deactivated while the export
dialog is displayed, so it's just useless. Finally some export support
have features where looking at the canvas is useful, for instance JPEG
preview feature. With all these dialogs, it's nearly impossible to look
at the canvas (with a single display at least).
2020-12-17 18:28:14 +01:00
Yuri Chornoivan
56c116f132 Update Ukrainian translation 2020-12-17 06:35:25 +00:00
Jehan
ea2a9a8312 libgimp: replace GtkFlowbox use by GtkGrid in generated metadata frame.
It is a bit more flexible. Also this fixes the ugly focus issue we had
on the comment text input (which might disappear soon anyway, but since
this frame is meant to also display user-created widgets, better to not
have a container breaking text widgets).

I am not 100% happy for the generated layout, but this is meant to
evolve anyway.
2020-12-17 02:58:21 +01:00
Jehan
b13502088f libgimp, plug-ins: add a "format name" concept to GimpFileProcedure.
This format name is a public facing name for a file format, such as
"PNG", "JPEG", or "C-source". Since it is public facing, the function
recommends to localize it too.
This is an optional name, yet is made mandatory if you want to use
GimpSaveProcedureDialog because it will be used for the dialog title
(ensuring that all support format have a similar export dialog title).
Following this change, gimp_save_procedure_dialog_new() does not ask for
a title anymore (if anyone absolutely wants to set a custom title,
setting the "title" property on the dialog is always possible anyway,
but a generic and consistent title should be set as a default).

Also updating the 3 plug-ins which were already using the now-changed
API.
2020-12-17 02:13:43 +01:00
Alexandre Prokoudine
ab5ac463a2 Update NEWS: HEIF plug-in changes 2020-12-16 21:24:03 +00:00
Daniel Novomesky
76810d28dd Updated HEIF plug-in
Realtime parameter is set for AOM encoder
when Fast encoding speed is selected by user.
Ability to set pixel format (YUV444, RGB)
is enabled for >= libheif 1.10
to avoid issues in older versions.
2020-12-16 19:35:24 +00:00
Jehan
1f48fdabbc NEWS: update with GimpSpinScale usability updates. 2020-12-16 19:11:38 +01:00
Jehan
670bc35eb9 app: show the "relative edit" cursor on motion with Shift pushed.
If you hover over the GimpSpinScale while clicking Shift, we want to be
able to advertize the fact that it will produce a different action than
the simple click. It makes the widget behavioral rules actually
discoverable.
2020-12-16 18:43:14 +01:00
Jehan
7b0d553511 app: improve GimpSpinScale cursors.
Aryeom noted that current top arrow cursor comes from a time when the
interaction with this widget depended on a lower versus upper region and
doesn't gives anymore any idea of what the click would do.
So let's replace the top-arrow cursor with a "grab" cursor, which even
becomes a "grabbing" cursor when a grab is in progress.

Also let's now use gdk_cursor_new_from_name() with standard names from
the CSS specification, because it is the recommended way. According to
GDK docs, GDK cursor list is taken from the X cursor font and apparently
not all cursors are available on all platforms. So let's use the
standard CSS list, whose cursors are said to be available accross
platforms (at least very very likely, I guess).

Finally I renamed the target enum for the widget to be more semantic
than upper/lower which don't mean anything anymore in our new
interaction rules.
2020-12-16 18:05:13 +01:00
Jehan
976b518999 app: improve GimpSpinScale usability for keyboard editing of value.
Currently to edit the value with the keyboard (i.e. get a focus on the
text entry part of the widget), we can click on the scale which gives us
edit focus, but it implies to change the value (which may not be
wanted).

An interaction method exists to do just this, which is the secondary
button (middle click). Unfortunately, though powerful, it is totally
"hidden feature". People expects to be able to click on the numbers they
see and start typing.
This change allows just this. Now when clicking on the number part, it
selects the whole text input contents (same as with middle-click ever
since commit 3449652fe8), without changing the value. You just enter in
text input mode.
To properly advertize the behavior change, the cursor will also change
when hovering, showing a text cursor over the existing number text.

As many of my changes, this change was designed together with Aryeom and
triggered originally by her usability feedbacks and inputs.
2020-12-16 15:06:25 +01:00
Yuri Chornoivan
a30cbb22d9 Update Ukrainian translation 2020-12-15 19:25:35 +00:00
Anders Jonsson
e108584c55 Update Swedish translation 2020-12-15 18:52:21 +00:00
scootergrisen
df507c05ae Remove trailing spaces in 3 strings 2020-12-15 15:55:45 +00:00
Jehan
9a05f24a03 plug-ins: fix uninitialized warnings.
This fixes various similar warnings:

> file-xmc.c:2276:53: warning: ‘save_rgn.height’ may be used uninitialized in this function

Note that I have not looked in details, but it would seem that these are
actually initialized by get_cropped_region() which uses goto-s quite
extensively, so obviously it's hard to follow (for humans as well as for
the compiler). So let's just assume there is no code error and let's
just add default initialization to silence the compiler.
2020-12-15 03:24:02 +01:00
Jehan
6d7d73935f app: remove unused (deprecated) property read.
We were also reading "gtk-show-unicode-menu" which has also been
deprecated since GTK+3.10, and we were not even using the read value.
Just remove this piece of unused code.
2020-12-15 03:15:23 +01:00
Jehan
164907384c po-python: remove py-slice from POTFILES.in.
This should fix the CI build.
2020-12-15 03:10:41 +01:00
Jehan
f6f94836c1 app, menus: get rid of custom input method menu.
The input menu added with gtk_im_multicontext_append_menuitems() mostly
provides redundant (e.g. the system defaults) or useless options
(e.g. "None" or "Simple" which basically seems to mean the keyboard
mapping straight keys, and I don't see why anyone would want this if one
set a system-wide input system). Worse it can provide unstable options
(e.g. "Wayland" which crashes GIMP when I tried it on my X11 desktop! It
crashes on _gtk_immodule_wayland_init which is probably normal as we are
not on a Wayland client).

Anyway gtk_im_multicontext_append_menuitems() is deprecated since
GTK+3.10, as well as the "gtk-show-input-method-menu" property which we
read from GTK+ settings (and is FALSE anyway nowadays by default, so we
usually never show this submenu) to determine if we should show this
additional text tool submenu or not. Furthermore there is just no reason
not to leave the defaults system input method engine does its job (which
works well as far as I can see, at the very least on my GNU/Linux X11
desktop and on Wayland also, last I tested).
2020-12-15 03:04:15 +01:00
Jehan
0f7c6285ca plug-ins: move py-slice.py to gimp-data-extras.
Per polls on Twitter, Reddit, Patreon and Tipeee, most people were
willing to drop this plug-in as not being relevant anymore (247 for
dropping and 63 for keeping it, so nearly 80% out of 310 participants).

So let's move it to gimp-data-extras allowing it to still have a
possible life, and who knows, maybe to even evolve.

See also corresponding commit beffc6b to gimp-data-extras repository.
2020-12-15 01:46:46 +01:00
Jehan
7ed68556c7 Issue #5863: No namespace info available for XMP prefix.
Adding 2 temporary patches for our builds:

- gexiv2-mr20.patch: to be applied over GExiv2 0.12.1. This patch is
  already contributed upstream so it won't be necessary once GExiv2
  0.12.2 is released.
- 0001-Issue-5863-do-not-raise-WARNINGs-on-Exiv2-unsupporte.patch: to be
  applied over GIMP master branch itself. It depends on GExiv2 0.12.2 so
  I cannot push it to master until we bump GExiv2 minimum requirement
  (which can only happen when v0.12.2 is out then available in Debian
  testing, as per our dependency rules).

For the time being, while waiting for upstream releases, all we can do
is wait and apply these patches on our own dev builds (because this bug
is annoying and was reported to us quite a few times already).
2020-12-14 21:03:43 +01:00
Jehan
d90d622c92 INSTALL: adding infos about dot for "gegl:introspect" dependency.
Especially now that this is not a blocking build dependency on GEGL, we
want to have the information somewhere so that packagers (and other
people building GIMP themselves) know this is at least an optional
runtime dependency.
2020-12-14 20:16:33 +01:00
Jehan
2cae9b9acf app: make "gegl:introspect" an optional operation dependency.
Check at runtime for the operation availability and set the "Show Image
Graph" action active depending on this check.

This goes with discussions to make this operation optional with a
runtime check for the tool `dot`.
See: https://gitlab.gnome.org/GNOME/gegl/-/merge_requests/84
2020-12-14 20:01:45 +01:00
Yuri Chornoivan
7a8f89122d Update Ukrainian translation 2020-12-14 18:04:55 +00:00
Anders Jonsson
155daa337e Update Swedish translation 2020-12-14 17:02:48 +00:00
Jehan
c62cbd2585 NEWS: update. 2020-12-14 15:17:35 +01:00
Jehan
b659d3ba4f app: different undo labels for various "Alpha to Selection" operations.
gimp_channel_select_alpha() was creating the same undo label "Alpha to
Selection" whatever the actual operation (add, remove, replace,
intersect). Select the right label depending on the actual operation.
2020-12-14 14:01:58 +01:00
Jehan
d6d8e43cb5 Issue #6030: Mask related Shortcuts conflicting with Multiple Layers…
… Selection.
I first wanted to switch the modifiers to Alt+shift, Alt+Ctrl clicks and
even implemented the changes, but realized the existing "Alpha to
selection" on Alt thumbnail clicks already mapped these for
Add/Remove/Intersect Alpha to Selection (though I broke this with commit
14b4c08881 but re-allows properly with exact modifier recognition in
order not to catch other types of combinations).

In the end, I see no other solutions than actually removing the mask
add/remove modifiers (#if-ed 0 for now, we'll see) in favor of the most
ancient feature.
2020-12-14 12:44:53 +01:00
Bruno Lopes da Silva
6da6b95cd4 Update Brazilian Portuguese translation
(cherry picked from commit e357b0bd83)
2020-12-14 11:02:59 +00:00
Jehan
a3eba9fbad app: new default dynamics is "Pressure Size".
Another sensible default change proposed by Aryeom. Until now, all tools
which could make use of dynamics started with "Dynamics Off". This makes
it very hard for beginners to start using GIMP with a tablet directly
without actually knowing the technical settings of the software.
This is even more anticlimactic in GIMP 3 as tablet are supposed to work
from scratch (and they do), but without a proper dynamics, you can't see
it. And same as it used to in GIMP 2.x, at first launch, it looks like
your tablet is not recognized.

We hesitated between "Pressure Size" and "Pressure Opacity". Both are
sensible choices and would directly show your tablet works. Also they
rely entirely on tablet-specific input (pressure), unlike e.g. speed or
direction, which is much better for the purpose of showing the tablet
works and is properly supported.
2020-12-14 02:15:12 +01:00
Jehan
f4d39f8c72 app: mask alternative click modifiers must not clash with…
… multi-selection modifiers. Also they will work from now on on the
clicked mask only.

Shift and Ctrl clicks are reserved for multi-selection. We do not want
these to do other actions if you shift|ctrl-click on a mask (even more
as these alternative actions are hardly discoverable so it would make
for bug-like behavior to the person not knowing these alternative
actions).
So Alt-click is still used for showing/hiding the mask, but
enabling/disabling changes from Ctrl-click to Alt-Ctrl-click.

The second change is that these actions will not run the actions on
selected layers' mask, but on the clicked layer mask. This will at least
make these interaction different from the actions (e.g. with contextual
menu) and therefore it's not even redundant anymore. We will now have a
way to work on all selected layers vs a way to work on a clicked layer
(without changing the existing selection).
2020-12-14 01:50:05 +01:00
Jehan
14b4c08881 app: catch Alt-click exact combination on GimpItemTreeView preview.
When Alt-clicking on an item thumbnail (for instance a layer thumbnail),
we can trigger an "Alpha to Selection" action on the clicked item. Yet
the check was not accurate and would work on Alt+any modifier(s)+click.
Let's catch exactly Alt-click only in order to allow for more actions on
other combinations.
2020-12-14 00:37:24 +01:00