Don't assume that "toggled" signal means that toggle status actually
changed.
Though issue #3133 got fixed with my previous commit, let's make sure we
never create several GBinding for the same GimpChain by always checking
existence of a previous one after a "toggled" signal.
Also only create a GBinding object if one doesn't already exist.
"binding" data can be set to NULL. Do not assume it is a proper object.
Also I was tempted to use g_object_set_data() to simply free the
GBinding object on setting a new data, but such object will also be
freed when the widget is destroyed by default. So that would also end up
in double destruction. Instead just keep current logics.
This CRITICAL was reported in #3133 but this is not the main bug.
Add on-canvas GUI (simple lines) for circular, linear and zoom motion
blur. The restrictions in the interaction show pretty well that there
is room for improvement here, the line is just a bit too generic, but
it's better than nothing.
...have the same scaling
gimp_prop_widget_new_from_pspec(): when restricting the scale to the
actual op area for pixel-coordinate and pixel-distance properties,
only use the max value in the axis direction for pixel-coordinate; for
pixel-distance make sure we use the same value on both axes, simply
use MAX (area.width, area.height).
When constructing a prop-GUI widget for an angle property with a
dial, use the the property's "direction" UI-meta, if exists, to set
the direction of the dial. Together with GEGL commit
7b0578073a0f20334b5a8a8fe57b649d9f302454, this fixes wrong dial
direction in certain ops that use clockwise angles.
... and rename "clockwise" to "clockwise-delta"
Add a boolean "clockwise-angles" property to GimpDial, which, when
set, causes the dial legs' angles to be measured clockwise, rather
than counter-clockwise. The property is FALSE by default.
Rename the "clockwise" property, which controls the direction of
the measured delta between the two angles, to "clockwise-delta", to
avoid confusion, and adapt the rest of the code.
gegl:recursive-transform-plus is an extension of
gegl:recursive-transform, allowing multiple transformations to be
applied simultaneously; it will eventually be merged back into
gegl:recursive-transform. See GEGL commit
9829bc22e85526d789c4e80c05949d4c6202a207.
The GUI uses the new TRANSFORM_GRIDS controller, allowing adding,
duplicating, and removing transformations, and controlling them
through on-canvas transform grids.
... which is similar to the TRANSFORM_GRID controller, supporting
multiple transformation matrices.
Implement the TRANSFORM_GRIDS controller in GimpFilterTool, using
the new GimpToolWidgetGroup to display multiple transform grids.
After the switch of random-seed properties from INT to UINT, their
upper bound results in a negative value when converted to a
gint32, causing a CRITICAL in the call to g_random_int_range().
Use g_random_double_range() instead, which has enough precision to
accurately represent all values in the range, and round the result.
...only remembers horizontal radius, duplicates it for vertical
Keep a list of the GUI's chain buttons around. When changing the
entire config object like on reset or selecting saved settings, unlik
them all after remembering their "active" state, and after changing
the settings activate the ones that were active before, but only if
the values they link are still the same.
In case of error in gimp_prop_eval_parse_reference(), we were obviously
freeing the string which had just been allocated by g_strdup(), not the
pointer to this string.
Thanks to Massimo for raising this issue.
gegl:recursive-transform applies a transformation recursively to
an image. The custom GUI allows controlling the transformation
matrix using a transform-grid controller, added in the previous
commit.
... which allows ops to create a transform-grid widget, similar to
the unified-transform tool, which can be used to control a
transformation matrix.
Implement the transform-grid controller in GimpFilterTool.
gegl:color-to-alpha-plus was merged back to gegl:color-to-alpha in
GEGL, so we can change the custom propgui constructor to refer to
gegl:color-to-alpha.
Remove the threshold-range compression toggle and logic, since the
corresponding property was removed in GEGL.
When set, the opacity and transparenct threshold range is compressed
to the minimal extent that would produce different results.
When the property is toggled, update the opacity and transparency
thresholds, such that the result remains the same.
Add a specialized propgui constructor for gegl:color-to-alpha-plus.
This op is currently in the workshop, but is set to be merged with
the existing gegl:color-to-alpha, so we omit the '-plus' from file-
and function-names.
The new op adds a pair of properties to control the radii, relative
to the selected color, below which colors become fully transparent,
and above which colors remain fully opaque. Allow these properties
to be set by picking a color from the image, and calculating the
radius accordingly.
Allow propgui constructors to specify an (optional) callback function
when creating pickers, to be called when a color/coordinate is picked,
similarly to controller callbacks.
Implement picker callback support in GimpFilterTool. When the active
picker has an associated callback function, call it instead of the
class's color_picked() function.
Add lots of "#include <gegl.h>" to .c files that miss it, which is
now necessary, since this commit adds a Babl* parameter in
propgui-types.h.
Add parameters, controlling the behavior and appearance of sliders,
to GimpControllerSlider. The macro GIMP_CONTROLLER_SLIDER_DEFAULT
expands to a nonmodifiable lvalue of type GimpControllerSlider,
whose members are initialized with the most common default values.
Handle the new parameters in GimpToolLine. A slider using the new
"autohide" mode is only visible when selected, or when the cursor
is close enough to the line, between the slider's min and max
values, and no other handle is grabbed or hovered-over.
... so that when the base and balance sliders overlap, the base
slider is the one that's picked, since the balance slider is
constrained by the base, but not the other way around.
which is the same as g_object_class_list_properties() but filters
out the properties for which we don't want to create a GUI.
Use it in gimp_prop_gui_new().
Switch the gegl:spiral prop gui from using a line controller to
a slider-line controller, and use sliders to control the "balance"
and "base" properties.
Add supprt for placing sliders on a GimpToolLine -- handles that can
be dragged over the line. The sliders are accesible through a new
"sliders" property, and via the gimp_tool_line_{get,set}_sliders()
functions.
Add a slider-line controller, which works like a line controller,
but whose callback also supplies/takes an array of sliders.
Note that the data type for individual sliders is called
GimpControllerSlider (in particular, it's not line specific), so
that we may use it with other controller/tool-widget types in the
future.