Commit Graph

49148 Commits

Author SHA1 Message Date
Daniel Novomeský ec3da29f67 flatpak: remove extra lcms2
lcms 2.13 is already present.
2022-11-10 16:50:20 +01:00
Alexandre Prokoudine 61279385fb Update Russian translation 2022-11-10 14:49:21 +03:00
Yuri Chornoivan 178f283a37 Update Ukrainian translation 2022-11-10 09:20:34 +00:00
Jehan 3453c8bd55 app, pdb: paste layers over the top selected drawable.
When several drawables were selected, it was pasting at the top of the layer
stack. Instead, paste over the top selected layer ("top" visually in the Layers
dockable).

There was the question of: what should we do when pasting over a layer group.
Should we consistently paste the new layers above the group or inside the group?
After discussions with Aryeom, we decided to stay consistent and paste above, at
least for now.
2022-11-09 17:22:35 +01:00
Jehan 6083fd81a1 app, desktop: prepare AppData <release/> item for upcoming GIMP 2.99.14. 2022-11-09 15:31:39 +01:00
Jehan b674fd33f0 app: fix a critical for release demos with a dockable and no specific widget.
Fixes:

> GLib-CRITICAL **: 13:39:39.804: g_strchug: assertion 'string != NULL' failed
2022-11-09 15:22:05 +01:00
Jehan 51fe025afb app: update sensitivity rules of distribute buttons.
Distribute features do not care about the reference object anymore. All we care
about is whether we have more than 2 objects.
2022-11-09 13:20:31 +01:00
Jehan c3e1197ec9 app: fix a CRITICAL.
We should look at the display stored on the GimpDrawTool.
2022-11-09 13:04:51 +01:00
Zurab Kargareteli d5f21716f7 Update Georgian translation 2022-11-09 05:13:33 +00:00
Jehan 6b787312c0 NEWS: update. 2022-11-09 02:42:23 +01:00
Jehan 28457ce337 app: display the floating mask over the layer mask.
It would make using floating masks a lot easier as it is visually understandable
that it applies to the layer mask.
2022-11-09 02:15:41 +01:00
Alx Sa 2c4f91f585 app: Paste as new layer by default
This changes the default selection pasting behavior to be a new layer,
rather than a floating selection. It also removes the
"Paste as New Layer" submenu options as they are now redundant.
2022-11-09 00:31:00 +00:00
Jehan f6dd7f9b3a app: get rid of return_if_no_drawable() macro and…
… gimp_image_get_active_drawable() function!

Also fixing some memory leaks from previous usages of the multi version
return_if_no_drawables().
2022-11-09 01:24:34 +01:00
Jehan 5d75c79c89 app: remove compat registration for gimp-image-get-active-drawable.
Now we must use gimp-image-get-selected-drawables which is not a compatible
signature, as it returns an array of drawables.
2022-11-09 00:59:59 +01:00
Jehan ddec8e2255 app: remove the last usage of gimp_image_get_active_layer().
The histogram is still not multi-drawable aware. In the future, it would be nice
to add ability to generate histogram for all selected layers (merged and as
separate images) as well as the whole visible image, therefore 3 possible cases.

But for now, it's alright like this (no more, but no less feature than before)
and at least we got rid of the last usage of functions assuming single item
selection.
2022-11-09 00:53:17 +01:00
Jehan bd87766170 app: various Alignement tool strings update.
- Option dockable is named "Align and Distribute" rather than "Alignment".
  First, because it's not just about alignment; also because this way, it looks
  like other software, such as Inkscape; lastly because it's more consistent
  with other tool options ("Move", "Rotate", etc.).
- Add a tooltip to the Anchor Point widget to explain what it's used for.
- Rewrite various align/distribute button tooltips to make clearer that we are
  aligning anchor points with specific edges (or distributing these anchor
  points).
- Rename the first section to simpler "Targets".
- Some more rewording of other texts.
2022-11-09 00:40:44 +01:00
Jehan 6a63091e68 app: remove the offset feature in the Align/Distribute tool.
It's clearly broken right now. I can see it might have been used even to
progressively shift aligned items, but this was not used anymore. As for being
used while distributing, it doesn't make any sense anymore with the new logic of
not moving the extreme (first/last in coordinates) items.

I can see how an additional concept of offset can be useful in some situations,
but for now, let's get rid of this. We'll see in the future if someone asks for
it and provides valid use cases to work from.
2022-11-09 00:08:16 +01:00
Jehan e48b002c84 app, icons, libgimpwidgets: add "distribute with evenly gaps" options.
There was one case in Inkscape which we could not do: distributing objects
keeping even gaps between them. Until now, we could only distribute keeping even
distance between anchor points (top, left, bottom, right or center).

