Commit Graph

19527 Commits

Author SHA1 Message Date
Michael Natterer 2a96d598c3 app: add internal and PDB API and UI to control a layer's composite mode
Largely based on a patch by Ell, with the enum type renamed and
various small changes. Adds another axis of configurability to the
existing layer mode madness, and is WIP too.
2017-02-02 00:38:25 +01:00
Michael Natterer a18dcb94eb configure.ac: require babl >= 0.1.24 2017-02-01 23:41:54 +01:00
Jehan 08e8c0e4f8 app, plug-ins: move the locale processing code in the core.
The colon-separated list used in the plugin originally comes from
gimp_help_get_locales() anyway. My previous code was using different
lists of locales in different places, which was inconsistent.
2017-02-01 03:10:13 +01:00
Ell d2f50e608d app: change composite mode of erase to SRC_ATOP 2017-01-31 18:22:46 -05:00
Ell c6a2a64604 app: add composite mode support to erase mode 2017-01-31 18:16:44 -05:00
Michael Natterer 1924212dcf app: remove "default:" from the switch in gimp_layer_mode_get_operation()
and list all modes explicitly; preparation for moving all of this info
to some table of structs.
2017-01-31 22:48:03 +01:00
Michael Natterer 10b67c5b3f app: remove GIMP_HELP_CONFIG_USE_GEGL help ID, no longer needed 2017-01-31 21:16:31 +01:00
Michael Natterer 45d1e0b4ea app: change the help IDs of posterize and desaturate
they are simple filter now, not tools.
2017-01-31 21:08:36 +01:00
Alexandre Prokoudine efb1c5e022 Fix indents to amend the previous commit 2017-01-31 22:45:09 +03:00
Alexandre Prokoudine d61a62af67 Enabled a whole bunch of help IDs for GEGL-based filters
Also, fixed a few copy/paste errors.
2017-01-31 22:35:50 +03:00
Michael Natterer 2dbf1b46b2 app: rename gimp_layer_mode_is_linear() to gimp_layer_mode_wants_linear_data() 2017-01-31 01:43:48 +01:00
Michael Natterer 8771361cb9 app: move arrays of magic GimpLayerMode knowledge to gimp-layer-modes.c
and provide API to access them.
2017-01-31 01:33:11 +01:00
Michael Natterer 8a95a512e5 app: move the vivid-, pin- and linear-light modes around in the UI 2017-01-30 22:07:51 +01:00
Michael Natterer d348220997 app: remove the HSV modes from the default layer mode group 2017-01-30 22:07:51 +01:00
Michael Natterer 9397aff96f app: add GIMP_LAYER_MODE_LUMA_DARKEN_ONLY and _LUMA_DARKEN_ONLY
which are perceptual versions of the new LUMINANCE_DARKEN_ONLY and
LUMINANCE_LIGHTEN_ONLY modes. Add the new modes to the UI.
2017-01-30 22:07:51 +01:00
Michael Natterer 5170980309 app: add a tooltip to the layer mode group combo 2017-01-30 14:02:35 +01:00
Michael Natterer c58d471af7 app: remove gimp_paint_mode_menu_new() and use GimpLayerModeBox
I know this looks absolutely horrible, please spare me comments about
that. This commit has the purpose to let everybody experiment with the
new modes, and suggest improvements of the GimpLayerModeBox widget; we
need *some* way of controlling the new layer mode madness.
2017-01-30 13:24:35 +01:00
Michael Natterer 6e522d735f app: add gimp_layer_mode_box_set_label() and set_ellipsize()
so it can be configured like the old paint mode menu.
2017-01-30 13:21:41 +01:00
Michael Natterer 3d79f382ba app: properly notify on group changes in GimpLayerModeComboBox 2017-01-30 13:20:57 +01:00
Michael Natterer 3fa931eb68 app: add icons to the group selector in GimpLayerModeBox
still completely horrible.
2017-01-30 12:20:29 +01:00
Øyvind Kolås e9a6d93197 app: add darken only, lighten only that uses luminance
These variations on darken only and lighten only have the advantage over the
componentvise versions that they always use the full triplet of either original
or new layer - meaning no new colors/hues will be introduced. This is similar
to how these modes operated/operates in picture publisher and photo-paint.
2017-01-29 22:27:28 +01:00
Michael Natterer a622f98ebf app: add new widget GimpLayerModeBox
which is a hbox with a GimpLayerModeComboBox and another combo box to
control the mode combo's group. Absolutely horrible WIP and not used
yet.
2017-01-29 21:54:52 +01:00
Thomas Manni 0d4dd11e2a Bug 777880 - better handling of sensitivity functions for channel combobox on threshold, levels and curves tools
- set the filter_tool->drawable before showing the tool gui.
- set the sensitivity functions for channel combobox of threshold,
  levels and curves tools dialogs only once during dialog creations.
- use the filter_tool->drawable inside the sensitivity functions
2017-01-29 14:07:06 +01:00
Michael Natterer 8d744bc6c6 app, libgimp: found two more hidden GIMP_LAYER_MODE_NORMAL_NON_LINEAR 2017-01-28 22:48:36 +01:00
Michael Natterer 5389e8e417 app, libgimp: rename GIMP_LAYER_MODE_NORMAL to NORMAL_LINEAR
and NORMAL_NON_LINEAR to NORMAL, so it's consistent with all other
modes.
2017-01-28 21:38:52 +01:00
Michael Natterer cdfbc74297 app: add new widget GimpLayerModeComboBox, still unused 2017-01-28 18:25:45 +01:00
Michael Natterer 312e3ba4d2 app: add gimp_layer_mode_get_for_group()
which allows to find the "same" layer mode in another group.
2017-01-28 18:24:40 +01:00
Michael Natterer db98dc5eaa app: never propagate indexed images to floating point 2017-01-26 17:16:16 +01:00
Michael Natterer a6545cc363 app: add enum value GIMP_LAYER_MODE_GROUP_DEFAULT
and change the labels of the NORMAL and NORMAL_NON_LINEAR modes.
2017-01-26 17:15:27 +01:00
Alexandre Prokoudine 0aa7f8f430 Fix a user-visible typo 2017-01-26 02:22:37 +03:00
Michael Natterer 3e3cdbae41 app: blacklist gegl:matting-levin in the GEGL tool 2017-01-25 22:32:11 +01:00
Michael Natterer 31241a984e app, libgimp: remove GIMP_LAYER_MODE_DARKEN,LIGHTEN_ONLY_LINEAR
There is no _LINEAR variant, the modes always do the same.
2017-01-25 22:08:06 +01:00
Øyvind Kolås 09af8dbca5 app: slight optimization of sse2 for src_atop 2017-01-25 21:14:14 +01:00
Øyvind Kolås e1c1a5a9a8 app: implement SSE2 acceleration of src_atop 2017-01-25 12:54:20 +01:00
Michael Natterer 0fcf4ca59d app: remove gimpblendcomposite.h from Makefile.am, it's gone 2017-01-24 23:54:56 +01:00
Michael Natterer ebd3ab1b26 A more hackish way to use GimpLayerMode instead of GimpLayerModeEffects
C++ won't allow us to use GimpLayerMode in the API where we used to
have GimpLayerModeEffects.

Move GimpLayerModeEffects to libgimpbase/gimpcompatenums.h so it's
not in the API any longer, and instead typedef and define stuff in
libgimp/gimptypes.h, and adapt the compat enum registering code
accordingly.
2017-01-24 23:28:34 +01:00
Alexandre Prokoudine 17a805bd32 Add missing mnemonics for Keep/Convert buttons 2017-01-24 22:11:46 +03:00
Øyvind Kolås 579676cfe4 app: fix grain_extract behavior
The blending function of grain merge was being used instead of grain extract.
2017-01-24 19:19:19 +01:00
Øyvind Kolås 6a1d49bc6d app: fix legacy divide blend mode
The porting from 8bit per component scaled some 8bit fractions up to huge
floating point numbers, this works for most values but causes trouble for near
transparent pixel values. This commit copies the inner blend loop from the new
divide layer mode, but keeps the old compositing logic.
2017-01-24 18:36:08 +01:00
Ell 9128f3fc87 app: skip color calculation in the blend funcs if either dest or src ...
... is fully transparent, instead of just src.

The blend func results only affect the intersection of dest and src.
Run time is currently dominated by the compositing step for most modes,
so the difference in performance is pretty negligible, but it does make
a difference for the more expensive modes, like the HSV ones.
2017-01-24 11:27:40 -05:00
Michael Natterer 5dbf9cd4f4 app: add new enum GimpLayerModeGroup { LINEAR, PERCEPTUAL, LEGACY }
and a new function gimp_layer_mode_get_group() which will be used for
the soon-to-appear GimpLayerModeComboBox.
2017-01-24 17:12:52 +01:00
Øyvind Kolås 59471adfee app: remove default from gimp_layer_mode_get_blend_fun switch
This makes gcc warn when new cases have been added to the layer mode enum,
better than silently failing at runtime.
2017-01-24 02:53:39 +01:00
Øyvind Kolås b88d74da24 app: make darken only and lighten only work in linear
Gamma doesn't change sort order of floats.
2017-01-24 02:52:25 +01:00
Øyvind Kolås 019d7cbf74 app: update autogenerated core-enums.c 2017-01-24 00:56:21 +01:00
Øyvind Kolås 09af91763c app: fix label of LINEAR_BURN blend mode 2017-01-24 00:44:13 +01:00
Jehan f44fb1ece4 app: more gimp_unit_get_scaled_digits() usage.
The print size displayed in image property and title format should use
gimp_unit_get_scaled_digits() instead of gimp_unit_get_digits() and
adding 1, which is quite random or magic number-y.
2017-01-24 00:28:33 +01:00
Øyvind Kolås d836d94114 app: implement non-legacy blend modes in GimpOperationLayerMode
For operations needing to override default behavior sub-classes should still be
used.

