Commit Graph

40373 Commits

Author SHA1 Message Date
Jehan 65ba879c65 configure: make clearer the test for native GEGL executable.
If running for instance in a cross-compilation, I need to make clearer
the fact we are looking for a native GEGL and also that we are looking
for the executable (used during the build), not the library. This is a
different test as the one for the library with PKG_CHECK_MODULES (which
looks for the target platform's library).
2018-03-09 17:46:02 +01:00
Jehan ca1304da19 plug-ins: make the JP2 loading errors more accurate. 2018-03-09 16:44:13 +01:00
Ell 7e1fd5983c app: fix tooltip of propgui color buttons
Source/target arguments of bind_tooltip() were swapped.
2018-03-08 15:24:21 -05:00
Ell 8d9580fd2b app: update layers-dialog floating-sel attrs/highlight when image changes
Move the button-highlight update to its own function, and call it
when the active image changes, as well as when its floating
selection changes.

Call the floating-selection-changed signal handler when the active
image changes, so that we correctly update its row's attributes.
2018-03-07 10:58:25 -05:00
Ell b1266b2c3f app: #include <string.h> in GimpHighlightableButton
Needed for memcmp().
2018-03-07 09:53:31 -05:00
Ell 378c5d3b87 app: don't highlight layers dialog "new" button when pasting to channel
We disallow creating a new layer from a floating selection when its
associated drawable is a channel, so there's no point in
highlighting the "new layer" button in this case.  Note that the
"layers-new" action remains sensitive, showing an error message if
activated.  Not sure if it's a good thing or not, but whatever.
2018-03-07 09:40:19 -05:00
Ell 7dd373293c app: reduce opacity of GimpHighlightableButton when insensitive 2018-03-07 09:40:19 -05:00
Ell e4c79cb2d6 app: use gimp_cairo_rounded_rectangle() in GimpOverlayFrame
... instead of drawing it the hard way.
2018-03-07 09:40:19 -05:00
Ell 2c6ee43e84 app: highlight "new", "anchor", and "delete" buttons in layers dialog ...
... when there's a floating selection

Layer-dialog interaction is restricted while the image has a
floating selection, which often causes confusion.  Highlight the
three layers-dialog buttons that "finalize" a floating selection --
the "new layer" button, the "anchor layer" button, and the "delete
layer" button -- to indicate that these buttons are used to finish
the paste operation.  The "new" and "anchor" buttons use a green
highlight color, while the "delete" button uses a red highlight
color.
2018-03-07 06:18:21 -05:00
Ell 15883c7be0 app: add gimp_item_tree_view_get_delete_button()
... which returns the editor button associated with the "delete"
action.
2018-03-07 06:18:21 -05:00
Ell 1253964c80 app: use GimpHighlightableButton for GimpEditor buttons
... instead of plain GimpButton.
2018-03-07 06:18:21 -05:00
Ell a12a2344bc app: add GimpHighlightableButton
GimpHighlightableButton is a subclass of GimpButton, which can be
"highlighted" by changing its color to draw attention to it.
2018-03-07 06:18:21 -05:00
Ell a6001f1941 app: add gimp_cairo_rounded_rectangle()
... which draws a rectangle with rounded corners.
2018-03-07 06:18:21 -05:00
Ell efa8040780 app: rename gimp_cairo_foo() functions to follow cairo naming scheme
Really pedantic stuff :)  Rename the functions in gimp-cairo.h to
follow the naming scheme employed by cairo, so that they don't feel
out of place.
2018-03-07 06:18:20 -05:00
Ell 52b0e61001 app: in gimp-spawn.c, add missing #include on Windows
... and improve argument validation.
2018-03-07 01:41:21 -05:00
Ell 1b1fba199a app, libgimp: don't close parent pipes in libgimp; use gimp_spawn_set_cloexec()
In gimp_plug_in_open(), use gimp_spawn_set_cloexec() to prevent the
parent's end of the read/write pipes from being inherited by the
spawned plug-in, instead of passing the corresponding file
descriptors to the plug-in as command-line arguments, and having
gimp_main() close them.

Adding new command-line arguments to plug-ins is problematic, since
their ability to handle them depends on their protocol version,
which is only communicated after the plug-in is spawned.

