Commit Graph

42460 Commits

Author SHA1 Message Date
Ell
da6086636b app: in GimpTransformGridTool, allow linking forward/backward transforms
Add a GimpTransformGridTool::matrix_to_info() virtual function,
which should extract the tool-specific transformation parameters
given a transformation matrix, and the old parameter set (which is
needed in some tools, to derive the parameters that aren't encoded
in the matrix, such as the pivot point).  The transformation matrix
can be any combination of matrices calculated by the tool, and
their inverses.  Subclasses should only implement this function if
every such matrix can be mapped back to transformation parameters.
This is currently the case for all the transform-grid tools, except
for the shear tool (since it only supports shearing along one of
the horizontal or the vertical directions, however, the combined
matrix may require shearing in both directions).

When a transform-grid tool implements this function, show a chain-
button between the two transform-direction radio-buttons in the
tool options.  When the chain-button is linked, whenever the
transform corresponding to the active direction is modified, adjust
the transform corresponding to the non-active direction such that
the overall transform remains the same.

One notable workflow that this enables is transforming a layer
while adjusting a different area than its boundary, by first
defining the area while the transform-directions are linked, and
then transforming the area while the transform-directions are
unlinked.

(cherry picked from commit 39e23267f7)
2019-02-04 16:50:41 -05:00
Ell
ca06990828 app: in GimpTransformGridTool, allow simultaneous forward and backward transforms
In GimpTransformGridTool, allow performing simultaneous forward
(normal) and backward (corrective) transforms, by having each
transform direction operate on an independent set of parameters.
In other words, whereas the transform-grid tools previously had a
single transform, which could be applied either normally or
correctively using the "direction" tool-option, they now have two
independent transforms, one applied normally and the other
applied correctively, which are toggled using the "direction"
option.  The overall transform is the combination of the backward
transform, followed by the forward transform.

Another way to think about it, is that the tool transforms a source
shape into a destination shape.  The source shape is defined by the
backward transform, and the destination shape is defined by the
forward transform.  Wherewas previously only one of these shapes
could be controlled (the other shape always being the item bounds),
it's now possible to control both shapes in a single transform.
The next commit will allow modifying both shapes simultaneously,
making this even more useful.

Note that since both transforms start off as the identity, using
only one of the transform directions has the same behavior as
before.

(cherry picked from commit de8e81f81f)
2019-02-04 16:50:41 -05:00
Ell
b869f1bf5a libgimpwidgets: add GimpChainButton::active property
... which corresponds to the button's toggle state.

(cherry picked from commit 9c3f150e25)
2019-02-04 16:50:41 -05:00
Ell
fcfe6997cd libgimpwidgets: add GimpChainButton::icon-size property
... and corresponding gimp_chain_button_{get,size}_icon_size()
functions, which control the chain-button's icon size.

(cherry picked from commit 8d6c7e42bf)
2019-02-04 16:50:36 -05:00
Ell
3ad945c3c8 app: add GimpTransformToolClass::undo_desc field
Add an undo_desc field to GimpTransformToolClass, which subclasses
should set to the tool's default undo description.  Provide a
default implementation for the get_undo_desc() vfunc, which returns
(a copy of) undo_desc.  This simplifies transform tools that have a
static undo descrption, as well as provides a fallback when a
detailed undo description can't be generated (not currently
relevant, but will be used in the next commit).

(cherry picked from commit d549440650)
2019-02-04 16:48:57 -05:00
Ell
b0ab2b6564 app: improve rotate-tool undo description
When rotating an item around its center using the rotate tool,
i.e., if the pivot point hasn't been moved, don't include the pivot
coordinates in the undo description.

(cherry picked from commit 44c8a1f274)
2019-02-04 16:48:56 -05:00
Ell
054d441a8d app: improve measure-tool undo description
When straightening an item using the measure-tool, include the
orientation and angle in the undo description.

