Commit Graph

45162 Commits

Author SHA1 Message Date
sicklylife 12a03d3c95 Update Japanese translation 2020-01-29 09:10:29 +00:00
sicklylife 0336f924b8 Update Japanese translation 2020-01-29 09:07:26 +00:00
Rodrigo Lledó 54a20f698c Updated Spanish Translation 2020-01-29 08:50:53 +01:00
Rodrigo Lledó 09f87f6299 Updated Spanish Translation 2020-01-29 08:47:58 +01:00
Jehan 8528759834 app: better error management.
- Clear the GError when relevant.
- Check result of json_path_compile() just in case.
- Print some error on stderr when parsing of gimp_versions.json fails
  (which should never happen on releases but would help during
  development).
2020-01-26 15:13:10 +01:00
Piotr Drąg 425e6daf41 Update Polish translation 2020-01-26 14:32:44 +01:00
Jehan eca8076be6 Issue #4532: tests fail due to app/gimp-update.c not in POTFILES. 2020-01-26 11:34:54 +01:00
Jehan 1f75d2e34a app: update gimp-update to new gimp_versions.json format.
Instead of storing versions as objects, we now store them as arrays,
because json arrays are ordered, unlike objects (the website was using
non-standard Python extension to consider the version objects ordered
but this is not proper and even more, the lib we use for GIMP does not
have a similar extension.
This simplifies a bit the code as we don't need to order the versions by
comparing their string representations.
2020-01-26 11:26:13 +01:00
Elad Shahar ed6517f094 app: Fix Mandala Symmetry Kaleidoscope mode - brush transform and stroke order
Changed the reflection method to find the middle of the slice the
user is drawing on, and reflecting on that. This reflects the slice
in place, making it easier to rotate it to the intended location.
This fix preserves the order the dabs are drawn on the
slices, to be counterclockwise.

Fixed the brush transform, by setting the reflect output variable,
and calculating accordingly.
2020-01-22 01:17:23 +02:00
Ell b99a2631ef app: avoid deleting empty layer groups when downscaling image
When dowscaling an image (or a layer group), empty layer groups
can be discarded as a result of their new dimensions being too
small, since we're calculating their new dimensions according to
their fake 1x1 dimensions.  However, these dimensions are purely an
implementation detail and shouldn't affect the result, and neither
do we show a warning for them.

Instead, simply avoid discarding empty layer groups.
2020-01-21 20:15:58 +02:00
Ell 885d4fb1cb icons: replace gimp-visible symbolic icon again 2020-01-21 19:11:42 +02:00
Ell 864ed16435 icons: replace symbolic gimp-visible icon (aka the eye icon)
It looked meh :)
2020-01-20 22:56:12 +02:00
Ell 18870975b8 app: restrict whole-drawable updates to groups with filters
Restrict last commit's workaround to layer groups only (which is
the only relevant case ATM), since it negatively impacts the warp
tool, which does rely on the ability to perform (accurate) partial
updates with filters to improve performance.  It's only a temporary
hack anyway.
2020-01-20 00:38:04 +02:00
Ell 8be0e646bc app: always update full drawable region if it has filters
When a drawable has filters attached, they may influence the area
affected by drawable updates.  Currently, we ignore that, updating
the original region regardless.  This can lead to drawable updates
not affecting the correct regions.  This couldn't be triggered
until now, but since layer groups can now have a transform op
attached as a filter, updates to their sublayers -- which can
happen while the transform tool is active -- run into this problem.

Fix it for now by simply updating the full drawable region when the
drawable has filters.  This is a very conservative approach -- we
don't even bother checking if we're only dealing with point
filters, as this change only influences transformed groups right
now.  Ultimately, we need to rely on node invalidation to drive
updates, which takes this into account.
2020-01-19 21:06:24 +02:00
Ell 1e26ce8a60 app: don't emit GimpImage::linked-items-changed for non-attached items
In gimp_item_set_linked(), don't emit the
GimpImage::linked-items-changed signal if the item is not attached.
2020-01-19 21:06:23 +02:00
Piotr Drąg 1cee6521b4 Update Polish translation 2020-01-19 13:13:10 +01:00
Oleksii Samorukov 5d0b0ad467 Fix meson build on macos 2020-01-18 23:39:34 +01:00
Ell d24713349d app: add "Preview linked items" option to transform tools
Add a new "Preview linked items" option to the transform-grid
tools.  When this option is enabled, together with composited
previews, the transform preview includes all linked layers/channels
when transforming a layer/channel.  Note that paths aren't included
for now.

Ultimately, we'd probably want to cut down on the various preview
options and enable this by default, but let's make this optional
for now.

