Commit Graph

46493 Commits

Author SHA1 Message Date
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
Jehan f5d9856125 app: be more accurate to ascertain in we are multi-selecting.
In particular, we should not check if the extend/modify (shift/ctrl)
modifiers are ON, but also that no other modifier is ON. For instance an
Alt-Shift-click should not trigger multi-selection actions, allowing it
to be useful for other actions without also changing the selection in
the same time.
2020-12-14 00:30:05 +01:00
Jehan 305dcdcccc app: do not popup a viewable preview when modifiers are active.
Long press on a viewable cell (such as the small layer or mask preview)
pops up a slightly bigger preview. We don't want this feature to be
triggered when any modifier is active, such as ctrl/shift (common with
multi selection in a tree view) or alt combinations (for various
alternative actions).
2020-12-13 20:39:47 +01:00
Jehan dfc4ecfc4c po-plug-ins, po: (workaround bis) fixing the distcheck job in CI.
My fix in commit 9e4aa586f7 was not enough because CLEANFILES apparently
would only be processed on Makefile.am (i.e. with automake). Just remove
the file explicitly in the distclean rule.
2020-12-12 23:58:06 +01:00
Jehan 9e4aa586f7 po, po-plug-ins: (workaround) fixing the distcheck job in CI.
Now the distcheck job fails with the following error:

> ERROR: files left in build directory after distclean:
> ./po/.intltool-merge-cache.lock
> ./po-plug-ins/.intltool-merge-cache.lock
> make[1]: *** [Makefile:1155: distcleancheck] Error 1

There is definitely some change which happened on Debian packages,
either on intltool-merge itself, or something around, because these are
behavior breakage. We never set such `.intltool-merge-cache.lock` lock
files ourselves, so obviously we should not be the ones to clean these.
This is only a workaround which should be removed once upstream fixed
the issue.
2020-12-12 16:23:54 +01:00
Sveinn í Felli 08c387805f Update Icelandic translation 2020-12-12 15:12:22 +00:00
Yacine Bouklif 6c5c453c6b Update Kabyle translation 2020-12-12 14:21:09 +00:00
Jehan d4e501919e app: revert to "gimp-paintbrush-tool" as default tool.
A UI unit test (paintbrush_is_standard_tool()) was expecting the
paintbrush tool to be the default tool. This actually does not fit with
my tests as the crop tool was always the default tool if I were to
delete my config folder and start anew. Yet it was working for the unit
testing at the very least since `make check` used to work until now, and
was broken by my change.

Anyway with my new code (commit 31e38fe869) and this additional one, now
it should work both for unit tests and real usage. So this commit fixes
both the CI and the originally expected default tool.

For the record, Aryeom also agrees that paintbrush is a good default
tool for first usage/discovery of GIMP.
2020-12-12 13:06:37 +01:00
Jehan 845f1c81ed data: create po-tags/ build directory.
We have a sudden CI failure which is maybe because of a change of
intltool-merge. We believe it might be because of a missing directory.
Let's test making it before running the command.

Fixes:

> /usr/bin/intltool-merge ../../../po-tags
>   ../../../data/tags/gimp-tags-default.xml.in gimp-tags-default.xml -x -u
>   -c ../../po-tags/.intltool-merge-cache
> No such file or directory at /usr/bin/intltool-merge line 396.
2020-12-11 22:54:33 +01:00
Yuri Chornoivan 12564ca646 Update Ukrainian translation 2020-12-11 19:59:18 +00:00
François Guerraz 3b3404b03d plug-ins: Set the number of threads used to decode JPEG200 files...
... according to user preferences.
2020-12-11 18:55:44 +01:00
Jehan c94325c670 plug-ins: s/g_get_num_processors/gimp_get_num_processors/ in file-heif. 2020-12-11 18:29:12 +01:00
Jehan 698b7184b2 libgimp: add gimp_get_num_processors(). 2020-12-11 18:24:36 +01:00
Jacob Boerema 991e99f08a plug-ins: fix loading 2 and 4 bit tiff images.
This fixes issue #6065 and part of #2680.

Sometime after GIMP 2.8 loading of 2 and 4 bit tif images,
both grayscale and indexed, got broken.

I added routines for handling 2 and 4 bit tifs based on
the handling of 1 bit images.
2020-12-10 18:48:23 -05:00