Commit Graph

5086 Commits

Author SHA1 Message Date
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
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
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 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
Ø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 4a3fbb8f35 app: fix OVERLAY mode so it gets fed linear data 2017-01-23 18:09:20 +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 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
Ø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
Ø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 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 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
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
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 4df1af2534 app: add linear variant of behind mode 2017-01-12 14:27:15 +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
Ø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
Øyvind Kolås 5a7fd54d34 app: split addition and subract in legacy and new 2017-01-10 01:40:14 +01:00
Øyvind Kolås b6be1b768e app: duplicate difference mode, new and legacy 2017-01-09 23:49:08 +01:00
Øyvind Kolås 3a50cdcd4f app: split screen op in legacy and new 2017-01-09 23:19:29 +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 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
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
Ø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
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
Alexia Death 43681a6d4c app: flush blur cache and other caches when invalid 2016-11-29 21:25:25 +02: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
Jehan 84ee79c71d app: clean out many tabs under app/core/. 2016-11-25 05:51:03 +01:00
Jehan 94a5b7c97a app: cleaning out tabs. 2016-11-25 01:42:47 +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
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
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 702d050fe3 app: minor indentation fix in gimpdrawablefilter.c 2016-11-14 19:57:42 +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 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
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 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 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
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 87d38194d7 app, pdb: use GeglDitherMethod instead of simply an integer 2016-11-07 20:41:39 +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
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 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
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 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 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 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 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 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 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
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 e8309826b7 app, libgimpwidgets: use the new config path <-> GFile functions
Gets rid of temporary variables to hold both expanded and unexpanded
paths.
2016-09-30 22:07:00 +02:00
Michael Natterer 009417e450 app: reorder and rename indexed conversion parameters to make more sense 2016-09-27 23:51:33 +02:00
Michael Natterer 81603eaa58 Bug 767178 - Segment fault on deleting an automatic folder tag
The GimpTaggedContainer->tag_ref_counts keeps pointers to GimpTags but
didn't ref them. Ref the tags while they are in the hash table.
2016-09-27 10:14:45 +02:00
Michael Natterer ea98f9967e app: change gimp_pickable_auto_shrink()'s parameters
from x1, y1, x2, y2 to x, y, width, height.
2016-09-25 22:40:28 +02:00
Michael Natterer 88b60e9947 app: make gimp_edit_paste() do what its told to do
Don't change the paste_type to NEW_LAYER just because there is a
complex thing in the clipboard. Instead, honor the request to paste
FLOATING or FLOATING_INTO and reduce the pasted thing to a simple flat
layer. Also remove the message and paste_type change from edit_paste()
in edit-commands.c, it had the same purpose, just with a user
notification.

In order to paste the full layer one needs to explicitly invoke
"Paste as new layer" now.

It still changes the paste_type to NEW_LAYER if it's impossible to
attach a floating selection to the target, the menu item was simply
insensitive before.
2016-09-23 16:49:11 +02:00
Ell 6da1775dd7 app: more performance improvements to fuzzy-select/bucket-fill
Not as dramatic this time...
2016-09-22 17:46:07 +00:00
Michael Natterer 21ec859c4a app: rename gimp_layer_flatten() to gimp_layer_remove_alpha() 2016-09-21 11:56:25 +02:00
Michael Natterer 1d76d085c9 app: fix position of pasted layers in gimp_edit_paste()
and make that code more readable.
2016-09-21 11:15:34 +02:00
Michael Natterer f677e156af app: special case empty layer groups in gimp_edit_get_paste_offset()
They have a size of 1x1, treat them a image-sized when pasting layers
on top of them.

(my commit below was also about gimp_edit_get_paste_offset(), not
 about gimp_edit_paste() as the log claims)