This commit also improves composited-preview clipping in some
cases.
2020-01-18 15:18:42 +02:00
Ell 7d6737fe9a app: add GimpImage::linked-items-changed signal
Add a new GimpImage::linked-items-changed signal, which is emitted
whenever the set of linked items in an image changes.
2020-01-18 15:18:41 +02:00
Ell fcc1c3d380 app: suspend tile validation while setting extent of validate-handler buffer
In gimp_tile_handler_validate_buffer_set_extent(), suspend tile
validation while calling gimp_gegl_buffer_set_extent(), so that if
the call triggers clearing of partial tiles, these tiles don't get
unnecessarily validated.
2020-01-18 12:43:06 +02:00
Ell 203bc9d893 app: disable transform clipping for layer groups
Using any clipping mode other than ADJUST is currently broken for
layer groups, since each layer in the group is clipped
individually, instead of clipping being applied to the group as a
whole.  Ultimately, we should fix that, but for now, simply disable
clipping for layer groups, by overriding GimpItem::get_clip() to
always return ADJUST.
2020-01-18 11:13:27 +02:00
Øyvind Kolås ab7c119c07 meson,app,autotools: depend on babl 0.1.74 and GEGL 0.4.20 2020-01-17 17:01:22 +01:00
Ell 10a528ed2f app: use gimp_gegl_node_get_key() in GimpFilterTool
... instead of doing the same thing manually.  This was supposed
to be part of the previous commits.
2020-01-17 16:43:51 +02:00
Oleksii Samorukov cfcf38e119 plug-ins/screenshot: fix compilation on macOS 2020-01-17 11:40:35 +01:00
Ell 1a2039da65 pdb: add missing change to last commit 2020-01-17 12:22:15 +02:00
Oleksii Samorukov 6b5d1a0d46 Fix reference from gimp_param_spec_duplicate to gimp_config_param_spec_duplicate 2020-01-17 11:17:03 +01:00
Ell 85a19da868 Issue #4366 - Color-to-alpha unnecessarily grayed out for grayscale images
Don't disable color-to-alpha for grayscale drawable, since the
operation is applicable to grayscale images (in particular, it
doesn't add color where there was none), and since we no longer
distinguish between layers and channels according to the drawable
format when updating the filters actions.
2020-01-17 12:12:36 +02:00
Ell 50b655de27 Issue #1975 - Color to alpha now requires an alpha-channel ...
... (used to add one automatically)

In GimpFilterTool and gimp_drawable_apply_operation(), use
gimp_drawable_filter_set_add_alpha() to add an alpha channel when
applying an operation that specifies "needs-alpha" to a drawable
that can have alpha.

Don't disable gegl:color-to-alpha (which has "needs-alpha") when
the drawable doesn't have an alpha channel, if one can be added.
2020-01-17 12:11:24 +02:00
Ell d61a541475 app: in GimpFilterTool, consolidate drawable-filter option setup
In GimpFilterTool, move all the drawable-filter option setup to a
new gimp_filter_tool_update_filter() function, and call it whenever
the drawable-filter's options need to be updated.  This avoids
duplicating logic in various places.
2020-01-17 12:10:25 +02:00
Ell bed825ab3d app: add gimp_gegl_node_get_key()
... which gets an operation-class key for the operation associated
with the node, if any.
2020-01-17 12:08:30 +02:00
Ell 5e1eba68e2 app: add GimpDrawable::supports_alpha() vfunc
Add a new GimpDrawable::supports_alpha() virtual function, and a
corresponding gimp_drawable_supports_alpha() function, which
determine if the drawable supports an alpha channel.  The default
implementation returns FALSE, and GimpLayer overrides it to return
TRUE.
2020-01-17 12:06:36 +02:00
Ell 0103fe2c19 app: silence warning in gimp_transform_resize_crop()
The crop-to-result and crop-with-aspect transform-boundary
algorithms seem to consistently fail in some cases, and spit out a
warning, which can be too verbose if it triggers the debug dialog.

Demote the warning to a g_printerr(), with an eye to just dropping
these algorithms altogether.
2020-01-17 00:29:42 +02:00
Ell 52cd27f0d3 app: add "Synchronous preview" option to transform tools
Add a "Synchronous preview" option to the transform-grid tools,
which renders the composited preview synchronously.  This reduces
the lag for painting the preview, but can harm responsiveness for
bigger images, where rendering the preview is slow.

This is mostly an experimental option for now; it will become more
interesting once we have mipmap rendering.
2020-01-16 11:41:12 +02:00
Ell d39822bcd7 app: in GimpTileHandlerValidate, fix tile-data pointer for negative coords
In gimp_tile_handler_validate_validate_tile(), when validating a
partial tile with negative coordinates, make sure to adjust the
result of the modulo when calculating the tile-realtive coordinates
so that they're non-negative, to fix the tile-data pointer offset.
2020-01-16 01:58:55 +02:00
Ell a335827896 app: add "Composited preview" option to transform tools
Add a "Composited preview" option to all transform-grid tools,
which displays the transform preview as part of the image
composition (i.e., as it would actually look when applying the
transformation, keeping the layer at the right position in the
stack, and with the right layer mode), instead of using an overlay.

This option is off by default, since it's generally slower to
render than an overlay, due to the lack of mipmap rendering.  We're
also still using an overlay when transfoming a selection, and not a
whole layer.
2020-01-16 00:32:23 +02:00
Ell 2e26603a55 app: freeze drawable preview in transform tools
In GimpTransformGridTool, when transforming a drawable, freeze the
drawable's preview while the tool is active, so that its ancestors'
previews don't get unnecessarily updated in response to hiding it.
2020-01-16 00:23:56 +02:00
Ell 006f300fff libgimpmath: add gimp_matrix3_equal()
... which compares two matrices.
2020-01-16 00:23:55 +02:00
Ell b9a801f7d4 app: add gimp_drawable_filter_set_override_constraints()
In GimpDrawableFilter, add a
gimp_drawable_filter_set_override_constraints() function, which
allows bypassing certain constraints applied to the filter, based
on the drawable type and state.

Yes, this is a bit of a hack, added mostly as a quick-and-dirty way
to allow us to add filters to layer masks that affect their
bounding box, in preparation for composited transform previews.
2020-01-16 00:23:54 +02:00
Ell 1f81c31405 app: add gimp_drawable_filter_set_add_alpha()
Add an optional "format" parameter to gimp_drawable_merge_filter(),
which specifies the format to use for the output, possibly changing
the drawable's format.

In GimpDrawableFilter, add a gimp_drawable_filter_set_add_alpha()
function, which allows the filter to add an alpha channel to the
drawable when committed (by passing an appropriate format to
gimp_drawable_merge_filter()).
2020-01-16 00:23:52 +02:00
Ell cb5a63e260 app: calculate drawable bounding box according to graph by default
Change the default implementation of
GimpDrawable::get_bounding_box() to return the drawable source
node's bounding box, instead of the drawable's item bounds.  This
allows filters to affect the size of all drawables, including, in
particular, layer masks.

Change GimpLayer's implementation of get_bounding_box() to return
the intersection of the layer's own bounding box, and the layer
mask's bounding box (if it has one), and update the layer's
bounding box when the mask is enabled/disabled, or when its
bounding box changes.
2020-01-16 00:22:19 +02:00
Jehan 4a4359d3da libgimp: (meson) build GIR file silently.
In case of errors or warnings, they will still be displayed, but it is
better to not show outputs when everything is building fine.
2020-01-15 22:24:48 +01:00
Ell 7f84f10154 app: implement GimpPickable::flush in GimpGroupLayer
... by synchronously flushing the group's projection.  This is
necessary for pass-through groups, since their projection is
normally flushed asynchronously.
2020-01-15 22:03:51 +02:00
Ell bb8ee0e686 app: handle GimpTileHandlerValidate::invalidated in gimp:buffer-source-validate
In gimp:buffer-source-validate, invalidate the node in response to
GimpTileHandlerValidate::invalidated, added in the previous commit,
in addition to GeglBuffer::changed.
2020-01-15 21:50:11 +02:00
Ell 3ea391602e app: add GimpTileHandlerValidate::invalidated signal
Add a new GimpTileHandlerValidate::invalidated signal, which is
emitted when a region of the buffer is invalidated.  This would
allow us to properly invalidate the graph in response; this
normally happens in response to GeglBuffer::changed, but this
signal is not emitted when a region is merely invalidated.
2020-01-15 21:50:11 +02:00
Ell ba6040bbcd app: allow calling gimp_tile_handler_validate_validate() with a NULL rect
... and validate the entire buffer.
2020-01-15 21:50:11 +02:00
Oleksii Samorukov 3e78c674d8 Return FALSE on gimp_osx_focus_window to avoid endless loop 2020-01-15 17:40:23 +01:00
Ell 0271f4c861 libgimpmath: add version annotations to new matrix functions 2020-01-15 18:24:20 +02:00
Ell 469f8d6193 icons: fix PNG 3D-transform icons in makefile 2020-01-15 18:15:00 +02:00
Jehan ec9dbd8115 libgimpwidgets, app, plug-ins: fix last GIR warnings.
gimp_int_radio_group_new() was still complaining about the scope of
radio_button_callback(). Make it (scope notified) because it needs to
stay alive after the function returns and may be called multiple times.

Also adding a GDestroyNotify to free the callback data once the widget
is destroyed (additionally it will also serve as a notifier for bindings
to properly free the callback closure itself, not only it's data).

With this last one done, GObject Introspection generation now happens
without any warning output.
2020-01-15 14:00:19 +01:00
sicklylife 44300b134f Update Japanese translation 2020-01-13 14:23:22 +00:00