Commit Graph

45694 Commits

Author SHA1 Message Date
Ell 10f9ee63c6 app: don't leak UI manager in GimpToolPath 2020-05-26 11:10:27 +03:00
Ell 18d747611c app: forward tool get_popup() to widget get_popup() in GimpDrawTool
Override GimpTool::get_popup() in GimpDrawTool, forwarding the
request to the tool widget, if one exists.

Remove the same code in GimpVectorTool -- this now works for all
tools/widgets.
2020-05-26 11:07:25 +03:00
Ell 4b1c8f9ec7 app: fix precondition return values in gimp_tool_widget_get_popup() 2020-05-26 11:05:58 +03:00
Ell afda774f44 app: update tool widgets on display-shell changes more granularly
Partially revert commit c73710e410,
avoiding updating tool widgets unconditionally on tool resume in
GimpDrawTool -- it's too expensive in general.

Instead, handle display-shell changes in GimpToolWidget, by adding
GimpToolWidget::update_on_{scale,scroll,rotate} flags, which
subclasses can use to request an update on any of these events.

Set the flags as necessary for the affected widgets.
2020-05-26 10:46:01 +03:00
Ell ec69083354 app: fix compiler warnings in GimpToolWidget 2020-05-26 10:44:46 +03:00
Simon Budig 8839cb58bb pdb: update autogenerated files. 2020-05-25 22:55:01 +02:00
Simon Budig 22784727f4 pdb: implement gimp-vectors-stroke-reverse 2020-05-25 22:54:47 +02:00
Simon Budig c10778fa03 app: implement a few more functions for the ToolPath context menu. 2020-05-25 22:13:45 +02:00
Simon Budig f6f180c5cb app: Add basic infratructure for a vector tool popup menu. 2020-05-25 22:13:45 +02:00
Simon Budig 44a7e92967 app/vectors: implement stroke_reverse and stroke_shift_start 2020-05-25 12:33:10 +02:00
Christian Kirbach 185dd8ba2e Update German translation 2020-05-23 22:10:52 +00:00
Yuri Chornoivan d73a6a5cec Update Ukrainian translation 2020-05-23 06:42:04 +00:00
Jordi Mas 3222381199 Update Catalan translation 2020-05-23 08:06:34 +02:00
Jordi Mas 1bb229a6d0 Update Catalan translation 2020-05-23 07:28:34 +02:00
Ell 258c8454d5 app: implement GimpColorManaged for GimpImageProxy
In GimpImageProxy, implement GimpColorManaged by forwarding the
functions to the underlying GimpImage, and forwarding the signals
in the other direction.  This fixes color-managed view in the
Navigation dockable.
2020-05-22 16:35:56 +03:00
Ell d9f5558977 app: update core-enums.c 2020-05-22 16:35:56 +03:00
Niels De Graef febc5cc6e6 Revert "Don't forget to include <glib-object.h>"
This reverts commit 9fce4757ce.
2020-05-21 22:39:10 +02:00
Yuri Chornoivan 4bc328af8e Update Ukrainian translation 2020-05-21 14:53:34 +00:00
Niels De Graef 25e535b5e0 Fix missing includes
We're exposing symbols in our header files like `GType`, `GFile` and
others, without actually including the proper headers. This also gives
errors in the GIR scanner (who can't resolve those symbols).
2020-05-21 16:02:55 +02:00
Jehan ae4abbabfd app: layers-merge-group multi-layer aware.
Also layers-flatten-image does not care about the layer selection and
layers-anchor works anyway only when there is a floating selection,
which means only one layer selected.
2020-05-21 15:08:28 +02:00
Niels De Graef 9fce4757ce Don't forget to include <glib-object.h>
... when exposing symbols like `GType` in the header.
2020-05-21 15:02:00 +02:00
Niels De Graef 842dc7535f gir: (skip) functions with varargs
Bindings can't handle these, so they are not introspectable.
2020-05-21 13:49:38 +02:00
Jehan 95fa7bc68c Issue #5109: "gimp-win64" CI artifact is missing gegl:npd support.
Cairo is a dependency for "gegl:npd" required by GIMP, so let's install
it before compiling GEGL.
2020-05-21 11:36:28 +02:00
Yuri Chornoivan 62798efd34 Update Ukrainian translation 2020-05-21 07:39:46 +00:00
Jehan 5c221df99f app: layers-blend-space-* & layers-composite-space|mode-* multi-layer…
… aware.
2020-05-21 00:04:37 +02:00
Jehan 338ac504df app: "layers-mask-selection-*" multi-layers aware.
All selected layers' masks are combined first as union, then the result
is combined with the image selection according to requested boolean
operation.
Also use new gimp_channel_combine_items() function.
2020-05-20 22:59:34 +02:00
Jehan 081ebf19f0 app: more accurate undo names.
Don't just name all alpha-selection actions the same "Alpha to
Selection". Have some more accurate naming like "Substract Alpha from
Selection", etc.

Also improve the action names to make them more accurate as these names
are not only in menus anymore, but also in search actions (and we want
to avoid duplicate naming).
2020-05-20 21:20:39 +02:00
Ell 09870d4b15 app: zero-out transparent pixels when converting to indexed
When converting an image to indexed mode, zero-out transparent
pixels instead of leaving junk in their indices, which might well
be out of range of the palette.
2020-05-20 21:16:52 +03:00
Jehan 32740ac0de app: improve alpha to selection with multiple items.
I created a new function gimp_channel_combine_items() which combines a
list of items with a channel. The list of items is first combined
together as an union set, then only combined with the channel with the
desired operation (this is important for operations such as intersect
which was broken in my previous commit because all items would be
intersected with each other and the selection, whereas we actually want
the union of all items to be intersected with the selection). This new
function is now used for "Alpha to Selection".

Also similarly to copy or color-pick on multi-layers, alpha to selection
will now use the composited result of the multi-layers as visible. In
particular it means that opacity, modes and visible properties on the
layers are taken into account. Alpha to selection on a single layer
though still works as previously, only taking the non-composited layer
data into account.
I am actually struggling if alpha to selection on uncomposited layers
(just an union on alpha to selection result for each layer) would not
make sense to on some workflows. To be experimented.

Finally it is to be noted that this function should also work on
channels and vectors (both single or multiple; and of course in such
cases, compositing does not matter) though I haven't tested yet. It
could even work with a source mix of layers, channels and vectors,
though our GUI does not allow such action currently.
2020-05-20 18:45:44 +02:00
Ell a90f59d961 app: fix alignment of generic pixel buffers
Wherever we store arbitrary-format colors in an opaque buffer, use
double for the buffer, instead of char, so that it has a strict-
enough alignment to handle all our used pixel formats.
2020-05-20 08:53:41 +03:00
Michael Schumacher 7412c4be6f app: use G_GINT64_FORMAT to fix a long unsigned int vs. long long int format warning 2020-05-19 18:24:38 +00:00
Ell 8fa9221fb8 app: don't leak text-tool UI manager 2020-05-19 17:06:24 +03:00
Ell e38010b2d1 app: in GimpPanedBox, don't accept drag contexts with unsupported targets
... to avoid both highlighting the droppable areas during darg, and
crashing on drop.
2020-05-18 18:19:01 +03:00
Cristian Secară 93a43ce0fd Update Romanian translation
(cherry picked from commit b8dfa31a88)
2020-05-18 14:24:29 +00:00
Yuri Chornoivan 65c5232e01 Update Ukrainian translation 2020-05-18 12:54:13 +00:00
Yuri Chornoivan abc0348f6d Update Ukrainian translation 2020-05-18 12:25:14 +00:00
Niels De Graef c2d4e7d265 gir: Fix some missing (out) annotations 2020-05-18 13:26:23 +02:00
Niels De Graef 09094fe66f gimpenumwidgets: Apply (transfer none) annotation
`(out)` implies `(transfer full)`, which isn't the case here. Let's fix
it before anyone tries to use it and gets hard to debug problems.
2020-05-18 13:00:58 +02:00
Jehan 645d80123a app: make "Alpha to Selection" multi-layer aware.
Allows to select several layers and have their alpha channel to replace
the selection, or substract from it, etc.
2020-05-18 12:22:08 +02:00
Jehan 2dcd38c586 app: gradient tool multi-drawables aware.
It means forbidding gradient tool to work (with appropriate error
message) on multiple selection. Applying gradient on several layers at
once is not supported at this point.
2020-05-18 11:37:25 +02:00
Jehan 2b764c6542 app: do not try to copy a buffer result from a canceled GEGL operation.
This fixes:
> GEGL-WARNING: (../../src/gegl/gegl/buffer/gegl-tile.c:127):gegl_tile_dup: runtime check failed: (! src->damage)

Which happened when a GEGL operation was running and you canceled it in
the middle, say with the ESC key (easy to reproduce with long operations
such as "Color to Gray"). In such case, obviously don't try to copy the
unfinished operation result into the dest buffer.
2020-05-18 11:22:34 +02:00
Jehan 2956873740 app, libgimp, pdb: fix gimp_selection_float() usage.
This fixes bugs introduced in commit a7c59277fb where I obviously didn't
properly checked all the places where gimp_selection_float() was used
after its parameters changed.
2020-05-18 02:09:45 +02:00
Jehan 73096b9a04 app: make the text tool multi-layer aware.
Multi-drawable selection for text tool only matters for positionning the
newly created text layer, if relevant. If a single layer is selected, it
will be same as before.
With multiple selection, the new layer just ends up to the top in case
of layers from different containers.
2020-05-18 00:53:57 +02:00
Jehan 5e960ad56b app: fix gimp_item_tree_get_insert_pos() with GIMP_IMAGE_ACTIVE_PARENT.
Don't check for NULL parent as it is a valid parent (for a root item).
Check instead just if we are the first item in the list.
2020-05-18 00:30:19 +02:00
Jehan a7c59277fb app: quick on-canvas copy-paste multi-layer aware. 2020-05-17 23:00:07 +02:00
Jehan bb7f94ce3b libgimp: add new functions to gimp.def.
This fixes the Windows build.
2020-05-17 22:44:02 +02:00
Jehan 5498adf50a app, libgimp, pdb: color picker multi-layer aware.
Color picking on a single layer still works as it used to. On multiple
layer, it will now pick on the composited color, similarly to sample
merged if only selected layers were made visible.

The PDB/libgimp function gimp_image_pick_color() is also updated to work
on multiple drawables too, giving the same ability to plug-ins (the only
call to this function in core plug-ins have been updated).
2020-05-17 18:57:32 +02:00
Jehan 6f5fbe4022 app: scroll automatically only when none of the selected items…
… are visible in the container tree view (upon updating selection).
2020-05-17 18:57:32 +02:00
Jehan 5cf71f3220 app: test-ui multi-layer aware.
This is actually commented-out test code, but still to be thorough in
case we ever re-enable this code.
2020-05-17 18:57:32 +02:00
Jehan f0557e93f8 app: Layer Selection Advance (up/down) now multi-layer aware. 2020-05-17 18:57:32 +02:00