Commit Graph

43368 Commits

Author SHA1 Message Date
Ell 6425bf820a app: add "alpha" propertry to gimp:mask-components
In gimp:mask-components, add an "alpha" property, which controls
the masked-in alpha value in case there's no aux buffer.  Set it to
0 by default, so that gimp:mask-components behaves normally in the
absence of an aux buffer (as if the aux buffer was empty).  Set it
to 1 in the image's visible-mask node, to maintain the current
alpha-component visibility behavior.

This fixes incorrect results when the output bounding box of a
drawable filter is smaller than the drawable, which can lead to a
NULL aux buffer being fed to the filter's gimp:mask-components
node.
2019-05-31 13:11:14 -04:00
Ell 3766af9ac9 Revert "app: avoid NULL output in layer-mode ops"
On a second thought... nope :)  We'll fix it another way.

This reverts commit 60947b7a34826657395ca485d334ccb302106e07.
2019-05-31 13:11:13 -04:00
Ell 8fcac3298c app: avoid NULL output in layer-mode ops
In GimpOperationLayerMode and GimpOperationReplace, make sure we
don't return a NULL output buffer, or forward a NULL input buffer,
but rather create an appropriate empty buffer in this case.  This
avoids wrong results when the layer-mode op's output is connected
to the aux input of a subsequent op, as a result of the op behaving
differently with a NULL aux buffer (in particular, this can happen
when a drawable filter's output bounding box is smaller than the
drawable.)
2019-05-31 12:25:32 -04:00
Michael Natterer a26ade92a0 app: use GTK_RESPONSE_CLOSE in image-properties-dialog
so the dialog header bar omits the second close button.
2019-05-31 17:44:03 +02:00
Michael Natterer 792264ba6a app: add gimp_suggest_trc_for_component_type()
and use it in GimpTemplateEditor and convert-precision-dialog, instead
of duplicating the logic.
2019-05-31 17:28:20 +02:00
Michael Natterer 317b09c90f app: rename gimp_rec_rm() to gimp_file_delete_recursive()
and move it to the right place in gimp-utils.[ch].
2019-05-31 17:11:50 +02:00
Michael Natterer eec1df23a5 app: clean up most "non-linear" vs. "perceptual" confusion
There should never be an image using GIMP_TRC_PERCEPTUAL, but things
should work if one is encountered anyway.

In the Image -> Precision menu and the Convert Precision dialog, have
menu items / radio buttons for both non-linear and perceptual, but
hide the perceptual choice unless the image is in perceptual TRC mode.

This should eliminate the possibility to create perceptual TRC images
from the GUI.
2019-05-31 16:48:19 +02:00
Michael Natterer 3cad4aa4c2 Issue #3057 - Retain last user-chosen ICC profile information...
...when generating "TRC variants"

When creating a new profile with different TRC from an existing
profile, keep all the original profile's description, model,
manufacturer and copyright strings around, but prefix them with "GIMP
from " or similar to indicate that they are different. Also make sure
we don't prefix strings with GIMP stuff multiple times when profiles
are generated repeatedly.
2019-05-31 15:44:07 +02:00
Michael Natterer add4500a16 app: don't generate profiles from built-in profiles
gimp_image_convert_precision(): if the conversion changes the TRC and
the image's profile is a built-in profile, don't create a profile from
it but instead simply use the new TRC's built-in profile.
2019-05-30 18:42:56 +02:00
Michael Natterer 710cfc1f47 app: fix undoing image parasite attach/detach to emit the right signals
Add "gboolean push_undo" parameters to gimp_image_parasite_attach()
and _detach() and use the API also from undo, instead of implementing
attaching/removing manually and forgetting about the signals.

Fixes updating of the image properties color profile page.
2019-05-30 16:51:29 +02:00
Michael Natterer 07ffef38c3 app: make sure builtin profiles *really* don't get attached to images
gimp_image_parasite_attach(): when we detected that a builtin profile
is about to be attached, actually bail out after removing the old
profile, instead of continuing to attaching the builtin profile
anyway. Gah...
2019-05-30 16:07:57 +02:00
Michael Natterer 8251406b40 app: add the dialog buttons after creating the GimpColorDialog instance
so the "use-header-bar" property is set when the buttons are added,
fixes the order of the "OK" and "Reset" buttons.
2019-05-30 11:48:10 +02:00
Michael Natterer e7307194cf app: use the DEFAULT_USE_PATTERN define instead of TRUE in GimpPreset 2019-05-30 11:47:16 +02:00
Michael Natterer f946a5268d libgimp: use the dialog header bar in GimpProcBrowserDialog 2019-05-30 11:46:12 +02:00
Ell 8ef461bb70 app: s/gimp_list_compare()/gimp_g_list_compare()/
... so we don't clash with the GimpList namespace.
2019-05-30 03:31:46 -04:00
Ell 08ebcce2fa app: fix memory leak in previous commit 2019-05-30 02:43:45 -04:00
Ell 1e95481feb app: allow moving an intersecting pair of guides with the Move tool
This commit adds support for moving together an intersecting pair
of guides using the Move tool, by dragging the guides at their
point of intersection.  This is useful when the guides are used to
mark a point, rather than a pair of lines (e.g., as is the case for
the mandala symmetry guides, which mark the symmetry's point of
origin).

