Commit Graph

43479 Commits

Author SHA1 Message Date
Ell
e27aa6c000 app: snap spin scale to page increments when holding Ctrl
When click-dragging a GimpSpinScale while holding Ctrl, in either
absolute or relative mode, snap the value (or the delta) to the
page increment.
2020-01-09 01:49:08 +02:00
Ell
6b9a6da4a7 libgimpwidgets: control GimpSpinButton scroll increments using modifiers
In GimpSpinButton, adjust the scroll step in response to modifiers:
normal scrolling uses the step increment, Ctrl uses the page
increment, and Shift scales the step increment down by the ratio
between the page and step increments (up to the minimal precision
of the spin button).

This applies to all spin buttons used in GIMP, including spin
scales.

(cherry picked from commit ac8bf47fa6)
2020-01-08 21:01:55 +02:00
839920d129 Update Japanese translation 2020-01-08 18:11:09 +00:00
03b135a9bb Update Japanese translation 2020-01-08 18:02:50 +00:00
Ell
b9c13c0900 app: fix integer overflow when reporting operation progress
In gimp_gegl_apply_cached_operation(), use gint64 for storing the
total and processed pixel counts used for reporting progress, to
avoid overflowing when applying an operation to a large image.

(cherry picked from commit f1c448e0f4)
2020-01-08 11:40:06 +02:00
Ell
c8b80d8997 menus: add the 3D Transform tool to the Tools menu
(cherry picked from commit 32da86b6ed)
2020-01-07 23:04:57 +02:00
Ell
818cbdbf4c app: fix wrong fix to gimpbacktrace-windows.c
This fixes commit 468f3e84d8.

(cherry picked from commit c93e5a2eae)
2020-01-07 22:18:55 +02:00
Ell
7fdfe791dd app: improve compact spin-scale behavior
GimpSpinScale now always grabs focus in response to a button press
in compact mode.  However, like before, the left button is always
used for absolute adjustment, even when pressed over the text,
instead of controlling the text cursor.

The right button is now used both for relative adjustment, and to
select the entire text.  Alternatively, the same can be achieved
with Shift+left-button.

The middle button has no special function.

Regardless, if a button-press event over the text triggers a
context menu, this overrides any of the above.
2020-01-07 20:58:20 +02:00
1874fa8a16 Update and improve Russian translation 2020-01-07 15:03:50 +03:00
f51fe56a6b Update Japanese translation 2020-01-07 11:10:25 +00:00
Ell
97d6201198 pdb: in plug_in_compat.pdb, set underlying op nodes
In plug_in_compat.pdb, when wrapping an op node inside a graph, set
the op node as the graph node's underlying operation.  This allows
gimp_gegl_apply_operation() to perform certain optimizations.

(cherry picked from commit e74994feaf)
2020-01-07 10:53:04 +02:00
Ell
6cf7b08c36 Issue #4204 - "Add Bevel" Has No Effect
In plug_in_compat.pdb, don't add child nodes to nodes containing an
op, since this turns them into graphs and discards the op.
Instead, add a new wrap_in_graph() helper function, which takes a
node op and wraps it in a simple "input -> op -> output" graph.
Use the graph as the container for child nodes, and as the node
passed to gimp_drawable_apply_operation().  (This is similar to
what we used to do before commit
afdd573136, except that we now pass
the parent node to gimp_drawable_apply_operation(), instead of the
op node).

(cherry picked from commit 8b7bafa43a)
2020-01-07 10:53:03 +02:00
Ell
2078e24b4a app: fix indentation in gimppivotselector.h
(cherry picked from commit 49221167c3)
2020-01-07 10:04:09 +02:00
Ell
27ad1316dd libgimpmath: add new matrix functions to .def file
... and fix docs for gimp_matrix4_transform_point().

