Commit Graph

41078 Commits

Author SHA1 Message Date
Michael Natterer e9f2e82cff Bug 796071 - Clicking outside of a selection frame creates a new, ...
...zero-size selection

Make sure that clicking outside any selection halts the rectangle
select tool. This fixes ellipse select too.
2018-05-13 23:00:36 +02:00
Jehan b748dea801 build: add my cron script to build dev flatpak regularly.
This is the script I have been personally using for some time now to
build the devel and nightly flatpak on my server regularly through cron
files.
It is not the best script, arguably, and we can most likely do better.
But for now, it worked for me and is a first step toward maybe making
official nightly flatpak builds soon.
2018-05-13 22:42:54 +02:00
Piotr Drąg 6f2c92a8cc Update Polish translation 2018-05-13 22:09:05 +02:00
Jehan 6a10ad3416 app: "validate" has the wrong meaning.
That was an obvious faux ami with French.
Status changed to "press Enter to refine", with the requirement of
staying not too long (this is a status message, not documentation), and
that also announces what will be the next step.
2018-05-13 21:53:25 +02:00
Michael Natterer 93064f4b2b app: formatting in gimpfreeselecttool.h 2018-05-13 21:46:37 +02:00
Ell b296496a65 app: in gimp_atomic_slist_pop_head(), don't warn on empty list
Allow trying to pop the head of an empty GSList, and just return
NULL.
2018-05-13 15:33:15 -04:00
Piotr Drąg 98b30f3a9a Update Polish translation 2018-05-13 21:24:11 +02:00
Ell 5b7806e13c app: in GimpHistogramEditor, clear update timeout after validating
In gimp_histogram_editor_validate(), clear the update timeout, so
that if we validate the histogram before the timeout (in
particular, if editor->histogram itself is clear) we don't end up
unnecessarily re-validating it at the timeout.
2018-05-13 15:21:28 -04:00
Ell 5ed79b65bb app: in GimpHistogram, parallelize histogram calculation
Use gimp_parallel_distribute_area() to parallelize the histogram
calculation, which seems to scale very well.
2018-05-13 15:21:28 -04:00
Ell 398474ff58 app: add gimp-atomic
... which provides a set of higher-level lock-free atomic
operations.

Currently, the only two operations are
gimp_atomic_slist_push_head() and gimp_atomic_slist_pop_head(),
which atomically push/pop the first element of a GSList.
2018-05-13 15:21:28 -04:00
Ell 16a24ff081 app: various GimpAsync improvements
Code cleanup.

Improve function descriptions.

Improve function precondition checks.

Make sure the main thread is properly synced with the async thread
before calling the completion callbacks in the idle function.

Guarantee that all callbacks are called in FIFO order, even
callbacks added during the execution of other callbacks.
2018-05-13 15:21:28 -04:00
Jehan a89dc87aec Bug 795950 - Foreground selection tool requires use of the Enter key.
It is not obvious that you have to hit Enter to validate the first step
of Foreground Selection tool, i.e. the rough free selection. Adding this
information in status message.

Since Enter would only work once the free selection is closed or that
you have at least 3 points (then Enter closes the selection for you), I
also add gimp_free_select_tool_get_n_points() so that we can know how
many points were created from the Foreground Select tool, and only
update the status message when relevant.
2018-05-13 19:27:26 +02:00
Ell 4c767b4f03 app: fix gimp-parallel shutdown
Some leftover from an earlier version.  Caused gimp_parallel_exit()
to hang, although we could only notice that in GIMP_UNSTABLE
builds.
2018-05-13 11:55:16 -04:00
Jehan 660926eb3d desktop: add a desktop file test with `desktop-file-validate` utils. 2018-05-13 15:57:28 +02:00
Jehan 0492157dd2 desktop: remove the double <releases> trick.
This was added in commits 447d9bbc56 and fb6328b9ad.
With it, the validation succeeds. Still I am actually not sure that is
proper appdata format. Also we have issues of metadata not shown for our
flatpak package, and I am wondering if this could be the issue.
So let's get rid of this hack.