This commit also enables pinligh, vividlight and linearlight blend mode modes
2017-01-23 23:47:56 +01:00
Øyvind Kolås 5978def585 app: improve vivid-light formula 2017-01-23 22:40:10 +01:00
Jehan 2762662ca9 app: use gimp_unit_get_accurate_digits() in a few places. 2017-01-23 20:59:28 +01:00
Øyvind Kolås 774687dcfe app: improve formulas of softlight and linear light blending modes 2017-01-23 19:03:44 +01:00
Øyvind Kolås 4a3fbb8f35 app: fix OVERLAY mode so it gets fed linear data 2017-01-23 18:09:20 +01:00
Michael Natterer 40395b83a4 app: require gegl:wavelet-blur and blackist it in the GEGL tool 2017-01-23 02:33:59 +01:00
Michael Natterer dba909a9fa Bug 776370 - Changing active layer breaks the GEGL operation dialog
We can't just switch to a GimpOperationTool by using the normal
gimp_context_set_tool() or gimp_context_tool_changed() because it
needs additional initialization like setting an operation at all.

In gimp_gegl_procedure_execute_async(), g_object_set_data() the used
procedure on the newly created tool.

In gimp_display_shell_initialize_tool(), when we re-create the active
tool because of a drawable change, check for the procedure and invoke
it again, instead of simply creating an empty operation tool by
calling gimp_context_tool_changed().
2017-01-23 00:05:18 +01:00
Michael Natterer 58e7aff1a4 app: order property code consistently in gimpcoreconfig.c 2017-01-22 22:47:51 +01:00
Michael Natterer 27519fc798 Bug 734657 - Import as 32-bit floating-point linear by default
Optionally convert all imported (not XCFs) images to 32 bit linear
floating point, and optionally add a little noise in order to
distribute the colors minimally. The new options are on a new "Image
Import & Export" prefs page that needs a new icon. Original dithering
patch by pippin.
2017-01-22 22:06:30 +01:00
Øyvind Kolås 83374f490a app: make replace mode request linear data 2017-01-22 18:47:34 +01:00
Michael Natterer d3b8a0d007 app: s/trc/space/ in the property names too 2017-01-22 17:14:44 +01:00
Øyvind Kolås 2537d3d0e9 app: refer to (color) space instead of trc for blend/composite
Since CIE Lab is one of the supported color spaces for doing the blending -
this enum is not only about transfer functions/curves or gamma. This finishes
already started cleanups.
2017-01-22 16:04:50 +01:00
Michael Natterer b10fc58802 app: add a "layer-mode" property to GimpOperationLayerMode 2017-01-22 14:41:21 +01:00
Michael Natterer d293a00995 app, menus: add gegl:edge-neon to Filters -> Edge Detect 2017-01-22 14:35:35 +01:00
Øyvind Kolås c9ad09df61 app: add a handful more blending innerloops
Adding linear burn, vivid light, linear light, pinlight and exclusion formulas
as described on
http://www.deepskycolors.com/archivo/2010/04/21/formulas-for-Photoshop-blending-modes.html
2017-01-22 13:41:49 +01:00
Michael Natterer 7079d5f730 app: add a huge switch() to gimp_layer_mode_get_composite_mode()
It's going to be used to the UI too and should return something
to display, even if immutable.
2017-01-21 22:31:09 +01:00
Øyvind Kolås da10525073 app: change default composite mode for new modes to src-atop 2017-01-21 22:12:23 +01:00
Michael Natterer c152fa8651 app: fix the blend space of the legacy modes to be perceptual 2017-01-21 22:03:40 +01:00
Michael Natterer 05f3d38acb app: rename GimpOperationPointLayerMode to GimpOperationLayerMode
and formatting cleanup.
2017-01-21 21:35:52 +01:00
Ell 0c35baecca app: in gimp_composite_blend(), more alloca avoiding 2017-01-21 09:06:08 -05:00
Øyvind Kolås c993adf91e app: remove a trampoline in layer/paint mode dispatch
Fully removes one trampoline level and passing fewer args through the remaining
trampoline.
2017-01-21 14:10:03 +01:00
Ell fb3b99553c app: in gimp_composite_blend(), avoid another alloca when doing in-place output 2017-01-21 07:18:47 -05:00
Ell 4d985d11df app: in gimp_composite_blend(), avoid an alloca when doing in-place output 2017-01-21 06:36:03 -05:00
Michael Natterer a1b844897c app: make GimpPaintOptions' "use-applicator" default to FALSE again 2017-01-21 00:29:41 +01:00
Michael Natterer 485094b9da app: fix painting with the new layer mode code
by creating temp buffers matching the format needed by the
GimpLayerMode's process_pixels() function.
2017-01-21 00:27:48 +01:00
Michael Natterer 2acd2fe74c app: do_layer_blend(): pass the right blend/composite parameters
based on the used GimpLayerMode.
2017-01-21 00:02:22 +01:00
Jehan 1835b2ae61 app: improve precision of paint tools' straight line distance...
... in status bar.
Follow-up of commits f836892 and d1c3c3d. With high resolutions, the
distance displayed in the status bar when shift-clicking in a paint tool
may lack digit precision and show the same value (in non-pixel unit) for
several consecutive pixels. Compute a more accurate precision than what
gimp_unit_get_digits() can provide in such cases.
2017-01-20 00:40:41 +01:00
Jehan d1c3c3deb0 app: improve Measure Tool digit precision.
When working with high resolution, you may have cases where measured
length won't be displayed with enough digits; i.e. several pixels length
would show up as 0. For instance at 4000 PPI, up to 7 pixels show up as
0 mm, then at 0.1 mm from the 8th pixel (actually reaching over 0.05 mm,
approximating as 0.1), then 0.2 at 24 pixels (actually: 0.152), and so
on. At such a resolution, 3 digits are needed for 'mm' instead of the
1 digit returned by gimp_unit_get_digits() so that we display reliable
lengths.
Therefore we need to compute ideal digit precision. Configured digits
for a given unit will now be used as a minimum value, but actually used
digits may be higher.
2017-01-20 00:40:27 +01:00
Jehan f836892314 Bug 763734 - better decimal places for physical units.
Compute the ideal decimal precision for cursor position and length
status so that you get the best precision on physical units depending
on the current resolution, yet avoiding over-precision (which can be
misleading). The unit's "digits" value is now used as a minimum
precision only.
2017-01-20 00:40:27 +01:00
Ell 5da89f0daf app: in gimp_composite_blend(), avoid overwriting input in some cases (again)
Revert commit f6436eee96, which was wrong,
and redo it the right way.
2017-01-19 16:16:44 -05:00
Øyvind Kolås 894d4c0c01 app: finish GimpLayerColorSpace rename 2017-01-19 19:33:17 +00:00
Øyvind Kolås e9d72ef2a8 app: finish GimpLayerColorSpace rename 2017-01-19 19:22:40 +00:00
Øyvind Kolås 386e18e510 app: rename GimpLayerBlendTRC to GimpLayerColorSpace
It is used both for blending and compositing, the repeated use of the word
BLEND in code made the logic involving both blending and compositing hard to
read.
2017-01-19 19:17:24 +00:00
Ell f6436eee96 app: in gimp_composite_blend(), avoid overwriting input in some cases
Note that in some cases the alloca may be unnecessary, but this keeps
the code clean, and we have to be able to *potentially* do the alloca
anyway, so what the hell.
2017-01-19 13:51:48 -05:00
Michael Natterer a5ee5f28f9 app: cast ops using (gpointer) everywhere instead of 3 different ways 2017-01-19 19:04:49 +01:00
Michael Natterer 268e35a996 app: remove prepare() impls from erase and anti-erase
the calling code makes sure the ops have the right linear formats.
2017-01-19 18:49:22 +01:00
Michael Natterer 349cff8c16 app: remove "gboolean linear" from gimp_get_layer_mode_function()
and get rid of the two process_pixels() functions in the LCH modes,
they always take linear now.
2017-01-19 18:43:31 +01:00
Ell 417d9553b5 app: in gimpblendcomposite.h, small fix in compfun_dst_atop() 2017-01-19 12:03:39 -05:00
Ell 7df1bb4c0e app: in gimp_blend_composite(), fix dst_atop and avoid some conversions
Also s/comp_alpha/layer_alpha/ for consistency.
2017-01-19 11:55:21 -05:00
Michael Natterer d656fbab86 app: coding style cleanup in all layer modes, fiddle with includes a bit 2017-01-19 17:48:45 +01:00
Øyvind Kolås 80c947f04f app: add missing breaks in switches of gimpblendcomposite 2017-01-19 14:25:04 +00:00
Michael Natterer 4e9ce952d9 app: indentation in operations-types.h 2017-01-19 14:47:48 +01:00
Michael Natterer 4683b986f3 app: use the GimpBlendFunc typedef in gimpblendcomposite.h 2017-01-19 14:46:29 +01:00
Øyvind Kolås f645665324 app: unconditionally set alpha in hardlight/softlight/overlay 2017-01-19 14:44:39 +01:00
Michael Natterer bfdea93a9c app: indentation and formatting cleanup in gimpblendcomposite.h
Also remove all includes, they should already be there when this
header gets included.
2017-01-19 14:31:40 +01:00
Øyvind Kolås 72cbda11ae app: composite_blend, fix src_over 2017-01-19 04:57:14 +01:00
Øyvind Kolås 41fff6990e app: make layer modes more configurable
Implement a common utility function gimp_blend_composite that uses utility
functions for implementing layer modes, with separate (possibly SIMD) optimized
loops for blending and compositing, with configured linear TRC, perceptual
gamma TRC or even using CIE Lab as the space.
2017-01-19 01:04:15 +01:00
Michael Natterer 1262370544 app: remove "gboolean linear" parameters
from gimp_applicator_new() and gimp_gegl_mode_node_set_mode().
Compositing doesn't depend on the layer format any longer, only on the
layer mode. Painting with "use applicator" unchecked is still broken
in some cases and needs more fixing.
2017-01-18 00:15:55 +01:00
Michael Natterer b809613be0 app: implement gimp_layer_mode_get_blend_trc() 2017-01-17 17:41:05 +01:00
Øyvind Kolås 0bcb3068fe app: fix typo s/GIMP_LAYER_COMPOSITE_OVER/GIMP_LAYER_COMPOSITE_SRC_OVER/ 2017-01-17 15:23:36 +01:00
Michael Natterer 6e72d3eddf app: add blend-trc and composite-mode properties to GimpOperationPointLayerMode
and set them to unused default values.
2017-01-17 15:09:17 +01:00
Michael Natterer dd3eec6198 app: change linking order of the sub-libs of app/operations
so layer-modes/ can use the enums in enums-types.h without failing to
link.
2017-01-17 14:28:40 +01:00
Michael Natterer 5c4eb75361 app: register the enums in operations-enums.h as GTypes
and rename them to GimpLayerBlendTRC and GimpLayerCompositeMode.
2017-01-17 01:19:06 +01:00
Michael Natterer e267d87963 app: add operations-enums.h with two soon-needed enums 2017-01-16 23:07:50 +01:00
Michael Natterer 69c4644e15 app: rename GimpLayerModeFunction to GimpLayerModeFunc
like all other function typedefs and add GimpBlendFunc typedef which
will be needed soon. Also rename get_layer_mode_function() to
gimp_get_layer_mode_function().
2017-01-16 22:44:01 +01:00
Øyvind Kolås e1b7eb7245 app: divide blend mode, limit high values to 5.0
Possibly counteracting inaccuracies in used babl conversions, but with this the
result match legacy as expected.
2017-01-16 02:36:11 +01:00
Michael Natterer 8928bcd088 Bug 777017 - creating an empty layer group inside an existing...
...layer group cause a bug in the existing layer size

