Commit Graph

43847 Commits

Author SHA1 Message Date
Ell
21ce9d6b8f Issue #4967 - Crash when cancelling filters with aux inputs
In gimp_filter_tool_real_config_notify(), make sure the incoming
pspec in not NULL before accessing it.
gimp_operation_tool_aux_input_notify() may emit "notify" on the
config object with a NULL pspec.

(cherry picked from commit 19c0d43c25)
2020-04-18 17:53:20 +03:00
556397cba1 Update Swedish translation 2020-04-15 01:06:18 +00:00
Ell
1878313511 app: maintain common settings when editing Brightness-Contrast/Levels as Levels/Curves
When converting Brightness-Contrast to Levels, and Levels to
Curves, make sure to copy the common settings as well as the
operation-specific settings.

(cherry picked from commit 987447f18f)
2020-04-14 18:03:47 +03:00
Ell
c2ee2553ce app: reset common settings when resetting Curves tool
In GimpCurveTool, don't reset the curve config manually, and rather
let GimpFilterTool reset it, only maintaining the active channel
(similarly to GimpLevelsTool), so that the common operation
settings are also reset.

Note that this also avoids keeping the channel curve types, which
should work correctly after last commit.

(cherry picked from commit 88689515ab)
2020-04-14 18:03:31 +03:00
Ell
cd1f531cde app: when copying GimpCurve, don't overwrite points from samples
In gimp_curve_config_copy(), make sure to copy the curve type
*before* the points, so that, when changing the type from FREE to
SMOOTH, we don't overwrite the copied points with interpolated
samples.

(cherry picked from commit 56693a8393)
2020-04-14 18:03:12 +03:00
d7200ae55e NEWS: update. 2020-04-13 16:49:55 +02:00
d059b7c9a3 app: cleanup previous commit from !31.
Instead of waiting forever for minor trailing whitespace cleanup, I
merged the patches and do a separate commit.
2020-04-13 16:49:34 +02:00
cc6e21e05b app: add color index label to the palette editor. 2020-04-13 14:26:13 +00:00
2dd2ba1bfb plug-ins: file-psp.c fix incompatible pointer type 2020-04-13 12:55:52 +00:00
97549081fd gitlab-ci: libspiro is needed to run gegl.
`gegl` binary is being run for icon generations on gimp-2-10.
2020-04-13 14:22:45 +02:00
8e5e268bf6 .gitlab-ci: sync the gimp-2-10 CI with master.
It's minimal. I've not added CLang build or the Windows cross-builds
yet. Probably later. :-)

Only dependency changes from master are: GTK+2 instead of GTK+3.

Also GIMP is now built with --disable-python because even though Python
2 is still in Debian testing, apparently python-gtk2 is not packaged
anymore. So let's unfortunately drop this in our CI for simplicity sake.

This makes both master and gimp-2-10 CI now very similar, hence will
make it easier to fix one or the other.
2020-04-13 13:54:43 +02:00
a66f88287c app: add missing includes for windows
(cherry picked from commit 46f706a403)
2020-04-13 11:57:38 +02:00
b26dfb6fb6 Update Ukrainian translation 2020-04-13 06:54:42 +00:00
Ell
78983e4b59 app: apply "linear" setting when repeating curves and levels
In gimp_operation_config_sync_node(), when the operation has a
property of the config object's type, don't skip the other
properties.  This makes sure to set the "linear" property of
GimpOperation{Curves,Levels} according to the config object.  We'd
previously done it manually in GimpFilterTool, but the setting was
not applied when repeating the filter.

(cherry picked from commit 0096e563f6)
2020-04-13 02:07:16 +03:00
f5e4b1770e .gitlab-ci.yml: remove pygtk from GIMP dependencies list
pygtk is being removed from distros, and this breaks our gimp-2-10 CI
build.