Also temporarily commenting out the appdata unit test because it fails
without, because of a bug in appstream-util. This bug has been fixed
since, but there are no releases containing this fix yet.
See: https://github.com/hughsie/appstream-glib/issues/234
We'll reactivate the tests later.
2018-05-13 15:34:54 +02:00
Michael Natterer 5b2dd00fab app: put the call to gimp_gui_ungrab() back in gimp_eek()
It got lost while improving our error handling.
2018-05-13 13:49:33 +02:00
Michael Natterer 90aa8ad040 libgimp: gimpimage_pdb.c got regenerated 2018-05-13 00:18:23 +02:00
luz.paz 69b2e84924 Source and trivial typos
Found via `codespell` and `grep`
2018-05-12 23:44:47 +02:00
Jehan 8d7f13be18 Bug 795855 - File chooser dialogs do not show folders or files for...
... drive roots (e.g. C:\, D:\, ...))

This is a regression of glib 2.56 (not applying to 2.54 since it is new
code). It has been fixed recently in what will be 2.56.2 but is not
released yet, so we can't just bump the requirement.

Since it is a pretty bad bug though, let's add a test specifically for
these versions in the configure script so that nobody will package these
versions of glib. We can remove this test when we will bump the glib
requirement.
2018-05-12 23:12:38 +02:00
Ell 1139c00721 app: in GimpHistogramEditor, avoid calculating histogram of detached layers
... which results in CRITICALs.  This can evidentially happen during
gimp_image_remove_layer() under certain circumstances (see comment
in the patch.)
2018-05-12 09:29:11 -04:00
Ell d5b0b08431 app: cancel async histogram calculation in gimp_histogram_clear_values()
Cancel any on-going asynchronous histogram calculation, started
through gimp_histogram_calculate_async(), upon calling
gimp_histogram_clear_values().
2018-05-12 09:29:11 -04:00
Ell 729240db34 app: improve GimpAsync description 2018-05-12 09:29:11 -04:00
Jordi Mas b984f94506 Update Catalan translation 2018-05-12 09:43:17 +02:00
Daniel Korostil f70440d911 Update Ukrainian translation 2018-05-12 07:17:57 +00:00
Daniel Korostil 38105c61a9 Update Ukrainian translation 2018-05-12 07:16:13 +00:00
Daniel Korostil c5e5991ebc Add Ukrainian translation 2018-05-12 07:15:47 +00:00
Daniel Korostil e597801764 Update Ukrainian translation 2018-05-12 07:14:46 +00:00
Daniel Korostil 075f615752 Update Ukrainian translation 2018-05-12 07:13:42 +00:00
Ell 44ffbe74df app: always update GimpHistogramView bins when changing histograms
... and not only when histogram != NULL, since the bin count may
change in either case.
2018-05-11 21:42:56 -04:00
Ell 4ad72cfc77 app: connect GimpHistogramView to bg-histogram "notify" signal
In GimpHistogramView, connect the view to the bg-histogram's
"notify" signal, and update the view in response.  Previously, we
only updated the view in response to the main histogram's "notify"
signal.

The curves tool only uses the bg-histogram, and after the switch to
asynchronous histogram calculation, in commit
49382e53d5, it failed to update the
histogram view after the calculation was complete.
2018-05-11 21:31:16 -04:00
Balázs Meskó 6a0f0c13ec Update Hungarian translation 2018-05-11 22:06:59 +00:00
Jehan 9d9e9c707e plug-ins: minor cleanup.
In particular tabs were left out in the new file-heif plug-in.
2018-05-11 23:29:40 +02:00
Jehan 39a1680043 desktop: preparing appdata <release> tag for 2.10.2.
Please everyone, review and update before we comment the tag out, hence
pushing for translations.
2018-05-11 23:24:29 +02:00
Jehan 2f73a83bbe INSTALL: add info about libheif optional dependency.
Also make it clear that libheif must be built with libde265 support.
2018-05-11 22:56:01 +02:00
Jehan 05145f44f2 plug-ins: set appropriate status when file-heif's load_image() fails.
Current code was only taking into account cancelation, so we could end
with weird plug-in return:

> HEIF/HEIC plug-in returned SUCCESS but did not return an image

Instead properly set an error status, and echo back the error from the
plug-in or libheif.
2018-05-11 22:48:23 +02:00
Piotr Drąg 36196d408e Update Polish translation 2018-05-11 22:00:17 +02:00
Ell 49382e53d5 app: in GimpCurvesTool, calculate histogram asynchronously
In GimpCurvesTool, calculate the histogram of the target drawable
asynchronously, rather than synchronously, to avoid blocking the UI
while the histogram is calculated.
2018-05-11 14:01:42 -04:00
Ell b0ce645fe2 app: in GimpLevelsTool, calculate histogram asynchronously
In GimpLevelsTool, calculate the histogram of the target drawable
asynchronously, rather than synchronously, to avoid blocking the UI
while the histogram is calculated.
2018-05-11 14:01:42 -04:00
Ell 4af6fb5944 app: in GimpThresholdTool, calculate histogram asynchronously
In GimpThresholdTool, calculate the histogram of the target
drawable asynchronously, rather than synchronously, to avoid
blocking the UI while the histogram is calculated.