2016-09-21 09:22:30 +02:00
Michael Natterer 7b4895fd1e app: use x,y,width,height instead of x1,y1,x2,y2 in gimp_edit_paste()
and gimp_item_mask_intersect() instead of _bounds().
2016-09-21 00:53:42 +02:00
Michael Natterer 35588d79c8 app: add utility functions to get a generic paste GimpObject
to Gimp and GimpClipboard. The object is either an image or a buffer
or NULL.
2016-09-21 00:11:15 +02:00
Michael Natterer fa94ab03ca app: fix warning in gimp_edit_paste()
gimp_image_add_layer()'s "parent" parameter is a layer.
2016-09-21 00:09:38 +02:00
Michael Natterer 67863dabf9 Bug 637313 - Should be possible to copy/paste whole layers in a single step
Use the newly added clipboard for entire images to copy/paste layers
(we only create single-layer clipboard images, and use only the first
layer of any recieved image, the layers can be arbitrarily complex
though):

- change gimp_edit_copy,cut,paste() to return/take a GimpObject
  that can be a GimpImage or GimpBuffer
- cut/copy the whole layer if there is no selection
- always paste layers as new layers, not floating selections
- always paste news layers on top of the active layer, where
  we would attach a floating selection
- add enum GimpPasteType { FLOATING, FLOATING_INTO, NEW_LAYER }
- add GimpPasteType parameter to gimp_edit_paste() and handle all
  three cases there because there is now a lot of common code
  involved
- change all callers accordingly, use only legacy buffer pasting
  from the PDB for now
2016-09-20 00:20:07 +02:00
Michael Natterer 7130ba95e1 app: add gimp->clipboard_image and API to set/get it 2016-09-19 20:13:39 +02:00
Michael Natterer f0acb3301a app: factor gimp_edit_get_paste_offset() out of gimp_edit_paste()
and also use it for "paste as new layer", so we get the same
positioning logic for both paste variants.
2016-09-19 17:30:41 +02:00
Michael Natterer 557965e593 app, menus: rename everything "paste as new" to "paste as new image"
Actions, functions, variables, help IDs. Also added user profile
migration code for importing old menurc files.
2016-09-19 12:15:39 +02:00
Michael Natterer de5bbd637e app: don't call gimp_layer_set_lock_alpha() on layer groups
in gimp_image_new_from_drawable().
2016-09-17 19:19:30 +02:00
Michael Natterer d85157c376 app: rename gimp->global_buffer to gimp->clipboard_buffer
Also rename the "buffer-changed" signal and the setter, and add a
getter.
2016-09-17 17:39:54 +02:00
Michael Natterer 21f8a0fd1e app: clean up and simplify gimp_selection_extract()
It was ported to GEGL pretty much 1:1, leaving too many and even
one completely redundant if()s around.
2016-09-17 15:32:22 +02:00
Michael Natterer d5ffc50c2e app: rename w, h to width, height in gimp_item_mask_bounds() 2016-09-16 23:57:24 +02:00
Michael Natterer dba7d58b56 app: port gimp_drawable_bucket_fill() to x, y, width, height
because x1, y1, x2, y2 are evil.
2016-09-16 23:31:56 +02:00
Michael Natterer cbac0a4ddc app: don't show the "Fonts" startup status message if we don't loas fonts 2016-09-15 18:47:55 +02:00
Ell 7e6d67ac4b app: various performance improvements to fuzzy-select/bucket-fill
thru gimp_pickable_contiguous_region_by_seed()
2016-09-15 14:57:04 +00:00
Michael Natterer 3ee5df9ee8 Bug 771484 - text loading impossible, in version commit 4b4e1c8
gimp_restore(): the call to gimp_fonts_load() got lost in
commit 64a2c395d1.

Also adjust init progress percentages again.
2016-09-15 14:48:51 +02:00
Michael Natterer 572d556643 Bug 553855 - Bucket fill colour is always blended with filled pixel colour...
...when threshold > 0

Add an "Antialias" toggle to the bucket fill options and set it on the
GimpFillOptions. In gimp_drawable_bucket_fill(), pass it to
gimp_pickable_contiguous_region_by_seed() instead of always defaulting
to TRUE.