(cherry picked from commit b95bf3fb93)
2019-02-04 16:48:56 -05:00
Ell
b820d50827 app: add GimpToolCompass::effective-orientation property
In GimpToolCompass, add a read-only "effective-orientation"
property, which returns the actual orientation of the compass; in
particular, if the "orientation" property is set to AUTO,
"effective-orientation" returns HORIZONTAL or VERTICAL, depending
on the current compass direction.  In 3-point mode, the property
always returns AUTO.

(cherry picked from commit 40c0913178)
2019-02-04 16:48:55 -05:00
Ell
6495b6d023 app: fix CRITICALs in GimpMeasureTool
In GimpMeasureTool, don't try to access the "straighten" button
when halting the tool if it's NULL, which can happen when the
measure tool is selected upon startup, but is changed before its
tool-options GUI is constructed.

(cherry picked from commit 7fc5698f32)
2019-02-04 16:48:55 -05:00
Ell
d6bb1efd77 app: in gimp_transform_matrix_generic(), apply matrix even if invalid
In gimp_transform_matrix_generic(), apply the resulting matrix even
if the transformation is invalid, since GimpGenericTransformTool
relies on the matrix to properly update the transform-grid widget.

(cherry picked from commit 59ef222c7f)
2019-02-04 16:48:54 -05:00
Ell
d74df14766 app: in GimpTransformGridTool, fix layer hiding
In GimpTransformGridTool, when the "show-preview" tool-option
changes, don't take the transform validity into account when
deciding whether to hide the current layer -- it should only affect
the visibility of the preview, not the layer.

(cherry picked from commit 7ed512040e)
2019-02-04 16:48:54 -05:00
Ell
08c540ebc1 app: in GimpTransformGridTool, remove flip-tool hack
The flip tool is not a subclass of GimpTransformGridTool; this is
a leftover from GimpTransformTool.

(cherry picked from commit 3ebda874b5)
2019-02-04 16:48:53 -05:00
32c185c7ee Issue #2906: Icon Theme bar strings have no translations. 2019-02-04 22:19:58 +01:00
dc431bbcc1 Update Spanish translation 2019-02-04 10:42:45 +00:00
79454e2bf3 app: in the prefs dialog, warn that OpenCL support is experimental
(cherry picked from commit 7998a27b8b)
2019-02-04 10:40:22 +01:00
6be6ea0e92 Issue #2898 - Gegl Operations - Color Wrap does not fit the screen on...
...1920*1980 resolution

In GimpOperationTool, make the generated GUI scrollable if it is
higher than half the monitor's workarea. This is meant as a last
resort for generated GUIs that do not have a custom constructor that
makes them usable using better layouts.

(cherry picked from commit b85d7c2334)
2019-02-03 18:15:48 +01:00
b9a0bd4d62 libgimpbase: add gimp_installation_directory_file() to gimpbase.def
(cherry picked from commit c71a887b08)
2019-02-03 14:56:15 +01:00
53de34230f libgimpbase: add gimp_installation_directory_file().
Fix previous commit.
Ahahah! Mitch, you didn't test your code before pushing! Bad boy! :P

(cherry picked from commit db00616888)

