Commit Graph

43145 Commits

Author SHA1 Message Date
Ell
d4689441fe app: small fix to gimp_gegl_mask_combine_ellipse_rect() 2019-03-24 14:45:45 -04:00
Ell
106df3b794 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.
2019-03-24 03:20:39 -04:00
23b5d503a8 Updated Slovenian translation 2019-03-22 21:49:54 +01:00
2ec3ec98b7 Updated Slovenian translation 2019-03-22 21:49:18 +01:00
369382c862 Updated Slovenian translation 2019-03-22 21:43:09 +01:00
79e1c9668e Updated Slovenian translation 2019-03-22 21:40:43 +01:00
d1e4969ec4 Updated Slovenian translation 2019-03-22 21:28:38 +01:00
Ell
a712308f20 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.
2019-03-20 17:48:47 -04:00
Ell
8e77347cac 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.
2019-03-20 16:24:37 -04:00
Ell
a227c8e94d 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.
2019-03-20 16:01:57 -04:00
Ell
1044342393 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.
2019-03-20 15:58:29 -04:00
Ell
8a6e1c907d app: improve gimp_gegl_mask_combine_rect()
Simplify the code, and add support for CHANNEL_OP_INTERSECT.
2019-03-20 15:58:29 -04:00
Ell
5198d3c32d app: convert gimp-gegl-mask-combine to C++
... in preparation for next commits.
2019-03-20 15:58:28 -04:00
Ell
ffaaa81c8a app: add gimp_babl_format_change_{component_type,trc}()
... which change a format's component-type/TRC, without otherwise
affecting it.
2019-03-20 15:57:05 -04:00
Ell
d7f12c9d26 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).
2019-03-20 15:50:35 -04:00
9042e85f3c 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.
2019-03-20 15:05:22 +01:00
03dc24455a 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.
2019-03-20 14:48:40 +01:00
af6760b3c9 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.
2019-03-20 14:06:18 +01:00
7cf06c3f60 app: color widget updated properly when editing colors.
Also note that GimpColorPanel doesn't need to react differently whether
GimpColorDialog returned OK or CANCEL, as the dialog keep track and
return the appropriate color to set in the end of the process.
2019-03-20 11:21:46 +01:00
4dcda7ffb8 Issue #3129: Split sentence on gimpexport.c. 2019-03-19 22:29:04 +01:00
425eb83f8a app: GimpColorDialog follows the user context active image.
(when working in context-aware mode)
2019-03-19 13:37:18 +01:00
0b68ce8182 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.
2019-03-19 12:46:12 +01:00
3dc820c017 app: make active_image member a weak pointer in GimpColorDialog.
This fixes signal handler disconnections wrongly run on images which
have already been freed.
2019-03-18 23:36:31 +01:00
1c6fb83308 Update POTFILES.in 2019-03-18 19:11:28 +01:00
0ae3f38f52 Issue #3122: gimp_color_dialog_constructed: 'colormap' action group...
... not found.
So it turns out I cannot just gtk_action_group_get_action("colormap") as
the related action group is not registered unless the Colormap dockable
is opened. Anyway I mostly needed to get icons and tooltips from these
actions. Let's just copy the strings and be done with it.
This still feel a bit like duplicate code but it's not too bad, so…
2019-03-18 17:57:08 +01:00
ed3bcf248e plug-ins: remove old spyrogimp.
Spyrogimp has been rewritten in Python with more features.