The position of the toggle and its huge tooltip may need some
adjustment.
2016-09-15 12:24:37 +02:00
Michael Natterer ea6946edf0 app: small whitespace fix in gimppickable-contiguous-region.h 2016-09-15 10:22:53 +02:00
Massimo Valentini 0ecd936f57 Bug 771208: 'Y' axis name of Flow Graph Parameter...
on Paint Dynamics curve is wrong
2016-09-14 18:32:16 +02:00
Michael Natterer 20a32d970d Bug 599573 - Remember dialog defaults between Gimp sessions
Add GimpFillOptions and GimpStrokeOptions to GimpDialogConfig and use
them in the Fill/Stroke Selection/Path dialogs and for the "with last
values" commands. Add GUI for them to Preferences -> Dialog Defaults.

This requires most of the stuff in my last few commits, and some
more changes:

GimpFillOptions is a GimpContext which has all sorts of connections to
everything, including a Gimp pointer. Hack around in GimpDialogConfig
to add a Gimp property, and add "gimp" parameters to quite some GimpRC
functions. Treat the Gimp* as a GObject* in all public API because
core/ stuff is not known in config/.
2016-09-14 01:27:42 +02:00
Michael Natterer 7daa7d080a app: implement GimpConfig::serialize() in GimpFillOptions
so it doesn't inherit GimpContext's changed implementation.
2016-09-14 00:27:31 +02:00
Michael Natterer f1897b655e app: free Gimp members in reverse order of creation 2016-09-13 12:44:10 +02:00
Michael Natterer 314027f0c9 app: create members of the Gimp instance earlier
Move fonts, data factories, document list, paint methods and user
context creation to gimp_init() or gimp_constructed() so that most
members are created when gimp_new() is done. This does not load any
data earlier, it just makes sure that all containers exist when
gimp_load_config() is called. It's also cleaner and less fragile,
2016-09-13 09:47:27 +02:00
Michael Natterer 631110e061 app: merge units.[ch] into core/gimp-units.[ch]
and initialize units in gimp_init(). This was completely
over-engineered but in the end boils down to a bad hack that needs a
static "the_unit_gimp" pointer anyway, so let's at least have the hacks
in one file.
2016-09-12 23:51:29 +02:00
Jehan 4b4e1c8e60 app: use Freedesktop standard "edit-paste" icon rather than "gtk-paste". 2016-09-12 03:59:53 +02:00
Michael Natterer 64a2c395d1 app: add gimp-data-factories.[ch] with some code from gimp.c
This should improve readability in gimp.c, and moves all data factory
handling code to a common place.
2016-09-12 02:55:49 +02:00
Jehan 6c674e973c app, libgimp*, plug-ins, icons: revert icon names into freedesktop...
... standard icon names and GTK+ icon names as second choice.
We should only use GIMP specific icon names as last resort, when there
is no standard or GTK+ names dedicated to the function.
This is made possible thanks to commit 3cc77b0.

s/gimp-document-recent/document-open-recent/
s/gimp-indent/format-indent-more/
s/gimp-next/go-next/
s/gimp-previous/go-previous/
s/gimp-save/document-save/
s/gimp-save-as/document-save-as/
s/gimp-revert/document-revert/
s/gimp-open/document-open/
s/gimp-document-recent/document-open-recent/
s/gimp-quit/window-close/ ou s/gimp-quit/application-exit/
s/gimp-warning/dialog-warning/
s/gimp-edit-clear/edit-clear/