(cherry picked from commit 9d015b7b1a)
2020-01-07 10:04:08 +02:00
Ell
8591b5b33f app: add compact style for spin scales
Add a boolean "compact" style property for GimpSpinScale.  When
TRUE, the widget uses a narrower layout, and the different upper/
lower-half behavior is gone.  Instead, the behavior depends on the
mouse button used: left-click is used for absolute adjustment
(similar to the upper-half behavior), middle-click is used for
relative adjustment (similar to the lower-half behavior), and right
click is used for manual value entry (similar for clicking on the
text area).

Add a new "Compact sliders" toggle to the Interface prefernces, to
control the spin-scale style.  Apply the style globally through the
themerc file, and update it when the option changes.

Use the compact style by default, because otherwise no one would
find it.  Theming in GTK3 works differently, and spin scales in
master need more work regardless, so this stays in 2.10 for now.
2020-01-06 23:10:05 +02:00
Ell
3d7bb4bc3d app, icons: add 3D Transform tool
Add a new 3D Transform tool, based on GimpToolTransform3DGrid,
added in the previous commit.  The tool UI provides a notbook with
three tabs, corresponding to the three GimpToolTransform3DGrid
modes:

  Camera - allows setting the primary vanishing point, as well as
  the camera's focal length, expressed either directly, or as the
  camera's angle of view, relative to the whole image or the
  transformed item.  By default, the vanishing point is aligned
  with the item's center, and the angle of view is fixed relative
  to the item; this essentially means that each item is transformed
  using a local perspective, independent of its position and size
  relative to the image.  A global perspective can be achieved by
  using a common vanishing point and focal length (or an image-
  relative angle of view).

  Move   - allows moving the item using X, Y, and Z offsets.

  Rotate - allows rotating the item using X, Y, and Z Euler angles.
  The order of rotation of the different axes can be controlled by
  a set of numbered buttons next to the sliders, and the rotation's
  pivot can be controlled using a pivot selector.
2020-01-06 23:10:05 +02:00
Ell
855eb0a150 app, cursors: add GimpToolTransform3DGrid tool widget
Add a new GimpToolTransform3DGrid tool widget, subclassed from
GimpToolTransformGrid, which can be used to perform 3D
transformations.

The widget can be in one of three modes:

  CAMERA - allows adjusting the primary vanishing point by moving a
  handle.

  MOVE   - allows moving the object through dragging.

  ROTATE - allows rotating the object through dragging.