Regardless, this is much simpler.
2018-03-06 16:31:17 -05:00
Ell cdb541f81b app: add gimp_spawn_set_cloexec()
... which prevents child processes from inheriting a given pipe,
under *nix and Windows.
2018-03-06 16:31:17 -05:00
Ell c6e8dd888c app: fix buffer overflow in gimp_plug_in_open()
Commit b9e629abbb added two more
command-line arguments when spawning plug-ins, but failed to expand
the args array...
2018-03-05 12:50:06 -05:00
Marco Ciampa 89505dc774 Updated Italian translation 2018-03-05 16:41:26 +01:00
Alan Mortensen c03eb86f89 Updated Danish translation of gimp-script-fu 2018-03-05 13:50:04 +01:00
Ell 95af939903 app: verify input argumets in gimp_spawn_async() 2018-03-05 02:55:53 -05:00
Ell e1ed39e3a3 app: in gimp-spawn.c, avoid warning when we don't have vfork() 2018-03-05 02:45:47 -05:00
Ell 86939d847f libgimpbase: in gimp_stack_trace_print(), shuffle some code around
Reap the child *after* we're done reading its output, so that we
can disable ptracing after reading, but before reaping.  This
avoids a window during which the child is gone, but ptracing using
its PID is still allowed.
2018-03-05 02:34:13 -05:00
Ell a1a126c308 libgimpbase: in gimp_stack_trace_print(), clear ptrace permission on exit
Clear the ptrace permission given to the child after it terminates,
so that a future process that happens to have the same PID the
child had can't ptrace us.
2018-03-05 02:24:37 -05:00
Ell b9e629abbb app, libgimp: use gimp_spawn_async() when spawning plug-ins
In gimp_plug_in_open(), use gimp_spawn_async(), added in the
previous commit, instead of g_spawn_async().  See the previous
commit for the rationale.

Since gimp_spawn_async() doesn't provide a mechanism to perform any
cleanup in the child before exec()ing, move the closing of the
parent's end of the read/write pipes from the app to the plug-in's
gimp_main(), passing the relevant file descriptors to the plug-in
through argv.
2018-03-05 01:55:40 -05:00
Ell 0f2df18dde app: add gimp_spawn_async()
gimp_spawn_async() is similar to, but more limited than,
g_spawn_sync().  Unlike the latter, gimp_spawn_async() uses
vfork(), instead of fork(), when possible.

On Linux, a process that uses large amounts of memory (as GIMP may)
can hang during a fork() if overcommitting is enabled, and there's
not enough memroy.  Using vfork() avoids that, since it doesn't
duplicate the parent's address space.
2018-03-05 01:55:40 -05:00
Ell 0f2c966c5f libgimpbase: in gimp_stack_trace_print(), enable ptrace under Yama
On Linux, when /proc/sys/kernel/yama/ptrace_scope is 1, a process
may only ptrace its descendants by default, which prevents the GDB
process spawned by gimp_stack_trace_print() from attaching to, and
producing a backtrace for, the calling process.

Use prctl() with PR_SET_PTRACER, when available, in the parent
process, to allow the child process to ptrace it.
2018-03-05 01:55:40 -05:00
Jehan 73fbb166b3 plug-ins: robuster tests for image types and minor syntax fixes.
Rather than just assuming all non-gray images are RGB, do a bit more
robust check and reject unknown formats. Indeed even though I see we
took care of YUV, e-YCC and CMYK images above (and normally either
converted them to RGB or already exited with an error), I can see that
the OpenJPEG library could still return OPJ_CLRSPC_UNKNOWN or
OPJ_CLRSPC_UNSPECIFIED. Let's be thorough and not assume we got a SRGB
here.
Also add the alpha-variant tests inside their parent image type
respective test. This should not change anything by any logics, but
let's not leave anything for chance to strike us.

Finally minor coding style fixes:
- Add a space before "if|for" and parenthese.
- Remove some spaces after parentheses.
- Get rid of 2 trailing whitespaces.
- Align function call parameters, declarations, assignments…
2018-03-04 18:27:36 +01:00
Darshan kadu 53a7c6c3a3 Bug 792141 - Replace jasper with openjpeg.
Made plug-in support the RGB and grayscale with alpha.

