Commit Graph

40764 Commits

Author SHA1 Message Date
Ell 1910ff8b1a app: warn when alpha-only painting has no effect
Add a GimpPaintTool::is_alpha_only() virtual function, which
subclasses can override to indicate whether painting only affects
the alpha channel (assuming FALSE by default).  Override the
function in Gimp{PaintBrush,Ink,Clone}Tool, returning TRUE when the
current paint mode only affects the alpha (as per
gimp_layer_mode_is_alpha_only(); see the previous commit,) and in
GimpEraserTool, returning TRUE when the target drawable has an
alpha channel.

When the function returns TRUE, and the target drawable doesn't
have an alpha channel, or the alpha channel is locked, show a BAD
cursor modifier, and raise an appropriate warning when attempting
to paint.
2018-05-07 16:53:29 -04:00
Ell 2c58598172 app: add gimp_layer_mode_is_alpha_only()
... which determines if a layer mode's blend function only affects
the alpha, maintaining the backdrop's color.  This is currently
true only for ERASE, SPLIT, and ANTI_ERASE modes.
2018-05-07 16:53:29 -04:00
Ell 2e68088c35 app: use gimp:normal instead of gegl:over in gimp_gegl_apply_cached_operation()
When the operation doesn't have an input pad, composite it over the
input using gimp:normal, instead of gegl:over, for consistency with
the rest of our compositing code (although the result should be the
same).
2018-05-07 14:38:53 -04:00
Ell f3febfe343 Bug 795866 - Transparent gradient on transparent layer ...
... drifts/sharpens when applying additional gradients

In GimpDrawableFilter, don't use gegl:over for operations without
an input pad, since this only works if the filter's mode is
REPLACE.  If the filter's mode is different, in particular, if it's
NORMAL, we end up compositing the operation's output against the
input twice: once in gegl:over, and again in the filter's
applicator.  Notably, this happens for the gradient tool.

Instead, revert commit 5b80d3d3be
(with some additions to avoid constructing unnecessary nodes when
the operation has no input) and simply change the applicator's mode
to NORMAL if the oepration doesn't have an input, and the filter's
mode is REPLACE.
2018-05-07 14:35:40 -04:00
Michael Natterer 7e1df2c8c6 app: add layers/channels/vectors freeze/thaw to gimpplugin-cleanup
so plug-ins cannot thaw what they haven't frozen, and the code
can clean up frozen stuff left behind by crashed or broken plug-ins.

Also redo the cleanup code so it only keeps track of the undo group
counts and freeze counts of what *this* GimpPlugInProcFrame did
itself. That should make it even stricter against broken code that
could mess up internals.
2018-05-07 20:09:07 +02:00
Michael Natterer d87259ccf9 app: fix gimp_gegl_apply_operation() for source OPs
Blend them on top of the source buffer using gegl:over like
GimpDrawableFilter does interactively. Fixes "Repeat Last" and
probably some other stuff for source OPs.
2018-05-07 14:26:26 +02:00
Anders Jonsson a9db2baa4e Update Swedish translation 2018-05-07 09:22:12 +00:00
Michael Natterer 29cf157f69 app: add +gimp_container_freeze_count() which returns the freeze_count 2018-05-07 10:25:45 +02:00
Michael Natterer 1950eda8ab app: fix rendering of the bg_histogram in GimpHistogramView
gimp_histogram_view_draw_spike(): we were shifting the bg_histogram to
the right by accidentially offsetting the 'i' variable, use a local
variable for the loop instead.
2018-05-07 10:17:19 +02:00
Michael Natterer b15f38d21f pdb: add "Since: 2.10" to the newly added freeze/thaw procedures 2018-05-07 10:16:52 +02:00
Ell 7540ce779d Bug 795716 - Wavelet Decompose takes too long to group layers
Use gimp_image_{freeze,thaw}_layers(), added in the previous
commit, to suppress updates to the Layers dialog while constructing
the decomposed layers, which significantly speeds up the operation
if the dialog is mapped.
2018-05-07 02:56:10 -04:00
Ell 40e3406b91 pdb: add gimp-image-{freeze,thaw}-{layers,channels,vectors}
These procedures freeze/thaw the corresponding containers of the
image, allowing plug-ins that perform many changes affecting any of
these containers to suppress updates to the corresponding dialogs,
significantly improving performance.
2018-05-07 02:56:10 -04:00
Ell 88c63420e8 app: ignore gimp_container_view_{select,activate,context}_item() ...
... while the container is frozen

