Commit Graph

21285 Commits

Author SHA1 Message Date
Michael Natterer 6e971a3fe2 app: remove the <Toolbox> compat menu path for plug-ins
Plug-ins will now get an error when trying to register something
in <Toolbox> which has been deprecated for ages.
2018-07-10 11:49:05 +02:00
Michael Natterer aeec0f7f49 app: small improvement to previous GimpPaletteEditor commit 2018-07-09 22:12:55 +02:00
Sergio Jiménez Herena ea27fd912c app: add color index label to the palette editor. 2018-07-09 20:04:09 +00:00
Michael Natterer 926dc070ef app, libgimp*: make user visible color model labels consistent
- "LCh" intead of "LCH"
- "CIE LCh" instead of "CIELCh"
- "HSV Hue" instead of "Hue (HSV)" for all models/components
2018-07-08 16:15:13 +02:00
Michael Natterer 6c3b1112be app: make the rectangle options a bit narrower, still too wide... 2018-07-08 14:45:48 +02:00
Michael Natterer 370680f9bc Issue #1805 - Sample Points keep resetting themselves to "Pixel"
Don't destroy the color frames when the number of points changes.
Instead, simply hide them so they keep their color model, but add an
upper limit of an arbitrary number of 16 frames to keep around.
2018-07-07 19:17:58 +02:00
Jehan 22099db280 app: new GimpExtensionDetails widget.
The extension dialog will show details about an extension (long
description, screenshot, upstream URLs, etc.) with this widget.

Update the GimpExtensionList to send a "extension-activated" signal on
double click, and make the extensions dialog react on it to display the
extension details for the activated extension.

This is all still mostly a skeleton GUI, but it is starting to get into
shape.
2018-07-07 16:10:51 +02:00
Jehan 869f345ff0 app: new GimpExtensionList widget.
This is used to show the user/system or uninstalled extensions.
2018-07-07 16:10:51 +02:00
Jehan ff12c2d903 app: a skeleton for the extension GUI.
This is using GTK+3 widgets, so I make sure to keep it well separated
from core code. The gimp-2-10 version will have to rework the GUI, but
the GtkListBox and GtkSwitch are nice and make things easier, so it is
worth using them here).
2018-07-07 16:10:50 +02:00
Jehan 20b399e9bf app: add some GimpExtension and GimpExtensionManager API.
To be used in the next commit.
I keep the GUI and core changes well separated in different commits so
that the core is easy to cherry-pick even though I will have to have
different GUI code.
2018-07-07 16:10:50 +02:00
Jehan b9b8676cb8 app: use GIMP_VERSION for version comparison.
GIMP_APP_VERSION does not include the micro version.
Also make version comparison with org.gimp.GIMP mandatory to force good
practice. This way, extension makers will have to advertize the version
of GIMP it works for, which will make a sane ecosystem of working
extensions only (hopefully!).
2018-07-07 16:10:50 +02:00
Ell 49ca383fa4 app, pdb: use gimp_babl_is_valid() in more places
Use gimp_babl_is_valid(), added in the previous commit, to validate
image-type/precision combinations in various functions.
2018-07-06 13:44:57 -04:00
Ell a0a62656d2 Issue #1792 - Xcf file crashing gimp-console-2.10 ...
... (valgrind reports Invalid read)

Add gimp_babl_is_valid(), which takes a GimpImageBaseType and a
GimpPrecision, and determines whether the image-type/precision
combination is valid.  Use this function to validate that loaded
XCFs use a valid type/precision combination, before trying to
create the image.  Otherwise, we get a CRITICAL, and eventually a
segfault, when the combination is invalid.

