The value descriptions of GimpGradientColor,
GimpGradientSegmentColor, and GimpGradientSegmentType enums appear
in the on-canvas gradient editor UI, as combo-box items in the tool
GUI overlay. Since we want to keep the overlay as small as
possible, we previously used abbreviations for these descriptions
(e.g., "FG (t)", instead of "Foreground (transparent)").
Replace the abbreviated descriptions with unabbreviated ones, and
move the abbreviations to the "abbrev" parameter. This way we get
the abbreviated version in the combo-box, and the full version in
the combo-box's menu.
The "layout" proerty controls the combo-box layout (but not its
menu layout), and can be one of:
- ICON_ONLY: Only show icons.
- ABBREVIATED: Show icons and abbreviated labels (or full
labels, when there is no abbreviation).
- FULL: Show icons and full labels. Default.
Avoid reconstructing the combo's cell-layout when the menu is
shown/hidden, by maintaining the combo's cell-layout and the menu's
cell-layout separately (probably a terrible hack, but one we already
use :P).
Update the dprod production of generated enum files to include
abbreviated value descriptions, as per the previous commits.
Add a comment for translators above the abbreviated descriptions,
specifying the full description they abbreviate.
Add an "@if (<cond>)@ <text> @endif@" conditional-inclusion
construct to all productions, which expands to <text> if <cond> (a
perl condition) is true, or to nothing otherwise.
Allow enum files to specify abbreviated value descriptions, using
an 'abbrev="foo"' comment, and add a @valueabbrev@ substitution for
vprod and dprod, which expands to the corresponding abbreviation
(or to NULL, if no abbreviation is specified for the value).
Add support for specifying an abbreviated description for enum/
flags values, which can be used in contexts where the full
description is too long.
Since the exact layout and size of Gimp{Enum,Flags}Desc is part of
the ABI, we can't simply add a field to these structs to hold the
abbreviated description. Instead, we use the fact that entries
with a repeated value in the value descriptions array are ignored,
and that the array is NULL terminated (in particular, that all non-
NULL entries are followed by at least one additional entry), and
specify the abbreviation in the "value_desc" field of the entry
that immediately follows the initial entry for a given value,
setting the "value" field of both entries to the same value.
Right now this behavior is undocumented, so there is no proper way
to specify abbreviated descriptions in the API, and is only meant
to be used in generated enum files.
Temporarily disable multithreading for GimpOperationLayerMode, to
avoid the deadlock. The environment variable
GIMP_MULTITHREADED_COMPOSITING can be set to reenable it, for the
sake of debugging.
I realize that on Fedora 27, the output of `darktable --version` is:
"this is darktable darktable-2.2.5-4.fc27"
This is different from the expected output in our plug-in ("this is
darktable 2.2.5"). I assume this version string can be customized and
distribution packagers will use the capability. So a regular expression,
in a slightly more flexible fashion would be better. I still assume that
the version string with start with "this is darktable", but then I
accept any non-number string until I reach a common major.minor.patch
version-looking string.
This reverts commit 4bd118ec8a.
The mutex introduced by the above commit should no longer be
necessary, after GEGL commit
8b034c437b0162b26f85eb80867914977ac3cf57.
When the group's offset changes, update the item's offset *after*
updating the group's offset node, so that the item's offset nodes
and the group's offset node are in sync when the corresponding
"notify" signals are emitted.
Same as for the color tags issue, short labels look much better in
menus. On the other hand, the longer description needs to be as a
tooltip, otherwise there is not enough information in the action search
to distinguish one action purpose from another.
... with several threads
Commit d8ae581703 didn't go far
enough in protecting GimpTileBackendPlugin against race conditions.
The underlying GimpTile cache is shared across all drawables, so we
must use a common lock for all instances of GimpTileBackendPlugin,
instead of one per instance.
Do just that -- replace the per-instance mutex of
GimpTileBackendPlugin with a global one. This makes
GimpTileBackendPlugin instances thread-safe w.r.t. themselves, and
w.r.t other GimpTileBackendPlugin instances. However, we don't aim
to make GimpTileBackendPlugin thread-safe w.r.t. other libgimp
functions at this point, since the original API has never been
thread-safe.
It is possible to trigger a heap overflow while opening a malicious
pattern due to integer overflows.
The validation is adopted from plugin-parser. It also takes a proper
cast to gsize to avoid integer overflow in size calculation.
This reverts commit 189a474502.
As Mitch notes, this does not look that good in the menus. As for the
action search, since the tooltip is still shown below, the shortness and
duplication of the action labels make it less a problem.
...after exporting the image
Call gimp_image_name_changed() in both gimp_image_clean_all() and
gimp_image_export_clean_all() so we clear the cached displayed URI in
all cases, even if this means we're emitting "name-changed"
redundantly some times.
When a single blend-tool action adds and removes the same gradient
stop, restore the original gradient, rather than actually adding
and removing the stop, so that the affected midpoint returns to its
original state at the beginning of the action, rather than being
reset (and, consequently, so that the redo stack isn't lost.)