In GimpContainerView, do nothing in response to a
gimp_container_view_{select,activate,context}_item() call while the
view's container is frozen.  While the container is frozen the view
is empty, and these functions can segfault.
2018-05-07 02:56:10 -04:00
Marco Ciampa dfebe463b1 Updated Italian translation 2018-05-07 07:52:53 +02:00
Piotr Drąg 7daeedf324 Update Polish translation 2018-05-06 19:33:18 +02:00
Ell f5ecc9f859 app, menus: add gegl:spherize to the menus 2018-05-06 07:13:08 -04:00
Ell cdd129110c app, menus: add gegl:recursive-transform to the menus 2018-05-06 07:13:00 -04:00
Daniel Korostil 4b9ce3be58 Update Ukrainian translation 2018-05-06 09:21:39 +00:00
Alexandre Prokoudine bad7b19211 NEWS: translations 2018-05-06 11:30:04 +03:00
Balázs Meskó cc00a64088 Update Hungarian translation 2018-05-06 00:28:01 +00:00
Jehan 31f5d7dc04 Bug 795720 - Change MD5 sums to SHA512 ones.
We should stop using MD5 sums altogether and push forward SHA256/SHA512
hash sums instead. The website is also being updated to display these in
favor of the deprecated MD5 sums.
We are most likely not going to remove previously computed MD5 sums, or
recompute SHA* hashes for older binaries, but at least we should stop
doing MD5 sums of any future binary.
2018-05-06 01:20:09 +02:00
Balázs Meskó 8a105e6038 Update Hungarian translation 2018-05-05 22:59:49 +00:00
Anders Jonsson da77713dd7 Update Swedish translation 2018-05-05 19:32:48 +00:00
Jehan 33a92e2447 app: get rid of gimp_get_backtrace().
It is not used anywhere anymore and can be replaced by the more powerful
gimp_stack_trace_print() (which can also allocate a string containing
the backtrace, hence is a proper replacement call).
2018-05-05 20:18:25 +02:00
Jehan 47a036f750 Bug 795814 - Error saving VERY large file.
g_alloca() is not very advisable, especially when it might be used to
allocate a big chunk of memory at once. It is better to allocate dynamic
memory with malloc(), or in particular with g_try_malloc() which won't
abort the program on failure.
This might be slightly slower (one of the advantages of memory on the
stack, though not even an absolute truth) but probably not by much, if
at all, and it's better to be safe anyway.
2018-05-05 20:13:27 +02:00
Simon Budig 5a048f5b5d imagemap: fix invalid source removal 2018-05-05 20:01:57 +02:00
Jehan 324873c7b8 build: no need for the splash screen patch anymore (was for 2.10.0 RC2). 2018-05-05 18:30:38 +02:00
Jehan 1ef0f50698 build: update nightly and dev flatpak.
In particular a bunch of dependencies were moved to the BaseApp.
Dev flatpak is actually a bit useless now (since last dev release is
older than stable). But I keep the dev manifest around to make it easier
to update for the future when we'll have a new dev release.
2018-05-05 16:12:11 +02:00
Jehan 98a575370c app: add a check on not-NULL string before g_utf8_validate().
Still looking for possible crash case during gimp_font_list_load_names()
(cf. bug 795650). g_utf8_validate() segfaults if called with NULL.
Though looking at pango_font_description_to_string() implementation, it
doesn't look like it would ever return NULL. Yet it is worth
double-checking. We don't load font every second anyway.
2018-05-05 15:55:30 +02:00
Jehan d58f131b59 Bug 795650 - Gimp crashes on start in Windows.
Add more assertion checks (similar to commit d094ab7e56).

