Commit Graph

42562 Commits

Author SHA1 Message Date
Ell
aa7fc3f08d app: add GTK+ patch allowing controlling combo-box popup style
Add a GTK+ patch providing a "popup-style" combo-box style
property, allowing to manually control the combo-box popup-style.
Use the LIST style for all combo-boxes in our system-wide gtkrc
file; this only has effect if GTK+ was built with the above patch.
2019-03-27 20:15:50 -04:00
Ell
1749fd995c app: add GTK+ patch to fix list-style combo-box popup width
Add a GTK+ patch that makes sure that list-style combo-box popups
are never narrower than their content.  This fixes the popup width
when using the System theme on Windows, for combo-boxes whose popup
cell-layout is wider than the combo-box cell-layout.  It is also
required for the next commit.
2019-03-27 20:15:50 -04:00
Ell
7edbad3144 app: include system gtkrc file in themerc
Include the system-wide gtkrc file, in addition to the user-
specific gtkrc file, in the generated themerc file, instead of
copying the former into the latter when creating the user's
gimpdir.  This allows us to modify the system-wide gtkrc file, and
having the changes take effect in existing installations.
2019-03-27 20:15:50 -04:00
Ell
f19ebb6269 app: revert combo-box drop-down changes
Revert the use of gtk_combo_box_set_wrap_width() to change the
combo-box drop-down style, except for the status-bar unit combo.
See https://gitlab.gnome.org/GNOME/gimp/issues/2828#note_421312 for
the rationale.

This reverts commits 1d984542e9,
68a33ab5bd, and
6dfca83c2a.

(cherry picked from commit 846d242f30)
2019-03-27 20:14:45 -04:00
Ell
9063b937fe app: use gimp:fill-source in gimp_drawable_edit_fill()
In gimp_drawable_edit_fill(), when performing a non-direct fill,
use a GimpDrawableFilter with gimp:fill-source, added in the
previous commit, instead of using gimp_drawable_apply_buffer() with
an intermediate fill buffer.  This avoids allocating a full-size
fill buffer, which may occupy a lot of space in pattern fills.

(cherry picked from commit 234f76b6fb)
2019-03-27 15:48:22 -04:00
Ell
75822d3d7b app: add gimp:fill-source operation
Add a new gimp:fill-source operation, which can act as a source
node for fill operations, instead of a fill buffer.  The op takes
a GimpFillOptions object, a drawable, and a pattern offset, and
uses gimp_fill_options_create_buffer() to produce its output.

This allows performing the entire fill operation in chunks as a
graph, instead of allocating a full-size fill buffer, which can
can occupy a lot of space for pattern fills.

(cherry picked from commit 6b0337e384)
2019-03-27 15:48:21 -04:00
Ell
2341117517 app: improve gimp_drawable_fill_buffer() for patterns
In gimp_drawable_fill_buffer(), when the fill-source is a pattern,
avoid going through an intermediate buffer when there's no profile
transform, and use the destination-buffer format for the
intermediate buffer, instead of the pattern format, when there is a
profile transform.

(cherry picked from commit 3c1634ee0d)
2019-03-27 15:48:21 -04:00
Ell
1416571389 app: use compositing format for fill buffer
Add gimp_fill_options_get_format(), which returns the format to be
used for the fill buffer; this is the same format used during
compositing.  Use this format in gimp_fill_options_create_buffer(),
instead of the drawable format.

This fixes the result of fill operations when the fill color/
pattern is not representable in the drawable format, and speeds up
color fills by avoiding color-conversion for the fill buffer during
processing.

(cherry picked from commit 245a17c79f)
2019-03-27 15:48:20 -04:00
Ell
6e06e5e856 app: in GimpDrawableFilter, set underlying operation
In GimpDrawableFilter, use
gimp_gegl_node_set_underlying_operation() to the the input
operation node as the underlying operation of the filter node.

(cherry picked from commit b0dfc1e7c7)
2019-03-27 15:48:20 -04:00
Ell
b5b5d71708 app: use underlying operation in gimp_gegl_apply_cached_operation()
In gimp_gegl_apply_cached_operation(), use the underlying
operation, as returned from
gimp_gegl_node_get_underlying_operation(), for testing whether the
operation is a point operation, for the purpose of avoiding
duplicating the input buffer.  Likewise, avoid duplicating the
buffer when the underlying operation is a source operation.

(cherry picked from commit 213b126c6e)
2019-03-27 15:48:19 -04:00
Ell
5e212fe0dd app: add gimp_gegl_node_{set,get}_underlying_oepration()
... which allow setting/getting the "underlying operation" node of
a graph node.  For example, GimpDrawableFilter constructs a complex
graph around a given operation node, which would be the underlying
operation of the graph.  This allows querying the properties of the
underlying operation, given only the graph.

In recursive cases, gimp_gegl_node_get_underlying_operation()
returns the most-nested underlying operation; when no underlying
operation has been set, gimp_gegl_node_get_underlying_operation()
returns the input node.

(cherry picked from commit eb5e473665)
2019-03-27 15:48:17 -04:00
Ell
3518ab9197 app: add gimp_gegl_node_is_source_operation()
... which determines if a node is a source operation.

