Commit Graph

39852 Commits

Author SHA1 Message Date
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
Ell e7b6103cc8 app: improve stability of Gaussian elimination in transform-utils
When picking a row whose leading coefficient is nonzero, use fuzzy
comparison against an epsilon, instead of exact comparison against
zero, to minimize the effect of numerical errors.
2018-01-27 07:30:28 -05:00
Ell 5cd0ecc998 app: fix rotation pivot of GimpCanvasHandle
This fixes the erratic 1-pixel movement of transform-grid handles.
2018-01-27 07:30:28 -05:00
Jehan de81e33340 libgimpwidgets: add missing gimp_color_selector_model_get_type in def...
... file.
2018-01-26 15:49:56 +01:00
Ell dce3942a1d app: in GimpDashboard, more CPU-usage sampling fixes on Windows 2018-01-25 13:04:57 -05:00
Michael Natterer 6d075aa10a app: some cleanup in the first of the two assert removals below 2018-01-23 19:50:07 +01:00
Ell 12148e04c4 configure.ac: require babl >= 0.1.42 and GEGL >= 0.3.28 2018-01-23 11:08:24 -05:00
Sebastian Rasmussen 0c34db8aac Bug 792792 - Typo fix for an error message.
s/currupt/corrupt/
2018-01-22 19:13:56 +01:00
Jehan 4c2df9b365 app: all remaining g_assert() replaced by critical warning and return...
... in app/core.
Continuing on my crusade against asserting and crashing GIMP.
2018-01-22 16:20:04 +01:00
Jehan b4c7dd8fd8 app: run gimp_projectable_get_graph() before gegl_node_get_parent()...
... on top-level layers.
There was even a comment for this, but I missed this when I moved some
code to the top of the function in commit b9577a783d. Now moving this
call up as well. This appeared to be more of a problem when merging
layers without a GUI (script-fu). I'm guessing the GUI calls this anyway
before.
2018-01-22 15:35:22 +01:00
Michael Natterer 13b640f84c libgimpwidgets: restore ABI of GimpColorSelectorClass
Public structs must not change, that's why we have padding at the
end for extension.
2018-01-22 13:04:54 +01:00
Jehan f87bc3fe09 app: we should not have any g_assert*() code if possible.
Replace all g_assert_not_reached() in app/core/ by g_return_if_reached()
or g_return_val_if_reached(). GIMP may handle a lot of creative work,
sometimes unsaved for hours. We should not just crash on purpose.
g_assert*() could theoretically be turned off on a glib build, but this
is nearly never done, and is not a solution either (actually it is
probably even worse because the broken code would just continue on a
forbidden path). It is much better to return with a warning on such
forbidden code paths, allowing someone to report a bug without
experiencing a crash and data loss.

