Commit Graph

40405 Commits

Author SHA1 Message Date
Ell bea27171ad app: throttle statusbar progress updates
Statusbar progress updates that update the progress bar are
relatively expensive, slowing down operations that report progress
frequently.  Only update the progress bar if a certain amount of
time has passed since the last update, to counter that.
2018-04-07 12:05:59 -04:00
Ell 87a10aaf9e Bug 795048 - Image->mode->Grayscale results in a black or transparent image
In gimp_gegl_convert_color_profile(), when src/dest_rect is NULL,
use the extents of src/dest_buffer, instead of passing a NULL area
to gimp_parallel_distribute_area(), which results in a CRITICAL.

Additionally, only report progress on the main thread.
2018-04-07 12:05:59 -04:00
Massimo Valentini 81e1e3967d app: silence gcc warning
gimp-templates.c:143:15: warning: ‘strncpy’ output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation]
               strncpy (dpi, "ppi", 3);
               ^~~~~~~~~~~~~~~~~~~~~~~
2018-04-07 14:45:45 +02:00
Michael Natterer 2dd2f2f371 Bug 770424 - Themes: insensitive menu item are not readable
Need to check if we must override PixbufStyle's draw_layout() after
each theme change, not only at the beginning of themes_init(), so it
works also when the the pixbuf engine was not already loaded at
startup.
2018-04-07 12:33:18 +02:00
Jehan 0ae8e356d1 po: fix desktop file keywords syntax for Basque translation.
Some tool in flatpak-build was failing to validate the keywords because
of this localization. It was complaining that:

> key "Keywords[eu]" in group "Desktop Entry" does not have a semicolon
> (';') as trailing character
2018-04-07 01:22:23 +02:00
Jehan d907898c65 build: update dev and nightly flatpak manifests.
Dev flatpak now builds the 2.10.0 RC1.
Both manifest tested and working.
2018-04-07 01:17:09 +02:00
Jehan d2c4db1984 build: upstream flathub build and base modules updated too. 2018-04-06 21:09:50 +02:00
Jehan 494f68418a build: do not bundle glib anymore.
We now use the GNOME 3.28 runtime and glib 2.56.0 is bundled with it.
2018-04-06 21:01:15 +02:00
Michael Natterer 43549b7a38 app: remove some references to TileManager from xcf-load.c comments
and minor whitepace cleanup.
2018-04-06 12:56:31 +02:00
Ell f7c2ce9b13 app: fix smudge tool artifacts
Commit cb239e60f6 introduced
artifacts when using the smudge tool with multithreads.  Fix this
(caused by a wrong offset passed to an iterator) plus indentation
fixes.
2018-04-05 19:17:45 -04:00
Alexandre Prokoudine d66839993d Updated Russian translation 2018-04-06 02:09:48 +03:00
Jehan 87b9611628 app: fix build error "‘memset’ was not declared in this scope". 2018-04-05 23:57:34 +02:00
Alexandre Prokoudine 299a258237 NEWS: keep updated 2018-04-06 00:44:49 +03:00
Ell 4336e2e52a app: parallelize gimpbrushcore-loops.cc
Use gimp_parallel_distribute_foo() to parallelize the brush core
loops.
2018-04-05 17:41:29 -04:00
Ell 6e314b5090 app: move brush-core loops to a separate file
Move gimp_brush_core_{subsample,pressurize,solidify}_mask() to a
separate gimpbrushcore-loops.cc file, so that they can be C++-ified
independently from the rest of the code.  The next commit
parallelizes them.
2018-04-05 17:41:29 -04:00
Ell f7ea9abc73 app: add include guards to gimppatincore-loops.h 2018-04-05 17:41:29 -04:00
Ville Pätsi cf21dcbe37 Rework and rename the default Dark theme 2018-04-05 23:59:27 +03:00
Ville Pätsi 7aecc90e10 Remove Lighter, Darker, and Gray themes 2018-04-05 23:59:22 +03:00
Jehan 0009794d9d app: migrate tool-presets with s/GimpImageMapOptions/GimpFilterOptions/.
As requested!
2018-04-05 11:46:49 +02:00
Ell 082a6404c9 app: fix iterator area in canvas_buffer_to_paint_buf_alpha()
The entire ROI was processed in all threads, instead of only the
thread-specific area, causing artifacts.
2018-04-05 02:19:52 -04:00
Jehan b88170b9e0 NEWS: keep up-to-date. 2018-04-05 01:38:06 +02:00
Jehan ba06a0fe86 Bug 794949 - Plugin crash when opening png, jpeg or tiff with...
... non-latin unicode path.
g_win32_locale_filename_from_utf8() was sometimes returning NULL for
some paths on Windows. Then the call to gexiv2_metadata_open_path() with
a NULL value was crashing plug-ins.
This commit only prevents from crashing by simply failing to load
metadata when this occurs, which means losing metadata support on
Windows depending on filenames. A proper solution will have to be
implemented.
2018-04-05 00:18:28 +02:00
Ell cb239e60f6 app: parallelize gimp-gegl-loops.cc
Ditto.
2018-04-04 17:49:47 -04:00
Ell 828b99b5b3 app: switch gimp-gegl-loops.c to C++
Ditto.
2018-04-04 17:49:47 -04:00
Ell 3df757ffd7 app: parallelize gimppaintcore-loops.cc
Ditto.
2018-04-04 17:49:47 -04:00
Ell e8a14deecf app: switch gimppaintcore-loops.c to C++
Ditto.
2018-04-04 17:49:46 -04:00
Ell c8d4c079a2 app: parallelize gimpbrush-transform.cc
Use gimp_parallel_distribute_foo() to parallelize the brush
transform functions.
2018-04-04 17:49:46 -04:00
Ell 565f1f2aa4 app: switch gimpbrush-transform.c to C++
The next commit is going to parallelize gimpbrush-transform using
the gimp_parallel_distribute_foo() functions.  To spare us a lot of
boilerplate code, we're going to use C++ lambdas as callback
arguments to these functions.

