Commit Graph

39901 Commits

Author SHA1 Message Date
Jehan 986b3fd70a app: remove duplicate include. 2018-01-29 01:48:30 +01:00
Jehan 1b4efd2d5a app, tools: rename app/version.[ch] to app/gimp-version.[ch].
Since commit 9fdf35550b, I removed the GIMP_APP_GLUE_COMPILATION check
because we need to have the whole versioning info from the new debug
widget. It just makes sense to go further and just make this a proper
internal API to get version information.
2018-01-29 01:48:30 +01:00
Alexandre Prokoudine dd5be53836 Update Russian translation 2018-01-29 03:19:06 +03:00
Jehan a56797f33a NEWS: keep up-to-date. 2018-01-29 00:37:08 +01:00
Ell 1d67e0abcf app: In GimpPaintTool, swap get_line_status() coordinates
They got swapped by commit
2069496af3, reporting the angle in
the reverse direction.
2018-01-28 17:28:40 -05:00
Ell b40a64aab3 build: add Greek translation to the Windows installer 2018-01-28 17:11:22 -05:00
Ell c9ceccdfb2 po-windows-installer: technical fix to the Greek translation
ender's name can't be used verbatim in the encoding used for the
Greek translation.  Use the ASCII version of his name.
2018-01-28 17:11:22 -05:00
Michael Natterer 04b4bccbb3 app: #include <string.h> in gimp-transform-resize.c 2018-01-28 22:58:26 +01:00
Ell 5f58a7a260 app: pass near-plane z-coordinate to gegl:transform
... so that GEGL performs the same clipping we do.
2018-01-28 16:37:34 -05:00
Ell 23f6369658 libgimpmath: remove gimp_matrix3_will_explode()
It's no longer needed since last commit, and since it's new in
2.10, we might as well remove it.

This reverts the rest of 768d06614f.
2018-01-28 16:37:34 -05:00
Ell 3c0787e4c3 app: use gimp_transform_polygon() in gimp_transform_resize_boundary()
... so that the transformed boundary is properly clipped.

Adjust the boundary-size algorithms to operate on arbitrary
polygons.

Avoid using gimp_matrix3_will_explode() in
gimp_drawable_transform_buffer_affine() and falling back to
cropping the result, and avoid setting the "clip-to-input" property
of gegl:transform.  Neither of those in needed anymore.

This effectively reverts the app/ part of commit
768d06614f.  The next commit revets
the libgimpmath/ part.
2018-01-28 16:37:34 -05:00
Ell 258e60f1b7 app: use gimp_transform_polygon() in GimpCanvasBoundary
... so that clipping is done properly.
2018-01-28 16:37:34 -05:00
Ell 4626190ac7 app: use gimp_transform_polygon() in GimpCanvasTransformGuides
Add a "clip" property to GimpCavnasTransformGuides.  When set, use
gimp_transform_polygon() for transforming the guides and the
bounding box, so that they're properly clipped.

Add a corresponding "clip-guides" property to
GimpToolTransformGrid, and set it to TRUE in GimpToolHandleGrid, so
that the handle-transform tool's guides are clipped properly.
2018-01-28 16:37:34 -05:00
Ell 9900573345 app: use gimp_transform_polygon() in GimpCanvasTransformPreview
... so that clipping is done properly.
2018-01-28 16:37:34 -05:00
Ell cc20cb41f3 app: add gimp_transform_polygon()
gimp_transform_polygon() transforms an (open or closed) polygon by
a GimpMatrix3, performing clipping to the near plane, to avoid
erroneously transforming points behind the camera.
2018-01-28 16:37:33 -05:00
Ell 7dfe81f13d configure.ac: require GEGL >= 0.3.29 2018-01-28 16:37:33 -05:00
Jehan ee6e981c04 app: remove the "save your work and restart" advice on fatal errors.
This is obviously not possible anymore to do this manually so this step
is bogus in a crash case. We keep this step for other (non-fatal)
errors. We may add an automatic "attempt" to save in a backup file
later, which may not work depending on how bad the crash is (which is
why it will be done in a backup file, we don't want to corrupt saved
files).
2018-01-28 20:15:49 +01:00
Piotr Drąg def98c5983 Update Polish translation 2018-01-28 20:02:58 +01:00
Piotr Drąg 0ac29c0b61 Update POTFILES.in and POTFILES.skip 2018-01-28 19:06:13 +01:00
Jehan 07e8ce3604 app: add SIGABRT to be handled by gimp_fatal_error().
SIGABRT is definitely a fatal error, at least in GIMP context. It is
used by g_assert() and more generally by abort().