Add gimp_image_pick_guides(), which can return a set of guides,
rather than a single guide.  The API allows an arbitrary set of
guides to be returned, but, in practice, at most two intersecting
guides are returned, as per the above.

In GimpMoveTool and GimpGuideTool, add support for moving multiple
guides together, and, in GimpMoveTool, use gimp_image_pick_guides()
to potentially pick multiple guides.
2019-05-30 01:51:06 -04:00
Ell c4ce70a2d3 app: add gimp_list_compare()
... which lexicographically (shallowly) compares a pair of GLists.
2019-05-30 01:51:06 -04:00
Sabri Ünal b1c113c444 Issue #3119 - Two tooltips were marked as translatable 2019-05-29 22:39:37 +00:00
Sabri Ünal df8bad7a44 Issue #3105 - "Maximum Image Size" changed to "Maximum new image size"
Because of the real sentence is "Maximum new image size", this patch
was necessary.

(cherry picked from commit fb03526f92)
2019-05-30 00:25:37 +02:00
Michael Natterer 476cf19747 Issue #2986 - Input controller configuration window is too small by default
Set a minimum size on the event list's scrolled window.
2019-05-29 23:35:13 +02:00
Michael Natterer 04b69e2494 Issue #263 - Add a "Save Keyboard Shortcuts Now" button...
...to the Configure Keyboard Shortcuts dialog

Add the button, based on an old patch from Sven Neumann, and make the
buttons in the keyboard shortcuts and input devices dialogs look and
behave the same.
2019-05-29 16:12:21 +02:00
Ell a6393e6c55 app: add support for offset buffers in gimp_gegl_apply_[cached_]operation()
In gimp_gegl_apply_[cached_]operation(), add support for output
buffers whose extent's top-left corner is not (0, 0).  This is
needed by the previous commit.
2019-05-29 05:38:58 -04:00
Ell a701032b4e app: fix symmetry transform in Clone/Heal tools when brush is cropped
In GimpSourceCore, when applying a symmetry transform to the source
content, combine the transform op with translation to the paint-
buffer coordinates, so that subclasses (namely, GimpClone and
GimpHeal) can use the op to apply the transformation directly from
the source buffer to the paint buffer in a single step.  This is
both more efficient, and avoids incorrect symmetry transforms when
the paint buffer is cropped to the bounds of the drawable.
2019-05-29 05:26:43 -04:00
Ell 60a3965020 app: implement gimp_symmetry_get_operation() in terms of gimp_symmetry_get_matrix()
Remove the GimpSymmetry::get_operation() virtual function, and
instead implement gimp_symmetry_get_operation() by returning an
appropriate gegl:transform node based on the matrix returned by
gimp_symmetry_get_matrix().  The returned node is owned by the
caller; since we no longer use the node's identity for caching
trnasformed brushes, we no longer cache the transformation nodes.

Remove the function's paint_width and paint_height parameters, and
instead return a transformation that should be applied at the
center of the brush.  This simplifies the application of the
transformation in the Clone and Heal tools, as per the next commit.

Remove the implementation of GimpSymmetry::get_operation() from all
its subclasses, which should now only implement
GimpSymmetry::get_transform().
2019-05-29 05:26:42 -04:00
Ell 3895dc07a9 app: add gimp_gegl_create_transform_node()
... which takes a GimpMatrix3, and returns a corresponding
gegl:transform node.
2019-05-29 05:26:42 -04:00
Ell 117734f45f app: use gimp_symmetry_get_matrix() in GimpInk
... instead of calculating the matrix manually.
2019-05-29 05:26:41 -04:00
Ell cd7bcd081b app: add gimp_symmetry_get_matrix()
... which returns the brush transform corresponding to a given
GimpSymmetry stroke as a GimpMatrix3, as per
gimp_symmetry_get_transform().
2019-05-29 05:26:40 -04:00
Ell 86f4d4d41d app: don't add fg color to history in GimpEraser
Add GimpPaintbrush::get_color_history_color() virtual function,
which should return the color to be added to the color history upon
painting, if any.  The default implementation returns the
foreground color, when not using a pixmap brush or color-from-
gradient.

