Commit Graph

43925 Commits

Author SHA1 Message Date
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
168426a7b0 Issue #4904: GIMP startup SLOW due to failed access to…
… oscp-router0[12].gnome.org.

The file was opened asynchronously through g_file_read_async() but the
actually reading from a GFileInputStream was actually done in the
callback, in the main thread. So it may be possible that file is
accessible but connection is very slow or non-reliable and actual
reading would block the main process. I am assuming this is what may
have happened for this reporter.

Instead let's use g_file_load_contents_async() which does the file
opening, reading and closing all in the asynchronous task, hence would
not slow down anything even if the remote resource is unavailable or
connection is very slow.

(cherry picked from commit cc16ec5f9f)
2020-04-03 19:33:03 +02:00
Ell
64603c2ce6 Issue #4895 - Crash when dragging a dockable dialog
Apparently, the "drag-begin" signal of dockbook tabs can be raised
multiple times when a drag begins (this seems to happen randomly,
and rarely -- possibly a GTK bug).  In
gimp_paned_box_drag_callback(), which gets called in response, make
sure not to leak the corresponding idle source in this case, which
can lead to a segfault if the widget is destroyed before the idle
is run.

(cherry picked from commit 6bae5d8cf7)
2020-04-03 20:05:49 +03:00
ace03e5bc0 Updated Italian translation 2020-04-03 18:01:50 +02:00
927cea860a Updated Italian translation 2020-04-03 15:14:27 +02:00
Ell
b5e88ab95a app: regenerate config-enums.c 2020-04-02 22:32:09 +03:00
Ell
17e14487b8 app: add missing change to gimpdrawablefilter.c 2020-04-02 22:23:00 +03:00
c3f93e5fef app: run gtk_widget_show() on the new checkbox.
It was unneeded on master, surely because there must be a
gtk_widget_show_all() run somewhere down the line.

Also reuse the button widget (not so important, but while I'm at it).
2020-04-02 18:25:34 +02:00
Ell
d35f8c67e7 app: add missing changes to last commits
(cherry picked from commit 491dc85242)
2020-04-02 19:18:22 +03:00
Ell
122d4b6f05 app: don't detroy cached data when disabling filter-tool preview
In GimpFilterTool, use gimp_drawable_filter_set_preview(), added in
the previous commit, to toggle the filter's preview, instead of
removing and re-adding the filter.  This avoids destroying cached
results when disabling the preview, allowing to quickly toggle the
preview on and off to compare the result.

(cherry picked from commit 912b36a8f8)
2020-04-02 19:04:53 +03:00
Ell
1da36f32a1 app: add gimp_drawable_filter_set_preview()
... which allows enabling/disabling the filter's preview, without
destroying cached data.

(cherry picked from commit 7ec033d896)
2020-04-02 18:57:12 +03:00
Ell
98e1f6a846 app: rename gimp_drawable_filter_set_preview() to _set_preview_split()
... in preparation for next commit.

Update GimpFilterTool accordingly.

(cherry picked from commit 616530e235)
2020-04-02 18:57:11 +03:00
Ell
3d727809da app: add gimp_applicator_set_active()
... which allows temporarily turning the applicator into a NOP,
without destroying cached data.

This commit also improves gimp_applicator_set_{src,dest}_buffer().

(cherry picked from commit e324e2d4b3)
2020-04-02 18:56:15 +03:00
9f04d96d9b Updated Italian translation 2020-04-02 11:37:02 +02:00
281b480d62 Update Ukrainian translation 2020-04-01 19:35:02 +00:00
825b2a7c91 NEWS: update. 2020-04-01 21:25:28 +02:00
16678f4db0 app: make new feature delete-pixels in Crop tool FALSE by default.
Better have the non-destructive behavior by default.

(cherry picked from commit 6a972786d9)
2020-04-01 21:17:59 +02:00
d5fc3e8009 app: leave locked pixels alone when cropping
Cropping tools will no longer discard layer data that falls out of the
crop region if the layer's pixels are locked

(cherry picked from commit 9a9e2e9a19)
2020-04-01 21:17:58 +02:00
824a5a4580 app: make deletion of cropped pixels in crop tool optional
Adds a new "Delete cropped pixels" toggle to the crop tool options,
to allow turning off the deletion of layer data that falls out of the
crop region.

(cherry picked from commit ee97c25b87)
2020-04-01 21:17:57 +02:00
3689332483 Update Ukrainian translation 2020-04-01 18:30:29 +00:00
f2e46deb73 NEWS: update. 2020-04-01 18:24:52 +02:00
b8c4e936eb Issue #4871: Plug-ins not translated.
Revert "app: also localize LC_TIME to GUI language."
This reverts commit a4e65ac836.

LC_TIME format apparently does not accept the broader format with just
the lang part, for instance "fr". The region is necessary, like "fr_FR".
In our supported languages, we were mostly using lang only except for a
few langs where we support regional variants.
This makes sense as time format may be quite different depending on
regions (dates are quite different in GB vs US, though that was actually
one of the cases where we were using accurate locale format).

And the main issue is that it was not only breaking time localization.
Normal string localization (LANGUAGE) got somehow broken as well by
broken LC_TIME.

Anyway for now let's just stick to whatever OS-set time format (even
though it may differ from GIMP Preferences-set language defaults).

(cherry picked from commit 39890a49eb)
2020-04-01 18:13:31 +02:00
1b14b13e40 app: no generic comment when no revision comment set.
After discussing with Schumaml and Houz on IRC, let's just drop the
generic comment which may be confusing and is probably unecessary,
especially now that I write the revision number (present and new ones).
So let's just assume people understand that they should update, even
when GIMP version stays the same (this was the case I was the most wary
about, that people think the notification is an error as since they have
the last version, they don't have to update GIMP).

I hesitated to at least leave just the simple "It is recommended to
update." sentence but after much hesitation, let's go with no generic
comment at all. The download button by itself should suffice.

Of course, when a specific revision comment is set in
gimp_versions.json, it is still displayed.

(cherry picked from commit 56ffa2fd11)
2020-04-01 16:47:54 +02:00