s/gimp-justify-.*/gtk-justify-.*/
s/gimp-font/gtk-select-font/
s/gimp-color-palette/gtk-select-color/
s/gimp-cancel/gtk-cancel/
2016-09-03 15:49:29 +02:00
Michael Natterer 3a14a646f5 app: add new config class GimpDialogConfig
which will keep all settings of the "don't ask me again" kind. For
now, moved the "color-profile-policy" there.
2016-08-14 22:21:59 +02:00
Michael Natterer f06f691a92 Bug 768952 - Select by color works correctly only in srgb
Separate clearing/creating the image's cached color transforms from
clearing/creating its color profile. Clear the transforms when the
color profile changes, and when image type or precision change. Create
the transforms only on demand, so clearing them multiple times doesn't
trigger any redundant (and expensive) transform creations.
2016-07-25 00:04:12 +02:00
Jehan 7d5ebbe225 app: rename mirror properties to mirror-position-x|y.
As proposed by Mitch. This completes first renaming attempt (commit
08ffc10) with even less ambiguous names.
"horizontal-axis-position" and "vertical-axis-position" are now
respectively "mirror-position-y" and "mirror-position-x".
2016-07-19 14:24:54 +02:00
Jehan 65be37b37b Bug 768871: improve symmetry labels. 2016-07-19 12:34:01 +02:00
Jehan 08ffc1035b app: rename properties s/(horizontal|vertical)-position/\1-axis-position/.
"Horizontal position" and "Vertical position" could be mistaken as
meaning respectively the x and y coordinates, hence the vertical (resp.
horizontal) guide's positions.
The more accurate "horizontal-axis-position" and "vertical-axis-position"
namings are less misleading.
2016-07-18 02:52:37 +02:00
Massimo Valentini 23d5944ef8 Bug 768625: gimp-gradient-segment-range-move crashes...
...GIMP invoked with end-segment < 0

correct a typo
2016-07-10 17:21:32 +02:00
Michael Natterer 954f50a097 app: fix description of GIMP_COLOR_PROFILE_POLICY_CONVERT in the header
it was only fixed in the generated .c file.
2016-07-08 15:07:41 +02:00
Michael Natterer d3de67a9de app: always return a profile from gimp_drawable_transform_buffer_*()
Assign the buffer_profile return value early, so it doesn't stay
uninitialized when we bail out half way through the functions.
2016-07-06 20:29:56 +02:00
Michael Natterer eae2261f16 app: tag the symmetry properties as pixel-coordinate/pixel-distance
so they get the proper soft limits in the generated GUI. Also rename
some properties for consisency, and add some blank lines for better
readability.
2016-07-06 12:37:10 +02:00
Michael Natterer 8c2c22ccb4 app: don't pass a NULL profile to gimp_image_convert_color_profile()
In gimp_image_import_color_profile(), when converting
non-interactively, pass the image's built-in profile.
2016-07-04 12:28:42 +02:00
Jehan 38f1b50a15 app: type s/Thia/This/. 2016-07-01 19:50:13 +02:00
Jehan e8aac6d5ac app: do not allow mandala center position out of the image dimensions. 2016-07-01 14:58:24 +02:00
Jehan 4e6d320591 app: remove current implementation of GimpSpinScale soft bounds.
Mitch gets a better idea to deal with soft limits (i.e. min/max values
different from the property min/max) applied to a spin scale created by
gimp_prop_spin_scale_new().
So let's just remove the current implementation (using locale data on
the GimpConfig object). The symmetry spin scales are back with crazy
huge maximums, which makes quite a horrible GUI, but this is only
temporary until Mitch commits his new implementation.
2016-07-01 13:58:55 +02:00
Ell f4e8cf29f2 app: add missing cleanup to the previous commit 2016-06-30 18:55:09 +00:00
Ell bd5544394b app: eliminate double application of the selection mask ...
... in gimp_drawable_bucket_fill()

gimp_drawable_apply_buffer() already takes the selection mask into
account.  Intersecting the selection mask with the fill region
prior to that leads to wrong (too low) alpha values, in general,
when partial selection is involved.