Actually I am a bit unsure about the difference of gimp_terminate() and
gimp_fatal_error(). The former mostly depends on whether we used
--debug-handlers or not, which reads "Enable non-fatal debugging signal
handlers". But the way we handle them, the list of signals handled by
gimp_terminate() seem to always end up fatal as well, anyway. So either
we should *really* make them non-fatal (I could imagine that SIGTERM or
SIGINT indeed could be better handled for instance), or we should just
get rid of this terminate/fatal_error differentiation which seems
totally artificial and non-existing in the current code.
2018-01-28 18:21:03 +01:00
Jehan fe3cf08094 app, tools: title capitalize the debug dialog titles.
Also rename it to "GIMP Debug" and "GIMP Crash Debug" for continuable
errors and fatal errors respectively.
2018-01-28 17:31:47 +01:00
Jehan b8fa968b79 app: add backtraces on warning messages in GIMP_UNSTABLE. 2018-01-28 17:20:11 +01:00
Jehan b318694bb2 app, tools: install the debug tools in libexec when appropriate.
AFAIK this means on all platforms but Win32 and macOS which would rather
need relative path and therefore cannot make use of build-time
LIBEXECDIR. Anyway on these platforms, leaving the binary in BINDIR is
not likely to "pollute" too much as it would on Linux or BSD where
people often use terminal.
2018-01-28 15:43:07 +01:00
Jehan 4e5a5dbb87 app: make the backtrace GUI actually work on Win32.
It was previously untested, hence as expected needed fixes. First I add
our own exception handler using Win32 API SetUnhandledExceptionFilter().
Second, I reorder things so that ExcHndlInit() is run after this setter,
since they will be executed as a FILO and we need backtraces to be
generated before our separate GUI runs. Last I run the backtrace GUI as
async. No need to keep the main GIMP waiting since the traces have
already been generated into a separate file.

Also replace gtk_show_uri() by the implementation taken straight from
our web-browser plug-in, since apparently gtk_show_uri() doesn't work in
Windows (and probably not macOS either since I see we have a separate
implementation for this platform as well). I would like to be able to
use the PDB but can't because this code needs to be usable both within
the main process and into a separate tool process. Ideally, this should
just be a utils function which could be included without a problem.
2018-01-28 15:43:07 +01:00
Jehan a3a4df9528 app, tools: various fixes for Win32 build.
* Type pid_t is not cross-platform. Just use int instead, and convert it
  to respective type on each platform.
* Get rid of several useless include which should have been removed a
  few commits ago, when I reimplemented the backtrace function.
* Better handle the various macros in gimp_eek() (between G_OS_WIN32,
  HAVE_EXCHNDL and GIMP_CONSOLE_COMPILATION, but also no_interface and
  generate_backtrace options, that was a bit messy).