(Bad Jehan didn't pick this to 2.10)
2019-02-03 14:54:53 +01:00
a8f58acb9a Issue #2867 - iso-codes location is not relocatable on all platforms
gimplanguagestore-parser.c (parse_iso_codes): instead of
special-casing Windows and OS X, use ENABLE_RELOCATABLE_RESOURCES and
find the package relative to ${gimp_installation_directory}, so
relocating it works on all platforms (also flatpack, snap, whatever),
given the --enable-relocatable-bundle configure switch is used.

(cherry picked from commit 10ce702188)
2019-02-02 17:11:03 +01:00
48dba7a0e1 Update Polish translation 2019-02-02 14:44:24 +01:00
eeeab8b209 Add i18n support for python spyrogimp plugin
(cherry picked from commit f6e4145756)
2019-02-01 07:41:23 -05:00
Ell
d2bc3eeb5d plug-ins: in pygimp/plug-ins/Makefile.am, simplify plug-in copy recipe
(cherry picked from commit 12dbd4aee2)
2019-02-01 07:41:22 -05:00
Ell
5f398c0888 plug-ins: in pygimp/plug-ins/Makefile.am, re-copy plug-ins upon change
In pygimp/plug-ins/Makefile.am, fix the rule for the generated
plug-in files, so that they're re-copied to the build dir upon
changes to the source plug-in files.

(cherry picked from commit 95044d86b3)
2019-02-01 07:12:38 -05:00
Ell
301691b3ed plug-ins: in pygimp/plug-ins/Makesfile.am, use tab-width of 8
... like the rest of our makefiles.

(cherry picked from commit bcd9f55526)
2019-02-01 07:12:38 -05:00
377cae8ecc Update Japanese translation 2019-01-31 16:09:03 +00:00
Ell
297971e447 app: fix CRITICAL when initializing the perspective-clone tool
When initializaing the perspective-clone tool in paint mode, the
GimpDrawTool may already be active, causing the call to
gimp_draw_tool_start() to fail with a CRITICAL.  Stop the draw tool
first, if active, to avoid that.

(cherry picked from commit 07d2d5af5a)
2019-01-31 09:13:04 -05:00
Ell
5e6378a7a3 app: in perspective-clone tool, fix cursor presicion; hide brush while adjusting
In GimpPerspectiveCloneTool, use PIXEL_CENTER cursor precision
while setting the source, and place the source-position handle at
the center of the selected pixel, rather than at its top-left
corner.

Additionally, disable the paint tool while adjusting the
perspective, so that the brush outline isn't shown, and the cursor
precision remains SUBPIXEL, even if the hard-edge option is
toggled.

(cherry picked from commit e5c9314a88)
2019-01-31 06:22:52 -05:00
Ell
5c3532609f app: add gimp_paint_tool_set_active()
... which can use to enable/disable certain aspects of
GimpPaintTool (in particular, brush-outline drawing).  Should be
used by subclasses, to temporarily disable the paint tool while in
a non-paint mode (currently, this is only needed by the
perspective-clone tool; see next commit.)

(cherry picked from commit 05dd5029ee)
2019-01-31 06:22:51 -05:00
Ell
028b0f39dd app: fix cursor precision of source tools
In GimpCloneTool, set the cursor precision to PIXEL_CENTER while
setting a source, and have GimpBrushTool snap the brush outline to
pixel centers.

(cherry picked from commit ef2818231f)
2019-01-31 06:22:50 -05:00
Ell
b1c977e510 app: fix cursor precision of various tools
Fix the cursor precision of the cage-transform, foreground-select,
n-point deformation, and warp-transform tools.

(cherry picked from commit 158705e4ef)
2019-01-31 04:39:40 -05:00
b81723042e plug-ins: add .gitignore file to file-dds
(cherry picked from commit 0fa98d4849)
2019-01-30 18:49:36 +01:00
6f8c8ce56d Update Japanese translation 2019-01-30 14:28:48 +00:00
61d2e8ad74 Update Spanish translation 2019-01-30 07:44:44 +00:00
94d176d7f5 Update Japanese translation 2019-01-28 17:27:09 +00:00
90d76267a7 Updated Danish translation of gimp-plug-ins 2019-01-28 13:12:49 +01:00
0d950bd289 Update Japanese translation 2019-01-27 15:24:58 +00:00
17e360e34b Issue #2863 - Improve error reporting for scripts
gimp_plug_in_handle_proc_install(): print the procedure name when
bailing out of a wrong proc install call. For an obsolete full-path
menu label, also print the label. Original patch by Liam Quin.

(cherry picked from commit 07e3c1c15b)

In libgimp, add a note to gimp_install_procedure() stating that
passing a full menu path as "menu_label" is deprecated.
2019-01-27 13:42:36 +01:00
316c47da6f Update Hungarian translation 2019-01-26 21:37:53 +00:00
b70a37a33d Update Hungarian translation 2019-01-26 21:32:21 +00:00
Ell
d11d094d02 Issue #1119 - Unable to give a layer group as a parameter to a python script
Pickle gimp.GroupLayer the same way we pickle gimp.Layer, so that
layer-group parameters can be properly saved.

All credit goes to Ofnuts :)