Change gimp_group_layer_get_size() to return FALSE if there are no
children (there is no content).

In gimp_group_layer_update_size(), skip children where get_size()
returns FALSE. Fixes bogus size calculation.
2017-01-15 21:01:03 +01:00
Michael Natterer 87e5d10ddb app: make tests build again 2017-01-15 18:52:43 +01:00
Michael Natterer 5eb0fa816a app, libgimp: add LINEAR variants of more layer modes
for completeness/consistency, even if they don't make much sense for
prectical use.
2017-01-15 16:02:10 +01:00
Michael Natterer a24e232522 app: move functions on enum GimpLayerMode to new files gimp-layer-modes.[ch] 2017-01-15 15:25:03 +01:00
Øyvind Kolås 60847cce73 app: remove odd ratio scaling, replace with range check for nan 2017-01-15 01:33:40 +01:00
Øyvind Kolås 315ccc7f82 app: remove clamping in multiply mode 2017-01-15 01:33:40 +01:00
Michael Natterer 50669fe6d4 app, libgimp: rename BEHIND enum values to be consistent with others
Also update gimplayermodefunctions.c which I forgot before.
2017-01-15 00:01:09 +01:00
Michael Natterer 6bf9e47ba8 app, libgimp: add linear variants of most layer modes
and reorder gimp_gegl_mode_node_set_mode() and friends.
2017-01-14 22:56:54 +01:00
Michael Natterer 5951d39938 app, libgimp: reorder enum GimpLayerMode
so LEGACY and new modes have the same order, if possible.
2017-01-14 21:52:54 +01:00
Øyvind Kolås f01374798e app: remove clamps from addition, subtract and grain blend modes 2017-01-14 21:06:06 +01:00
Øyvind Kolås 39adf3627d app: use hypotf in lhc chroma blend mode 2017-01-14 21:03:29 +01:00
Michael Natterer bd66794e2c app: avoid the second gegl_node_set() in gimp_gegl_mode_node_set_mode() 2017-01-14 18:35:56 +01:00
Øyvind Kolås f8c65367f0 app: cache fishes in lch blend modes 2017-01-13 19:21:01 +00:00
Øyvind Kolås 975a0a6943 app: reuse more code 2017-01-13 19:21:01 +00:00
Øyvind Kolås be8c2015a0 app: move factored out compositing to common header 2017-01-13 19:21:01 +00:00
Øyvind Kolås acd20fb55b app: use cached fishes in lch chroma mode 2017-01-13 19:21:00 +00:00
Øyvind Kolås 7959141eb4 app: make compositing of hsv value blend mode consistent 2017-01-13 14:26:36 +01:00
Øyvind Kolås 75173b97d9 app: make compositing of grain extract blend mode consistent 2017-01-13 14:26:05 +01:00
Øyvind Kolås 954030fab6 app: make compositing of dodge blend mode consistent with rest 2017-01-13 14:25:46 +01:00
Øyvind Kolås 13eab78ecc app: improve and simplify alpha handling of LCH blending modes 2017-01-13 14:15:35 +01:00
Øyvind Kolås feb2bb4083 app: lch color modes remove unneeded includes 2017-01-13 13:53:08 +01:00
Øyvind Kolås 0b1f684e8f app: remove unneded variable named tmp 2017-01-13 13:38:12 +01:00
Øyvind Kolås 24b04c0b40 app: use single precision hypotf and constants for performance 2017-01-13 13:17:25 +01:00
Michael Natterer 68cc8bb86f app: make using gimp_drawable_update() less verbose
Allow passing -1 for the drawable's width/height, instead of requiring
gimp_item_get_width,height() in many callers.
2017-01-13 02:14:40 +01:00
Øyvind Kolås 0bc45c8cd0 app: default to use gegl applicator in paint tools
Temporarily slower - but permits paint modes like overlay/softlight to work at
all for linear TRC pixel encodings. Should be reverted when the non-graph
approach works properly again.
2017-01-12 18:55:38 +01:00
Øyvind Kolås dc5b86f0eb app: add TRC variants to get_layer_mode_function() 2017-01-12 15:18:44 +01:00
Øyvind Kolås 4df1af2534 app: add linear variant of behind mode 2017-01-12 14:27:15 +01:00
Øyvind Kolås 377f4687b1 app: add gimp_gegl_mode_is_linear 2017-01-11 22:13:14 +01:00
Øyvind Kolås 5271027510 app: explictly code linear vs gamma for hardlight and softlight 2017-01-11 19:39:46 +01:00
Øyvind Kolås 36ebe03770 app: remove lingering old files of dead code 2017-01-11 15:18:52 +01:00
Øyvind Kolås f9aeff5670 app: fix a lingering old gimp:softlight-mode 2017-01-11 15:17:30 +01:00
Michael Natterer a187329777 app: sort includes in gimp-operations.c 2017-01-11 15:00:37 +01:00
Michael Natterer 77f9659c98 app: move gimplayermodefunctions.[ch] to layer-modes/ 2017-01-11 14:58:43 +01:00
Michael Natterer b959e0b69b app: move GimpOperationPointLayerMode to layer-modes/ 2017-01-11 14:44:10 +01:00
Ell e17f640fba app: eliminate unnecessary condition in GimpOperationReplaceMode
8-bit relic.
2017-01-11 08:21:02 -05:00
Michael Natterer ad134263d2 app: clean up Makefile.am in layer-modes/ and layer-modes-legacy/ 2017-01-11 13:00:27 +01:00
Michael Natterer 8b5553cef6 app: move the remaining 3 layer modes to layer-modes/
Not exactly sure if all are correct, but the file moving is almost
done now.
2017-01-11 12:55:13 +01:00
Michael Natterer b90fa4f0d3 app: clean up spaces in GimpOperationColorEraseMode 2017-01-11 12:42:27 +01:00
Michael Natterer 01b25baffd app: change mask handling in GimpOperationReplaceMode
to be like in the other modes, and proably speed it up a little.
2017-01-11 12:38:58 +01:00
Øyvind Kolås 7ed2857695 app: fix type s/legacyy/legacy/ 2017-01-11 05:34:55 +01:00
Øyvind Kolås f45fc97eba app: add missing op .h files 2017-01-11 04:54:36 +01:00
Øyvind Kolås ec1f7a94e3 app: split legacy out of grain extract and merge 2017-01-11 04:40:26 +01:00
Øyvind Kolås 8f3842434c app: split legacy out of soft and hard light 2017-01-11 04:10:06 +01:00
Øyvind Kolås 784a8ee224 app: split legacy out of burn and divide 2017-01-11 03:17:53 +01:00
Michael Natterer 0891028232 app: forgot to s/gimp:normal-mode/gimp:normal/g 2017-01-11 00:28:57 +01:00
Michael Natterer 9142bb1805 app: move erase and anti-erase to layer-modes/ 2017-01-11 00:23:31 +01:00
Øyvind Kolås 0fcc2cd772 app: also fix multiply enum/name mapping 2017-01-11 00:12:45 +01:00
Øyvind Kolås 2ce25045fe app: fix fix 2017-01-11 00:10:09 +01:00
Øyvind Kolås 33f6398e00 app: fix enum to name mapping for hsv legacy modes 2017-01-10 23:46:01 +01:00
Øyvind Kolås 56ba42a97c app: correct names of screen and difference layer ops 2017-01-10 21:48:03 +01:00
Øyvind Kolås 71030f49e9 app: duplicate hsv layer modes, and fix alpha handling 2017-01-10 21:48:03 +01:00
Øyvind Kolås c3e5e30450 app: split legacy lighten only and darken only ops 2017-01-10 11:18:52 +01:00
Michael Natterer 2ed8bd1fce app: use relative paths in tests/Makefile.am
Shorter and more readable.
2017-01-10 10:43:24 +01:00
Michael Natterer 99189d7a28 app: move dissolve to layer-modes/ 2017-01-10 09:06:16 +01:00
Øyvind Kolås 153796df9b app: fix names of addition and subtract ops 2017-01-10 02:29:34 +01:00
Øyvind Kolås dfcb5c11de app: add new files for subtract/addition ops 2017-01-10 01:42:34 +01:00
Øyvind Kolås 5a7fd54d34 app: split addition and subract in legacy and new 2017-01-10 01:40:14 +01:00
Michael Natterer 60e1d8e35f app: move the LCH layer modes to layer-modes/ 2017-01-10 01:04:49 +01:00
Øyvind Kolås 92047ea949 app: layer op fission cleanup 2017-01-10 00:00:31 +01:00
Michael Natterer b001626b31 app: move overlay to operations/layer-modes/ and call it GimpOperationOverlay 2017-01-09 23:54:51 +01:00
Øyvind Kolås b6be1b768e app: duplicate difference mode, new and legacy 2017-01-09 23:49:08 +01:00
Øyvind Kolås 9d5893f402 app: add the ops for screen blend ops 2017-01-09 23:25:59 +01:00
Øyvind Kolås 3a50cdcd4f app: split screen op in legacy and new 2017-01-09 23:19:29 +01:00
Michael Natterer 60dcb17874 app: fix layer mode in test-xcf.c 2017-01-09 22:18:05 +01:00
Michael Natterer fd070eeb25 app: start moving layer modes into their own build directories
New directories:

operations/layer-modes/
operations/layer-modes-legacy/
2017-01-09 21:58:18 +01:00
Øyvind Kolås 076621dd75 app: split dodge op in legacy and new 2017-01-09 20:10:17 +01:00
Øyvind Kolås c2583faa5a app: add new multiply op 2017-01-09 20:10:04 +01:00
Øyvind Kolås 735887286a app: do not let pixel encoding determine layer modes
See bug #757485 - woth noting that this also enables linear and thus correct
compositing when using 8bpc perceptual gamma as the layer storage format.
2017-01-09 20:09:50 +01:00
Michael Natterer 07600c6db6 libgimpbase: proper names for the GimpChannelType enum
Register the old value names as compat. Also add some forgotten
values and enums to gimpcompatenums.h
2017-01-09 19:40:30 +01:00
Michael Natterer 178794f6f1 libgimpbase: rename enum GimpHueRange's values
and add compat cruft for the old names.
2017-01-09 02:45:16 +01:00
Michael Natterer 152adbb1bd Rename GIMP_LAYER_MODE_FOO_BROKEN to GIMP_LAYER_MODE_FOO_LEGACY
"Broken" sounds like it needs fixing, but it's legacy compat stuff
that will have to stay for all eternity.
2017-01-09 01:27:20 +01:00
Michael Natterer 66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
Ell fc293f04d9 configure.ac: require gexiv2 >= 0.10.3
Commit f8e291b uses the `gexiv2_metadata_get_tag_raw()` function,
which was added in 0.10.3.
2017-01-06 18:24:30 -05:00
Øyvind Kolås 03185f8070 app: normalize some layer mode alpha/opacity handling
Make overlay, Lch color, Lch hue, Lch saturation and Lch lightness mode handle
alpha more like how normal does it. This is a change that we ideally might want
applied to other layer modes as well to get rid of MIN() calls.
2017-01-06 04:53:40 +01:00
Michael Natterer 22a95d63a1 app: fix error handling in gimp_tool_preset_deserialize_property()
when parsing of an object property fails, we need to set *expected to
G_TOKEN_NONE to tell the config parser that something has gone wrong,
or it will continue parsing and run into trouble with the inconsistent
state (it will try to set an error over the already set error, causing
a warning).
2017-01-06 03:15:39 +01:00
Hartmut Kuhse 66bc98d299 Revert "New GimpMetadata as subclass of GExiv2Metadata"
This reverts commit 3ab08c8bfd.
2017-01-03 19:36:22 +01:00
Hartmut Kuhse 3ab08c8bfd New GimpMetadata as subclass of GExiv2Metadata 2017-01-03 19:26:35 +01:00
Jehan 8111ad62da Bug 776417 - improve Sample Average and Sample Merged description.
The "accumulated" (color value) adjective does not look like the best
word in both descriptions. Respectively, the first is an averaged
value whereas the second would be a "merged" or "composited" value.
If native speakers have comments or better propositions, they are
welcome to speak up.
2017-01-03 04:21:42 +01:00
Michael Natterer 237d83dc7f Bug 773462 - Color Picker should support range...
...regardless of image color precision

Split enum value GIMP_COLOR_FRAME_MODE_RGB into RGB_PERCENT and RGB_U8,
which display the current % values, and values in a range of 0..255.
2017-01-03 01:20:30 +01:00
Øyvind Kolås e2bcf88089 XCF: use version >=9 if layer mode is one of the new LCH modes 2017-01-01 21:53:03 +01:00
Jehan c2665a2e43 app: tooltip of Color Picker's "Sample average" option mixed up.
This should be "Sample merge"'s tooltip.
2017-01-01 19:22:29 +01:00
Michael Natterer 3d986425b2 Bug 768058 - Color picker tool should be able to ignore snapping
Don't snap to anything when picking colors.
2017-01-01 17:59:26 +01:00
Michael Natterer adad7c651c Bug 167203 - color picker tools should always draw outline
Move the entire drawing control logic to gimp_color_tool_oper_update()
which gets invoked on hovering, and don't mess with it in
button_press() and button_release(). Tested to work with the color
picker, paint and filter tools.
2017-01-01 17:35:57 +01:00
Thomas Manni 4ac59f842f Bug 776648 - Spin buttons of histogram box do not take image precision into account
Adapt step and page increments of histogram box spin buttons adjustment according to
the number of histogram bins.
2016-12-31 16:15:08 +01:00
Øyvind Kolås 41674893b2 Bug 757686 - There is no easy way to do a radiometrically correct...
...invert operation

Add linear invert menu item, and improve invert tooltips.
2016-12-30 15:38:04 +01:00
Kristian Rietveld 7c35d75bf9 Bug 776294 - Screenshot buttons cannot be clicked
Disable the new "automatic window tabbing" feature introduced on macOS
Sierra. It breaks GTK+ applications and we would need proper support for
this in GTK+ if we want to use it.
2016-12-28 16:14:40 +01:00
Michael Natterer af02104365 app: s/gegl:color-reduction/gegl:dither/ in sanity.c and gimpgegltool.c 2016-12-26 18:55:08 +01:00
Michael Natterer 9d4fad1f18 Bug 776503 - brightness-contrast in split preview mode changes...
...parameters of the tool

Take GimpFilterTool's split preview guide into account when starting a
drag to change the tool's parameters.
2016-12-26 17:50:11 +01:00
Michael Natterer fc9da4c9a3 app: allow to toggle the histogram dialog between gamma and linear
Change GimpHistogram to take a "gboolean linear" parameter and always
honor that parameter, so both kinds of histograms can now be created
for all drawables.

Add a horrible "Linear" toggle to the histogram dockable which always
defaults to the active layer's actual pixel format, but can be
switched at any time. This UI is ugly and needs to change.

On the PDB, default to gamma-corrected if the plug-in is unaware of
higher precision, and to the drawable's native pixel format otherwise.

Other places using histograms (e.g. levels, curves) are unchanged.
2016-12-26 17:32:17 +01:00
Øyvind Kolås 5627ad589f app: use gegl:dither instead of gegl:reduction 2016-12-24 19:40:12 +01:00
Michael Natterer 75be560e2a app: make sure the blend tools doesn't stay around on removed drawables
Set gimp_tool_control_set_preserve() to TRUE and set an appropriate
dirty_mask, just like all tools which have a permanent on-canvas state
outside of a simple press-drag-release.
2016-12-24 18:40:25 +01:00
Jehan e31f8e1195 app: fix indentation. 2016-12-22 17:05:26 +01:00
Jehan 6217527828 app: fix typo s/depecrated/deprecated/. 2016-12-21 22:50:01 +01:00
Massimo Valentini 99050ecee6 Bug 769022 - Improve text along path when path is short.
Extend the text along the tangent of the last path stroke.
2016-12-21 22:35:17 +01:00
Jehan 3fa016fb4b app: clean out tab indentations. 2016-12-21 04:05:32 +01:00
Jehan 3b41d16086 app: cleaned out tabs. 2016-12-20 16:20:42 +01:00
Michael Natterer 31869cb255 app: hide double precision from the Image -> Precision menu
unless the image actually *is* in double precision (e.g. due
to being imported from a double precision file).
2016-12-12 11:53:22 +01:00
Michael Natterer 3710c0dd0c app: hide double precision from File -> New and from templates 2016-12-12 11:52:35 +01:00
Michael Natterer aaa9ae1ada Bug 698278 - Preferences|Reset ignores /etc/gimp/2.0/gimprc
Make gimp_rc_load() public as gimp_rc_load_system() and
gimp_rc_load_user() and call gimp_rc_load_system() from the
preferences dialog's reset code.
2016-12-11 20:19:42 +01:00
Michael Natterer 350c6ca1f7 Bug 775134 - mypaint-brush: Saved color in a brush isn't taken into account
gimp_mybrush_core_create_brushes(): don't set the current FG or BG on
the brush if its RESTORE_COLOR setting is 1.0 (TRUE).
2016-12-11 19:39:33 +01:00
Michael Natterer 619a885696 Bug 775391 - Collapse "Radius" widget when "Sample average" is unchecked
Use gimp_prop_expanding_frame_new() for the widgets.
2016-12-07 12:51:48 +01:00
Jehan afccaa9105 Bug 775646 - Levels Tool: handles difficult to read with dark theme.
The white, gray and dark sliders of GimpHandleBar have a black contour.
This makes the white and gray slider visible even with similar colored
background. On the other hand, the black slider is barely visible on a
dark background (and could even be made totally invisible using the same
color). So let's use a light-gray contour on the dark slider, making now
all sliders working with any background color.
2016-12-07 01:40:43 +01:00
Michael Natterer c3510405c4 app: make sure fg, bg, brush, pattern etc. changes don't write gimprc
gimp_dialog_config_fill,stroke_options_notify(): ignore notifications
on the fill and stroke option's parent class properties, they are not
serialized and completely irrelevent here.
2016-12-06 19:24:11 +01:00
Jehan f296988665 Bug 775396 - Delete Layer/Channel/Path should be consistently the last...
option in respective dialogs.
2016-12-04 19:25:00 +01:00
Alexia Death 43681a6d4c app: flush blur cache and other caches when invalid 2016-11-29 21:25:25 +02:00
Jehan 52ad5bb2a1 app: remove focusability of toolbox buttons.
Commit c83ee61 got overridded by commit b5cc2a9.
Reintroducing the changes.
2016-11-28 15:55:03 +01:00
Alexia Death 724b2a571f app: fix a bug introduced in blur cacheing 2016-11-27 15:39:27 +02:00
Alexia Death a4dee3e281 app: disable hardness blur for pipes, fix other pixmaps to blur only pixmap 2016-11-26 21:21:01 +02:00
Alexia Death 0c04275a32 app: cache bitmap brushes expensive hardness and disable dynamic change 2016-11-26 19:11:26 +02:00
Alexia Death 61475fba83 bug 771621 hardness blur cliping is avoided by shrinking the stamp first 2016-11-26 12:06:16 +02:00
Michael Natterer 2e63533602 app: add GimpDockContainer::get_dialog_factory()
and use it where possible instead of gimp_dialog_factory_get_singleton().
Also reduce using this function in some other places.
2016-11-25 13:26:08 +01:00
Thomas Manni ecc49ed9c6 iscissors: ensure first and last isegments are distinct before closing the curve 2016-11-25 07:44:49 +01:00
Jehan 4a9a0723f5 Revert "app: handle gtk_accel_map_change_entry () failure..."
This reverts commit eab4929a78.

