Commit Graph

42338 Commits

Author SHA1 Message Date
e24f9eec37 Issue #2961: minor coding style fix.
Missing space, and anyway let's use named parameters, which makes the
code better self-documented.

(cherry picked from commit 35eff00e2e)
2019-02-14 12:12:24 +01:00
648703b6f0 Remap Linear Invert's mnemonic to I to remove a duplicate with Levels 2019-02-14 01:21:01 +03:00
Ell
04052fe3a4 app: in GimpOperationTool, add scrollbar width to scrolled-window requisition
... so that the scrollbar doesn't cover the child in wide UIs.
2019-02-13 13:27:43 -05:00
Ell
0a82bd1109 app: in gimpbrushcore-loops, fix memory corruption in clear_edges()
s/width/height/

Fixes commit 9d19e804ed.

(cherry picked from commit 72d4977574)
2019-02-13 12:33:48 -05:00
3ff2285ba8 Setting the FileChooserbutton to a fixed width.
(cherry picked from commit 582801ccc5)
(cherry picked from commit b44c2e9352)
(cherry picked from commit cdd686f752)
(cherry picked from commit 3b818f6a9b)
(cherry picked from commit c7d5438b49)

Note from reviewer: sorry, this was not squashed on master! Gitlab
failed to squash even though the "squash commits" checkbox was checked!
So it ended as a 5-commit 1-line change!
:-/
2019-02-13 17:16:30 +01:00
18d86cccbe NEWS: update. 2019-02-13 16:30:17 +01:00
b409a781cd app: out-of-gamut for grayscale images too in GimpFgBgEditor.
I realized that the same issue as for indexed images could also apply to
grayscale. If your fg/bg colors are not gray, it should not be expected
for them to be paintable. So let's give the out-of-gamut hint.

(cherry picked from commit 9090de96f2)
2019-02-13 16:25:54 +01:00
e48c239459 app: GimpFgBgEditor displays the out-of-gamut color for indexed images.
If a color is not within the indexed image's palette, we can consider it
to be out-of-gamut too (the gamut of such image being its palette).

This is a first step towards fixing #2938. Basically currently opening
indexed images is not made obvious and you can end up thinking GIMP is
broken as when you try to paint with a given FG or BG color, you may get
a completely different color on the canvas. And it is not obvious to
realize why. Now at least, the FG/BG color will tell you when the color
you are trying to paint with is not within the accepted palette.

(cherry picked from commit 7b4c96d03d)
2019-02-13 16:24:09 +01:00
3fd78441ba app: pack color picker and hexadecimal entry on same line in Color dock.
There was no use to pack them on 2 lines. It was just making the FG/BG
widget overly huge, and the color picker button and hex entry very long.
This was just ugly. Also this dock is tall enough, so packing things
horizontally when it makes sense is better.

(cherry picked from commit 45adf9d0d7)
2019-02-13 16:13:24 +01:00
4774bd3b48 app: s/plug-In/plug-in in a GUI-visible string.
(cherry picked from commit a6aa14bca2)
2019-02-13 16:13:07 +01:00
b2fa4c6299 app: clarify function to validate line art closure.
Add some comments and string docs as it is not that obvious to
understand the whole logics, invert the return value (returning TRUE
when the closure line is accepted, instead of the opposite) and rename
it to more appropriate gimp_line_art_allow_closure().

(cherry picked from commit c4beca8c90)
2019-02-13 16:13:01 +01:00
b2181d0fb2 app: proper signedness for return value of gimp_edgel_region_area().
It is just weird to return a negative area and multiply it by -1.
Just apply the proper signs from the start.

(cherry picked from commit 14e7424403)
2019-02-13 16:12:54 +01:00
f5225f2211 app: error messages should happen on button press, not initialization.
The initialization is sometimes done when switching tools (for instance
when selecting the active tool by command), not always on button press.
So the error output behavior was inconsistent, and worse, the tool was
sometimes not forbidden to run when it should have been.
Just run all the checks (layer groups, locks and whatnot) on button
press.

(cherry picked from commit 74cfd4fd95)
2019-02-13 16:12:41 +01:00
8e5e7306ca Update Japanese translation 2019-02-13 14:11:46 +00:00
4cf6d12912 Updated Italian translation 2019-02-13 11:29:44 +01:00
64d0e29e42 plug-ins: remove stuff that is no longer needed from file-pat
(cherry picked from commit 52b1348f3d)
2019-02-12 21:39:23 +01:00
7ce90a19b4 app, plug-ins: move pattern saving to the core
but only the actual saving code, not the export magic and dialog.

Add new internal procedure file-pat-save-internal which is not
registered as a file procedure and always works non-interactively on
the passed arguments and only saves the passed drawable. Use the new
internal procedure from the file-pat-save code and remove all file
writing code from the plug-in.