This commit eliminates the intersection of the fill region and
selection mask data before the apply_buffer() call, although it
does calculate the intersection of their bounds, to avoid
processing regions that won't be visible anyway.
2016-06-30 18:42:55 +00:00
Jehan a10b688b64 app: rename "update-ui" signal to "gui-param-changed".
Therefore having a signal name more in line with other signals. This
reflects the property flag's naming: GIMP_SYMMETRY_PARAM_GUI.
2016-06-28 20:04:38 +02:00
Jehan f713c86d9f app: disconnect symmetries' callbacks connected to image signals...
... on symmetry destruction.
Use g_signal_connect_object() which does this automatically.
2016-06-28 19:30:44 +02:00
Ell 8e9a89d0b9 app: always use the image's mask format for quick mask
Previously, activating quick mask while the selection was empty
would use the image's channel format for the mask, instead of its
mask format; these formats are different for sRGB images.
2016-06-28 13:30:49 +00:00
Richard Kreckel dd9b0fc55b Bug 768044 - Fix many typos
This fixes many typos in comments and one in a user-visible string (msgid
"center abscisse" changed to "center abscissa" in affected po files. too).
2016-06-26 00:35:24 +02:00
Jehan cafa912c98 app: allow locale lower and upper values in gimp_prop_spin_scale_new().
Currently a GimpSpinScale created with gimp_prop_spin_scale_new() will
use the associated property's lower and upper values.
Unfortunately these generic values may not be always relevant and we
may want to construct a spin scale UI adapted to the current image.
For instance, several symmetry painting have a x/y property which has
to stay within the image's dimension, but changing the property's lower
and upper values would affect the symmetry on the class level (i.e. for
all similar symmetries on all images).
Let's allow setting data on object with key "property-name:min|max" to
provide locale min/max values specifically for this object.
This is used only on the symmetry dock for now, but could be used as
well on GEGL op UIs.
2016-06-14 16:52:52 +02:00
klausstaedtler 2696611d1e icons: Bug 759904
add
gimp-group-layer

patch
gimpgrouplayer.c
2016-06-10 13:50:45 +02:00
Alexandre Prokoudine 3e01419b0c Introduce consistent use of 'soft-proofing' in user-visible messages 2016-06-08 00:21:51 +03:00
Michael Natterer 741be87d0f app: don't let display color management settings affect file import
gimp_image_import_color_profile(): get the intent and bpc settings
from the profile import dialog instead of asking the global
GimpColorConfig.
2016-06-05 22:36:52 +02:00
Michael Natterer b4f34375b7 Bug 767062 - Lags when zooming or dragging zoomed image (cmsFLAGS_NOOPTIMIZE)
Use cmsFLAGS_NOOPTIMIZE only for actual image buffer or single color
transforms, but not for previews or the image display. Makes things a
lot more responsive again.
2016-06-05 16:50:02 +02:00
Jehan 730547e0bb libgimpwidgets: fix commit e6ba618.
- Missing comma;
- headers from libgimpwidgets can't be included in app/core. So icon
  macros can't be used there.
2016-06-02 20:06:54 +02:00
klausstaedtler e6ba618bb9 icons: add new icon gimp-color-palette
patch
gimppalette.c
gimpicons.c
gimpicons.h
2016-06-02 18:24:29 +02:00
Jehan 8a37c928eb app, plug-ins, libgimp*: clean out all remaining trailing spaces/tabs.
Rather than just discovering them by chance, a simple grep and some
search and replace are much more efficient! :-)
Cleaning only done on C and automake files.
2016-06-02 02:04:26 +02:00
Michael Natterer 790cde3dd8 app: don't validate the terminating \0 of a gimp-comment parasite
Valid UTF-8 doesn't contain nul bytes.
2016-05-31 22:28:44 +02:00
Michael Natterer cf3b6903c0 Bug 766824 - Invalid comment string causes export crash
UTF-8 validate the "gimp-comment" parasite and reject it on failure.
2016-05-30 18:56:29 +02:00
Michael Natterer be8146d529 app: don't invalidate all images on color config changes
Now all previews and the display shell connect to the color config
itself, there is no need any longer to connect to the global color
config's "notify" any longer from GimpImage. Also, the settings there
are for display purposes only, so nothing in the image itself needs
to be notified of the config change.
2016-05-30 10:51:18 +02:00
Michael Natterer b3c6163450 Bug 766988 - Colors applied to images are not color managed
Color manage the applied pattern in gimp_fill_options_create_buffer()
so filling and stroking with a pattern look right.
2016-05-29 19:41:12 +02:00
Michael Natterer fc2a4cd589 app: add gimp_fill_options_create_buffer()
Which creates a buffer from GimpFillOptions that can be applied to a
drawable. Eliminates three slightly different copies of the same
code. Also adds to the color history for each color fill, we missed
two places before.
2016-05-29 18:25:14 +02:00
Michael Natterer 4fefc3817c Bug 766988 - Colors applied to images are not color managed
Color manage colors applied when painting, and when filling, merging,
resizing and transforming drawables.
2016-05-29 17:51:06 +02:00
Michael Natterer 0f98eda5a5 app: remove gimp_context_[get|set]_[foreground|background]_pixel()
Artifacts from early GEGL posting.
2016-05-28 09:35:25 +02:00
Michael Natterer 0bfa402c1a Argh, this was meant to be squashed into the previous commit... 2016-05-26 22:18:50 +02:00
Michael Natterer cc92887908 libgimpcolor: add new object GimpColorTransform
which encapsulates a cmsHTRANSFORM and does all the pixel format
conversion magic. It has API to create transforms and proofing
transforms, and to convert pixels arrays and GeglBuffers.