By default, controlling the transformation through dragging applies
to the X and Y axes.  Holding Shift (or setting the "constrain-
axis" property) restricts the motion to only one of the axes.

For the MOVE and ROTATE mode, holding Ctrl (or setting the "z-axis"
property) allows controlling the Z axis instead.

For the same modes, holding Alt (or setting the "local-frame"
property), applies the adjustments in the object's local frame of
reference, instead of the display's global frame of reference.
2020-01-06 23:10:04 +02:00
Ell
d0ccd6ecfb app: add a protected gimp_tool_transform_grid_get_handle() function
... which can be used by subclasses to retrieve the currently-
active handle.
2020-01-06 23:10:04 +02:00
Ell
d30d47a0fd app: add GimpTransformGridTool::dynamic-handle-size property
Add a boolean GimpTransformGridTool::dynamic-handle-size property,
which controls whether the handle sizes are adjustment dynamically
according to the grid's size, or remain fixed.  This property is
TRUE by default, to maintain the current behavior.
2020-01-06 23:10:04 +02:00
Ell
cd7ccdf310 app: in GimpToolTransformGrid, add NONE function
In GimpToolTransformGrid, allow setting "inside-function" and
"outside-function" to a new NONE value, performing no
transformation when dragging the respective area.
2020-01-06 23:10:04 +02:00
Ell
d8d05b9908 app: add gimp-transform-3d-utils.c
Add gimp-transform-3d-utils.c with various utility functions for
performing 3D transformations, in preparation for adding a 3D
transform tool.
2020-01-06 23:10:04 +02:00
Ell
2412b5fc99 libgimpmath: add various GimpMatrix4 functions
Add gimp_matrix4_{identity,mult,transform_point}().
2020-01-06 23:10:04 +02:00
Ell
d546e3b813 libgimpmath: add various GimpMatrix2 functions
Add gimp_matrix2_{determinant,invert,transform_point}().
2020-01-06 23:10:04 +02:00
Ell
ab0b148d79 app: add a pivot selector to the Rotate tool
Add a GimpPivotSelector widget to the Rotate tool dialog, to allow
for quickly picking a pivot.
2020-01-06 23:10:04 +02:00
Ell
0c05c33b80 app, icons: add GimpPivotSelector widget
GimpPivotSelector is a 3x3 grid of toggle buttons, used for
selecting a natural pivot position (e.g., for a transform) relative
to an item: its center, its corners, and the midpoints of its
edges.
2020-01-06 23:10:04 +02:00
Ell
2ff0235fbf app: reduce dialog size of Unified Transform tool and friends
The tool dialog of generic-transform tools (the Unified,
Perspective, and Handle Trasnform tools) shows the current
transformation matrix.  Although we might as well show *something*
in the dialog (we can't get rid of it altogether, as it provides
the common tool actions), this information is probably meaningless
for most users, and isn't directly editable anyway.

Reduce the size of the matrix, to make it less prominent, and free
up some space.
2020-01-06 23:10:04 +02:00
Ell
11fecc15ea app: in GimpTransformGridTool, compress successive undo steps
Add a boolean 'compress' parameter to
gimp_transform_grid_tool_push_internal_undo().  When TRUE,
successive undo steps added rapidly are compressed into a single
step.

In the various subclasses, compress undo steps for dialog changes,
since we push an undo step for every intermediate change for those
(such as while dragging a spin-scale).  In contrast, we only push
tool-widget undo steps upon button release, hence there's no need
to compress them.
2020-01-06 23:10:04 +02:00
Ell
dab1eb021e app: in GimpTransformGridTool, avoid unnecessarily flushing image when pushing undo
In gimp_transform_grid_tool_push_internal_undo(), only flush the
image when undo/redo availability for the tool changes, instead of
for every undo step.  This speeds things up when many undo steps
are pushed in succession, which usually happens when using the tool
GUI.
2020-01-06 23:10:04 +02:00
Ell
65d5cd5daf app: fix indentation in gimptoolsheargrid.c 2020-01-06 23:10:04 +02:00
Ell
68c250b63e libgimpwidgets: fix percentage use in size-entry arithmetic when lower-bound != 0
In GimpSizeEntry, the value corresponding to 0%, as per
gimp_size_entry_set_size(), may be non-zero.  This works correctly
when using the size entry in percentage mode, but not when using
precentage as part of arithmetic.

Fix this by adding an 'offset' parameter to eevl's unit-resolution
callback, which can be specifies a constant value to add as part
of unit conversion, after scaling the converted value by the
conversion factor.  In GimpSizeEntry, use this parameter to offset
percentages by their lower bound.
2020-01-06 23:10:04 +02:00
93f935865f Issue #4203 - Wavelet decomposition only on RGB images
Add GRAY* to the list of supported image types.

(cherry picked from commit 38cccaac49)

(not really a cherry-pick, but nice to see the resp. commit from
master)
2020-01-06 19:49:57 +01:00
61a2d53c9d Issue 2862 - Error message. Unable to decode abr...
...format version 10.

Simply allow the parser to read version 10, seems to work
with the brushes in issue #2862.

(cherry picked from commit c39d8fde33)
2020-01-06 19:38:12 +01:00
07b3acd69b Issue #3588 - Add Yu'v' (CIE 1976 UCS) to GIMP color picker
Which is a linear transform of xyY that is more perceptually
uniform, and so well-suited for eventually adding chromaticity
diagrams to GIMP color tools. ACES documentation uses this color
space instead of xyY for showing chromaticity diagrams. Moving
forward I expect other venues also will start using Yu'v' as
the advantages over xyY chromaticity diagrams are fairly obvious.

(cherry picked from commit bb660c5821)
2020-01-06 19:24:24 +01:00
b419aa5d10 app: expand functionality of merge-down button
Adds a number of modifier keys to the layer dockable's new "Merge Down"
button to access further functions, and adds among them a new action to
merge visible layers using the dialog's last values, akin to those
accompanying the New Layer and Add Layer Mask dialogs.

Modifier keys are bound as follows:
  Shift -> Merge layer group
  Ctrl -> Merge visible layers
  Ctrl + Shift -> Merge visible layers from last used values

The Merge Down button is kept sensitive even when the current layer
can't be merged down to allow access to these functions

(cherry picked from commit a11ada4ce2)
2020-01-06 18:39:30 +01:00
3bab2e60fa app: consolidate UI for merging down and anchoring layers (issue #1184)
As they are both mutually exclusive and serve an almost identical
purpose, the "Merge down" and "Anchor Layer" are given mutually
exclusive visibility in menus, and the anchor button is replaced
with a merge down button in the Layers dockable whenever there is
no active floating selection

(cherry picked from commit f539fc78c0)
2020-01-06 18:39:10 +01:00
90de27109e Update Japanese translation 2020-01-06 14:32:50 +00:00
8ae2d8358d Updated Italian translation 2020-01-06 11:32:50 +01:00
94739caf31 Update Japanese translation 2020-01-06 09:43:18 +00:00
f1b7801f95 Update Japanese translation 2020-01-06 09:35:06 +00:00
b69c2ef9ce app: fix missing const qualifier.
Thanks to frogonia for noticing.

(cherry picked from commit 5ec22b6720)
2020-01-01 02:24:22 +01:00
0731fa3f35 Issue #2227 - GIMP 2.10.6 crashes with assertion GIMP_IS_TAGGED in...
...MyPaint brushes dialog

In gimp_tag_entry_assign_tags(), don't add/remove tags while iterating
tag_entry->selected_items, because that might change the list. Instead,
make a temporary deep copy of the list and iterate the copy. Spotted
by Massimo.

(cherry picked from commit ff32fe9f5d)
2020-01-01 00:27:24 +01:00
1354d37921 Update French translation 2019-12-31 11:02:56 +00:00
66a833f8f2 Update French translation 2019-12-30 09:15:55 +00:00
3f76d7782a Issue #4338 Plug-in file-header exporting to format C header wrong output. 2019-12-29 21:51:51 +00:00
52d7088c46 Issue #2674 - File/Open Recent opens the wrong document
Must call gimp_action_init() from gimp_action_impl_init() or the
signal handlers to update label and tooltip will ever be installed.
Found by Massimo.

(cherry picked from commit 45ad58dff4)
2019-12-28 21:40:39 +01:00
923ee63b43 plug-ins cml-explorer add missing gegl_init. 2019-12-28 17:05:02 +00:00
b5ceb4610d Issue #4331 - Bevel Reflect Logo script crashes in 2.10.14
Add missing gegl_init() to map-object.
2019-12-28 17:57:54 +01:00
dba4e95497 Update Spanish translation 2019-12-24 10:50:19 +00:00
573c043bab Issue #4392: Gimp Segmentation Fault triggered by Glib GParamSpec...
... property name validation.
Previous commit fixed the parameter name validation in core code. This
commit fixes the source error in the plug-in code.
2019-12-24 01:34:29 +01:00
4550fc1bfa Issue #4392: Gimp Segmentation Fault triggered by Glib GParamSpec...
... property name validation.
GLib tightened its GParamSpec name validation, as it used to only check
that the first letter was a letter, which triggered this issue, though
the crash could have also happened with the former lax rules too (commit
30e630c9df792cf36cdb1cceb3daefbde1dc898a).

I opened a merge request in GLib to make the validation code into a
public function. In the meantime, let's just copy-paste the validation
code into ours and when a plug-in attempts to create a procedure with
invalid parameter or return value names, GIMP will just output an error
and refuse to install the procedure instead of crashing.
See: https://gitlab.gnome.org/GNOME/glib/merge_requests/1302
2019-12-24 01:34:29 +01:00