Comment by Jehan: this makes the original branch work finally usable on
some JPEG 2000 images. Support of the format is not complete yet though
but at least the port to OpenJPEG is now in usable test.
2018-03-04 18:26:07 +01:00
Mukund Sivaraman 58a0a65160 file-jp2-load: Switch from Jasper to OpenJPEG library 2018-03-04 18:21:22 +01:00
Piotr Drąg d7e7ab48ba Update Polish translation 2018-03-04 16:34:07 +01:00
Michael Natterer 0c6441619e app: default to GIMP_COLOR_SELECTOR_RED in GimpColorEditor
instead of HSV hue, HSV is not supposed to be the default model any
longer. Bigger color selector cleanup to follow...
2018-03-04 15:44:02 +01:00
Jordi Mas 638ec98a58 Update Catalan translation 2018-03-04 14:43:52 +01:00
Jordi Mas e5add3a776 Update Catalan translation 2018-03-03 19:25:45 +01:00
Jehan c9d9b5535b Bug 794023 - Bad/Double free bugs found by scan-build.
In case of error in gimp_prop_eval_parse_reference(), we were obviously
freeing the string which had just been allocated by g_strdup(), not the
pointer to this string.
Thanks to Massimo for raising this issue.
2018-03-03 16:43:27 +01:00
Jehan 40df83ad71 Bug 794023 - Bad/Double free bugs found by scan-build.
Thanks to Massimo for raising this issue.
2018-03-03 16:27:04 +01:00
Anders Jonsson 77b3837774 Update Swedish translation 2018-03-03 12:09:24 +00:00
Ell 8039582df0 app: add custom GUI for gegl:recursive-transform
gegl:recursive-transform applies a transformation recursively to
an image.  The custom GUI allows controlling the transformation
matrix using a transform-grid controller, added in the previous
commit.
2018-03-01 02:26:54 -05:00
Ell 3985651d26 app: add transform-grid controller to prop-gui
... which allows ops to create a transform-grid widget, similar to
the unified-transform tool, which can be used to control a
transformation matrix.

Implement the transform-grid controller in GimpFilterTool.
2018-03-01 02:26:54 -05:00
Lionel N 827d747fae Bug 400448 - ruler subdivision is wrong for inches
Add ruler subdivisions for feet and yards, the code is still disabled.
2018-02-27 23:27:00 +01:00
Ell b8aeed4774 app: make the GimpSearchPopup entry icon non-activatable
... it doesn't actually do anything.
2018-02-27 03:55:34 -05:00
Ell cd8ea6b3ca libgimpwidgets: in GimpNumberPairEntry, add clear icon
Since the entry behaves differently based on whether the user
provided an explicit input or not, it makes sense to have a button
for clearing the entry.
2018-02-27 03:55:34 -05:00
Ell 45bfa168bf libgimpwidgets: in GimpNumberPairEntry, update font when updating text
... in particular, so that the font is updated correctly when
reverting an invalid string.
2018-02-27 03:55:34 -05:00
Ell 8d2381f6e7 libgimpwidgets: in GimpNumberPairEntry, fix parsing
... to classify strings beginning with a non-digit character as
INVALID, rather than CLEAR.
2018-02-27 03:55:33 -05:00
Dimitris Spingos (Δημήτρης Σπίγγος) 5090f544e4 Update Greek translation 2018-02-27 09:50:12 +02:00
Jehan 8796220434 plug-ins: clean out some lost tabs. 2018-02-26 19:12:50 +01:00
Jehan b671a43a31 Bug 793815 - segmentation fault on a handler using finalized user data.
The bug is very hard to reproduce, probably because it requires specific
timing conditions but this looks like this commit would prevent it.
Apparently the signal handler gimp_container_view_name_changed() may
have been run while the container view (set as user data) was most
likely already finalized, hence leaving an invalid dangling pointer.
Let's just make sure we disconnect this handler (and another) when we
finalize the container view and its private data.
2018-02-26 19:12:50 +01:00
Jehan 479b7e31d0 NEWS: keep up-to-date. 2018-02-26 02:25:00 +01:00
Jehan 796d3cb38b configure: bump fontconfig requirement for all platforms.
In a previous commit, I bumped it for Windows only, where major bugs had
been fixed in recent fontconfig. Yet as Mitch notes, Debian testing has
Fontconfig 2.12.6, so we can simply use the same requirement on all
platforms. No need to make our configuration script over-complicated
with per-platform requirements here.
2018-02-25 23:13:36 +01:00
Jordi Mas f3dd2fd65f Update translation 2018-02-25 22:34:29 +01:00