Note: this commit should not be backported to gimp-2-10 since we will
keep the old plug-in around (in case its API is used by older scripts in
particular). But let's turn over a new leaf with future GIMP 3 and only
keep the new plug-in.
2019-03-18 15:53:04 +01:00
3b0e4d8760 app: update padding color interactively.
We should see the padding color change as we tweak the color dialog to
make it more useful.
2019-03-18 14:58:05 +01:00
edb90672fb app: again properly disconnect signal handlers. 2019-03-18 14:37:32 +01:00
4a3da7d05e app: properly disconnect signal handlers. 2019-03-18 14:02:30 +01:00
c2ab385207 app: some cleanup in GimpColormapEditor.
I should have cleaned better earlier. :-/
Also add back some horizontal alignment in the colormap entry edit
widgets. This got lost during moving apparently!
2019-03-18 13:00:42 +01:00
6e84c47469 app: use a GtkStack instead of GtkNotebook in GimpColorDialog.
This was the original plan since it is closer conceptually to the widget
idea, but I started working on gimp-2-10 where GtkStack was not
available (as it appears in GTK+3).
2019-03-18 12:28:02 +01:00
576e804ebf app: make the active_image into a weak pointer.
We should make sure the object exists before using it.
2019-03-18 12:15:18 +01:00
6abb55c759 app: GimpColorDialog should actually follow the user context...
... and not the GimpContext passed in.
What we are indeed interested in is the currently active image which is
recorded in the user context.
2019-03-18 12:11:58 +01:00
8ab04a2a3a app: use the new GimpColormapSelection in GimpColormapEditor.
Code from GimpColormapSelection is mostly coming from GimpColormapEditor
anyway, except that it is used elsewhere as well.
2019-03-18 12:10:44 +01:00
94043529c8 Issue #2938: Painting on indexed images counter-intuitive.
When loading indexed images, the image type is not obvious at all
(basically only reference is in the title bar). The main issue is that
if you don't realize it when editing, GIMP appear broken when the
expected colors don't appear on canvas.
Commit e48c239459 was a first step by showing various color widgets with
out-of-gamut warnings contextually. This additional commits will also
allows color selection for painting tools (i.e. foreground and
background colors) to be done within the image palette by default. This
way, the fact that this image impose working with limited color palette
is obvious as soon as you try to edit colors.
2019-03-18 12:06:11 +01:00
8e8535ac5b Updated Greek translation 2019-03-17 21:55:30 +02:00
feea2b3042 Updated Greek translation 2019-03-15 13:26:37 +02:00
d5ea4c5653 Typo - Preceptual changed to Perceptual 2019-03-14 16:47:39 +00:00
0f3b2304c0 Updated Greek translation 2019-03-14 10:40:15 +02:00
3a6e937221 Update Turkish translation 2019-03-14 08:39:53 +00:00
f68600193e Update Turkish translation 2019-03-14 08:37:33 +00:00
5f56394409 Update Polish translation 2019-03-13 18:12:24 +01:00
Ell
506f412a05 app: avoid pushing undo while updating colormap entries
In GimpColormapEditor, while updating a colormap entry, only push
an undo step when confirming the new color.
2019-03-13 10:57:09 -04:00
Ell
1e89c161c5 app: more "Readjust" improvements
... technical stuff.
2019-03-13 10:12:08 -04:00
98fb2d77d7 Update Icelandic translation 2019-03-13 11:03:59 +00:00
6c4af8f175 Update Icelandic translation
(cherry picked from commit 1b9fdddc78)
2019-03-13 11:02:02 +00:00
a1101863ef Update Icelandic translation
(cherry picked from commit 4d08f75978)
2019-03-13 10:48:54 +00:00
b579e14526 Update Icelandic translation
(cherry picked from commit 282adfd581)
2019-03-13 10:07:20 +00:00
Ell
a3fa3b6181 app: improve transform-tools readjustment
In GimpTransformGridTool, extend the functionality of the
"Readjust" button, such that if the transformation is already
adjusted to the view (i.e., when the button is clicked the second
time), readjust the transformation to the item bounds (as when
using the tool "normally"), and vice versa.  This allows switching
back and forth between "normal" mode, and "adjusted-to-view" mode.

Additionally, disable readjustment when the current transforamtion
is invalid, and show an error when readjustment results in an
invalid transformation.
2019-03-13 05:28:29 -04:00
Ell
92216a635a app: in gimp_tool_gui_set_response_sensitive(), allow non-existent ID
In gimp_tool_gui_set_response_sensitive(), silently ignore non-
existent response IDs, instead of emitting a CRITICAL, to match the
behavior of GtkDialog and GimpOverlayDialog.  This simplifies code
with optional dialog responses.
2019-03-13 05:28:29 -04:00