This is still not a fix per-se, but at least would make the code a bit
more robust. In particular FcObjectSetDestroy() could crash if somehow
FcObjectSetBuild() had returned a NULL pointer. And obviously
dereferencing a NULL fontset would crash as well.
Now if any of these happened, no fonts would be loaded. But at least
GIMP would not crash.
2018-05-05 15:26:26 +02:00
Michael Natterer b706eaf002 plug-ins: enable metadata loading in file-heif
Do it half-manually for now. Also, there doesn't seem to be metadata
saving API in libhaif.
2018-05-05 14:38:27 +02:00
Balázs Meskó bf2599fe20 Update Hungarian translation 2018-05-05 11:31:26 +00:00
Anders Jonsson a6d4056c12 Update Swedish translation 2018-05-05 11:30:14 +00:00
Anders Jonsson c476eb4312 Update Swedish translation 2018-05-05 11:16:59 +00:00
Michael Natterer 15b9bb1581 plug-ins: port file-heif to GIO 2018-05-05 12:53:39 +02:00
Jordi Mas a22f9fe32b Update Catalan translation 2018-05-05 08:32:18 +02:00
Alexandre Prokoudine 4c004d5e16 NEWS: translations, formatting 2018-05-05 03:18:53 +03:00
Jehan 17ce730591 NEWS: add font loading update.
Also fix a typo.
2018-05-05 02:10:53 +02:00
Alexandre Prokoudine e173aebf76 Update Russian translation 2018-05-05 03:07:13 +03:00
Alexandre Prokoudine 3899276245 NEWS: update 2018-05-05 02:27:35 +03:00
Jernej Simončič 2d3b8f67a8 Installer: optional GIMP debug symbols inclusion 2018-05-05 00:32:46 +02:00
Michael Natterer 7e3fa0c8d8 plug-ins: port file-heif to GEGL, and don't use any deprecated API 2018-05-04 21:14:23 +02:00
Michael Natterer ba149f1759 plug-ins: add HEIF loading/saving plug-in written by Dirk Farin
Thanks a lot to Dirk for contributing this, added him to AUTHORS.

Import the code from https://github.com/strukturag/heif-gimp-plugin.git
as of today. Merged the files into a single-file plug-in. Changed
the code a lot to match our coding style, but only formatting,
no logic changes.

Still uses deprecated GimpDrawable API and no GIO, but I wanted to do
actual code changes separately from the initial import. Also disabled
metadata support because updating that to GimpMetadata was too much
for the initial import.
2018-05-04 20:49:56 +02:00
Ell 07c81abf01 app: fix propgui random seed generation
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.
2018-05-04 13:41:55 -04:00
Michael Natterer 48f6d1b8ee app: avoid scaling GimpCanvasArc to zero, it causes a non-invertable matrix 2018-05-04 11:48:44 +02:00
Ell 2e643e6270 app: cleanly remove log handlers on exit
Remove the log handlers registered in errors_init(), in
errors_exit(), and call errors_exit() before destroying the Gimp
instance, since the log handlers depend on it.  This avoids
segfaulting if a message is logged after destroying the Gimp
instance.
2018-05-03 15:50:29 -04:00
Jordi Mas c692994b98 Update Catalan translation 2018-05-03 21:07:47 +02:00
Jordi Mas 4508a57a52 Update Catalan translation 2018-05-03 20:48:58 +02:00
Anders Jonsson f3ba248b2f Update Swedish translation 2018-05-03 09:24:08 +00:00
Marco Ciampa 35f1bfc1f7 Added Julien Hardelin as documentation author 2018-05-03 01:32:47 +02:00