This commit does the initial conversion of gimpbrush-transform.c to
C++, renaming it to gimpbrush-transform.cc.  We do this in a
separate commit, so that the changes are small enough for git to
register this as a renamed file, rather than a new file, so that we
don't lose the file's history.
2018-04-04 17:49:46 -04:00
Ell 86b89cf62a app: add gimp-parallel
Add gimp-parallel.[cc,h], which provides a set of parallel
algorithms.

These currently include:

  - gimp_parallel_distribute():  Calls a callback function in
    parallel on multiple threads, passing it the current thread
    index, and the total number of threads.  Allows specifying the
    maximal number of threads used.

  - gimp_parallel_distribute_range():  Splits a range of integers
    between multiple threads, passing the sub-range to a callback
    function.  Allows specifying the minimal sub-range size.

  - gimp_parallel_distribute_area():  Splits a rectangular area
    between multiple threads, passing the sub-area to a callback
    function.  Allows specifying the minimal sub-area.

The callback function is passed using an appropriately-typed
function pointer, and a user-data pointer.  Additionally, when used
in a C++ file, each of the above functions has an overloaded
template version, taking the callback through a generic parameter,
without a user-data pointer, which allows using function objects.
2018-04-04 17:49:46 -04:00
Ell 700cc33bec configure.ac: require a C++11 compiler
The following commits use C++11 lambdas.
2018-04-04 17:49:46 -04:00
Ell 394c930fbe app: avoid potential division by 0 in dashboard CPU usage sampler 2018-04-04 17:49:46 -04:00
Jehan fa02a2c64f libgimp: add an exception handler for Windows.
Drmingw already added its own exception handler which generates crash
traces in a text file, for plug-ins as well. This additional handler is
run after Drmingw handler and allows us to do things on our own, and in
particular we could display the content of the debug traces.

Right now it simply prints these to stderr, which actually won't be of
much use on Win32, first because the console is deactivated on stable
releases, also because after tests, it doesn't look like even running
GIMP from cmd outputs to console either.