Use the same function to validate the arguments of
gimp_image_new().
2018-07-06 13:06:46 -04:00
Øyvind Kolås 8f63397ef7 app: gimp:semi-flatten propagate babl space 2018-07-06 15:27:55 +02:00
Øyvind Kolås 11dd90eb89 app: gimp:threshold-alpha propagate babl space 2018-07-06 15:09:18 +02:00
Øyvind Kolås f3a757ff33 app: gimp:set-alpha propagate space 2018-07-06 15:03:37 +02:00
Øyvind Kolås 045328c889 app: gimp:grow propagate babl space 2018-07-06 14:53:16 +02:00
Øyvind Kolås 4d5a967d6a app: gimp:shrink propagate bable space 2018-07-06 14:51:45 +02:00
Øyvind Kolås df4f9e0d9b app: propagate babl space in pointfilter base class 2018-07-06 14:51:23 +02:00
Øyvind Kolås ae2c30ad0e app: gimp:flood propagate babl space 2018-07-06 14:50:08 +02:00
Øyvind Kolås 38b1502024 app: gimp:desaturate propagate babl space 2018-07-06 14:48:26 +02:00
Øyvind Kolås 0b4d41c2ee app: gimp:compose-crop propagate babl space 2018-07-06 14:48:13 +02:00
Øyvind Kolås 5e8a5cf999 app: gimp:border propagate babl space 2018-07-06 14:47:27 +02:00
Michael Natterer 1fc55c1572 app: switch off overlay scrollbars in tool options
and remove the viewport, GtkScrolledWindow adds one automatically now.
2018-07-06 14:24:43 +02:00
Michael Natterer 6a7a010769 app: link tests against APPSTREAM_GLIB_LIBS 2018-07-06 13:26:07 +02:00
Michael Natterer 9b56ca8c1d Issue #1730 - pat file that crashes gimp-2.10
Introduce GIMP_PATTERN_MAX_SIZE (10000) and GIMP_PATTERN_MAX_NAME (256)
and validate pattern dimensions and pattern name length against them.

Add GIMP_BRUSH_MAX_NAME and validate that too.

Also make sure that the names are properly terminated, and some
cleanup.
2018-07-06 13:07:28 +02:00
Michael Natterer 8195a56261 app, plug-ins: move GIMP_BRUSH_MAX_SIZE to gimpbrush-header.h
and use it in the brush file plug-ins.
2018-07-06 12:31:06 +02:00
Michael Natterer e759ce3558 app, plug-ins: clean up gimpbrush-header.h and gimppattern-header.h
Namespace the header structs, s/GBRUSH/GIMP_BRUSH/,
s/GPATTERN/GIMP_PATTERN/.
2018-07-06 12:06:08 +02:00
Ell ed033b1cb5 app: properly shut down gimp-parallel in stable versions
In app_exit_after_callback(), call gimp_gegl_exit() before
gegl_exit() when performing a quick shut-down in stable versions,
so that gimp-parallel, and, in particular, the async thread pool,
is properly shut down.  Code running in the async thread pool may
use GEGL (in particular, now the drawable previews are rendered
asynchronously), and calling gegl_exit() while it's still running
is unsafe.
2018-07-06 02:16:55 -04:00
Ell 114d49510f app: log actions upon activation before emitting "selected" signal
In GimpAction, instead of connecting the action-history log
function to the action's "activate" signal as a user-provided
handler, call it directly from the default handler.

In subclasses of GimpAction, chain to the parent's activate()
function before emitting the "selected" signal, so that we always
log the action in the history before responding to it.