Removing it from the dependencies should make the build work
again, but means we lose building of the pygimp modules.
2020-04-13 00:04:47 +02:00
05e8e98a2e plug-ins: screenshot-win32.c forbids mixed declarations and code 2020-04-12 20:36:14 +00:00
192efa80e8 Update Polish translation 2020-04-12 10:32:36 +02:00
Ell
1b3c945488 app: don't grab keyboard focus when showing tool-button menu on hover
In GimpToolButton, don't let the group menu grab the keyboard focus
when showing it on hover.  This avoids accidentally reassigning the
keyboard shortcut of the selected tool.
2020-04-11 12:38:21 +03:00
91e49e0111 Update Turkish translation 2020-04-10 17:50:34 +00:00
573efb3fbc Update Catalan translation 2020-04-10 16:02:47 +02:00
a7191ba7ca Fixes to Catalan translation 2020-04-10 14:31:11 +02:00
3c3f239852 Update Russian translation 2020-04-10 03:07:26 +03:00
3a3a5ff1ec NEWS: update. 2020-04-09 16:02:20 +02:00
Ell
7e673f4e52 plug-ins: add support for exporting 16-bit PSDs
In file-psd, add support for exporting high bit-depth images.  This
is currently limited to 16-bit images, since 32-bit images seem to
have a different structure (our loading code can successfully load
32-bit images exported by the plug-in, but not actual 32-bit PSD
files saved in Photoshop.)  Higher bit-depth images are saved as
16-bit for now.

Note also that when saving a linear image with a built-in linear
profile the result is wrong (the image is exported with a linear-
TRC profile, but the data is perceptual), but this is a general
problem we have to fix, not restricted to the PSD plug-in.

(cherry picked from commit 9099f317bc)
2020-04-09 01:19:10 +03:00
5fa235c192 Update Catalan translation 2020-04-08 22:48:01 +02:00
bb030f4584 NEWS: update. 2020-04-08 20:17:01 +02:00
f31f9b5e21 Issue #4919: PDF: Order of pages reversed when opening and closing.
Let's go with the logics "bottom layer is first", which is also the
logics in animated formats. Hence changing the layer order on loading
multi-page PDF.

(cherry picked from commit 809e79f37a)
2020-04-08 20:13:55 +02:00
f02ca95b47 Update Spanish translation 2020-04-08 13:58:26 +00:00
Ell
ba7d2f4f87 app: rename "Fade" section of GimpFilterTool to "Blending Options"
... and GIMP_LAYER_MODE_CONTEXT_FADE to
GIMP_LAYER_MODE_CONTEXT_FILTER.

(cherry picked from commit 38059dc5fd)
2020-04-08 16:00:10 +03:00
Ell
8d08f4a672 app: in filter tools, remember state of the fade and color-options expanders
In GimpFilterTool, remember the last expanded state of the color-
options and fade expanders.
2020-04-07 19:42:48 +03:00
Ell
a643fc2ad1 app: add "Fade" options to filter tools
As per commit ed7ea51fb7, reintroduce
the "Fade" functionality for filters, by incorporating it directly
into GimpFilterTool.

Add "mode" and "opacity" options to GimpOperationSettings, and add
a corresponding "Fade" expander to the GimpFilterTool dialog
allowing to control them.

Reintroduce the FADE layer-mode context, and use it to mark the
layer modes avaialable for fading.
2020-04-07 19:42:48 +03:00
Ell
1a41acecf2 app: apply common operation settings when reapplying a filter
Add a new gimp_drawable_apply_operation_with_config() function,
which takes an operation node together with a config object, and
applies the operation using the config options, including both the
operation-specific options, and the common GimpOperationSettings
options.

Use the function in gimp_gegl_procedure_execute(), so that
reapplying a filter takes the common operation settings used
originally into account.
2020-04-07 19:42:48 +03:00
Ell
bdbce2d235 app: in GimpFilterTool, store common settings in GimpOperationSettings
Remove the common operation settings from GimpFilterOptions, and
instead, in GimpFilterTool, store these settings in the operation's
config object, which is now a GimpOperationSettings subclass, as
per last commit.
2020-04-07 19:42:48 +03:00
Ell
9e5fabf8a0 app: add GimpOperationSettings
Add a new GimpOperationSettings class, to be used as a base class
for all operation-config types.  The class provides options common
to all operations (namely, the clipping mode, input region, and
color options), which were previously stored in GimpFilterOptions,
and were therefore bound to the filter tool, instead of being
stored as part of the operation settings; as a result, these
options would have no effect when reapplying a filter, or when
restoring a preset.