(cherry picked from commit ff13e55c16)
2019-03-27 15:47:39 -04:00
Ell
55569d512e app: in gimp_drawable_apply_buffer(), work in chunks
In gimp_drawable_real_apply_buffer(), use GimpChunkIterator to blit
the applicator's output to the drawable's buffer in chunks, to
minimize the space used for intermediate results.

(cherry picked from commit 8f845d3a51)
2019-03-27 15:47:39 -04:00
Ell
7c6125ce67 app: improve responsiveness of GimpChunkIterator
In GimpChunkIterator, redajust the target area at each step,
instead of at each iteration, to adapt more quickly to the current
processing speed.  To avoid creating uneven chunks as a result,
only change the chunk height at the beginning of rows, unless the
resulting area would be more than twice as big as the target area.

(cherry picked from commit e904b71242)
2019-03-27 15:47:38 -04:00
Ell
f81c1cac10 app: preserve projection priority rect across structure/bounds changes
In GimpProjection, store the priority rect in image coordinates,
and only convert it to projectable coordinates when initializing
the chunk-iterator's priority rect.  This allows us to preserve the
priority rect across projectable structure/bounds changes.

(cherry picked from commit 9d80ccc3e6)
2019-03-26 04:58:57 -04:00
6473daa05b Update Ukrainian translation 2019-03-25 21:33:10 +00:00
bb747c58ed Update Ukrainian translation 2019-03-25 20:06:19 +00:00
03c98739bd Update Ukrainian translation 2019-03-25 20:05:04 +00:00
7d3b935327 Update Ukrainian translation 2019-03-25 20:03:58 +00:00
b9375a3873 Update Ukrainian translation 2019-03-25 20:01:52 +00:00
81afa73bf3 Updated Greek translation 2019-03-25 19:44:45 +02:00
Ell
ebaf09e7cc app: don't disable filter format conversion if != drawable format
In gimp_drawable_merge_filter(), don't disable the filter
applicator's output-format conversion node if the output format is
different than the drawable's format, since it may change the
result.

(cherry picked from commit 30da2f3d6f)
2019-03-25 09:16:26 -04:00
Ell
269f2ca0fc app: skip cache and format conversion when merging a drawable filter
In gimp_drawable_merge_filter(), disable the filter applicator's
cache and output-format conversion nodes before processing the
uncached region of the filter, so that the result is written
directly to the drawable's buffer.

(cherry picked from commit 733a6ec01c)
2019-03-25 09:02:31 -04:00
Ell
fef2c3423a app: small fix to gimp_gegl_mask_combine_ellipse_rect()
(cherry picked from commit d4689441fe)
2019-03-24 14:45:59 -04:00
Ell
9ac360a125 Issue #3142 - Filters on-canvas preview doesn't work ...
... immediately after an image precision change

When flushing a projection, make sure it has a buffer, instead of
bailing if it doesn't.  We rely on the image projection's "update"
signal to update the display after certain operations that free the
buffer, which would previously fail to happen, and cause subsequent
flushes to be ignored until the buffer is explicitly accessed.

This fixes commit b07f810273.

(cherry picked from commit 106df3b794)
2019-03-24 03:20:43 -04:00
8f3da0e8c4 Allow compilation on MacOS 10.5 leopard: issues #2923, #2924 and #2925 2019-03-23 23:33:07 +00:00
f540f6c0a5 Updated Slovenian translation 2019-03-22 21:51:38 +01:00
6a38c58cda Updated Slovenian translation 2019-03-22 21:50:49 +01:00
e5026997b9 Updated Slovenian translation 2019-03-22 21:46:14 +01:00
f1c5b3978a Updated Slovenian translation 2019-03-22 21:34:43 +01:00
041107f801 Updated Slovenian translation 2019-03-22 21:28:18 +01:00
Ell
b8d94342ca Issue #3134 - Deleting last layer of group not updating image
In gimp_group_layer_get_size(), make sure to always set *width and
*height, even when the group is empty, so that when the function is
called through gimp_projectable_get_size() by the group's
projection, the correct size is reported.  This makes sure we
update the correct area when the group becomes empty.

(cherry picked from commit a712308f20)
2019-03-20 17:51:21 -04:00
Ell
dc8fad6ac6 app: improve gimpchannel-{combine,select}
In gimpchannel-select, move some of the common functionality of the
various gimp_channel_select_foo() functions to gimpchannel-combine.
Furthermore, don't special-case CHANNEL_OP_INTERSECT, but rather
pass it over to gimpchannel-combine, which is now prepared to
handle it in all functions, as per the previous commits.

In gimpchannel-combine, factor out the common functionality of the
various gimp_channel_combine_foo() functions into a pair of
gimp_channel_combine_{start,end}() functions, which are called
before/after the actual gimp_gegl_mask_combine_foo() function,
respectively.  In particular, these functions deal with calculating
the new channel bounds.  Previously, the various
gimp_gegl_mask_combine_foo() functions would implicitly invalidate
the channel bounds (since commit
d0ae244fe8), rendering the bounds-
recalculation code ineffective.  This avoids manually recalculating
the bounds in many cases, speeding up selection operations.