Oups it would seem gtk_accel_map_change_entry() could return FALSE even
when the expected shortcut is correctly set (my guess is that it was
already the same shortcut, so indeed no "change" happened, though it is
not a failure either; yet I haven't checked if that is the actual
reason).
Let's just revert this. It's not always a good thing to be too thorough!
Sorry for this!
2016-11-25 06:14:04 +01:00
Jehan 84ee79c71d app: clean out many tabs under app/core/. 2016-11-25 05:51:03 +01:00
Jehan 31ae4238d2 app: do not allow Alt+[0-9] shortcuts.
These are used for display switching, and even though you could
remap these shortcuts, it would work only until you close an image,
open a new one, or reorder tabs in SWM, in which case your shortcut
would end up forcefully overrided, which is a bad user experience.
If we want to give more flexibility and allow one to map these
shortcuts, we must also make sure the display showing actions won't
override customized shortcuts. In the meantime, it is better to
simply forbid these in our preferences.
2016-11-25 05:41:23 +01:00
Jehan eab4929a78 app: handle gtk_accel_map_change_entry () failure...
... for "windows-display-*" actions.
I should not happen, but let's be thorough and properly handle failure
with a message since this is a runtime issue.
2016-11-25 05:16:35 +01:00
Jehan 2081de5a6c app: remove transient actions with gimp_action_group_remove_action().
gtk_action_group_remove_action() removes the action from the group while
not actually cleaning any accelerator. This is a problem for transient
actions which have only a meaning within the current session, such as
the display switching actions named with the display ID (unique within
the session only).
Current commit, combined with the previous one (commit c0ee959), fix
"windows-display-*" actions being saved inside menurc.
2016-11-25 04:50:09 +01:00
Jehan c0ee95995f app: save menurc after having deleted all the displays.
Some actions are not meant to be saved, in particular the
"windows-display-*" which have only a meaning during a same session
since display IDs are session-dependent. So let display deletion
happen first so that proper cleaning of action is done when writing
menurc.
2016-11-25 04:48:01 +01:00
Jehan 94a5b7c97a app: cleaning out tabs. 2016-11-25 01:42:47 +01:00
Michael Natterer 6131b00b54 Bug 774890 - "Keyboard shortcuts" dialog does not show all actions
Revert "app: action search should search accross all available actions."

This reverts commit 53b3673bd8.

Had to revert these two commits, quoting comment 6 of the bug:

Thinking again, that entire change is unfortunately wrong, the only
right UI manager is in fact

gimp_ui_managers_from_name ("<Image>")->data

because it's the global popup <Image> UI manager which is independent
of a display and it always in the right state for the currently
active image, all other UI managers are wrong.
2016-11-24 21:08:34 +01:00
Michael Natterer 1517a0952b Bug 774890 - "Keyboard shortcuts" dialog does not show all actions
Revert "app: do not show the actions from <Dockable> GimpUIManager."

This reverts commit b795ae2296.
2016-11-24 21:07:53 +01:00
Michael Natterer 5e71512ddf app: indentation in gimpdockable.h was horribly broken 2016-11-24 20:14:54 +01:00
Jehan 7a60fd0d7b app: better defaults for image dimension.
Current defaults are from another time. Acceptable defaults could be
common screen resolutions. 1366x768 is apparently the most common
(according to various stats on the web), but since we target advanced
graphics artists, let's go for 1920x1080, which is the second most
common resolution, also known as Full HD.
For unstable builds, let's have at least one odd number, uncommon ratio
and higher values, encouraging tests with less common numbers and bigger
images. I chose 2001x1984. Feel free to update to any other funky values
following these "unstable" rules.
2016-11-24 01:05:58 +01:00
Jehan 391908079a Bug 774906 - Replace File>New default ppi of 72...
... with something more suitable.
72 PPI is from a time where people thought this was a common screen
resolution. This is not the case nowadays, and anyway images targetted
for screen display should not bother with PPI resolution at all, only
with actual pixel dimensions.
PPI resolution is more useful for printing. And for this case, 300 is
quite an accepted OK value for most cases. So this is likely a better
default for GIMP.
2016-11-24 01:03:59 +01:00
Alexia Death cb27605482 app: hardness overrides identity matrix on brush transform 2016-11-23 22:30:37 +02:00
Michael Natterer a3c65e6d17 app: get rid of including menus/ stuff from widgets/ and other places
Add GimpMenuFactory can always be found in a GimpDialogManager, use
gimp_dialog_factory_get_menu_factory() where we have a dialog factory
instead of accessing "global_menu_factory" or redundantly passing a
menu factory around where we already pass around a dialog factory.
2016-11-23 19:38:44 +01:00
Jehan b795ae2296 app: do not show the actions from <Dockable> GimpUIManager.
<Dockable> has this whole list of actions named similarly to dialogs-*
actions, and we don't want these to take precedence, especially since
they would always create a new dock instead of just showing the existing
one if already present.
Also fix the redundancy check on already added actions.
2016-11-23 07:58:18 +01:00
Jehan 877b0244b5 app: minor indentation fix. 2016-11-23 07:01:41 +01:00
Jehan a68edf51c6 app: tab cleaning. 2016-11-23 06:04:19 +01:00
Jehan 53b3673bd8 app: action search should search accross all available actions.
It was only searching through the "<Image>" GimpUIManager, so several
action groups were ignored, for instance all palettes-* actions.
2016-11-23 04:01:30 +01:00
Jehan 754034146d app: plug-in-repeat and plug-in-reshow were renamed...
... in commit ac50da2a, respectively into filters-repeat and
filters-reshow.
2016-11-22 22:55:50 +01:00
Jehan f5c06a2d38 app: string which should be translated too.
There is no reasons not to translate the "occurs" text which will be
in the color names in palettes extracted from images. It indicates on
how many pixels a given extracted color was occuring. We should also
translate the full string (not just "occurs") since some language will
have to reorder words, and may even use different bracket characters.
So I also add a translator comment to make sure the translators get
what the %s and %d stand for in this string.
2016-11-22 22:42:27 +01:00
Jehan ced32ceabf app: some tab cleaning. 2016-11-22 22:22:59 +01:00
Michael Natterer 21ab694715 Bug 754171 - cmd - missing modifier key to configure input controllers
Forgot GimpControllerMouse when fixing this bug. Also apply
the cleanup from the commit below.
2016-11-22 19:46:24 +01:00
Michael Natterer fb1dcd0239 app: clean up gimp_controller_keyboard,wheel_scroll()
to not use two nested if()s, and always return the result of
gimp_controller_event() when an event matches.
2016-11-22 19:43:51 +01:00
Jehan 3e85121eb9 Bug 774733 - segmentation fault when discarding text information.
Always check pointer before dereferencing it, when it can be NULL.
2016-11-21 20:42:56 +01:00
Jehan 2a232398c4 app: check and clean out duplicate accelerators on startup.
Duplicate accelerators are not supposed to happen. It is not possible
to set them through the GUI in particular. Nevertheless
gtk_accel_map_load() would apparently let duplicates pass, which could
happen after editing the menurc directly, or using the development
version (no action name migration happens there), or simply after a
potential bug. This is then very annoying because you may see several
actions displaying the same shortcut but only one actually work. And
trying to re-set through GUI the shortcut to the one action you wish to
run does not fix the duplicate issue (you have to laboriously find which
other action use the same accelerator and delete it first).
Better be safe than sorry and make a quick check at startup, then delete
the accelerator on one of the duplicates (you can't guess which one was
actually wanted, but at least you will facilitate manual reset through
the GUI).
2016-11-21 17:06:16 +01:00
Jehan 0cccc20c0a app: delete duplicate accelerators.
Redundant accelerators were:
- <Primary><Shift>y on dialogs-mypaint-brushes and edit-strong-redo.
  Since the <Primary>z vs <Primary>y has quite a strong history for
  undo/redo actions, and dialogs-mypaint-brushes is quite new, let's
  unmap the latest.