The GimpOperationSettings options do not affect the operation
node, but rather the associated GimpDrawableFilter object.  The
class provides a gimp_operation_settings_sync_drawable_filter()
function, which applies the options to the filter.

Modify all custom and auto-generated operation-config types to
derive from GimpOperationSettings, and modify the GimpConfig
functions of the former to account for the GimpOperationSettings
properties, using a set of protected functions provided by the
class.
2020-04-07 19:42:48 +03:00
Ell
6c0326a4fa app: add gimp_gegl_node_has_key()
... which determines if a node's operation-class has a specific
key, and can be used instead of gimp_gegl_node_get_key() when only
existence is important, to avoid compiler warnings.

Update the rest of the code to use the new function.
2020-04-07 19:42:48 +03:00
Ell
2bd0b77ad0 app: use gimp_drawable_supports_alpha() in GimpDrawableFilter
... instead of GIMP_IS_LAYER()
2020-04-07 19:42:48 +03:00
Ell
80fd7386e2 app: use gimp_drawable_filter_get_format() in GimpFilterTool
... to set the visibility of the clipping-mode combo based on the
filter's actual output format, instead of the drawable format.
2020-04-07 19:42:48 +03:00
Ell
9906efd28a app: add gimp_drawable_filter_get_{drawable,operation,format}()
... which return the filter's drawable, operation, and output
format, respectively.
2020-04-07 19:42:48 +03:00
58e5b57492 Update Chinese (Taiwan) translation 2020-04-07 00:49:19 +00:00
a813c0db3a Update Chinese (Taiwan) translation 2020-04-07 00:45:48 +00:00
6d442eb76e Update Chinese (Taiwan) translation 2020-04-07 00:40:54 +00:00
63ca72c84f Update Swedish translation 2020-04-06 18:36:51 +00:00
4af498496a Fixes to Catalan translation 2020-04-05 21:04:47 +02:00
d332b1bd8d Update Polish translation 2020-04-05 12:20:13 +02:00
ebd89523bb Update Ukrainian translation 2020-04-05 06:52:42 +00:00
c82bf2978a app: make version + revision string translatable.
Also add some comment for translators on this string and another.
Thanks to Piotr Drąg for commenting on these.

(cherry picked from commit 023919d606)
2020-04-04 16:41:38 +02:00
d942908a3b Updated Italian translation 2020-04-04 01:53:13 +02:00
2484871cbc plug-ins: do not use strcpy() when src and dest overlap.
I don't reproduce these build warnings in my build but frogonia reported
them:

> warning: 'strcpy' accessing 1 byte at offsets 0 and [0, 2147483645] may overlap 1 byte at offset 0 [-Wrestrict]

And indeed the man of strcpy() clearly states that "The strings may not
overlap" (which is clearly not guaranted in current code as we don't
know the size of what's after the substring).
strncpy() might have done the trick as it doesn't say anything about
possible overlap or not, but let's just use memmove() instead where it
is clearly written that memory areas may overlap (note that bcopy() as
proposed by ankh would have also done the trick, but it is marked as
deprecated).

(cherry picked from commit 291af71e95)
2020-04-04 01:13:12 +02:00
19618a5b82 NEWS: update. 2020-04-03 20:52:42 +02:00
7665228bdb Issue #4487: change "Save color values from transparent pixels"…
… defaults to FALSE for PNG, TIFF.
The logics is that in most case, when alpha is 0, you don't expect color
to be retrieved and some people were bothered by this when erasing data
with eraser tool or selection deletion.

For the WIP image as well as for XCF format, we definitely want to keep
color data as there are workflows where you would want to erase/unerase
pixels subtly (selection also are not binary and should not be expected
to erase color data on layers with alpha channel). So we want to keep
the non-destructive behavior there.
Yet for export formats, going for "deleting what looks deleted" is a
valid approach, especially as it has been argued that experienced users
would know how to read and change the format options (and these
experienced users are likely the ones who may have valid reasons to want
pixels with full transparency to keep color values).
PNG and TIFF were the only 2 formats where I see such options, so
changing the default for these 2 plug-ins.

(cherry picked from commit 105c4efc8b for
the TIFF one and adapted to gimp-2-10 code for PNG)
2020-04-03 20:17:37 +02:00