This allows us to avoid the hack in commit
6544ce4301.
2018-07-06 00:08:00 -04:00
Ell b4aece8a27 app: avoid CRITICAL when loading XCF with empty gimp-text-layer parasite 2018-07-05 22:47:45 -04:00
Ell e97f2510dc app: avoid CRITICAL when loading XCF with empty symmetry parasites 2018-07-05 22:47:45 -04:00
Ell d4ff57c793 app: avoid CRITICAL when loading XCF with empty gimp-image-metadata parasite 2018-07-05 22:47:45 -04:00
Ell b54256fbdc app: avoid CRITICAL when loading XCF with empty gimp-image-grid parasite 2018-07-05 22:47:45 -04:00
Ell 8e798e9cf2 app: avoid CRITICAL when writing 0-length data to XCF
In xcf_write_int8(), avoid calling g_output_stream_write_all() with
data == NULL and count == 0, in which case it raises a CRITICAL and
doesn't set bytes_written, which we proceed to use uninitialized.
This can happen, e.g., when writing an empty parasite.
2018-07-05 22:47:45 -04:00
Ell 10f33b080b libgimpcolor, app: gracefully reject empty ICC profiles
In gimp_color_profile_new_from_icc_profile() and
gimp_image_validate_icc_profile(), don't raise a critical when
encountering an empty profile, but rather reject it gracefully with
an error.
2018-07-05 20:38:11 -04:00
Ell f384a0713d Issue #1783 - Xcf file crashing gimp-console-2.10 ...
... (Invalid read reported by valgrind)

In gimp_image_parasite_validate(), don't segfault when validating
a "gimp-comment" parasite of size 0 (i.e., whose data is a 0-byte
array, not an empty string), and just consider it invalid.
2018-07-05 20:38:11 -04:00
Ell 6ebadea7c1 Issue #1783 - Xcf file crashing gimp-console-2.10 ...
... (Invalid read reported by valgrind)

In xcf_read_int8(), avoid calling g_input_stream_read_all() with
data == NULL and count == 0, in which case it raises a CRITICAL and
doesn't set bytes_read, which we proceed to use uninitialized.
This can happen, e.g., when reading an empty parasite.
2018-07-05 20:38:11 -04:00
Ell 6544ce4301 app: fix potential segfault in gimp_action_history_activate_callback()
In gimp_action_history_activate_callback(), bail if history.gimp is
NULL, instead of dereferencing it.  This can happen if GIMP is shut
down during the execution of a temporary procedure, such as a
script-fu script.  See the code comment for details.
2018-07-05 13:35:25 -04:00
Ell a96264b1b7 app: add gegl:stereographic-projection (little planet) to the menus 2018-07-05 09:51:41 -04:00
Ell 450e61f853 configure.ac: require GEGL >= 0.4.5 2018-07-05 09:51:40 -04:00
Michael Natterer a62fdce55a configure.ac: require GEGL >= 0.4.4 2018-07-04 12:44:48 +02:00
Michael Natterer e27e783f88 Issue #1748 - Crash when parsing currupt tool preset
Bail out with an error instead of crashing when the tool options type
name is empty.
2018-07-04 01:52:19 +02:00
Michael Natterer 7db59e7af9 Issue #1719 - GIMP crashes with an invalid pluginrc
Fix 3 more crashes caused by accepting broken input, spotted by
Massimo.
2018-07-04 00:17:24 +02:00
Michael Natterer 17429c585f app: undeprecate GimpDisplayXfer, no more gdk_cairo_create() 2018-07-03 23:26:41 +02:00
Michael Natterer 716412a807 app: undeprecate GimpStatusbar
The call to gtk_container_resize_children() was probably completely
useless in GTK+ 3.x anyway.
2018-07-03 23:25:24 +02:00
Michael Natterer ab17727d44 app: use GdkRGBA instead of GdkColor for text tags 2018-07-03 22:31:32 +02:00
Michael Natterer b6c099c4b9 app: fix width of GimpThumbBox' thumbnail generation progressbar
using CSS and GTK_ALIGN_FILL. The progress is currently not visible,
there is a bug in Adwaita that is about to be fixed upstream.
2018-07-03 19:43:05 +02:00
Michael Natterer 7efb8576a1 app: prepare gimpdisplayshell-selection for undeprecation
with a patch that is mergable to 2-10.
2018-07-03 19:43:05 +02:00
Ell b8e08cddbc app: fix GimpMeter history-graph painting when clipped
In GimpMeter, use cairo_path_extents() for getting the history
graph's extents, rather than cairo_clip_extents(), since the latter
may also include clipping applied by GTK.
2018-07-03 10:31:07 -04:00