With these 2 additional distribute options, I believe that GIMP is able to do
all the Alignment and Distribution options available in Inkscape (not the
"Rearrange" or node features, neither the text align/distrib; I just mean the
common align/distribute on objects), and even a bit more thanks to the anchor
point system (e.g. in Inkscape, we can't left or right-align to a reference
object/image center, or we can't center to a reference left/right/bottom/top
border; but we can do it in GIMP).

The icons are hopefully temporary, until we can make better ones.
2022-11-08 23:48:32 +01:00
Jacob Boerema 9ba5b8dbd6 app: fix issues in gimpmodifiersmanager.c found by coverity
- buttons_key doesn't get freed.
- modifiers could theoretically be used uninitialized.
2022-11-08 16:57:04 -05:00
Jacob Boerema 981979bb39 plug-ins: improve security in flame plug-in
- Use g_malloc* functions instead of malloc, so we don't continue on
failed allocations unless we test for NULL.
- Make sure we don't iterate past the known number of control points (ncps).
- Safely allocate, initialize and free points. Since points seems to be
used uninitialized, we use g_malloc0 to set everything to 0.
2022-11-08 16:57:04 -05:00
Martin 4fa8e7941d Update Slovenian translation 2022-11-08 21:42:45 +00:00
Zurab Kargareteli a18408f73f Update Georgian translation 2022-11-08 20:50:04 +00:00
Jehan 09543af82a app: distribute while keeping extreme objects unmoved.
After discussing with Aryeom, we decided that "Distribute" should work within
the current horizontal or vertical bounds, as this is how it is usually done in
other software (e.g. Inkscape). For instance, if there are 4 items, the first
and last (coordinate-wise) stay untouched, and only the 2 intermediate items get
distributed evenly.

Since the Reference is not relevant anymore for "Distribute", I undo part of my
previous commit, where I was organizing the reference setting into its own
section of the Alignment tool options. This setting is back as part of the
"Align" section.
2022-11-08 21:39:58 +01:00
Jehan 2b0928d895 app: big UI rework of the align/distribute tool.
- Adding a separate pivot widget to allow choosing which point of the items we
  align or distribute. E.g. until now, we could only align the right side of
  objects to the right side of the reference object, left to left and center to
  center. Now these are independent. Therefore I can align the left side of
  objects to the right border of a selection or a layer, and so on.
- Only keep 2 "distribute" buttons (for now). Most of the distribution actions
  were basically broken or extremely hard to understand. Also they were
  apparently mixing concepts of alignments with distributions. Now let's
  basically only keep the bases: horizontal or vertical distributions.
  Everything is still possible using a mix of alignment and distribution
  buttons, and it's much clearer.
- Since the GimpAlignmentType was used nearly only there (except for some usage
  like to store dock side or filter preview split direction, but these
  GIMP_ARRANGE_* values were unused there), I removed the various enum values
  which we don't use anymore.
- The Reference settings gets its own subsection in the Align tool options.
  Until now, it looked like it only applied to alignment, whereas it applies to
  distribution too.

Note: this is still work-in-progress, mostly some initial dev work to put some
algorithmic bases. We had some UI and specification discussions with Aryeom
already and some things might still change a lot.
2022-11-08 19:19:55 +01:00
Jehan 63dc7dee8a app: redraw handles when needed.
There were various cases when the reference's on-canvas handles were not
redrawn, or drawn at all:

- When the reference is an image, we now draw them. It may seem redundant as
  it's the image bounds, but it's still useful to see what are the reference
  bounds in a glimpse. Moreover in "Show All" mode, it's even more useful.
- Start the tool, hence draw the reference handles, in oper_update() if not
  started yet.