We currently don't use the same debug dialog as the core on purpose,
because we don't want everyone to send us traces for every unmaintained
third party plug-ins out there. But we should definitely allow easier
trace possibilities at some point, first to improve/debug our own core
plug-ins, and also to help third party plug-in developers!
So this commit is not making visible changes yet but is actually a first
step towards these debugging goals.
2018-04-04 20:25:29 +02:00
Jehan 76bce77d09 libgimp: various warning fixes for Win32. 2018-04-04 06:32:33 +02:00
Jehan 9c8a8ae576 libgimp: do not end the fatal and signal handlers with gimp_quit().
When ending with gimp_quit(), GIMP was not displaying the "Plug-in
crashed" error dialog, which is not good, since we lose the crash
feedback for plug-ins. Just let the plug-in continue its normal run in
order to get the error dialog.
Also protect the tracing functions, which are not working on Win32.
2018-04-04 04:47:43 +02:00
Jehan e98b937643 libgimp: add a gimp_fatal_func() allowing stack tracing plug-ins on...
... various crashes.
2018-04-04 04:33:19 +02:00
Jehan 6bcb30e1ee devel-docs: update debugging-tips.txt regarding --stack-trace-mode...
... for plug-in debugging as well.
2018-04-04 04:13:28 +02:00
Jehan c46211190f libgimp: properly catch SIGABRT signal.
SIGABRT was in the switch list in gimp_plugin_sigfatal_handler(), but it
had not been properly handled with gimp_signal_private(), making this
switch case useless. Fix this oversight, and while doing so, move it in
the "fatal error" list for which we may generate stack traces, similarly
to core signal handling. Indeed this signal can definitely happen during
various kinds of common bugs and needs to be debugged.
2018-04-04 04:08:57 +02:00
Jehan 6936a655bd plug-ins: minor fix of an error string.
Was reading this part of the code when I saw this: the error happens
when loading not exporting a PNG.
2018-04-04 02:21:47 +02:00
Jehan 33822c51c2 app: check if tool control is active before setting modifier state.
Similar to commit 845eb522b6, I had a CRITICAL which happened on a
device_changed, triggering gimp_display_shell_update_focus(), this time
in focus in.
2018-04-04 01:00:55 +02:00
Michael Natterer 7230d5d777 Bug 794356 - Rulers always shown for subsequent image views
Remove the connect_after() hack from GimpImageWindow again and instead
add gimp_display_shell_canvas_realize_after() and restore the configured
ruler visibility there. Should work for all cases now.
2018-04-03 22:36:17 +02:00
Michael Natterer 65a697ff67 app: switch the first two args of gimp_channel_new_from_buffer() 2018-04-03 21:57:43 +02:00
Julien Hardelin de0706f3f1 Updated French translation 2018-04-03 11:47:17 +02:00
Julien Hardelin cdc20c9c79 Updated French translations 2018-04-03 10:57:46 +02:00
Ell bbd79f9d62 app: fix Wilber's eyes
Commit fd6d4931c8 accidentally
introduced a bug that caused Wilber's eyes to misbehave.  This
commit is an attempt to fix this issue.  Unfortunately, it seems
like the bug can still be triggered through a certain sequence of
actions...
2018-04-03 03:32:32 -04:00
Michael Natterer b46b9d8921 Bug 772126 - Make GimpColorFrame handle very long numbers
Add "ellipsize" property to GimpColorFrame and set it to
PANGO_ELLIPSIZE_END in the the pointer information dockable.

Better cut off long numbers than make them expand the dock.
2018-04-03 01:47:53 +02:00
Jehan 5e2600db1e NEWS: keep up-to-date. 2018-04-03 00:49:56 +02:00
Michael Natterer cad72b1432 app: remove unused variable in gimp_tile_handler_validate_command() 2018-04-02 23:23:54 +02:00
Ell 4acdc7392a app: use gegl_tile_handler_damage_rect() in TileHandlerValidate
Use the recently-added gegl_tile_handler_damage_rect() function
during GimpTileHandlerValidate invalidation, instead of manually
voiding the tile pyramid.  This function avoids voiding mipmapped
tiles entirely when only a subarea of the tile needs to be redrawn.

See GEGL commit 3210f4ffc3c569a2acd9483811cb141070112bc6.
2018-04-02 16:47:45 -04:00
Ell da3c96f541 app: add "misc" group to the dashboard
... which currently has a single "mipmapped" field, which shows the
total size of processed mipmapped data.
2018-04-02 16:47:45 -04:00
Ell 4c041b2e8a app: allow hiding groups in the dashboard
Add a "groups" submenu to the dashboard popup menu, which can be
used to control which groups are shown in the dashboard.
2018-04-02 16:47:41 -04:00