* Make gimpdebug now always built, whatever the platform.
2018-01-28 15:43:07 +01:00
Jehan 9ca8899a12 libgimpbase, tools: clean some warnings on a Win32 build. 2018-01-28 15:43:07 +01:00
Jehan a700b15e37 pdb: oups! I previously edited a generated file.
This is the PDB I had to edit instead of app/pdb/message-cmds.c which is
generated.
2018-01-28 15:43:07 +01:00
Jehan ae3cd00fbd app, tools: add support for ExcHndl/DrMinGW for Win32 debugging.
The feature already exists in our code and produces backtraces upon a
crash into a file. The only difference is that we are now getting the
file contents and showing it in our new debug dialog, so that it works
similarly on all platform (and therefore making the debug info visible
to people, otherwise they would never report, even though the data is
generated).
The difference with gdb/lldb is that it doesn't allow backtraces at
random points (for debugging non-fatal yet bad errors). Also the API has
just 2 functions and in particular an ExcHndlInit() but no way to unload
the feature. So we don't need the debugging page in Preferences because
the switch option would not work. On Windows, the feature will be
decided at build time only.

Last point: the code is untested on Windows so far. I assume it would
work, but there is at least one point I am unsure of: will ExcHndl have
already generated the backtrace file when gimpdebug runs? If not, I will
have to let gimp die first to be able to get the backtrace.
2018-01-28 15:43:07 +01:00
Jehan 015f2fc800 INSTALL: add gdb or lldb as optional runtime dependencies. 2018-01-28 15:43:07 +01:00
Jehan 270730d5cf app: add a debugging page in preferences.
Move the backtracing settings there. This page may also be used later
for auto-saving on crashes, as discussed in bug 792787, or similar
features.
2018-01-28 15:43:07 +01:00
Jehan 4ca31b0571 app: add lldb as backtrace-creator alternative to gdb.
It seems that on some platforms (macOS in particular), this may be more
common to have.
2018-01-28 15:43:07 +01:00
Jehan eab961c9bb app: test G_OS_WIN32 rather than G_OS_UNIX for new backtrace feature.
This is just a bit more consistent with existing code. Also build the
gimpdebug tool only when GIMP_CONSOLE_COMPILATION is not set and run
when --no-interface CLI option is not set since it is a GUI tool.
2018-01-28 15:43:07 +01:00
Jehan f8411a3d1f app: add a "generate-backtrace" preference in GimpCoreConfig.
This will determine whether to output backtrace in a GUI and is disabled
by default on stable, and activated in dev builds. It is a bit redundant
with --stack-trace-mode option CLI and will take priority when enabled
since most people would run GIMP with a graphical interface anyway.
2018-01-28 15:43:07 +01:00
Jehan beede1718a app, tools: add backtrace GUI for crashes as well.
This was a bit harder since even though we handle fatal signals,
allowing us to do any last action before GIMP crashes, it seems more
memory allocation is not allowed at this time. So creating a dialog or
simply getting the return output of gdb into the main process is not
allowed. What I do instead is running a separate program (gimpdebug)
which will take care of creating the new dialog and running a debugger.
I still use GimpCriticalDialog code from this separate binary, while I
continue to use this widget also within GIMP for non-fatal errors. The
reason why we still want to use it within GIMP is that we can bundle
several non-fatal errors and backtrace this way (fatal errors don't
return anyway) and it's easier to do so when created from the main
process.
2018-01-28 15:43:07 +01:00
Jehan bb88a2d52f app: reimplement gimp_get_stack_trace().
Don't use g_on_error_stack_trace() from glib anymore. It is
over-complicated, using gdb in interactive mode and running command
writing in the pipe input. Sometimes it even gets stuck and never
return. This is useless since gdb even has a batch mode, to just run
commands and exit directly. I just use this.
2018-01-28 15:43:07 +01:00
Jehan 9fdf35550b app: new error dialog to backtrace and encourage people to report bugs.
GIMP will now try to get a backtrace (on Unix machines only for now,
using g_on_error_stack_trace(); for Windows, we will likely have to look
into DrMinGW).
This is now applied to CRITICAL errors only, which usually means major
bugs but are currently mostly hidden unless you run GIMP in terminal. We
limit to 3 backtraces, because many CRITICAL typically get into domino
effect and cause more CRITICALs (for instance when a g_return*_if_fail()
returns too early).
2018-01-28 15:43:07 +01:00
Michael Natterer 5da3bdb4ea app: fix GimpToolCompass for one perfectly vertical line
the angle arc and the small helper line were displayed on opposite
sides of the first point. Now they are on the same side, just like for
all other angles.
2018-01-28 15:24:29 +01:00
Michael Natterer c71535b72a Bug 792981 - Measure tool is measuring one pixel to the right of initial point
This reverts 2069496af3 for
gimpmeasuretool.c, we can't use gimp_display_shell_get_line_status()
here because the angle to show is *not* the angle as shown in the
paint tools (between x1,y1 and x2,y2), it is determined by a possible
third point.