- When the "align-reference" property changes.
- When the display (active image) changes.
2022-11-08 13:05:56 +01:00
Jehan 4c09f194d1 app: more fine-grained align/distribute button sensitivity.
When the reference is a guide in particular, no distribution is possible (on one
dimension, the size is 0, on the other, it's infinite) and alignment is only
possible in one direction (depending on guide orientation).
2022-11-07 22:48:30 +01:00
Martin a8983f7823 Update Slovenian translation 2022-11-06 20:19:07 +00:00
Luming Zh 06a9240046 Update Chinese (China) translation 2022-11-06 19:22:53 +00:00
Boyuan Yang c0cd58f38f Update Chinese (China) translation 2022-11-06 19:20:16 +00:00
Daniel Novomeský e58efc314d flatpak: change recipe for libjxl 2022-11-04 11:17:58 +00:00
Rodrigo Lledó dab80500f9 Update Spanish translation 2022-11-03 12:43:35 +00:00
Daniel Novomeský 006b77674d flatpak: Upgrade libde265 2022-11-03 12:07:52 +00:00
Hugo Carvalho 7164f27308 Update Portuguese translation 2022-11-03 11:38:08 +00:00
Yuri Chornoivan e98f9cd797 Update Ukrainian translation 2022-11-02 18:33:52 +00:00
Zurab Kargareteli 7461eb8cd3 Update Georgian translation 2022-11-02 04:52:19 +00:00
Jehan 947130f2cb app: make a copy of selected items before gimp_container_view_select_items().
Otherwise the selected items might change and invalidate the pointer, eventually
leading to a segfault.
2022-11-01 22:57:21 +01:00
Jehan 04810ec95e app: name the "Floating Selection" differently depending it floats a layer or…
… a layer mask.

This is a first step to make a clearer difference between the 2 use cases.
2022-11-01 22:57:21 +01:00
Hugo Carvalho fae838b227 Update Portuguese translation 2022-11-01 21:44:11 +00:00
Yuri Chornoivan 3c8d873914 Update Ukrainian translation 2022-11-01 20:43:11 +00:00
Zurab Kargareteli 1fac53a91b Update Georgian translation 2022-11-01 19:47:25 +00:00
Jehan fa2fa71619 app: add a tooltip to "_Don't ask me again" checkbox.
I find these options always a bit unwise when people have no idea how to change
their mind. Therefore adding a tooltip with the information (though maybe we
should even do it even more clearly and adding that in checkbox text too?).
2022-11-01 17:36:45 +01:00
Jehan 092627fdb3 Issue #8697: do not make conversion to another profile the default behavior.
For this to happen, I've updated the main question to be "Keep the Embedded
Working Space?" instead of "Convert to * Working Space?". Basically now we put
emphasis on keeping the image's color profile as being the proposed action.
Therefore "Keep" is the default answer, on the right.
Yet "Convert" stays on the right too. There is no "Cancel" button anymore
because it is not a question we can really escape even though "Esc" still works,
and it still corresponds to "Keep", same as Enter now. The reason is that "Keep"
is actually the non-destructive option. So if someone really doesn't want to
answer and make an explicit choice, we do it for them with the only
non-destructive choice possible.

Also I'm changing "Convert" mnemonic to 'c'. I guess that earlier devs might
have used 'o' because it is the usual mnemonic for "OK", so it was right when
the question was "Convert?". But since now the question is the opposite, there
is no reason to make it look like "OK". Let's just use the first letter, which
is easier to guess (and not taken by any other button here).

I've been hesitating because I don't think "Convert" was the right default
anymore with our anyRGB move. Until now, it was kinda implying that sRGB (when
no preferred color profile was set) was kinda the recommended space. It's not.
If a file already has another space, it's probably much better to keep it.
First because "Convert" is often a destructive change (even more if the target
is sRGB), so for people who don't necessarily understand all the ins and outs,
we were kinda promoting a destructive default behavior.

On the other hand (and that's why I was hesitating):

* "Keep" is also what happens when we hit "Esc" so some might complain that
  there is no easy "Convert" key anymore (there is alt-c, but it's for sure not
  as easy as Esc or Enter). Basically it makes the "Convert" option always a
  much more explicit choice (yet it is likely for the best for people who care
  about their colors).
* There might have been many people who would just use the default (Convert
  until now) without thinking too much of what was asked, and that was working
  good because they would just publish on the web or similar basic usage. If
  they continue just accepting with Enter without reading and understanding what
  is asked, now they could publish images with a color profile (and we know it
  doesn't always work perfectly on the web).
  In other words, it might be the best default for professional usage now, yet
  it requires to understand a bit what you are doing.

It's really a hard call!
2022-11-01 17:24:22 +01:00
Rodrigo Lledó db97cb4500 Update Spanish translation 2022-11-01 11:56:49 +00:00
Rodrigo Lledó 1a572830a9 Update Spanish translation 2022-11-01 11:08:43 +00:00
Jacob Boerema 89c83ef4c7 plug-ins: fix crash when reading corrupt flame settings file
Thanks to a report by Stefan Cornelius, we became aware that the flame
plug-in does no checking for correct input when loading a pre-saved
settings file.

I reworked the parser to read one or more values based on the type of
token, making sure we also don't read past the end of our token buffer.

All int values have a min and max value set. If any unexpected input is
encountered, we will give a warning.
2022-10-31 14:22:44 -04:00
Jacob Boerema 536c7cbc4b plug-ins: fix missing input buffer length checking in flame
The flame plug-in can read stored settings from a file. The expected
input is that a ; signifies the end of input.

However, with user input we cannot depend on this to be true, so we need
to make sure that we do not read past the end of our input buffer.
To do so, we add a length check.
2022-10-31 14:00:54 -04:00
Jacob Boerema 193596397e plug-ins: fix failure to load flame saved settings from file
We were using the plug-in name with underscores, which is incorrect.
Since nobody ever complained about this, this doesn't seem to be used
very often.

We will use the const that defines the plug-in name instead.
2022-10-31 13:57:14 -04:00
Piotr Drąg 729c876654 Update Polish translation 2022-10-30 13:12:50 +01:00
Hugo Carvalho 6d0dc6a3a1 Update Portuguese translation 2022-10-29 15:59:27 +00:00
Jordi Mas 3274671af4 Update Catalan translation 2022-10-29 17:57:42 +02:00