(cherry picked from commit b295a33aaf)
2019-01-26 16:02:26 -05:00
25d39eea9d Update Japanese translation 2019-01-26 16:17:08 +00:00
69712634a1 plug-ins: optionally define several float.h macros for MinGW64.
This plug-in failed to cross-build because these macros were not defined
in the `float.h` of my MinGW64 environment (and they are used in some
ilmbase headers). Just define them ourselves if they are absent. I do
this only on MinGW environment because these should really be defined on
Linux (and other UNIX-like, I guess?) and if they are not, we may have a
bigger issue.

(cherry picked from commit 7a7ecda4f1)
2019-01-26 16:46:03 +01:00
dc01a613ff Update Polish translation 2019-01-26 11:24:51 +01:00
d79916f598 NEWS: keep up-to-date. 2019-01-25 21:45:17 +01:00
aaf5816695 Undo some (unnecessary) changes.
(cherry picked from commit fc657184a0)
2019-01-25 21:10:45 +01:00
0436dd1cb7 (source modifs) Fix: Rename macros as it conflicts with Mingw headers.
* DATADIR -> GIMPDATADIR
* SYSCONFDIR -> GIMPSYSCONFDIR
* DATADIR -> SYSDATADIR (tools/)

(cherry picked from commit fc8303dd0a)
2019-01-25 21:10:41 +01:00
ffe2fb478c app: new gimp_spin_scale_set_constrain_drag() and use it on paint...
... tools' brush options.
After discussions, it turned out that many people disliked that the spin
scale for brush size (and some other options) get you fractional values.
How often do you actually need to get a 4.32 pixel-size brush? And even
how meaningful is it? On the other hand, you usually want a 4 or a 5
pixel size brush and it's nearly impossible to get (exactly) by dragging
the scale widget.
It is so annoying that some even resort to edit the value with keyboard!
So I am adding an optional "constrain" feature to GimpSpinScale. It will
still be possible to get fractional values when constraining is on, for
instance with keyboard edit (the arrow incrementation also will keep any
fractional part). So the interaction for such scales is simply reversed
so that you get integers easily, and fractional parts with a bit more
effort.

It is not turned on by default (some feature actually need precision and
we don't want to break the sliders for these) and for the time being, I
only applied it to all the brush settings in paint tools. Now that it
exist, we may want to apply this to more scales in various parts of
GIMP.

(cherry picked from commit bff3903f37)
2019-01-25 18:34:09 +01:00
699933470a libgimpbase: display thread id of the calling thread as hexadecimal...
... on macOS.
The debugger running on macOS is usually lldb and (from the reports we
get) it looks like lldb displays the tid as hexadecimal on macOS
(whereas lldb displays decimal tid on Linux! I know, it's confusing, yet
consistent with crash report experience!). So let's just do the same,
making it easy to quickly copy-search in order to look up the crashing
thread (without having to convert from decimal to hexa).
This is a bit of an approximation as I imagine we could have gdb on
macOS or whatever edge case. Let's say it's good for the common case and
still not an error otherwise (just a base conversion away).

(cherry picked from commit 8e0135362e)
2019-01-25 12:54:37 +01:00
5a0e4554be Update German translation 2019-01-25 10:26:01 +00:00
Ell
71fe5c00fd plug-ins: avoid running pygimp plug-ins derived from gimpplugin.plugin at each startup
When initializing a pygimp plug-in derived from gimpplugin.plugin,
only pass the plug-in's init() and quit() functions to gimp.main()
if the plug-in actually implements them, instead of passing the
default NOP versions.  This avoids plug-ins that don't implement
init() from being registered as having an init function, causing
them to be run at each startup.

(cherry picked from commit 9851bc8962)
2019-01-25 04:34:27 -05:00