Also, the info window and the statusbar were using different
coordintates to detemine the line length. This would have been easily
fixable, but the wrong angle wasn't.
2018-01-28 15:07:47 +01:00
Dimitris Spingos (Δημήτρης Σπίγγος) da4f03b82e Update Greek translation 2018-01-28 07:02:01 +02:00
Inaki Larranaga Murgoitio fb9709be30 Update Basque language 2018-01-27 17:27:02 +01:00
Inaki Larranaga Murgoitio de5712ddb8 Update Basque language 2018-01-27 17:23:41 +01:00
Inaki Larranaga Murgoitio 58155f64dd Update Basque language 2018-01-27 17:16:02 +01:00
Inaki Larranaga Murgoitio 1493950dba Update Basque language 2018-01-27 17:11:30 +01:00
Inaki Larranaga Murgoitio 78b711647c Update Basque language 2018-01-27 17:06:41 +01:00
Inaki Larranaga Murgoitio fab7d6c92d Update Basque language 2018-01-27 16:49:34 +01:00
Ell 442be72630 app: port relevant transform tools to GimpGenericTransformTool
Derive GimpUnifiedTransformTool, GimpPerspectiveTool, and
GimpHandleTransformTool from GimpGenericTransformTool, eliminating
their common logic.

Remove gimp_transform_matrix_handles(), which is no longer used.
2018-01-27 07:30:30 -05:00
Ell 0334595cc1 app: port GimpHandleGrid from gimp_transform_matrix_handles() to ...
... gimp_transform_matrix_generic()

Replace the separate x/y coordinate arrays of GimpHandleGrid with
GimpVector2 arrays, and use gimp_transform_matrix_generic(),
instead of gimp_transform_matrix_handles(), when calculating the
matrix.  When the resulting matrix is invalid, hide the guides.
2018-01-27 07:30:29 -05:00
Ell 6a64f09681 app: add show-guides property to GimpToolTransformGrid
... which can be used to control the guides' visibility.

Will be used by the next commit, to hide the guides in
GimpToolHandleGrid when the tranformation is invalid.
2018-01-27 07:30:29 -05:00
Ell 4c71ee8e7a app: add GimpGenericTransformTool
A subclass of GimpTransformTool, to be used as a base class for
transform tools that calculate their matrix based on 4 pairs of
input/output points, and that display the transform matrix as their
GUI (this includes the unified, perspective, and handle transform
tools; the next commit ports them over to
GimpGenericTransformTool).

When the resulting matrix of the input/output mapping sends any of
the output points to, or past, infinity, GimpGenericTransformTool
sets GimpTransformTool::transform_valid to FALSE, and displays an
appropriate message in the tool GUI, instead of showing the matrix.
2018-01-27 07:30:29 -05:00
Ell 6d0190b7fd app: add transform_valid member to GimpTransformTool
... which specifies whether the transform matrix is valid.
Subclasses can then set this member to indicate that the current
transformation is invalid (which can happen in the unified,
perspective, and handle transform tools).  When the transform is
invalid, GimpTransformTool doesn't apply it upon committing, and
returns an error instead.

This commit doesn't set the transform_valid member in any of the
subclasses, so there's no effective change.  The next commit adds a
GimpGenericTransformTool subclass, that will use the new member.
2018-01-27 07:30:28 -05:00