Override this function in GimpEraser, to return the background
color when the affected drawable has no alpha channel, instead of
overriding GimpPaintCore::paint() for this purpose.  This avoids
erroneously adding both the background and foreground colors to the
history.
2019-05-29 05:26:40 -04:00
Michael Natterer 890b554230 libgimpcolor: better error messages in GimpColorProfile and GimpColorTransform 2019-05-28 17:37:08 +02:00
Michael Natterer 0be3fce4fb Issue #3132 - Missing accelerator on "Export Image as JPEG" dialog
Change toggle button label to "Save color _profile".
2019-05-28 15:05:05 +02:00
Michael Natterer 679fd5f231 Issue #2794 - Gimp crash just on File Open and Edit Preferences
As suggested by LRN, change gimp_sigfatal_handler() on Windows to
dstinguish between fatal and non-fatal exceptions so we don't abort on
each minor hickup.
2019-05-28 11:55:59 +02:00
Michael Natterer 4ac4820a54 libgimpcolor: space invade gimp_color_profile_get_lcms_format()
The function was still returning formats without space, and was
lacking support for perceptual '~' models.
2019-05-28 00:35:03 +02:00
Michael Natterer 0710051e2b app, plug-ins: make sure a GIH brush's spacing is preserved
across load and save, by introducing a gimp-brush-pipe-spacing
parasite.
2019-05-28 00:25:47 +02:00
Piotr Drąg 01dd1c62ab Update Polish translation 2019-05-27 18:19:18 +02:00
Michael Natterer 901350ba20 app: use g_clear_pointer() in more places 2019-05-27 17:47:55 +02:00
Jehan 9fa49af470 app: display the screenshot in the extension details GUI.
Further improvements should load screenshots in a thread, especially
since we are loading from a URL taken from metadata, so it makes the GUI
non-responsive for a bit too long. But this is a first working version
for now.
2019-05-27 17:31:18 +02:00
Jehan cc7af306b6 app: new gimp_extension_get_screenshot() screenshot.
This first version of this API only returns the default screenshot.
Further improvements should allow to return all the available extension
screenshots.
2019-05-27 17:31:18 +02:00
Jehan f67ac0f0ca app: improve extension list widget.
Use GtkGrid instead of GtkBox (docs says GtkBox will eventually go
away). Also remove this horrible frame in a frame (though GUI is still
not perfect yet). Finally fix the "extension" object data.
2019-05-27 17:31:18 +02:00
Jehan 400b564648 app: do not crash when an extension has no description tag. 2019-05-27 17:31:18 +02:00
Ell 024bc4cd3f Issue #886 - Artifacts symmetry painting with big brushes
In GimpClone and GimpHeal, use gimp_gegl_apply_operation(), instead
of gegl_node_process(), to apply the symmetry transform, which both
performs chunking and avoids aliasing problems.
2019-05-27 11:09:52 -04:00
Michael Natterer 1e07f00a95 Issue #3067 - "Make New from Visible" produces wrong results
Call gimp_projectable_structure_changed() when the image's profile
changes so the projection buffer gets reallocated.
2019-05-27 15:20:15 +02:00
Michael Natterer 765abcd316 Issue #3398 - colour map picker isn't positioned on the correct...
...-last positioned- monitor

Use gimp_dialog_factory_position_dialog() in GimpColormapEditor and
GimpPaletteEditor so the color dialogs appear where they were before.
2019-05-27 14:53:55 +02:00
Michael Natterer 97b1200b38 app: forgot to remove comment in color_area_color_clicked() 2019-05-27 14:53:14 +02:00
Michael Natterer ebb6b08e62 app: add gimp_dialog_factory_position_dialog()
which is the logic that used to be in color_area_color_clicked()
factored out to proper API. It makes sure that a dialog that was
visible before (and was only hidden not destroyed) appears at the same
point on the same monitor as before. See issue #1093.
2019-05-27 14:15:09 +02:00
Ell 39e1a6dfea app: fix Ink tool symmetry transform
... to take tilt into account.
2019-05-27 02:16:30 -04:00
Michael Natterer c1cba759f8 app: minor formatting fixes in gimpdrawable-bucket-fill.c 2019-05-27 00:29:41 +02:00
Ell aba4eef916 app: derive GimpEraser from GimpPaintbrush
In GimpPaintbrush, factor out the code responsible for determining
the current dab's paint parameters and content to a new
GimpPaintbrush::get_paint_params() virtual function.

Derive GimpEraser from GimpPaintbrush, instead of directly from
GimpBrushCore, implementing get_paint_params() appropriately.
This allows GimpEraser to reuse the paint-buffer content across
dabs, improving performance.
2019-05-26 14:47:44 -04:00
Ell 3b56bd7a9a app: add symmetry-transform support to the Ink tool
In GimpInk, apply the current symmetry transform, as per
gimp_symmetry_get_transform(), to rendered blobs.
2019-05-26 14:45:40 -04:00
Ell b63af476bd app: use gimp_symmetry_get_transform() in paint code
Use gimp_symmetry_get_transform() instead of
gimp_symmetry_get_operation() throughout the paint code, where
possible.  This allows us to combine the symmetry transform with
the ordinary brush transform, simplifying the code, improving
performance, and avoiding multiple resamplings.  This also fixes
the paint-buffer size when using mandala symmetry with non-round
brushes, avoiding artifacts.
2019-05-26 14:45:39 -04:00