- <shift>l on tools-seamless-clone and tools-unified-transform.
  Since the Seamless clone tool is still in the playground and we
  don't even know if it will make it out quite soon, let's give
  priority to the Unified Transform tool.
2016-11-21 15:59:20 +01:00
Jehan d22af8fb38 app: cleaning out some tabs. 2016-11-20 00:40:07 +01:00
Jehan 1ce279dbfe app: s/"Paste Buffer as _New"/"Paste Buffer as _New Image"/
To differentiate with "Paste Buffer as New _Layer".
2016-11-20 00:15:26 +01:00
Michael Natterer 571f5c86b3 Bug 689750 - Crash on shrinking a selection by an invalid value
Limit selection shrinking to MIN (sel_width, sel_height) / 2, larger
values make no sense.

Limit selection bordering to the same value and growing to
MAX (image_width, image_height).
2016-11-17 12:57:08 +01:00
Jehan a4ff65cbad app: replace gtk_hbox_new() by gtk_box_new().
This is a wrapper for the GTK+3 migration.
2016-11-17 00:46:29 +01:00
Michael Natterer 5129b8519b app: don't g_warning() on filenames that can't be turned into UTF-8
gimp_data_get_identifier(): use g_printerr() instead.
2016-11-16 15:30:44 +01:00
Michael Natterer 82a2754540 Bug 343090 - Most brushes and all patterns appear renameable but aren't
Introduce virtual function GimpViewable::is_name_editable() and class
member "gboolean name_editable" for the default value. Default to
FALSE and only return TRUE if the name can actually be edited by the
user.

When attemting an edit, check the new API and beep instead of starting
the edit.
2016-11-16 15:13:08 +01:00
Michael Natterer b1ca8a161c app: allow to zoom with middle mouse button + control + drag up/down 2016-11-16 14:41:30 +01:00
Michael Natterer 014fdb87e5 app: make switching paint tools to color picker mode more robust
Don't rely on the exact modifier being pressed or released. Instead,
check if only the right modifier is pressed after *each* modifier
change, and switch to color picking if it is; disable color picking
otherwise. This greatly reduces the risk of missing the user's wish to
pick colors because of other modifiers being pressed and released in
whatever order.

Probably fixes bug #734743.
2016-11-16 13:16:24 +01:00
Michael Natterer 61f91c7cd2 app: be more deterministic in a list view's name column (name editing etc.)
We handle multi-selection by letting GtkTreeView handle button press
when the widget is in GTK_SELECTION_MULTIPLE mode. Change that code to
only do that when one of the participating modifiers (shift and
control on Linux and Windows, shift and cmd on macOS) is pressed.

This makes sure that the same thing is not randomly handled by two
different pieces of code, and probably fixes bug #738440, tho I can't
be sure.
2016-11-16 13:02:09 +01:00
Michael Natterer a694fdd152 app: fix warning in xcf_save_prop(): xcf_write_int32() takes guint32* 2016-11-15 18:43:51 +01:00
Michael Natterer 1415a78fa1 Bug 774383 - Text layer created by gimp-text-fontname doesn't...
...respect border when resized

gimp_text_layout_new(): in FIXED box mode, subtract (2 * border) when
setting the layout width.
2016-11-15 13:23:00 +01:00
Michael Natterer 4f9095798d Bug 769738 - Add color tags/labels for layers/channels/paths
Forgot to add XCF saving and loading of color tags.
2016-11-14 23:02:43 +01:00
Michael Natterer 54dc424b31 app: better progress indication in gimp_babl_init_fishes() 2016-11-14 19:58:20 +01:00
Michael Natterer 702d050fe3 app: minor indentation fix in gimpdrawablefilter.c 2016-11-14 19:57:42 +01:00
Richard Gitschlag b27cdfa99a Bug 644032 - Color banding in Hue-Saturation with overlap
When calculating an overlap between two ranges, interpolate the hue
adjustment from config->hue[primary_range] and
config->hue[secondary_range] BEFORE mapping it to the input value.
This fixes odd edge cases where only one of the ranges crosses the
red/magenta wraparound, or if adjustments to different channels yield
more than 180 degree difference from each other.
2016-11-13 10:56:15 +01:00
Øyvind Kolås 3bc2d25ccd app: preinit more fishes commonly used for filters on u8 images 2016-11-11 13:55:05 +01:00
Michael Natterer 17ac37ef8e app: pass a status_callback to gimp_babl_init_fishes()
and make it report progress. Also call it at the end of initialization.
2016-11-11 13:09:12 +01:00
Michael Natterer 7386ed4a19 Revert "app: initialize GEGL after showing the splash"
This reverts commit 93da8ca8b6.
2016-11-11 12:34:10 +01:00
Michael Natterer 49b47674f6 Revert "app: move the call to gimp_gegl_init() to gimp_real_initialize()"
This reverts commit 99c040095d.
2016-11-11 12:33:39 +01:00
Michael Natterer 0788db4702 app: split babl fish creating to a separate function gimp_babl_init_fishes()
and call that function later in gimp_real_initialize() so the splash
is always fully drawn when it's called.
2016-11-11 01:06:14 +01:00
Øyvind Kolås 99b9a60e8b app: pre-initialize some babl fishes 2016-11-11 00:54:04 +01:00
Michael Natterer 99c040095d app: move the call to gimp_gegl_init() to gimp_real_initialize() 2016-11-11 00:48:30 +01:00
Michael Natterer 93da8ca8b6 app: initialize GEGL after showing the splash
It will soon become more expensive, so the splash should be
visible already.
2016-11-10 23:57:28 +01:00
Michael Natterer 7abe5ddb95 app: move the gamma setting to the top of the convert precision dialog
and don't show the dithering options if they can't be selected,
instead of just making them insensitive.
2016-11-10 23:43:27 +01:00
Michael Natterer ccf151446d app: cleanup enum order and comments in the dither GUI code 2016-11-10 23:19:12 +01:00
Øyvind Kolås 30a8edeab5 app: treat half precision float the same as single and double
.. which is to say encourage use of linear gamma, by making it one fewer step
to end up in linear than gamma corrected.
2016-11-10 15:20:18 +01:00
Michael Natterer da49a3fadf app: always default to linear for float precision and gamma for 8-bit
In the "New Image" and "Convert Precision" dialogs. The "Gamma/Linear"
switches get adjusted automatically to the new defaults, but can be
changed manually.
2016-11-10 13:50:56 +01:00
Michael Natterer 0631f1c629 Bug 735895 - Precision Conversion "Dithering" dialog
Don't offer dithering options when converting to 16 bit, it doesn't
make much sense to dither for anything but 8 bit. Thanks to Elle for
testing that this assumption is indeed true.

Use a properly commented #define instead of just a hardcoded "8 bits"
to make clear that this is a pure GUI "restriction".
2016-11-10 12:14:40 +01:00
Michael Natterer e3115f1565 Bug 774155 - gimp crashes on pressing OK in grid configuration
Pass the right user_data to grid_dialog_response().

Unrelated: call gimp_image_flush() so the menus get updated after
confirming the new grid.
2016-11-10 01:06:59 +01:00
Michael Natterer 91df48ef37 Bug 735895 - Precision Conversion "Dithering" dialog
Disable the convert precision dialog's dithering controls when
converting to higher bit depths o to anything > 16 bit.

Make sure the disabled dithering widgets always says "None", which
implies duplicating the bit depth checking logic in both the dialog
and its callback, in order to protect the values in GimpDialogConfig
from being overwritten by NONE.
2016-11-09 13:10:56 +01:00
Michael Natterer 56ce447bc9 Bug 735895 - Precision Conversion "Dithering" dialog
gimp_drawable_convert_type(): never dither when converting to a higher
bit depth, or to anything more than 16 bits.
2016-11-09 12:45:52 +01:00
Michael Natterer ab5a27d74a app: CLAMP(bits, 1, 16) in gimp_gegl_apply_color_reduction()
which is the range of the GEGL op's properties.
2016-11-09 12:33:13 +01:00
Michael Natterer 4f6dd8a66f app: reorganize GimpTemplateEditor's "Precision" controls
to have separate "precision" and "gamma" widgets, like the image's
"Precision" menu.
2016-11-09 12:21:39 +01:00
Michael Natterer 2f7009d427 app: add 'component-type' and 'linear' properties to GimpTemplate
The new properties are "virtual", they share their storage with the
"precision" property and are not serialized, they are meant for GUI
property widgets.
2016-11-09 12:03:38 +01:00
Michael Natterer c1ae0864de app: add gimp_babl_linear()
which completes gimp_babl_component_type() and gimp_babl_precision().
2016-11-09 12:02:12 +01:00
Michael Natterer ad7259beb7 Bug 772317 - Change detach icon of transform tools on-canvas dialog
Use GIMP_STOCK_DETACH which looks horrible but is the right icon and
can be fixed by the icon masters.
2016-11-08 17:36:07 +01:00
Alexis Wilhelm 768d06614f Bug 316479 - The Perspective Tool creates an empy image...
...instead of transforming it