Additionally, fix the initial "low" threshold value for > 8bpc
images (127/255 => 0.5).
2018-05-11 14:01:42 -04:00
Ell d0b7fe6f52 app: in GimpHistogramEditor, calculate histogram asynchronously
In GimpHistogramEditor, calculate the histogram of the active
drawable asynchronously, rather than synchronously, to avoid
blocking the UI (and the execution of PDB calls) while the
histogram is calculated.  For large images, this can notably
improve responsiveness, as well as plug-in execution speed, while
the histogram dialog is mapped.
2018-05-11 14:01:42 -04:00
Ell 1923fa8b44 app: add gimp_drawable_calculate_histogram_async()
... which is similar to gimp_drawable_calculate_histogram(),
calculating the histogram asynchronously on a separate thread.

Note that when calculating the histogram of the drawable's source
node, the node is rendered synchronously on the main thread (if
necessary), and the histogram of the result is calculated
asynchronously on a separate thread.
2018-05-11 14:01:42 -04:00
Ell 9ea560d4a9 app: add gimp_histogram_calculate_async()
... which is similar to gimp_histogram_calculate(), calculating the
histogram asynchronously on a separate thread.
2018-05-11 14:01:42 -04:00
Ell 1b646804ea app: add gimp_parallel_run_async()
... which runs a user-provided function asynchronously, returning a
corresponding GimpAsync object.  This can be used to execute code
off the main thread, using the GimpAsync object to synchronize as
necessary.

Note that while the code allows for running multiple asynchronous
functions in parallel in a thread pool, we currently limit the pool
to a single thread, queueing overlapping async function, since we
have no use for parallel asynchronous functions at the moment.
2018-05-11 14:01:42 -04:00
Ell e1d15feff7 app: add GimpAsync
GimpAsync represents an asynchronous task, running without blocking
the main thread.  It provides functions that allow waiting for
completion, queueing completion callbacks, and requesting
calcelation.  See the code for more details.

The interface and the implementation are intentionally limited for
the time being, to keep things simple, and are geared toward
asynchronous tasks executed on a separate thread (see the next
commit).  The public interface is relatively general, however, and
we may extend the implementation to support other kinds of tasks at
some point, who knows...
2018-05-11 14:01:42 -04:00
Jehan 66db143502 Bug 796014 - Cannot open some older .xcf files made with 2.8.22 in 2.10.
To avoid an infinite loop, gimp_item_linked_is_locked() was temporarily
unlinking items before calling gimp_item_is_position_locked(). This
worked only based on gimp_item_real_is_position_locked() code which
called gimp_item_linked_is_locked() only when it was linked. It did not
take into account the fact that it was an abstract method which could
have other implementations. In particular the group layer implementation
would call in turn gimp_item_is_position_locked() on each child layer.

Basically temporarily unsetting the link was anyway a very ugly hack.
The point is simply that we are only interested by the value of the
`lock_position` flag for this item, without further "intelligence". For
this, use gimp_item_get_lock_position() instead.
2018-05-11 18:04:31 +02:00
Jehan 0d26d00ca3 build: replace some survivor s/2.9/2.10/. 2018-05-11 03:01:00 +02:00
Michael Natterer f741cacc28 app: fix last commit: identify displays by name not by pointer
Not so sure any more this belongs here at all, but it doesn't hurt
either...
2018-05-10 17:32:58 +02:00
Jernej Simončič 5427d82d21 Installer: better error message about unsupported OS 2018-05-10 17:18:34 +02:00
Michael Natterer 3ced1e18f4 app: fix GimpDeviceManager to not add the same display twice
Displays can be opened multiple times, which caused the device manager
to try to add their devices multiple times (which gets prevented with
warnings), and then remove the devices prematurely when the
multiple-opened display gets closed the first time (which is even
worse).

Add a simple hash that keeps track of how often displays are open, and
only add/remove their devices on first open and last close.

This actually happened with gtk-inspector on the gtk3-port branch, but
there is no reason this can't also happen in stable.
2018-05-10 14:18:59 +02:00
Marco Ciampa 577e01d48a Small fix in Italian translation 2018-05-10 00:39:14 +02:00