1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

Compare commits

...

928 Commits

Author SHA1 Message Date
Michael Natterer
a967e8d2c2 configure.ac: bump versions for the 2.10.8 release 2018-11-08 19:34:21 +01:00
Ell
3b07dc1f57 devel-docs: another typo fix in performance-logs.md TOC
:P

(cherry picked from commit 662636041c)
2018-11-08 11:00:08 -05:00
Ell
f8dda0d8eb devel-docs: fix typo in performance-logs.md TOC
(cherry picked from commit 5a077649f9)
2018-11-08 10:17:58 -05:00
Jehan
679e341285 Issue #2431: After coloring a selection and exporting to PDF, file...
... only shows the color (and nothing else) when "Convert bitmaps to
vector graphics where possible" was set.

This is because gimp_drawable_histogram() only checks selected pixels.
So let's make sure we work on a duplicate of the image so that we can
safely remove the selection before processing the export.
2018-11-08 15:24:42 +01:00
Ell
4cc0096450 themes: fix Dark theme tree-view selected text color during editing
In all themes, fix the color of selected text, while editing a
tree-view's item text (such as when renaming a layer), by
overriding tree-view specific styling with the global text-entry
style, for nested text entries inside tree-views.  The text would
previously use the same color as the selection background, making
it unreadable.

This issue affects the Dark and Gray themes, although this fix only
takes care of the Dark theme.
2018-11-08 07:22:55 -05:00
Ell
e23ce84dc0 devel-docs: fix typo in performance-issue screenshot
Gah :)
(cherry picked from commit 49375a3def)
2018-11-08 05:49:46 -05:00
Massimo Valentini
9cb1b66163 Issue #2454: recent libwmf uses pkg-config.
(cherry picked from commit df4e35a846)
2018-11-08 11:45:00 +01:00
Ell
5c51ecba31 devel-docs: fix typo in performance-logs/Makefile.am
(cherry picked from commit baa8aadc83)
2018-11-08 04:24:53 -05:00
Ell
805c5cc8a8 devel-docs: add performance-logs documentation
Add devel-docs/performance-logs/performance-logs.md, which
describes how to record and view performance logs, and how to
report perofrmance-related issues.

(cherry picked from commit fa9161e4f2)
2018-11-08 03:53:40 -05:00
Jehan
4e58d00eae libgimpmath: fix typo in various places: s/orthognal/orthogonal/.
(cherry picked from commit 4dc45f9658)
2018-11-07 23:40:53 +01:00
Jehan
b5e26f0399 libgimpbase: just remove a small typo in a doc comment.
(cherry picked from commit 1c9775d7bd)
2018-11-07 23:39:58 +01:00
Ell
fafeb7bf07 app: a few improvements to the GimpBacktrace Linux backend
Blacklist the "threaded-ml" thread, which seems to mask the
backtrace signal.

Improve signal-handler synchronozation, to avoid segfaulting when
giving up on waiting for all threads to handle the signal.
Furthermore, when one or more threads fail to handle the signal in
time, return a GimpBacktrace instance with backtraces for all the
other threads, and with empty backtraces for all the non-responding
threads, instead of returning NULL and leaking the allocated
instance.  Don't blacklist threads that failed to handle the signal
in time, and instead shorten the wait period for handling the
signal, and yield execution during waiting to lower the CPU usage.

(cherry picked from commit a29d040db5)
2018-11-07 14:26:40 -05:00
Ell
9489b66eec tools: a few improvements in performance-log-viewer.py
In sample-search predicates, remove the "exclusive" parameter of
the "function()" function, and replace it with optional "id" and
"state" parameters, which limit the match to the call-stacks of
matching threads, as per the "thread()" function.

Sort the backtrace thread-list by thread ID.

(cherry picked from commit 0b2d41635a)
2018-11-07 14:26:39 -05:00
Ell
3fdb5b32f7 tools: in performance-log-expand.py, preserve threads with empty stacks
... which can be present in logs since last commit.

(cherry picked from commit fb95d3b86e)
2018-11-07 14:26:39 -05:00
Ell
645e30e641 app: a few fixes to performance-log backtrace output
Fix delta-encoding of performance-log backtraces in certain cases,
and distinguish between empty call-stacks and removed threads.

(cherry picked from commit eec1e1f189)
2018-11-07 14:26:38 -05:00
Jehan
7c7e7c6012 desktop: update release date.
Still hope for tonight! Will it happen?! :-)

(cherry picked from commit 2c4831f90b)
2018-11-07 17:02:13 +01:00
Ell
ee3c6a9323 app: don't let image component mask affect channel colors
Connect GimpImage's gimp:mask-components node to the layers node
*before* connecting the channels node, so that the image's
component mask doesn't affect the channel colors, as is the case in
2.8.

(cherry picked from commit 56920dcdbf)
2018-11-04 13:24:05 -05:00
Ell
bc3847e851 app: avoid allocating empty tempbuf for drawable previews
In gimp_view_renderer_drawable_render(), make sure the preview size
is always at least 1x1.

Fixes commit 8009ea342a.

(cherry picked from commit 963322fdd4)
2018-11-03 04:30:23 -04:00
Ell
a4894b54ad tools: in performance-log-viewer.py, show variable descriptions
In the preformance-log viewer, show instrumentation-variable
descriptions as tooltips for the corresponding treeview rows.

(cherry picked from commit 21b36cd864)
2018-11-03 04:17:56 -04:00
Ell
b8862acee9 app: include variable descriptions in performance logs
Include instrumentation-variable descriptions in the var-defs
section of performance logs, so that they can be displayed
alongside their names when viewing the log.

(cherry picked from commit 646208eff0)
2018-11-03 04:17:55 -04:00
Ell
5456226c99 app: simplify drawable preview rendering
Simplify gimp_view_renderer_drawable_render(), by consolidating
common code paths.  In particular, when rendering the preview as
part of an image, always crop the preview to the bounds of the
image, even when downscaling, to avoid unnecessarily downscaling/
convering cropped-out regions.  We previously only did this when
upscaling the preview by a factor of 2 or more; whatever the reason
for this used to be, it's no longer there.

(cherry picked from commit 8009ea342a)
2018-11-03 04:06:17 -04:00
Ell
4f27efc4a0 Issue #2436 - Crash after downsizing canvas
In gimp_view_renderer_drawable_render(), avoid overflow in preview-
area calculation.  This prevents erroneously setting 'scaling_up'
to FALSE while upscaling the drawable by a very large amount, which
can lead to the creation of a very large GimpTempBuf for the
preview, causing memory allocation to fail.

(cherry picked from commit 0cdbe91e5a)
2018-11-02 21:44:10 -04:00
Rodrigo Lledó
9dadd2ad9e Update Spanish translation 2018-11-02 10:46:05 +00:00
Rodrigo Lledó
c447de9717 Update Spanish translation 2018-11-02 10:45:44 +00:00
Jehan
911d3945eb Issue #2160: Exporting to PCX results in a warped file.
Add line data padding when necessary.
Additionally I realize we should convert to little-endian after checking
the bytesperline oddness (this bug was most likely unnoticed until now
as most desktop proc are little endian now anyway).

(cherry picked from commit 5d319b77bf)
2018-11-01 22:24:30 +01:00
Piotr Drąg
b5a8a1fb2b Update Polish translation 2018-11-01 16:35:00 +01:00
Michael Natterer
a33a629bd9 Issue #2379 - Crash on saving
file_save(): make sure we always set an error on failure

file_save_dialog_save_image(): additionally, check that "error" exists
before dereferencing it.

(cherry picked from commit c55f2308e1)
2018-10-31 23:52:13 +01:00
Ell
ed7f9454c1 devel-docs: add "step" blending function to GGR format spec
(cherry picked from commit 026fe766cd)
2018-10-30 11:03:38 -04:00
Tobias Ellinghaus
7b4577a0e4 file-pnm: Remove clamping when loading PFM files
(cherry picked from commit bfcb7fc593)
2018-10-30 13:38:46 +01:00
Daniel Korostil
f63a7b293f Update Ukrainian translation 2018-10-29 12:10:03 +00:00
Ell
13ee89d491 app: fix tests for new show-tabs option
In app/tests, add the show-tabs pref, added in commit
1ca2d74411, to the expected sessionrc
files.

(cherry picked from commit 4113aaad69)
2018-10-27 05:43:18 -04:00
Ell
8a5ee944f7 Issue #2405 - Rotation center shifts by half a pixel ...
... the second time you do a 180 degrees rotation

In gimp_transform_resize_adjust(), nudge the transformed layer
boundary by EPSILON toward the center, to avoid enlarging the layer
unnecessarily, as a result of numeric error amplified by rounding,
when the tranformed boundary should land on integer coordinates.
In particular, this avoids enlarging the layer when rotating by 180
degrees.

(cherry picked from commit c271992aa0)
2018-10-27 00:14:51 -04:00
Alexandre Prokoudine
f46de793ae Update Russian translation 2018-10-26 01:55:59 +03:00
Alexandre Prokoudine
bd99d8e680 Fix Russian translation 2018-10-26 01:25:58 +03:00
Alexandre Prokoudine
b7766060ee Merge branch 'gerasimenko.olesya/gimp-update_russian_translation' into gimp-2-10 2018-10-26 01:21:38 +03:00
Anders Jonsson
99e1de90a6 Update Swedish translation 2018-10-25 19:23:44 +00:00
Piotr Drąg
d7ba5f6b2c Update Polish translation 2018-10-25 19:25:24 +02:00
Olesya Gerasimenko
02ccdf0f07 Updated Russian translation 2018-10-25 16:52:50 +03:00
Michael Natterer
c7dd4d8dd3 Issue #2235 - Color reset/swap keyboard shortcuts not discoverable...
...via hover tooltips

Use the GtkWidget::query_tooltip() signal on GimpFgBgEditor to emit an
own signal "tooltip" that has the hovered widget area as parameter.

Connect to GimpFgBgEditor::tooltip() in gimptoolbox-color-area.c and
set separate tooltips on the widget's areas, including the shortcuts
for "Swap colors" and "Default colors".