Before, each place which has a transform had to keep around the
transform and its input and output Babl formats, and had to implement
lots of stuff itself. Now all that lives in GimpColorTransform,
removing lots of logic from many places, and pretty much removing lcms
from the public API entirely.

This removes including <lcms2.h>, LCMS_LIBS and LCMS_CFLAGS from
almost all directories and potentially allows to replace lcms by
something else.
2016-05-26 22:15:54 +02:00
Michael Natterer 5b4d0219d8 app: add GimpPickable::srgb_to_pixel()
which isn't really for "picking", but it just fits too nicely into
GimpPickable to not put it there.

Also add utility function gimp_pickable_srgb_to_image_color() which
takes a "real" (sRGB) GimpRGB value, transforms it to the pickable's
colorspace and puts it into an "image color" GimpRGB.
2016-05-23 01:33:52 +02:00
Michael Natterer f7842bc8db app: add gimp_image_color_profile_srgb_to_pixel()
which is the reverse of gimp_image_color_profile_pixel_to_srgb()
2016-05-23 01:18:55 +02:00
Michael Natterer 26251695b0 Bug 748749 - picked colors don't match image colors...
...when a color profile is active

Add GimpPickable::pixel_to_srgb() which puts a picked raw image
pixel into a GimpRGB. Default to gimp_rgba_set_pixel() but implement
pixel_to_srgb() in GimpLayer, GimpProjection and GimpImage and
run the pixel through gimp_image_color_profile_pixel_to_srgb().
2016-05-22 23:28:31 +02:00
Michael Natterer bb43a89ef8 app: treat the layer mask correctly in gimp_layer_get_opacity_at()
Only take the mask into account if it is actually applied.
2016-05-22 19:53:10 +02:00
Michael Natterer ce8e484764 app: fix color profile logic in gimp_image_convert_precision()
Not only the logic was broken, a local variable was also shadowing the
"dest_profile" variable and preventing the broken logic to be applied
at all. Double fail.
2016-05-21 00:37:28 +02:00
Michael Natterer 5080da50e6 app: move the undo impl object typedefs out of the *-types.h files
They are completely private to the undo system and don't need to
be used anywhere else. Removes some clutter from the typed headers.
2016-05-20 18:29:13 +02:00
Michael Natterer 2ef8719cbe app: rename more stuff from "floating sel" to "floating selection" 2016-05-20 16:46:26 +02:00
Michael Natterer 28e1a379e6 app: remove const qualifiers from all object parameters
They are unreliable because every type checking cast discards them,
they are useless anyway, visual clutter, added inconsistently, and
generally suck. Wanted to do this a long time ago, it was a bad idea
in the first place.
2016-05-19 23:54:14 +02:00
Michael Natterer 2b170e3a80 app: include gimpdrawable-floating-selection.h in gimplayer-floating-sel.c 2016-05-19 19:22:09 +02:00
Michael Natterer 81fd3e9c3f app: move GimpDrawable's FS to gimpdrawable-floating-selection.[ch]
and refactor it a bit to have separate functions for adding, removing
and updating the FS' drawable filter. Should be a lot more
understandable now.
2016-05-19 17:40:33 +02:00
Michael Natterer 201b11e230 app: add separate opacity and mode API to GimpDrawableFilter 2016-05-18 09:47:58 +02:00
Michael Natterer 265dfec525 app: split GimpApplicator's opacity and mode API into two functions
Added gimp_applicator_set_opacity() and remove the opacity argument
from set_mode().
2016-05-18 01:51:09 +02:00
Michael Natterer c0fb136203 app: add tooltips that mention that disabling color management == sRGB
Also say "better leave this enabled".
2016-05-16 17:41:04 +02:00
Michael Natterer 9fb70a44f2 app: rename GimpImageMap to GimpDrawableFilter
and gimpdrawable-filter.[ch] to gimpdrawable-filters.[ch] because of
the name clash.
2016-05-12 01:49:53 +02:00
Michael Natterer cb1a6024ff app: normalize gegl:distance-transform, it's unusuable otherwise 2016-05-12 00:13:33 +02:00
Michael Natterer 43990e8e0e app: more cleanup in GimpImageMap
Remove the filter area calculation code from gimp_image_map_apply().
Instead, automatically update the area when adding the filter to the
drawable, and when the selection changes. Also, connect to the
drawable's "removed" and remove the filter when the drawable gets
removed from the image.
2016-05-11 22:53:49 +02:00
Michael Natterer 4f0521c7cf app: don't call gimp_gegl_progress_connect() with a NULL text 2016-05-11 22:50:05 +02:00
Michael Natterer 477987dce3 app: make GimpImageMap a subclass of GimpFilter
Reduces members and all sorts of duplication and is a much better
abstraction of what it does. Also make it a lot smarter and
self-updating, chop up the apply() function and move its parts where
they belong. Also, it's now aware of selection changes and does the
right thing.