(cherry picked from commit 8e77347cac)
2019-03-20 16:27:55 -04:00
Ell
fa79923d4b app: improve gimp_gegl_mask_combine_buffer()
Simplify code, use gimp_gegl_buffer_copy() for CHANNEL_OP_REPLACE
when possible, improve value clipping, and parallelize processing.

(cherry picked from commit a227c8e94d)
2019-03-20 16:27:55 -04:00
Ell
9b76ea070d app: improve gimp_gegl_mask_combine_ellipse[_rect]()
Improve gimp_gegl_mask_combine_ellipse_rect() -- the funciton
responsible for rendering ellipse/rounded-rectangle selections.

Most notably, this commit significantly improves the function's
performance, by identifying whole tiles, whole rows, or parts of a
row, that are fully inside, or fully outside, the ellipse, and
filling them in bulk, instead of calculating the anti-aliasing
value at each pixel, which is now only done along the
circumference.

This commit also improves anti-aliasing, by more accurately
approximating the distance from a pixel to the ellipse, and by
normalizing the distance according to the pixel's cross-section
length in the direction of the said point.  In particular, we
guarantee that pixels that are fully inside/outside the ellipse
have a value of 1/0, respectively, facilitating the aforementioned
optimization.

Additionally, this commit fixes various edge cases where several
primitives coincide at a single pixel (in the rounded-rectangle
case), adds support for CHANNEL_OP_INTERSECT, and parallelizes
processing.

(cherry picked from commit 1044342393)
2019-03-20 16:27:55 -04:00
Ell
d0a3d81c4a app: improve gimp_gegl_mask_combine_rect()
Simplify the code, and add support for CHANNEL_OP_INTERSECT.

(cherry picked from commit 8a6e1c907d)
2019-03-20 16:27:55 -04:00
Ell
15e8b53f0c app: convert gimp-gegl-mask-combine to C++
... in preparation for next commits.

(cherry picked from commit 5198d3c32d)
2019-03-20 16:27:55 -04:00
Ell
2a2ad4324d app: add gimp_babl_format_change_{component_type,linear}()
... which change a format's component-type/TRC, without otherwise
affecting it.
2019-03-20 16:27:55 -04:00
Ell
5c70b827d2 app: add gimp_babl_is_bounded()
... which takes a GimpPrecision, and determines if its values are
bounded to the [0,1] range (which is currently only true for
integer precisions).

(cherry picked from commit d7f12c9d26)
2019-03-20 16:27:55 -04:00
2675e944e3 app: make gimp_prop_gui_chain_toggled() less error-prone.
Don't assume that "toggled" signal means that toggle status actually
changed.

Though issue #3133 got fixed with my previous commit, let's make sure we
never create several GBinding for the same GimpChain by always checking
existence of a previous one after a "toggled" signal.
Also only create a GBinding object if one doesn't already exist.

(cherry picked from commit 9042e85f3c)
2019-03-20 15:12:25 +01:00
2ebf56850e Issue #3133: Gimp freezes after selecting a filter preset and...
... clicking a GimpChain.
Since commit c0c055b4e9, gimp_chain_button_set_active() emits the
"toggled" signal. There is no need to emit it separately from
GimpOperationTool when setting presets with
gimp_operation_tool_set_config().

In particular, since the "toggled" signal was even sent unconditionnally
here, our code was ending creating several GBinding for the same 2
adjustments, which was creating an infinite loop.

(cherry picked from commit 03dc24455a)
2019-03-20 15:12:19 +01:00
199f9f13a5 app: fixes g_object_unref: assertion 'G_IS_OBJECT (object)' failed.
"binding" data can be set to NULL. Do not assume it is a proper object.

Also I was tempted to use g_object_set_data() to simply free the
GBinding object on setting a new data, but such object will also be
freed when the widget is destroyed by default. So that would also end up
in double destruction. Instead just keep current logics.

This CRITICAL was reported in #3133 but this is not the main bug.

(cherry picked from commit af6760b3c9)
2019-03-20 15:12:13 +01:00
66c47ee23f plug-ins: do not needlessly free/malloc() buffer of same size.
In an animated WebP, chances that layers/frame have the same size is
high. It is uneeded to free then malloc again a buffer at each frame,
unless we need more allocated memory.
This is probably not so significant, but still feels nicer.

(cherry picked from commit 0b68ce8182)
2019-03-19 12:54:13 +01:00
4721643176 Update Marathi translation 2019-03-18 16:29:18 +00:00
520b4fbf18 Update Marathi translation 2019-03-18 16:27:13 +00:00
c15069797e Update Marathi translation 2019-03-18 11:12:37 +00:00
2a83ce9abe Update Marathi translation 2019-03-18 11:11:30 +00:00
9cf206f350 Update Marathi translation 2019-03-18 10:38:01 +00:00
05e9bb7b3f Update Marathi translation 2019-03-18 10:35:58 +00:00
b46d89257a Update Marathi translation 2019-03-15 12:25:58 +00:00