Add gimp_matrix3_will_explode() which determines if a transform
matrix will blow up something in a rectangle to infinity, and use
the function so set both the GIMP and GEGL code paths to clip the
transform to the input size.
2016-11-08 17:26:21 +01:00
Michael Natterer ac2b9a5e41 configure.ac: require gegl >= 0.3.10
which will be good enough for about five minutes...
2016-11-08 17:07:54 +01:00
Michael Natterer 7c29077acd app: allow to remove the last added IScissors segment with backspace 2016-11-08 13:45:12 +01:00
Michael Natterer 87d38194d7 app, pdb: use GeglDitherMethod instead of simply an integer 2016-11-07 20:41:39 +01:00
Michael Natterer c767179ced app, pdb: fix bug in recent gimp-drawable-threshold change
Actually use the passed ranges again, instead of using uninitialized
local variables.
2016-11-07 20:27:36 +01:00
Michael Natterer 5e2a61850e app: file_open_image(): fix opening of unknown remote files
This got lost when dropping the file-uri plug-in and switching to
interal download using GIO. The file-uri plug-in would just download
whatever remote thing and open it locally, using local magic matching.

We now do the same internally and try the magic matching again on the
downloaded file.
2016-11-07 18:35:48 +01:00
Michael Natterer 2a9b20d384 Bug 772789 - Mac DMG 2.8.18 gets plug-ins path wrong, can't open JPEG files
Don't migrate any paths from an older gimprc. This unfortunately kills
all manually added paths, but makes sure all paths default to the
files of the new GIMP version, could be improved by parsing the path
and replacing only the right elements.
2016-11-07 17:04:05 +01:00
Michael Natterer 483c282687 Bug 766988 - Colors applied to images are not color managed
Add color management to GimpDrawableFilter and GimpFilterTool, GEGL
ops applied to drawables can be applied in color managed space
now. Sadly, this is very slow, so disabled by default.

I'm sure the profile guessing based on the operation's format doesn't
always work, but this general bug counts as fixed now.
2016-11-07 15:39:48 +01:00
Michael Natterer be6b6c7ba4 Bug 642565 - Use private pointer instead GET_PRIVATE macro in GimpCanvasItem
Do as the but title says, based on a patch from Javier Jardón.
2016-11-07 14:14:16 +01:00
Jehan 123a9092ed app: fix the angular value when tilt_y == tilt_x == 0.0.
Further improves commit bb17853. We can see in the generic tilt
computation that if tilt_y is 0, whatever the value of tilt_x, tilt
becomes 0.
2016-11-07 13:39:09 +01:00
Michael Natterer be66d1a2be app: make an assertion more correct in GimpDrawableUndo 2016-11-07 13:10:21 +01:00
Jeremiah Darais bb1785396f Bug 760737 - Brush angle jumps when tablet pen is tilted horizontally.
Fix cursor rotation jump when tablet pen is tilted horizontally.
This changes to the correct values for the special case of tilt_x == 0.0.

Reviewer (Jehan)'s note: computing the convergence of the tilt function
in the `else` block, when tilt_x approaches 0, tilt value indeed
converges to 0.25 with tilt_y > 0 and 0.75 (or -0.25 which is the same)
with tilt_y < 0.
2016-11-07 02:51:04 +01:00
Michael Natterer bcdd2e8d1a app: cleanup in GimpOperationProfileTransform 2016-11-06 21:08:10 +01:00
Jehan 58d84f6ebe Bug 750178 - Remove "again" from "Export the image again".
This "again" is meaningless in this context.
2016-11-06 20:57:41 +01:00
Jehan 4a0653e12d Bug 773960 - smudge tool not working in tiling symmetry.
Initialization was failing when a paint buffer could not be returned for
a stroke (which was bound to happen in tiling). Instead it must just
ignore the coordinates which won't result in painting, and continue to
the next ones.
2016-11-06 17:14:55 +01:00
Michael Natterer 7c2bfd3246 Bug 745313 - Description of Equalize wrong in PDB
gimp_drawable_equalize(): is mask_only is FALSE, suspend the selection
around gimp_drawable_apply_operation() so the operation affects the
entire drawable.
2016-11-04 22:28:59 +01:00
Michael Natterer 3c7fbe93b3 app: make gimp_item_mask_bounds() and _intersect() honor a suspended selection
and remove the same check from the stroke and fill code.
2016-11-04 22:28:59 +01:00
Hartmut Kuhse 146b7bde86 app: typo: make string translatable 2016-11-04 16:23:33 +01:00
Hartmut Kuhse 4d1dd479ca Revert "Update German translation"
This reverts commit 750aa5a495.
2016-11-04 15:44:59 +01:00
Hartmut Kuhse 750aa5a495 Update German translation 2016-11-04 15:03:46 +01:00
Michael Natterer 1449d3cb8f app: remove the "Recent Filters" actions from action search again
The code was still checking for "plug-in-recent-*". Also, rename the
actions to "filters-recent-*" instead of "filter-recent-*" for
consistency with the other filters actions.
2016-11-03 22:37:13 +01:00
Michael Natterer 3cef404e20 app, pdb, libgimp: allow to choose the channel when thresholding
so the threshold can now be based on the GimpHistogramChannel enum.
Add a channel menu to the threshold dialog and a channel argument to
the PDB procedure (which is new in 2.10).

If I hadn't forgotten what the "RGB" channel is supposed to do I would
have implemented the RGB mode in GimpOperationThreshold correctly.
Right now I'm just guessing. Anyone?
2016-11-01 22:45:37 +01:00
Michael Natterer 3307c71966 pdb, app, libgimp: change ranges for histogram and threshold to 0.0..1.0
They used to be 0..255, inherited from the old gimp_histogram() and
gimp_threshold() procedures. This commit deprecates these old
procedures and changes the ranges in the new gimp_drawable_histogram()
and gimp_drawable_threshold() to double with a 0.0..1.0 range.
2016-11-01 20:57:16 +01:00
Michael Natterer f5ecc53f3e Fix a lot of warnings all over the place
Deprecated stuff, unused variables. Includes parts of a patch from
Shlomi Fish from bug #768855.
2016-10-31 01:36:35 +01:00
Michael Natterer b4120e3f61 Bug 767650 - Uncommitted scissors selection is discarded on tool change
gimp_iscissors_tool_commit(): if the curve is not closed, close and
recalculate it.
2016-10-30 23:08:13 +01:00
Michael Natterer bc6679974b app: clean up template-options-dialog like other dialogs 2016-10-30 20:54:47 +01:00
Michael Natterer d551a675fa Bug 773460 - Color Picker shows wrong values
Remove rounding from the RGB, HSV and CMYK modes of GimpColorFrame,
and add one decimal digit.
2016-10-30 19:28:24 +01:00
Michael Natterer 9f9307edcb app: color manage the new color tag color areas 2016-10-30 18:05:57 +01:00
Michael Natterer 967ac88c35 app: remove the "edit" button from GimpItemTreeView
the layers and paths dialogs were already hiding it, now it's gone
also from the channels dialog. It was redundant anyway.
2016-10-30 17:36:32 +01:00
Michael Natterer bd8f15a758 app: reduce code duplication in the filling/stroking code
Move most of the fill/stroke callback code to items-commands.[ch] and
call the new functions from the respective selection and vectors
files.
2016-10-30 17:02:59 +01:00
Michael Natterer 31fcd79dd9 Bug 769738 - Add color tags/labels for layers/channels/paths
Add property "color-tag" of type enum GimpColorTag to GimpItem so all
layers, channels and paths can be tagged with a color.

For interoperability, use the color list from Krita which is a
superset of Photoshop's colors.

Features a "Color Tag" submenu in the layers, channels and paths
menus, a row of color radio buttons in the properties dialogs,
undo and PDB API.

As a side effect, some common code is now factores out into
items-actions.[ch] and items-commands.[ch] which adds visible, linked
and lock actions for layers and channels.
2016-10-29 17:02:16 +02:00
Michael Natterer afedbd0010 app: set "always-show-image" on some menu items generically
- the GimpDockBook item which has the current dockable's menu as submenu
- all menu items which have colors or previews as images
2016-10-28 23:11:44 +02:00
Michael Natterer 440a1bae82 app: one more round of general dialog cleanup
- consistent coding style
- hide public structs
- add callbacks to move logic out of app/dialogs/
2016-10-27 21:26:07 +02:00
Michael Natterer f47c012ab5 app: fix layer-options-dialog.c return width and height again
Being able to create layers is important...
2016-10-27 21:00:14 +02:00
Michael Natterer b81b60950b app: bring the "Switches" column to the channel and path properties dialogs
Introduce item-options-dialog.[ch] which abstracts this away and use
it from the layer, channel, vectors options dialogs. This is all
pretty ugly but better than duplicating that code three times. The
vector-options-dialog is now completely pointless but I kept it anyway
for now, let's see what unique path options we come up with.
2016-10-26 16:51:56 +02:00
Alexandre Prokoudine 1133a8bff3 Makes 'Switches' in the Layer Attributes dialog translatable 2016-10-25 01:09:29 +03:00
Michael Natterer 6813dd0975 app: consistent titles for the new channel and new path dialogs. 2016-10-23 23:01:47 +02:00
Michael Natterer 9a969a2b53 Bug 770901 - Improve the "New Layer" and "Layer Attributes" dialogs
Add toggles for visible, linked, lock pixels, lock position, lock alpha.
2016-10-23 22:45:08 +02:00
Michael Natterer 5ce223b552 app: cleanup in GimpEditSelectionTool
Rename and reorder members to be more clear. Move variables to local
scopes. Minor code reorganization.
2016-10-23 17:49:47 +02:00
Michael Natterer 3518a15064 Bug 770901 - Improve the "New Layer" and "Layer Attributes" dialogs
Add "Mode", "Opacity" and "Offset" controls to the dialogs. Remember
the "New Layer" mode and opacity in GimpDialogConfig.