Don't abort GimpImageMapTool on selection changes, it now nicely
handles that.
2016-05-09 21:40:20 +02:00
Michael Natterer 143a2bcb95 app: make GimpImageMap setters update the drawable by itself
As in, don't require a call to gimp_image_map_apply() after setting.
2016-05-09 01:40:01 +02:00
Michael Natterer 54c0b047b2 app: add basic support for creating images with color profiles
Add "gboolean color_managed" and "GFile *color_profile" to
GimpTemplate. Add a toggle and profile combo to GimpTemplateEditor.
Honor the new template properties in gimp_image_new_from_template().

Using a GFile property instead of a GIMP_TYPE_CONFIG_PATH is
preliminary, see the previous commit. I'd like to use GFile more
directly when dealing with config files, this is for testing that.
2016-05-08 23:20:26 +02:00
Ell 8b11a505d9 app: Handle zero radius in gimp_channel_border()
Can only be triggered through PDB.  Currently assigns illegal values
to the GEGL ops' properties.
2016-05-08 19:22:24 +00:00
Ell 15d4908076 app, pdb: Modify gimp_channel_border() to take a style parameter
isntead of the feather parameter, and pass it to
gimp_gegl_apply_border().

Make the necessary changes to the rest of the code to maintain the
current behavior.

Mass parameter alignment changes to gimpchannel.h. Sigh #2...
2016-05-08 19:22:24 +00:00
Ell 45efe6c405 app: Modify gimp_gegl_apply_border() to take a style parameter
instead of the feather parameter.

The BORDER_STYLE_HARD and BORDER_STYLE_FEATHERED styles are implemented
using the "gimp:border" operation, as was done previously.  The
BORDER_STYLE_SMOOTH style is implemented by performing a "gimp:grow" and
a "gimp:shrink", and subtracting the shrunk image from the grown image
using "gegl:substract".

gimp_channel_border() is modified to pass either BORDER_STYLE_HARD or
BORDER_STYLE_FEATHER, depending on its feather parameter, to maintain
the current behavior.  The next commit replaces it with a style
parameter as well.

Mass parameter alignment changes to gimp-gegl-apply-operation.h.  Sigh...
2016-05-08 19:22:24 +00:00
Ell 46a9690353 app: Add GimpChannelBorderStyle enum
Will be used as a parameter to control the behavior of
gimp_channel_border(), and the corresponding "Select -> Border..."
action, instead of the feather flag.