For now, I only took care of g_assert_not_reached() inside app/core.
More g_assert*() code should be replaced.
Note: assert are acceptable in plug-ins though, but not in the main
executable, unless absolutely necessary (something happening so bad that
crash is better than continuing).
2018-01-22 12:46:37 +01:00
Jehan 54a1e8f2b1 libgimpwidgets: use g_return_if_reached() in unreachable code path.
This way, we get proper CRITICAL if ever there is a logic error (or in
this case, if we add new values to enums and forget to append them to
switch cases.
This will make these bugs much easier to debug if (when!) they happen.
2018-01-22 11:28:09 +01:00
Jehan 90037116e4 libgimpwidgets: oups, fix some stupid miswrite.
Unfortunately not very problematic, unless when setting alpha channel.
2018-01-22 01:08:32 +01:00
Michael Natterer 36dd16c6c6 Bug 792744 - Gimp crashes attempting to merge down a hidden layer
layers_actions_update(): make the merge down action insensitive
if the current layer is invisible.
2018-01-22 00:00:57 +01:00
Michael Natterer af2cb761de Bug 792744 - Gimp crashes attempting to merge down a hidden layer
gimp_image_merge_down(): return an error if the current layer is not
visible.
2018-01-21 23:58:42 +01:00
Jehan b9577a783d Bug 792744 - Gimp crashes attempting to merge down a hidden layer.
Don't use g_assert(). Instead use g_return_val_if_fail().
This commit therefore does not fix the actual bug, but at least it does
not crash. GIMP simply outputs a warning upon trying to merge down a
hidden layer. The actual fix will follow later.
2018-01-21 21:12:21 +01:00
Jehan 4d84925db0 Bug 783680 - Allow to hide color models in GimpColorScales.
GimpColorSelect now using color models tabs too.
2018-01-21 19:00:20 +01:00
Jehan 37e9be3a4f libgimpwidgets: arrange color models in tabs in GimpColorScales.
This allows to have a smaller and cleaner color dock instead of just
listing all possible channels (which may only grow up as we may add more
color spaces).
The API gimp_color_scales_(set|get)_show_hsv() are removed in favor of
more generic gimp_color_selector_(set|get)_model(). I assume this is
ok since they have only been available in the dev version (commit
6258d525ae, a month ago).
2018-01-21 18:37:18 +01:00
Jehan 8120694759 app: add include to fix a warning.
The build warning was:
> warning: implicit declaration of function ‘memcmp’ [-Wimplicit-function-declaration]
2018-01-21 17:31:57 +01:00
Piotr Drąg db804ce540 Update Polish translation 2018-01-21 17:06:58 +01:00
Ell 4d3720baad app: in GimpDashboard, fix CPU-usage sampling on Windows
Thanks, Partha!
2018-01-20 18:08:51 -05:00
Michael Natterer 567ff4e136 app: fix the same warning in gimp_levels_tool_config_notify() 2018-01-20 16:01:20 +01:00
Michael Natterer cdf5bf6bf7 app: prevent warnings in gimp_levels_tool_config_notify()
Bail out if the levels dialog is not yet fully constructed.
2018-01-20 15:34:52 +01:00
Tim Sabsch 06c1dc7584 Update German translation 2018-01-20 11:30:06 +00:00
Emin Tufan Çetin 1648258985 Update Turkish translation 2018-01-20 10:16:58 +00:00
Alexandre Prokoudine 7179bb6736 Update Russian translation 2018-01-20 01:59:15 +03:00
Ell 8f441befb6 build: add Basque translation to the Windows installer 2018-01-19 15:46:16 -05:00
Ell eea34d6915 app: fix translation context of group menus in GimpDashboard 2018-01-19 15:46:13 -05:00
Inaki Larranaga Murgoitio 4249cee60b Update Basque language 2018-01-19 18:37:19 +01:00
Inaki Larranaga Murgoitio 4521c089db Update Basque language 2018-01-19 18:35:51 +01:00
Inaki Larranaga Murgoitio aaa8afed90 Update Basque language 2018-01-19 18:31:24 +01:00
Inaki Larranaga Murgoitio c4cb7b406a Updated Basque language 2018-01-19 18:27:26 +01:00
Ell 0823c255fa app: add CPU group to GimpDashboard
The CPU group monitors GIMP's CPU usage, and can measure the amount
of time the CPU has been active, which can be used to get a rough
estimate of the execution time of certain operations.

Be warned: while the CPU group is available on *nix and Windows, it
has only been tested on Linux.
2018-01-19 09:51:49 -05:00
Ell b26a0a12a2 app: various improvements to GimpMeter
Allow controlling the gauge/history visibility, and the history
interpolation method, of individual values.

Improve redraw elision when some values are hidden.
2018-01-19 09:51:49 -05:00
Jehan c548d5d342 Bug 792657 - A useless error message when cancelling opening a .svgz.
Use the new gimp_get_pdb_status() to forward the error returned by
gimp_file_load(). Previous code was always returning
GIMP_PDB_EXECUTION_ERROR when the file load was failing, but this was
not granular enough. In particular when the file load is actually
interactively cancelled through Esc or the "Cancel" button, we don't
want to display an error message on screen. Therefore we forward the
actual error raised by the underlining plug-in.
2018-01-19 14:20:40 +01:00
Jehan 2e18c80c58 libgimp: add gimp_get_pdb_status() to return the status of last...
... procedure call.
This is needed for plug-ins which depends on other plug-in's procedures.
If for instance, the second-level plug-in is interrupted interactively,
we don't want to process this as an error but as a cancellation.
Therefore we need to know the returned value of the plug-in. Currently
only way was to use gimp_get_pdb_error() but that was returning a
human-readable error, not a computer-processable error.
2018-01-19 14:19:55 +01:00
Jehan 911e46ee2b plug-ins: indentation fix.
So minor! But while I was reading this code, I just couldn't just leave
this one indentation unfixed. ;P
2018-01-19 14:04:47 +01:00
Alexandre Prokoudine a15a18bd75 Update Rusian translation 2018-01-19 10:15:49 +03:00
Jehan 21227c2516 INSTALL: various fixes.
Adding GIMP 2.8 as compatible regarding plug-ins, fixing a few typos,
and replacing --enable-vector-icons by --disable-vector-icons (since
vector icons are now the default).
2018-01-19 01:47:22 +01:00
Michael Natterer a8b8463f16 app: minor formatting cleanup in gimpguiconfig.c 2018-01-18 01:52:30 +01:00
Øyvind Kolås 7d5188cae6 configure: depend on babl 0.1.40 or newer 2018-01-17 16:06:10 +01:00
Michael Natterer 093295470f Bug 792606 - Resetting to defaults in Preferences disables SWM
The default value of "single-window-mode" must be TRUE.
2018-01-17 15:18:30 +01:00
Jordi Mas 8da2590533 Update Catalan translation 2018-01-17 11:40:24 +01:00
Jordi Mas 661a87c443 Update Catalan translation 2018-01-17 11:17:32 +01:00
Jordi Mas df70a35b71 Update Catalan translation 2018-01-16 23:10:27 +01:00
Jordi Mas 42bcd4cb36 Small fix to Catalan translation 2018-01-16 22:59:23 +01:00
Jordi Mas 0c1def0045 Small fix to Catalan translation 2018-01-16 22:55:12 +01:00
Michael Natterer a8bc8d202c Bug 784480 - Clicking on-canvas GUI with a tablet stylus crashes...
...if "Show rulers" is disabled

Add HACK to gimp_display_shell_canvas_realize() that makes sure the
rulers are always mapped once for each new GimpDisplayShell. This
seems to magically fix all the crashes.
2018-01-16 21:48:48 +01:00
Michael Natterer 3568f1cb3b app: reorder a line in gimp_display_shell_constructed()
just for consistency, no logic is changed.
2018-01-16 21:35:36 +01:00