This way all pattern file writing code duplication is killed, while
the whole export mechanism is completely unchanged.

(cherry picked from commit b29ecfb5da)
2019-02-12 21:34:17 +01:00
376b053129 app: don't unref a NULL GimpTempBuf in gimp_pattern_copy()
(cherry picked from commit a95c169091)
2019-02-12 21:17:04 +01:00
Ell
4c6b181371 app: link tests against libappfile-data
(cherry picked from commit 68b22d45ed)
2019-02-12 13:54:28 -05:00
cf76b7f73c app: implement brush saving in the core
and enable duplicating the clipboard brush, like for patterns.

(cherry picked from commit 1e6b26e83a)
2019-02-12 18:54:16 +01:00
3dc01393eb app: remove useless includes from gimppattern-save.c
(cherry picked from commit 831d04ec7e)
2019-02-12 18:47:06 +01:00
Ell
88787d905b m4macros: remove binreloc.m4 from EXTRA_DIST
... it was removed by commit
4d84c1d7ee.

(cherry picked from commit 74a151a124)
2019-02-12 10:10:33 -05:00
Ell
ecc456556e app: in gimppaintcore-loops, fix indentation in DispatchPaintMaskToCompMask
(cherry picked from commit 4ecbf33e18)
2019-02-12 09:37:09 -05:00
62db4174dc Update Japanese translation 2019-02-12 14:30:29 +00:00
Ell
0066a47013 app: in gimp_paint_core_replace(), improve applicator path
In the applicator path of gimp_paint_core_replace(), actually use
the paint-core's applicator, instead of using
gimp_drawable_replace_buffer().  This improves speed, consolidates
code, and fixes some cases in which the latter is broken.

Furthermore, when using CONSTANT paint application-mode, use the
paint-core's undo_buffer as the compositing source, rather than the
drawable buffer, which is the correct behavior.

(cherry picked from commit 3451ffb62c)
2019-02-12 09:27:28 -05:00
Ell
940197e2d7 app: in gimp_paint_core_paste(), don't copy paint mask when combining to canvas buffer
In the applicator path of gimp_paint_core_paste(), use the paint
mask directly when combining it to the canvas buffer, rather than
using a copy of it, since it's not being modified.

Fix some comments.

(cherry picked from commit ba6713bbe1)
2019-02-12 09:27:28 -05:00
Ell
1c2fe3b51c app: implement gimp_paint_core_replace() using gimp_paint_core_loops_process()
Implement the no-applicator path of gimp_paint_core_replace() in
terms of gimp_paint_core_loops_process(), using the algorithms
added in the previous commit, instead of using
gimp_drawable_replace_buffer().  This improves speed, consolidates
code, and fixes some cases in which the latter is broken.

Furthermore, when using CONSTANT paint application-mode, use the
paint-core's undo_buffer as the compositing source, rather than the
drawable buffer, which is the correct behavior.

(cherry picked from commit ddb69b77a7)
2019-02-12 09:27:25 -05:00
Ell
f5222ce4d0 app: in gimppaintcore-loops, add {CANVAS_BUFFER,PAINT_MASK}_TO_COMP_MASK algorithms
In gimppaintcore-loops, add CANVAS_BUFFER_TO_COMP_MASK and
PAINT_MASK_TO_COMP_MASK paint algorithms, which copy the canvas
buffer and the paint mask, respectively, to the compositing mask.
When there is an image mask buffer, the algorithms additionally
combine the copied mask with the mask buffer.  When possible, the
algorithms use the canvas buffer/paint mask data directly as the
compositing mask data, instead of copying.

These algorithms are necessary in order to implement
gimp_paint_core_replace() in terms of
gimp_paint_core_loops_process(), which is done by the next commit.

(cherry picked from commit 183a55613e)
2019-02-12 09:26:23 -05:00
Ell
d4cb2d57bd app: in gimppaintcore-loops, make sure dest_buffer is the primary iterator buffer
In gimppaintcore-loops, in the DO_LAYER_BLEND paint algorithm, and
in the CanvasBufferIterator algorithm helper-class, initialize the
iterator *before* initializing the base class, to make sure that
dest_buffer, or canvas_buffer, respectively and in that order, is
the primary buffer of the iterator.  In particular, this avoids the
mask buffer being the primary buffer.  This is desirable, since
most of the buffers we iterate over are tile-aligned to the dest/
canvas buffers.

(cherry picked from commit f9c072c328)
2019-02-12 09:26:22 -05:00
Ell
aa7de29f9e app: in gimppaintcore-loops, add MaskBufferIterator algorithm helper-class
In gimppaintcore-loops, add a MaskBufferIterator algorithm helper-
class, which provides read-only iterator access to the mask buffer,
if one is used.

Use the new class in DoLayerBlend, instead of manually managing the
mask-buffer iterator.