Can be one of:

  - GIMP_CHANNEL_BORDER_STYLE_HARD: Current behavior, unfeathered.
  - GIMP_CHANNEL_BORDER_STYLE_SMOOTH: Smooth border, better handling
    partial selection, implemented as explained in the next commit.
  - GIMP_CHANNEL_BORDER_STYLE_FEATHERED: Current behavior, feathered.
2016-05-08 19:22:24 +00:00
Michael Natterer a544ad4718 app: #include "gimpimage-color-profile.h" in gimplayer-new.c 2016-05-08 19:56:16 +02:00
Michael Natterer 1da4236e44 app: set the image's "is color managed" in gimp_image_new_from_drawable()
based on the src image's setting.
2016-05-08 19:53:16 +02:00
Michael Natterer 8eb6cdf488 app: pass profiles around along with the buffers in the transform code
"transform" as in flip, rotate, affine. Same reasoning as in the
gimp_selection_float() commit below.
2016-05-08 18:35:40 +02:00
Michael Natterer 2739c34573 app: pass the right color profile around in gimp_selection_float()
This doesn make any difference because a NULL profile would do the
same, but it's safer to pass the actual profile instead of relying on
the magic meaning of NULL in the call to
gimp_layer_new_from_gegl_buffer().
2016-05-08 18:33:22 +02:00
Michael Natterer 5ec6d2c0f7 app: same fix as below in gimplayer-new.c
Don't use the (wrong) global display color managment switch to
determine whether or not to convert the buffer to the image's
profile. Use the image's "is color managed" switch.
2016-05-08 18:30:17 +02:00
Michael Natterer 0e3c7ea204 app: handle profile conversion correctly in gimp_layer_convert()
We used to depend on the global color management OFF switch from
prefs, but that's meant for display color management. Now, don't do a
profile transform if the target image's color management is disabled.
2016-05-08 18:23:09 +02:00
Michael Natterer cc9154b425 app: don't return any cached transforms is the image is not color managed 2016-05-08 18:20:19 +02:00
Michael Natterer 34a826d735 app: return built-in profiles from GimpColorManaged::get_color_profile(image)
if the image is not color managed.
2016-05-08 18:15:36 +02:00
Michael Natterer c28244c49d app: enable color management when the image is converted to a profile 2016-05-08 18:12:28 +02:00
Michael Natterer 7fffa9dc2a app: don't run and color profile import if the image is not color managed 2016-05-08 18:10:50 +02:00
Michael Natterer 801b1bb9bc app: reorder private functions in gimpimage-color-profile.c 2016-05-08 18:06:16 +02:00
Michael Natterer 81845552ef app: add a per-image "is color managed" switch
in order to enable/disable color management for this image. Completely
unused at the moment.
2016-05-08 18:02:57 +02:00
Michael Natterer 08b67de9bf app: don't disable profile import when display color management is off
It's the wrong switch, and the dialog has its own "don't ask me again"
logic.
2016-05-03 23:57:04 +02:00
Michael Natterer 58f8808847 app: transfer the right profile in gimp_image_new_from_drawable()
Use the drawable's profile not the image's.
2016-05-03 12:51:52 +02:00
Michael Natterer f1f91ecc2f app: don't reverse lists in GimpFilterStack and GimpUndoEditor
GimpList has a tail pointer now and can be traversed in reverse order.
2016-05-03 01:05:49 +02:00
Michael Natterer a659036b40 app: switch the list of tools to using "append" mode
and ret rid of registering tools in reverse order, and reversing the
list after deserializing it.
2016-05-01 16:05:44 +02:00
Michael Natterer 0ab6e6be69 app: make sure the last *visible* layer is displayed in normal mode
The bottom visible layer must be rendered in normal mode because
every other mode on top of nothing renders nothing.

Before, we would display a stack's last layer in normal mode, which
was a braindead attempt to make the layer stack look like in 2.8. Now
we set GimpFilter's "is-last-node" property the right way by looking
at the filters' visibility in GimpFilterStack.
2016-05-01 15:38:36 +02:00