Also addresses bug #361810.
2016-10-21 22:54:10 +02:00
Michael Natterer ca2156ee35 app: language.c contains no translatable strings, remove "gimp-intl.h" 2016-10-21 18:44:39 +02:00
Michael Natterer 34eff7322e Bug 599573 - Remember dialog defaults between Gimp sessions
Add resize and fill options for the "Layer Boundary Size" and
"Canvas Size" dialogs to GimpDialogConfig.
2016-10-20 00:31:59 +02:00
Michael Natterer bfeb93afe6 app: add a tooltip to the resize dialog's "resize text layers" toggle
"Resizing text layers will make them uneditable"
2016-10-19 12:56:50 +02:00
Michael Natterer f9170b667e Bug 647957 - GimpColorFrame's CMYK mode is not color managed
Convert GimpRGB to CMYK using a color transform to the configured CMYK
profile instead of the naive gimp_rgb_to_cmyk().

Add gimp_color_frame_set_color_config() and call it on all color
frames in the GUI (color picker tool, cursor info, sample point view).
Keep a GimpColorTransform around that does the conversion.

Also color manages the frame's color area now (visible in the sample
point view), which was forgotten earlier. Addresses bug #467930.
2016-10-18 22:48:04 +02:00
Michael Natterer fce404cea2 app: minor formatting paranoia in GimpContainerTreeView 2016-10-18 20:19:52 +02:00
Michael Natterer b8bb52b721 Bug 773058 - Enable grid views of dynamics and tool presets 2016-10-17 18:43:22 +02:00
Michael Natterer 3dc5d3da9f Bug 155164 - Merge Palettes is unimplemented
We have multiple selection in lists, so finally fix merge palette.
2016-10-17 09:25:51 +02:00
Michael Natterer 151b44e4bb Bug 759939 - Ghost brush outline in FG Select tool
Fix the check that keeps events on overlay widgets from entering the
tool event mechanism, they have no business there.

gimp_overlay_child_realize(): set the embedding widget's event mask on
all overlay children, so their windows will be used as event window,
so their events become distinguishable from events on the parent (the
canvas).

gimp_display_shell_canvas_tool_events(): fix the check for events on
overlays, and skip them for real this time.
2016-10-14 22:14:11 +02:00
Michael Natterer 3a52bf4cce Bug 731279 - Tool Preset Editor not working correctly
Call gimp_context_tool_preset_changed() on the global user context,
not on the tool preset list's or tool preset editor's local
context. Fixes restoring of presets in MWM. Tracked down by Jose
Americo Gobbo.
2016-10-13 11:36:51 +02:00
Michael Natterer 3d1c5641f7 Bug 731279 - Tool Preset Editor not working correctly
Have "Save" and "Restore" buttons in both the tool preset list/grid
and the tool preset editor. The save button stores the active tool's
options in the preset, if possible.
2016-10-12 23:51:24 +02:00
Michael Natterer b8db0aa54e app: actually edit the template's color profile in GimpTemplateEditor
The "add default profile of image type" code was resetting it without
implementing the FIXME of setting it again. Spotted by Elle.
2016-10-12 23:48:06 +02:00
Michael Natterer 33276a000e app: add precondition check on "object" in gimp_context_set_by_type() 2016-10-12 22:44:19 +02:00
Michael Natterer 2e1a5bcba9 app: don't leak GimpTemplate's "color_profile" GFile in finalize() 2016-10-12 21:56:14 +02:00
Michael Natterer f722bc99d2 app: remove GimpDataEditor's save button, it was useless and confusing 2016-10-12 20:43:35 +02:00
Michael Natterer d1e3d7c5c7 Bug 731279 - Tool Preset Editor not working correctly
This fixes restoring of brush properties (size, spacing angle etc.)
from presets, which was utterly broken before. The fix consists of
two parts:

- In tool_manager_preset_changed(), always copy the brush properties
  again after setting the preview on the tool options, in order to
  override brush properites that get copied from a linked brush when
  that brush gets set on the tool options.

But no amount of copying stuff again and again would help without:

- In gimp_context_set_by_type(), don't use g_object_set() to set the
  object (brush, pattern etc.). Instead, build a GValue and call
  gimp_context_set_property(). This may seem odd, but avoids a
  g_object_freeze_notify()/thaw_notify() around the g_object_set(),
  which was causing "notify" to be emitted at the very end, after
  everything this context change has triggered. GimpContext is an
  essential core object and there is an expectation of a reasonable
  order of signal emissions and callbacks being called. The "notify"
  at the end was keeping any callbacks of the context's "foo-changed"
  signals to override anything an earlier callback had done, if a
  "notify" callback was overriding that overriding again.

This was probably the reason for a lot of odd behavior observed over
the years. In fact, I have been searching for this for at least 5
years.
2016-10-12 20:33:23 +02:00
Michael Natterer 184f0929ce Bug 771678 - Parametric Brush Aspect Ratio and Angle values...
...are not submitted to respective Tool Options sliders

Treat brush angle and aspect ratio like all other paint options values
that can be linked to brush defaults and take their default values
from the brush. They were special casing their defaults to constants,
and GimpBrushGenerated was adding the passed dynamic radius and aspect
values to its own. This was totally incomprehensible.

Now GimpBrushGenerated's transform_size() and transform_mask()
implementations just translate between these APIs value ranges and the
brush's own value range and only use the passed values (not the
brush's native values), which makes the editor <-> tool options
interaction and the painted brush shape predictable.

Also connect the active brush's property notifications to the paint
options properties, so the paint options follow a brush edit live if
the respective "linked" toggles are checked.

And some cleanup.
2016-10-12 00:21:12 +02:00
Michael Natterer dc0ffa4891 Bug 764024 - Allow to choose fill color when resizing layers and images
Add a fill type combo to the crop tool options, only visible
when "Allow enlarging" is checked.
2016-10-10 00:21:36 +02:00
Michael Natterer 997ae1e28b Bug 764024 - Allow to choose fill color when resizing layers and images
Add a GimpFillType argument to GimpItem::resize() and fill type
widgets to the canvas and layer resize dialogs. Fill the new parts of
the drawable according to fill type in gimp_drawable_resize(). Make
sure places that need the old behavior get GIMP_FILL_TRANSPARENT
passed by hardcoding it in the GimpItem::resize() implemetations of
channel, mask, selection etc.
2016-10-10 00:02:16 +02:00
Michael Natterer a06f7e78f1 app: use BG fill in gimp_drawable_fill() if the drawable has no alpha 2016-10-09 21:30:43 +02:00
Michael Natterer f027bf53ab app: clean up the palette-import-dialog in the spirit of recent dialog cleanup 2016-10-09 21:08:21 +02:00
Michael Natterer ce639f031b app: fall back to BG fill if gimp_get_fill_params() doesn't find a pattern 2016-10-09 21:07:08 +02:00
Michael Natterer be6a47e750 app: some more cleanup in IScissors
Move quite some code to new functions of ICurve, preparation for
getting rid of a bunch of outstanding IScissors inconsistencies with
other tools.
2016-10-09 17:19:42 +02:00
Michael Natterer e9e1bc1e22 Bug 766988 - Colors applied to images are not color managed
We didn't convert patterns to the target drawable's profile when using
gimp_drawable_fill().

Introduce gimp_drawable_fill_buffer() as single filling utility
function that does things right and use it from gimp_drawable_fill()
and gimp_fill_options_create_buffer().
2016-10-09 15:53:43 +02:00
Michael Natterer 46b73bb1fa Bug 772541 - change Quick Mask Attributes mask opacity slider
Use a GimpSpinScale in channel-options-dialog.c and clean up the
dialog layout. Affects the "Quick Mask Attributes", "New Channel" and
"Channel Attributes" dialogs.
2016-10-08 17:00:38 +02:00
Michael Natterer 6ca9ebdb95 app: remove the dynamic programming buffer from the GimpIscissorsTool struct
It's only used in one function and recreated each time, so create and
destroy it locally.
2016-10-07 01:58:37 +02:00
Michael Natterer 152c5a2c44 app: change most of Iscissors to use a GimpPickable not a GimpImage
This is just cleanup and enables adding a mode that doesn't behave like
"sample merged".
2016-10-07 01:18:16 +02:00
Michael Natterer fbb6b5d425 app: cleanup in GimpFreeSelectTool
Mainly reduction of excessive micro utility functions by folding them
into their single (or two) caller(s). A bit more readable now.
2016-10-06 22:44:07 +02:00
Michael Natterer 439a3ff7bd Bug 667862 - Allow mouse to optionally configure tablet devices
Add new setting GimpGuiConfig:devices-share-tool. When TRUE, we never
copy any properties between the user context and the GimpDeviceInfo's
context, so no tool or anything changes.

We do however still keep track of the active device so the setting can
be enabled/disabled at any time. Also hide GimpDeviceStatus' tool,
brush etc. indicators in "shared" mode.
2016-10-04 22:32:08 +02:00
Michael Natterer 5cf3cf27fd app: make sure a floating selection always has its drawable's format + alpha
we were missing a conversion when pasting whole images to channels
and masks.
2016-10-04 19:49:57 +02:00
Jehan 8aa0a04854 app: keep focus on the quit dialog when saving.
Otherwise the quit dialog is still in front yet it has no focus and
one doesn't see this immediately.
Hitting ctrl-d to exit and ignore any subsequent files for instance
duplicates the current active image instead.
2016-10-04 12:15:41 +02:00
Jehan f67bc227dc app: set active shell on image cell selection in quit dialog...
... not on activation (i.e. raise on single click rather than double
click).
2016-10-04 11:42:38 +02:00
Michael Natterer ecf4af88b8 app: add "gboolean new_has_alpha" to gimp_drawable_convert_type()
making its external API "complete". Remove the redundant
"new_base_type" and "new_precision" from the internal (vfunc) API (the
Babl format has the same information).
2016-10-04 01:39:15 +02:00
Michael Natterer 3f8d55fe79 app: don't set "follow-state" on GimpCellRendererButton
The button's function doesn't change so it shouldn't look differently.
2016-10-04 01:21:52 +02:00
Michael Natterer de87b0ac68 app: disconnect the "add" and "remove" handlers on dialog destruction
Broke this in the last commit.
2016-10-02 20:36:14 +02:00