(cherry picked from commit 44281ce2c4)
2019-02-12 09:26:22 -05:00
Ell
5a4ffd4495 app: in gimppaintcore-loops, add [Temp]CompMask algorithm helper-classes
In gimppaintcore-loops, add a CompMask algorithm helper-class,
which provides access to the mask buffer used for compositing, to
be used by the DO_LAYER_BLEND algorithm instead of the image mask
buffer.

CompMask itself doesn't provide the storage for the mask; this is
rather the responsibility of the algorithms that use it.  The
TempCompMask algorithm helper-class provides temporary storage for
the compositing mask, and can be used by algorithms that need a
temporary mask.

(cherry picked from commit e36847febb)
2019-02-12 09:26:21 -05:00
Ell
1a06fa0c0a app: in gimppaintcore-loops, name algorithms more consistently
In gimppaintcore-loops, make the algorithm names, and the names of
the corresponding functions, more consistent.

(cherry picked from commit d23e239fed)
2019-02-12 09:26:19 -05:00
Ell
470f760eee app: in gimppaintcore-loops, allow specifying dependencies to BasicDispatch
... which are dispatched before the algorithm, as in
AlgorithmDispatch.

(cherry picked from commit 2788444df4)
2019-02-12 09:24:58 -05:00
Ell
197ec919cd app: in gimppaintcore-loops, add finalize[_step]() algorithm functions
In gimppaintcore-loops, add finalize() and finalize_step()
algorithm functions, which get called at the end of processing the
entire area, and at the end of processing each chunk, respectively.
Algorithms can use these functions to clean up allocated resources.

(cherry picked from commit 4d2ce15400)
2019-02-12 09:24:58 -05:00
Ell
deda2699b9 app: in gimppaintcore-loops, make CanvasBufferIterator self-contained
In gimppaintcore-loops, make the CanvasBufferIterator algorithm
helper-class self-contained, not having to rely on AlgorithmBase.

(cherry picked from commit 0d1f724112)
2019-02-12 09:24:57 -05:00
Ell
9a13c66d96 app: in gimppaintcore-loops, use dynamic iterator indices
In the various gimppaintcore-loops algorithms, assign each
algorithm's iterator indices dynamically, rather than statically,
so that algorithms have more freedom in the way they initialize the
iterator.

(cherry picked from commit 9d1d21e716)
2019-02-12 09:24:56 -05:00
162250c3fb Typo in Italian translation 2019-02-12 14:25:25 +01:00
5dc78980f4 app: implement pattern saving in the core
Add GimpData::save() implementation to GimpPattern, and change some
glue code to make patterns editable.

Also implement GimpData::duplicate() in GimpPatternClipboard, which
makes it possible to simply copy an area and duplicate the clipboard
pattern to create a new persistent pattern.

(cherry picked from commit e93fd73fac)
2019-02-11 21:02:36 +01:00
1595f9f4e3 Updated Italian translation 2019-02-11 20:59:57 +01:00
4f00422bd4 app: add an "Open as Image" button to the brushes dialog
It was probably forgotten to add in the first place (the patterns
dialog also has one).

(cherry picked from commit fc609d12dd)
2019-02-11 20:53:57 +01:00
2c53aa2067 Update Polish translation 2019-02-11 20:27:34 +01:00
b3797079bc app: move file-pat-load from the file-pat plug-in to the core
(cherry picked from commit 410ffc435e)
2019-02-11 18:39:04 +01:00
616f5aac11 app, plug-ins: start consolidating brush and pattern loading/saving code
We currently have brush and pattern I/O code in both the core and
plug-ins. This commit starts removing plug-in code in favor of having
one copy of the code in the core, much like XCF loading and saving is
implemented.

Add app/file-data/ module with file procedure registering code, for
now just with an implementation of file-gbr-load.

Remove the file-gbr-load code from the file-gbr plug-in.

(cherry picked from commit a4e77e57f6)
2019-02-11 12:56:56 +01:00
270bd71658 app: add all missing festures from file-gbr-load to the core brush loader
gimp_brush_load_brush(): support legacy gpb brushes, and port a check
for gsize overflow what was added to the plug-in.

(cherry picked from commit 619f999280)
2019-02-11 12:36:02 +01:00
c05a700ccc Update Spanish translation 2019-02-11 07:53:20 +00:00
c000c7a8a2 Update Spanish translation 2019-02-11 07:51:36 +00:00
dfe1dbe0ad Update Spanish translation 2019-02-11 07:49:19 +00:00
Ell
4a7988b9fa Issue #2935 - GIMP 2.10 - options hidden in filter dialogs
gtk2 doesn't propagate the child requisition to the scrolled-window
requisition, so we have to do it manually.
2019-02-10 17:53:16 -05:00
c1e84c494d Update Hungarian translation 2019-02-10 17:37:22 +00:00
2465aecb4f Update Japanese translation 2019-02-10 15:46:38 +00:00