(cherry picked from commit ae9d84dd22)
2018-10-25 14:58:57 +02:00
Daniel Korostil
3f7ca2b28a Update Ukrainian translation 2018-10-25 11:05:02 +00:00
Marco Ciampa
7e77d3fc32 Some small fixes in Italian installer translation 2018-10-25 11:10:39 +02:00
Jernej Simončič
dde5de7340 Installer: don't scan recursively for configuration override files 2018-10-24 20:50:49 +02:00
Marco Ciampa
43def2f1aa Updated Italian translation 2018-10-24 12:44:49 +02:00
Marco Ciampa
6cf04bef6d Updated Italian translation 2018-10-24 12:37:23 +02:00
Oleksii Samorukov
7dbb9fee3d Fix compilation on Mac 10.6 and 10.7 (#2112) 2018-10-24 10:37:36 +02:00
Piotr Drąg
62eabad7a9 Update Polish translation 2018-10-23 21:23:18 +02:00
Ell
f6df603471 app: use "step" blending function in "FG to BG (Hardedge)" gradient
Use a single segment with a "step" blending function, added in the
previous commit, instead of two separate segments, for the "FG to
BG (Hardedge)" internal gradient.  This makes it simpler to change
its endpoint colors by modifying the gradient, instead of changing
the FG/BG colors.

(cherry picked from commit 84066ca26a)
2018-10-23 12:22:57 -04:00
Ell
0462734ffb Issue #2303 - Please add Constant type of gradient interpolation ...
... to make multi-color hard-edge gradient fills possible

Add a new "step" gradient-segment blending function, which is 0
before the midpoint, and 1 at, and after, the midpoint.  This
creates a hard-edge transition between the two adjacent color stops
at the midpoint.  Creating such a transition was already possible,
but required duplicating the same color at the opposing ends of two
adjacent stops, which is cumbersome.

(cherry picked from commit 68bf99e806)
2018-10-23 12:22:57 -04:00
Elle Stone
59682a1cb1 Issue #2345 - Add xyY to color sample readouts
Add xyY color space to the color spaces for sampling colors.

Also add code to xcf-load.c that makes sure the sample point loading
code handles unknown future GimpColorPickMode values (fall back to
PIXEL pick mode).

(cherry picked from commit 298cc57042)
2018-10-23 18:15:28 +02:00
Piotr Drąg
150b6c0501 Update Polish translation 2018-10-23 18:13:30 +02:00
Øyvind Kolås
20a1a31fc4 configure/app: depend on GEGL 0.4.12
(cherry picked from commit a39b4abfbc)
2018-10-23 14:39:43 +02:00
Sergio Jiménez Herena
360aee10d8 app: Add option in the windows menu to hide the image tab bar. 2018-10-22 20:41:29 +02:00
Michael Natterer
6564f4c713 Issue #2386 - Pattern fill with selection is shifted in 2.10
Add pattern offset parameters to gimp_fill_options_create_buffer() and
pass the selection's top-left corner so that pattern fills on the same
drawable are aligned.

(cherry picked from commit 38dcb73bfc)
2018-10-22 16:41:50 +02:00
Michael Natterer
4e103be4e5 Issue #2388 - CRITICAL: XMP Toolkit error 4: Invalid UTF-8 data byte
In gimp_metadata_add_xmp_history(), make sure the string returned by
strftime() has a terminating \0 after we mess with its format.

(cherry picked from commit 8421221b60)
2018-10-22 15:50:46 +02:00
Michael Natterer
7dc96c8f34 Issue #2332 - Marching ants from one image displayed on every tab
Seems we were drawing marching ants for hidden tabs ever since the
introduction of SWM, which is both a horrible waste of CPU time, and
also makes all selections visible on all displays on GTK+ 3.x.

Implement GtkWidget::unmap() in GimpDisplayShell and stop the ants
when the shell is unmapped.

(cherry picked from commit 1d43e2ff37)
2018-10-22 00:06:18 +02:00
Ell
8e6c7c10df tools: in performance-log-viewer.py, allow sorting profile by function name
In the performance-log viewer's profile view, allow sorting the
call-graph tree-views by function name, in addition to the
inclusive/exclusive frequencies.

(cherry picked from commit 4664fa73fb)
2018-10-21 03:37:35 -04:00
Marco Ciampa
20420b338c Updated Italian translation 2018-10-21 02:42:52 +02:00
Daniel Korostil
4efd6dfdbc Update Ukrainian translation 2018-10-20 19:18:41 +00:00
Ell
34f0cc3692 tools: in performance-log-viewer.py, fix percentage cell renderer
(cherry picked from commit 27dc9b815d)
2018-10-20 10:56:39 -04:00
Marco Ciampa
728534d416 Update Italian translation 2018-10-20 16:21:55 +02:00
Marco Ciampa
90fcfb0184 Update Italian translation 2018-10-20 15:37:12 +02:00
Michael Natterer
f95af9e571 docs, etc: regenerate system gimprc and its manpage 2018-10-20 11:31:29 +02:00
Liam Quin
8da246b2a3 Issue #1371 - Add title printf-like expando for export-clean and export-dirty
Add %Ex to print 'x' as export-clean indicator and %Nx for 'x' as
export-dirty indicator.

(cherry picked from commit 2e4b3ae05a)
2018-10-20 11:25:44 +02:00
Snehalata B Shirude
b20bb29148 Update Marathi translation 2018-10-20 07:03:42 +00:00
Jehan
6b1ff0dd96 Issue #1924: Tool options mysteriously lock up due to DND/quartz issues.
On macOS, the "drag-end" signal does not seem to be emitted in some
cases, which leaves dockables in an unsensitive state. Rather than
trying to fix GTK+2 which is half-maintained nowadays anyway, let's drop
the unsensitivity. As a comment notes, this was anyway only a visual
cue. Dragging dockables in GIMP 2.10 already shows a lot of other visual
cues, so this is redundant.
In case of drop failure, we also had to cleanup the icon widget and
detach the dockable. This can be handled by the "drag-failed" (which
hopefully work better on macOS).

As an additional improvement, I raise the newly created dockable window,
since this is the most likely behavior when you just detached a dock
(and I realize it usually appeared behind other GIMP windows, at least
on GNOME).

Note: this is a gimp-2-10 only fix as master relies on GtkNotebook DnD
code which (hopefully, as I haven't tested) doesn't have this issue. The
detached window behind other windows issue doesn't exist on master, at
the very least.
2018-10-19 21:46:54 +02:00
Ell
54dc73192f tools: in performance-log-viewer.py, visualize percentage in profile viewer
In the performance-log viewer's profile view, displasy in-line bar-
chart-like visualization of function and source-line sample
percentages, as part of the corresponding tree-view cells.

(cherry picked from commit 26ea334825)
2018-10-19 10:11:01 -04:00
Marco Ciampa
c36b1d0523 Small fix in Italian translation 2018-10-19 11:42:37 +02:00
Josef Ridky
56c8f8320d Issue #2087 - Issues discovered by coverity scan
Add missing fclose invocations and fix copy-paste issue.

This issues has been discovered by coverity scan proceeded by Red Hat.

Fixed some mistakes in the patch and added more fclose() (Mitch)
2018-10-19 11:24:48 +02:00
Øyvind Kolås
8bd365a109 NEWS: update 2018-10-18 18:48:42 +02:00
Michael Natterer
21214d5dd1 configure.ac: reorder the list of required versions in 2.10 too
so we can cherry-pick things again from master.
2018-10-18 18:35:02 +02:00
Øyvind Kolås
02936d9303 configure/app: depend on GEGL-0.4.10 2018-10-18 18:32:24 +02:00
Øyvind Kolås
793ae3f771 configure/app: depend on babl-0.1.58 2018-10-18 18:32:24 +02:00
Oleksii Samorukov
3adf4a4861 Fix plugin focus issues on osx
GTK/OSX does not automatically assign focus to the new windows (upstream 
issue), so activateIgnoringOtherApps is called. However, if it is called 
before gtk initialized it may cause number of focus issues.
2018-10-18 09:26:05 +02:00
Tim Sabsch
ee05ada0c4 Update German translation 2018-10-17 17:24:05 +00:00
Piotr Drąg
f0eabdc42f Update Polish translation 2018-10-16 21:08:05 +02:00
Marco Ciampa
d9ba60de4d Updated Italian translation 2018-10-16 16:06:39 +02:00
Ell
60c49c5682 Issue #2237 - export as, select file type (by extention) list problem
In gimp_file_proc_view_get_proc(), when there is no selected
procedure (which can happen, in particular, when searching the
list), return the "automatic" procedure and its corresponding name/
filter, if one exists, instead of bailing.

Additionally, in GimpFileDialog, use a match-all filter when
gimp_file_proc_view_get_proc() returns no filter, avoiding
CRITICALs/segfault.

(cherry picked from commit e26a220a6f)
2018-10-16 07:50:02 -04:00
Alan Mortensen
7d0d74912e Updated Danish translation 2018-10-15 14:14:59 +02:00
Alan Mortensen
efd1aca6fa Updated Danish translation 2018-10-14 20:14:18 +02:00
Michael Natterer
70611cb06a app: didn't push my latest version of the previous fix 2018-10-13 17:35:53 +02:00
Michael Natterer
130443a059 Issue #2210 - GIMP crashes on startup if usb mouse is present
In GimpDeviceInfo, make sure that the info->axes and info->keys arrays
always have info->n_axes and info->n_keys members. Also sync axes and
keys between GdkDevice and GimpDeviceInfo more often, and some
cleanup.

(cherry picked from commit 7adb6c26e5)
2018-10-12 20:18:23 +02:00
Alan Mortensen
e8f3751adc Updated Danish translation 2018-10-12 01:41:21 +02:00
Ell
65131b2c1b tools: fix performance-log viewer profile thread-filter
In performance-log-viewer.py, fix thread-state toggling in the
profile-view thread-filter popover, when not all threads are
included in the current selection.

(cherry picked from commit 43b492ff83)
2018-10-11 08:23:19 -04:00
Ell
b1cba6b142 app: always use libunwind for symbol names in GimpBacktrace Linux backend
In the GimpBacktrace Linux backend, always use libunwind, when
available, to find symbol names, even if dladdr() or libbacktrace
had already found one.  libunwind provides more descriptive names
in certain cases, and, in particular, full symbol names for C++
lambdas.

Note that, in some cases, this can result in a discrepancy between
the reported symbol name, and the corresponding source location.

(cherry picked from commit 72fc01742b)
2018-10-11 03:35:30 -04:00
Ell
397bbb29a9 app: fix gimp_wait() deadlock
In the GUI implementation of gimp_wait(), explicitly finish the
input-pipe async operation after the busy-dialog plug-in
terminates, to avoid the async callback function from being
repeatedly called, stalling the main thread.  Previously, this code
relied on gimp-parallel implicitly aborting the async operation,
but this is no longer the case since commit
4969d75785.

(cherry picked from commit 85b16b9eaa)
2018-10-11 02:26:08 -04:00
Ell
8c91206d55 tools: add performance-log-coalesce.py; use in performance-log-viewer
Add a new performance-log-coalesce.py tool, which groups together
performance-log address-map entries belonging to the same function
into a single symbol, by filling-in missing base symbol addresses.
The addresses are grouped such that each set of addresses
corresponding to a symbol of the same name, in the same source
file, are given the same (unique, but arbitrary) base address.
See the previous commit for why this is necessary.

This should work fine in most cases, however, for logs produced on
Windows, it can over-coalesce addresses belonging to different C++
lambda-functions in the same source file, since they all seem to be
given the same _FUN symbol name.

Use the new tool as part of the pipeline in performance-log-viewer.

(cherry picked from commit cb51ea981a)
2018-10-10 15:32:23 -04:00
Snehalata B Shirude
f314bbd515 Update Marathi translation 2018-10-10 18:22:20 +00:00
Ell
d0fdff7117 app: in GimpBacktrace Windows backend, avoid bogus symbol addresses
In the GimpBacktrace Windows backend, avoid reporting meaningless
symbol addresses when failing to retrieve meaningful ones.
Unfortunately, it seems that we never get symbol addresses for
symbols that have debug information, which negatively affects the
log viewer's call graph.  We're going to have to work around this.

(cherry picked from commit 52772cf3ff)
2018-10-10 10:02:09 -04:00
Ell
ca8bbd2e3d app: in GimpBacktrace Windows backend, set main-thread name
When initializing the GimpBacktrace Windows backend, set the name
of the current thread (which is assumed to be the main thread) to
the program's name, to match its name on Linux.  We normally rely
on the SET_THREAD_NAME exception to set thread names on Windows,
which isn't raised for the main thread.

(cherry picked from commit 52908f397f)
2018-10-10 10:02:09 -04:00
Marco Ciampa
58dccd6cf5 Updated Italian translation 2018-10-10 13:17:25 +02:00
Ell
93d1219507 app: improve description comment of GimpAsync
(cherry picked from commit ca6e4eb460)
2018-10-10 01:03:46 -04:00
Ell
15767a8896 Issue #2339 - Error while executing script-fu-ripply-anim
In ripply-anim.scm, correct the edge-type argument passed to
plug-in-displace.

(cherry picked from commit 5e6e979a00)
2018-10-09 19:31:27 -04:00
Ell
9f86b58a38 app: allow progressive execution of parallel async operations
In the gimp_parallel_run_async() family of functions, allow the
async callback to return without completing the async operation, in
which case the callback will be called again, until the operation
is either completed, or canceled, in which case it is aborted
(previously, returning from the callback without completing the
operation would cause it to be aborted.)  It is guaranteed that all
operations of the same priority will get a chance to run, even if
some of them contuinuosly return without completing.

This allows potentially time-consuming operations to yield
execution in favor of other same-priority operations, and, in
particular, of higher-priority operations, to avoid priority
inversion.  Essentially, this allows a simple form of cooperative
multitasking among async operations.

(cherry picked from commit 4969d75785)
2018-10-09 12:49:42 -04:00
Alexandre Prokoudine
64f881803a Update NEWS 2018-10-07 01:43:54 +03:00
Ell
e0e825580b Issue #2308 - Strange behavior when switching active layer during transform
Replace GimpTransformTool's 'drawable' field with an 'item' field,
and have GimpTransformGridTool set it to the active item, to which
the transformation is applied, during its initialization.  In
gimp_transform_tool_get_active_item(), return the value of the
transform tool's 'item' field, if not NULL, instead of the image's
active item.  This makes sure we apply that transform-grid tools
apply the transformation for the item for which they were
activated, even if the image's active item has changed.

(cherry picked from commit 3eaae58595)
2018-10-04 21:51:38 -04:00
Ell
32c2aa11df themes: fix check/radio buttons in tree views
Apply the check/radio-button style to GtkTreeView, so that
GtkCellRendererToggle picks the right check/radio-button graphic.
Otherwise, it falls back to a graphic that depends on the system
theme, and which may not play well with the current theme colors.

Note that this only affects the Dark theme; in the Light and Gray
themes, one of the KDE-hack styles "takes care" of this, but this
commit applies the same change to these themes anyway.
2018-10-04 21:51:30 -04:00
Daniel Korostil
eea3d3bbaa Update Ukrainian translation 2018-10-04 07:44:56 +00:00
Anders Jonsson
8b09905d73 Update Swedish translation 2018-10-02 21:31:18 +00:00
Tim Sabsch
7ac215dda3 Update German translation 2018-10-02 18:04:16 +00:00
Tim Sabsch
381ee94c8c Update German translation 2018-10-02 18:00:19 +00:00
Hannie Dumoleyn
c3f43465a4 Update Dutch translation 2018-10-02 07:22:17 +00:00
ONO Yoshio
41bacb7cbc plug-ins: fix a datasourcetype does not shown in metadata-editor.
Tag of DigitalSourceType has 5 entries, but the combobox shown
only 4 items.

(cherry picked from commit 3c92b5e00b)
2018-10-02 08:49:03 +09:00
Snehalata B Shirude
d2b5dff3d0 Update Marathi translation (plugins/script-fu/tags) 2018-10-01 13:56:23 +02:00
Snehalata B Shirude
b96672c3aa Update Marathi translation 2018-10-01 13:50:44 +02:00
Ell
e8fef315c5 app: in gimp-parallel, cancel ongoing async operations upon exit
When shutting-down gimp-parallel, cancel and/or abort any ongoing
and queued async operations, instead of finishing them (async
operations that already started executing will be canceled, but
execution will be blocked until they're finished.)  This is
especially important since we're shutting down gimp-parallel before
the destruction of data factories.  This commit causes any ongoing
async operations of the factories to be canceled on shutdown,
rather than waiting for them to finish normally.

(cherry picked from commit e46fdc714e)
2018-10-01 05:24:59 -04:00
Ell
7058aa259b app: add gimp_data_factory_data_cancel()
Add a new GimpData::data_cancel() virtual function, and a
corresponding gimp_data_factory_data_cancel() function.  This
function should cancel any ongoing async operations related to the
factory (i.e., included in its async set), and wait for the
operations to finish.  Provide a default implementation that simply
cancels and waits on the factory's async set.

Use this function to cancel any ongoing operations during factory
destruction, and in gimp_data_factory_data_free().

Override this function in GimpFontFactory, for which we can't
really cancel font loading, and simply cancel and clear the
factory's async set without waiting for loading to finish, making
sure that nothing happens (and, in particular, that the factory
isn't being accessed, since it might be already dead) when loading
does finish.

(cherry picked from commit 6bc0b3b8ad)
2018-10-01 05:24:59 -04:00
Ell
937f5ea0f0 app: don't depend on GimpData sort order for identifying internal data
In gimp_data_factory_data_foreach(), don't rely on internal
GimpData objects being sorted first (while this is currently true
for all types of GimpData, they may override the sort order.)

(cherry picked from commit 50bab438ce)
2018-10-01 05:24:59 -04:00
Alexandre Prokoudine
c0d00cba4a Update NEWS 2018-09-30 23:52:46 +03:00
Jehan
8a91cde184 INSTALL: update mypaint-brushes repository (finally upstream!).
The MyPaint project now hosts the repository which was under my name
previously. Yeah!

(cherry picked from commit 5ac267820f)
2018-09-30 21:07:40 +02:00
Ell
c6f1196721 tools: in performance-log-viewer.py, add annotated source view
Add an annotated source view to the performance-log viewer's
profile view.  When selecting the [Self] entry of a function's
profile, for which source information is available and whose source
is found locally, a new column opens, showing the function's
source, annotated with sample statistics.  Header-bar buttons allow
navigation through the annotated lines, selection of all the
samples corresponding to a given line, and opening the text editor
at the current line.

(cherry picked from commit 88438c5055)
2018-09-30 09:01:38 -04:00
Ell
8624f3070e tools: in performance-log-view.py, don't change call-graph path ...
... when selecting a function's samples

Since we now preserve the call-graph path across state changes,
there's no need to explictly set the path after selecting a
function's samples in the profile view.

(cherry picked from commit b672f20075)
2018-09-30 09:01:38 -04:00
Ell
4358430050 tools: in performance-log-viewer.py, cache source file lookups
In the performance-log viewer, cache the results of source-file
lookups, to speed up future lookups.

(cherry picked from commit 97498017c0)
2018-09-30 05:37:25 -04:00
Ell
33269cc8ff tools: in performance-log-viewer.py, allow viewing source files ...
... in backtraces

In the performance-log viewer's backtrace viewer, show a document
icon next to stack frames with source-location information, whose
source file is found locally.  Clicking the icon opens the source
file in a text editor at the relevant line.

Two environment variables control this feature:

  - PERFORMANCE_LOG_VIEWER_PATH is a list of colon-separated
    directories in which to look for source files.  If this
    variable is undefined, the current directory is used.

  - PERFORMANCE_LOG_VIEWER_EDITOR is the command to use to launch
    the text editor, for editing a specific file at a specific
    line.  The special strings "{file}" and "{line}" are replaced
    with the filename and line-number, respectively.  If this
    variable is undefined, "xdg-open {file}" is used.

(cherry picked from commit 0f38709259)
2018-09-30 05:10:52 -04:00
Jehan
788eb090b8 plug-ins: add more generated files in .gitignore.
(cherry picked from commit cb892aa0e6)
2018-09-29 23:18:03 +02:00
Sergio Jiménez Herena
0839a55d51 plug-ins: pygimp: Add autogenerated python files to .gitignore 2018-09-29 21:04:44 +00:00
Anders Jonsson
d9cb86de83 Update Swedish translation 2018-09-29 22:18:54 +02:00
Ell
c44015a84e tools: in performance-log-viewer.py, handle infinities in sample graph
Don't take infinite values into account when calculating the
vertical scale of sample graphs, and rather display infinite values
as dashed lines at the top of the graph.

(cherry picked from commit 46e5e4d478)
2018-09-29 15:43:50 -04:00
Ell
fc77bf31bc app: avoid double-initialization of operation tools when changing layers
When re-activating an operation tool by clicking on a different
drawable while the tool is active, we re-call the corresponding
procedure to re-activate the tool, which implictly initializes it.
Avoid initializaing it explicitly in addition to that, since this
leads to the creation of a new config object by the filter tool,
while the GUI still refers to the old, now-dead, config object,
causing CRITICALs or segfaults when changing any parameter.

(cherry picked from commit a21667821c)
2018-09-29 14:31:52 -04:00
Ell
9b3c2e9b4e app: don't commit trivial warp transform
In the warp tool, don't commit a trivial (empty) transform.  This
is especially important now that exiting the tool through undo
causes it to get comitted (... with a trivial transform).

(cherry picked from commit d12dd3fb35)
2018-09-29 12:38:50 -04:00
Ell
943757c136 Issue #1180 - Warp tool aborts changes to layer A when ...
... changing layers and warping layer B

Add a new GimpToolControl::dirty_action field, which specifies the
tool action to perform when the a dirty event matching the tool
control's dirty mask occurs; this field defaults to HALT.  Apply
this action to the active tool in tool-manager in response to a
matching dirty event, instead of unconditionally halting the tool.
Likewise, use this action to stop the active tool in response to a
button-press event on a different drawable in the same image.

Set the dirty action of the gradient and warp tools to COMMIT, so
that they get comitted, rather than stopped, in cases such as
switching layers (including switching to/from quick-mask mode),
and, for the warp tool, changing the selection.

(cherry picked from commit ed20393f0e)
2018-09-29 12:38:50 -04:00
Alan Mortensen
498c3f5b06 Updated Danish translation of gimp-windows-installer 2018-09-29 17:44:09 +02:00
Alan Mortensen
2ce208c0f2 Updated Danish translation of gimp-plug-ins 2018-09-29 17:44:07 +02:00
Alan Mortensen
66acf6641c Updated Danish translation of gimp-libgimp 2018-09-29 17:44:06 +02:00
Alan Mortensen
e98dbc3d53 Updated Danish translation 2018-09-29 17:40:37 +02:00
Ell
2e47f8277c app: avoid applying buffer to drawable if application region is empty
In gimp_drawable_real_{apply,replace}_buffer(), bail if the
applcation region, after intersection with the drawable and mask
extents, is empty.  This avoids trying to create a GeglBuffer with
negative width/height.

(cherry picked from commit ae3c006293)
2018-09-29 10:27:26 -04:00
Ell
fce08d2af7 Issue #2287 - Weird things happen with dodge tool ...
... (some sort of corruption)

In gimp_drawable_real_replace_buffer(), adjust the processed buffer
and mask_buffer regions according to the changes made to the
application region, as calculated by intersecting it with the
drawable and mask extents.  This fixes wrong application position
when painting using the heal, dodge/burn, smudge, or convolve
tools, on a drawable whose origin is above/to the left of the
image's origin, and there's a selection active.

(cherry picked from commit a782acab57)
2018-09-29 10:27:26 -04:00
Ell
943f92a6ac Issue #2222 - Warp Transform doesn't commit changes upon saving ...
... the XCF file

Add a "saving" signal to GimpImage, which is emitted when the image
is about to be saved or exported (but before it's actually saved/
exported).  Connect to this signal in tool-manager, and commit the
current tool in response (unless its GimpToolControl::preserve is
TRUE).

(cherry picked from commit ae628a8664)
2018-09-29 02:40:27 -04:00
Ell
df265073e4 tools: in performance-log-viewer.py, retain call-graph path
In the performance-log viewer's profile view, retain the current
call-graph path across state changes.

(cherry picked from commit fca05065e1)
2018-09-29 00:16:25 -04:00
Ell
61367b3f39 app: in performance-log-viewer.py, add undo support
Add undo functionality to the performance-log viewer, which allows
undoing/redoing changes to the sample selection, and the call-graph
state.

(cherry picked from commit 6ad3dbdb17)
2018-09-28 16:31:00 -04:00
Daniel Mustieles
45ee51c9ec Updated Spanish translation 2018-09-28 16:00:38 +02:00
Daniel Mustieles
d8a4e810da Updated Spanish translation 2018-09-28 13:01:58 +02:00
Piotr Drąg
f5598dc746 Update Polish translation 2018-09-28 00:06:08 +02:00
Jehan
e736532637 desktop: prepare release of GIMP 2.10.8.
Please everyone, feel free to update the list of upcoming
changes/features, if you feel some particular change should be more
prominently exposed in this list (or at the opposite that some change is
not worth mentionning), or for rewording, etc.

(cherry picked from commit ba53a833b2)
2018-09-27 23:33:22 +02:00
Ell
c9510721c5 app: construct tool-options GUI lazily
We currently construct the tool-options GUI for all the tools at
startup, which takes a significant amount of time.  Instead,
only register the GUI construction function with the tool-options
object, using the new gimp_tools_set_tool_options_gui_func()
function, and use the registered function to construct the GUI when
actually needed.

(cherry picked from commit c1347a7f26)
2018-09-27 02:44:35 -04:00
Ell
6bc2b330bb tools: various improvements in gimp-performance-log-viewer.py
Fix int-ratio variable formatting when the input is NaN, which can
happen when calculating the standard deviation, if all the values
are infinite.

Fix keyboard sample-range selection.

Deselect all samples when right-clicking a sample graph.

(cherry picked from commit d33fb0e7b8)
2018-09-27 01:13:12 -04:00
Ell
97a29b1e9e plug-ins: in script-fu, don't query PDB procedures' info on startup
script-fu used to query the information of every PDB procedure on
startup, in order to get the number of parameters for each
procedure.  This was done so that nullary procedures were defined
in such a way as to accept (and ignore) any number of arguments
(and at least one of the scripts we ship relies on this behavior).
However, this requires expensive back-and-forth communication with
the main GIMP process, which notable slowed down script-fu's
startup, and had a non-negligible impact on GIMP's startup time.

Instead, avoid querying procedure information, and implement the
special behavior for nullary procedures at call time.  We do this
by defining, in addition to the "strict" gimp-proc-db-call
procedure, a "permissive" -gimp-proc-db-call internal procedure,
and using the latter to call the predefined PDB procedures.

(cherry picked from commit 9a2999a553)
2018-09-26 14:41:29 -04:00
Rafael Fontenelle
edeb1d2981 Update Brazilian Portuguese translation 2018-09-26 08:12:38 -03:00
Rafael Fontenelle
140e371d5a Update Brazilian Portuguese translation 2018-09-26 08:12:22 -03:00
Marco Ciampa
35bf5bcab7 Updated Italian translation 2018-09-26 10:48:10 +02:00
Ell
49390462c8 Issue #2272 - Crash when using the intelligent-scissors tool ...
... after erasing all points

When erasing the last remaining point in the iscissors tool, halt
the tool, rather than leaving the tool active with an empty curve,
which it is not prepared to handle, and which results in a segfault
once trying to add a new point.

Additionally, when erasing the last remaining segment (i.e., the
two last remaining points), don't erase the entire segment (i.e.,
both points), but rather convert the segment to its initial point,
so that, in effect, we only erase the last point of the segment.

(cherry picked from commit a5baba5539)
2018-09-26 02:14:36 -04:00
Marco Ciampa
6e1d542128 Updated Italian translation 2018-09-25 23:09:56 +02:00
Ell
6a8ece0fd5 app: confirm transforms that result in very large items
In GimpTransformTools, precalculate the resulting size of the
transformed item(s), and request confirmation if the size grows to
over 10 times the size of the image (in either dimension).  This
protects against transformations that can result in suprprisingly
large items, such as inverted transformations, and, specifically,
perspective-correction transformations performed using the measure
tool, which will be added in the following commits.

(cherry picked from commit 20a6a3583b)
2018-09-25 04:31:37 -04:00
Ell
9ad52a2220 app: add gimp_drawable_transform_get_effective_clip()
Which returns the actual clip mode that will be used by the
drawable for a particular transformation.

(cherry picked from commit 2ae823ba2b)
2018-09-25 04:31:37 -04:00
Ell
3fe077a74c app: indentation fix in gimpdrawable-transform.[ch]
(cherry picked from commit 2c52bba071)
2018-09-25 04:31:37 -04:00
Ell
0f367371aa app: tweak focus behavior of GimpToolWidgetGroup when removing widget
When removing the focus widget of a GimpToolWidgetGroup, use the
last child, rather than the first child, as the new focus widget.
This plays nicer with auto-raise, and is probably better anyway.

(cherry picked from commit 24fb597196)
2018-09-23 13:26:55 -04:00
Ell
693cea427a app: in GimpToolWidgetGroup, improve focus behavior when adding/removing widgets
When a focused widget is added to a group, make it the new focus-
widget of the group, instead of unsetting its focus if another
widget already has focus.

When removing the focused widget from a group, set a different
widget as the group's focus widget (if one exists), instead of
unsetting the focus widget, so that nonempty groups always have a
focus widget.

(cherry picked from commit 95d2c92ff2)
2018-09-23 13:26:55 -04:00
Ell
f479711814 app: in GimpToolWidgetGroup, calculate hover widget at button press
In gimp_tool_widget_group_button_press(), explicitly call
gimp_tool_widget_group_hover() before forwarding the event to the
group's hover widget, so that the hover widget gets recalculated.
If a widget is added to the group as a result of a button-press
event, this guarantees that it gets considered as a target for the
same event.

(cherry picked from commit 5b217b3ad4)
2018-09-23 13:26:55 -04:00
Ell
54fbf1a8cb tools: in performance-log-viewer.py, right-align backtrace frame number column
(cherry picked from commit 51d9934942)
2018-09-23 01:38:17 -04:00
Ell
fab6b4746d tools: in performance-log-viewer.py, set thread filter search column
(cherry picked from commit 407e9f36ca)
2018-09-23 01:17:57 -04:00
Ell
b5d628bec2 tools: in performance-log-viewer.py, add thread filter to profile
In the performance-log viewer, add an option to filter which
threads, and which states of each thread, are included in the
profile.  By default, all threads in the RUNNING state are
included.

(cherry picked from commit 3f630378b0)
2018-09-23 00:53:30 -04:00
Ell
ea17d18d1b tools: in performance-log-viewer.py, defer UI updates util needed
In the performance-log viewer, defer updates to the various UI
elements when the selection changes until they're actually shown.
This improves responsiveness when changing the selection.

(cherry picked from commit a7afbe13ec)
2018-09-23 00:53:30 -04:00
Ell
0207c9baa1 configure.ac: fix libbacktrace test
... added in last commit.

(cherry picked from commit 0245775346)
2018-09-22 22:46:43 -04:00
Ell
b065ff7de7 app: add source location information to the Linux GimpBacktrace backend
When libbacktrace is available, use it to retrieve source location
information in the Linux GimpBacktrace backend.

(cherry picked from commit 7cdd1ebeef)
2018-09-22 22:39:17 -04:00
Ell
cb26c31a96 tools: only show object/source basename in performance-log backtraces
... to reduce their verbosity.  Show the full path in the
corresponding tooltip.

(cherry picked from commit 2c8e3f8e0a)
2018-09-21 09:29:13 -04:00
Ell
e839794d36 tools: replace performance-log viewer call-graph direction icons
Use the less-ambiguous, if just as clumsy,
"format-indent-more/less" icons, to stand for the
caller -> callee, and callee -> caller, directions, respectively.

(cherry picked from commit c7a4eb4602)
2018-09-21 07:45:19 -04:00
Ell
0a900542be themes: fix arrow color of menu items with a submenu
Commit 6484e91f82 broke the arrow
color of menu items with a submenu in the Dark theme; it seems to
have always been broken in the Light and Gray themes.

Fix this, by applying the default style to the GtkMenuItem class.
2018-09-21 04:07:44 -04:00
Ell
c0e82c0381 tools: a few improvements in performance-log-viewer.py
Fix searching for samples by thread name, in particular, when there
are unnamed threads.

Use GtkMenuButton, instead of GtkButton, for the find-samples
header button.

Add mnemonics to the find-samples popover.

(cherry picked from commit c537341d35)
2018-09-21 02:42:05 -04:00
Ell
e1b85e1109 Revert "app: disable parallel asynchronous operations when GEGL_THREADS=1"
This reverts commit 1c435f313b, which
is no longer necessary after GEGL commit
c8a0b9eff07c8d9122f55f7b7527d51788ae4575.
2018-09-20 08:10:47 -04:00
Mario Blättermann
b4f4aa5bea Replace de.po 2018-09-20 09:04:58 +00:00
Mario Blättermann
2eb640e1e5 Replace de.po 2018-09-20 08:57:41 +00:00
Dimitris Spingos
30cf61f877 Updated Greek translation 2018-09-20 07:40:48 +03:00
Jehan
2fa73961c7 NEWS: add file-rawtherapee improvements (better discovery). 2018-09-19 15:11:48 +02:00
Simon Mueller
1c993c44cb Issue #2179: Get rid of the win32_use_hkcu flag.
Simply always check HKCU first. If that lookup did not yield any result,
fall back to HKLM.

(cherry picked from commit 6a5023a38a)
2018-09-19 15:07:26 +02:00
Simon Mueller
fc4cb8443e Issue #2179: Make file_rawtherapee use the registry value that is...
... provided by RawTherapee's installer (version 5.5+).

See https://github.com/Beep6581/RawTherapee/issues/4783.
This patch required a small change to file_raw_get_executable_path
because the RawTherapee installer is supposed to work without admin
privileges and therefore can't write to HKLM.

Reviewer's note (Jehan): RawTherapee's installer does not add the
registry entry yet. We assume the upstream bug report will end up doing
so (someone has to make the first step!). :-)

(cherry picked from commit 829ca6583d)
2018-09-19 15:07:18 +02:00
Alexandre Prokoudine
c38b600546 Update NEWS 2018-09-19 02:07:45 +03:00
Ell
07c134e673 app: fix incompatible pointer type warning in gimpviewrendererdrawable.c
... more GLib 2.58 fallout.

(cherry picked from commit a5c8dd5c73)
2018-09-18 16:23:45 -04:00
Ell
6f83f69e9a app: fix unhandled enumeration value warning in gimptextlayer.c
(cherry picked from commit a84b57e67e)
2018-09-18 16:23:45 -04:00
Ell
31b369d09f app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()

g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58.  Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.

This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.

Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 14:41:35 -04:00
Ell
ee11477dc5 app: some cleanup in gimppaintcore-loops
In gimp_paint_core_loops_process(), initialize the iterator with
sufficient room for the number of iterators used by the algorithm
hierarchy, instead of a fixed number.

Add an additional 'rect' parameter to the init_step() and
process_rows() algorithm member functions, which receives the area
of the currently-processed chunk, to be used instead of the
iterator's ROI member.  This allows us to pass a NULL iterator to
hierarchies that don't use an iterator, and avoid the stack-
allocated iterator hack we used in this case (and which became even
more problematic with the new iterator API).

(cherry picked from commit 6c6a7514a4)
2018-09-18 12:54:18 +02:00
Øyvind Kolås
ef035fb297 plug-ins: migrate pagecurl to new iterator api
(cherry picked from commit 6fca9959c7)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
a5bbf913a4 plug-ins: migrate screenshot-x11 to new iterator api
(cherry picked from commit cc10af72cc)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
8b3cd3057f plug-ins: migrate print-draw-page to new iterator api
(cherry picked from commit 49c53568d7)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
ccf682052e plug-ins: migrate ifs compose to new iterator api
(cherry picked from commit 8edbc0d491)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
115c9070a4 plug-ins: migrate file-tiff-load to new iterator api
(cherry picked from commit 29f63616d2)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
01be5ca184 plug-ins: migrate psd plug-ins to new iterator api
(cherry picked from commit 3a2014984d)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
78b81a200a plug-ins: migrate gradient-map to new iterator api
(cherry picked from commit ee48ec6877)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
35713ad1ff plug-ins: migrate qbist to new iterator api
(cherry picked from commit 4165a315d5)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
a123c43a97 plug-ins: migrate file-png to new iterator-api
(cherry picked from commit 764085278f)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
ab1bb27129 plug-ins: compose migrated to new iterator api
(cherry picked from commit b7633c722e)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
8e17056d15 plug-ins: colormap-remap migrated to new iterator api
(cherry picked from commit 6ab12061b7)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
4baf61a2a0 plug-ins: border-average migrated to new iterator api
(cherry picked from commit 754a3c5b18)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
9953fe57d9 plug-ins: decompose migrated to new iterator api
(cherry picked from commit 22b4b647bd)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
6d9022f2e6 app: migrate gimpoperationmaskcomponents to new iterator api
(cherry picked from commit 55b3438328)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
5818585a8b app: migrate gimpoperationgradient to new iterator api
(cherry picked from commit c6d23add65)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
925803f242 app: migrate gimpoperationcagetransform to new iterator api
(cherry picked from commit f03a84d607)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
fc222c8392 app: migrate gimpoperationcagecoefcalc to new iterator api
(cherry picked from commit 822f9f0d2b)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
04517b842a app: migrate operationbuffersourcevalidate to new iterator api
(cherry picked from commit 95358ca1fa)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
33dd7daa30 libgimpcolor: migrate to new iterator api
(cherry picked from commit cdda37f4ee)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
5531b53466 modules: migrate display filters to new iterator api
(cherry picked from commit 41e8035635)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
e092765dfe app: migrate paintcore loops to new iterator api
(cherry picked from commit fb5d7832a8)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
8aaa3a99f2 app: migrate gimpmybrushsurface to new iterator api
(cherry picked from commit 97ed7817d8)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
4f46f92eb6 app: migrate brush core to new iterator api
(cherry picked from commit 46e9036578)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
6a40b6c75e app: migrate ink paint core to iterator api
(cherry picked from commit ea9c5e6a49)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
645a945647 app: migrate heal to new iterator api
(cherry picked from commit 24fbdfb591)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
8d5c00a80d app: migrate iscissorstool to new iterator api
(cherry picked from commit beb4ecb238)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
66dd9b119c app: migrate gimp-gegl-mask to new iterator api
(cherry picked from commit 4b77831e03)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
2910e872f2 app: migrate gegl-mask-combine to new iterator api
(cherry picked from commit fcf113a39c)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
3daafb09b6 app: migrate gegl-loops to new iterator api
(cherry picked from commit 567ffe94ff)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
f2dd887fc0 app: gimpscanconvert: migrate to new buffer iterator
(cherry picked from commit d99cae4ab8)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
969a028dcc app: pickable-contiguous-region migrated to new buffer iterator
(cherry picked from commit c56f543354)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
1555f4c86a app: palette-import migrated to new buffer iterator
(cherry picked from commit 43c107aeab)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
244ddef844 app: image-convert-indexed migrated to new buffer iterator
(cherry picked from commit 9f481d3607)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
957e0cd9cb app: histogram migrated to new buffer iterator
(cherry picked from commit 2c2d8d86fd)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
84ac1148ac app: gimpdrawable-transform migrated to new buffer iterator
(cherry picked from commit 972f232316)
2018-09-18 12:36:13 +02:00
Ell
6484e91f82 themes: in the Dark theme, use 'class "GtkWidget"' instead of "*"
... for applying the global style.

Last commit *might* have fixed the need to use "*" instead of
"GtkWidget", although it's hard to tell -- nothing seems to be
obviously wrong, anyway.  Let's just try restoring this, and see if
anything breaks.
2018-09-18 06:17:59 -04:00
Ell
d7da2cb338 Issue #1604 - Active layer name is hard to read
In the gtkrc files of the Dark and Light themes, replace a bunch of
"widget" selectors with "widget_class" selectors, which is what
they really should be (they should probably also use angle-bracket
notation for classes, but as long as it works...)  This allows the
different styles to be merged correctly, and fixes the active layer
name color (more generally, the text color of selected rows of
focused tree-views inside dockables.)  The Gray theme seems to be
double-broken in such a way that "fixing" it causes it to do the
"wrong" thing...  I'm not touching that :)
2018-09-18 04:58:46 -04:00
Jehan
d7fa835cd3 app: don't sanity check for "gegl:matting-levin".
My previous commit answers the forever question "do we want to require
this?" which was in comments and can now be removed.
We don't need to actually require this operation for running GIMP, as it
runs fine without. Just testing in configure is enough of a warning for
the missing feature.

(cherry picked from commit 97247f41ea)
2018-09-17 19:51:22 +02:00
Jehan
5f088a95c3 configure: check presence of "gegl:matting-levin" with gegl --exists.
This is a runtime dependency. If absent, we simply won't have access to
the alternative Matting Levin engine in the foreground selection tool.

If we don't add a test in configure, this may be easily forgotten. I
created the `gegl --exists` feature specifically for this kind of
checks, so let's check operation existence.

(cherry picked from commit 9560a653c5)
2018-09-17 19:51:15 +02:00
luz.paz
23648e753e Misc. typo fixes
Found via `codespell`

(cherry picked from commit 386587736f)
2018-09-17 16:05:02 +02:00
Marco Ciampa
81bd873af5 Updated Italian translation 2018-09-17 08:37:22 +02:00
Jehan
e1cf340515 plug-ins: add the "msf1" brand for HEIF files.
After Dirk Farin had another look in the specs, it turns out that "mif1"
is actually allowed as major brand for HEIF. Also adding "msf1" which is
the equivalent for image sequences.

(cherry picked from commit 64b00b5c7f)
2018-09-16 22:56:07 +02:00
Jehan
e4bff4c801 Issue #2209: more accurate magic for HEIF files.
Just looking for "ftyp" would also match other ISOBMFF files (.mov or
.mp4 files for instance). These are the possible 4-byte "brand" code
which can follow "ftyp", as listed by Dirk Farin from libheif.

I add the "mif1" brand, as I encountered some files using this magic
(even though this should normally not be valid apparently, yet the file
loaded fine in GIMP).

This is not perfect as the standard allows potentially very big box
headers, in which case 8 bytes (the "largesize" slot) may be inserted
between "ftyp" and the brand, as I understand it. But this is actually
unlikely enough to probably never happen (the compatible brands list
would have to be huuuge, as it looks like this is the only extendable
part in a ftyp box). So let's assume this just never happens.

See also: https://github.com/strukturag/libheif/issues/83

(cherry picked from commit 4ad3993eca)
2018-09-16 22:56:07 +02:00
Jehan
eb227b1d0e devel-docs: add the package maintainers in the release-howto.
Nicknames on IRC/gitlab are hard, even more when they change depending
on the media! I realize we are regularly asking them or unsure of who to
contact (for instance here for releases). Let's associate each package
with its current maintainer to make it easy to contact the right person
to prepare our official packages before a release.

(cherry picked from commit dc9a30446b)
2018-09-16 22:55:54 +02:00
Jehan
e76d0941a9 Issue #2209: HEIF: Invalid input: No 'ftyp' box.
Adding a magic number for HEIC/HEIF, which would allow to discard
obvious non-HEIC images even with the wrong extension.

Note: it looks like this magic number would also match more generically
other ISO base media file format (ISOBMFF) formats, like .mov or .mp4
files. I am enquiring for better magic but for now, this is better than
nothing.

(cherry picked from commit d738d2f645)
2018-09-16 22:55:44 +02:00
Ell
3d24dfbc6e tools: in performance-log-viewer.py, fix profile viewer search column
(cherry picked from commit f8dd444e98)
2018-09-16 12:35:09 -04:00
Ell
cc18c2f890 tools: add performance-log-viewer.py and driver
performance-log-viewer.py is a viewer for GIMP performance logs.
The viewer is made up of two parts: a sample-selection area at the
top, and an information area at the bottom.

The sample-selection area visualizes the sampled variables and
markers using a simultaneous set of plots, and displays the
currently selected samples.  Samples can be selected directly
through the sample-selection area, or by other means, such as
searching for all samples satisfying a certain condition, or
containing a certain function.

The information area shows global information stored in the log, as
well as information specific to the currently selected samples,
including variable listing and statistics, full backtrace, and
profile/call-graph information.

Note that performance-log-viewer.py takes its input from STDIN,
like the rest of the performance-log tools, and is therefore
suitable for use as part of a pipeline.  For standalone use, the
performance-log-viewer driver is also included, which takes the log
file as a command-line argument, and processes it through an
appropriate pipeline before feeding it to the viewer.

(cherry picked from commit 3601c9189b)
2018-09-16 12:05:35 -04:00
Ell
440695fa45 tools: add performance-log-deduce.py
... which statistically deduces the correct thread states based on
backtrace address frequency, fixing local inaccuracies.

(cherry picked from commit 7e186f3e5d)
2018-09-16 12:05:35 -04:00
Piotr Drąg
5b96fa6985 Update Polish translation 2018-09-16 17:17:21 +02:00
Ell
64403d5fd8 app: add more information to performance logs
In addition to the verbose GIMP version, include in performance
logs the values of all environment variables beginning with BABL_,
GEGL_, or GIMP_, and of all the GEGL config options.

(cherry picked from commit 2c6b5c371e)
2018-09-16 09:00:20 -04:00
Ell
896af012cb app: in gimpbacktrace-linux, use SA_RESTART for the backtrace signal
(cherry picked from commit e8c1cd79ba)
2018-09-16 09:00:20 -04:00
Christian Kirbach
99b4ee2082 Update German translation 2018-09-14 18:45:06 +00:00
Rodrigo Lledó
e88050fcc5 Update Spanish translation 2018-09-14 06:41:42 +00:00
Jehan
536af959f1 Issue #2055: make save dialog compatibility information understandable.
* The minimum GIMP version for this XCF is always written down when it
  is GIMP 2.8 or over.
* The list of features warrating the minimum version is now listed in an
  expander container rather than as tooltip (making the list actually
  discoverable!).
* The warning on compression is now displayed as its own text under the
  checkbox (only when checking the box actually changes anything
  compatibility-wise), and not as additional text to the minimum GIMP
  version label. Otherwise it had far too much weight on the minimum
  compatible GIMP version text and people were wondering what it meant.
  We should not tell people what the checkbox cannot do (it cannot
  improve compatibility in some cases), only what it can do (it can
  improve compatibility in other cases).
* Update the feature list real-time when checking the compression box
  (making it even more obvious that tile compression may have a say in
  compatibility).
* Metadata info is still added on the GIMP version label as it does not
  limit compatibility of the XCF file itself.

(cherry picked from commit 573d817539)
2018-09-11 15:56:15 +02:00
Jehan
6952bbb1ad app: add a reason string for internal zlib compression in GIMP 2.10.
Even though chosen as a parameter to gimp_image_get_xcf_version() and
not a feature within the image itself, we also want to list this reason
in the compatibility list.

(cherry picked from commit 0fa2ef9118)
2018-09-11 15:56:07 +02:00
Piotr Drąg
25ddcc6171 Update Polish translation 2018-09-09 19:15:48 +02:00
Tim Sabsch
8be8b201ca Update German translation 2018-09-07 04:40:14 +00:00
Alexandre Prokoudine
d0ae9908de Start tracking changes between 2.10.6 and 2.10.8 2018-09-07 00:28:43 +03:00
Ell
b1652b02d8 app: don't change text-layer box mode after moving using text tool
When moving a text layer using the text tool (through alt+drag),
don't change the layer's box mode to "fixed", which is unnecessary,
since the layer's size isn't affected.

(cherry picked from commit 601c213c7a)
2018-09-06 11:47:08 -04:00
Ell
951c08efd5 app: fix text tool frame position when undoing move operation
While editing a text layer with the text tool, update the layer's
frame when the layer moves, which most notably happens when
undoing/redoing a move operation while the text tool is active.

(cherry picked from commit 238c1035db)
2018-09-06 11:47:08 -04:00
Ell
925b7f2c60 app: streamline text-tool drawing blocking/unblocking logic
The various functions of the text tool currently block and unblock
drawing (through gimp_text_tool_[un]block_drawing()) implicitly,
and in a non-symmetric fashion, which makes the tool's logic rather
fragile.  Instead, require blocking/unblocking to be done
symmetrically, and explicitly block/unblock drawing as necessary in
all functions.

(cherry picked from commit a03183b266)
2018-09-06 11:47:08 -04:00
Ell
e2b54845bd app: fix uninitialized variable warning in gimptexttool.c
(cherry picked from commit a1caa17531)
2018-09-06 11:47:08 -04:00
Marco Ciampa
0d6acfdf1b Updated Italian translation 2018-09-06 15:34:14 +02:00
ONO Yoshio
2ff515b374 app: avoid to rotate unattached vectors directory in ...
... gimp_text_tool_create_vectors_warped().
fixed commit 8dfe00fa17

(cherry picked from commit 5483ea88e5)
2018-09-06 08:45:40 +09:00
ONO Yoshio
3012738ace Revert "app: make unattached vectors enable to rotate."
This reverts commit 2d415f53bf.

(cherry picked from commit 1ff9487d00)
2018-09-06 08:45:25 +09:00
Gábor Kelemen
21e1445db4 Update Hungarian translation 2018-09-05 22:51:37 +00:00
Ell
468a4ad109 app: more cleanup in GimpBacktrace
Improve out-of-range check in gimp_backtrace_find_thread_by_id().

Remove unnecessary #include <exchndl.h> in gimpbacktrace-windows.c,
and revert commit 644234e99d (the
DrMingw detection happens at runtime).  The Windows backend can
work without DrMingw, it just can't find all the symbols, and
doesn't provide source-location information.

(cherry picked from commit b9f1ab8f53)
2018-09-05 14:59:58 -04:00
Jehan
e7dde73f84 app: GimpBacktrace Windows backend only available with Dr. Mingw. 2018-09-05 15:11:41 +02:00
Timo Jyrinki
c6b3a8363a Update Finnish translation 2018-09-05 10:33:16 +00:00
Ell
0fcf02a7c6 app, tools: add "running" thread attribute to GimpBacktrace/performance-log
The "running" attribute (readable through
gimp_backtrace_is_thread_running(), and recorded in the performance
log) specifies if the thread was in a running or suspended state at
the time the backtrace was taken.  It is accurate on Linux, but
only approximated on Windows.

Adapt the performance-log-expand.py tool to maintain this attribute
(and any future thread attributes we might add).

(cherry picked from commit 78adb7c900)
2018-09-03 18:30:34 -04:00
Ell
9f1a0a65bd app: add Windows backend to GimpBacktrace
The Windows backend produces full, multithreaded backtraces.  When
DrMingw is available, it also provides full symbol and (where
available) source-location information.  Otherwise, it provides
symbol information for most of our libraries, but not for the GIMP
binary itself.

(cherry picked from commit 667efc221d)
2018-09-03 15:58:01 -04:00
Ell
21f708a297 app: add source-location information to GimpBacktrace
Add source filename and line number fields to the
GimpBacktraceAddressInfo struct, populated through
gimp_backtrace_get_address_info().  This is not currently supported
by the Linux backend, but is supported by the Windows backend,
which we'll be added in the next commit.

(cherry picked from commit a6ec857123)
2018-09-03 15:58:01 -04:00
Ell
06a22a9cf8 app: more GimpBacktrace tidying
... in preparation for the Windows backend.

(cherry picked from commit 422f6a55e4)
2018-09-03 15:58:01 -04:00
Balázs Meskó
e8ef49ec68 Update Hungarian translation 2018-09-03 15:19:09 +00:00
Balázs Meskó
e69d7bff29 Update Hungarian translation 2018-09-03 14:33:25 +00:00
Balázs Meskó
2afb025939 Update Hungarian translation 2018-09-03 12:41:09 +00:00
Rodrigo Lledó
d8df237f8f Update Spanish translation 2018-09-03 07:05:45 +00:00
ONO Yoshio
7727c6f57c app: make unattached vectors enable to rotate.
(cherry picked from commit 2d415f53bf)
2018-09-03 12:34:31 +09:00
ONO Yoshio
54f9d3ee7d Issue #2064 - text along path not working with vertical text.
(cherry picked from commit 8dfe00fa17)
2018-09-03 12:34:15 +09:00
Ell
d89930cac9 app: remove unused #define in gimpbacktrace-linux.c
(cherry picked from commit c4d89bfe0b)
2018-09-02 14:33:32 -04:00
Ell
8a2126fc98 app: s/char/gchar/ in last commit 2018-09-02 13:48:19 -04:00
Ell
499a8962b3 app: don't use g_file_peek_path() in splash.c
... use g_file_get_path() instead.

g_file_peek_path() was added in GLib 2.56, but gimp-2-10 only
requires 2.54.
2018-09-02 13:42:58 -04:00
Ell
14c3c33f1b app: rename gimp_backtrace_get_symbol_info() to ..._get_address_info()
This function returns information about the given address, which
is currently mostly limited to the corresponding symbol
information, but we might want to add address-specific information
in the future, such as a line number.

(cherry picked from commit 7ac87dc01e)
2018-09-02 13:26:09 -04:00
Ell
af769588cd app: in gimpbacktrace-none.c, fix gimp_backtrace_get_frame_address()
(cherry picked from commit 77746fd8fc)
2018-09-02 13:26:09 -04:00
Ell
dd1a17d67e app: remove stray g_printerr() from gimpbacktrace-linux.c
(cherry picked from commit 0d3647f854)
2018-09-02 09:13:36 -04:00
Ell
14addc12e8 app: minor cleanup in GimpBacktrace
(cherry picked from commit cb8dd047d0)
2018-09-02 09:08:26 -04:00
Ell
8cfd24107f app: show error on attempt to subtract-from/intersect-with empty selection
In all the selection tools, show an error (and a BAD cursor
modifier) wheh starting a selection, if the current selection is
empty, and the tool is in SUBTRACT or INTERSECT mode (in which
case, the selection has no effect).

(cherry picked from commit 0e26525e65)
2018-09-02 08:50:22 -04:00
Ell
617577da27 app: fix app/tests linking
Required since commit 80bf686c94.

(cherry picked from commit 7a02859d32)
2018-09-02 04:57:47 -04:00
Ell
a35a2eeb81 po: add dashboard-commands.c to POTFILES.in
(cherry picked from commit 0e04b77589)
2018-09-02 04:16:56 -04:00
Ell
28ad1d0eba app: add standard highlight colors to gimphighlightablebutton.h
We're currently only using GimpHighlightableButton in the layers
dialog, which defines its own set of highlight colors.  We're going
to use highlightable buttons in the dashboard too, so let's move
the highlight colors to gimphighlightablebutton.h, and give them
standard names.  We currently define
GIMP_HIGHLIGHTABLE_BUTTON_COLOR_AFFIRMATIVE (green), and
GIMP_HIGHLIGHTABLE_BUTTON_COLOR_NEGATIVE (red).

(This commit was accidentally dropped from the gimp-2-10 branch; it
should have gone before 40ac4f7bc0f43aee24dc7ae1cf674d1a59612f55.)
2018-09-02 03:37:23 -04:00
Ell
1122b3e492 tools: add performance-log-related tools
performance-log-expand.py decodes a delta-encoded performance log
by expanding the deltas, producing a log where each sample (and
other relevant elements) contain complete information.  Note that
the structure of expanded logs is identical to that of delta-
encoded logs, the expanded log simply has no deltas.

performance-log-resolve.py resolves symbol information in
backtraces.  The logs produced by GIMP only specify the program
counter at each stack frame, providing an address-map to map
program-counter addresses to actual symbols separately.  This tool
looks up each program-counter address in the address map,
incorporating the relevant symbol information directly into the
backtrace.

Both tools read their input from STDIN, and write their output to
STDOUT, and can be chained in a pipeline (with
gimp-performance-log-expand.py appearing first).

Note that these tools require Python 3.

(cherry picked from commit d7c74a615b)
2018-09-02 03:27:33 -04:00
Ell
40ac4f7bc0 app, icons, menus: add performance-log recording to the dashboard
Add an option to record a performance log through the dashboard.
The log contains a series of samples of the dashboard variables, as
well as the full program backtrace, when available.  As such, it
essentially acts as a built-in profiler, which allows us to
correlate program execution with the information available through
the dashboard.  It is meant to be used for creating logs to
accompany perofrmance-related bug reports, as well as for profiling
GIMP during development.

The sample frequency defaults to 10 samples per second, but can be
overridden using the GIMP_PERFORMANCE_LOG_SAMPLE_FREQUENCY
environment variable.  Backtraces are included by default when
available, but can be suppressed using the
GIMP_PERFORMANCE_LOG_NO_BACKTRACE environment variable.

Logs are created through the new "record" button at the bottom of
the dashboard dialog.  When pressed, a file dialog is opened to
select the log file, and, once confirmed, data is being recorded to
the selected file.  Recording is stopped by pressing the "record"
button again (we use a highlight to indicate that recording is
active.)

While recording, the "reset" button is replaced with an "add marker"
button, which can be used to add event markers to the log.  These
can be used to mark events of interest, such as "started painting"
and "stopped painting", which then appear in the log as part of the
sample stream.  Markers are numbered sequentually, and the number
of the next (to-be-added) marker appears on the button.  Shift-
clicking the button adds an empty (description-less) marker, which
is only identified by its number; this can be used when markers
need to be added quickly.

The log is an XML file, containing some extra information (such as
the output of "$ gimp -v", and symbol information) in addition to
the samples.  The data in the file is delta-encoded to reduce the
file size, meaning that samples (as well as some other elements)
only specify the changes since the previous sample.  This adds a
necessary decoding step before data can be processed; the next
commit adds a tool that does that.

There are currently no tools to actually analyze the data -- that's
still TBD -- but at least we can start gathering it.
2018-09-02 03:26:11 -04:00
Ell
536fc332e0 app: add GimpBacktrace
GimpBacktrace provides an interface for creating and traversing
multi-threaded backtraces, as well as querying symbol information.
While we already have some backtrace functionality, it relies on
external tools for the most part, and as such is rather expensive,
and is only meant for producing opaque backtraces.  GimpBacktrace,
on the other hand, is meant to be relatively cheap (we're going to
use it for profiling,) and allow inspection of the backtrace data.
In the future, it might make sense to replace some, or all, of the
other backtrace functions with GimpBacktrace.

GimpBacktrace currently only supports Linux.  By default, it uses
dladdr() to query symbol information, which is somewhat limited (in
particular, it doesn't work for static functions.)  When libunwind
is installed, GimpBacktrace uses it to get more complete symbol
information.  libunwind is currently an optional dependency, but it
might make sense to promote it to a mandatory, or opt-out,
dependency, as it's lightweight and widely available.

On other platforms, the GimpBacktrace interface can still be used,
but it always returns NULL backtraces.

(cherry picked from commit 80bf686c94)
2018-09-02 03:24:51 -04:00
Ell
14ce0763ce app: add mnemonics to dashboard action labels
(cherry picked from commit a109a77db1)
2018-09-02 03:17:56 -04:00
Rafael Fontenelle
370dd32147 Update Brazilian Portuguese translation 2018-09-01 18:10:49 +00:00
Ell
a2f1efc201 app: use gimp_gtk_container_clear() in GimpDashboard
... instead of doing the same thing ourselves.
2018-08-30 23:49:37 -04:00
ONO Yoshio
e74a241cdf Issue #2124 - The origin of vertical, right to left text does not...
... load correctly

Fixed incorrect initialization of private base_dir.

(cherry picked from commit e98255efc1)
2018-08-31 08:52:50 +09:00
Ell
806cb6e348 Issue #2120 - Segmentation fault while using Levels to white balance a layer
Move the call to gimp_filter_tool_disable_color_picking() from the
filter-tool's dialog "unmap" handler to gimp_filter_tool_halt().
Since commit ec80a88513, we
explicitly destroy the GUI when halting the filter tool, which
happens before the dialog's unmap handler is called, which could
potentially result in a dangling pointer to the active color-picker
widget in gimp_filter_tool_disable_color_picking().

(cherry picked from commit 072d6b0d12)
2018-08-30 03:37:48 -04:00
Piotr Drąg
8c69f8cdd9 Update Polish translation 2018-08-28 19:48:54 +02:00
Ell
8814852159 Issue #2116 - bug: Image guide creation by dragging does not allow ...
... 100% position anymore

In GimpGuideTool, use a closed [0, max_position] range as the
allowable range for new/repositioned guides (where max_position is
either the image's width or height), so that guides can be placed
at the right/bottom edge of the image.

(cherry picked from commit 547190faa8)
2018-08-28 03:46:25 -04:00
Ell
d015c3d632 app: fix dashboard swap read-throughput desc.; add translator comment
(cherry picked from commit d210199da5)
2018-08-26 15:14:17 -04:00
Piotr Drąg
966b2fc75b Update Polish translation 2018-08-26 18:16:14 +02:00
Christian Kirbach
9feca3b094 Update German translation 2018-08-25 23:41:08 +00:00
Ell
f8c23c3720 Issue #2095 - Filter wavelet-decompose error with layer Group option active
In gimp_image_merge_layers(), explicitly fetch the graph of the top
layer's parent layer (if exists), to make sure that the top layer's
graph has a parent node.  We already fetch the image graph, which
takes care of top-level layers, however, if the top layer is a
child of an invisible layer group, as is the case in the wavelet-
decompose plug-in, this is not generally enough to guarantee that
the group's graph is constructed.

(cherry picked from commit e563845174)
2018-08-25 04:09:18 -04:00
Michael Natterer
7baedf02d9 app: s/sprintf/g_snprintf/ in xcf_save_image()
(cherry picked from commit bcf9c94358)
2018-08-21 12:22:58 +02:00
Ell
6c46891c4c app: explicitly clear GUI when halting a filter tool
In gimp_filter_tool_halt(), explicitly clear the GUI container
before clearing filter_tool->config, since the tool might be halted
during the GUI dialog's delete event, in which case the GUI will
only be implicitly destroyed *after* the function returns.  The
destruction of the GUI might fire signals whose handlers rely on
filter_tool->config, so we need to make sure it happens while it's
still alive.

In particular, this fixes a CRITICAL in the threshold tool, which
occurs due to the histogram view's "range-changhed" signal being
fired during its destruction, and its handler accessing
filter_tool->config.

(cherry picked from commit ec80a88513)
2018-08-20 14:42:22 -04:00
Ell
fba9de69ee app: add gimp_gtk_container_clear()
... which removes all non-internal children of a GtkContainer.

(cherry picked from commit fd64aae47b)
2018-08-20 14:42:20 -04:00
Michael Natterer
7d9f79427f app: make GimpDeviceInfo more rubust against broken device listings
gimp_device_info_set_device(): don't just bail out if a device with
the same name is added again, instead, simply continue and overwrite
the info's old device with the new one.

NOTE that this only happens if something is wrong on the USB or udev
or libinput or whatever side and the same device is present multiple
times. The only "safe" thing is to assume that devices listed earlier
are dead and dangling entities and that the last registered device is
the one actually delivering events.

(cherry picked from commit 717c183a3e)
2018-08-20 20:06:36 +02:00
Jernej Simončič
398d176855 Installer: small fix for 32on64 2018-08-20 20:05:09 +02:00
Jernej Simončič
cef2b7e72d Merge branch 'gimp-2-10' of gitlab.gnome.org:GNOME/gimp into gimp-2-10 2018-08-20 19:09:58 +02:00
Jernej Simončič
b7a32ee848 Installer: don't include unnecessary files, some more fixes for new plugin paths 2018-08-20 19:08:56 +02:00
Jehan
70d949eb0d devel-docs: document new debugging option --enable-win32-debug-console.
(cherry picked from commit 96dc7da000)
2018-08-20 17:29:34 +02:00
Ell
db0d3a4846 app: use adaptive chunk size when rendering projections
In GimpProjection, use an adaptive chunk size when rendering the
projection asynchronously, rather than using a fixed chunk size.
The chunk size is determined according to the number of pixels
processed during the last frame, and the time it took to process
them, aiming for some target frame-rate (currently, 15 FPS).  In
other words, the chunks become bigger when processing is fast, and
smaller when processing is slow.  We're currently aiming for
generally-square chunks, whose sides are powers of 2, within a
predefined range.

Note that the chunk size represents a trade off between throughput
and responsiveness: bigger chunks result in better throughput,
since each individual chunk incurs an overhead, in particular when
rendering area filters or multithreaded ops, while smaller chunks
result in better responsiveness, since the time each chunk
individual takes to render is smaller, allowing us to more
accurately meet the target frame rate.  With this commit, we aim to
find a good compromise dynamically, rather than statically.

The use of adaptive chunk sizes can be disabled by defining the
environment variable GIMP_NO_ADAPTIVE_CHUNK_SIZE, in which case we
use a fixed chunk size, as before.

(cherry picked from commit a1706bbd29)
2018-08-20 11:14:50 -04:00
Ell
b09498cd7a app: don't chunk update area when rendering projection synchronously
Add a boolean "chunk" parameter to
gimp_projection_chunk_render_iteration(), which determines whether
the work area should be sub-divided into chunks prior to rendering
(previously, the work area would always be sub-divided.)  Only
pass TRUE when rendering the projection asynchronously, in the
render callback, and pass FALSE when rendering the projection
synchronously, in gimp_projection_finish_draw(), which is called
when flushing the projection through the GimpPickable interface.

Rendering the projection using as big chunks as possible improves
performance, while worsening responsiveness.  Since responsiveness
doesn't matter when rendering synchronously, there's no reason to
render in chunks.

(cherry picked from commit 105ffc787d)
2018-08-20 11:14:50 -04:00
Jernej Simončič
6fceb041df Installer: zlib1.dll has no version info, compare timestamp when updating in System32 2018-08-20 15:52:12 +02:00
Jernej Simončič
ab3ff790ab Installer: plug-ins install changes 2018-08-20 15:50:04 +02:00
Jernej Simončič
5ddccb0de4 Installer: remove plugins from the lib\gimp\2.0\plug-ins directory 2018-08-20 12:15:40 +02:00
Ell
0e3084a9d1 Issue 2052 - Crash when using the flip tool
In gimp_transform_tool_transform(), use "active_item", instead of
"tool->drawable", when cutting/pasting the selected portion of a
layer for transformation.  The latter is a remnant of the old
transform-tool code, and is not guaranteed to be correspond to the
correct drawable, or even to a valid drawable (i.e., it can
potentially produce wrong results, or segfault.)

(cherry picked from commit 9420805525)
2018-08-20 04:22:41 -04:00
Ell
d3cab633de libgimp: in GimpTileBackendPlugin, use gegl_tile_backend_command()
In the command handler of GimpTileBackendPlugin, forward unhandled
commands to gegl_tile_backend_command(), instead of asserting that
they're within range (which has already been disabled by commit
bc3b076caf).  See GEGL commit
30047e65723ebb44fcde9c6b5f60ceecb43b0895.

(cherry picked from commit 668fee966a)
2018-08-19 19:46:22 -04:00
Ell
bc4bf58be3 configure.ac: require GEGL >= 0.4.9
(cherry picked from commit f1ff239d68)
2018-08-19 17:40:08 -04:00
Ell
fddf34dc87 app: show swap read/write throughput in the dashboard
Show the read/write throughput of swap data in the corresponding
swap-group fields.

(cherry picked from commit 5446163e1d)
2018-08-19 17:40:05 -04:00
Ell
fa9b231679 app: add "queued" field to the dashboard swap group
... which reports the amount of data queued for writing to the
swap (see GEGL commit 64021786ee067cf66c038622719acc590e6341db.)
When the swap queue is full, a yellow color underlay is shown in
the history graph.

(cherry picked from commit cd54457d46)
2018-08-19 17:38:54 -04:00
Ell
3ae8ff5c74 app: add "compression" field to the swap dashboard group
The "compression" field reports the ratio between the total size of
the data in the swap, and the total size the data would have had if
all tiles in the swap occupied a unique data block.

See GEGL commit 185f4450f2a51690b39112973c61f894c1ec3e41.

(cherry picked from commit b6e552a74b)
2018-08-19 17:38:54 -04:00
Michael Natterer
c335f78ee5 configure.ac: post-release version bump to 2.10.7 2018-08-19 20:11:08 +02:00
Alexandre Prokoudine
c0ef24b818 Update Russian translation 2018-08-19 20:37:08 +03:00
Michael Natterer
0a8173ffde configure.ac: release GIMP 2.10.6 2018-08-19 18:47:43 +02:00
Michael Natterer
6837554376 icons: make the gap of the broken chain larger in the Color theme 2018-08-19 18:43:39 +02:00
Ell
90ed3c8d3a libgimp: disable tile command range check in plug-in tile backend
In gimp_tile_backend_plugin_command(), disable the range check for
the input tile command.  This check prevents us from adding new
tile commands to GEGL without breaking the ABI; yet, the next GEGL
release will add a new command.  We're going to have to decide what
to do about this, but for now, let's just disable the check, so
that at least GIMP 2.10.6 is compatible with newer versions of
GEGL, no matter how we end up handling this.
2018-08-19 06:51:05 -04:00
Jehan
8f21c9483a Issue #1970: Python-fu missing in 2.10.4.
Do not set the interpreter to `python2` but to whatever was found by the
AM_PATH_PYTHON2() m4 macro.
It looks like the Python2 binary we ship in our DMG may be call "python"
only (without the '2'). Let's just make our code more resilient to
various builds.
I am not sure yet this is the only/actual problem for this issue on
macOS, but this is at least in the right way.
2018-08-19 12:34:00 +02:00
Jehan
87a9feb6d9 app: fix "Bad interpreter" error messaging.
If I override the `program` variable, and it is not found in PATH
environment, then it is NULL and the error message is unhelpful. Make
the return value of g_find_program_in_path() into a separate variable
instead, and only override `program` in the end, when we know it is
non-NULL.
2018-08-19 12:26:32 +02:00
Jehan
1e44cbd82c desktop: GIMP 2.10.6 is now planned to be released on 2018-08-19.
Hopefully that's now the right one!

(cherry picked from commit 1d555018ed)
2018-08-19 10:43:49 +02:00
Ell
7ed34fd920 app: show horizontal scrollbar in dashboard when necessary
(cherry picked from commit 8313a40fb5)
2018-08-19 03:38:23 -04:00
Øyvind Kolås
b03709ab5e configure/app: depend on GEGL 0.4.8 2018-08-18 15:26:46 +02:00
Snehalata B Shirude
024fb90fd4 Updated Marathi translation 2018-08-18 11:51:58 +02:00
Jehan
55a7872e1b plug-ins: include the right python source in the distribution.
The python path with directory are generated files and should not be in
the dist. The previous commit was fixing an in-tree `make check` but
this one fixes the `make distcheck` as the dist was packaging the wrong
python files.
2018-08-18 01:14:44 +02:00
Jehan
8ec5f44f2f po-python: skip copied Python files from POTFILES.
This issue was invisible when making VPATH builds, but appeared only in
source-tree builds as gettext tools are apparently mixing source and
build files. So we need to add these in the POTFILES.skip.
2018-08-18 00:07:58 +02:00
Tim Sabsch
319b1efb4d Update German translation 2018-08-17 16:41:17 +00:00
Michael Natterer
eb9789f241 etc, docs: regenerate system gimprc and its manpage 2018-08-17 02:22:23 +02:00
Bruno Lopes da Silva
8df7a258a4 Update Brazilian Portuguese translation 2018-08-16 20:31:05 +00:00
Ricardo Silva Veloso
7cc1bab361 Update Brazilian Portuguese translation 2018-08-16 20:25:15 +00:00
Jehan
f98dffce54 NEWS: new long shadow filter was missing. 2018-08-16 16:46:45 +02:00
Jehan
0b9a8af673 NEWS: keep up-to-date. 2018-08-16 14:22:21 +02:00
Jehan
035c785490 Issue #788: also install all python plug-ins in their own directory.
It seems I forgot to also install python plug-ins in a subdirectory
(because they are deactivated on master for the time being). I even
found a year-old patch from myself rotting in the tracker, and which was
doing exactly this.
I redid it, improved to fit changes.

(cherry picked from commit dbb9555d2f)
2018-08-16 13:25:51 +02:00
Jehan
5682a01626 plug-ins: fix individual install targets of common plug-ins.
The "rule from hell", dixit Mitch. :-)

(cherry picked from commit 2713bc4285)
2018-08-16 13:25:51 +02:00
Jehan
25f099344f plug-ins: make plug-ins inside common/ to also install in subfolders.
(cherry picked from commit d89ad95cc7)
2018-08-16 13:25:51 +02:00
Jehan
79961a6545 plug-ins: install plug-ins in subfolder.
I am going to forbid plug-ins from being installed directly in the root
of the plug-ins/ directory. They will have to be installed in a
subdirectory named the same as the entry point binary.
This may seem useless for our core plug-ins which are nearly all
self-contained in single binaries, but this is actually a necessary
restriction to eliminate totally the DLL hell issue on Windows. Moving
core plug-ins in subfolders is only a necessary consequence for it.

(cherry picked from commit 870ca6334d)
2018-08-16 13:25:51 +02:00
Øyvind Kolås
2c553da7eb configure/app: depend on babl 0.1.56
(cherry picked from commit 3d464e03b4)
2018-08-15 23:58:00 +02:00
Jehan
91cb86d2ab app: reorder function definitions/declarations.
Just make so that the declarations and definitions are in the same
order for easy maintenance.
2018-08-15 19:01:36 +02:00
Jehan
39afd29b7b NEWS: keep up-to-date. 2018-08-15 14:35:04 +02:00
Jehan
c9d7618056 app: open the Windows console a bit earlier.
If we enable the console on Windows, we might as well open it as fast as
possible, since its purpose is debugging.
2018-08-15 14:24:15 +02:00
Jehan
91c139f4d0 Issue #1809: update DLL directory for 32-bit plug-in run from 64-bit...
... Windows installation of GIMP.

Our default installer installs 32-bit version of the various DLLs in
32/bin/ (under the installation prefix). Currently this additional
folder is simply added in the PATH, so it works most of the time.
Unfortunately the PATH is searched last for DLLs, and in particular, it
is searched after system directories. So it means that if any misbehaved
application is installing DLLs in system dirs (and in particular
incompatible/older versions of the same DLLs a GIMP plug-in uses), it
breaks the 32-bit plug-in.

SetDllDirectoryW() bypasses this order and the set folder is searched in
between the binary directory and the system dirs. We were already
setting this for our main bin/ directory, which was good for 64-bit
plug-ins, but this was not protecting 32-bit plug-ins. Now our code to
run plug-ins check the bitness of the executable before running it, and
updates the DLL folder accordingly.
The alternative 32-bit folder can be overridden by the configure option
--with-win32-32bit-dll-folder (default: 32/bin/). This option can only
be set when building for 64-bit Windows obviously.

Alternatively we could have put copies of 32-bit DLLs in a subfolder
with each 32-bit plug-in, but this is at best a terrible workaround, as
we would duplicate DLLs for every such case. And this would not have
protected third-party plug-ins which wish to use some of our DLLs.
Last alternative is to use AddDllDirectory(), but it works since Windows
7 with a given update only. And our current official support is any
Windows since Windows 7. So we don't want to use this right now (also
I'm not sure it would actually be much better than current
implementation, and it seems to have a bit more limitations than
SetDllDirectoryW(), though I have not tested).
2018-08-15 14:21:20 +02:00
Jehan
ec79b5c9bc INSTALL, configure: replace Jasper with OpenJPEG.
Just realizing we haven't updated the INSTALL file with the dependency
change.

(cherry picked from commit fb57133d55)
2018-08-13 19:43:56 +02:00
Jehan
d49606ee83 app: work with GIO in splash code.
This will go with the next commit, but I broke it so I can backport the
code without extension handling in gimp-2-10 first.

(cherry picked from commit c7b5977637)
2018-08-12 23:14:02 +02:00
Jehan
1a28878943 app, configure: add a --enable-win32-debug-console build option.
Debugging stable versions under Windows is a pain because we don't have
access to the standard outputs. The debug console is indeed only built
on unstable builds. Let's make the debug console a separate build option
to allow building stable versions for debug (obviously the default
behavior when not configuring, is same as before, i.e. stable without
console and unstable with console).
2018-08-12 22:20:34 +02:00
Jehan
c49afa4f84 plug-ins: replace s/printf/g_printf/
When cross-compiling, I got various linking errors for printf() calls:
> undefined reference to `libintl_printf'

I am unsure why, since this is not recent code, and it used to build
fine with mingw64 compilers (last I cross-built, which is many months
ago). Anyway g_printf() works fine, all necessary libs are already
linked, and it is supposed to be a synonym. So let's just go the easy
way and use g_printf() only.
2018-08-12 20:59:48 +02:00
Jehan
d1d9eb17e5 configure: GLIB_COMPILE_RESOURCES is wrong when cross-compiling.
AM_PATH_GLIB_2_0 m4 macro actually computes this value using
$PKG_CONFIG. Yet $PKG_CONFIG variable is the pkg-config tool looking for
target libraries (not host), hence it would return the executable
`glib-compile-resources` built for the target.

Also using the same variable name invalidates our test: our own
AC_PATH_PROG was never run as the variable was already set. And no
environment variable could override this test anymore either. This is
why I rename the test variable to HOST_GLIB_COMPILE_RESOURCES.
2018-08-12 19:13:13 +02:00
Jehan
2587b85aaa libgimpthumb: another missing link to libgimpbase.
Again this error was only raised when cross-compiling.
2018-08-12 15:30:28 +02:00
Jehan
0865e9db1f tools: fix linking error.
Though no error was raised during a native build, a cross-build was
choking on this missing link to libgimpbase and failing.
The error returned by the linker though was a bit amiss.

Fixes:
> gimp-test-clipboard.o: In function `test_clipboard_copy_callback':
> tools/gimp-test-clipboard.c:419: undefined reference to `g_file_get_contents'
> collect2: error: ld returned 1 exit status
2018-08-12 15:24:24 +02:00
Jehan
a727131036 NEWS: keep up-to-date. 2018-08-12 13:04:01 +02:00
Jehan
3bbebaf6e0 Issue #1999: Opening the Preferences dialogue triggers Xcode warning.
It seems that calling `lldb` when it is absent triggers some popup
proposing to install Xcode on macOS. This is obviously not good. Let's
check presence with g_find_program_in_path() instead. I was refraining
from doing so until now, because this function allocates memory, hence
may not do well during a crash.
Fortunately we don't need to check for lldb during crash (unlike gdb
which has some unacceptable behavior for older versions, at least on
FreeBSD) so that should be ok.

(cherry picked from commit 04bbe941d5)
2018-08-11 00:34:43 +02:00
Jehan
c05bd7b6c9 app: small code cleaning.
Removing unused declaration of icons_set_icon_theme().
And reorder a bit the declarations to match the definition order.

(cherry picked from commit ae19441ddc)
2018-08-11 00:34:43 +02:00
Martin Srebotnjak
6bc992fc3a Updated Slovenian translation 2018-08-10 20:49:36 +02:00
Michael Natterer
b1fbf1eb63 Issue ##2000 - Linked and unlinked chain icons look almost identical
Make the gap of the broken chain icons of the "Color" theme wider.
2018-08-10 15:56:24 +02:00
Rūdolfs Mazurs
23c877cb09 Update Latvian translation 2018-08-10 13:54:59 +00:00
Rodrigo Lledó
3cf34c7ab9 Update Spanish translation 2018-08-10 11:54:34 +00:00
Tim Sabsch
83c764817f Update German translation 2018-08-10 11:46:00 +00:00
Tim Sabsch
eeb942612e Update German translation 2018-08-10 10:59:44 +00:00
Anders Jonsson
b785d7752c Update Swedish translation 2018-08-10 07:46:19 +00:00
Ell
dfe57b37cd app: fix group layer drawable update during size change
In gimp_group_layer_update_size(), never suspend drawable updates
(and, in fact, remove the option to suspend drawable updates
entirely,) and instead never update the drawable during the call to
gimp_drawable_set_buffer_full(), and flush the group's projection
*after* setting the drawable's buffer, so that any pending updates
will happen after the group's buffer and size are up-to-date.

This fixes some missed drawable updates.

(cherry picked from commit fc2c640ca2)
2018-08-10 03:21:14 -04:00
Ell
2f1041bed0 app: fix projection update-area offset upon buffer allocation/reisizing
In GimpProjection, change gimp_projection_add_update_area() to take
coordinates in the projection's coordinate system, rather than the
image coordinate system, and move the offset adjustment to the
projectable invalidation handler.

Modify gimp_projection_projectable_structure_changed() to pass
projection-space coordinates to gimp_projection_add_update_area().

gimp_projection_get_buffer() and
gimp_projection_projectable_bounds_changed() already pass
projection-space coordinates to gimp_projection_add_update_area(),
which was wrong before, when the projection had a nontrivial
offset, but is correct now.

(cherry picked from commit 2d63bc6e0a)
2018-08-10 03:21:14 -04:00
Piotr Drąg
895dd005b2 Update Polish translation 2018-08-10 06:46:51 +02:00
Ell
e10d5852c1 app: add gegl:long-shadow to the menus
(cherry picked from commit 537bf4ec6a)
2018-08-09 19:03:06 -04:00
Ell
e1e637c238 app: keep sanity/blacklist gegl op lists alphabetically sorted
(cherry picked from commit b6c56a6ae9)
2018-08-09 19:03:06 -04:00
Ell
cd086c94b3 configure.ac: require GEGL >= 0.4.7
(cherry picked from commit d4ef45bdbd)
2018-08-09 19:03:06 -04:00
Rūdolfs Mazurs
4409d5496d Update Latvian translation 2018-08-09 19:24:28 +00:00
Martin Srebotnjak
5f371bc84f Updated Slovenian translation 2018-08-09 20:52:56 +02:00
Martin Srebotnjak
03e95eb893 Updated Slovenian translation 2018-08-09 20:50:47 +02:00
Rūdolfs Mazurs
b17619399f Update Latvian translation 2018-08-09 18:46:37 +00:00
Martin Srebotnjak
02a4ce19d6 Updated Slovenian translation 2018-08-09 20:44:21 +02:00
Rūdolfs Mazurs
ee89bfad52 Update Latvian translation 2018-08-09 18:40:16 +00:00
Martin Srebotnjak
c27ba74e71 Updated Slovenian translation 2018-08-09 20:27:32 +02:00
Anders Jonsson
6c201827a7 Update Swedish translation 2018-08-08 23:23:26 +00:00
Anders Jonsson
b43a84c6fb Update Swedish translation 2018-08-08 23:16:39 +00:00
Claude Paroz
ef1f98863a Updated French translation for libgimp/plugins 2018-08-08 09:52:14 +02:00
Michael Natterer
af2a27f1c9 Issue #1662 - GIMP crashes while using cage transform when selection is active
Fixed by implementing Massimo's two findings:

gimp_operation_cage_transform_process(): if aux_buf is NULL, bail out
after initializing out_buf with identity vectors, fixes the crash.

gimp_cage_tool_create_filter(): set the drawable filter's region to
GIMP_FILTER_REGION_DRAWABLE, fixes offset when there is a selection.

(cherry picked from commit 49dfc6143d)
2018-08-07 20:11:52 +02:00
Piotr Drąg
6e656aedcb Update Polish translation 2018-08-07 18:53:43 +02:00
Tim Sabsch
d83fb5b9dd Update German translation 2018-08-07 16:23:44 +00:00
Mario Blättermann
b8ef5a8527 Update German translation 2018-08-07 16:13:23 +00:00
Rodrigo Lledó
338154ea0e Update Spanish translation 2018-08-07 12:33:46 +00:00
Øyvind Kolås
3712e688f2 configure/app: depend on GEGL 0.4.6
(cherry picked from commit cb132d2a97)
2018-08-07 02:42:47 -04:00
Øyvind Kolås
c1ec74badc configure/app: depend on babl 0.1.54
(cherry picked from commit 5fdcc0dfbb)
2018-08-07 02:42:47 -04:00
Jehan
b22c22a288 desktop: preparing release for GIMP 2.10.6.
(cherry picked from commit 343bfbf259)
2018-08-06 15:39:29 +02:00
Anders Jonsson
8b893bb817 Update Swedish translation 2018-08-06 11:35:43 +00:00
Anders Jonsson
7057490298 Update Swedish translation 2018-08-06 11:29:31 +00:00
ONO Yoshio
34b54971d8 Fix file-pdf-save exports broken vertical text.
(cherry picked from commit f0e585e7ff)
2018-08-06 12:14:08 +02:00
Rodrigo Lledó
4d6074fe23 Update Spanish translation 2018-08-06 09:52:20 +00:00
Rodrigo Lledó
c7574ff02c Update Spanish translation 2018-08-06 09:50:01 +00:00
Ell
5826a399b2 Issue #1125 - Transform tools temporarily disables layer mask
In GimpCanvasTransformPreview, add the necessary bits to the
preview graph so that, when transforming a layer, the layer's
opacity and mask are correctly applied to the preview.  Note that
since we're still not rendering the preview as part of the image
graph, the output is not always accurate, but it should be good
enough in most cases.

(cherry picked from commit 2ac91e0fc3)
2018-08-06 04:21:49 -04:00
Rodrigo Lledó
f6e7e9e633 Update Spanish translation 2018-08-06 07:22:21 +00:00
Piotr Drąg
34cb8fd231 Update Polish translation 2018-08-05 19:10:57 +02:00
Jehan
0bf695dc0f Issue #1974: and again another memory leak.
Thanks to Massimo for reporting all these!

(cherry picked from commit b3c9089ea2)
2018-08-05 11:49:09 +02:00
Jehan
51e5da1f93 Issue #1974: another memory leak when saving a file.
(cherry picked from commit 50221e1438)
2018-08-05 11:49:09 +02:00
Jehan
71f37d417c Issue #1974: Memory leak in gimpimage.c.
Ok my previous fix was wrong (at least for the part in the macro). This
is a macro, not a function. So each time we write _reason, the call to
g_strdup_printf() is reevaluated, hence data is allocated.
The right fix is to prepend `tmp` to the list, not `_reason`.
Thanks to Massimo for the debugging, as always!

(cherry picked from commit 2912fe7c17)
2018-08-04 12:59:21 +02:00
Jehan
8909684b59 Issue #1974: Memory leak in gimpimage.c.
ADD_REASON macro was leaking the allocated string when version_reason
return value was NULL (i.e. when we didn't care about the version
reasons).

Also we were not properly freeing all the reason strings at the end,
only the list. Use g_list_free_full() instead of g_list_free().

(cherry picked from commit 0ab682b0f5)
2018-08-04 09:42:57 +02:00
Ell
53b07a92dd Issue #1846 - "gitlab::" typo in the Windows installer
Introduced by commit 8eb77376c4.
Change to "gitlab:".

(cherry picked from commit aafa925906)
2018-08-03 22:14:57 -04:00
Ell
0edbb0586c app: short-circuit GimpProjection bounds-changed handler if disjoint
In gimp_projection_projectable_bounds_changed(), bail early by
calling gimp_projection_projectable_structure_changed() instead, if
the new bounds don't intersect the old bounds.

(cherry picked from commit c6b8a4213c)
2018-08-03 22:04:22 -04:00
Ell
53afeb11ac app: fix gimp_projection_projectable_bounds_changed()
In gimp_projection_projectable_bounds_changed(), which is called by
GimpProjection in response to a GimpProjectable::bounds-changed
signal, invalidate all regions of the new projection that weren't
copied from the old projection, so that they get rendered upon
flushing, instead of remaining empty.

Additionally, fix preview invalidation -- in particular, don't
directly invalidate the projectable's preview, even if preview
invalidation is already queued and chunk rendering was finished by
the boundary change, and instead always queue a preview
invalidation.

(cherry picked from commit bb5e3fd926)
2018-08-03 22:04:22 -04:00
Pat David
a1d2c05f0f app, libgimpbase: update vertical text labels (shorten)
Shortening vertical text option labels a little bit.

(cherry picked from commit 0ce4db749d)
2018-08-03 18:23:44 -04:00
Ell
d8c0368a52 app: avoid re-rendering group layers upon resizing
Make sure we don't unnecessarily update the group layer's drawable
while flusing the group's projection during resizing, since we want
to either update the entire drawable, or avoid any updates, when
replacing the drawable's buffer.  Note that explicitly supressing
updates in this case should theoretically not be necessary, but the
fact that the call to gimp_projectable_bounds_changed() can result
in reconstructing the projection (see the FIXME comment in that
function) makes it necessary in some cases nonetheless.

(cherry picked from commit bd726c96bf)
2018-08-03 14:10:00 -04:00
Ell
5eaa2f9091 app: avoid re-rendering group layers upon translation
When translating group layers, there's no need to re-render the
group's projection -- we can simply update the group's offset (and
offset node) directly, and redirect any layer-stack "update"
signals to the group's drawable.  This significantly improves
performance when moving groups.

(cherry picked from commit 3ff820a00a)
2018-08-03 14:10:00 -04:00
Ell
bcbc3c23e0 app: use gimp_projectable_bounds_changed() when resizing group layers
In GimpGroupLayer, use gimp_projectable_bounds_changed() when
updating the group layer's size, instead of reconstructing the
projection, unless reallocation of the projection has been
requested.  This is more efficient, since it simply copies the
content of the projection's old buffer to the new buffer, rather
than re-rendering the graph.

(cherry picked from commit 1bb3e962f6)
2018-08-03 14:10:00 -04:00
Ell
379d65e056 app: stop idle projection rendering when flushing group layers
In gimp_group_layer_flush(), stop any idle rendering, initiated
when a new buffer is allocated, before flushing the group's
pickable.  Otherwise, the idle rendering is finished synchronously,
which unnecessarily introduces a noticeable lag.

(cherry picked from commit a4957c7c76)
2018-08-03 14:10:00 -04:00
Ell
adadd4bbbd app: add "update" parameter to gimp_drawable_set_buffer_full()
... which specifies whether or not to update the drawable in
response to the buffer change.

Pass TRUE for "update" at all existing call sites, to keep the
current behavior.

(cherry picked from commit 26a8d141f6)
2018-08-03 14:10:00 -04:00
Ell
09d50449f2 app: respond to GimpProjectable::bounds-changed in GimpProjection
In GimpProjection, respond to the projectable's "bounds-changed"
signal, by reallocating the buffer, and copying the corresponding
region of the old buffer (using
gimp_tile_handler_validate_buffer_copy(), added a few commits back,
so that the relevant portion of the validate handler's dirty region
is also copied).  Additionally, shift and clip all outstanding
update regions as necessary (actually, we avoid copying the buffer
when a shift is necessary, and simply reconstruct the projection;
see FIXME comment in the code.)

(cherry picked from commit fbeae36118)
2018-08-03 14:10:00 -04:00
Ell
2ad7fe9763 app: add GimpProjectable::bounds-changed signal
... and a corresponding gimp_projectable_bounds_changed() function.

This signal can be emitted by implementers of GimpProjectable,
instead of the GimpProjectable::structure-changed signal, when the
projectable's bounds change, but its content does not -- i.e., the
old content simply gets cropped to the new bounds.

(cherry picked from commit 460c3d1349)
2018-08-03 14:10:00 -04:00
Ell
c0a4e12b3d app: add gimp_tile_handler_validate_buffer_copy()
Add gimp_tile_handler_validate_buffer_copy(), which can be used
instead of gegl_buffer_copy(), to copy a (subregion of a) source
buffer to a destination buffer with a GimpTileHandlerValidate,
uninvalidating, and avoiding unnecessarily rendering, the
affected region.  Additionally, if the source buffer also uses a
GimpTileHandlerValidate, the relevant parts of the source buffer's
dirty region are copied to the destination's dirty region as well.

(cherry picked from commit eeed4778a2)
2018-08-03 14:10:00 -04:00
Ell
9ad3720271 app: add gimp_tile_handler_validate_unassign()
... which should be used to properly remove a
GimpTileHandlerValidate from a buffer, instead of using
gegl_buffer_remove_handler() directly.

Use gimp_tile_handler_validate_unassign(), instead of
gegl_buffer_remove_handler(), in gimp_projection_free_buffer().

(cherry picked from commit 12530e21b2)
2018-08-03 14:10:00 -04:00
Ell
cf0abb0ed9 app: in GimpTileHandlerValidate, clear data when allocating tile
In GimpTileHandlerValidate, when allocating a new tile upon a
TILE_GET command, but not rendering the whole tile, clear the tile
data before rendering, so that the unrendered regions of the tile
contain zeros, rather than junk.

(cherry picked from commit e1e4ba9c8b)
2018-08-03 14:10:00 -04:00
Martin Srebotnjak
82555e58b9 Updated Slovenian translation 2018-08-03 17:52:10 +02:00
Martin Srebotnjak
cb0bc3a0b6 Updated Slovenian translation 2018-08-03 17:45:41 +02:00
Martin Srebotnjak
3db71dc2b8 Updated Slovenian translation 2018-08-03 17:42:57 +02:00
Martin Srebotnjak
599f947a66 Updated Slovenian translation 2018-08-03 17:38:38 +02:00
Martin Srebotnjak
05803d8f6c Updated Slovenian translation 2018-08-03 17:33:52 +02:00
Vinzenz Vietzke
0a2c03b667 Update German translation 2018-08-03 13:20:40 +00:00
Marco Ciampa
d2c45f3d03 Updated Italian translation 2018-08-02 17:50:32 +02:00
Jehan
c25aaaa0e0 app, libgimpbase: update vertical text labels.
This is my attempt to get better labels, shorter and also (hopefully)
improved English.
As Mitch states though, this is a Japanese-French-German conspiracy! So
any of you native English speakers out there, please review and suggest
proper English if needed. :-)

(cherry picked from commit 9cdedc98f8)
2018-08-02 15:26:19 +02:00
Jehan
9ec12b6246 app: minor coding-style cleanup.
Adding spaces between function names and parenthese.

I would normally have just amended the contributed patches and pushed,
but gitlab is making our review process over-complicated with many
roundtrips with contributors, and review quality drops. Stating it here
for the records!
See commit 70945b8960 (where this cleaning
should have directly been done).

(cherry picked from commit 5c56f8cb3a)
2018-08-02 15:26:19 +02:00
ONO Yoshio
8945f4b96d Fixed when texttool popup is shown first, it does not have current text direction.
(cherry picked from commit ee468b0024)
2018-08-02 15:26:19 +02:00
ONO Yoshio
f6ed6e6e72 Fixed that anchor position of text is shifted when text direction is changed.
anchor of LTR is top-left corner.
anchor of TTB-RTL is top-right cornner.
anchor of TTB-LTR is top-left cornner.

(cherry picked from commit 70945b8960)
2018-08-02 15:26:19 +02:00
Jehan
552dc5f867 INSTALL: update gettext requirement.
Also fix number of hyphens around the title.

(cherry picked from commit 9c84d2375b)
2018-08-01 19:00:38 +02:00
Jehan
8e889fd10c configure: making xgettext recommended version a requirement.
Back when I implemented this as a recommendation, gettext 0.19 was not
even out yet. Nowadays it is in Debian Testing (Debian Stable even!), so
it makes no sense to continue just "recommend" it, especially as it was
breaking script-fu localization.

See old commit feb1bf2797.

(cherry picked from commit 8e6afe10a6)
2018-08-01 19:00:31 +02:00
Jehan
8d2ade524e app: add "cairo-ARGB32" to "R'G'B'A u8" in gimp_babl_init_fishes().
This fish is used for text layers, so if we let it to be
lazy-initialized, the first time one writes text in a text layer, it
generates a few seconds delay, which is really not great.

(cherry picked from commit a03e52ea08)
2018-08-01 19:00:22 +02:00
Jehan
e870c6c5da po: fix validation of Desktop file because of Marathi keywords.
Fixes:
> WARNING: Failed to validate desktop file […] for locale string list
> key "Keywords[mr]" in group "Desktop Entry" does not have a semicolon
> (';') as trailing character

I just added a semicolon.

(cherry picked from commit 79a5c304d2)
2018-08-01 19:00:13 +02:00
Ell
daa12a1ebc Issue #1884 - Incorrect font when export to png
In gimp_layer_convert(), avoid converting the drawable type when
the source and destination color profiles are equal, if otherwise
unnecessary.  Otherwise, text layers get unnecessarily re-rendered
during conversion, and, by extension, during image duplication
(which happens when exporting to any format that requires merging
down the image).  This may cause the text layer to appear
differently in the duplicated image, or even use a different font
if the original font doesn't exist.

(cherry picked from commit a826a19359)
2018-08-01 05:06:30 -04:00
Ell
ed631c842a app: copy the is-color-managed status when duplicating an image
When duplicating an image, copy the source image's is-color-managed
status to the duplicated image, instead of having the duplicated
image always be color managed.  In particular, do this before
duplicating the layers, so that we don't convert the duplicated
layers from sRGB to the image's profile when duplicating an image
with a non-sRGB profile but with color management turned off.

(cherry picked from commit f38443f3b0)
2018-08-01 05:06:30 -04:00
Rodrigo Lledó
84e55dde1e Update Spanish translation 2018-08-01 08:16:41 +00:00
ONO Yoshio
bb56a97a8b Modified a comment in more detail.
(cherry picked from commit b405b0364c)
2018-07-31 15:24:30 +02:00
Jehan
ea12bc7a2b NEWS: keep up-to-date. 2018-07-31 00:35:24 +02:00
Jehan
ff13f75ebc icons: update icons for new top-to-bottom text feature.
They are not perfect (not a designer here!) but a bit less packed than
the previous one. So hopefully more understandable.

(cherry picked from commit e326faa77c)
2018-07-30 23:10:19 +02:00
ONO Yoshio
e2958714d9 MR !19: Add support for vertical text writing.
Squashed commit of the following:

commit ee1ff7d502658cfa1248a13a3f0348495db07eda
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sun Jul 29 00:31:47 2018 +0900

    Fixed that gimp-text-dir-ttb-* icons are lacked in Symbolic.

commit d87d012d697628da28fe90199cc04b95b72ba8ef
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sat Jul 28 16:23:10 2018 +0900

    Fix a typo.

commit cf0238bf7df56c384cdf3b7ec69557d14740f853
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sat Jul 28 15:50:57 2018 +0900

    Fixed seg fault error.

commit b07f60d06fa1a753fda5b4d46af01698c344154e
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Fri Jul 27 17:15:34 2018 +0900

    Add support for vertical text writing.

    https://gitlab.gnome.org/GNOME/gimp/issues/641

(cherry picked from commit 587d9bbb03)
2018-07-30 23:10:11 +02:00
Bruno Lopes da Silva
b43473d940 Update Brazilian Portuguese translation 2018-07-30 17:50:59 +00:00
Hannie Dumoleyn
892515fad2 Update Dutch translation 2018-07-30 17:16:45 +00:00
Bruno Lopes da Silva
cb55faeb61 Update Brazilian Portuguese translation 2018-07-30 16:30:32 +00:00
Piotr Drąg
19e243e8e7 Update Polish translation 2018-07-29 19:38:32 +02:00
Jehan
47b3f5cc33 NEWS: keep up-to-date. 2018-07-25 17:27:15 +02:00
Jehan
d403f3313a app: show relevant files only by default.
Just like it was until now, the default filtering should not be all
files, but only relevant files (i.e. XCF when saving, exportable images
when exporting and loadable images/XCF when opening).
Now all files will only be available through the "Show All Files"
checkbox.

This is simpler than previous implementations where the list was
proposing "All Files", "All Images" and "All XCF/export images". That is
just too much.

With this default, I get the "All Files" checkbox out of the expander so
that it is visible immediately even when the format list is unexpanded
(you don't want people to get pissed when not finding how to display all
their files).

(cherry picked from commit 6b4b3bad13)
2018-07-25 17:07:54 +02:00
Jehan
ed5432d58f Issue #1160: file dialog view filter getting confused with file...
... format selection.
Second step: add a "Show All Files" checkbox so that one can still
prevent view filtering even when forcing a load format.
This is useful when loading files with unusual extensions, for instance.

(cherry picked from commit 6369445874)
2018-07-25 16:12:19 +02:00
Jehan
88d126c31a Issue #1160: file dialog view filter getting confused with file...
... format selection.
As discussed, the first step is to get rid of the filter list. Our extra
widget now has both roles of filtering the file list and forcing a
loading procedure.

(cherry picked from commit 9ae7827f9b)
2018-07-25 15:39:41 +02:00
Ell
efe72a8d56 */Makefile.am: add *marshal.h files to BUILT_SOURCES
In subdirs containing a generated foomarshal.h header, add the
generated sources to BUILT_SOURCES, so that they're generated
before the rest of the source files are built.  Otherwise, since
there is no rule specifying the dependency between the rest of the
source files and foomarshal.h, and since foomarshal.h is not
checked into git (and hence doesn't exist when doing a clean
build), compilation of the said source files may fail if they're
built before foomarshal.h is generated.

(cherry picked from commit a5102a7dba)
2018-07-24 14:05:23 -04:00
Rodrigo Lledó
3a9025fd7f Update Spanish translation 2018-07-24 10:37:15 +00:00
Daniel Mustieles
800a02a297 Updated Spanish translation 2018-07-24 12:28:50 +02:00
Daniel Mustieles
b77c523c4e Updated Spanish translation 2018-07-24 10:22:06 +02:00
Ell
f1bc66ce30 app: fix segafult when halting filter-tool with controller
In GimpFilterTool, bind the controller's lifetime to the lifetime
of the config object, rather than to the lifetime of the
corresponding tool widget; make the controller's widget pointer a
weak pointer to the widget, and bail out of the controller "set()"
functions when the widget pointer is NULL.

This fixes an issue arising when the properties of a config object
that outlives the widget change after the widget had died,
triggering a call to the controller's set() function, resulting in
a segafult when trying to access the widget.

(cherry picked from commit 78abe756f1)
2018-07-24 02:27:01 -04:00
Ell
dc7d2c357c app: in prop-GUI, use "direction" UI-meta of angle props for dial
When constructing a prop-GUI widget for an angle property with a
dial, use the the property's "direction" UI-meta, if exists, to set
the direction of the dial.  Together with GEGL commit
7b0578073a0f20334b5a8a8fe57b649d9f302454, this fixes wrong dial
direction in certain ops that use clockwise angles.

(cherry picked from commit 6976e87dac)
2018-07-24 02:27:01 -04:00
Ell
49ce2422f9 app: in GimpDial, add "clockwise-angles" property ...
... and rename "clockwise" to "clockwise-delta"

Add a boolean "clockwise-angles" property to GimpDial, which, when
set, causes the dial legs' angles to be measured clockwise, rather
than counter-clockwise.  The property is FALSE by default.

Rename the "clockwise" property, which controls the direction of
the measured delta between the two angles, to "clockwise-delta", to
avoid confusion, and adapt the rest of the code.

(cherry picked from commit 0c477564ad)
2018-07-24 02:26:59 -04:00
Michael Schumacher
c582023ef5 icons: add missing gimp-color-space-non-linear.png files 2018-07-23 18:25:57 +02:00
Piotr Drąg
0aba1c0e76 Update Polish translation 2018-07-22 19:58:41 +02:00
Michael Natterer
77f3c8e404 libgimpwidgets, icons: add gimp-color-space-non-linear icon
For now just a copy of the "perceptual" icon.

(cherry picked from commit 5c94ebaed3)
2018-07-20 17:29:31 +02:00
Rodrigo
8954a0e24c Update Spanish translation 2018-07-19 09:00:58 +00:00
Ell
b72dc8abf1 Issue #1874 - Critical error after selecting "Edit Text on Canvas" ...
... from layer context menu

In gimp_text_tool_set_layer(), do nothing if the input layer is the
currently-edited layer, otherwise we get a CRITICAL.

(cherry picked from commit 6b1d77b11c)
2018-07-19 02:27:11 -04:00
Marco Ciampa
3e1138dd08 Updated Italian translation 2018-07-19 01:02:31 +02:00
Marco Ciampa
d5dd54c8ed Updated Italian translation 2018-07-19 00:53:22 +02:00
Jehan
29deb53727 libgimpconfig: update some description comments.
Second parameter of gimp_scanner_parse_token() and
gimp_scanner_parse_identifier() is not a return value. It is a value to
compare with.

(cherry picked from commit bc427479e0)
2018-07-18 16:34:19 +02:00
Jehan
a52473196f INSTALL: add some recommended dependencies to GEGL.
This is a "for info" comment so that packagers don't forget them when we
sometimes depend on some specific GEGL dependencies.

(cherry picked from commit 530a2bd9a5)
2018-07-18 16:34:01 +02:00
Dimitris Spingos (Δημήτρης Σπίγγος)
d779302c74 Update Greek translation 2018-07-18 17:28:43 +03:00
Ell
65daaeb876 app: improve file-handler sorting
... by falling back to the procedure name as a last resort.

(cherry picked from commit 534e8aa92c)
2018-07-18 09:27:36 -04:00
Ell
ed8f80bf4b app: fix dynamics editor "fade" curve color
In the dynamics editor, use the neutral curve color, which depends
on the current theme, for the "fade" curve, instead of hard-coding
it to dark gray, which is hardly visible with dark themes.

(cherry picked from commit b2a9bb4688)
2018-07-17 09:18:41 -04:00
Ell
2540b4eff8 app: indentation fix in gimppluginmanager-restore.c
(cherry picked from commit bfc2681753)
2018-07-17 03:19:04 -04:00
Ell
dd91322ab9 Issue #1825 - PSD files are loaded as merged by default ...
... depending on UI language

Use gimp_register_file_handler_priority(), added in the previous
commit, to increase the priority of the merged PSD loader, so that
the non-merged loader is always preferred over it (unless
explicitly chosen), regardless of the UI language.

(cherry picked from commit 0320126254)
2018-07-17 03:02:57 -04:00
Ell
c5c0f87310 app, pdb: add gimp-register-file-handler-priority procedure
Add a gimp-register-file-handler-priority procedure, which can be
used to set the priority of a file-handler procedure.  When more
than one file-handler procedure matches a file, the procedure with
the lowest priority is used; if more than one procedure has the
lowest priority, it is unspecified which one of them is used.  The
default priority of file-handler procedures is 0.

Add the necessary plumbing (plus some fixes) to the plug-in manager
to handle file-handler priorities.  In particular, use two
different lists for each type of file-handler procedures: one meant
for searching, and is sorted according to priority, and one meant
for display, and is sorted alphabetically.

(cherry picked from commit b4ac956859)
2018-07-17 03:02:57 -04:00
Michael Natterer
dc29bfe362 app: opaque in gimp_layer_new() is 1.0 not 255
The value is later CLAMP()ed correctly, but fix the call in xcf-load.c
anyway.

(cherry picked from commit ac5f44eb74)
2018-07-16 14:51:41 +02:00
Michael Natterer
7d897a451e libgimpcolor: add gimp_color_profile_get_space()
which returns the Babl space matching the profile.

(cherry picked from commit ac57af58a2)
2018-07-16 14:14:18 +02:00
Øyvind Kolås
75837694e6 app: gimp:semi-flatten propagate babl space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
0a2ec7c292 app: gimp:threshold-alpha propagate babl space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
9b4e8ee275 app: gimp:set-alpha propagate space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
a8a7c99389 app: gimp:grow propagate babl space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
739d72c562 app: gimp:shrink propagate bable space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
6a6ef0f2e1 app: propagate babl space in pointfilter base class 2018-07-16 13:37:01 +02:00
Øyvind Kolås
df00af81b3 app: gimp:flood propagate babl space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
f4cd1f7970 app: gimp:desaturate propagate babl space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
3c49e43062 app: gimp:compose-crop propagate babl space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
b7ca5f1997 app: gimp:border propagate babl space 2018-07-16 13:37:01 +02:00
Ell
e13eb13bc4 app: update GimpToolCompass when display is scaled/rotated
In GimpToolCompass (and, as a consequence, in the measure tool),
update the measured angle when the shell is scaled, rotated, or
flipped, so that we always satisfy the compass's constrains, and
render correctly.

(cherry picked from commit a810c6b60b)
2018-07-16 04:44:51 -04:00
Ell
7ab213d918 app: in GimpToolCompass, add visual distinction between angle lines
When using a GimpToolCompass in 3-point mode, add a small gap after
the angle arc to the line corresponding to the "second" non-origin
point, so that it's visually distinguishable from the line
corresponding to the "first" point.  This has significance for the
measure tool, since it determines the direction of the rotation
when straightening the image (the first point is rotated toward the
second point.)

(cherry picked from commit 0f03f9e9f5)
2018-07-16 02:17:13 -04:00
Ell
241c8dd756 app: keep display-enums.h (sort-of) alphabetically sorted
(cherry picked from commit f026a3fc2d)
2018-07-16 01:42:27 -04:00
Ell
9a77dc75a4 Issue #1850 - Undoing the "straighten" operation in the Measure tool ...
... does not restore the measure points

Halt the measure tool after straightening, thus removing the
expectation that undoing the operation should restore the original
points.

Halting the tool, rather than making undo work "as expected",
sidesteps several issues:

  - Implementing undo correctly is tricky, since image-undo and
    tool-undo are handled separately.

  - In fact, the measure tool doesn't provide tool-undo, so that
    image edits can be undone while the tool is active without
    affecting the tool, and it's not clear that we want to change
    this behavior.  However, this makes undoing a straighten
    operation a special case, and it's not entirely clear what the
    behavior should be when undoing other kinds of transformations,
    or when the measure points had changed since the straighten
    operation.

  - Perhaps most importantly, measure tool points are restricted to
    the pixel grid, which means that when measuring an angle
    against an orientation that's not fully horizontal or vertical
    in image space (either using a 3-point angle, or when the
    canvas is rotated), the resulting transformed point after
    straightening doesn't generally land on the pixel grid, causing
    it to be rounded, which can result in a non-zero angle after
    the rotation.  This is especially ugly, since clicking
    "straighten" again at this point would cause another non-
    trivial rotation.

(cherry picked from commit 2e08c9164a)
2018-07-16 01:21:48 -04:00
Michael Natterer
d26bde8f7a Issue #1805 - Sample Points keep resetting themselves to "Pixel"
Rename XCF property PROP_SAMPLE_POINT to PROP_OLD_SAMPLE_POINT and add
new PROP_SAMPLE_POINT.

The new property saves the sample point's pick mode plus some padding
for whatever else we might want to add. Always save the old property
too so nothing changes for older GIMP versions, and avoid loading the
old property if the new one was loaded before.

(cherry picked from commit 47a008be97)
2018-07-16 02:55:21 +02:00
Ell
bfa94216a9 app: bind "orientation" measure-tool option to compass
Bind the "orientation" property of the measure-tool options to the
tool's compass widget's "orientation" property, instead of manually
synchronizing their values.

(cherry picked from commit 7a91aabf37)
2018-07-15 19:58:59 -04:00
Ell
dc2cdfe658 Issue #1851 - Measure tool straighten rotation is always to the horizontal.
Add an "orientation" option to the measure tool, corresponding to
the "orientation" property of GimpToolCompass (i.e., it controls
the orientation against which the angle is measured, when not in 3-
point mode.)  The orientation is "auto" by default, so that the
angle is always <= 45 deg.  Note that the "orientation" option
affects the tool's "straighten" function, so that the layer is
rotated toward the current orientation.

Use the "pixel-angle" and "unit-angle" properies of
GimpToolCompass to read the measured angle, instead of duplicating
the angle-measurement logic, in particular, so that we benefit from
the improvements/fixes of the previous commit.

(cherry picked from commit cb3b7a1ba5)
2018-07-15 19:09:16 -04:00
Ell
fc4ca7fbcf app: add "orientation" property to GimpToolCompass + improvements
Add an "orientation" property to GimpToolCompass, which can be one
of "auto", "horizontal", or "vertical", and which controls the
orientation of the line against which the angle is measured, when
not in 3-point mode (previously, the line would always be
horizontal.)  When "orientation" is "auto", the orientation is
automatically set to either horizontal or vertical, such that the
measured angle is <= 45 deg.

Keep the line horizontal, or vertical, in display-space, rather
than in image-space, so that the compass works correctly even when
the canvas is rotated and/or flipped.

Fix the compass's behavior when the image's horizontal and vertical
resolutions are different, both with and without dot-for-dot.

Add "pixel-angle" and "unit-angle" read-only properties, which
return the measured angle either with or without taking the image's
resolution into account, respectively.  These properties will be
used by the measure tool in the next commit, instead of having it
implement its own angle calculation.

(cherry picked from commit d2f33cf1be)
2018-07-15 19:09:16 -04:00
Ell
4cb91320a4 app: fix line-angle constraint when xres != yres
Fix gimp_constrain_line() and friends to properly constrain line
angles when the image's horizontal and vertical resolutions are
different, and dot-for-dot is disabled.

(cherry picked from commit 4fefab1798)
2018-07-15 19:09:16 -04:00
Michael Natterer
88db1f8282 Issue #1805 - Sample Points keep resetting themselves to "Pixel"
Remember the sample point's GimpColorPickMode in the sample point
itself, so it is remembered across switching between images.

Not persistent in the XCF yet tho...

(cherry picked from commit a0129504c8)
2018-07-16 00:46:38 +02:00
Michael Natterer
6e86e2233e app: move GimpColorFrameMode to the core and name it GimpColorPickMode
(cherry picked from commit f676f2aa79)
2018-07-15 23:29:41 +02:00
Michael Natterer
513c71d1d2 app: sort core-enums.h alphabetically
Sorry for messing with git diffs, but this unsorted mess has been
annoying since forever.

(cherry picked from commit a7a277efe7)
2018-07-15 22:28:22 +02:00
Michael Natterer
16df7fa941 app: minor cleanup in gimpguide.c
(cherry picked from commit 827faa2a25)
2018-07-15 22:28:12 +02:00
Piotr Drąg
34080f1188 Update Polish translation 2018-07-15 19:58:18 +02:00
Michael Natterer
3abfd14d61 app: add GimpAuxItem as base class for GimpGuide and GimpSamplePoint
and GimpAuxItemUndo for their respective undo classes.

(cherry picked from commit 2cd829eb85)
2018-07-15 17:13:03 +02:00
Michael Natterer
3c9de4b59e app: turn GimpSamplePoint into a GObject, just like GimpGuide
In fact, they are so similar now, they should get a common abstract
parent class.

(cherry picked from commit b4c244b839)
2018-07-15 16:01:16 +02:00
Michael Natterer
f585cf94a0 app: some cosmetic cleanup in the guide code
(cherry picked from commit e76eb736d4)
2018-07-15 15:54:07 +02:00
Michael Natterer
a90619ff00 app: rename enum GimpColorPickMode to GimpColorPickTarget
This is just some preparation for fixing issue #1805, but actually
"target" is a much better name so I went the full way and also changed
GUI labels and the color picker tool options config property
accordingly.

If anyone notices at all, how horrible is it to lose your saved pick
target...

(cherry picked from commit b140b283dc)
2018-07-15 14:39:03 +02:00
Ell
bc312531fb app: flush async-operations queue when setting async thread count to 0
In gimp-parallel, always flush the async-operations queue (by
executing all remaining operations on the caller thread) when
setting the async-pool thread count to 0 (as happens when setting
GEGL_THREADS=1, per the previous commit,) and not only when
shutting GIMP down.  Otherwise, pending asynchronous operations
can "get lost" when setting GEGL_THREADS to 1.

Additionally, in gimp_gegl_init(), initialize gimp-parallel before
before connecting to GimpGeglConfig's "notify::num-processors"
signal, so that the number of async threads is set *before*
GEGL_THREADS, in order to avoid setting GEGL_THREADS to 1 while
async operations are still executing.

Also, allow setting the number of gimp-parallel-distribute threads
while a gimp-parallel-distribute function is running (which can
happen if gimp-parallel-distribute is used in an async operation,
as is the case for histogram calculation), by waiting for the
parallel-distribute function to finish before setting the number of
threads.

(cherry picked from commit 432a884715)
2018-07-15 05:07:46 -04:00
Ell
1c435f313b app: disable parallel asynchronous operations when GEGL_THREADS=1
When GEGL_THREADS=1, concurrent access to the same buffer is not
safe, which can result in errors if asynchronous operations are
allowed to run in parallel to the main thread (see
https://gitlab.gnome.org/GNOME/gimp/issues/1721#note_265898.)

Disable parallel execution of asynchronous operations when
GEGL_THREADS=1 for now, to fix this.  Ultimately, GEGL should be
able to remain thread-safe even when GEGL_THREADS=1.  Note that we
want to execute asynchronous operations on a separate thread even
when GEGL_THREADS=1, since the goal here is mainly to avoid
blocking the main thread during their execution, rather than
speeding their execution up (in particular, it's benecifical to run
asynchronous operations in parallel even on a single-core machine,
while parallelizing GEGL operations generally isn't.)

(cherry picked from commit 408540659f)
2018-07-15 03:44:33 -04:00
luz.paz
1de48b2692 gimptoolpolygon.c source typo
Found via `codespell`

(cherry picked from commit 719059fb4e)
2018-07-14 21:19:09 +02:00
luz.paz
2883b8fb40 Misc. comment typos
Found via `codespell`

(cherry picked from commit 732bcb463e)
2018-07-14 21:17:19 +02:00
Michael Natterer
e747cbad6b plug-ins, pdb: remove the unsharp-mask plug-in and add a PDB compat proc
(cherry picked from commit 680642e37c)
2018-07-14 17:15:56 +02:00
Michael Natterer
9e71fc0983 Change a bazillion URLs to https://
Including all user-visible link and links called from code, like
the help pages.

(cherry picked from commit bab75b7365)
2018-07-14 14:23:42 +02:00
Michael Natterer
7805a4cdbd libgimpthumb: update the URL of the thumbnail spec
(cherry picked from commit 02160a26b0)
2018-07-14 13:28:40 +02:00
Bruno Lopes da Silva
a7e98a33f5 Update Brazilian Portuguese translation 2018-07-14 01:07:00 +00:00
Michael Natterer
c4ba9c36a6 Issue #1841 - Export As... mng swaps width and height
layer_cols and layer_rows were swapped.

(cherry picked from commit 44b469e493)
2018-07-13 17:58:28 +02:00
Bruno Lopes da Silva
9340b68e81 Update Brazilian Portuguese translation 2018-07-13 14:04:02 +00:00
Michael Natterer
c743aed29d app: relax precondition checks in gimp_operation_config_get_type()
Only require the parent type if the requested type is not already
registered.

(cherry picked from commit 9ef39b507b)
2018-07-13 13:58:51 +02:00
Daniel Mustieles
bfc3b5f780 Update Spanish translation 2018-07-13 11:53:29 +00:00
Michael Natterer
5e3150b90e app: small formatting fix in gimpfiltertool-widgets.c
(cherry picked from commit 9629fc8785)
2018-07-13 12:41:30 +02:00
Rafael Fontenelle
87ef1d4d8f Update Brazilian Portuguese translation 2018-07-13 09:27:51 +00:00
Bruno Lopes da Silva
edd1d01b41 Update Brazilian Portuguese translation 2018-07-13 08:41:57 +00:00
Michael Natterer
e7cfda7d9f app: remove duplicate include in gimpcurvesconfig.c
(cherry picked from commit b5b48e51c8)
2018-07-13 01:19:33 +02:00
Bruno Lopes da Silva
127a982232 Update Brazilian Portuguese translation 2018-07-12 16:15:50 +00:00
Ell
dadfced2af app: don't process updates when clearing container-tree-view context
In GimpContainerTreeView, don't process updates in response to a
selection-change if the selection is empty (for the reason this is
necessary in the first place (though not in this particular case),
see commit f9a71fb6de5a2e65e0d88c6b7aaa39f589d6cdc4.)  When
clearing the container-view's context, we deselect all items after
setting the context to NULL, in which case
gimp_view_renderer_draw() warns, breaking one of our tests.
2018-07-12 10:59:32 -04:00
Michael Natterer
6f04d06095 Issue #1834 - (gimp-context-get-gradient) could return a gradient name...
...not found if language changed since last session

For various reasons, (gimp-context-get-brush, pattern, gradient, ...)
can return "Standard" which is the untranslatable name of the internal
fallback object.

Therefore, we must accept "Standard" as fallback in all PDB functions
that take brush, pattern, gradient etc. names.

(cherry picked from commit 397ae027ba)
2018-07-12 12:44:30 +02:00
Michael Natterer
ea86c3be12 Issue #1833 - (gimp-context-get-gradient-repeat-mode) always warns...
...and successfully fails

Commit d2ad2928 removed "gradient-repeat" from GimpPaintOptions, not
considering that it is also used in the PDB.

Move "gradient-repeat" from GimpGradientOptions back to
GimpPaintOptions, and add a comment that it is only used by the
gradient tool, not for painting.

(cherry picked from commit c3d37140eb)
2018-07-12 11:44:35 +02:00
Michael Natterer
f39d359bdf Forgot some license links... 2018-07-12 00:13:19 +02:00
Michael Natterer
a88c0ffb93 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:47:19 +02:00
Matej Urbančič
db5b2e3433 Updated Slovenian translation ... 2018-07-11 22:40:06 +02:00
Matej Urbančič
512cb31d83 Updated Slovenian translation ... 2018-07-11 22:38:20 +02:00
Matej Urbančič
b52541a03b Updated Slovenian translation ... 2018-07-11 22:35:26 +02:00
Matej Urbančič
4711f8b791 Updated Slovenian translation ... 2018-07-11 22:31:54 +02:00
Matej Urbančič
657169377e Merge branch 'gimp-2-10' of gitlab.gnome.org:GNOME/gimp into gimp-2-10 2018-07-11 22:28:59 +02:00
Matej Urbančič
f36bf556ca Updated Slovenian translation ... 2018-07-11 22:28:13 +02:00
Michael Natterer
cf80265411 More bugzilla -> gitlab in various files
(cherry picked from commit 8eb77376c4)
2018-07-11 22:26:53 +02:00
Martin Srebotnjak
0456c7c934 Updated Slovenian translation 2018-07-11 22:22:41 +02:00
Martin Srebotnjak
f0af65b65a Updated Slovenian translation 2018-07-11 22:20:36 +02:00
Michael Natterer
d6e0587085 po*: change Report-Msgid-Bugs-To URL to gitlab.gnome.org 2018-07-11 22:05:23 +02:00
Rafael Fontenelle
9c06f323e4 Update Brazilian Portuguese translation 2018-07-10 18:06:44 +00:00
Caio Nascimento
29094a5f0f Update Brazilian Portuguese translation 2018-07-10 14:14:39 -03:00
Bruno Lopes da Silva
6b096baf66 Update Brazilian Portuguese translation 2018-07-10 15:48:21 +00:00
Piotr Drąg
7e43757bf0 Update Polish translation 2018-07-10 05:50:30 +02:00
Rodrigo
a5437e4d0d Update Spanish translation 2018-07-09 11:06:28 +00:00
Daniel Mustieles
b871c3602d Update Spanish translation 2018-07-09 06:42:25 +00:00
Daniel Mustieles
5c20f279ed Update Spanish translation 2018-07-09 06:37:55 +00:00
Daniel Mustieles
bfff811ec1 Update Spanish translation 2018-07-09 06:35:05 +00:00
Bruno Lopes da Silva
b4d0f298f2 Update Brazilian Portuguese translation 2018-07-08 17:36:20 +00:00
Piotr Drąg
b5c470698f Update Polish translation 2018-07-08 17:36:55 +02:00
Michael Natterer
a09e016d32 libgimpwidgets: forgot one s/H/h/ in LCh
(cherry picked from commit a1f2464ed6)
2018-07-08 17:31:25 +02:00
Piotr Drąg
748863ae2a Update Polish translation 2018-07-08 17:22:28 +02:00
Michael Natterer
cc20410e80 app, libgimp*: make user visible color model labels consistent
- "LCh" intead of "LCH"
- "CIE LCh" instead of "CIELCh"
- "HSV Hue" instead of "Hue (HSV)" for all models/components

(cherry picked from commit 926dc070ef)
2018-07-08 16:21:23 +02:00
Michael Natterer
5d11544b2c app: make the rectangle options a bit narrower, still too wide...
(cherry picked from commit 6c3b1112be)
2018-07-08 14:49:13 +02:00
Daniel Șerbănescu
6377e60e26 Update Romanian translation 2018-07-08 07:34:26 +00:00
Jernej Simončič
d93b4437b7 Installer: fix .svg MIME type in Registry (fixes toolbox icons) 2018-07-08 00:18:37 +02:00
Vinzenz Vietzke
7acadffd47 Update German translation 2018-07-07 20:38:23 +00:00
Ell
f9a71fb6de app: work around GTK bug causing UI freeze during tree-view operations
In GimpContainerTreeView, work around a GTK bug which can cause the
window containing the tree view to stop processing updates,
resulting in an apprarent freeze, until update-processing is
explicitly requested.  This can be triggered by adding layers to a
layer group until the layers-dialog tree view is almost full, but
still doesn't have a scrollbar, and then duplicating the group.

This doesn't seem to affect GTK3, so not applying to master.
2018-07-07 16:25:38 -04:00
Michael Natterer
7b8d8a29a5 Issue #1805 - Sample Points keep resetting themselves to "Pixel"
Don't destroy the color frames when the number of points changes.
Instead, simply hide them so they keep their color model, but add an
upper limit of an arbitrary number of 16 frames to keep around.

(cherry picked from commit 370680f9bc)
2018-07-07 19:22:39 +02:00
Jehan
58b71b412c NEWS: kickstart the 2.10.6 news!
These are quite cool already. :-)
2018-07-07 18:34:12 +02:00
Snehalata B Shirude
9a08f499c6 Added Marathi translations 2018-07-07 18:16:29 +02:00
Snehalata Shirude
dccb2e3ead Added Marathi translation 2018-07-07 11:39:57 +02:00
Michael Natterer
7a49f59021 plug-ins: need to initialize "name" now in file-pat.c
(cherry picked from commit 34a0c36602)
2018-07-07 10:51:05 +02:00
Jernej Simončič
038e9e711b Installer: improved compile.bat 2018-07-06 20:51:04 +02:00
Ell
ff665da12b app, pdb: use gimp_babl_is_valid() in more places
Use gimp_babl_is_valid(), added in the previous commit, to validate
image-type/precision combinations in various functions.

(cherry picked from commit 49ca383fa4)
2018-07-06 13:45:01 -04:00
Ell
2ac529cb8c Issue #1792 - Xcf file crashing gimp-console-2.10 ...
... (valgrind reports Invalid read)

Add gimp_babl_is_valid(), which takes a GimpImageBaseType and a
GimpPrecision, and determines whether the image-type/precision
combination is valid.  Use this function to validate that loaded
XCFs use a valid type/precision combination, before trying to
create the image.  Otherwise, we get a CRITICAL, and eventually a
segfault, when the combination is invalid.

Use the same function to validate the arguments of
gimp_image_new().

(cherry picked from commit a0a62656d2)
2018-07-06 13:06:52 -04:00
Marco Ciampa
e25cccf049 Updated Italian translation 2018-07-06 13:51:54 +02:00
Marco Ciampa
abbe7c4e2f Merge branch 'gimp-2-10' of gitlab.gnome.org:GNOME/gimp into gimp-2-10 2018-07-06 13:50:20 +02:00
Marco Ciampa
7ca3f1d406 Updated Italian translation 2018-07-06 13:50:02 +02:00
Michael Natterer
f46cf260c5 Issue #1730 - pat file that crashes gimp-2.10
Introduce GIMP_PATTERN_MAX_SIZE (10000) and GIMP_PATTERN_MAX_NAME (256)
and validate pattern dimensions and pattern name length against them.

Add GIMP_BRUSH_MAX_NAME and validate that too.

Also make sure that the names are properly terminated, and some
cleanup.

(cherry picked from commit 9b56ca8c1d)
2018-07-06 13:11:57 +02:00
Michael Natterer
cd5e1470c9 app, plug-ins: move GIMP_BRUSH_MAX_SIZE to gimpbrush-header.h
and use it in the brush file plug-ins.

(cherry picked from commit 8195a56261)
2018-07-06 13:11:49 +02:00
Michael Natterer
b9272f8b5e app, plug-ins: clean up gimpbrush-header.h and gimppattern-header.h
Namespace the header structs, s/GBRUSH/GIMP_BRUSH/,
s/GPATTERN/GIMP_PATTERN/.

(cherry picked from commit e759ce3558)
2018-07-06 13:11:41 +02:00
Daniel Mustieles
80adf883d2 Update Spanish translation 2018-07-06 08:01:09 +00:00
Rodrigo
e93895ca84 Update Spanish translation 2018-07-06 07:28:55 +00:00
Rodrigo
dd6efd79c9 Update Spanish translation 2018-07-06 06:47:29 +00:00
Ell
74591e0598 app: properly shut down gimp-parallel in stable versions
In app_exit_after_callback(), call gimp_gegl_exit() before
gegl_exit() when performing a quick shut-down in stable versions,
so that gimp-parallel, and, in particular, the async thread pool,
is properly shut down.  Code running in the async thread pool may
use GEGL (in particular, now the drawable previews are rendered
asynchronously), and calling gegl_exit() while it's still running
is unsafe.

(cherry picked from commit ed033b1cb5)
2018-07-06 02:17:08 -04:00
Ell
4f20255675 app: log actions upon activation before emitting "selected" signal
In GimpAction, instead of connecting the action-history log
function to the action's "activate" signal as a user-provided
handler, call it directly from the default handler.

In subclasses of GimpAction, chain to the parent's activate()
function before emitting the "selected" signal, so that we always
log the action in the history before responding to it.

This allows us to avoid the hack in commit
6544ce4301.

(cherry picked from commit 114d49510f)
2018-07-06 00:08:04 -04:00
Ell
7a63095582 app: avoid CRITICAL when loading XCF with empty gimp-text-layer parasite
(cherry picked from commit b4aece8a27)
2018-07-05 22:48:16 -04:00
Ell
18bab869a0 app: avoid CRITICAL when loading XCF with empty symmetry parasites
(cherry picked from commit e97f2510dc)
2018-07-05 22:48:16 -04:00
Ell
3a356db7c9 libgimpbase: gracefully reject Exif/IPTC/XMP metadata of invalid size
In gimp_metadata_set_from_{exif,iptc,xmp}(), gracefully reject data
of invalid size, returning an error instead of raising a critical.

In particular, this avoids a CRITICAL when loading an XCF with an
empty exif-ata parasite.

(cherry picked from commit eafefc7d81)
2018-07-05 22:48:16 -04:00
Ell
6d7d062099 app: avoid CRITICAL when loading XCF with empty gimp-image-metadata parasite
(cherry picked from commit d4ff57c793)
2018-07-05 22:48:16 -04:00
Ell
42c401dde9 app: avoid CRITICAL when loading XCF with empty gimp-image-grid parasite
(cherry picked from commit b54256fbdc)
2018-07-05 22:48:16 -04:00
Ell
9ab781bdce app: avoid CRITICAL when writing 0-length data to XCF
In xcf_write_int8(), avoid calling g_output_stream_write_all() with
data == NULL and count == 0, in which case it raises a CRITICAL and
doesn't set bytes_written, which we proceed to use uninitialized.
This can happen, e.g., when writing an empty parasite.

(cherry picked from commit 8e798e9cf2)
2018-07-05 22:48:16 -04:00
Ell
26df575278 libgimpconfig: allow writing empty data in gimp_config_writer_data()
(cherry picked from commit 3b228afdbe)
2018-07-05 22:48:16 -04:00
Ell
62c016543d libgimpcolor, app: gracefully reject empty ICC profiles
In gimp_color_profile_new_from_icc_profile() and
gimp_image_validate_icc_profile(), don't raise a critical when
encountering an empty profile, but rather reject it gracefully with
an error.

(cherry picked from commit 10f33b080b)
2018-07-05 20:38:18 -04:00
Ell
9da04d9655 Issue #1783 - Xcf file crashing gimp-console-2.10 ...
... (Invalid read reported by valgrind)

In gimp_image_parasite_validate(), don't segfault when validating
a "gimp-comment" parasite of size 0 (i.e., whose data is a 0-byte
array, not an empty string), and just consider it invalid.

(cherry picked from commit f384a0713d)
2018-07-05 20:38:18 -04:00
Ell
d5e1af7d52 Issue #1783 - Xcf file crashing gimp-console-2.10 ...
... (Invalid read reported by valgrind)

In xcf_read_int8(), avoid calling g_input_stream_read_all() with
data == NULL and count == 0, in which case it raises a CRITICAL and
doesn't set bytes_read, which we proceed to use uninitialized.
This can happen, e.g., when reading an empty parasite.

(cherry picked from commit 6ebadea7c1)
2018-07-05 20:38:18 -04:00
Ell
9f0f11f44e app: fix potential segfault in gimp_action_history_activate_callback()
In gimp_action_history_activate_callback(), bail if history.gimp is
NULL, instead of dereferencing it.  This can happen if GIMP is shut
down during the execution of a temporary procedure, such as a
script-fu script.  See the code comment for details.

(cherry picked from commit 6544ce4301)
2018-07-05 13:35:36 -04:00
Jernej Simončič
324570712e Installer: show progress while removing old .debug files 2018-07-05 17:29:59 +02:00
Jernej Simončič
16562649f3 Installer: remove all obsolete 2.8 plugins 2018-07-05 17:27:41 +02:00
Ell
6ac4c48d9a app: add gegl:stereographic-projection (little planet) to the menus
(cherry picked from commit a96264b1b7)
2018-07-05 09:54:16 -04:00
Ell
9d53af65fd configure.ac: require GEGL >= 0.4.5
(cherry picked from commit 450e61f853)
2018-07-05 09:54:16 -04:00
Jernej Simončič
363b03aa35 Installer: more verbose debug messages 2018-07-05 14:45:04 +02:00
Jernej Simončič
78fbf159a6 Installer: include full version number in icon name 2018-07-05 13:55:24 +02:00
Jernej Simončič
a296c92f7c Installer: update python2 interpreter file 2018-07-05 12:18:13 +02:00
Daniel Mustieles
66ffab2cc1 Update Spanish translation 2018-07-05 09:39:30 +00:00
Jernej Simončič
76f7d6fa21 Installer: remove Quick Launch icon 2018-07-05 00:45:11 +02:00
Jernej Simončič
e5988ed940 Installer: install debug symbols by default 2018-07-05 00:33:13 +02:00
Jernej Simončič
ff66d3d218 Installer: ignore version information on files installed to {app} 2018-07-05 00:26:49 +02:00
Jernej Simončič
04be184020 Installer: include gdk-pixbuf-query-loaders.exe 2018-07-05 00:23:25 +02:00
Ell
b307c80381 app: fix signature of gimp_parallel_run_async() function template
Remove the now-useless "independent" parmaeter.  It is supplanted
by the new gimp_parallel_run_async_independent() function.

(cherry picked from commit 00d034a1d4)
2018-07-04 16:12:22 -04:00
Ell
ce47731997 app: add mnemonic to the layer-group previews prefrences option
(cherry picked from commit da1558d0c8)
2018-07-04 16:12:22 -04:00
Ell
a9435b9ed3 app: fix drawable-preview offset
(cherry picked from commit e6a59eba08)
2018-07-04 16:12:22 -04:00
Ell
3c03fcbfbb app: add active async-operations counter to the dashboard
Add an "async" field to the dashboard's "misc" group, showing the
number of async operations currently in the "running" state (i.e.,
all those GimpAsync objects for which gimp_async_finish[_full]() or
gimp_async_abort() haven't been called yet).

(cherry picked from commit aa382650a1)
2018-07-04 16:12:22 -04:00
Ell
0d2d45c3ef app: add config option to enable/disable layer-group previews
Preview generation for layer groups is more expensive than for
other types of drawables, mostly since we can't currently generate
layer-group previews asynchronously.  Add a preferences option for
enabling layer-group previews separately from the rest of the
layer/channel previews; both of these options are enabled by
default.  This can be desirable regardless of performance
considerations, since it makes layer groups easily distinguishable
from ordinary layers.

(cherry picked from commit 30cc85fd63)
2018-07-04 16:12:22 -04:00
Ell
a3883e5de7 app: make dependent options insensitive when "promote imported" is unchecked
In the preferences dialog, make the "dither images when promoting
to floating point" option insensitive when the "promote impoprted
images to floating point precision" option is unchecked.

(cherry picked from commit 5b9bc0aadd)
2018-07-04 16:12:21 -04:00
Ell
0765d8882a app: render drawable previews asynchronously
In GimpViewRendererDrawable, use
gimp_drawable_get_sub_preview_async(), added in the previous
commit, to render drawable previews asynchronously.  While the
preview is being rendered, either keep showing the previous
preview, or render a placeholder icon.

This commit also fixes an issue where, under certain conditions, a
drawable preview would be rendered, even when layer/channel
previews are disabled in the preferences.

(cherry picked from commit 8a81bfd2f1)
2018-07-04 16:12:21 -04:00
Ell
f993de75fe app: add gimp_drawable_get_sub_preview_async()
... which is an asynchronous version of
gimp_drawable_get_sub_preview().

We currently support async preview generation for drawables whose
buffer isn't backed by a GimpTileHandlerValidate tile handler
(i.e., anything other than group layers), since preview generation
fir such drawables may involve processing the corresponding graph,
which isn't thread-safe.

When the GIMP_NO_ASYNC_DRAWABLE_PREVIEWS environment variable is
defined, all drawable previews are synchronously generated.

(cherry picked from commit d79e3fbd6f)
2018-07-04 16:12:21 -04:00
Ell
fac91ddad4 app: add gimp_parallel_run_async_{full,independent}()
Remove the "independent" parameter of gimp_parallel_run_async(),
and have the function always execute the passed callback in the
shared async thread-pool.

Add a new gimp_parallel_run_async_full() function, taking, in
addition to a callback and a data pointer:

  - A priority value, controlling the priority of the callback in
    the async thread-pool queue.  0 is the default priority (used
    by gimp_parallel_run_async()), negative values have higher
    priority, and positive values have lower priority.

  - A destructor function for the data pointer.  This function is
    called to free the user data in case the async operation is
    canceled before execution of the callback function begins, and
    the operation is dropped from the queue and aborted without
    executing the callback.  Note that if the callback *is*
    executed, the destructor is *not* used -- it's the callback's
    responsibility to free/recycle the user data.

Add a separate gimp_parallel_run_async_independent() function,
taking the same parameters, and executing the passed callback in
an independent thread, rather than the thread pool.  This function
doesn't take a priority value or a destructor (and there's no
corresponding "_full()" variant that does), since they're pointless
for independent threads.

Adapt the rest of the code to the changes.

(cherry picked from commit b74e600c12)
2018-07-04 16:12:21 -04:00
Michael Natterer
fea8da130b configure.ac: post-release version bump to 2.10.5 2018-07-04 21:40:18 +02:00
Anders Jonsson
e9b646d5ce Update Swedish translation 2018-07-04 18:42:26 +00:00
Michael Natterer
e384409fe5 configure.ac: release GIMP 2.10.4 2018-07-04 20:16:04 +02:00
Ell
d20170ed6c app: in gimp-parallel, fix async-thread shutdown
... to prevent a potential deadlock.

(cherry picked from commit ff679c66a1)
2018-07-04 14:05:49 -04:00
Alan Mortensen
7b3ecb8080 Updated Danish translation of gimp-plug-ins 2018-07-04 19:38:16 +02:00
Alan Mortensen
bb34116ee3 Updated Danish translation 2018-07-04 19:38:14 +02:00
Michael Natterer
165cedc1ae NEWS: re-line-wrapped so I don't have to do that later in the mail client 2018-07-04 19:01:32 +02:00
Michael Natterer
fa033aaa3f docs, etc: regenerated default gimprc and its manpage 2018-07-04 18:56:51 +02:00
Jehan
3679b08337 desktop: 2.10.4 release is today, earlier than planned!
(cherry picked from commit 8eef339ed5)
2018-07-04 13:01:51 +02:00
Jehan
39213c790e NEWS: keep up-to-date. 2018-07-04 12:56:43 +02:00
Michael Natterer
964e5b4336 configure.ac: require GEGL >= 0.4.4
(cherry picked from commit a62fdce55a)
2018-07-04 12:46:28 +02:00
Alexandre Prokoudine
521afbd09f Update Russian translation 2018-07-04 09:43:49 +00:00
Alexandre Prokoudine
10dae0b2ea Update Russian translation 2018-07-04 03:18:33 +03:00
Michael Natterer
1022a638e8 Issue #1748 - Crash when parsing currupt tool preset
Bail out with an error instead of crashing when the tool options type
name is empty.

(cherry picked from commit e27e783f88)
2018-07-04 01:55:24 +02:00
Michael Natterer
d70bf7653d Issue #1719 - GIMP crashes with an invalid pluginrc
Fix 3 more crashes caused by accepting broken input, spotted by
Massimo.

(cherry picked from commit 7db59e7af9)
2018-07-04 00:19:44 +02:00
Rodrigo
960494c591 Update Spanish translation 2018-07-03 20:53:02 +00:00
Michael Natterer
e662b5a0ee app: fix logic error in tool_options_manager_paint_options_notify()
(cherry picked from commit 1ef7056324)
2018-07-03 20:13:49 +02:00
Michael Natterer
b4edec423c app: move the improved paint property copying code to GimpPaintOptions
and remove the old brush, dynamics, gradient property copying
functions.

(cherry picked from commit 80c423ae40)
2018-07-03 20:13:40 +02:00
Michael Natterer
a8b333a00e app: indentation in gimp-tools.c
(cherry picked from commit 5299b1894d)
2018-07-03 20:13:28 +02:00
Michael Natterer
cf7f27390c app: switch to using gimp-tool-options-manager
and remove all other tool options parent setting/unsetting and
property copying code. Also select a tool at the end of
tool_manager_init() so it is in sync with what the tool options
manager does.

(cherry picked from commit 37f69457b7)
2018-07-03 20:13:20 +02:00
Michael Natterer
19260d87b8 app: make sure the active tool options get saved in devicerc
gimp_devices_save(): call gimp_device_info_save_tool() on the current
device.

(cherry picked from commit 188fd773a5)
2018-07-03 20:13:05 +02:00
Michael Natterer
2a916b241c app: more stuff in gimp-tool-options-manager.c
tool_options_manager_tool_changed(): also copy the non-global paint
options of the new tool to the global paint options, so they get used
when "global_foo" is enabled.

(cherry picked from commit 1b858eb4ad)
2018-07-03 20:12:54 +02:00
Michael Natterer
08d64c6eb8 app: small fix in gimp-tool-options-manager.c
tool_options_manager_paint_options_notify(): sync properties between
tool paint options and global paint options if the property is global
*or* the active tool is involved.

tool_options_manager_global_notify(): don't mess with the active
tool's connection to the user context or its properties at all, it is
always fully connected to the user context anyway.

(cherry picked from commit 54257da7c4)
2018-07-03 20:12:44 +02:00
Michael Natterer
d03b31780b app: add gimp-tool-options-manager.[ch]
The way we currently manage tool options, and particularly copy things
around for "global_brush", "global_pattern" etc. sucks, is spread
across files, happens only on tool change, is thus buggy and leads to
all sorts of small inconsistencies.

This new manager will replace all of that stuff, and it does it in one
place, and will keep the user context, the global paint options, and
all tool options connected permanently, and only connect/disconnect
things when settings change, so everything is always in a consistent
state.

Pushed for review only, nothing is used yet.

(cherry picked from commit ef952f2926)
2018-07-03 20:12:29 +02:00
Michael Natterer
d851a9f203 app: prepare gimpdisplayshell-selection for undeprecation
with a patch that is mergable to 2-10.

(cherry picked from commit 7efb8576a1)
2018-07-03 19:46:27 +02:00
Ell
8ab76a42d8 app: fix GimpMeter history-graph painting when clipped
In GimpMeter, use cairo_path_extents() for getting the history
graph's extents, rather than cairo_clip_extents(), since the latter
may also include clipping applied by GTK.

(cherry picked from commit b8e08cddbc)
2018-07-03 10:31:18 -04:00
Daniel Korostil
7cdebe80a1 Update Ukrainian translation 2018-07-03 14:18:36 +00:00
Daniel Korostil
01e00a2afc Update Ukrainian translation 2018-07-03 14:04:55 +00:00
Daniel Korostil
c4e2763559 Update Ukrainian translation 2018-07-03 14:04:09 +00:00
Daniel Korostil
7b7dde84b0 Update Ukrainian translation 2018-07-03 09:22:12 +00:00
Michael Natterer
66ce32c8cb configure.ac: require babl >= 0.1.52
(cherry picked from commit 7aa4273806)
2018-07-02 20:08:47 +02:00
Ell
4569fdd34b app: explicitly close output stream when saving internal data
According to some bug reports, it seems that under some (unknown)
conditions we might save an empty custom gradient file on exit (for
equally unknown reasons).  The only difference in the way we save
internal data files, such as the custom gradient, compared to
gimp_data_save(), is the fact that we currently don't explicitly
close the output stream, but rather only unref it.

The output stream should be implicitly closed (and hence flushed)
upon destruction, but maybe the unreffing is not enough to
guarantee that it's actually destroyed (maybe it spawns an extra
reference for some reason, who knows.)  Anyway, let's just
explicitly close it, which also gives us a chance to catch and
report any errors occursing during flushing/closing (which,
altenatively, might be the culprit).

Additionally, a few more error-reporting improvements, to match
gimp_data_save().

(cherry picked from commit a72f7f1ace)
2018-07-02 11:48:49 -04:00
Rodrigo
80efa4a70d Update Spanish translation 2018-07-02 15:13:20 +00:00
Piotr Drąg
85a4ede083 Update Polish translation 2018-07-02 17:09:12 +02:00
Hannie Dumoleyn
2d6e47eef3 Update Dutch translation 2018-07-02 11:13:40 +00:00
Rodrigo
22cc731426 Update Spanish translation 2018-07-02 09:50:55 +00:00
Alexandre Prokoudine
c2e1147ff5 Sync USM menu entry to GEGL 2018-07-02 02:32:29 +03:00
Michael Natterer
b6c50c016c app: on make check, search menu XML files in both buildir and srcdir
Turn GIMP_TESTING_MENUS_DIR into GIMP_TESTING_MENUS_PATH and look in
all its dirs for the menu file.

(cherry picked from commit 8516aedade)
2018-07-01 19:46:31 +02:00
Piotr Drąg
6b42597d7b Update Polish translation 2018-07-01 19:27:49 +02:00
Rūdolfs Mazurs
6129f71a63 Update Latvian translation 2018-07-01 15:33:37 +00:00
Rūdolfs Mazurs
80bde0cb28 Update Latvian translation 2018-07-01 13:24:50 +00:00
Gábor Kelemen
99ae1a9e09 Update Hungarian translation 2018-07-01 08:01:54 +00:00
Jordi Mas
ef6354bf07 Update Catalan translation 2018-06-30 07:55:55 +02:00
Michael Schumacher
0a3d8ca0b2 app: Prevent parallel builds for the tests
The tests must not be run in parallel or in a different order as specified
2018-06-29 10:28:42 +00:00
Gábor Kelemen
42af1846b0 Update Hungarian translation 2018-06-28 22:21:55 +00:00
Balázs Meskó
972f13c3de Update Hungarian translation 2018-06-28 19:52:28 +00:00
Balázs Meskó
50a4e4f81c Update Hungarian translation 2018-06-28 19:51:23 +00:00
Ell
50db2b6655 app: a few async font loading fixes
In gimp_data_factory_finalize(), wait on the factory's async set
after canceling it, and before continuing destruction.  It's not
generally safe to just abandon an async op without waiting on it
-- this is a font-specific hack, due to the fact we can't actually
cancel font loading, and GimpFontFactory is prepared to handle
this.

Instead, in gimp_font_factory_finalize(), cancel and clear the
async set, so that GimpDataFactory doesn't actually wait for
loading to finish.

In gimp_font_factory_load_async_callback(), don't try to acess the
factory when the operation is canceled, since cancelation means the
factory is already dead.  On the other hand, when the opeation
isn't canceled, make sure to thaw the container even when font
loading failed, so that we always match the freeze at the begining
of the operation.

(cherry picked from commit b5890e05b8)
2018-06-28 15:38:55 -04:00
Jehan
445e3a16d9 INSTALL: add --enable-relocatable-bundle in options list.
(cherry picked from commit c543103783)
2018-06-28 19:26:32 +02:00
Jehan
7eb195cdbf Issue #1731: gbr file that crashes gimp-2.10.
GIMP_BRUSH_MAX_SIZE was already defined (as 10.000 pixels per dimension,
which is big for a brush) in gimpbrush.h. Let's just use this to
validate the size returned by the header.

(cherry picked from commit b3de0bb7a5)
2018-06-28 18:50:07 +02:00
Jehan
de5b6b2a81 Issue #1740: Move tool has two identical options for selection mode.
The "move-current" flag does not apply to selection mode and our current
code was simply setting the radio buttons insensitive while showing the
same labels on both buttons. This was not wrong per-se, yet very
confusing.

Instead let's just hide the radio buttons in selection mode, and update
the option title to "Move selection" (old label of both buttons) to keep
this mode as understandable as possible.

(cherry picked from commit 7cbbb8cba8)
2018-06-28 18:49:00 +02:00
Edward E
3ebeef9fed Issue #1563 - Dots instead of icons on Windows systems
Update windows installer patch for gtk+2 SVG file detection
2018-06-28 18:26:43 +02:00
Ell
ec1f1b3a45 app: allow multiple variables as input to dashboard group-meter LED
When defining a dashboard group, allow specifying multiple
variables as input to the group meter's LED.  The LED is active
when any of the specified variables evaluates to TRUE, and its
color is the combination of the active variable colors.

Remove the swap-busy variable, and use swap-reading and
swap-writing as inputs to the swap group's LED instead, so that the
LED's color indicates whether the swap is currently being read-
from, written-to, or both.

(cherry picked from commit 716510cb83)
2018-06-28 11:39:42 -04:00
Ell
352ce20356 app: even more Windows-specific fixes in gimpdashboard.c
... and app/Makefile.am

(cherry picked from commit 19f4abbbd6)
2018-06-28 11:03:49 -04:00
Ell
6fa454dd59 app: more Windows-specific fixes in gimpdashboard.c
(cherry picked from commit 4914103b5f)
2018-06-28 10:18:42 -04:00
Jehan
398d5e553a libgimpbase: forgot to add gimp_pixpipe_params_free() in gimpbase.def.
(cherry picked from commit 1a8bf4bcaf)
2018-06-28 12:27:19 +02:00
Ell
1b01e1311c app: s/DAta/Data/ in gimpdashboard.c
(cherry picked from commit d75e599431)
2018-06-28 05:06:08 -04:00
Michael Natterer
b0dc4a58ae Issue #1340 - Critical when editing input controllers
Don't pass a NULL widget to gimp_controller_list_edit_clicked().
Spotted by Massimo.

(cherry picked from commit 0961ccf754)
2018-06-28 09:42:58 +02:00
Michael Natterer
21f87d7d82 app: fix jumping around of newly created images
Put the center_image_on_size_allocate() code into the canvas'
size-allocate callbacck.

As a side effect we now have a flag in GimpDisplayShell which
indicates that there will be a size allocate before the next frame, so
simply skip drawing the canvas completely. This fixes new images
jumping around when they are first shown.

(cherry picked from commit c0480f502d)

(this fix is actually a side effect from fixing something else in
master)
2018-06-28 09:42:48 +02:00
Anders Jonsson
7eee2614f9 Update Swedish translation 2018-06-28 06:34:00 +00:00
Jehan
ee25bfc8bd libgimpbase: add gimp_pixpipe_params_free().
And use it where appropriate. A public API asking you to know the
internals of your code is a bad idea.
2018-06-27 18:37:20 +02:00
Jehan
b585201e5e Issue #1723: gih file that crashes gimp-2.10.
The flag `free_selection_string` is used to track an array of strings
with some of them being static and others allocated. This should have
been an array of boolean but we can't change it because it is public API
(though it should really not have been!).

So let's just allocate every string of the `selection` array instead,
which makes the boolean flag useless now.
2018-06-27 18:03:37 +02:00
Jehan
6580fae7b0 devel-docs: update macOS support to OSX 10.10.
As discussed on IRC with Mitch and Samm.
Older versions may work, and Samm says he will build for 10.9 actually,
but we officially only supports for 10.10.
2018-06-27 16:06:04 +02:00
Jehan
7fb7e05d67 NEWS: keep up-to-date. 2018-06-27 04:47:53 +02:00
Jehan
e96b05beed plug-ins: lookup WMF fonts on same prefix when relocatable bundle.
When ENABLE_RELOCATABLE_RESOURCES is set, override libwmf fontdir. This
is actually an alternate version of MR !9 by Alex Samorukov assuming a
bundled GIMP on a single prefix rather than depending on an environment
variable.
This especially makes the relocatable feature more discoverable (rather
than some random environment variable for which you'd need to read the
code to discover it then make some wrapper script for GIMP).

(cherry picked from commit 4ff856f68d)
2018-06-27 04:40:02 +02:00
Jehan
5824a3150f configure: replace --enable-bundled-mypaint-brushes with...
... --enable-relocatable-bundle option.
This will allow to use this option for more than MyPaint brushes. For
macOS and Windows, we default to "yes" and "no" for other OS, though it
is always possible to set an explicit value.

(cherry picked from commit 8da2646372)
2018-06-27 04:40:02 +02:00
Anders Jonsson
cede80c4eb Update Swedish translation 2018-06-26 21:54:48 +00:00
Jehan
ad3db88dfa desktop: tentative release for 2.10.4 on 2018-07-07.
And uncommenting the <release> tag for translators to be able to work on
it. Also using short list items without finale points to agree with
`appstream-util` rules.

(cherry picked from commit 4fa5f61dae)
2018-06-26 21:31:20 +02:00
Jehan
d2f57ee9ba app: replace Carbon/Carbon.h by CoreGraphics/CoreGraphics.h.
As asked by Samm and solid_black on IRC.
Apparently tested and the change is fine, while getting rid of
deprecated API. I cannot test myself.

(cherry picked from commit 1b9729d46d)
2018-06-26 21:31:12 +02:00
Michael Natterer
41807ace5c Issue #1719 - GIMP crashes with an invalid pluginrc
Check the return value of gimp_file_new_for_config_path() and set
an error if it returns NULL.

(cherry picked from commit c6aa613f9c)
2018-06-26 15:01:21 +02:00
Michael Natterer
f1ffb06ccb Issue #1714 - When GIMP starts, default brush hardness is always at 100
We should not have essential signal connections (such as setting tool
options from brush properties) implemented in the tool options GUI
files, because they are not active until the options GUI is created.
Also, that magic is simply too hidden in the options GUI files.

Move the signal connections and the brush property copying code to
gimppaintoptions.c where is can also be done cleaner.

However, this must only be done for the main tool options instance
that is used for the GUI. Therefore, add a "gui_mode" boolean to
GimpToolOptions and set it to TRUE for all main tool options.

(this is ugly, but much less ugly and much less hidden than all the
places where code lives (like tool_manager.c) that can now be moved
into GimpToolOptions and its subclasses, and implemented cleanly
there).

(cherry picked from commit cb0e6c65d0)
2018-06-26 00:59:17 +02:00
Rodrigo
a3040eec9e Update Spanish translation 2018-06-25 12:31:20 +00:00
Oleksii Samorukov
75cc48f7c0 Fix screen resolution detection on OSX
GTK always returns 72 dpi due to API used. This patch using Cocoa
directly instead. Tested on Retina and non-hidpi displays.

GTK+2 version of commit 5b6126146a.
Cf. MR !14.
2018-06-25 12:35:42 +02:00
Rodrigo
04d9037710 Update Spanish translation 2018-06-25 07:28:06 +00:00
Jehan
00e6366207 libgimpbase: fix declaration after statement and reset safecheck...
... after each successful read().
I completely missed this declaration after a statement during the review
of !13 even though I saw another similar issue!

Also let's reset the error counter to 0 each time a successful read()
happens so that we can continue reading even if a lot of EINTR were to
happen, as long as we globally go forward. Only consecutive errors
increment the counter.

Finally add a small comment to explain why we let EINTR pass instead of
breaking directly.

(cherry picked from commit 49b4b1a5c2)
2018-06-25 01:16:00 +02:00
Alex Samorukov
b8583468f9 Fix empty lldb backtrace on OSX
When lldb attaching to the process it triggers few "-1" errors on read with
EINTR error. After 1-2 errors read() call works again.
Also this patch fixing TID detection, syscall SYS_gettid is oficially deprecated
now and does not work. Also adding safecheck to avoid enldless loop.

(cherry picked from commit 559d9b89e3)
2018-06-25 01:15:52 +02:00
Jehan
d2aef6201c Issue #1712: Add translator comment for string "Export Exif...
... metadata by default".
Also for other metadata, and doing it both for the tooltip and the label
of the option.

(cherry picked from commit 50bcc8db3c)
2018-06-24 21:43:35 +02:00
Piotr Drąg
f6efb2e504 Update Polish translation 2018-06-24 19:31:07 +02:00
Piotr Drąg
1d88734d89 app: fix typo in a translatable string (trnasferred) 2018-06-24 19:30:09 +02:00
Michael Natterer
5feabfd1e0 app: more GimpGradientEditor cleanup
Let the split and replicate segments dialogs keep their own data and
don't use GimpGradientEditor struct members. Remove redundant members
and indent the struct.

(cherry picked from commit b8e75a0201)
2018-06-24 18:18:32 +02:00
Jehan
a9d851070a app: remove check since gimp_widget_load_icon() now always non-NULL.
This is the only place where such a check occured. All other calls
seemed to expect the return value to be non-NULL already.
2018-06-24 18:10:26 +02:00
Jehan
f140b987c7 Revert "Issue #1608: Gimp 2.10.0 and 2.10.2 crash immediately on start."
This reverts commit d997b2b897.
This is not needed anymore since gimp_widget_load_icon() always returns
a non-NULL GdkPixbuf now. Cf. commit 32931c4606.
2018-06-24 18:01:29 +02:00
Jehan
32931c4606 app: gimp_widget_load_icon() should actually always return a result.
When the "gimp-wilber-eek" fallback will fail to load, we just create an
ugly magenta square instead.
See Mitch's review at #1608.
2018-06-24 17:59:09 +02:00
Jehan
4d4ba34006 app: add a doc-comment to gimp_widget_load_icon().
Mostly to make sure that calling code takes NULL as a possible return
value.
2018-06-24 17:11:24 +02:00
Jehan
9c6237b182 app: load "gimp-wilber-eek" as fallback when an icon fails to load.
We were already doing so when an icon was simply absent from the icon
theme. But we may still end up in cases where the icon is seemingly
present, yet it fails to load (for instance the image file is
corrupted). When this happens, let's also try to load the wilber-eek
fallback.

Note that it doesn't completely stops gimp_widget_load_icon() from
possibly returning NULL (in the case where "gimp-wilber-eek" is also
missing/corrupted for instance), so calling code must still account for
possible NULL return value.
2018-06-24 16:19:58 +02:00
Jehan
d997b2b897 Issue #1608: Gimp 2.10.0 and 2.10.2 crash immediately on start.
If "gimp-swap-colors" or "gimp-default-colors" are present in the theme,
yet broken somehow, GIMP would crash because it was not checking if the
icons had been successfully loaded.
Just make the relevant checks and output on standard error that the swap
and/or default color areas are invisible.
2018-06-24 16:19:58 +02:00
Michael Natterer
7fece09eaf app: peek/poke much less in GimpGradientEditor internals
Add gimp_gradient_editor_get_selection() and set_selection()
and use them in gradient-editor-commands.c

(cherry picked from commit 025a13b519)
2018-06-24 16:02:18 +02:00
Michael Natterer
94235e4447 app, libgimpwidgets: all GimpColorHexEntries should have the same tooltip
Set the tooltip in GimpColorHexEntry itself and remove all other
tooltip setting. This just moves the translatable string sround in
libgimpwidgets/, and even removes it from app/.

(cherry picked from commit 2b8b780b6a)
2018-06-24 14:30:09 +02:00
Michael Natterer
eb57f0d0b3 Issze #1711 - GIMP does not unref all GLocalFileEnumerator it uses
unref the enumerator when done. Spotted by Massimo.

(cherry picked from commit ca3ffec111)
2018-06-24 14:16:12 +02:00
Jehan
be3abe6cea icons: work around dimension bug of librsvg for a bunch of color icons.
It feels I am just fighting against the system. So annoying!

(cherry picked from commit b87d34bace)
2018-06-24 00:24:45 +02:00
Jehan
87d2dbbe66 icons: complete color-scalable SVG.
Preparing extracting icons from a single file.

(cherry picked from commit 199df5a128)
2018-06-24 00:24:38 +02:00
Jehan
520c34899c tools: post-process SVG objects with "color-important" label.
This will allow a designer to simply "tag" an object so that its color
does not get overrided by GTK+ without needing to edit the file as text.

(cherry picked from commit 8a36b786bc)
2018-06-24 00:24:31 +02:00
Jehan
98848a464f Issue #1708: g_free() called instead of gdk_device_free_history().
As spotted by Massimo!

(cherry picked from commit 5e25cdc713)
2018-06-24 00:24:22 +02:00
Jehan
402c0d98f1 icons: update various icons to account for librsvg bugs.
It should now be possible to fully export our symbolic icons from a
single central file.
My long-standing bug of librsvg#250 is still opened and unfixed, but it
turns out most issues I encountered are anyway also problems when
recoloring symbolic icons in GTK+ (like using strokes instead of
fills!). So let's just bypass all problems at once by accounting for
these issues in the design.

(cherry picked from commit 4c68d5dfc9)
2018-06-24 00:23:58 +02:00
Jehan
9bc78a3b3c icons: fix many icons for proper recoloring.
I tried to fix all the icons I could see which had issues regarding all
recoloring matters (using fill not stroke, change circle/ellipses to
paths, etc.) when looking at a blank canvas.
I'm sure I still miss a lot but that will do for now.

(cherry picked from commit 8811b0d916)
2018-06-24 00:23:44 +02:00
Jehan
e960c4884b icons: force colors on some icons.
Sometimes even within symbolic icons, parts of the design must keep
fixed colors, when they are semantic. For instance this is the case for
the color-picker-(black|gray|white) icons or the gimp-default-colors.

The trick used by GTK+ to recolor is by supplying an additional CSS
style to icons which overrides inline CSS thanks to "! important"
keyword. Our own trick to circumvent this trick is to set "!important"
in inline CSS when one wishes not to have it overrided by the general
colors.
Right now I am doing the edit by hand with vim because Inkscape doesn't
seem to validate this keyword if I add it manually in its XML editor. So
what I did is add the "color-important" label on such object, and I will
later modify my SVG export tool to add !important on such object "fill"
values at export time.

(cherry picked from commit 5d5bbeb88b)
2018-06-24 00:23:44 +02:00
Jehan
fa6f2f65f0 icons: fix various symbolic icons not properly recolored.
The current recolorization code only recolors paths and rectangles. In
particular it leaves circles and ellipses as-is.
I opened the merge request gtk!214 for this issue. But in the meantime,
it is quite easy to change circles and ellipses into path with "object
to path" in Inkscape.

A second problem is that it only recolors fills, not strokes, as
previously stated. So I need to remove strokes from icons, or transform
them to paths.

(cherry picked from commit fd46018203)
2018-06-24 00:23:23 +02:00
Jehan
eb82161091 icons: larger spacing between broken chains.
It seems not wide enough to differentiate easily the broken and
non-broken chains. So let's make this gap bigger.

(cherry picked from commit a5afb04501)
2018-06-24 00:22:07 +02:00
Jehan
99e6b365ae icons: fixing more icons.
This time, 2 icons still had problems because of visible rectangles.
Fixing "gimp-prefs-folders" and "gimp-prefs-folders-mypaint-brushes".

(cherry picked from commit 2bb8afd119)
2018-06-24 00:22:07 +02:00
Jehan
11dd2365cd icons: fix various icons broken when recoloring with CSS.
For anyone wishing to help me fix icons, here is the trick: apparently
GTK+ would fill the paths with CSS colors, not stroke them. So when we
have icon drawing based on path-stroking, they don't end up as expected.
In Inkscape, just run "Stroke to Path" to transform a stroke design in a
fill design.
I am fixing "gimp-tool-cage", "document-revert", "gimp-image-reload",
"gimp-reset" and "view-refresh". More to follow as we discover them, I
guess.

(cherry picked from commit 4b6869dd67)
2018-06-24 00:20:48 +02:00
Jehan
709e5e4c7e icons: make gimp-tool-ellipse-select symmetric.
I may not be an icon designer, but this icon be so clearly asymmetric
always deeply annoyed me.

(cherry picked from commit 45f46db815)
2018-06-24 00:19:31 +02:00
Michael Natterer
8aa0d5a401 Issue #1706 - Typo in gimpgradientselect.h include guard
Fix typo, spotted by Massimo.

(cherry picked from commit 627d58dce1)
2018-06-23 12:42:34 +02:00
Anders Jonsson
5a0299acf0 Update Swedish translation 2018-06-22 21:13:19 +00:00
Ell
01e5390052 app: flush image after selecting colormap color
(cherry picked from commit 6af2a4997b)
2018-06-22 13:39:24 -04:00
Alexandre Prokoudine
fd14839c81 Update NEWS 2018-06-22 14:38:33 +00:00
Michael Natterer
2e007713a2 app: argh!
(cherry picked from commit f335ef7b61)
2018-06-22 13:57:44 +02:00
Michael Natterer
bd14991664 app: fix signature of gimp_gegl_procedure_get_sensitive()
(cherry picked from commit 7c3191fdd0)
2018-06-22 13:55:56 +02:00
Michael Natterer
cf4ef427b3 app: when a plug-in procedure is not sensitive, show the reason in the tooltip
Return an optional tooltip from gimp_procedure_get_sensitive(), in
GimpPlugInProcedure, build that tooltip from the image types the
procedure works on.

(cherry picked from commit 63817485c0)
2018-06-22 13:49:45 +02:00
Alexandre Prokoudine
671552fb93 Update NEWS 2018-06-22 09:46:16 +00:00
Ell
e9acea9d54 app: fix dashboard swap read/write variable order
... to satisfy the inter-variable dependencies, so that the READING/
WRITING variables are based on the READ/WRITTEN values of the
current sample, and not the previous one.

(cherry picked from commit 51793b114a)
2018-06-21 12:31:42 -04:00
Ell
cc626176b1 app: properly handle NULL rectangle arguments in gimp-gegl-loops
... and gimppaintcore-loops

When a rectangle argument is NULL, use the extents of the
corresponding buffer, instead of raising a CRITICAL, to match the
old behavior.

(cherry picked from commit 8a881ca61a)
2018-06-21 12:30:59 -04:00
Michael Natterer
86ad7a624f app: move the gradient editor color dialog code to GimpGradientEditor
Same as previous commits.

(cherry picked from commit 558641fe6c)
2018-06-21 17:26:42 +02:00
Michael Natterer
1ce50d9881 app: make gimp_gradient_editor_update() private
(cherry picked from commit 02b6ff24da)
2018-06-21 13:59:34 +02:00
Michael Natterer
e9bf0c05d2 app: move the colormap editor color dialog code to GimpColormapEditor
See commit below.

(cherry picked from commit 5edc0306f9)
2018-06-21 13:44:49 +02:00
Ell
3e842e8033 app: more fixes to last dashboard commit
Don't show percentage for the swap read/written fields, and make
sure their history underlays are displayed correctly even if the
swap limit changes.

(cherry picked from commit fda671841c)
2018-06-21 07:39:13 -04:00
Michael Natterer
913389aa91 app: move the palette editor color dialog code to GimpPaletteEditor
That's cleaner than having it in palette-editor-commands.c

(cherry picked from commit 1c1dd2038e)
2018-06-21 12:46:45 +02:00
Ell
af30bad855 app: a few fixes to last commit
(cherry picked from commit ab9f70d95c)
2018-06-21 04:12:42 -04:00
Ell
b934cc2ed9 app: add swap read/write fields to the dashboard
Add "read" and "written" fields to the dashboard swap group, which
report the total amount of data read-from/written-to the tile swap,
respetively.  These fields are non-active by default.  When these
fields are active, show a color underlay in the swap group's meter,
indicating when data was beging read-from/written-to the swap.

Improve the swap busy indicator (used as the meter's LED), so that
it's active whenever data has been read-from/written-to the swap
during the last sampling interval, rather than at the point of
sampling.

(cherry picked from commit 6b9aba3067)
2018-06-21 04:01:12 -04:00
Rodrigo
499993bdf0 Update Spanish translation 2018-06-21 07:08:48 +00:00
Ell
83d74e270c Issue #1682 - Segfault when starting GIMP, due to empty data files
Use gimp_input_data_stream_read_line_always(), instead of
g_input_data_stream_read_line(), in a bunch of places that don't
expect EOF.  If we don't do that, the code assumes the GError
parameter is set by the function and returns an error indication,
causing the caller to segfault when it tries to access
error->message.  Instead, we now process an empty line when EOF is
reached, which is caught by the normal parsing logic.

Additionally:

  - Use gimp_ascii_strto[id]() when loading gradients, generated
    brushes, and palettes, to improve error checking for invalid
    numeric input.

  - Improve gradient-segment endpoint consistency check.

  - Allow loading palette files with 0 colors.  They can be created
    during the session, so we might as well successfully load them.

(cherry picked from commit 993bbd354e)
2018-06-20 15:14:21 -04:00
Ell
7715dbba5f app: add gimp_ascii_strtoi() and gimp_ascii_strotod()
... which are similar to g_ascii_strtoll() (except that
gimp_ascii_strtoi returns a gint, and not a gint64), and
g_ascii_strtod(), however, they make error checking simpler, by
returning a boolean value, indicating whether the conversion was
successful (taking both conversion and range errors into account),
and return the actual value through a pointer.

(cherry picked from commit 3301c06163)
2018-06-20 15:14:21 -04:00
Ell
d544e5d7b2 app: add gimp_data_input_stream_read_line_always()
... which is a drop-in replacement for
g_data_input_stream_read_line(), however, it always returns a non-
NULL value when there's no error.  If the end-of-file is reached,
an empty string is returned.

(cherry picked from commit e090b910c0)
2018-06-20 15:14:21 -04:00
Michael Natterer
cda8d386e4 app: should --amend my commits after I fix something...
(cherry picked from commit 52204b74b1)
2018-06-20 20:34:36 +02:00
Michael Natterer
a8e1ca1252 app: protect windows-actions.c against adding/removing a GdkDisplay twice
same code as in GimpDeviceManager, should be only ever needed in the
presence of debug modules like GtkInspector.

(cherry picked from commit bf66882878)
2018-06-20 20:31:53 +02:00
Michael Natterer
dc3754317b Issue #1093 - Color dialog appears in the first monitor...
...while other windows are on the second monitor if window positions
are saved at exit

Add some lines of code to color_area_color_clicked() which position
the already existing color dialog exactly like a newly created dialog
would be positioned by gimp_dialog_factory_add_dialog().

This should be part of GimpDialogFactory but let's wait for another
case before we generalize it.

(cherry picked from commit 1ae2b5d573)
2018-06-20 16:05:59 +02:00
Alexandre Prokoudine
99d8597126 Update NEWS 2018-06-20 11:17:49 +00:00
Ell
bb4716b8ee app: make sure the color picker tool is halted when closing display
When using the color-picker tool's info window, set the tool's
display when a color is picked, and the gui is updated, so that we
properly halt the tool when the display is closed.  Otherwise, we
may segfault.

(cherry picked from commit 335023b127)
2018-06-19 17:35:08 -04:00
Ell
a334b78327 app: in the dashboard, fix statm file-descriptor initialization
... in the unlikely case that getting the page-size fails.

(cherry picked from commit dc6ea0a977)
2018-06-19 13:42:32 -04:00
Ell
14f27d4c75 app: make the dashboard scrollable
The dashboard is getting pretty crowded -- let's make it
scrollable.

(cherry picked from commit 9832f7129e)
2018-06-19 13:06:33 -04:00
Ell
40834dc75c app: add memory group to the dashboard
The memory group shows memory-usage information: the currently used
memory size, the available physical memory size, and the total
physical memory size.  It can also show the tile-cache size, for
comparison against the other memory stats.  The memory group is
active but contracted by default.

Note that the upper-bound of the meter is the physical memory size,
so the memory usage may be > 100% when GIMP uses the swap.

This is currently implemented for *nix systems with Linux-like
procfs, and Windows.

(cherry picked from commit 8d0766c1fc)
2018-06-19 13:06:33 -04:00
Michael Natterer
9c1f6bfc16 Issue #1678 - CWE-120 - Don't use strcpy()
Use strncpy() instead.

(cherry picked from commit a58fe8963a)
2018-06-19 15:39:26 +02:00
Michael Natterer
b83ab3c1a7 app: remove gimp_layer_mask_new_from_buffer() and some includes
(cherry picked from commit 6c506509b6)
2018-06-19 13:21:41 +02:00
Michael Natterer
8146da9930 Issue #1677 - Alpha channel copy / Layer Mask issues
gimp_layer_create_mask(): make sure we don't do a gamma conversion
when initializing the mask from a channel. This was probably not the
last place to need this fix.

Also get rid of a second switch(add_mask_type), must be some leftover
from long gone logic.

(cherry picked from commit f815a2d922)
2018-06-19 12:41:01 +02:00
Michael Natterer
4cc6f18cc9 app: fix drawing the focus around the selected color in GimpPaletteView
The grid lines are always black, so always draw a black/white focus
line and ignore theme colors.
2018-06-18 19:18:34 +02:00
Ell
d49e038ed3 plug-ins: add support for loading merged image data from PSD files
PSD files may include a "merged", pre-composited, version of the
image (in Photoshop, this is the case when saving files with
"Maximize Compatibility" enabled; GIMP always saves the merged
image data in exported PSD files.)  This commit adds support for
loading the merged image version from PSDs, instead of the full
layer hierarchy.  This is useful when loading PSD files that use
features that we don't currently support, and therefore can't
render correctly, such as adjustment layers.

When loading the merged image version, we avoid loading certain
additional data from the file, such as channels, paths, and
guides, while still loading metadata, making this akin to loading
other "flat" image formats.

This option is currently exposed as an additional file type
("Photoshop image (merged)"), which has to be explicitly selected
from the file-type list when opening the image.

(cherry picked from commit 1d9a8a91ab)
2018-06-18 06:34:41 -04:00
Michael Natterer
1663e63717 libgimp: forgot to deprecate gimp_gamma() 2018-06-18 02:59:24 +02:00
Michael Natterer
113829fd14 Issue #701 - Add the ability to embed the GIMP built-in sRGB profile...
...upon exporting an image

Step 1: make it configurable just like "Export EXIF" etc.

app, libgimp: add "export-color-profile" config option

Add it to the preferences dialog, and pass it on to plug-ins in the
GPConfig message. Add gimp_export_color_profile() to libgimp.

Nothing uses this yet.

(cherry picked from commit 8c9c091021)
2018-06-18 02:47:36 +02:00
Michael Natterer
9be8c0add3 app: cleanup in GimpClipboard
Mostly formatting and thortening variables. Only real change is adding
gimp_clipboard_new() and moving most init() code there.

(cherry picked from commit e0f46d1dc9)
2018-06-18 01:51:33 +02:00
Michael Natterer
d85932b9b7 Issue #1633 - Palette Editor is much too wide on GIMP 2.99
Make the bottom-left entry request only minimal width, it expands
anyway. Also replace the "Columns:" label by a "grid" icon and set a
tooltip on the columns spinbutton.

Addresses Issue #1223 too.

(cherry picked from commit 0aa018dec2)
2018-06-17 23:13:54 +02:00
Michael Natterer
35710903b6 app: make GimpCursorView fit narrow docks
Replace "Selection Bounding Box" by simply "Selection" and add a tooltip
to the frame that says it's the bounding box.

Addressed Issue #1223.

(cherry picked from commit 33d2595d22)
2018-06-17 23:08:14 +02:00
Edward E
8387984732 Issue #1240 - The drive or unc share you selected does not exist...
...or is not accessible

Installer: show install path on final confirmation page

(cherry picked from commit f18fcd468e)
2018-06-17 22:58:06 +02:00
Jehan
8df6f4c8a6 plug-ins: clearer plug-in-screenshot parameter description.
Our plug-ins have no "optional" parameters per-se. Clarify the
description to make explicit that the last 4 parameters are simply only
taken into account when the shoot type is SHOOT-REGION.

(cherry picked from commit 3a0c03a61c)
2018-06-17 22:17:22 +02:00
Ell
2009805ad0 app: fix filename in gimppropgui-recursive-transform.c license notice
(cherry picked from commit 6d8128e3e0)
2018-06-17 15:59:14 -04:00
Ell
313bb4bc2a app: merge back gegl:recursive-transform-plus propgui to recursive-transform
... following GEGL commit 6be0a86583f9c10c7710c96c21c261e4227c4727.

gegl:recursive-transform now allows applying multiple
transforamtions simultaneously, using multiple transform-grid
widgets.

(cherry picked from commit 56d15e83e9)
2018-06-17 15:50:08 -04:00
Michael Natterer
1779826da9 Issue #1611 - plug-in-screenshot does not work in non-interactive run mode
Turn the boolean "root" argument into enum ShootType and reorder that
enum to { WINDOW, ROOT, REGION } so that the "0", and "1" values match
the former boolean. Adapt parameter checking accordingly so that
callers without optional arguments (e.g. script-fu) can call all the
plug-ins's features.

(cherry picked from commit d94b954c2a)
2018-06-17 20:59:04 +02:00
Ell
226ea8863a Issue #1668 -- Smudge Tool - Wrong colors when painting on an image ...
... with a color profile other than the gimp built-in.

When initializing the smude tool's accum buffer, use
gimp_pickable_get_pixel_at(), instead of
gimp_pickable_get_color_at(), for picking the initial color to fill
the buffer with, so that we don't erroneously apply the image's
color tranform to it when the image has a profile.  Previously,
this would result in wrong colors when painting from the drawable
edges inward, with flow < 100%.

(cherry picked from commit 5a07876c78)
2018-06-17 14:25:29 -04:00
Michael Natterer
918043a9d9 app: make sure crash-saving of open images to XCF doesn't call the GUI
gimp_eek(): simply increase gimp->busy so XCF saving calling
gimp_set_busy() and gimp_unset_busy() won't call the GUI layer and do
whatever windowing system calls to set busy cursors.

(cherry picked from commit eaddef595e)
2018-06-17 19:45:36 +02:00
Ell
797bd3459b Issue #1668 - Smudge Tool - Wrong colors when painting on an image ...
... with a color profile other than the gimp built-in.

Remove the separate alpha-channel copy in
gimp_image_color_profile_srgb_to_pixel().  We no longer need it,
since GimpColorTransform already takes care of that itself.

We used babl_process() to copy the alpha, which would also
transform the input color from R'G'B' to the output color space.
When the same buffer was used for both input and output, this call
would overwrite the input to the subsequent
gimp_color_transform_process_pixels() call; when the output color
space was different than R'G'B', this meant we'd pass the input to
gimp_color_transform_process_pixels() in the wrong color space,
producing wrong results.  This was the case when converting the
foreground color for use with the smudge tool.

(cherry picked from commit e58e2ec5dc)
2018-06-17 13:38:34 -04:00
Piotr Drąg
9dbd051bad Update Polish translation 2018-06-17 17:13:49 +02:00
Michael Natterer
ac9fff1f1d Isse #1476 - strange behavior in Layer resize dialog
resize_dialog_new(): create the preview with "popup = TRUE", so we
really get a preview of layer size and not of the layer within the
image context like used for the layers dialog.

(cherry picked from commit 93d28ceccc)
2018-06-17 15:36:43 +02:00
Michael Natterer
8e12d8998d app: don't g_return_if_fail() in gimp_device_info_set_device()
when the GimpDeviceInfo already has a device. This is not a programming
error that should trigger a bug report popup, it's something else about
non-uniqueness of device names, or whatever. Simply g_printerr() a more
useful message that can help to debug this and bail out.

(cherry picked from commit f06d0485e6)
2018-06-17 15:20:43 +02:00
Michael Natterer
6ba0a4d6b8 app: some g_return_if_fail() were missing or non-standard in GimpContext
(cherry picked from commit 552a60b8bf)
2018-06-17 15:16:57 +02:00
Michael Natterer
c2d9f5e254 app: some cleanup in GimpContext
Use more g_clear_object() and g_clear_pointer() and remove useless
comments.

(cherry picked from commit 4260fa3e78)
2018-06-17 14:44:57 +02:00
Michael Natterer
4ea171c50e Issue #1213 - Text Tool Preset does not restore font face/name...
...after program restart

GimpContext was always supposed to keep the names of objects (brush,
pattern, font etc.) around even if these objects don't exist, for
cases like refreshing the data in a GimpDataFactory (which worked
fine), but also for deserializing the names of objects which don't
exist *yet* (delayed loading, no-data or whatever).

This commit fixes the delayed loading case (particularly affects fonts):

gimp_context_deserialize_property(): always keep the name of the
object around when it is not found, not only in the no-data case.

gimp_context_copy_property(): always copy the object *and* its name to
the dest context.

Add GimpConfig::duplicate() and ::copy() implementations which chain
up for duplicating/copying all properties and additionally copy all
object names to the new/dest context.

(cherry picked from commit ed1e2b1524)
2018-06-17 14:19:36 +02:00
Michael Natterer
c8e880dfc3 app: add GIMP_CONTEXT_PROP_MASK_TOOL_PRESET to GIMP_CONTEXT_PROP_MASK_ALL
It seems it was simply forgotten. PROP_MASK_ALL is used at some very
central places, so this commit might fix a few subtle bugs, or
introduce new ones, everybody look for strange tool preset behavior
please :)

(cherry picked from commit b3690b48d9)
2018-06-17 13:41:16 +02:00
Jehan
f4a54c5ab8 NEWS: keep up-to-date. 2018-06-16 03:51:34 +02:00
Salamandar
a42746c71d Specify utf-8 for rc file.
(cherry picked from commit 02edd1c8eb)
2018-06-16 03:50:14 +02:00
Salamandar
c176b0888e Fix encoding. The world should be utf-8.
(cherry picked from commit 8feb51954b)
2018-06-16 03:50:14 +02:00
Jehan
f3c5ed55c8 app: also search interpreters executable in $PATH.
Same as we did for binfmt-style lines, if the executable part (for
instance in `pygimp.interp`) is not an absolute path, let's allow
ourselves to find it in the environment $PATH.
2018-06-16 03:18:19 +02:00
Félix Piédallu
2265701268 Fix Python files:
* Prefer python2 to python that may point on python3 on modern installs.
* Fix indent/spaces consistency.
2018-06-16 02:49:54 +02:00
Jehan
769325e51b plug-ins: recognize "python2" env to launch the python interpreter. 2018-06-16 02:49:54 +02:00
Jehan
03ea9cac54 m4macros, plug-ins: run more accurately the "python2" interpreter.
Our configure test checks the presence of a Python2, but then uses
"python" as interpreter, which is a problem nowadays as the default
python is set to be Python 3 on some distributions (and this will be
more and more the case). So GIMP may end up trying to run our plug-ins
through Python 3 (which would fail) even if Python 2 is present.
Now AM_PATH_PYTHON2() m4 macro will set $PYTHON to a more accurate
Python version as priority.

Similarly let's use "python2" in the binfmt string for extension search.
2018-06-16 02:05:08 +02:00
Jehan
6080178a39 app: gimp_interpreter_db_add_extension() should check $PATH if needed.
So basically our binfmt set for Python simply never worked since we just
set 'python' and not a full path, but current code was not looking in
the $PATH environment. This was dead code. Now it's fixed.
2018-06-16 02:05:08 +02:00
Jehan
8509117fe6 app: actually resolve the interpreter through extension as last resort.
Current code of gimp_interpreter_db_resolve() was only resolving the
interpreter by the file extension when the file could not be opened for
reading or if it was empty/coult not be read. This basically made this
test completely useless.
Let's fix this. Now it will be run all the time, but simply at the end,
if shebang and magic failed.
2018-06-16 02:05:08 +02:00
Ell
d6792c973b app: fix scaling around center in scale tool; avoid negative width/height
In GimpScaleTool, fix scaling around the center-point, and make
sure the width and height are always >= 1 when updating the
transformation in response to a widget change.

(cherry picked from commit 1516bfc14b)
2018-06-15 16:05:13 -04:00
Ell
c7895c9752 app: clean up GimpTransformGridTool; adapt subclasses
Get rid of GimpTransformGridTool::recalc_matrix() and
gimp_transform_grid_tool_recalc_matrix(), and have
GimpTransformGridTool and its subclasses use
GimpTransformTool::recalc_matrix() and
gimp_transform_tool_recalc_matrix() directly instead.

In order to break the GimpToolWidget::changed/
GimpTransformTool::recalc_matrix() loop, add a
GimpTransformGridTool::update_widget() vfunc, which subclasses
should override to update their tool-widget (instead of doing this
in ::recalc_matrix()), and ::widget_changed(), which is called when
the tool-widget changes (and which subclasses should override
instead of connecting to the tool-widget's "changed" signal
directly.)  GimpTransformGridTool calls these functions as
necessary, instead of relying on extra parameters passed to
recalc_matrix().

Adapt all the direct and indirect subclasses of
GimpTransformGridTool to the change.

(cherry picked from commit 6a3fc6c1b9)
2018-06-15 16:05:13 -04:00
Jehan
130ef5ce59 Issue #248: Python console doesn't support input()/raw_input().
As noted by Massimo, we can just make the argument of raw_input() an
optional argument.

Also adding a modal implementation for input() so that it doesn't lock
the Python console waiting from input from the plug-in stdin. As noted
in Python doc, input() is equivalent to `eval(raw_input(prompt))`.
Not all that safe, but in the end, it is the developer's responsibility.
2018-06-15 18:34:57 +02:00
Jehan
b3cf7abd20 configure, tools: actually use GIMP_PKGCONFIG_VERSION and...
... GIMP_TOOL_VERSION rather than hardcoding versions.

Mostly cherry picked from commit 276d9b60b3
except pkg-config still checks gtk+-2.0 (not 3.0) on gimp-2-10 branch.
2018-06-15 17:36:33 +02:00
Ell
387cc35c58 Issue #1624 - Crashes when using Scissor Select Tool
In GimpTool, always clear tool->drawable upon halting, even for
tools that don't use it explicitly.

GimpTool sets tool->drawable in its default button_press()
implementation, and we potentially access it in
gimp_display_shell_initialize_tool(), so failing to clear it when
halting the tool may leave it as a dangling pointer, which can
result in a segfault when trying to initialize the tool in the
above function.  In particular, this happens with the iscissors
tool.

(cherry picked from commit 58c96f596e)
2018-06-15 08:19:51 -04:00
Simon Mueller
aac958607d plug-ins: use g_fopen(filename, "w+b")...
...because g_fopen(filename, "wb+") fails on Windows.

(cherry picked from commit 541f730f44)
2018-06-15 11:02:24 +02:00
Michael Schumacher
73c67d9612 plug-ins: use g_fopen(filename, "w+b") instead of "wb+" to fix SGI format export on the Microsoft Windows platforms
(cherry picked from commit c93727e791)
2018-06-15 08:06:25 +00:00
Ell
32993ab12d Issue #1646 - Transform preview looks wrong with selection
In GimpCanvasTransformPreview, when the image mask is not empty,
make sure to align it with the drawable using a gegl:translate
node, before combining both at the gegl:opacity node.  Otherwise,
the mask is applied at the wrong offset when the drawable's offset
is not (0, 0).

(cherry picked from commit d3a3c35317)
2018-06-15 01:59:45 -04:00
Ell
e486537ce0 Issue #1613 - foreground select tool raises a CRITICAL when committing
Make gimp_free_select_tool_halt() protected, and call it in
gimp_foreground_select_tool_set_trimap(), so that the free-select
subobject of the foreground-select tool is properly shut down
before switching to trimap mode.  In particular, this clears the
free-select tool widget at the right point; failing to do this
leads to CRITICALs later on.

(cherry picked from commit e15733236c)
2018-06-14 19:51:55 -04:00
Ell
08294f9ea7 Issue #1602 - Numeric selection size wrong after switching tools
In GimpToolRectangle, call gimp_tool_rectangle_update_options()
when the "[xy][12]" properties change, so that the "x", "y",
"width", and "height" properties are updated accordingly.

In particular, we set these properties when committing an empty
rectangle select tool, to init the rectangle to the current
selection bounds, and this call is necessary so that the "x", "y",
"width", and "height" tool options are properly updated as well.

(cherry picked from commit 47b7e7be7d)
2018-06-14 12:33:56 -04:00
Jehan
1a14f7e8c9 INSTALL: libheif must also be built with libx265.
(cherry picked from commit 33749491af)
2018-06-14 16:35:32 +02:00
Jehan
8ede025cee icons: clean the symbolic vector file.
All icons are now in the file.

(cherry picked from commit 3096fd295a)
2018-06-14 16:35:08 +02:00
Jehan
98763dded9 icons: fix symbolic icons.
With the symbolic-awareness of GTK+, vector icons are recolored (using
fg, success, warning and error colors). Unfortunately it was also
recoloring some rectangles with neither fill nor stroke, which were
using only to get appropriate icon size (these icons were therefore
displayed as just a square).

I made a quick pass in our icons to "fix" these. I expect I may have
missed some icons, or at the opposite, I may have broken other icons by
removing rectangles which should not have been removed. If you find any
such icon, please fix.
Also some icons do not look quite right just now. We will have to create
new guidelines on how to make symbolic icons and fix/redesign some, I
guess.

(cherry picked from commit 0c3659c5f1)
2018-06-14 16:35:08 +02:00
Jehan
dc8f44c6fa desktop: start a <release> tag for 2.10.4.
The 2 major changes seem to be the much-awaited font loading in
background, and this new "Auto straighten" option on Measurement tool.

Please everyone, feel free to tweak the release description while it is
still commented out. Once we remove the comment tags, it will be
submitted for translation.
2018-06-14 16:20:29 +02:00
Anders Jonsson
7412507c82 Update Swedish translation 2018-06-14 11:12:27 +00:00
Ell
5e53d06f74 app: make sure image colormaps always have at least one color
In gimp_image_set_colormap(), make sure the image's colormap always
has at least one color -- babl palette formats must have at least
one color.

If the function is called with 0 colors, use black.  We still need
to support this case, in particular, since existing XCFs may have
an empty colormap, and since plug-ins can call
gimp-image-set-colormap with 0 colors.

(cherry picked from commit c16c68e63e)
2018-06-14 03:19:29 -04:00
Jehan
f634757266 Revert "Issue #1612: Symmetry Painting dock needs a design tweak."
This reverts commit 55c5ebea3c.
Argh "valign" is a GTK+3 property. And actually testing now, I realize
this bug was only in the GIMP 3 codebase.
2018-06-14 03:59:04 +02:00
Jehan
5b628d422f plug-ins: add busy-dialog plug-in in plugin-defs.pl.
Introduced in commit 032e95fad6, Makefile.am was apparently directly
edited instead of plugin-defs.pl. This also fixes a typo:
s/bust-dialog/busy-dialog/

(cherry picked from commit 4117c98655)
2018-06-14 03:25:41 +02:00
Jehan
55c5ebea3c Issue #1612: Symmetry Painting dock needs a design tweak.
Make symmetry painting dock top-aligned.

(cherry picked from commit 035cef696a)
2018-06-14 03:25:32 +02:00
Michael Natterer
738bf71200 Issue #1634 - PNG image opens as a blank one in GIMP
Set the libpng error_fn to NULL *after* png_read_end() not before.
png_read_end() can throw errors and we recover what's partially loaded
from an image in the error handler.

(cherry picked from commit db08271d16)
2018-06-13 19:09:51 +02:00
Hannie Dumoleyn
0e61cb1203 Update Dutch translation 2018-06-13 11:18:18 +00:00
Michael Natterer
d76a6e8c11 plug-ins: pack the file-heif load dialog's icon view cells manually
There is something broken in the obscure "text_column" and
"pixbuf_column" code in GtkIconView, and I don't have the nerve to
debug it.

Enable opening an image on activation (double click).

(cherry picked from commit 625aa514f6)

(picking the icon view change was not neccessary but this plug-in will
get more updates so let's keep the code in sync)
2018-06-12 18:36:47 +02:00
Michael Natterer
6125d225ac plug-ins: put file-heif's icon view into a scrolled window 2018-06-12 13:34:24 +02:00
Michael Natterer
3b007f70f0 plug-ins: undeprecate file-heif but only as much as can be merged to 2.10
(cherry picked from commit afd4045866)
2018-06-12 13:26:40 +02:00
Michael Natterer
40c24dc3d0 Issue #1627 - Non-existing item ID error when loading multiple-image HEIFs
Accidentially killed a line when importing the plug-in.

(cherry picked from commit 1dee517bc9)
2018-06-12 12:58:37 +02:00
Marco Ciampa
e168c68b0c Updated Italian translation 2018-06-12 12:02:20 +02:00
Ell
3c9d513be9 Issue #1621 - Alpha incorrectly exported in PSD
In file-psd, fix the creation of the "merged" image data, saved in
PSD files along with the actual layer data.

(cherry picked from commit 8a01866af0)
2018-06-11 21:05:23 -04:00
Michael Natterer
c42c25732b all: make GimpDataLoaderFactory less static
Add functions to register loaders, remove the static array of loaders
given at construction time.

(cherry picked from commit f997106fb2)
2018-06-10 15:54:45 +02:00
Michael Natterer
561655bfb3 app: GimpToolPreset: s/GimpTransformOptions/GimpTransformGridOptions/
when deserializing the tool options.
2018-06-10 15:54:45 +02:00
Michael Natterer
bd30f28b09 app: if --verbose, make GimpDataFactory print each loaded and saved data 2018-06-10 15:54:45 +02:00
Piotr Drąg
1ae02929bc Update Polish translation 2018-06-10 15:42:57 +02:00
Ell
341077e23a Bug 759194 - Unified Transform Tool fails when layer is hidden
Last commit reintroduced this bug.

Allow transforming invisible layers using transform-grid tools, by
adding a 'drawable' member to GimpTransformTool, and setting/
clearing it when initializing/halting a GimpTransformTool.  In
gimp_transform_tool_check_active_item(), skip the visibility check
if the active item equals the GimpTransformTool's 'drawable'
member.

(cherry picked from commit cea6f1dc73)
2018-06-10 07:26:22 -04:00
Ell
d670edb339 app: don't allow transforming invisible layers in flip/measure tools
Split gimp_transform_tool_get_active_item() into two functions:
gimp_transform_tool_get_active_item(), which returns the item
without checking for errors, and
gimp_transform_tool_check_active_item(), which returns the active
item while checking for errors.  Adapt the rest of the code to the
change.

Remove the invisible_layer_ok parameter of
gimp_transform_tool_check_active_item(), and always return an error
when the active layer is invisible.  This causes the flip and
measure tools to correctly reject invisible layers.  Un-hide the
active item in GimpTransformGridTool before transforming, to avoid
rejecting layers that were hidden by the tool.

(cherry picked from commit 360b25b9a8)
2018-06-10 03:57:20 -04:00
Ell
1bd6079388 Issue #1607 - Fatal Crash on ACT Palette File Import
... and various other palette formats

Change accidental 'G_IS_INPUT_STREAM (file)' argument validation to
'G_IS_INPUT_STREAM (input)'.

(cherry picked from commit ea6d997e56)
2018-06-10 01:47:31 -04:00
Ell
70304ef75d app: code cleanup in the measure tool
(cherry picked from commit 845a19b785)
2018-06-10 01:26:14 -04:00
Ell
eccabd9ac9 app: derive GimpMeasureTool from GimpTransformTool
Derive GimpMeasureTool from GimpTransformTool (and
GimpMeasureOptions from GimpTransformOptions), so that we can reuse
GimpTransformTool's logic for the "straighten" function.  This
simplifies the code, aligns the measure tool with the rest of the
transform tools in terms of transform-related options (it can now
transform selections and paths, in addition to layers, and the
resampling method and clipping behavior are adjustable,) and fixes
straightening of layer groups.

Rename the function from "auto straighten" to just "straighten".

Don't resize the canvas after straightening.  Since we only
transform the active layer, and not the entire image, resizing the
canvas doesn't make much sense.

When in 3-point mode, rotate the second point toward the third
point, rather than toward the x-axis.

(cherry picked from commit b0cf2e435a)
2018-06-09 18:30:38 -04:00
Ell
340c4a2309 app: add GimpTransformGridTool; derive most transform tools from it
While most of our transform tools use an interactive transform
grid, and have similar behavior, the flip tool is an odd one out.
The new "auto straighten" function of the measure tool introduces
another tool that performs transformations, while not behaving like
the rest of the transform tools.

Factor out the parts of GimpTransformTool that handle user
interaction into GimpTransformGridTool (with corresponding
GimpTransformGridOptions, and GimpTransformGridToolUndo), and only
leave the basic transform functionality and options in
GimpTransformTool (and GimpTransformOptions).

Derive all the transform tools (and transform-tool base classes)
that previously derived from GimpTransformTool, from
GimpTransformGridTool.  The one exception is GimpFlipTool, which
still derives from GimpTransformTool directly.  The next commit
will derive GimpMeasureTool from GimpTransformTool as well.
2018-06-09 18:30:28 -04:00
Michael Natterer
93025adf02 Issue #1435 - Add tooltips to GimpColorNotebook's tabs
(cherry picked from commit 8d6f023b41)
2018-06-08 19:46:29 +02:00
Michael Natterer
def91dfc59 libgimpwidgets: install gimpbusybox.h as public header
(cherry picked from commit b75cbcb417)
2018-06-08 18:59:41 +02:00
Alex Samorukov
15f8ed090c Fix build on osx by adding appkit dependency
(cherry picked from commit f464ea0d4e)
2018-06-08 13:00:22 +02:00
Michael Natterer
22ae38d024 Issue #1441 - Copy paste issue, internal clipboard blocks global clipboard
Never return an internal image/buffer/svg/curve from any
gimp_clipboard function if we are not the owner of the display's
clipboard. The clipboard is supposed to be a global thing, and we must
only offer to ourselves what would be pasted in any other app.

(cherry picked from commit 7d3a129ddd)
2018-06-08 11:42:18 +02:00
Ell
aeff285216 app: in GimpPaintTool, sync brush-outline coords while painting
Add GimpPaintTool::paint_[xy] members, and periodically assign the
paint core's current coords to them in
gimp_paint_tool_paint_timeout(), while the main thread and the
paint thread are synchronized, during painting.

In gimp_paint_tool_draw(), fetch the current coords for the brush
outline from the above members during painting, instead of directly
from the paint core, to avoid a race condition with the paint
thread, so that we always use the correct coordinates at the time
the paint buffer was flushed back to the drawable.

(cherry picked from commit 5c17d2a43b)
2018-06-08 03:25:32 -04:00
Piotr Drąg
696d5b7f71 Update Polish translation 2018-06-07 16:22:38 +02:00
Michael Natterer
05747f75d5 Issue #1291 - Non-intrusive warning when saved XCF version...
...won't work with older GIMP?

Make gimp_image_get_xcf_version() return a "reason" string which lists
all reasons why the image can't be saved with compatibility for older
GIMP versions. Display the reason as tooltip on the compat hint label
in the save dialog.

(cherry picked from commit a4061a6b0d)
2018-06-06 23:12:04 +02:00
Ell
8a127d795e app: use default new-layer mode for layer groups and text layers
When creating a layer group, or a text layer, use the image's
default new-layer mode, instead of always using (non-legacy)
NORMAL.

(cherry picked from commit 7c7b6eb537)
2018-06-06 02:40:55 -04:00
Rodrigo
dc1ab40a41 Update Spanish translation 2018-06-06 06:23:36 +00:00
Jehan
2f24ee58a1 NEWS: also add gimp-test-clipboard. 2018-06-06 02:11:36 +02:00
Jehan
db6e8d51e6 NEWS: keep up-to-date. 2018-06-05 23:51:29 +02:00
Jehan
82fbfdf9d4 app: do not stop the measurement when straightening.
Instead just transform the measurement extremities appropriately to
still map to the same points.
To do so, I also added out parameters to gimp_image_resize_to_layers()
so that calling code can get offsets from old origin (as well as new
image dimensions).

(cherry picked from commit d56a8d439e)
2018-06-05 23:36:24 +02:00
Piotr Drąg
554f342db4 Update Polish translation 2018-06-05 19:16:53 +02:00
Jordi Mas
e230edf5a0 Update Catalan translation 2018-06-05 17:34:22 +02:00
Jehan
3cabdd8f4e app: measure tool's "auto straighten" with progress and link-aware.
Also make so that it works for any active drawable, not layers only.

(cherry picked from commit 3214199812)
2018-06-05 16:54:00 +02:00
Jehan
61f73d4f60 app: properly "auto straighten" in measure tool.
In particular, this tool should not make huge rotation where the top
ends up in the bottom and it should not depend on whether we started the
measure tool from the left, right, bottom or top. This is fixed by using
atan() instead of atan2().

Also make a proper tooltip text. Help id is unneeded most likely though.
Finally do some cleaning and alignment.

(cherry picked from commit ba1d937dfb)
2018-06-05 16:54:00 +02:00
Massimo Valentini
c179dfa714 Bug 526719: add easy way to set rotation angle to straighten an image
(cherry picked from commit 9baf2b62cd)
2018-06-05 16:54:00 +02:00
Piotr Drąg
1c2212151e Update Polish translation 2018-06-05 15:28:04 +02:00
Hannie Dumoleyn
6924412c91 Update Dutch translation 2018-06-05 10:56:16 +00:00
Ell
2ba1b8d465 configure.ac: require babl >= 0.1.51
(cherry picked from commit 5139a46602)
2018-06-05 04:39:54 -04:00
Ell
5d81183882 app: add custom GUI for gegl:recursive-transform-plus
gegl:recursive-transform-plus is an extension of
gegl:recursive-transform, allowing multiple transformations to be
applied simultaneously; it will eventually be merged back into
gegl:recursive-transform.  See GEGL commit
9829bc22e85526d789c4e80c05949d4c6202a207.

The GUI uses the new TRANSFORM_GRIDS controller, allowing adding,
duplicating, and removing transformations, and controlling them
through on-canvas transform grids.

(cherry picked from commit 99828a697a)
2018-06-05 04:33:09 -04:00
Ell
444899b82c configure.ac: require GEGL >= 0.4.3
(cherry picked from commit d5cab08215)
2018-06-05 04:33:09 -04:00
Ell
e1e508ad4e app: add TRANSFORM_GRIDS propgui controller
... which is similar to the TRANSFORM_GRID controller, supporting
multiple transformation matrices.

Implement the TRANSFORM_GRIDS controller in GimpFilterTool, using
the new GimpToolWidgetGroup to display multiple transform grids.

(cherry picked from commit 5e953ece85)
2018-06-05 04:33:09 -04:00
Ell
3250561340 app: add GimpToolWidgetGroup
GimpToolWidgetGroup is a tool widget acting as a container for
child widgets, multiplexing widget events and demultiplexing tool
events.  It can be used by tools to display multiple widgets
simultaneously.

The group keeps track of the current focus widget, and hover
widget.  Certain events are only dispatched to/forwarded from these
widgets.

The hover widget is determined by performing a hit test for all the
children, starting from the last child.  The first widget returning
GIMP_HIT_DIRECT, if any, is selected as the hover widget;
otherwise, if the current focus widget returns GIMP_HIT_INDIRECT,
it's selected; otherwise, if exactly one widget returns
GIMP_HIT_INDIRECT, it's selected; otherwise, there is no hover
widget.

The focus widget is set when clicking on a widget (or
programatically, using gimp_tool_widget_set_focus()).
Additionally, the group can raise the clicked widget to the top of
the stack (see gimp_tool_widget_group_set_auto_raise().)

(cherry picked from commit 4ef06b9922)
2018-06-05 04:33:09 -04:00
Ell
03e1cd20c9 app: add gimp_tool_widget_changed()
... which emits the "changed" signal, for use in subclasses to
notify the tool about widget changes not resulting from property
changes.

(cherry picked from commit 614cdcc0a8)
2018-06-05 04:33:09 -04:00
Ell
56281bf6f4 app: implement GimpToolWidget::hit() in all tool widgets
... and move the common functionality of their hit() and hover()
implementation to a separate function.

(cherry picked from commit 52a92a34d8)
2018-06-05 04:33:09 -04:00
Ell
312981568d app: add GimpToolWidget::hit() virtual function
... which takes the same arguments as GimpToolWidget::hover(), and
performs a hit-test, returning one of the following values:

  - GIMP_HIT_DIRECT:  The point corresponds to one of the widget's
    elements directly.

  - GIMP_HIT_INDIRECT:  The point does not correspond to one of the
    widget's elements directly, but the widget otherwise responds
    to press events at this point.

  - GIMP_HIT_NONE:  The widget does not respond to press events at
    this point.

Unlike hover(), hit() should not have any side effects.

(cherry picked from commit 385203f4d6)
2018-06-05 04:33:09 -04:00
Ell
6b73d5b396 app: implement GimpToolWidget::leave_notify() in various tool widgets
... by having them disable item highlights, and any other proximity
indication, when the cursor leaves the widget.

(cherry picked from commit 5e736c697f)
2018-06-05 04:33:09 -04:00
Ell
f1f9b859c4 app: add GimpToolWidget::leave_notify() vfunc
... which should be called on a widget when the cursor leaves the
widget, i.e., when it stops receiving hover events.

Have the default implementation clear the tool status.

(cherry picked from commit be7eff980e)
2018-06-05 04:33:09 -04:00
Ell
e34dd5a4eb app: in GimpDrawTool, set widget focus when setting widget
In gimp_draw_tool_set_widget(), make the new tool widget focused,
and unset the focus of the old widget.

(cherry picked from commit 322599836c)
2018-06-05 04:33:09 -04:00
Ell
8a69a3e755 app: respond to "focus-changed" signal in various tool widgets
... by disabling persistent item highlights when unfocused.

(cherry picked from commit 49089fc427)
2018-06-05 04:33:09 -04:00
Ell
f4f1ecf54a app: add gimp_tool_widget_{set,get}_focus(); "focus-changed" signal
The next few commits are going to add support for using multiple
tool widgets simultaneously.  As a first step, add a notion of a
focused tool widget, by adding gimp_tool_widget_{set,get}_focus(),
which tools/subclasses can use to control focus, and a
corresponding "focus-changed" signal, which tools/subclasses can
use to respond to focus changes.

(cherry picked from commit eeed9c413b)
2018-06-05 04:33:09 -04:00
Michael Natterer
1b1a89978f tools: rename test-keyboard.c and install it as gimp-test-clipboard
Clibpard bugs are so common, it will be useful to have on users'
machines.

(cherry picked from commit bd9d85e60b)
2018-06-04 22:40:02 +02:00
Dimitris Spingos (Δημήτρης Σπίγγος)
838e3b09bf Update Greek translation 2018-06-04 17:46:18 +03:00
Michael Natterer
a33b9e96d7 Issue #1560 - invisible canvas flip/rotation buttons...
...at the bottom of image window

Need to show/hide the event box, not just the labels/icons inside.

(cherry picked from commit 1806b66c5a)
2018-06-04 15:16:41 +02:00
Michael Natterer
226367d6cb app: add GimpDataLoaderFactory which loads data from an array of formats
specified by GimpDataLoaderEntry structs. Remove the same code from
GimpDataFactory and make it an abstract base class that only serves as
an interface for actual implementations. Also move around some stuff
in GimpDataFactory and remove virtual functions that were a bad idea
in the first place.

(cherry picked from commit 73da7c9a54)
2018-06-04 14:35:51 +02:00
Michael Natterer
e7ef28ef78 app: make gimp_data_factory_data_foreach() public
...this time without additional shit.

(cherry picked from commit 0b4677ec58)
2018-06-04 14:35:36 +02:00
Michael Natterer
aae538a4e5 app: add "new-func" and "get-standard-func" properties to GimpDataFactory
to make it behave better, and as preparation for further subclassing.

(cherry picked from commit 2ca408d146)
2018-06-04 14:35:18 +02:00
Michael Natterer
f6766cbc87 Issue #1531 - Zooming with mouse movement should keep track of original point
When Control-Button2-Zooming, remember the start point, pass it to
gimp_display_shell_scale_drag() and force gimp_display_shell_scale()
to zoom around that point by passing GIMP_ZOOM_FOCUS_POINTER and
faking the point using gimp_display_shell_push_zoom_focus_pointer_pos().

(cherry picked from commit 792cd581a2)
2018-06-04 11:45:20 +02:00
Michael Natterer
3220dc25f9 app: we always need to freeze/thaw around gimp_font_factory_data_init()
so pull it to the parent class. Also remove the "no_data" parameter
from the data_init() virtual function and handle it in
gimp_font_factory_data_init() itself.

(cherry picked from commit d1b9f74c6f)
2018-06-04 02:16:52 +02:00
Michael Natterer
bc0447bc1b app: handle fonts more correctly in gimp_context_deserialize_property()
The "no_data" case for fonts is gimp->no_fonts, not gimp->no_data.

(cherry picked from commit 1d2ff6aa1b)
2018-06-04 02:16:18 +02:00
Michael Natterer
82e5ce5dcd app: call the standard font "Standard" not "Sans-serif"
Sans-serif is also an actual font from the list and the standard font
is being used when there is really no font at all.

(cherry picked from commit 6b5fd27943)
2018-06-04 02:16:03 +02:00
Michael Natterer
7764f661d9 app: make gimp_font_get_standard() return a GimpData
like all other GimpData sublasses.

(cherry picked from commit 40b95227af)
2018-06-03 22:50:52 +02:00
Michael Natterer
78aac439d4 app: don't leak the identifier if gimp_data_make_internal() is called again
(cherry picked from commit f23958407c)
2018-06-03 22:50:38 +02:00
Michael Natterer
5401066631 app: move the GimpAsyncSet and the waiting code to GimpDataFactory
it's potentially useful for all data factories.

(cherry picked from commit c563659ed8)
2018-06-03 22:50:20 +02:00
Michael Natterer
2c4818f8df app: use gimp_data_factory_get_data_path() in GimpFontFactory
Also, make sure we freeze() and thaw() the font container correctly,
so that all places keep their fonts across a refresh.

The only thing to make this actually work seems to be a bug in the
list views, grid views work perfectly.

(cherry picked from commit 1b1739bb06)
2018-06-03 20:48:55 +02:00
Michael Natterer
12f6a06070 app: add gimp_data_factory_get_data_path[_writable]()
which return GLists of GFiles. Use the new API in GimpDataFactory's
default implementations.

(cherry picked from commit 68cf2641f8)
2018-06-03 20:48:46 +02:00
Michael Natterer
a8657b057d app: remove all old font management code, switch to GimpFontFactory[View]
Biggest change in this commit is reordering stuff in GimpContext
because GimpFont is now a first class citizen.

(cherry picked from commit e88fb8e9c7)
2018-06-03 20:48:34 +02:00
Michael Natterer
77f3306b4d app: add GimpFontFactoryView as replacement for GimpFontView
(cherry picked from commit d153c7489e)
2018-06-03 20:48:25 +02:00
Michael Natterer
e8793295c9 app: GimpDataFactoryView: don't add buttons for actions which don't exist
(cherry picked from commit 9dc5c7767d)
2018-06-03 20:48:18 +02:00
Michael Natterer
53f69d8be0 app: add new GimpDataFactory subclass GimpFontFactory
which contains all the font loading and refreshing including all async
stuff and is a complete replacement for gimp-fonts.c and GimpFontList.

(cherry picked from commit 0763ea2a69)
2018-06-03 20:48:05 +02:00
Michael Natterer
101aee560c app: derive GimpFont from GimpData
(cherry picked from commit 4d3c715990)
2018-06-03 20:47:58 +02:00
Michael Natterer
91e8515227 app: change all GimpCoreConfig data paths to GIMP_CONFIG_PARAM_CONFIRM
so they can be changed without restart (see previous commit).

(cherry picked from commit 5280d7a277)
2018-06-03 20:47:49 +02:00
Michael Natterer
0c04d3784b app: make GimpDataFactory properly derivable
Virtualize a lot of functions and move their code into the default
implementation. Also connect to changes of the "path" property and
reload data automatically when the path changes. Add "wait" method
which is by default empty but is to be implemented by fonts.

(cherry picked from commit 01e4104236)
2018-06-03 20:47:35 +02:00
Jordi Mas
1a16ca7757 Update Catalan translation 2018-06-03 20:12:10 +02:00
Ell
65f1895d4d app: strengthen gimp_async_set_{wait,cancel}()
Make sure gimp_async_set_wait() and gimp_async_set_cancel() work
correctly, even if the set changes in nontrivial ways as a result
of waiting-on/canceling individual operations.  This is purely
theoretic right now, but why not.

(cherry picked from commit ec5f4d03fa)
2018-06-03 10:05:10 -04:00
Ell
b6ecaad275 plug-ins: increase input precision in guides-new-percent.scm
Increase the percision of the "position" property of
guides-new-percent.scm to two decimal places.  Currently, it only
accepts integers, which limits its accuracy to 100px.

(cherry picked from commit 8e6a5298c1)
2018-06-01 10:53:51 -04:00
Ell
357c3d4b6b libgimpwidgets: add exponentiation support to eevl
Add support for exponentiation (using the ^ operator) to eevl.
This is occasionally useful, e.g., in geometrically-derived
quantities involving square roots.

(cherry picked from commit 8d35299410)
2018-06-01 10:53:51 -04:00
Michael Natterer
52e3eb32f3 Use g_set_object() in a lot of places, and splrinkle some g_clear_object()
This is mostly core code which we want to keep in sync with master as
long as possible, so I picked this one even though not strictly
neccessary.

(cherry picked from commit 1b7d63cce9)
2018-06-01 13:14:47 +02:00
Daniel Mustieles
2037b170f6 Update Spanish translation 2018-06-01 10:53:55 +00:00
Alan Mortensen
8aed405fde Updated Danish translation of gimp-script-fu 2018-05-31 13:59:51 +02:00
Alan Mortensen
c4c5177df0 Updated Danish translation of gimp-plug-ins 2018-05-31 13:59:50 +02:00
Ell
129a2c6179 app: hide container-editor busy box when clearing async-set binding
(cherry picked from commit e5e998e9c5)
2018-05-31 05:01:27 -04:00
Anders Jonsson
2296d39bf5 Update Swedish translation 2018-05-30 17:11:12 +00:00
Ell
7c72d8cfa1 app: restore font list in async callback, not async-set notify handler
When font loading is finished, restore the font list in the
corresponding async completion callback, and not in the
"notify::empty" signal handler of the fonts async set

This solves a problem arising when gimp_fonts_wait() is called
*inside* a "notify::empty" signal handler, emitted when reloading
fonts (causing the "empty" property of the fonts async set to
switch from TRUE to FALSE):  When the wait is over, "empty" will
switch back from FALSE to TRUE, however, since the "notify" signal
is non-recursive, the corresponding handler will not be called,
gimp_fonts_wait() will return *before* the font list is restored,
and the caller will see an empty font list.  This can happen under
certain circumstances when reloading fonts while the text tool is
active.

(cherry picked from commit 0e19f159f5)
2018-05-30 12:58:47 -04:00
Anders Jonsson
35d2d52fe2 Update Swedish translation 2018-05-30 16:51:30 +00:00
Alan Mortensen
58ec8189d4 Updated Danish translation 2018-05-30 17:13:08 +02:00
Rodrigo
e7d92e623f Update Spanish translation 2018-05-30 13:12:20 +00:00
Jehan
3c986695a0 authors: adding Simon Müller who did some nice patches on the Win32...
... screenshot plug-in.

(cherry picked from commit 75b226775e)
2018-05-30 12:15:40 +02:00
Jehan
0da0f8ff46 plug-ins: renaming Win32 implementation files to follow namespacing.
(cherry picked from commit ff6d7a7550)
2018-05-30 12:15:33 +02:00
Gil Eliyahu
1a5b28b51d Issue #1458 - Small border on side of single-window screenshot on...
... Windows.

Reviewer note (Jehan): I have not built on Windows because I need to
refresh my crossbuild environment, but it looks sane enough, and Gil
previously did good patches. I push as-is, hoping it still builds fine
on Windows. :-)

(cherry picked from commit 2caa400a96)
2018-05-30 12:15:27 +02:00
Piotr Drąg
51f15e0b78 Update Polish translation 2018-05-30 10:47:17 +02:00
Ell
476742b93d app: more cleanup
(cherry picked from commit e806a92c49)
2018-05-30 03:02:05 -04:00
Ell
b16ea49ca1 app: code cleanup in previous commits
(cherry picked from commit c27316093e)
2018-05-30 02:23:03 -04:00
Michael Natterer
93c337896c Issue #1520 - GIMP 2.10 Crashes when trying to convert 8bit colour...
...mode image to 1 bit.

Don't try to remove unused colors from the mono black/white palette,

(cherry picked from commit 0ff95b66b7)
2018-05-30 02:19:39 +02:00
Ell
05d30d95e1 app: fix linking of test-config
(cherry picked from commit e75bdf3acf)
2018-05-29 17:08:04 -04:00
Ell
bbf3cd6a27 po: update POTFILES.in
(cherry picked from commit 987afcd6d2)
2018-05-29 16:35:43 -04:00
Ell
081867de1e app: fix gui_wait() cleanup
(cherry picked from commit 5a66d6cc74)
2018-05-29 16:35:43 -04:00
Ell
7f18eb467e pdb: change image freeze/thaw procs to "Since: 2.10.2" 2018-05-29 16:07:48 -04:00
Ell
c7779b51b0 app: use gimp_wait() to wait for histogram in threshold and levels tools
In the threshold and levels tools, use gimp_wait() to wait for
histogram calculation to complete before applying auto-adjustment,
so that a message is displayed in the meantime.  Allow the
operation to be canceled, in which case we simply abort the auto-
adjustment, but let the histogram calculation continue.
2018-05-29 16:07:48 -04:00
Ell
0d5b09bb4b app, pdb: wait for fonts to load before dependent operations
Use gimp_fonts_wait(), added in the previous commit, to wait for
fonts to finish loading before operations that depend on font
availability.  In particular, this includes font- and text-related
PDB functions, and text-layer rendering.
2018-05-29 16:07:48 -04:00
Ell
f6fe8939cc app: add gimp_fonts_wait()
... which waits for font-loading to complete, using gimp_wait() to
show a message while waiting.

Note that we don't currently allow the wait to be canceled, since
it may have unpredictable effects on plug-ins, but the interface is
such that the wait might not complete, so calling code should be
prepared for that.
2018-05-29 16:07:48 -04:00
Ell
4527390cd6 app: add gimp_wait()
Add a GimpGui::wait() virtual function, and a corresponding
gimp_wait() function.  The function takes an object implementing
the GimpWaitable interface, and a printf-style message, and waits
for the object to become ready, displaying the message as
indication in the meantime.  The default implementation simply
prints the message to STDERR.

Implement the function in gui-vtable, using the busy-dialog plug-
in added in the previous commit, to display the message in a
dialog.  Additionally, if the object implements the GimpCancelable
interface, provide a "cancel" button in the dialog, which, when
pressed, causes gimp_cancelable_cancel() to be called on the
object.  Note that the function keeps waiting on the object even
after requesting cancelation; GimpTriviallyCancelableWaitable can
be used to stop the wait once cancelation has been requested.
2018-05-29 16:07:48 -04:00
Ell
f542d839f5 plug-ins: add busy-dialog plug-in
This plug-in is used internally to show an interactive dialog in a
separate process, while the main process is blocking waiting for an
operation to complete.  The dialog shows a custom message in a
GimpBusyBox, and potentially a "cancel" button, allowing the
operation to be canceled.  Communication with the main process is
performed through a pair of file descriptors, passed to the plug-in
as arguments.
2018-05-29 16:07:48 -04:00
Ell
de1084986c libgimpbase, libgimp, app: pass icon theme dir to plug-ins through config
Pass the current icon theme directory to plug-ins through the
config message, and add a gimp_icon_theme_dir() libgimp function
for retrieving it.  Note that we already have a similar
gimp_icon_get_theme_dir() PDB function, which we keep around, since
it can be used to dynamically query for the current icon dir,
unlike the former, and since it returns a dynamically-allocated
string, while the rest of the config-related functions return
statically allocated strings.

Use the new function, instead of gimp_get_icon_theme_dir(), in
gimp_ui_init().  This allows gimp_ui_init() to run without making
any PDB calls.  Consequently, this allows us to start plug-ins that
call gimp_ui_init() without entering the main loop in the main app.
We're going to add a plug-in that displays an interactive dialog
while the main app is blocking waiting for an operation to
complete, and we need to be able to start the plug-in without
entering the main loop, to avoid the possibility of arbitrary code
being executed during the wait.

Bump the protocol version.
2018-05-29 16:07:48 -04:00
Ell
82b979383c app: show indication during font loading in text tool and font views
While fonts are loading, show a GimpBusyBox with an appropriate
message above the text tool options, and make the options
themselves insensitive, and in font views, such as in the fonts
dialog (through gimp_container_editor_bind_to_async_set(), added in
the previous commit).
2018-05-29 16:07:48 -04:00
Ell
5a156ccc78 app: add gimp_container_editor_bind_to_async_set()
... which takes a GimpAsyncSet and a message, and shows a
GimpBusyBox with that message, instead of the container view, while
the async set is nonempty.

We're going to use this for font-loading indication in font views,
such as in the fonts dialog.
2018-05-29 16:07:48 -04:00
Ell
aa22914568 libgimpwidgets: add GimpBusyBox
GimpBusyBox is used to show a message indicating an operation is in
progress.  It's basically just a spinner and a label, with some
styling.

We're going to use it both in app/ and in a plug-in.
2018-05-29 16:07:48 -04:00
Ell
957cdc23a0 app: disallow editing text layers while fonts are loading
We already avoid rendering text layers while fonts are loading,
showing an appropriate message, but this will soon be replaced with
waiting for the fonts to finish loading.

Instead, don't allow the text tool to start at all while the fonts
are loading (showing an appropriate tool message, and a BAD cursor
modifier), and halt the tool when reloading fonts if it's already
started.
2018-05-29 16:07:48 -04:00
Ell
953ee1dea5 app: use GimpAsyncSet for keeping track of font loading
Replace the boolean fonts_loading member of Gimp with
fonts_async_set, which is a GimpAsyncSet object.  This allows us
to easily respond to the completion of font loading and reloading,
as will be done in the next commits.

Additionally, move the call to FcConfigSetCurrent(), used to
activate the loaded font configuration, from the async thread to
the main thread, just to be on the safe side, and avoid calling
FcInitReinitialize() in gimp_fonts_reset() if font loading is still
in progress, which is unsafe.
2018-05-29 16:07:48 -04:00
Ell
67c8b00595 app: fix indentation in core-types.h 2018-05-29 16:07:48 -04:00
Ell
8fae111509 app: add GimpAsyncSet
GimpAsyncSet represents a dynamic set of running GimpAsync objects.
The objects are automatically removed from the set once they're
synced.

GimpAsyncSet implements the GimpWaitable and GimpCancelable
interfaces, allowing the entire set to be waited-on or canceled.

Additionally, GimpAsyncSet provides an "empty" property, which
indicates whether the set is empty or not.  This allows responding
to the completion of all the GimpAsync objects through the set's
"notify::empty" signal, or drive UI changes through property
bindings.
2018-05-29 16:07:48 -04:00
Ell
5c6ca1f16e app: add GimpTriviallyCancelableWaitable
GimpTriviallyCancelableWaitable is a proxy object for another
GimpWaitable object, implementing both the GimpWaitable interface
and the GimpCancelable interface.  While waiting on the proxy
simply waits on the underlying waitable, canceling the proxy
doesn't affect the underlying waitable, even if it implements
the GimpCancelable interface as well, but rather causes subsequent
wait operations on the proxy to successfully complete immediately.

This essentially causes cancelation to abort only the wait, rather
than the underlying operation.
2018-05-29 16:07:48 -04:00
Ell
7660891d8c app: add GimpUncancelableWaitable
GimpUncancelableWaitable is a simple proxy object for another
GimpWaitable object, implementing only the GimpWaitable interface.
Its main purpose is to mask away the cancelability of an object
implementing both GimpWaitable and GimpCancelable.
2018-05-29 16:07:48 -04:00
Ell
7740f0f830 app: implement GimpWaitable::try_wait() in GimpAsync 2018-05-29 16:07:48 -04:00
Ell
04a7b2c53a app: add GimpWaitable::try_wait() vfunc
... which should never block, but rather return TRUE or FALSE
immediately, depending on whether or not the waitable is ready.
2018-05-29 16:07:48 -04:00
Ell
85a1b1ece7 app: lower thread priority of independent async operations
In gimp_parallel_run_async(), lower the priority of threads
executing independent async operations.  Independent operations
are generally potentially long-standing background tasks, which we
don't want to bog down the rest of the program.

This is currently only implemented on Linux and Windows.
2018-05-29 16:07:48 -04:00
Michael Natterer
dca5d1377d Issue #1521 - First time start: GIMP-Error: Error while parsing templaterc
Don't use deprecated "fill-type" value names in the defailt templaterc.

(cherry picked from commit a0805e460a)
2018-05-29 00:06:46 +02:00
Marco Ciampa
7ebac15391 Updated Italian translation 2018-05-28 23:52:51 +02:00
Anders Jonsson
a0dde2d40f Update Swedish translation 2018-05-28 18:55:02 +00:00
Rodrigo
8c9f492d5f Update Spanish translation 2018-05-28 12:00:40 +00:00
Marco Ciampa
a4e920ce19 Updated Italian translation 2018-05-28 13:23:09 +02:00
Michael Natterer
5c2bde7f5d desktop: update .gitignore
(cherry picked from commit 1b71bd38ae)
2018-05-28 12:35:56 +02:00
Jehan
c5da652938 app: fix broken debug output on gitlab.
The GIMP version string and the backtrace both look completely wrong
when pasted as-is on gitlab. Somehow all linefeed are gone.

This can be fixed by surrounding these as blocks (triple backticks),
using markdown syntax. Of course now the debug content is not for our
tracker only since packagers are encouraged to replace with their own
tracker URL, but this small markdown syntax is simple enough that it
should not break formatting on other platforms (as far as I know).

(cherry picked from commit d4ff504735)
2018-05-28 06:35:04 +02:00
Jehan
6aa8db72d3 NEWS: keep up-to-date. 2018-05-28 05:00:30 +02:00
Michael Natterer
e34fc45ccb po: update POTFILES.skip
(cherry picked from commit 7d36b463dc)
2018-05-27 20:03:35 +02:00
Ell
1dff8d40c1 app: fix gimp_parallel_run_async() cancelation
In gimp_parallel_run_async(), when aborting a GimpAsync operation
in reponse to its "cancel" signal, properly clean up internal data
attached to the object, to avoid use-after-free if the signal is
emitted again.

(cherry picked from commit 3fa4c01bcf)
2018-05-27 13:59:42 -04:00
Ell
ddc9daceca app: add "independent" parameter to gimp_parallel_run_async()
Add a boolean "independent" parameter to gimp_parallel_run_async().
When FALSE, the passed function is run in the shared async thread
pool; when TRUE, the passed function is run in an independent
thread.

Generally, async operations should run in the async pool, however,
it might be desirable to run long-standing operations, especially
ones that can't be canceled, in independent threads.  This avoids
stalling quicker operations, and shutdown.

Adapt the rest of the code for the change.  In particular,
initialize the font cache in an independent thread.

(cherry picked from commit ad8add6808)
2018-05-27 13:18:56 -04:00
Ell
3ae1eec240 app: abort canceled pending operations in gimp_parallel_run_async()
In gimp_parallel_run_async(), connect to the returned GimpAsync's
"cancel" signal, and abort the operation in response if it's still
enqueued, i.e., if its execution hasn't started yet.

(cherry picked from commit 3958ffbe50)
2018-05-27 13:18:56 -04:00
Ell
fd1e5883f8 app: implement GimpWaitable and GimpCancelable in GimpAsync
Have GimpAsync implement the GimpWaitable and GimpCancelable
interfaces, added in the previous two commits, instead of providing
its own public version of the corresponding functions.

Add gimp_async_cancel_and_wait() as a convenience function for both
canceling an async operation, and waiting for it to complete.

Adapt the rest of the code to the change.

(cherry picked from commit e2c56ef407)
2018-05-27 13:18:56 -04:00
Ell
6f8892dc2d app: add GimpCancelable interface
... which provides a method for canceling an operation managed by
an object.

(cherry picked from commit 722f92d011)
2018-05-27 13:18:56 -04:00
Ell
028a33cf8a app: add GimpWaitable interface
... which provides methods for waiting on an object.

(cherry picked from commit 0fe066890e)
2018-05-27 13:18:56 -04:00
Jehan
4bf6590363 tools: make gimptool memory-managed.
The code was basically leaking memory everywhere, and apparently on
purpose (according to a top comment). Even on short-lived process, not
properly managing memory is not a good habit, especially if we plan to
maintain a program for the long run.
So here are some fixes. I'm sure I must have missed some places (code
was a mess), and hopefully I broke nothing. But that's good for now. At
least it is somewhat sane code now.

(cherry picked from commit f3de5cd3fe)
2018-05-27 17:57:09 +02:00
Jehan
452c9781e7 tools: do not segfault gimptool with source without extension.
Since commit 58fa382001, gimptool would accept source files with
non-standard extensions when using known C or C++ compilers. This would
include source with no extensions at all.
When this happens, do not try to set a pointer to a non-existing dot
separator to '\0'. That obviously segfaults.

(cherry picked from commit 02fc818bf6)
2018-05-27 16:23:53 +02:00
Jehan
41436198d7 tools: clean tabs out of gimptool code.
(cherry picked from commit 355676e7ae)
2018-05-27 16:23:46 +02:00
張俊芝
a52f83632f Issue #1506: Adds support for source file names with special...
... characters and non-standard suffixes in gimptool

(cherry picked from commit 58fa382001)
2018-05-27 16:23:34 +02:00
Jehan
ffb5f994fb Update various places with old git repository URIs.
(cherry picked from commit c6a1b9bcde)
2018-05-27 16:23:20 +02:00
Jehan
02e15f2dd9 build: update GNOME's git repository URI.
(cherry picked from commit 0034bd44b3)
2018-05-27 16:23:00 +02:00
Ell
44a800f0e5 libgimpconfig: align GimpConfig with the rest of the interfaces
Unlike the last two commits, we don't port GimpConfig to
G_DEFINE_INTERFACE(), since we need to provide a base initializer
for it.  However, this commit aligns it with the rest of our
intefaces, by renaming gimp_config_interface_get_type() to
gimp_config_get_type(), and by performing class initialization for
the interface in a separate function than base initialization.

Keep gimp_config_interface_get_type() around as a deprecated
function, to maintain ABI compatibility.  It will be removed in a
separate commit in master, so that this commit can be easily
cherry-picked to gimp-2-10.

(cherry picked from commit 5f8643a6ee)
2018-05-27 05:56:57 -04:00
Ell
51c1f7f650 libgimpcolor: port all interfaces to G_DEFINE_INTERFACE()
... instead of calling g_type_register_static() ourselves.

Keep the old foo_interface_get_type() (replaced with
foo_get_type()) around as deprecated functions, to maintain ABI
compatibility.  They will be removed in a separate commit in
master, so that this commit can be easily cherry-picked to
gimp-2-10.

(cherry picked from commit 6b40c7f37a)
2018-05-27 05:56:57 -04:00
Ell
40a9736bbf app: port all interfaces to G_DEFINE_INTERFACE()
... instead of calling g_type_register_static() ourselves.

(cherry picked from commit cdd96059f7)
2018-05-27 05:56:57 -04:00
Ell
c820764d4f app: code cleanup in GimpAsync
(cherry picked from commit 770634f84e)
2018-05-27 05:56:57 -04:00
Piotr Drąg
8d03b7b133 Update Polish translation 2018-05-27 07:29:36 +02:00
Jehan
ce5821639e app: output proper info message while fonts are loading.
To this effect, I add a variable to differentiate the "no-fonts on the
system" case from "fonts still loading".

(cherry picked from commit cfaa3103e7)
2018-05-27 03:45:07 +02:00
Jehan
89c829a242 Issue #1211: Load fonts in background after startup.
Fonts should not be blocking startup as this provides a very bad
experience when people have a lot of fonts. This was experienced even
more on Windows where loading time are often excessively long.
We were already running font loading in a thread, yet were still
blocking startup (thread was only so that the loading status GUI could
get updated as a feedback). Now we will only start loading and proceed
directly to next steps.
While fonts are not loaded, the text tool will not be usable, yet all
other activities can be performed.

(cherry picked from commit 2484dec7d5)
2018-05-27 02:36:39 +02:00
Jehan
117beee244 configure, desktop: update the bug report URL.
Also make so that the metadata URL is taken from the one of the package
set with configure.

(cherry picked from commit 6ebff7b3c5)
2018-05-27 02:34:50 +02:00
Ell
2511286e43 po-windows-installer: technical fix to the Latvian translation
ender's name can't be encoded in the target encoding.  Use
alternative form.
2018-05-26 15:04:18 -04:00
Ell
2d19f29200 app: various GimpAsync improvements
Improve the formalism of a GimpAsync object being "sycned"
(previously referred to as the main thread being "synced" with the
async thread), by both providing a gimp_async_is_synced() function,
separate from gimp_async_is_stopped(), and by improving the type
and function descriptions.

Make sure all previously added callbacks have been called after a
call to gimp_async_wait[_until](), even if these functions are
called from within a callback.

(cherry picked from commit a901c3c1f4)
2018-05-26 14:22:32 -04:00
Ell
c96c6802e8 app: add gimp_async_remove_callback()
... which removes a callback previously added through
gimp_async_add_callback().

(cherry picked from commit 85f67e196c)
2018-05-26 14:22:32 -04:00
Ell
52f8abbdbf app: use gimp_parallel_run_async() when loading fonts
Replace the custom threading code with a call to
gimp_parallel_run_async().  This simplifies the code, while
maintaining the current (blocking) behavior.  In the future, we
might build upon this to actually load the fonts in the background.

(cherry picked from commit 3e92e7a449)
2018-05-26 11:34:06 -04:00
Ell
89e9c8d9b3 app: add gimp_async_wait_until()
... which is similar to gimp_async_wait(), taking an 'end_time'
parameter, controlling how long to wait for the async operation to
complete.

(cherry picked from commit 68c57548fd)
2018-05-26 11:33:16 -04:00
Ell
f9ae3ae014 Issue #1490 - Crash when flattening an XCF file
The default stack size for new threads on MacOS is 512 KiB, making
our 512 KiB limit for stack-allocated buffers in
gimp_operation_layer_mode_real_process() too high.  Lower it to
256 KiB.

(cherry picked from commit 367399e5c0)
2018-05-25 20:35:32 -04:00
Ell
448fa97b85 app: fix progress text when applying shaped gradient through PDB
In gimp_drawable_gradient(), pass the undo description ("Gradient")
to gimp_gegl_apply_operation(), so that its displayed as the
progress text while rendering the gradient, even when applying a
shaped gradient, in which case we end the progress after
calculating the distance map, causing the progress text be NULL
during rendering unless explicitly set.

(cherry picked from commit deee2f14f5)
2018-05-25 12:44:10 -04:00
Ell
1d6d054212 app: in GimpOperationGradient, use sampler for reading the distance buffer
... instead of using gegl_buffer_get() directly.  This is slightly
faster.

(cherry picked from commit ef43fc395c)
2018-05-25 12:26:24 -04:00
Rodrigo
7feacb1ecf Update Spanish translation 2018-05-25 12:30:20 +00:00
Ell
b67c1e33f1 app: use gimp_gegl_buffer_copy() all over the place
Replace all uses of gegl_buffer_copy() in app/ with
gimp_gegl_buffer_copy(), added in the previous commit.

(cherry picked from commit 08ff2ac8c8)
2018-05-25 08:20:56 -04:00
Ell
1878543cf8 app: add gimp_gegl_buffer_copy()
... which is a drop-in replacement for gegl_buffer_copy(),
parallelizing the copy operation when the source and destination
formats are different, requiring a conversion.

(cherry picked from commit fded25b38c)
2018-05-25 08:20:56 -04:00
Alexandre Prokoudine
a984d9c49d NEWS: keep updated 2018-05-25 04:19:22 +03:00
Michael Natterer
a9636f7b1d app: actually set the color frames to "not dirty" after updating them
(cherry picked from commit 9d5fc680f8)
2018-05-24 01:56:00 +02:00
Michael Natterer
4a7d364062 app: remove gimp_display_shell_draw_background()
and remove all clipping hacks for drawing the canvas background, turns
out they never worked and we were relying on the pattern set on the
window, gah! This optimizes away one entire step of drawing of image
size, for each expose...
2018-05-23 22:56:15 +02:00
Marek Cernocky
07aa0b2615 Updated Czech translation 2018-05-23 09:40:44 +02:00
Rodrigo
16ff117b02 Updated Spanish translation 2018-05-22 16:35:15 +02:00
Rodrigo
37773c18e6 Updated Spanish translation 2018-05-22 16:00:52 +02:00
Marek Cernocky
378bcea50c Updated Czech translation 2018-05-22 14:30:40 +02:00
Timo Jyrinki
681bd2435e Update Finnish translation 2018-05-22 09:17:34 +00:00
Timo Jyrinki
87db3ce9a8 Update Finnish translation 2018-05-22 09:09:41 +00:00
Timo Jyrinki
e74884f7a1 Update Finnish translation 2018-05-22 07:17:25 +00:00
Marco Ciampa
a48d9178e8 Updated Italian translation 2018-05-21 15:47:53 +02:00
Jernej Simončič
9e5eeefa81 Installer: put back compatibility DLLs (for really old plugins)
(cherry picked from commit d436eb66fc)
2018-05-21 13:02:59 +02:00
Jernej Simončič
f74d1330aa Installer: set compatibility options to run Python plugins in high-DPI-aware mode
(cherry picked from commit fd59ecf2c5)
2018-05-21 13:02:46 +02:00
Jernej Simončič
eb41014b47 Installer: remove .dll files from plug-ins directory
(cherry picked from commit 952e7f365c)
2018-05-21 13:02:28 +02:00
Jernej Simončič
5b600509ba Installer: fix typos
(cherry picked from commit 0dc3b76306)
2018-05-21 13:02:08 +02:00
Jernej Simončič
bbca2b02b1 Installer: Python fixes
(cherry picked from commit 2a438351dd)
2018-05-21 13:01:52 +02:00
Daniel Șerbănescu
0cae2f0445 Update Romanian translation 2018-05-21 09:14:31 +00:00
Daniel Șerbănescu
c56440bbd7 Update Romanian translation 2018-05-21 09:04:03 +00:00
Jehan
a2902790cc plug-ins: fix Windows distribution.
"magnification-api-win32.h" was not included in the dist!
Note that I know that alphabetical order is wrong. I am planning to
actually change the name of the file (more in line with other filenames)
but I am waiting to finish a review of another patch from Gil before
doing so. So just let it as-is for now! ;-)
2018-05-20 23:19:44 +02:00
Michael Natterer
d6c80ef043 configure.ac: post-release version bump to 2.10.3 2018-05-20 21:01:28 +02:00
4317 changed files with 269693 additions and 153365 deletions

View File

@@ -203,6 +203,7 @@ The following people have contributed code to GIMP:
Christopher Montgomery
Tim Mooney
Adam D Moss
Simon Müller
Tobias Mueller
Michael Muré
Lionel N.

View File

@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/philosophy/why-not-lgpl.html>.

19
HACKING
View File

@@ -10,14 +10,14 @@ to have the following packages (or newer versions) installed:
* GNU libtool 1.5
- ftp://ftp.gnu.org/gnu/libtool/
Fine GNU mirrors are listed at http://www.gnu.org/prep/ftp.html
Fine GNU mirrors are listed at https://www.gnu.org/prep/ftp.html
Beta software can be found at alpha.gnu.org.
* pkg-config 0.16.0 (or preferably a newer version)
- http://www.freedesktop.org/software/pkgconfig/
- https://www.freedesktop.org/software/pkgconfig/
* gtkdocize
- http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/
- https://ftp.gnome.org/pub/GNOME/sources/gtk-doc/
* xsltproc
- ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1/
@@ -79,12 +79,12 @@ Git
GIMP is available from GNOME Git. You can use the following commands
to get GIMP from the the git server:
$ git clone git://git.gnome.org/gimp
$ git clone https://gitlab.gnome.org/GNOME/gimp.git
You can read more on using GNOME's git service at these URLs:
http://live.gnome.org/Git
http://www.kernel.org/pub/software/scm/git/docs/
https://wiki.gnome.org/Git
https://www.kernel.org/pub/software/scm/git/docs/
You will also need relatively new stable releases of glib, pango, atk,
@@ -99,9 +99,10 @@ The best way to submit patches is to provide files created with
git-format-patch.
It is recommended that you file a bug report at
http://bugzilla.gnome.org/ and attach your patch to it as a plain text
file, not compressed. If your patch is reasonably small you can submit
it to the gimp-developer-list@gnome.org mailing list.
https://gitlab.gnome.org/GNOME/gimp
and either create a merge request or attach your patch to it as a plain
text file, not compressed. If your patch is reasonably small you can
submit it to the gimp-developer-list@gnome.org mailing list.
If the patch needs to be discussed, you should also consider using the
mailing list instead of Bugzilla because bug reports tend to be hard

View File

@@ -1,6 +1,6 @@
--------------------------------------
---------------------------------------
Installation instructions for GIMP @GIMP_APP_VERSION@
--------------------------------------
---------------------------------------
There are some basic steps to building and installing GIMP.
@@ -30,20 +30,24 @@ header files installed.
1. You need to have installed a recent version of pkg-config (>= @GIMP_PKGCONFIG_VERSION@) available
from http://www.freedesktop.org/software/pkgconfig/.
from https://www.freedesktop.org/software/pkgconfig/.
2. You need intltool (at least @INTLTOOL_REQUIRED_VERSION@, but preferably a newer version).
Intltool can be downloaded from
http://ftp.gnome.org/pub/gnome/sources/intltool/
You are recommended to install gettext version @XGETTEXT_RECOMMENDED_VERSION@ or over. Earlier gettext had
https://ftp.gnome.org/pub/gnome/sources/intltool/
You also need gettext version @XGETTEXT_REQUIRED_VERSION@ or over. Earlier gettext had
issues with script-fu localization, ending up in incomplete GIMP localization.
3. You need to have GEGL version @GEGL_REQUIRED_VERSION@ or newer and babl version
@BABL_REQUIRED_VERSION@ or newer. You can get them from http://gegl.org/ or clone
@BABL_REQUIRED_VERSION@ or newer. You can get them from https://gegl.org/ or clone
them from the GNOME git repository:
git://git.gnome.org/babl
git://git.gnome.org/gegl
https://gitlab.gnome.org/GNOME/babl.git
https://gitlab.gnome.org/GNOME/gegl.git
Note: install GEGL with libumfpack (SuiteSparse) for alternative Matting
engine "gegl:matting-levin" and OpenEXR library for OpenEXR format
support.
4. You need to have installed GTK+ version @GTK_REQUIRED_VERSION@ or newer.
GIMP also needs a recent version of GLib (>= @GLIB_REQUIRED_VERSION@), GDK-Pixbuf
@@ -51,7 +55,7 @@ header files installed.
from ftp://ftp.gtk.org/.
5. We use cairo >= @CAIRO_REQUIRED_VERSION@, which is hosted at
http://www.cairographics.org/.
https://www.cairographics.org/.
6. We require PangoCairo, a Pango backend using Cairo. Make sure you
have Cairo, FreeType2 and fontconfig installed before you compile
@@ -82,10 +86,9 @@ header files installed.
Checkout the tag "v1.3.0" instead, or simply install from a tarball
or from your favorite package manager.
11. We also need the mypaint-brushes data package with is currently
hosted by Jehan, until the MyPaint project takes care of it:
11. We also need the mypaint-brushes data package:
https://github.com/Jehan/mypaint-brushes
https://github.com/mypaint/mypaint-brushes
If installing from repository, install from branch "v1.3.x" or the
particular tag "v1.3.0". In particular do not install from master
@@ -99,7 +102,7 @@ header files installed.
12. You may want to install other third party libraries or programs
that are needed for some of the available plug-ins. We recommend
to check that the following libraries are installed: libjasper,
to check that the following libraries are installed: openjpeg,
webkit, libmng, librsvg, libwmf, libaa and libgs (Ghostscript).
13. HEIF support depends on the libheif library. If you don't have
@@ -107,8 +110,9 @@ header files installed.
https://github.com/strukturag/libheif
Make sure you build libheif with libde265 support, otherwise the
plug-in is mostly useless.
Make sure you build libheif with libde265 and libx265 support (for
respectively decoding and encoding), otherwise the plug-in is
mostly useless.
14. The Python extension requires Python 2 development headers (@PYTHON2_REQUIRED_VERSION@
or newer) to be present. You will also need PyGTK and the
@@ -171,13 +175,13 @@ header files installed.
gs - ghostscript
libaa - ASCII art
libheif @LIBHEIF_REQUIRED_VERSION@ HEIF
libjasper - JPEG 2000
libmng - MNG
libwebp @WEBP_REQUIRED_VERSION@ WebP (built with --enable-libwebpmux and --enable-libwebpdemux)
libwmf @WMF_REQUIRED_VERSION@ WMF
libXcursor - X11 Mouse Cursor
libxpm - XPM
openexr @OPENEXR_REQUIRED_VERSION@ OpenEXR
OpenJPEG @OPENJPEG_REQUIRED_VERSION@ JPEG 2000
python 2 @PYTHON2_REQUIRED_VERSION@ Python plug-ins
webkit @WEBKIT_REQUIRED_VERSION@ Help browser & webpage
@@ -188,6 +192,7 @@ header files installed.
xdg-email for sending emails
sendmail for sending emails if --with-sendmail enabled
gdb or lldb for our new bug-reporting dialog
"gegl:matting-levin" GEGL operation for alternative matting engine
Please make sure you don't have any old GTK+-2.x, jpeg, etc. libraries
lying around on your system, otherwise configure may fail to find the
@@ -201,9 +206,9 @@ compilation and installation output is not shown.
% tar xvfz gimp-@GIMP_VERSION@.tar.gz # unpack the sources
% cd gimp-@GIMP_VERSION@ # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GIMP
% make install # install GIMP
% ./configure # run the `configure' script
% make # build GIMP
% make install # install GIMP
The `configure' script examines your system, and adapts GIMP to run on
@@ -216,6 +221,10 @@ These are:
--disable-vector-icons. This option installs raster icons instead of
vector icons.
--enable-relocatable-bundle. This option forces GIMP to search some
resources (e.g. MyPaint brushes or libwmf fonts) relatively to the
running prefix, rather than using build-time paths.
--enable-shared and --disable-shared. This option affects whether
shared libraries will be built or not. Shared libraries provide
for much smaller executables. The default is to enable shared
@@ -365,7 +374,7 @@ When ./configure fails
'configure' uses pkg-config, a tool that replaces the old foo-config
scripts. The most recent version is available from
http://www.freedesktop.org/software/pkgconfig/
https://www.freedesktop.org/software/pkgconfig/
'configure' tries to compile and run a short GTK+ program. There are
several reasons why this might fail:

254
NEWS
View File

@@ -8,6 +8,260 @@ we do allow some new features here, if they are not too invasive.
Otherwise, this branch is only for bug-fixes.
Overview of Changes from GIMP 2.10.6 to GIMP 2.10.8
===================================================
Core:
- Use adaptive chunk size in GimpProjection when rendering the
projection asynchronously, rather than using a fixed chunk size.
This provides a better trade-off between throughput and
responsiveness dynamically, based on how fast the processing is.
Tools:
- In all selection tools, show error on attempt to
subtract-from/intersect-with empty selection.
- Fix text along path not working with vertical text.
- Fix Text tool's frame position when undoing a move operation.
- Streamline Text tool's drawing blocking/unblocking logic.
- When moving a text layer using the text tool (through alt+drag),
don't change the layer's box mode to "fixed", which is unnecessary,
since the layer's size isn't affected.
- Transform and deformation operations now maintain color for fully
transparent pixels, making unerase and curves manipulation of alpha
channel more reliable.
- All transform tools now apply changes when you save or export/overwrite
an image without pressing Enter first to confirm changes.
- Heal, Dodge/Burn, Smudge, and Convolve tools now adjust the processed
buffer and mask_buffer regions according to the changes made to the
application region, as calculated by intersecting it with the
drawable and mask extents. This fixes wrong application position
when painting on a drawable whose origin is above/to the left of the
image's origin, and there's a selection active.
Plug-ins:
- Port all plug-ins to the new iterator API in GEGL.
- Improve automatic detection of HEIC/HEIF files.
- Improve RawTherapee discovery by looking up registry key (should
become useful with RawTherapee 5.5 and more).
Usability:
- Compatibility information in the Save dialog is now more understandable.
The minimum GIMP version for the XCF file is always written down when it
is GIMP 2.8 or over. The list of features warranting the minimum version
is now listed in an expander container rather than as tooltip, which
makes it more discoverable. The warning on compression is now displayed
as its own text under the checkbox and not as additional text to the
minimum GIMP version label.
CLI:
- New self-explanatory --enable-win32-debug-console CLI option
Debugging:
- New GimpBacktrace API provides an interface for creating and
traversing multi-threaded backtraces, as well as querying symbol
information. Backends are available for Linux and Windows.
- Performance log recording now available in the Dashboard dock.
The log contains a series of samples of the dashboard variables,
as well as the full program backtrace, when available. As such,
it essentially acts as a built-in profiler, which allows us to
correlate program execution with the information available
through the Dashboard.
- New performance-log-expand.py tool decodes a delta-encoded
performance log by expanding the deltas, producing a log where
each sample (and other relevant elements) contain complete
information. The structure of expanded logs is identical to that
of delta-encoded logs, the expanded log simply has no deltas.
- New performance-log-resolve.py tool resolves symbol information
in backtraces. The logs produced by GIMP only specify the program
counter at each stack frame, providing an address-map to map
program-counter addresses to actual symbols separately. This tool
looks up each program-counter address in the address map,
incorporating the relevant symbol information directly into the
backtrace.
- New performance-log-deduce.py tool that statistically deduces the
correct thread states based on backtrace address frequency, fixing
local inaccuracies.
- New performance-log-viewer.py tool that is a viewer for GIMP
performance logs, with a sample-selection area at the top and an
information area at the bottom. The sample-selection area visualizes
the sampled variables and markers using a simultaneous set of plots,
and displays the currently selected samples. The information area
shows global information stored in the log, as well as information
specific to the currently selected samples, including variable listing
and statistics, full backtrace, and profile/call-graph information.
Translations:
- Updated translations: Danish, Dutch, Finnish, German, Hungarian,
Italian, Polish, Portuguese (Brazil), Spanish, Swedish, Ukrainian.
Overview of Changes from GIMP 2.10.4 to GIMP 2.10.6
===================================================
Core:
- Render drawable previews asynchronously.
- Merge the file view filter and file format lists in GimpFileDialog.
The presence of 2 lists was very confusing.
- DLL search priority is now updated before running a plug-in on
Windows, depending on the executable bitness. This gets rid of one
of the last remnant of DLL hell in GIMP, which was when running
32-bit plug-ins from a 64-bit build of GIMP.
Filters:
- New "Little Planet" (gegl:stereographic-projection) filter.
- New "Long Shadow" (gegl:long-shadow) filter.
Tools:
- Halt the Measure tool after straightening.
- Add an "orientation" option to the measure tool, corresponding to
the "orientation" property of GimpToolCompass (i.e., it controls the
orientation against which the angle is measured, when not in 3-
point mode.) The orientation is "auto" by default, so that the
angle is always <= 45 deg. Note that the "orientation" option
affects the tool's "straighten" function, so that the layer is
rotated toward the current orientation.
- Text layers can now represent vertical texts, with 4 variants:
left-to-right and right-to-left lines, and forcing all characters to
be upright or following Unicode's vertical orientation property.
See also:
* https://www.unicode.org/reports/tr50/
* http://www.unicode.org/Public/UCD/latest/ucd/VerticalOrientation.txt
User Interface:
- The Dashboard dockable dialog now has an "async" field to the
dashboard's "misc" group, showing the number of async operations
currently in the "running" state.
- New Preferences option to enable/disable layer-group previews, since
these can get quite time-expensive.
Translations:
- New language: Marathi
- 12 translations were updated: Brazilian Portuguese, Dutch, French,
German, Greek, Italian, Latvian, Polish, Romanian, Slovenian,
Spanish, Swedish.
Build:
- Add --with-win32-32bit-dll-folder configuration option to override
the folder where 32-bit versions of DLL will be installed (default:
32/bin/).
- Install all plug-ins in their own directories. Unlike on master,
this is not mandatory to do so, but it would protect our core
plug-ins against any DLL installed directly under plug-ins/ by
third-party plug-ins (cf. Windows DLL hell).
Overview of Changes from GIMP 2.10.2 to GIMP 2.10.4
===================================================
Core:
- Remove gimp_display_shell_draw_background() and all clipping hacks
for drawing the canvas background. This optimizes away one entire
step of drawing of image size, for each expose.
- Font loading does not block startup anymore. Only consequence is
that the Text tool may not be usable immediately if fonts are not
fully loaded yet (and will output an appropriate error if you do
so). All non-text related activities can be performed right away.
- Change of the URL from bugzilla to gitlab where appropriate.
- New tool option manager to better keep track of user context and
paint options in a consistent manner.
User Interface:
- The Dashboard dockable dialog now has a 'Memory' group that shows
memory-usage information: the currently used memory size, the
available physical memory size, and the total physical memory
size. It can also show the tile-cache size, for comparison
against the other memory stats. Note that the upper-bound of the
meter is the physical memory size, so the memory usage may be over
100% when GIMP uses the swap.
- The Dashboard dockable dialog now has "read" and "written" fields in
the dashboard swap group, which report the total amount of data
read-from/written-to the tile swap, respetively. Additionally, the
swap busy indicator (used as the meter's LED) has been improved,
so that it's active whenever data has been read-from/written-to
the swap during the last sampling interval, rather than at the
point of sampling.
- Fonts can now be tagged. The user interface is the same as for
brushes, patterns etc.
- Some icons fixed: larger spacing between broken chains and
gimp-tool-ellipse-select made symmetrical.
Usability:
- When a plug-in cannot be applied to an image because of mismatch
in image types (e.g. layer has no alpha or image is greyscale),
GIMP now displays a message listing supported image types for this
plug-in.
Tools:
- The Measurement tool now has an "Auto straighten" option allowing
to rotate the active drawable (layer, channel…) so that the
measurement line is used as horizon. As other transform tools, the
feature will work on linked drawables as well.
- The Smudge tool now paints correctly on images with a color
profile other than the GIMP's built-in one.
Build:
- Installer: set compatibility options to run Python plugins in
HiDPI-aware mode.
- Put back compatibility DLLs for really old plugins.
- Install binary tool `gimp-test-clipboard` on the system to allow
people to help us debug clipboard bugs.
- --enable-bundled-mypaint-brushes renamed
--enable-relocatable-bundle and also make WMF fonts looked up on
the runtime prefix of GIMP (instead of the build-time path) when
this build option was set.
Plug-ins:
- gimptool-2.0 binary now accepts source files with non-standard
extensions if it can try to guess appropriate language from the
compiler being used. It will also properly quote arguments for
shell usage.
- Run explicitly Python 2 as Python plug-in interpreter to prevent
breakage on systems where Python 3 is the default.
- raw_input()'s argument in Python console is now optional, and
input() support has been added.
File Formats:
- The PSD loader now provides an option to load "merged",
pre-composited version of the images that becomes available when a
PSD file was saved with "Maximize Compatibility" option enabled in
Photoshop. This is useful when loading PSD files that use features
that GIMP doesn't currently support, and therefore can't render
correctly, such as adjustment layers. When loading the merged
image version, we avoid loading certain additional data from the
file, such as channels, paths, and guides, while still loading
metadata. This option is currently exposed as an additional file
type ("Photoshop image (merged)"), which has to be explicitly
selected from the file-type list when opening the image.
- Embedding GIMP's built-in sRGB color profile to exported files is
now optional. The default choice can be set in the Preferences
dialog.
Translations:
- Updated translations: Catalan, Czech, Danish, Dutch, Finnish,
Greek, Hungarian, Italian, Latvian, Polish, Romanian, Russian,
Spanish, Swedish, Ukrainian.
Overview of Changes from GIMP 2.10.0 to GIMP 2.10.2
===================================================

8
README
View File

@@ -25,21 +25,21 @@ detailed installation instructions, see the file INSTALL.
GIMP's home page is at:
http://www.gimp.org/
https://www.gimp.org/
Please be sure to visit this site for information, documentation,
tutorials, news, etc. All things GIMP-ish are available from there.
The automated plug-in registry is located at:
http://registry.gimp.org/
https://registry.gimp.org/
There you can get the latest versions of plug-ins, using a convenient
forms-based interface.
The latest version of GIMP can be found at:
http://www.gimp.org/downloads/
https://www.gimp.org/downloads/
2. Mailing Lists
@@ -48,7 +48,7 @@ The latest version of GIMP can be found at:
We have several mailing lists dedicated to GIMP user and development
discussion. There is more info at
http://www.gimp.org/mail_lists.html
https://www.gimp.org/mail_lists.html
Links to several archives of the mailing lists are included in that page.

View File

@@ -3,13 +3,13 @@ This file contains some important hints for translators.
The current status of the GIMP translation can be checked at
http://l10n.gnome.org/module/gimp
https://l10n.gnome.org/module/gimp
Translation of the GNU Image Manipulation Program is handled by the
GNOME Translation Project (see http://l10n.gnome.org/). If you want to
GNOME Translation Project (see https://l10n.gnome.org/). If you want to
help, we suggest that you get in touch with the translation team of
your language (see http://l10n.gnome.org/teams/).
your language (see https://l10n.gnome.org/teams/).
GIMP is different

View File

@@ -9,6 +9,7 @@ if PLATFORM_OSX
xobjective_c = "-xobjective-c"
xobjective_cxx = "-xobjective-c++"
xnone = "-xnone"
framework_appkit = -framework AppKit
endif
if OS_WIN32
@@ -78,4 +79,5 @@ AM_CXXFLAGS = \
$(xobjective_cxx)
AM_LDFLAGS = \
$(framework_appkit) \
$(xnone)

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/*

View File

@@ -74,6 +74,10 @@ libapp_a_SOURCES = $(libapp_sources)
gimp_@GIMP_APP_VERSION@_SOURCES = $(libapp_sources) main.c
if PLATFORM_LINUX
libdl = -ldl
endif
if PLATFORM_OSX
framework_cocoa = -framework Cocoa
endif
@@ -81,6 +85,13 @@ endif
if OS_WIN32
win32_ldflags = -mwindows -Wl,--tsaware $(WIN32_LARGE_ADDRESS_AWARE)
# for GimpDashboard and GimpBacktrace
psapi_cflags = -DPSAPI_VERSION=1
libpsapi = -lpsapi
# for GimpBacktrace
libdbghelp = -ldbghelp
if HAVE_EXCHNDL
exchndl = -lexchndl
endif
@@ -113,6 +124,7 @@ AM_CPPFLAGS = \
$(GEGL_CFLAGS) \
$(LCMS_CFLAGS) \
$(GEXIV2_CFLAGS) \
$(psapi_cflags) \
-I$(includedir) \
-I$(builddir)/gui
@@ -129,7 +141,8 @@ AM_LDFLAGS = \
-Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec \
-Wl,-u,$(SYMPREFIX)gimp_layer_mode_is_legacy \
-Wl,-u,$(SYMPREFIX)gimp_parallel_init \
-Wl,-u,$(SYMPREFIX)gimp_parallel_exit
-Wl,-u,$(SYMPREFIX)gimp_async_set_new \
-Wl,-u,$(SYMPREFIX)gimp_uncancelable_waitable_new
gimpconsoleldadd = \
xcf/libappxcf.a \
@@ -167,9 +180,14 @@ gimpconsoleldadd = \
$(Z_LIBS) \
$(JSON_C_LIBS) \
$(LIBMYPAINT_LIBS) \
$(LIBBACKTRACE_LIBS) \
$(LIBUNWIND_LIBS) \
$(INTLLIBS) \
$(RT_LIBS) \
$(libm)
$(libm) \
$(libdl) \
$(libpsapi) \
$(libdbghelp)
gimp_@GIMP_APP_VERSION@_LDFLAGS = \
$(AM_LDFLAGS) \

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ABOUT_H__
@@ -47,7 +47,7 @@
"GNU General Public License for more details." \
"\n\n" \
"You should have received a copy of the GNU General Public License " \
"along with GIMP. If not, see: http://www.gnu.org/licenses/")
"along with GIMP. If not, see: https://www.gnu.org/licenses/")
#endif /* __ABOUT_H__ */

View File

@@ -98,8 +98,6 @@ libappactions_a_SOURCES = \
filters-commands.h \
fonts-actions.c \
fonts-actions.h \
fonts-commands.c \
fonts-commands.h \
gradient-editor-actions.c \
gradient-editor-actions.h \
gradient-editor-commands.c \

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ACTIONS_TYPES_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __BRUSH_EDITOR_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __BRUSHES_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __BUFFERS_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __BUFFERS_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CHANNELS_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CHANNELS_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __COLORMAP_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -20,9 +20,6 @@
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "core/gimpchannel-select.h"
@@ -30,23 +27,11 @@
#include "core/gimpimage.h"
#include "core/gimpimage-colormap.h"
#include "widgets/gimpcolordialog.h"
#include "widgets/gimpcolormapeditor.h"
#include "widgets/gimpdialogfactory.h"
#include "actions.h"
#include "colormap-commands.h"
#include "gimp-intl.h"
/* local function prototypes */
static void colormap_edit_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpColormapEditor *editor);
/* public functions */
@@ -54,60 +39,9 @@ void
colormap_edit_color_cmd_callback (GtkAction *action,
gpointer data)
{
GimpColormapEditor *editor;
GimpImage *image;
const guchar *colormap;
GimpRGB color;
gchar *desc;
return_if_no_image (image, data);
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
editor = GIMP_COLORMAP_EDITOR (data);
colormap = gimp_image_get_colormap (image);
gimp_rgba_set_uchar (&color,
colormap[editor->col_index * 3],
colormap[editor->col_index * 3 + 1],
colormap[editor->col_index * 3 + 2],
255);
desc = g_strdup_printf (_("Edit colormap entry #%d"), editor->col_index);
if (! editor->color_dialog)
{
editor->color_dialog =
gimp_color_dialog_new (GIMP_VIEWABLE (image),
action_data_get_context (data),
_("Edit Colormap Entry"),
GIMP_ICON_COLORMAP,
desc,
GTK_WIDGET (editor),
gimp_dialog_factory_get_singleton (),
"gimp-colormap-editor-color-dialog",
(const GimpRGB *) &color,
FALSE, FALSE);
g_signal_connect (editor->color_dialog, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&editor->color_dialog);
g_signal_connect (editor->color_dialog, "update",
G_CALLBACK (colormap_edit_color_update),
editor);
}
else
{
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (editor->color_dialog),
GIMP_VIEWABLE (image),
action_data_get_context (data));
g_object_set (editor->color_dialog, "description", desc, NULL);
gimp_color_dialog_set_color (GIMP_COLOR_DIALOG (editor->color_dialog),
&color);
}
g_free (desc);
gtk_window_present (GTK_WINDOW (editor->color_dialog));
gimp_colormap_editor_edit_color (editor);
}
void
@@ -153,31 +87,6 @@ colormap_to_selection_cmd_callback (GtkAction *action,
editor->col_index,
op,
FALSE, 0.0, 0.0);
}
/* private functions */
static void
colormap_edit_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpColormapEditor *editor)
{
GimpImage *image = GIMP_IMAGE_EDITOR (editor)->image;
switch (state)
{
case GIMP_COLOR_DIALOG_UPDATE:
break;
case GIMP_COLOR_DIALOG_OK:
gimp_image_set_colormap_entry (image, editor->col_index, color, TRUE);
gimp_image_flush (image);
/* Fall through */
case GIMP_COLOR_DIALOG_CANCEL:
gtk_widget_hide (editor->color_dialog);
break;
}
gimp_image_flush (image);
}

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __COLORMAP_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CONTEXT_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -482,7 +482,7 @@ context_font_select_cmd_callback (GtkAction *action,
return_if_no_context (context, data);
context_select_object ((GimpActionSelectType) value,
context, context->gimp->fonts);
context, gimp_data_factory_get_container (context->gimp->font_factory));
}
void

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CONTEXT_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CURSOR_INFO_ACIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CURSOR_INFO_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -41,14 +41,32 @@ static const GimpActionEntry dashboard_actions[] =
GIMP_HELP_DASHBOARD_DIALOG },
{ "dashboard-groups", NULL,
NC_("dashboard-action", "Groups") },
NC_("dashboard-action", "_Groups") },
{ "dashboard-update-interval", NULL,
NC_("dashboard-action", "Update Interval") },
NC_("dashboard-action", "_Update Interval") },
{ "dashboard-history-duration", NULL,
NC_("dashboard-action", "History Duration") },
NC_("dashboard-action", "_History Duration") },
{ "dashboard-log-record", GIMP_ICON_RECORD,
NC_("dashboard-action", "_Start/Stop Recording..."), NULL,
NC_("dashboard-action", "Start/stop recording performance log"),
G_CALLBACK (dashboard_log_record_cmd_callback),
GIMP_HELP_DASHBOARD_LOG_RECORD },
{ "dashboard-log-add-marker", GIMP_ICON_MARKER,
NC_("dashboard-action", "_Add Marker..."), NULL,
NC_("dashboard-action", "Add an event marker "
"to the performance log"),
G_CALLBACK (dashboard_log_add_marker_cmd_callback),
GIMP_HELP_DASHBOARD_LOG_ADD_MARKER },
{ "dashboard-log-add-empty-marker", GIMP_ICON_MARKER,
NC_("dashboard-action", "Add _Empty Marker"), NULL,
NC_("dashboard-action", "Add an empty event marker "
"to the performance log"),
G_CALLBACK (dashboard_log_add_empty_marker_cmd_callback),
GIMP_HELP_DASHBOARD_LOG_ADD_EMPTY_MARKER },
{ "dashboard-reset", GIMP_ICON_RESET,
NC_("dashboard-action", "Reset"), NULL,
NC_("dashboard-action", "_Reset"), NULL,
NC_("dashboard-action", "Reset cumulative data"),
G_CALLBACK (dashboard_reset_cmd_callback),
GIMP_HELP_DASHBOARD_RESET },
@@ -57,7 +75,7 @@ static const GimpActionEntry dashboard_actions[] =
static const GimpToggleActionEntry dashboard_toggle_actions[] =
{
{ "dashboard-low-swap-space-warning", NULL,
NC_("dashboard-action", "Low Swap Space Warning"), NULL,
NC_("dashboard-action", "_Low Swap Space Warning"), NULL,
NC_("dashboard-action", "Raise the dashboard when "
"the swap size approaches its limit"),
G_CALLBACK (dashboard_low_swap_space_warning_cmd_callback),
@@ -153,7 +171,12 @@ dashboard_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
gboolean recording;
recording = gimp_dashboard_log_is_recording (dashboard);
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
@@ -195,8 +218,13 @@ dashboard_actions_update (GimpActionGroup *group,
break;
}
SET_SENSITIVE ("dashboard-log-add-marker", recording);
SET_SENSITIVE ("dashboard-log-add-empty-marker", recording);
SET_SENSITIVE ("dashboard-reset", !recording);
SET_ACTIVE ("dashboard-low-swap-space-warning",
gimp_dashboard_get_low_swap_space_warning (dashboard));
#undef SET_SENSITIVE
#undef SET_ACTIVE
}

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DASHBOARD_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -24,14 +24,30 @@
#include "actions-types.h"
#include "core/gimp.h"
#include "widgets/gimpdashboard.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpuimanager.h"
#include "dialogs/dialogs.h"
#include "dashboard-commands.h"
#include "gimp-intl.h"
/* local function prototypes */
static void dashboard_log_record_response (GtkWidget *dialog,
int response_id,
GimpDashboard *dashboard);
static void dashboard_log_add_marker_response (GtkWidget *dialog,
const gchar *description,
GimpDashboard *dashboard);
/* public functions */
@@ -61,6 +77,148 @@ dashboard_history_duration_cmd_callback (GtkAction *action,
gimp_dashboard_set_history_duration (dashboard, history_duration);
}
void
dashboard_log_record_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
if (! gimp_dashboard_log_is_recording (dashboard))
{
GtkWidget *dialog;
#define LOG_RECORD_KEY "gimp-dashboard-log-record-dialog"
dialog = dialogs_get_dialog (G_OBJECT (dashboard), LOG_RECORD_KEY);
if (! dialog)
{
GtkFileFilter *filter;
GFile *folder;
dialog = gtk_file_chooser_dialog_new (
"Record Performance Log", NULL, GTK_FILE_CHOOSER_ACTION_SAVE,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Record"), GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog),
GTK_RESPONSE_OK);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_screen (
GTK_WINDOW (dialog),
gtk_widget_get_screen (GTK_WIDGET (dashboard)));
gtk_window_set_role (GTK_WINDOW (dialog),
"gimp-dashboard-log-record");
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
gtk_file_chooser_set_do_overwrite_confirmation (
GTK_FILE_CHOOSER (dialog), TRUE);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All Files"));
gtk_file_filter_add_pattern (filter, "*");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("Log Files (*.log)"));
gtk_file_filter_add_pattern (filter, "*.log");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
folder = g_object_get_data (G_OBJECT (dashboard),
"gimp-dashboard-log-record-folder");
if (folder)
{
gtk_file_chooser_set_current_folder_file (
GTK_FILE_CHOOSER (dialog), folder, NULL);
}
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog),
"gimp-performance.log");
g_signal_connect (dialog, "response",
G_CALLBACK (dashboard_log_record_response),
dashboard);
g_signal_connect (dialog, "delete-event",
G_CALLBACK (gtk_true),
NULL);
gimp_help_connect (dialog, gimp_standard_help_func,
GIMP_HELP_DASHBOARD_LOG_RECORD, NULL);
dialogs_attach_dialog (G_OBJECT (dashboard), LOG_RECORD_KEY, dialog);
g_signal_connect_object (dashboard, "destroy",
G_CALLBACK (gtk_widget_destroy),
dialog,
G_CONNECT_SWAPPED);
#undef LOG_RECORD_KEY
}
gtk_window_present (GTK_WINDOW (dialog));
}
else
{
GError *error = NULL;
if (! gimp_dashboard_log_stop_recording (dashboard, &error))
{
gimp_message_literal (
gimp_editor_get_ui_manager (GIMP_EDITOR (dashboard))->gimp,
NULL, GIMP_MESSAGE_ERROR, error->message);
}
}
}
void
dashboard_log_add_marker_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
GtkWidget *dialog;
#define LOG_ADD_MARKER_KEY "gimp-dashboard-log-add-marker-dialog"
dialog = dialogs_get_dialog (G_OBJECT (dashboard), LOG_ADD_MARKER_KEY);
if (! dialog)
{
dialog = gimp_query_string_box (
_("Add Marker"), GTK_WIDGET (dashboard),
gimp_standard_help_func, GIMP_HELP_DASHBOARD_LOG_ADD_MARKER,
_("Enter a description for the marker"),
NULL,
G_OBJECT (dashboard), "destroy",
(GimpQueryStringCallback) dashboard_log_add_marker_response,
dashboard);
dialogs_attach_dialog (G_OBJECT (dashboard), LOG_ADD_MARKER_KEY, dialog);
#undef LOG_ADD_MARKER_KEY
}
gtk_window_present (GTK_WINDOW (dialog));
}
void
dashboard_log_add_empty_marker_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
gimp_dashboard_log_add_marker (dashboard, NULL);
}
void
dashboard_reset_cmd_callback (GtkAction *action,
gpointer data)
@@ -81,3 +239,45 @@ dashboard_low_swap_space_warning_cmd_callback (GtkAction *action,
gimp_dashboard_set_low_swap_space_warning (dashboard, low_swap_space_warning);
}
/* private functions */
static void
dashboard_log_record_response (GtkWidget *dialog,
int response_id,
GimpDashboard *dashboard)
{
if (response_id == GTK_RESPONSE_OK)
{
GFile *file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
GError *error = NULL;
g_object_set_data_full (G_OBJECT (dashboard),
"gimp-dashboard-log-record-folder",
g_file_get_parent (file),
g_object_unref);
if (! gimp_dashboard_log_start_recording (dashboard, file, &error))
{
gimp_message_literal (
gimp_editor_get_ui_manager (GIMP_EDITOR (dashboard))->gimp,
NULL, GIMP_MESSAGE_ERROR, error->message);
g_clear_error (&error);
}
g_object_unref (file);
}
gtk_widget_destroy (dialog);
}
static void
dashboard_log_add_marker_response (GtkWidget *dialog,
const gchar *description,
GimpDashboard *dashboard)
{
gimp_dashboard_log_add_marker (dashboard, description);
}

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DASHBOARD_COMMANDS_H__
@@ -26,6 +26,13 @@ void dashboard_history_duration_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
void dashboard_log_record_cmd_callback (GtkAction *action,
gpointer data);
void dashboard_log_add_marker_cmd_callback (GtkAction *action,
gpointer data);
void dashboard_log_add_empty_marker_cmd_callback (GtkAction *action,
gpointer data);
void dashboard_reset_cmd_callback (GtkAction *action,
gpointer data);

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DATA_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DATA_EDITOR_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DEBUG_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DEBUG_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DIALOGS_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DIALOGS_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCK_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCK_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCKABLE_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCKABLE_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCUMENTS_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCUMENTS_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DRAWABLE_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DRAWABLE_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DYNAMICS_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DYNAMICS_EDITOR_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __EDIT_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __EDIT_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ERROR_CONSOLE_ACIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ERROR_CONSOLE_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FILE_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FILE_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -413,6 +413,16 @@ static const GimpStringActionEntry filters_interactive_actions[] =
"gimp:levels",
GIMP_HELP_TOOL_LEVELS },
{ "filters-little-planet", GIMP_ICON_GEGL,
NC_("filters-action", "_Little Planet..."), NULL, NULL,
"gegl:stereographic-projection",
GIMP_HELP_FILTER_LITTLE_PLANET },
{ "filters-long-shadow", GIMP_ICON_GEGL,
NC_("filters-action", "_Long Shadow..."), NULL, NULL,
"gegl:long-shadow",
GIMP_HELP_FILTER_LONG_SHADOW },
{ "filters-mantiuk-2006", GIMP_ICON_GEGL,
NC_("filters-action", "_Mantiuk 2006..."), NULL, NULL,
"gegl:mantiuk06",
@@ -669,7 +679,7 @@ static const GimpStringActionEntry filters_interactive_actions[] =
GIMP_HELP_FILTER_TILE_SEAMLESS },
{ "filters-unsharp-mask", GIMP_ICON_GEGL,
NC_("filters-action", "_Unsharp Mask..."), NULL, NULL,
NC_("filters-action", "Sharpen (_Unsharp Mask)..."), NULL, NULL,
"gegl:unsharp-mask",
GIMP_HELP_FILTER_UNSHARP_MASK },
@@ -890,6 +900,8 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-lens-distortion", writable);
SET_SENSITIVE ("filters-lens-flare", writable);
SET_SENSITIVE ("filters-levels", writable);
SET_SENSITIVE ("filters-little-planet", writable);
SET_SENSITIVE ("filters-long-shadow", writable && alpha);
SET_SENSITIVE ("filters-mantiuk-2006", writable);
SET_SENSITIVE ("filters-maze", writable);
SET_SENSITIVE ("filters-median-blur", writable);
@@ -957,7 +969,8 @@ filters_actions_update (GimpActionGroup *group,
GimpProcedure *proc = gimp_filter_history_nth (group->gimp, 0);
gint i;
if (proc && gimp_procedure_get_sensitive (proc, GIMP_OBJECT (drawable)))
if (proc &&
gimp_procedure_get_sensitive (proc, GIMP_OBJECT (drawable), NULL))
{
gimp_action_group_set_action_sensitive (group, "filters-repeat", TRUE);
gimp_action_group_set_action_sensitive (group, "filters-reshow", TRUE);
@@ -975,7 +988,8 @@ filters_actions_update (GimpActionGroup *group,
proc = gimp_filter_history_nth (group->gimp, i);
sensitive = gimp_procedure_get_sensitive (proc, GIMP_OBJECT (drawable));
sensitive = gimp_procedure_get_sensitive (proc, GIMP_OBJECT (drawable),
NULL);
gimp_action_group_set_action_sensitive (group, name, sensitive);

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FILTERS_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FILTERS_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -32,8 +32,8 @@
#include "widgets/gimphelp-ids.h"
#include "actions.h"
#include "data-commands.h"
#include "fonts-actions.h"
#include "fonts-commands.h"
#include "gimp-intl.h"
@@ -47,7 +47,7 @@ static const GimpActionEntry fonts_actions[] =
{ "fonts-refresh", GIMP_ICON_VIEW_REFRESH,
NC_("fonts-action", "_Rescan Font List"), NULL,
NC_("fonts-action", "Rescan the installed fonts"),
G_CALLBACK (fonts_refresh_cmd_callback),
G_CALLBACK (data_refresh_cmd_callback),
GIMP_HELP_FONT_REFRESH }
};

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FONTS_ACTIONS_H__

View File

@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -67,7 +67,8 @@ static const gchar * gimp_gegl_procedure_get_label (GimpProcedure *procedu
static const gchar * gimp_gegl_procedure_get_menu_label (GimpProcedure *procedure);
static const gchar * gimp_gegl_procedure_get_help_id (GimpProcedure *procedure);
static gboolean gimp_gegl_procedure_get_sensitive (GimpProcedure *procedure,
GimpObject *object);
GimpObject *object,
const gchar **tooltip);
static GimpValueArray * gimp_gegl_procedure_execute (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
@@ -201,16 +202,13 @@ gimp_gegl_procedure_get_help_id (GimpProcedure *procedure)
}
static gboolean
gimp_gegl_procedure_get_sensitive (GimpProcedure *procedure,
GimpObject *object)
gimp_gegl_procedure_get_sensitive (GimpProcedure *procedure,
GimpObject *object,
const gchar **tooltip)
{
GimpDrawable *drawable;
GimpDrawable *drawable = GIMP_DRAWABLE (object);
gboolean sensitive = FALSE;
g_return_val_if_fail (object == NULL || GIMP_IS_DRAWABLE (object), FALSE);
drawable = GIMP_DRAWABLE (object);
if (drawable)
{
GimpItem *item;
@@ -369,7 +367,7 @@ gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
if (! strcmp (gimp_object_get_name (active_tool->tool_info), tool_name))
{
/* Remember the prodecure that created this tool, because
/* Remember the procedure that created this tool, because
* we can't just switch to an operation tool using
* gimp_context_set_tool(), we also have to go through the
* initialization code below, otherwise we end up with a

View File

@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_GEGL_PROCEDURE_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -339,6 +339,11 @@ static const GimpRadioActionEntry gradient_editor_blending_actions[] =
GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING,
GIMP_HELP_GRADIENT_EDITOR_BLENDING },
{ "gradient-editor-blending-step", NULL,
NC_("gradient-editor-blending", "S_tep"), NULL, NULL,
GIMP_GRADIENT_SEGMENT_STEP,
GIMP_HELP_GRADIENT_EDITOR_BLENDING },
{ "gradient-editor-blending-varies", NULL,
NC_("gradient-editor-blending", "(Varies)"), NULL, NULL,
-1,
@@ -826,6 +831,7 @@ gradient_editor_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("gradient-editor-blending-sine", editable);
SET_SENSITIVE ("gradient-editor-blending-sphere-increasing", editable);
SET_SENSITIVE ("gradient-editor-blending-sphere-decreasing", editable);
SET_SENSITIVE ("gradient-editor-blending-step", editable);
if (blending_equal && gradient)
{
@@ -846,6 +852,9 @@ gradient_editor_actions_update (GimpActionGroup *group,
case GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING:
SET_ACTIVE ("gradient-editor-blending-sphere-decreasing", TRUE);
break;
case GIMP_GRADIENT_SEGMENT_STEP:
SET_ACTIVE ("gradient-editor-blending-step", TRUE);
break;
}
}
else

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GRADIENT_EDITOR_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -20,17 +20,15 @@
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpdatafactory.h"
#include "core/gimpgradient.h"
#include "widgets/gimpcolordialog.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpgradienteditor.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpuimanager.h"
@@ -43,20 +41,6 @@
/* local function prototypes */
static void gradient_editor_left_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpGradientEditor *editor);
static void gradient_editor_right_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpGradientEditor *editor);
static GimpGradientSegment *
gradient_editor_save_selection (GimpGradientEditor *editor);
static void gradient_editor_replace_selection (GimpGradientEditor *editor,
GimpGradientSegment *replace_seg);
static void gradient_editor_split_uniform_response (GtkWidget *widget,
gint response_id,
GimpGradientEditor *editor);
@@ -72,38 +56,8 @@ gradient_editor_left_color_cmd_callback (GtkAction *action,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
editor->left_saved_dirty = gimp_data_is_dirty (GIMP_DATA (gradient));
editor->left_saved_segments = gradient_editor_save_selection (editor);
editor->color_dialog =
gimp_color_dialog_new (GIMP_VIEWABLE (gradient),
GIMP_DATA_EDITOR (editor)->context,
_("Left Endpoint Color"),
GIMP_ICON_GRADIENT,
_("Gradient Segment's Left Endpoint Color"),
GTK_WIDGET (editor),
gimp_dialog_factory_get_singleton (),
"gimp-gradient-editor-color-dialog",
&editor->control_sel_l->left_color,
TRUE, TRUE);
g_signal_connect (editor->color_dialog, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&editor->color_dialog);
g_signal_connect (editor->color_dialog, "update",
G_CALLBACK (gradient_editor_left_color_update),
editor);
gtk_widget_set_sensitive (GTK_WIDGET (editor), FALSE);
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
gtk_window_present (GTK_WINDOW (editor->color_dialog));
gimp_gradient_editor_edit_left_color (editor);
}
void
@@ -111,36 +65,32 @@ gradient_editor_left_color_type_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientColor color_type;
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientColor color_type;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
gimp_gradient_editor_get_selection (editor, &gradient, &left, NULL);
color_type = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
if (gradient &&
color_type >= 0 &&
color_type !=
gimp_gradient_segment_get_left_color_type (gradient,
editor->control_sel_l))
gimp_gradient_segment_get_left_color_type (gradient, left))
{
GimpRGB color;
gimp_gradient_segment_get_left_flat_color (
gradient, GIMP_DATA_EDITOR (editor)->context, editor->control_sel_l,
&color);
gimp_gradient_segment_get_left_flat_color (gradient,
GIMP_DATA_EDITOR (editor)->context,
left, &color);
gimp_data_freeze (GIMP_DATA (gradient));
gimp_gradient_segment_set_left_color_type (gradient,
editor->control_sel_l,
color_type);
gimp_gradient_segment_set_left_color_type (gradient, left, color_type);
if (color_type == GIMP_GRADIENT_COLOR_FIXED)
gimp_gradient_segment_set_left_color (gradient,
editor->control_sel_l,
&color);
gimp_gradient_segment_set_left_color (gradient, left, &color);
gimp_data_thaw (GIMP_DATA (gradient));
}
@@ -154,27 +104,29 @@ gradient_editor_load_left_cmd_callback (GtkAction *action,
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
GimpGradientSegment *seg;
GimpRGB color;
GimpGradientColor color_type = GIMP_GRADIENT_COLOR_FIXED;
gradient = GIMP_GRADIENT (data_editor->data);
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
switch (value)
{
case GRADIENT_EDITOR_COLOR_NEIGHBOR_ENDPOINT:
if (editor->control_sel_l->prev != NULL)
seg = editor->control_sel_l->prev;
if (left->prev != NULL)
seg = left->prev;
else
seg = gimp_gradient_segment_get_last (editor->control_sel_l);
seg = gimp_gradient_segment_get_last (left);
color = seg->right_color;
color_type = seg->right_color_type;
break;
case GRADIENT_EDITOR_COLOR_OTHER_ENDPOINT:
color = editor->control_sel_r->right_color;
color_type = editor->control_sel_l->right_color_type;
color = right->right_color;
color_type = right->right_color_type;
break;
case GRADIENT_EDITOR_COLOR_FOREGROUND:
@@ -192,15 +144,11 @@ gradient_editor_load_left_cmd_callback (GtkAction *action,
gimp_data_freeze (GIMP_DATA (gradient));
gimp_gradient_segment_range_blend (gradient,
editor->control_sel_l,
editor->control_sel_r,
gimp_gradient_segment_range_blend (gradient, left, right,
&color,
&editor->control_sel_r->right_color,
&right->right_color,
TRUE, TRUE);
gimp_gradient_segment_set_left_color_type (gradient,
editor->control_sel_l,
color_type);
gimp_gradient_segment_set_left_color_type (gradient, left, color_type);
gimp_data_thaw (GIMP_DATA (gradient));
}
@@ -210,12 +158,13 @@ gradient_editor_save_left_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
gimp_gradient_editor_get_selection (editor, &gradient, &left, NULL);
gimp_gradient_segment_get_left_color (gradient, editor->control_sel_l,
gimp_gradient_segment_get_left_color (gradient, left,
&editor->saved_colors[value]);
}
@@ -224,38 +173,8 @@ gradient_editor_right_color_cmd_callback (GtkAction *action,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
editor->right_saved_dirty = gimp_data_is_dirty (GIMP_DATA (gradient));
editor->right_saved_segments = gradient_editor_save_selection (editor);
editor->color_dialog =
gimp_color_dialog_new (GIMP_VIEWABLE (gradient),
GIMP_DATA_EDITOR (editor)->context,
_("Right Endpoint Color"),
GIMP_ICON_GRADIENT,
_("Gradient Segment's Right Endpoint Color"),
GTK_WIDGET (editor),
gimp_dialog_factory_get_singleton (),
"gimp-gradient-editor-color-dialog",
&editor->control_sel_l->right_color,
TRUE, TRUE);
g_signal_connect (editor->color_dialog, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&editor->color_dialog);
g_signal_connect (editor->color_dialog, "update",
G_CALLBACK (gradient_editor_right_color_update),
editor);
gtk_widget_set_sensitive (GTK_WIDGET (editor), FALSE);
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
gtk_window_present (GTK_WINDOW (editor->color_dialog));
gimp_gradient_editor_edit_right_color (editor);
}
void
@@ -263,36 +182,32 @@ gradient_editor_right_color_type_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientColor color_type;
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *right;
GimpGradientColor color_type;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
gimp_gradient_editor_get_selection (editor, &gradient, NULL, &right);
color_type = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
if (gradient &&
color_type >= 0 &&
color_type !=
gimp_gradient_segment_get_right_color_type (gradient,
editor->control_sel_r))
gimp_gradient_segment_get_right_color_type (gradient, right))
{
GimpRGB color;
gimp_gradient_segment_get_right_flat_color (
gradient, GIMP_DATA_EDITOR (editor)->context, editor->control_sel_r,
&color);
gimp_gradient_segment_get_right_flat_color (gradient,
GIMP_DATA_EDITOR (editor)->context,
right, &color);
gimp_data_freeze (GIMP_DATA (gradient));
gimp_gradient_segment_set_right_color_type (gradient,
editor->control_sel_r,
color_type);
gimp_gradient_segment_set_right_color_type (gradient, right, color_type);
if (color_type == GIMP_GRADIENT_COLOR_FIXED)
gimp_gradient_segment_set_right_color (gradient,
editor->control_sel_r,
&color);
gimp_gradient_segment_set_right_color (gradient, right, &color);
gimp_data_thaw (GIMP_DATA (gradient));
}
@@ -306,27 +221,29 @@ gradient_editor_load_right_cmd_callback (GtkAction *action,
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
GimpGradientSegment *seg;
GimpRGB color;
GimpGradientColor color_type = GIMP_GRADIENT_COLOR_FIXED;
gradient = GIMP_GRADIENT (data_editor->data);
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
switch (value)
{
case GRADIENT_EDITOR_COLOR_NEIGHBOR_ENDPOINT:
if (editor->control_sel_r->next != NULL)
seg = editor->control_sel_r->next;
if (right->next != NULL)
seg = right->next;
else
seg = gimp_gradient_segment_get_first (editor->control_sel_r);
seg = gimp_gradient_segment_get_first (right);
color = seg->left_color;
color_type = seg->left_color_type;
break;
case GRADIENT_EDITOR_COLOR_OTHER_ENDPOINT:
color = editor->control_sel_l->left_color;
color_type = editor->control_sel_l->left_color_type;
color = left->left_color;
color_type = left->left_color_type;
break;
case GRADIENT_EDITOR_COLOR_FOREGROUND:
@@ -344,15 +261,11 @@ gradient_editor_load_right_cmd_callback (GtkAction *action,
gimp_data_freeze (GIMP_DATA (gradient));
gimp_gradient_segment_range_blend (gradient,
editor->control_sel_l,
editor->control_sel_r,
&editor->control_sel_l->left_color,
gimp_gradient_segment_range_blend (gradient, left, right,
&left->left_color,
&color,
TRUE, TRUE);
gimp_gradient_segment_set_right_color_type (gradient,
editor->control_sel_l,
color_type);
gimp_gradient_segment_set_right_color_type (gradient, left, color_type);
gimp_data_thaw (GIMP_DATA (gradient));
}
@@ -362,12 +275,13 @@ gradient_editor_save_right_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *right;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
gimp_gradient_editor_get_selection (editor, &gradient, NULL, &right);
gimp_gradient_segment_get_right_color (gradient, editor->control_sel_r,
gimp_gradient_segment_get_right_color (gradient, right,
&editor->saved_colors[value]);
}
@@ -378,10 +292,12 @@ gradient_editor_blending_func_cmd_callback (GtkAction *action,
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
GEnumClass *enum_class = NULL;
GimpGradientSegmentType type;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
type = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
@@ -390,8 +306,7 @@ gradient_editor_blending_func_cmd_callback (GtkAction *action,
if (gradient && g_enum_get_value (enum_class, type))
{
gimp_gradient_segment_range_set_blending_function (gradient,
editor->control_sel_l,
editor->control_sel_r,
left, right,
type);
}
@@ -405,10 +320,12 @@ gradient_editor_coloring_type_cmd_callback (GtkAction *action,
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
GEnumClass *enum_class = NULL;
GimpGradientSegmentColor color;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
color = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
@@ -417,8 +334,7 @@ gradient_editor_coloring_type_cmd_callback (GtkAction *action,
if (gradient && g_enum_get_value (enum_class, color))
{
gimp_gradient_segment_range_set_coloring_type (gradient,
editor->control_sel_l,
editor->control_sel_r,
left, right,
color);
}
@@ -429,33 +345,40 @@ void
gradient_editor_flip_cmd_callback (GtkAction *action,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
gimp_gradient_segment_range_flip (gradient,
editor->control_sel_l,
editor->control_sel_r,
&editor->control_sel_l,
&editor->control_sel_r);
left, right,
&left, &right);
gimp_gradient_editor_set_selection (editor, left, right);
}
void
gradient_editor_replicate_cmd_callback (GtkAction *action,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
GtkWidget *dialog;
GtkWidget *vbox;
GtkWidget *label;
GtkWidget *scale;
GtkAdjustment *scale_data;
const gchar *title;
const gchar *desc;
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
GtkWidget *dialog;
GtkWidget *vbox;
GtkWidget *label;
GtkWidget *scale;
GtkAdjustment *scale_data;
const gchar *title;
const gchar *desc;
if (editor->control_sel_l == editor->control_sel_r)
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
if (left == right)
{
title = _("Replicate Segment");
desc = _("Replicate Gradient Segment");
@@ -466,19 +389,19 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
desc = _("Replicate Gradient Selection");
}
dialog =
gimp_viewable_dialog_new (GIMP_VIEWABLE (data_editor->data),
data_editor->context,
title, "gimp-gradient-segment-replicate",
GIMP_ICON_GRADIENT, desc,
GTK_WIDGET (editor),
gimp_standard_help_func,
GIMP_HELP_GRADIENT_EDITOR_REPLICATE,
dialog = gimp_viewable_dialog_new (GIMP_VIEWABLE (gradient),
data_editor->context,
title,
"gimp-gradient-segment-replicate",
GIMP_ICON_GRADIENT, desc,
GTK_WIDGET (editor),
gimp_standard_help_func,
GIMP_HELP_GRADIENT_EDITOR_REPLICATE,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Replicate"), GTK_RESPONSE_OK,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Replicate"), GTK_RESPONSE_OK,
NULL);
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
@@ -496,7 +419,7 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
gtk_widget_show (vbox);
/* Instructions */
if (editor->control_sel_l == editor->control_sel_r)
if (left == right)
label = gtk_label_new (_("Select the number of times\n"
"to replicate the selected segment."));
else
@@ -507,8 +430,7 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
gtk_widget_show (label);
/* Scale */
editor->replicate_times = 2;
scale_data = GTK_ADJUSTMENT (gtk_adjustment_new (2.0, 2.0, 21.0, 1.0, 1.0, 1.0));
scale_data = GTK_ADJUSTMENT (gtk_adjustment_new (2.0, 2.0, 21.0, 1.0, 1.0, 1.0));
scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, scale_data);
gtk_scale_set_digits (GTK_SCALE (scale), 0);
@@ -516,9 +438,7 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, TRUE, 4);
gtk_widget_show (scale);
g_signal_connect (scale_data, "value-changed",
G_CALLBACK (gimp_int_adjustment_update),
&editor->replicate_times);
g_object_set_data (G_OBJECT (dialog), "adjustment", scale_data);
gtk_widget_set_sensitive (GTK_WIDGET (editor), FALSE);
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
@@ -531,34 +451,43 @@ void
gradient_editor_split_midpoint_cmd_callback (GtkAction *action,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
GimpGradient *gradient = GIMP_GRADIENT (data_editor->data);
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
gimp_gradient_segment_range_split_midpoint (gradient,
data_editor->context,
editor->control_sel_l,
editor->control_sel_r,
left, right,
editor->blend_color_space,
&editor->control_sel_l,
&editor->control_sel_r);
&left, &right);
gimp_gradient_editor_set_selection (editor, left, right);
}
void
gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
GtkWidget *dialog;
GtkWidget *vbox;
GtkWidget *label;
GtkWidget *scale;
GtkAdjustment *scale_data;
const gchar *title;
const gchar *desc;
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
GtkWidget *dialog;
GtkWidget *vbox;
GtkWidget *label;
GtkWidget *scale;
GtkAdjustment *scale_data;
const gchar *title;
const gchar *desc;
if (editor->control_sel_l == editor->control_sel_r)
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
if (left == right)
{
title = _("Split Segment Uniformly");
desc = _("Split Gradient Segment Uniformly");
@@ -569,19 +498,19 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
desc = _("Split Gradient Segments Uniformly");
}
dialog =
gimp_viewable_dialog_new (GIMP_VIEWABLE (data_editor->data),
data_editor->context,
title, "gimp-gradient-segment-split-uniformly",
GIMP_ICON_GRADIENT, desc,
GTK_WIDGET (editor),
gimp_standard_help_func,
GIMP_HELP_GRADIENT_EDITOR_SPLIT_UNIFORM,
dialog = gimp_viewable_dialog_new (GIMP_VIEWABLE (gradient),
data_editor->context,
title,
"gimp-gradient-segment-split-uniformly",
GIMP_ICON_GRADIENT, desc,
GTK_WIDGET (editor),
gimp_standard_help_func,
GIMP_HELP_GRADIENT_EDITOR_SPLIT_UNIFORM,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Split"), GTK_RESPONSE_OK,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Split"), GTK_RESPONSE_OK,
NULL);
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
@@ -600,7 +529,7 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
gtk_widget_show (vbox);
/* Instructions */
if (editor->control_sel_l == editor->control_sel_r)
if (left == right)
label = gtk_label_new (_("Select the number of uniform parts\n"
"in which to split the selected segment."));
else
@@ -611,7 +540,6 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
gtk_widget_show (label);
/* Scale */
editor->split_parts = 2;
scale_data = GTK_ADJUSTMENT (gtk_adjustment_new (2.0, 2.0, 21.0, 1.0, 1.0, 1.0));
scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, scale_data);
@@ -620,9 +548,7 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 4);
gtk_widget_show (scale);
g_signal_connect (scale_data, "value-changed",
G_CALLBACK (gimp_int_adjustment_update),
&editor->split_parts);
g_object_set_data (G_OBJECT (dialog), "adjustment", scale_data);
gtk_widget_set_sensitive (GTK_WIDGET (editor), FALSE);
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
@@ -635,60 +561,62 @@ void
gradient_editor_delete_cmd_callback (GtkAction *action,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
gimp_gradient_segment_range_delete (gradient,
editor->control_sel_l,
editor->control_sel_r,
&editor->control_sel_l,
&editor->control_sel_r);
left, right,
&left, &right);
gimp_gradient_editor_set_selection (editor, left, right);
}
void
gradient_editor_recenter_cmd_callback (GtkAction *action,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
gimp_gradient_segment_range_recenter_handles (gradient,
editor->control_sel_l,
editor->control_sel_r);
gimp_gradient_segment_range_recenter_handles (gradient, left, right);
}
void
gradient_editor_redistribute_cmd_callback (GtkAction *action,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
gimp_gradient_segment_range_redistribute_handles (gradient,
editor->control_sel_l,
editor->control_sel_r);
gimp_gradient_segment_range_redistribute_handles (gradient, left, right);
}
void
gradient_editor_blend_color_cmd_callback (GtkAction *action,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
gimp_gradient_segment_range_blend (gradient,
editor->control_sel_l,
editor->control_sel_r,
&editor->control_sel_l->left_color,
&editor->control_sel_r->right_color,
gimp_gradient_segment_range_blend (gradient, left, right,
&left->left_color,
&right->right_color,
TRUE, FALSE);
}
@@ -696,16 +624,16 @@ void
gradient_editor_blend_opacity_cmd_callback (GtkAction *action,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
gimp_gradient_segment_range_blend (gradient,
editor->control_sel_l,
editor->control_sel_r,
&editor->control_sel_l->left_color,
&editor->control_sel_r->right_color,
gimp_gradient_segment_range_blend (gradient, left, right,
&left->left_color,
&right->right_color,
FALSE, TRUE);
}
@@ -722,181 +650,18 @@ gradient_editor_zoom_cmd_callback (GtkAction *action,
/* private functions */
static void
gradient_editor_left_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpGradientEditor *editor)
{
GimpGradient *gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
switch (state)
{
case GIMP_COLOR_DIALOG_UPDATE:
gimp_gradient_segment_range_blend (gradient,
editor->control_sel_l,
editor->control_sel_r,
color,
&editor->control_sel_r->right_color,
TRUE, TRUE);
break;
case GIMP_COLOR_DIALOG_OK:
gimp_gradient_segment_range_blend (gradient,
editor->control_sel_l,
editor->control_sel_r,
color,
&editor->control_sel_r->right_color,
TRUE, TRUE);
gimp_gradient_segments_free (editor->left_saved_segments);
gtk_widget_destroy (editor->color_dialog);
editor->color_dialog = NULL;
gtk_widget_set_sensitive (GTK_WIDGET (editor), TRUE);
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
break;
case GIMP_COLOR_DIALOG_CANCEL:
gradient_editor_replace_selection (editor, editor->left_saved_segments);
if (! editor->left_saved_dirty)
gimp_data_clean (GIMP_DATA (gradient));
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (gradient));
gtk_widget_destroy (editor->color_dialog);
editor->color_dialog = NULL;
gtk_widget_set_sensitive (GTK_WIDGET (editor), TRUE);
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
break;
}
}
static void
gradient_editor_right_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpGradientEditor *editor)
{
GimpGradient *gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
switch (state)
{
case GIMP_COLOR_DIALOG_UPDATE:
gimp_gradient_segment_range_blend (gradient,
editor->control_sel_l,
editor->control_sel_r,
&editor->control_sel_l->left_color,
color,
TRUE, TRUE);
break;
case GIMP_COLOR_DIALOG_OK:
gimp_gradient_segment_range_blend (gradient,
editor->control_sel_l,
editor->control_sel_r,
&editor->control_sel_l->left_color,
color,
TRUE, TRUE);
gimp_gradient_segments_free (editor->right_saved_segments);
gtk_widget_destroy (editor->color_dialog);
editor->color_dialog = NULL;
gtk_widget_set_sensitive (GTK_WIDGET (editor), TRUE);
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
break;
case GIMP_COLOR_DIALOG_CANCEL:
gradient_editor_replace_selection (editor, editor->right_saved_segments);
if (! editor->right_saved_dirty)
gimp_data_clean (GIMP_DATA (gradient));
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (gradient));
gtk_widget_destroy (editor->color_dialog);
editor->color_dialog = NULL;
gtk_widget_set_sensitive (GTK_WIDGET (editor), TRUE);
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
break;
}
}
static GimpGradientSegment *
gradient_editor_save_selection (GimpGradientEditor *editor)
{
GimpGradientSegment *seg, *prev, *tmp;
GimpGradientSegment *oseg, *oaseg;
prev = NULL;
oseg = editor->control_sel_l;
tmp = NULL;
do
{
seg = gimp_gradient_segment_new ();
*seg = *oseg; /* Copy everything */
if (prev == NULL)
tmp = seg; /* Remember first segment */
else
prev->next = seg;
seg->prev = prev;
seg->next = NULL;
prev = seg;
oaseg = oseg;
oseg = oseg->next;
}
while (oaseg != editor->control_sel_r);
return tmp;
}
static void
gradient_editor_replace_selection (GimpGradientEditor *editor,
GimpGradientSegment *replace_seg)
{
GimpGradient *gradient;
GimpGradientSegment *lseg, *rseg;
GimpGradientSegment *replace_last;
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
/* Remember left and right segments */
lseg = editor->control_sel_l->prev;
rseg = editor->control_sel_r->next;
replace_last = gimp_gradient_segment_get_last (replace_seg);
/* Free old selection */
editor->control_sel_r->next = NULL;
gimp_gradient_segments_free (editor->control_sel_l);
/* Link in new segments */
if (lseg)
lseg->next = replace_seg;
else
gradient->segments = replace_seg;
replace_seg->prev = lseg;
if (rseg)
rseg->prev = replace_last;
replace_last->next = rseg;
editor->control_sel_l = replace_seg;
editor->control_sel_r = replace_last;
}
static void
gradient_editor_split_uniform_response (GtkWidget *widget,
gint response_id,
GimpGradientEditor *editor)
{
GtkAdjustment *adjustment;
gint split_parts;
adjustment = g_object_get_data (G_OBJECT (widget), "adjustment");
split_parts = RINT (gtk_adjustment_get_value (adjustment));
gtk_widget_destroy (widget);
gtk_widget_set_sensitive (GTK_WIDGET (editor), TRUE);
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
@@ -904,17 +669,21 @@ gradient_editor_split_uniform_response (GtkWidget *widget,
if (response_id == GTK_RESPONSE_OK)
{
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (editor);
GimpGradient *gradient = GIMP_GRADIENT (data_editor->data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (editor);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
gimp_gradient_segment_range_split_uniform (gradient,
data_editor->context,
editor->control_sel_l,
editor->control_sel_r,
editor->split_parts,
left, right,
split_parts,
editor->blend_color_space,
&editor->control_sel_l,
&editor->control_sel_r);
&left, &right);
gimp_gradient_editor_set_selection (editor, left, right);
}
}
@@ -923,6 +692,13 @@ gradient_editor_replicate_response (GtkWidget *widget,
gint response_id,
GimpGradientEditor *editor)
{
GtkAdjustment *adjustment;
gint replicate_times;
adjustment = g_object_get_data (G_OBJECT (widget), "adjustment");
replicate_times = RINT (gtk_adjustment_get_value (adjustment));
gtk_widget_destroy (widget);
gtk_widget_set_sensitive (GTK_WIDGET (editor), TRUE);
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
@@ -930,13 +706,17 @@ gradient_editor_replicate_response (GtkWidget *widget,
if (response_id == GTK_RESPONSE_OK)
{
GimpGradient *gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
GimpGradient *gradient;
GimpGradientSegment *left;
GimpGradientSegment *right;
gimp_gradient_editor_get_selection (editor, &gradient, &left, &right);
gimp_gradient_segment_range_replicate (gradient,
editor->control_sel_l,
editor->control_sel_r,
editor->replicate_times,
&editor->control_sel_l,
&editor->control_sel_r);
left, right,
replicate_times,
&left, &right);
gimp_gradient_editor_set_selection (editor, left, right);
}
}

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GRADIENT_EDITOR_COMMANDS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"

Some files were not shown because too many files have changed in this diff Show More