Commit Graph

18263 Commits

Author SHA1 Message Date
Michael Natterer 917a63d189 app: move the image thumbnail bottom-left in the window icon
the wilber is already to-right, it just needs better images for this
purpose.
2015-10-26 02:13:22 +01:00
Michael Natterer cece88ba95 app: fix call to gdk_pixbuf_composite() when rendering the window icon 2015-10-26 01:58:00 +01:00
Michael Natterer 19b984e1df app: fix the image window's thumbnail size and shape
and render a wilber on top of it, yay! Step one, this can still be
nicer...
2015-10-26 01:09:08 +01:00
Michael Natterer 68a9835d56 Bug 756822 - Colors/Desaturate/Luminosity should operate on linear RGB
Add GIMP_DESATURATE_LUMINANCE to enum GimpDesaturateMode and rename
GIMP_DESATURATE_LUMINOSITY to GIMP_DESATURATE_LUMA.

Keep GIMP_DESATURATE_LUMINOSITY as deprecated compat value and add it
to the script-fo and pygimp compat constants.

Change GimpOperationDesaturate to process GIMP_DESATURATE_LUMINANCE
with linear "RGBA float".
2015-10-22 19:50:56 +02:00
David Gowers c6563b676f Bug 665187 - Fuzzy Select by Alpha
Implement 'Alpha' criterion for selection tools
2015-10-22 19:05:01 +02:00
Michael Natterer ac1c6d7864 app: add progress reporting to gimp_drawable_convert_type()
so it doesn't sit there appearing to do nothing while converting an
image with profile to gamma/linear.
2015-10-21 22:22:30 +02:00
Michael Natterer 4e04e2ff30 Revert "Bug 751553 - Linear precision doesn't display the image correctly"
This reverts commit 61ae6b10de.

Re-enable color profile conversion on precision conversion, it's
fixed now.
2015-10-21 20:27:06 +02:00
Michael Natterer b9305c7e67 app: make color profile conversions undoable again
which I broke in commit abe3ad37. Spotted by Massimo.
2015-10-21 20:23:55 +02:00
Michael Natterer 61ae6b10de Bug 751553 - Linear precision doesn't display the image correctly
Disable the new conversion code, something is broken...
2015-10-21 00:27:34 +02:00
Michael Natterer ecd4752072 Bug 751553 - Linear precision doesn't display the image correctly
When converting and image with a color profileimage between linear and
gamma, create a new profile using the new API in GimpColorProfile,
convert the layers to that profile and tag the image with the new
profile.

If creating a new profile fails, convert to the right builtin profile
(linear rgb or sRGB from GimpColorProfile), but that code should be
considered a fallback that will be prevented from happening in the
convert dialog (at least the user will be informed).
2015-10-20 23:53:47 +02:00
Michael Natterer abe3ad3780 app: use gimp_gegl_convert_color_profile() to profile-convert images
instead of duplicating the almost identical code.
2015-10-19 01:51:35 +02:00
Michael Natterer 69abd4d972 app: add progress handling to gimp_gegl_convert_color_profile,transform() 2015-10-19 01:29:22 +02:00
Michael Natterer 7521591061 app: fix typo: s/flip_result/clip_result/ in gimpitem.h 2015-10-18 21:00:21 +02:00
Michael Natterer 91fbc3af01 Bug 734573 - Zoom to selection
Implement View -> Zoom -> Zoom to Selection using
gimp_display_shell_scale_to_rectangle()
2015-10-18 15:26:17 +02:00
Michael Natterer 5bc9ad947a app: fix gimp_display_shell_scale_to_rectangle() to also do only scrolling
which means: also scroll to the rectangle if the scale doesn't change.
2015-10-18 15:18:23 +02:00
Michael Natterer ded7c8f585 app: add gimp_display_shell_scale_to_rectangle()
and move the magnify tool's rectangle zoom logic to the new function.
2015-10-18 14:59:30 +02:00
Michael Natterer b7f471b1a3 app: change some integers in gimpdisplayshell-scale.c to gdouble
which does not have any effect by itself, but is needed for fixing
viewport calculation for rotated canvases.
2015-10-18 14:40:19 +02:00
Michael Natterer 7ec04e4afe app: get rid of hardcoding GDK_SHIFT_MASK in tools/
gimp_suggest_modifiers(): change "shift_format" and "control_format"
parameters to "extend_selection_format" and "toggle_behavior_format",
which fixes the longstanding problem that the function did the right
thing only by accident.

tools: use gimp_get_extend_selection_mask() instead of GDK_SHIFT_MASK
which is not 100% semantically correct in all cases, but at least a
step in the right direction to make the tool modifiers easier to
improve.
2015-10-17 15:31:08 +02:00
Michael Natterer a2ad257711 Bug 756678 - Layer opacities change upon saving and reopening an xcf file
Add new XCF property FLOAT_OPACITY and always save both the old 8-bit
and the new float opacity of layers and channels. Float opacity is
saved after the 8-bit one so when loading, it overwrites the limited
8-bit value with the proper precision. Do not increase the XCF version
number because old GIMP versions will simply skip the unknown
FLOAT_OPACITY and keep using the 8-bit value.
2015-10-16 21:59:11 +02:00
Øyvind Kolås 8ca9bfc291 app: burn-mode, invert before blending 2015-10-15 13:52:20 +02:00
Øyvind Kolås 23f118632c app: clamp blended results for some compositing ops
Quite probably we shouldn't even clamp at the end, not doing that would speed
up compositing. See bug 744265.
2015-10-15 00:25:01 +02:00
Michael Natterer 93fdaa0597 Bug 731279 - Tool Preset Editor not working correctly
This (doesn't quite) fix an obscure part of the tool preset bugs: when
changing the brush on a GimpPaintOptions instance, we might or might
not change the brush size, aspect etc. to the set brush's native
values, possibly overwriting the intended values from a tool preset.

Implement GimpConfig::copy() and copy the affected values again after
the entire object has been copied, so we actually use the value of
gimp_config_copy()'s "source" object.

This would fix that particular tool preset problem if there wasn't
another bug that is still unfixed, stay tuned...
2015-10-14 23:02:07 +02:00
Michael Natterer 92eed69f1b app: add new action to restore a tool preset from the list
In order to make things more obvious here. Before, a tool preset could
only be rstored from the list by selecting it, which only worked if
another preset was active before. Now the selected preset can easily
be restored again.
2015-10-14 12:32:47 +02:00
Elle Stone e089095631 Bug 744265 - layer mode 'addition' makes wrong gray values
Move CLAMP code in addition blend mode (CLAMP the result, not an
intermediate value).
2015-10-13 22:47:31 +02:00
Michael Natterer 8a7665d4b7 app: fix a comment in gimpcontext.c 2015-10-13 01:06:41 +02:00
Michael Natterer d9b3aaa9b8 Bug 756357 - Convert to Color Profile does not update the progress bar
Update the progress also while converting a layer, not only between
layers.
2015-10-10 22:43:19 +02:00
Jehan 662ade6911 Revert "app: save first and last color of the blend tool gradient..."
This reverts commit 2cef834198.
This feature is "undiscoverable" according to Mitch, and we are not sure
how much the endpoint colors are special to the user.
2015-10-08 19:33:11 +02:00
Jehan c7adff4f6f Revert "app: save gradient first and last color with dynamics color output..."
This reverts commit 15b5b2c8b3.
This feature is "undiscoverable" according to Mitch, and we are not sure
how much the endpoint colors are special to the user.
2015-10-08 19:33:07 +02:00
Jehan 15b5b2c8b3 app: save gradient first and last color with dynamics color output...
in the recently used colors palette.
2015-09-30 17:30:50 +02:00
Jehan 2cef834198 app: save first and last color of the blend tool gradient...
in the recently used colors palette.
2015-09-30 17:10:10 +02:00
Jehan 52f6a2aeb4 app: save color history when a color is used.
Now the history of recently used colors is not updated when selecting
in the color dialog anymore, but when a color is actually used.
Tools supported right now are: Ink, MyPaint brush, all PaintBrush tools,
bucket fill and eraser (background color on non-alpha drawables).
Moreover from now on, colors already saved are properly moved to first
position when reused.
2015-09-30 16:39:05 +02:00
Michael Natterer cb8e16aae8 app: move app/batch.[ch] to app/core/gimp-batch.[ch]
There is no reason batch processing should be considered "glue code".
2015-09-30 01:57:33 +02:00
Jehan 84360b1956 app: indentation fix. 2015-09-29 00:32:24 +02:00
Jehan cd2b395194 app: batch commands won't run on existing instance. 2015-09-28 22:31:21 +02:00
Jonathan Tait 7167586919 Bug 754998 - Warp Transform Tool > Animation> Frames...
...spinbox does not step/page correctly

Correct the increments to be integers not floats.
2015-09-28 20:22:57 +02:00
Michael Natterer 0bc3a82c77 Bug 755703 - new gaussian blur: default Abyss policy to Clamp
Fix operation name in last commit.
2015-09-28 17:40:47 +02:00
Michael Natterer 1aeeada2d8 Bug 755703 - new gaussian blur: default Abyss policy to Clamp
Default to CLAMP in the PDB compat wrappers that replace the old
plug-ins.
2015-09-28 17:27:29 +02:00
Michael Natterer 560841606c app: don't access GtkTargetList's members directly
It's an opaque struct in GTK+ 3.x, so let's fix it here instead of
adding another patch to the gtk3-port branch.
2015-09-28 15:28:57 +02:00
Michael Natterer b17f3fbfce app: fix if() logic in gimp_plug_in_procedure_handle_return_values()
if (! x > 0) is not the same as if (! (x > 0)) and beyond that it's
much less stupid to write if (x == 0)...
2015-09-27 13:40:57 +02:00
Michael Natterer c76bd06887 app: cosmetic cleanup in gimp_image_parasite_attach() 2015-09-24 21:33:30 +02:00
Michael Natterer 6fe0a42c5d Bug 755487 - redundant g_object_unref crashes GIMP
Remove redundant g_object_unref() from gimp_image_parasite_attach().
2015-09-23 21:53:29 +02:00
Michael Natterer 526a3a6020 Bug 755363 - Non-void function should return a value
Use g_return_val_if_fail() in function returning non-void.
2015-09-21 20:37:29 +02:00
Michael Natterer 616c57b8cf Bug 478528 - Layer and Image previews are not color managed
Fix color managed layer previews when adding/removing alpha:

Implement GimpDrawable::alpha_changed() in GimpLayer and emit
GimpColorManaged::profile_changed() so all cached color transforms are
nuked.
2015-09-21 20:30:15 +02:00
Michael Natterer 9550fbff3c Bug 748749 - picked colors don't match image colors...
...when a color profile is active

This commit adds more (still unused) infrastructure to fix this bug:

Ee now keep around color transforms from layer pixels to "R'G'B'A
double" (which is GimpRGB's format) and back. Also add utility
function gimp_image_color_profile_pixel_to_srgb() which converts a
picked pixel to GimpRGB, using the cached color transform.
2015-09-20 21:17:54 +02:00
Michael Natterer 29fee56914 app: fix visibility of the color picker tools info window
Since commit 867b1f7e the window did always pop if it was set to
visible once, even if closed and "Use info window" disabled.

Fix this by adapting the show logic to the fact that we now keep the
widget alive across images/displays.
2015-09-20 00:37:05 +02:00
Michael Natterer 5d7710a8a5 app: fix comment in xcf_load_image() 2015-09-15 23:02:54 +02:00
Michael Natterer 1833d292cc Bug 754927 - Non-void function should return a value
Fix return value glitch in last DND-related commit.
2015-09-12 20:26:56 +02:00
Julien Nabet 456d535232 Bug 69496 - Paint tools, Text tool: Click and drag font/brush/pattern/gradient...
...from tool options crashes GIMP

Applied a modified patch that actually removes the target list if it
became empty. This may or may not fix the bug; I can't tell because I
couldn't reproduce it any longer.
2015-09-10 23:48:00 +02:00
Michael Natterer 145a05ac9d Bug 754774 - Choosing "convert" upon import results in wrong colors...
...being displayed

Need to call gimp_image_flush() on all newly opened images so whatever
image states are properly updated:

Call file_open_sanitize_image() at the end of loading (after profile
import), and re-enable the flush() call in the function.

Also, don't fiddle with undo disabling and enabling in
gimp_image_import_color_profile(). Instead, disable undo before
calling the function.
2015-09-09 21:21:20 +02:00
Michael Natterer 396bc89e56 app: better temporary debug output in gimp_display_shell_profile_update() 2015-09-09 21:09:31 +02:00
Michael Natterer 7d04e89ccb app: proper precondition check in gimp_image_convert_color_profile()
Use GIMP_IS_COLOR_PROFILE(profile) instead of profile != NULL because
GimpColorProfile is a GObject now.
2015-09-09 21:08:07 +02:00
Michael Natterer 03e12184f5 app: reduce casts in file-save-dialog.c and file-open-dialog.c
also, name variables like their type, e.g. a GimpOpenDialog is always
called open_dialog now.
2015-09-09 21:04:18 +02:00
Michael Natterer a9c7af8b70 app: fix image type check in gimp_image_color_managed_get_color_profile()
Return the builtin profile for all except GRAY images, not for all
except INDEXED images, the latter have an RGB colormap.
2015-09-09 20:46:28 +02:00
Michael Natterer d370e9c135 Bug 754171 - cmd - missing modifier key to configure input controllers
Forgot to replace "control" with "primary" in the keyboard controller
event names.
2015-09-09 14:59:32 +02:00
Michael Natterer fb92321d43 Bug 754171 - cmd - missing modifier key to configure input controllers
Need to call gdk_keymap_map_virtual_modifiers() on the parsed
modifiers in order to the the right ones on all platforms (OS X).
2015-09-09 12:11:43 +02:00
Jehan 5f5c3db3ca app: migration from "control" to "primary" in controllerrc.
Since commit e50103c, we use the more generic "primary", allowing better
support for OSX "cmd" instead of X11/Win "ctrl".
2015-09-09 02:17:31 +02:00
Jehan 5cc77960c0 app: file-export and file-export-to migration were broken...
since commit 23d0eb1.
2015-09-09 02:17:31 +02:00
Michael Natterer 867b1f7efa Bug 754713 - On-canvas dialog of color picker tool always displays...
...in initially active tab

We intend reuse the dialog across displays, so don't destroy the
dialog in GIMP_TOOL_CONTROL_HALT, only hide it. This way the dialog
keeps its detached state.
2015-09-09 01:24:19 +02:00
Michael Natterer 326ef2f7b2 app: put the GimpOverlayDialog detach tooltip on the with widget 2015-09-09 01:24:19 +02:00
Michael Natterer bd9afce9e2 app: some cleanup in the new file dialog classes 2015-09-09 00:01:12 +02:00
Jehan d1e2b2c162 app: gimp_file_dialog_get_default_folder() must return a value.
Oups!
2015-09-08 23:59:13 +02:00
Jehan 3c9a4a24e1 app: reorder GimpFileDialog so that method implementations are together. 2015-09-08 23:29:01 +02:00
Michael Natterer e50103ccda Bug 754171 - cmd - missing modifier key to configure input controllers
Don't hardcode modifier masks in the wheel and keyboard input
controllers. Instead, hardcode accelerator strings and get the right
modifier mask from gtk_accelerator_parse() at runtime.

This turns e.g. "<Shift><Primary>" into Shift+Cmd on OS X and into
Shift+Ctrl on X11 and Windows.

Also rename the events accordingly and change the event names in the
default controllerrc.

Unrelated: reorder the actions so the ones with less modifiers are
listed first, and change the order of action matching to match the
actions with most modifiers (the last ones) first.
2015-09-08 23:24:48 +02:00
Jehan 4441133a8b app: get_default_folder() is now a class method. 2015-09-08 23:13:03 +02:00
Michael Natterer df2a485907 Bug 754713 - On-canvas dialog of color picker tool always displays...
...in initially active tab

gimp_tool_gui_update_shell(): implement the "overlay" case and hide the
gui on the previous shell, then show it on the new one.
2015-09-08 21:53:24 +02:00
Michael Natterer 22fc50c279 app: rename all values of enum GimpContextPropMask
from GIMP_CONTEXT_FOO_MASK to GIMP_CONTEXT_PROP_MASK_FOO.
Also rename the FIRST and LAST values of enum GimpContextPropType.
2015-09-08 21:18:49 +02:00
Michael Natterer 2c8141d96d app: reorder functions in GimpSaveDialog so method impls are together
Also, "real" is in the name of a method's default impl, not its impl
in a subclass.
2015-09-08 10:51:05 +02:00
Michael Natterer 997314d4e9 Bug 754518 - gimp-drawable-curves-spline does not take the advertised...
...number of points

gimp_curves_config_new_spline(): set the GimpCurve's n_points, not
n_samples. The bug title describes exactly what was happening.
2015-09-07 21:43:18 +02:00
Jehan 55f319de04 Bug 754652 - About dialog does not credit contributors for 2.10. 2015-09-07 17:04:23 +02:00
Michael Henning dbe5982753 app: Always return a value from results_list_on_key_press_event 2015-09-06 19:44:33 -04:00
Michael Natterer 4479cedf13 app: rename mask enum values GIMP_COMPONENT_RED,GREEN,BLUE etc.
to GIMP_COMPONENT_MASK_RED,GREEN,BLUE etc.
2015-09-07 00:35:02 +02:00
Jehan a7e7a0bcb9 app: fix Search Popup height saving...
and implement it as the size_allocate() class method rather than
"configure-event" signal handling.
2015-09-06 23:10:26 +02:00
Jehan bead93fdb8 app: fix whitespaces.
Mitch wanted to kill me, I had no other choice than clean this quick!
2015-09-06 21:02:26 +02:00
Jehan cbef12d645 app: Action Search dialog now uses the new GimpSearchPopup widget...
... instead of making its own window. Inheriting from GimpPopup, it is
also friendlier to sloppy mouse, etc.
2015-09-06 20:48:05 +02:00
Jehan 6a9d449eac app: new GimpSearchPopup widget.
Based on GimpPopup as parent, this is a generic search popup widget,
which can display any list of action. The results construction logics
is not part of the widget, and is built through a callback instead,
which could allow to use it to create different dialogs.
2015-09-06 20:48:05 +02:00
Michael Natterer e491bf8e09 Bug 754221 - Possible preview widget bug
gimp_drawable_get_sub_preview(): both the preview buffer's scale
factor and the src coordinates in the drawable were calculated
wrongly. Found by Massimo.
2015-09-06 17:23:55 +02:00
Hartmut Kuhse a545a4b314 app: fix setting color profile to image after convert
While loading an image with color profile, gimp offers the possibility to convert it to the builtin profile. Setting the new color profile before converting, deletes the old one and results in a segmentation fault.
2015-09-06 11:01:20 +02:00
Jehan 316d94d800 app: s/0/GDK_GRAB_SUCCESS/.
Let's use semantic names rather than raw meaningless values.
2015-09-05 22:30:56 +02:00
Jehan 3f51d4eb48 app: use "map-event" if you want to make sure that a window is mapped.
The "map" signal does not mean a widget is mapped. It may be emitted
before. Yet pointer and keyboard grabs won't work on non viewable
widgets and will fail with GDK_GRAB_NOT_VIEWABLE.
For some reason, a GtkWindow with type GTK_WINDOW_POPUP was always
mapped when "map" is emitted but not yet with type GTK_WINDOW_TOPLEVEL
(at least in my tests). Thus switch to "map-event" to make sure the
widget is actually mapped.
2015-09-05 22:27:11 +02:00
Michael Natterer a4a0ec9598 plug-ins, pdb: remove the maze plug-in and add a PDB compat proc 2015-09-04 00:34:38 +02:00
Michael Natterer 3f02b2aaf2 app: add gegl:maze to Filters -> Render -> Pattern 2015-09-03 22:12:23 +02:00
Michael Natterer 09fed0a0e5 Bug 478528 - Layer and Image previews are not color managed
Implement color management in GimpViewRenderer: if the viewable is a
GimpColorManaged (true for images and layers), keep around a
GimpColorTransform and convert the preview image to display colors.
2015-09-03 02:25:51 +02:00
Michael Natterer b45d31072b app, libgimpcolor: refactor GimpColorManaged::get_color_profile()
to not return a reference that has to be dropped. Also allow NULL to
be returned if the managed cannot have a profile. If it can have one,
get_color_profile() still always returns a profile (either the
assigned one, or a generated built-in one).
2015-09-03 01:36:02 +02:00
Michael Natterer 7c95676f88 app: implement the GimpColorManaged interface in GimpLayer
and change GimpImage and GimpItemStack to emit the "profile-changed"
signal when the image's profile changed. Also connect GimpViewRenderer
to "profile-changed" if the viewable is a GimpColorManaged and
invalidate the preview.
2015-09-03 00:21:40 +02:00
Michael Natterer 76ff1c1584 Revert "app: add ::get_color_profile() to GimpPickable and GimpProjectable"
This reverts commit 5c8ffdf6c5.

It was a bad idea, we have the GimpColorManaged interface for that.
2015-09-03 00:21:09 +02:00
Michael Natterer f374377e9b app: pass the widget to all gimp_view_renderer_render_foo() functions
We will need the widget for color managing previews; it's also more
consistent to pass the widget to all render_foo() functions, not only
to render_icon().
2015-09-02 21:12:59 +02:00
Michael Natterer 9775b2083b app: simplify display update when the color management config changes
gimp_image_constructed(): connect to "notify" on GimpColorConfig
and call gimp_color_managed_profile_changed() on the image.

Remove the "notify" handler on GimpColorConfig from
gimpdisplayshell-handlers.c because it already connects to the
image's "profile-changed" signal.

Additionally, implement GimpColorManaged::profile_changed() in
GimpImage and invalidate the image and all layer previews. One step
closer to color managing image and layer previews.
2015-09-02 21:01:17 +02:00
Michael Natterer fa584ef1c1 app: add gimp_gegl_convert_color_transform() to gimp-gegl-loops.[ch]
It's split out of gimp_gegl_convert_color_profile(), used from there,
and will also be used to color manage image and layer previews.
2015-09-02 20:46:02 +02:00
Jehan 829f5ec3d6 app: GimpFileDialog state saving now implemented as a class method.
By default, it only saves the current file filter, but it allows a child
to implement its own state. It has been implemented by GimpSaveDialog to
save the preferred compatibility mode as well.
2015-09-02 20:05:11 +02:00
Jehan b17e1b1cfc app: split GimpFileDialog into Gimp(Open|Save|Export)Dialog subclasses.
The code refactoring allows better readability which will allow in turn
to add more complex specific features making good use of the save/export
split concept.
2015-09-02 20:05:01 +02:00
Jehan c7a2574136 app: parasite renamed to gimp-xcf-compatibility-mode.
Commit 0ea7d85 was misunderstanding due to foo-lang (language spoken by
Mitch and others, but not me, it would seem!). :-P
2015-09-02 11:47:51 +02:00
Michael Natterer fd0203ce80 libgimpwidgets: change parameters of gimp_widget_get_color_transform()
Change GimpColorManaged to GimpColorProfile.
2015-09-01 23:40:57 +02:00
Michael Natterer ebcd7cacbb app: redo widget grouping in the levels dialog, still far from good
but a bit more logical. This totally needs to change again.
2015-09-01 22:33:42 +02:00
Michael Natterer 5c8ffdf6c5 app: add ::get_color_profile() to GimpPickable and GimpProjectable
which currently all end in a call to gimp_color_managed_get_color_profile()
except for channels and masks. This is currently unused infrastructure but
will be used for things like layer previews, and return NULL if called
on a mask or channel, or if color management is disabled, or whatever.
2015-09-01 22:27:31 +02:00
Jehan 0ea7d85570 app: rename compat parasite s/gimp-compatibility-mode/gimp-xcf-foo/
Not sure why, ask Mitch! :-)
2015-09-01 19:47:48 +02:00
Jehan 9d9f30e7c0 app: warning message when compat mode set yet cannot be applied.
This would typically happen if the compat mode was set earlier through
the save dialog, then later changes in the image render it inapplicable.
When this happens, we unset the compat mode, and saves without error,
but still emit a warning for the user to know the compatibility got
dropped.
2015-09-01 19:36:40 +02:00
Jehan cb84d4bd7e app: save compatibility mode data in a parasite.
If one explicitely enabled the compat mode on an image, we should assume
this mode should be reused upon following saves, even after shutdown.
2015-09-01 19:27:56 +02:00
Jehan 55bdd4e817 app: check the XCF compat mode is still possible before saving.
Even if you saved previously in compatibility mode, you may have used
new features since, which would cancel the compat mode flag.
2015-09-01 16:06:29 +02:00
Jehan bdece29d8c app: keep track of compatibility mode on an image.
If one explicitly enables the compatibility mode, one expects this to
be applied on following saves of the same image as well.
2015-09-01 15:20:28 +02:00
Michael Natterer 216da3b5e2 Bug 754297 - Show Layer Mask should not use the layer blend mode
Call gimp_layer_update_mode_node() also when removing a mask, and
change it to only do its magic if there actually is a mask (don't only
look at the "show_mask" boolean).
2015-09-01 10:27:43 +02:00
Michael Henning 0ff7ab3712 app: Fix typo
Pointed out by prokoudine on irc after it was introduced in e2bdfd41
2015-08-31 20:24:50 -04:00
Mukund Sivaraman 74bc034638 app: Clarify message shown in unstable builds 2015-08-31 18:49:37 +05:30
Michael Natterer e2bdfd41e2 Bug 750954 - Make tips of the "Black point" and "White point" buttons...
...in the Levels dialog explain the difference between them

Improve the tooltips of the pick buttons to say

"Pick FOO point for {all channels|the selected channel}"
2015-08-31 00:09:22 +02:00
Michael Henning bb9170bdbf Bug 754297 - Show Layer Mask should not use the layer blend mode 2015-08-30 14:10:43 -04:00
Michael Natterer 802a53fa54 Bug 723392 - Pasting an image replaces color profile with default one
gimp_image_duplicate(): set the new image's color profile *before*
copying layers to it, or the new layers will be automatically
converted to "no color profile aka sRGB", but then tagged with the
original profile anyway.
2015-08-30 01:31:59 +02:00
Michael Natterer e83d5e7090 plug-ins, pdb: remove the lcms plug-in and add PDB compat procedures 2015-08-27 22:06:25 +02:00
Michael Natterer 4266f86e08 app: remove tons of linker workarounds from Makefilea
either linkers got smarter or our structure got better, or this breaks
on whatever other linkers again...
2015-08-27 21:44:15 +02:00
Michael Natterer 46eef4d09d app: remove references to plug_in_icc_profile_apply_rgb() from Makefiles 2015-08-27 13:52:26 +02:00
Michael Natterer 97e55692eb app: the blend tool was rendering all gradients off-by-0.5
When calculating the color of a pixel, we want to calculate the color
at its center, not at its top-left corner. Found by Raymond Jennings.
2015-08-26 23:23:16 +02:00
Michael Natterer 05add456bb app: add _gimp_image_update_color_profile() to update the cached profile
and call it when an "icc-profile" parssite is attached or detached.
This removes code duplication and creates a place to conveniently
update more cached profiles and transforms, such as from/to sRGB for
color picking and applying.
2015-08-26 19:16:17 +02:00
Michael Natterer a66d867da9 app: add a dest profile details view to the profile assign/convert dialog 2015-08-26 12:36:43 +02:00
Michael Natterer 37a3d423e9 Bug 679387 - Add "select pixels with this color" from colormap
Add gimp_gegl_index_to_mask() and gimp_channel_select_by_index() and
around it actions, callbacks and GUI in the colormap dialog.
2015-08-26 01:06:34 +02:00
Michael Natterer 3ca15939ff app: fix signature of gimp_curves_tool_color_picked()
which I forgot in yesterday's color picking refactoring.
2015-08-25 23:51:33 +02:00
Michael Natterer b5f55ba0ce Bug 749123 - File->Open thumbnail information label misaligned...
...until dialog window is resized

Immediate eye cancer guaranteed when looking at this patch.
2015-08-25 23:05:25 +02:00
Michael Natterer eb5bdebe6a app: don't emit useless "name-changed" signals from GimpObject
if the same name is set via gimp_object_set_static_name() or
gimp_object_take_name() (gimp_object_set_name() and
gimp_object_set_name_safe() already had the check).

Since this is a slight behavior change it might have subtle side
effects; it definitely fixes GimpThumbBox thumbnail state to not
always re-create the thumbnail on click, which was happening since
porting to GFile (which switched from gimp_object_set_name() to
gimp_object_take_name()).
2015-08-25 18:39:17 +02:00
Michael Natterer 8c80ee14ff Bug 748749 - picked colors don't match image colors...
...when a color profile is active

This commit doesn't fix anything, but it prepares the code to do the
right thing:

It passes the actual raw image pixels through the entire color picking
mechanism to the widgets which display colors, particularly
GimpColorFrame.

This is needed for GimpColorFrame's "Pixel" mode (as opposed to its
RGB, HSV etc. modes) which is supposed to show the raw pixel values
from the image.

Before this commit, it was recreating the raw pixel values from the
GimpRGB value it knows, which will become impossible when we correctly
pick color managed GimpRGB values soon.
2015-08-25 00:05:59 +02:00
Michael Natterer b51ee77ec0 app: implement the "Convert to RGB Working Space" import dialog in the core
Add gimp_image_import_color_profile(), a GUI vtable entry
query_profile_policy() and a new dialog which returns the profile
policy and the profile to convert to. Get rid of the wrapper that
calls the lcms plug-in for that dialog, the plug-in is now completely
unused.

This commit doesn't add any new features, it's just the former lcms
plug-in dialog implemented in app/ (except the little fix that it is
now aware of linear vs. gamma images).
2015-08-23 12:59:12 +02:00
Michael Natterer dc51a89427 app: add helper function gimp_color_profile_label_new()
which is an expander showing a profile's label, and when expanded has
detailled information about the profile. Use it in the color profile
dialog.
2015-08-23 10:41:34 +02:00
Michael Natterer 4161ea9cd7 Bug 750920 - Show commit number in About dialog
Done.
2015-08-21 10:27:03 +02:00
Michael Natterer b8efc79d03 app: add the image's color profile's label to th default window title 2015-08-20 22:34:43 +02:00
Michael Natterer 77dac3ea60 Bug 555562 - GIMP should ask before applying working space profile
Get rid of the "configurable RGB working space profile".

Instead, turn GimpColorConfig's "rgb-profile" property into a
"Preferred RGB profile" thing that is only a hint and never used
without explicit user interaction. Present it next to the built-in
profile in the profile combo boxes and call it "Preferred" in the
prefs dialog and its tooltip.

Most importantly, don't use it as the image's profile when the image
is not tagged with a profile. Untagged images are now always in the
sRGB or linear RGB built-in color spaces.

This commit reduces the "Apply color profile" dialog on file import to
a simple "Convert to built-in RGB", but that dialog is about to be
moved to the core and improved anyway.
2015-08-20 16:02:22 +02:00
Michael Natterer dd8a822aae Bug 723392 - Pasting an image replaces color profile with default one
Use black point compensation when converting color profiles during
copy/paste and drag/drop.
2015-08-19 17:28:39 +02:00
Alexander Larsson 0e10349711 GimpImageWindow: Chain up from constructed
https://bugzilla.gnome.org/show_bug.cgi?id=751507
2015-08-17 11:35:57 +02:00
Michael Natterer 39de67cf4e app: fix undo/redo of profile assign/convert operations
The undo code needs to update the image's cached GimpColorProfile too.
2015-08-17 11:21:48 +02:00
Michael Natterer a36f37b2f4 app: make is impossible to tag the image with a built-in profile
by moving the code preventing it to more low-level places. The piece
in gimp_image_parasite_attach() is particularly evil.
2015-08-17 10:37:55 +02:00
Michael Natterer d05bcba33d app: push an undo group around assigning a color profile
We now potentially change two parasites not just one.
2015-08-16 21:22:12 +02:00
Michael Natterer 68514d0cbd app: unset the "icc-profile-name" parasite when a profile is assigned 2015-08-16 20:54:16 +02:00
Michael Natterer 3f09865384 app: drop the image's cached GimpColorProfile when the parasite is removed 2015-08-16 20:39:16 +02:00
Michael Natterer 701ba8656a app: use gimp_image_get_color_profile() instead of gimp_image_get_icc_parasite() 2015-08-16 20:39:16 +02:00
Michael Natterer cd07627167 app: simplify gimp_image_new_from_drawable()'s color profile code 2015-08-16 19:45:04 +02:00
Michael Natterer 1715e1e60b app: keep GimpImage's profile around as GimpColorProfile
not only as parasite. This way we avoid having to create the profile
in each call to gimp_image_get_color_profile(). Also keep the built-in
profiles around in gimp_image_get_builtin_color_profile(). Add/remove
refs and unrefs as needed in all users of these functions.
2015-08-16 19:38:11 +02:00
Michael Natterer 235b4a5a67 Bug 723392 - Pasting an image replaces color profile with default one
gimp_layer_convert_type(): implement color profile conversion. This
should fix all DND operations between images with different profiles.
2015-08-16 16:00:32 +02:00
Michael Natterer 76782e622d app: add "gboolean convert_profile" to GimpDrawable::convert_type()
also add "GType old_type" to GimpItem::convert() so implementations
can do things depending on the type of the original item.

In gimp_layer_convert(), if the original item is also a layer, and
color management is not off (with a FIXME because this is the wrong
check), pass convert_profile = TRUE to gimp_drawable_convert_type().

There is no color profile conversion anywhere behind this, this is
just an API change commit.
2015-08-16 15:56:28 +02:00
Michael Natterer e8a5f285a7 app: change GimpBuffer to keep around an actual GimpColorProfile
not an icc_data blob. This simplifies the code using GimpBuffers
together with color profiles.
2015-08-16 13:14:56 +02:00
Michael Natterer b5264ec1be Bug 723392 - Pasting an image replaces color profile with default one
Make sure that paste buffers are always tagged with a profile. This
should fix copy and paste between gamma and linear images.
2015-08-15 19:15:14 +02:00
Michael Natterer 9cf455f915 app: use gimp_gegl_convert_color_profile() in gimp_layer_new_convert_profile() 2015-08-14 22:43:49 +02:00
Michael Natterer b03f0fc6e2 app: add gimp_gegl_convert_color_profile()
which converts a buffer with a profile into another one with another
profile. The function tries to avoid the lcms transform by checking if
a simple gegl_buffer_copy() has the same result.
2015-08-14 22:39:18 +02:00
Michael Natterer cafc3b3c3e app: fix a double semikolon in gimpdisplayshell.c 2015-08-14 22:37:52 +02:00
Michael Natterer 514fbe0d66 Bug 723392 - Pasting an image replaces color profile with default one
gimp_edit_extract(): attach the profile to the copied buffer also when
the source is the image. Fixes "Copy Visible".
2015-08-14 22:34:29 +02:00
Michael Natterer 875314dd19 Bug 723392 - Pasting an image replaces color profile with default one
gimp_layer_new_convert_profile(): if there is a profile, always use
lcms to copy between the buffers, to avoid the additional gamma
conversion gegl_buffer_copy/get() would do in some cases. This should
fix copying between linear and gamma images.
2015-08-14 18:03:31 +02:00
Michael Natterer e868cfeed8 Bug 723392 - Pasting an image replaces color profile with default one
In gimplayer-new.c, convert new layers to the image's profile if color
management is not disabled in prefs. This should convert pixels from
whatever source if they have a profile attached. If they don't have a
profile, no conversion is done. I'm not entirely sure if this
automatic conversion is always the right thing to do, please test.
2015-08-14 00:08:51 +02:00
Michael Henning 3e0d10d860 win: Group gimp windows together on the taskbar.
The plug-ins and the main window used to be separate.
2015-08-10 22:27:45 -04:00
Jehan c402f10aae app: allow item numbering schemes with fixed number of digits.
If someone ended a layer name with 001, one would expect the next layer
to be 002 and not 2. We now account for this.
2015-08-08 19:05:37 +02:00
Michael Natterer fa5d28aad3 plug-ins, pdb: remove "set" and "set-rgb" from the lcms plug-in
and add PDB compat procedures.
2015-08-05 01:03:33 +02:00
Michael Natterer d71cd602a8 app: add color-profile-dialog.c as replacement for the lcms plug-in's GUI
Uncomment and implement the menu items and actions to invoke the
dialog. This new code also does the (alomst) right thing to linear
images, unlike the lcms plug-in.
2015-08-04 22:20:32 +02:00
Michael Natterer cac04aed78 app: add gimp_image_get_builtin_color_profile()
which returns a color profile for the image as if nothing was
configured, currently either the builtin srgb or linear_rgb profile.
2015-08-02 23:27:06 +02:00
Michael Natterer 1ca3812396 app: rename gimpimage-profile.[ch] to gimpimage-color-profile.[ch] 2015-08-02 22:18:43 +02:00
Michael Natterer 5672e80ea1 libgimpwidgets: port GimpColorProfileStore and -ComboBox to GFile
and deprecate the old filename-based API. Port everything to use the
new GFile functions.
2015-08-01 16:20:14 +02:00
Michael Natterer 96749a440e pdb, libgimp: add gimp_image_convert_color_profile_from_file() 2015-07-28 23:11:54 +02:00
Michael Natterer b0735c9448 pdb, libgimp: add gimp_image_set_color_profile_from_file()
which sets the profile from a file containing an ICC profile.
2015-07-28 23:01:18 +02:00
Michael Natterer ccd2264a4c pdb: reorder procedures in image_color_profile.pdb 2015-07-27 23:45:25 +02:00
João S. O. Bueno 4f78fdd31c Fixes parent_instence typo 2015-07-25 03:26:56 -03:00
Michael Natterer 16fa1b722d Bug 752582 - Error message when refreshing resources without...
...a writable resource directory

gimp_data_factory_data_save(): don't warn about a missing writable
directory if there is nothing to save.
2015-07-21 19:24:45 +02:00
Nils Philippsen 0b900239d5 Ref/unref dialog->image around saving as well...
...to avoid warnings that happen if the image got closed before the
saving finishes.

(amends commit a0e48ad29e)
2015-07-17 17:10:20 +02:00
Nils Philippsen 9171de3b80 tests: link against -lm
(see commit 4c7338c097)
2015-07-16 14:27:04 +02:00
Michael Natterer a0e48ad29e Bug 739003 - Crashes in file_save_dialog_response()
Ref/unref the dialog around saving the image insatead of connecting to
"destroy" and NULLifying the local dialog variable on destruction,
which has caused weird crashes on fedora.
2015-07-14 13:22:06 +02:00
Michael Natterer 597a438f07 app: remove gimp_image_set_filename()
- gimp-image-set-filename PDB wrapper: implement the same there in
  a few lines
- xcf-load.c: use gimp_image_set_file() instead, and get rid of the
  last use of filename in xcf/ in favor of GFile
2015-07-13 22:43:22 +02:00
Michael Natterer 6e420bcdbb app: remove gimp_image_get_filename() 2015-07-13 03:53:29 +02:00
Michael Natterer fd873465af app: use better filenames when saving via the XDS protocol
Like IMG_0001.xcf instead of Untitled.xcf if the image was imported
from IMG_0001.JPG.
2015-07-13 03:48:18 +02:00
Jehan 43e4256d56 "gegl:seamless-clone" operation's properties "max-refine-steps" changed…
… into "max-refine-scale". See GEGL commit 346139b.
It does not fix the Seamless Clone tool, but at least now the slider
has a meaning.
2015-07-12 19:47:49 +02:00
Michael Natterer 0693298d63 libgimpcolor, *: change all GimpColorConfig getters to return const gchar*
instead of a gchar* which has to be freed. Cache all the strings in
the GimpColorConfig instance.
2015-07-12 14:10:18 +02:00
Jehan 6f81975bda Bug 751836: font alias "sans" deprecated in fontconfig…
…to be replaced by "sans-serif".
2015-07-12 14:07:04 +02:00
Michael Natterer ee70fe6e78 Revert "app: saving as XCF should clean the dirty flags…"
This reverts commit 0c3e6675b0.

xcf_save_invoker() is not the right place to set the image's file
or dirty flag. It breaks "save a copy", for example.
2015-07-11 19:35:42 +02:00
Jehan 0c3e6675b0 app: saving as XCF should clean the dirty flags…
and associate the image to the saved file, even when saved with
`gimp-xcf-save` or `gimp-file-save` with ".xcf" extension.
2015-07-11 17:04:20 +02:00
Jehan f6fb13378d app: propagate the error when the XCF to save cannot even be created.
The possible failure of `g_file_replace()` was overlooked, as well as
the error which may have been created and could be useful information
for the developers.
2015-07-11 16:28:19 +02:00
Jehan 2edfde4f40 app: update `gimp-xcf-save` procedure documentation.
The "filename" parameter must be in UTF-8 and in URI format (for
instance file://path for local files, and not just a path).
Cf. `g_file_new_for_uri()` documentation:
@uri: a UTF-8 string containing a URI
2015-07-11 16:19:47 +02:00
Michael Natterer c102dde92b libgimpcolor, *: change GimpColorProfile to be a GObject
it used to be a typedef to gpointer and actually was a cmsHPROFILE.

Change its API to be more "standard", remove the public close()
function. The object caches both the cmsHPROFILE and the data/length
ICC blob, so conversions between the two become obsolete (simply call
get_lcms_profile() or get_icc_profile()).

Adapt everything to the new API, but port it in a naive way for now,
the code doesn't take advantage of the new possibilities yet (like
refcounting).
2015-07-10 22:53:59 +02:00
Michael Natterer df3f7b01e6 Bug 751645 - tagbox dialog not showing lower tags
gimp_tag_popup_constructed(): calculate the height of the scrollable
area correctly.
2015-07-04 14:04:35 +02:00
Michael Natterer db386eb361 app: fix selection mask offset in do_layer_blend()
Fixes painting when there is both a layer offset and a selection.
Offsets between offsets are hard...
2015-07-04 13:28:59 +02:00
Michael Natterer d6c578c567 app: change gimp_image_crop() to use x, y, width, height 2015-07-03 19:38:08 +02:00
Michael Natterer 33d7b6005e app: remove GimpChannel::bounds() and gimp_channel_bounds()
and port everything to GimpItem::bounds().
2015-07-03 19:38:08 +02:00
Michael Natterer 4c2edf1841 app: use gimp_image_item_list_bounds() in GimpEditSelectionTool
the code was duplicated 4 times. Also merge the layer and vectors
cases for finding bounding boxes into one, they are the same now.
2015-07-03 19:38:08 +02:00
Michael Natterer 1c1d9618b0 app: add gimp_image_item_list_bounds()
which returns the bounds of a list of items, in image coordinates.
2015-07-03 19:38:08 +02:00
Michael Natterer e90e90265b app: port everything from gimp_channel_bounds() to gimp_item_bounds()
except gimpchannel.c itself.
2015-07-03 19:38:08 +02:00
Michael Natterer c04c3950ee app: use gimp_item_bounds() in GimpCursorView, and simplify the code 2015-07-03 19:38:07 +02:00
Michael Natterer af1e86827f app: make gimp_display_shell_mask_bounds() use x, y, width, height
instead of x1, y1, x2, y2, and use gimp_item_bounds() instead of
gimp_channel_bounds().
2015-07-03 19:38:07 +02:00
Michael Natterer 2ed749fd26 app: use gimp_display_shell_transform_bounds()
instead of manually doing the same in gimp_display_shell_mask_bounds().
2015-07-03 19:38:07 +02:00
Michael Natterer f54197b680 app: use gimp_item_bounds() instead of gimp_channel_bounds() in actions/ 2015-07-03 19:38:07 +02:00
Michael Natterer 64e506a052 app: test-ui.c: use gimp_channel_is_empty() to check for a selection 2015-07-03 19:38:07 +02:00
Michael Natterer 731cfc7532 app: use gimp_item_bounds() in test-xcf.c 2015-07-03 19:38:07 +02:00
Michael Natterer e64e9d0599 app: use gimp_channel_is_empty() not gimp_channel_bounds() in xcf_save_image()
We are not interested in the selection bounds, only if there is a
selection at all.
2015-07-03 19:38:07 +02:00
Michael Natterer 1aa382e594 app: remove the GIMP_IS_CHANNEL() case from gimpimage-arrange.c
The object offset is calculated correctly for channels in the
GIMP_IS_ITEM() case using gimp_item_bounds().

Also did some general formatting cleanup in the entire file.
2015-07-03 19:38:07 +02:00
Michael Natterer 658a7834fe app: remove public function gimp_vectors_bounds()
and move its code into the GimpItem::bounds() implementation.
2015-07-03 19:38:06 +02:00
Michael Natterer 7e90a3e4e5 app: use gimp_item_bounds() instead of gimp_vectors_bounds() 2015-07-03 19:38:06 +02:00
Michael Natterer 4edf70f4f1 app: add virtual function GimpItem::bounds()
Which returns a boolean indicating if there is content at all, and the
bounds as double x, y, width, height because for most use cases that's
better than x1, y1, x2, y2. Wrap the method with two functions
gimp_item_bounds() which returns integer bounds and
gimp_item_bounds_f() which returns the original double bounds.
2015-07-03 19:38:06 +02:00
Michael Natterer bc525f39ee app: factor out a function in GimpEditSelectionTool, and move one around 2015-07-03 19:38:06 +02:00
Michael Natterer 4552319336 pdb: fix plug-in-autocrop compat wrapper to work like in 2.8
even if it's weird, compat is compat...
2015-07-03 17:59:08 +02:00
Michael Natterer fc0d253744 app: always return the rectangle values from gimp_pickable_auto_shrink()
If there is nothing to shrink, return the passed rectangle clamped
to the pickable's extents.
2015-07-03 17:52:34 +02:00
Michael Natterer a3437285ae app: #include "core/gimpimage-profile.h" in image-commands.c 2015-07-03 12:41:29 +02:00
Michael Natterer 3daa2ab96b app: #include "gimplayer-new.c" in tests/ where needed 2015-07-03 12:36:33 +02:00
Michael Natterer 7d220a56e0 app: free GimpEditSelectionTool's stuff in finalize() 2015-07-03 12:27:08 +02:00
Thomas Manni 82223783a3 plug-ins, pdb: remove the bump-map plug-in and add 2 PDB compat procs 2015-06-30 12:02:48 +02:00
Thomas Manni 3436ae4674 plug-ins, pdb: remove the displace plug-in and add 2 PDB compat procs 2015-06-30 10:02:28 +02:00
Michael Natterer e669c6dd05 Bug 750874 - Displayed colors look clipped after profile conversion...
...but they aren't clipped

gimp_display_shell_profile_can_convert_to_u8(): allow the shortcut of
converting directly to 8-bit for display only for GIMP_COMPONENT_TYPE_U8.

This might be an lcms bug, the code can be enabled again for U16 and
U32 if it's indeed an lcms bug and it gets fixed.
2015-06-29 10:22:22 +02:00
Michael Natterer 3d7af8a184 app: remove the "exclude" paameter from gimp_image_item_list_get_list()
and from gimp_image_item_list_filter(). After the fixes for bug 735906
it's no longer needed, and it was harmful.
2015-06-28 23:49:47 +02:00
Michael Natterer 358f13f5b8 Bug 735906 - Transform tools give unexpected results when transforming...
...certain sets of linked layers

Fix the move tool (GimpEditSelectionTool) using the same principle
as the other "linked item" features, just a bit more complicated...

Never translate the active item and its linked items separately,
always translate the entire list at once.

The linked logic was distributed across the entire file. Changed the
code to prepare lists of items that are translated live (layers and
vectors), and items that are translated at the end (channels, masks
and the selection). In the motion and button release functions, simply
use the prepared lists without any further duplicated checking.

Also clean up the stuff a bit, there is more cleanup needed but first
the fix...
2015-06-27 12:34:19 +02:00
Michael Natterer a13c63a3f1 app: don't push an undo group if an item list transform has only one item
The fixes for bug 735906 made it push too many undo groups.
2015-06-26 13:37:18 +02:00
Michael Natterer 3c706d00c6 Bug 735906 - Transform tools give unexpected results when transforming...
...certain sets of linked layers

Fix for translating layers from the PDB, and with the cursor keys
for gimpeditselectiontool. Moving layers with the mouse is still broken.

The approach is exactly the same as in 25a696c7.
2015-06-26 12:00:45 +02:00
Michael Natterer 25a696c7f8 Bug 735906 - Transform tools give unexpected results when transforming...
...certain sets of linked layers

Fix this bug for flip, rotate and general transforms (not for move yet):

gimp_item_linked_flip,rotate,transform(): always transform the passed
item too (do not filter it out of the list of items), so these functions
do the entire job of transforming a linked group now. Transforming the
active item separately didn't work (and is not implementable) if both
a layer and its parent layer group were linked.

flip tool, transform tool, layer->transform callbacks: don't call
gimp_item_foo() *and* (if the item is linked) gimp_item_linked_foo().
Instead call gimp_item_linked_foo() if the item is linked, and
gimp_item_foo() otherwise.

This commit also kills the mis-feature of transforming the selected
pixels of the active layer, and then the linked items completely. We
now either only transform the selected area *or* the linked group.
2015-06-25 12:25:41 +02:00
Michael Natterer b12ecc7195 app: small fix for the previous patch in gimp_group_layer_update_size() 2015-06-24 19:40:54 +02:00
Michael Natterer 953fa220a9 app: emit signals *after* gimp_drawable_real_set_buffer() changed the graph
Fixes another group layer update problem. Also freeze/thaw notify
emissions around the whole function.
2015-06-24 16:26:45 +02:00
Michael Natterer 2f8476bd18 app: fix update of group layers when size changes only trigger an offset change
In gimp_group_layer_update_size(), when the new size happens to be the
same as the old size, we need to call gimp_pickable_flush() on the
group projection so it is ready to be used for rendering the image,
just like in gimp_group_layer_stack_update().
2015-06-23 10:27:47 +02:00
Michael Natterer e58bf5138f Bug 751333 - Crash when moving cursor with ibus "Hangul" input method
Had a closer look at GtkTextView again and implemented the IM
callbacks like there. I don't know if this fixes the bug, please test.
2015-06-22 22:54:16 +02:00
Massimo Valentini f0028624df Bug 751178: GIMP doesn't load fonts from folders...
which path contains Cyrillic characters
2015-06-22 19:40:25 +02:00
Michael Natterer 6d6efbbf8b app: remove "remove_children" parameter from gimp_image_item_list_filter()
It was always TRUE. The function should be renamed now, but not until
the merging of linked item fixes to 2-8 is done.
2015-06-20 21:59:37 +02:00
Michael Natterer 64b24d169d app: remove "remove_locked" parameter from gimp_image_item_list_filter()
This is just removal of unused code before fixing bug 735906.
2015-06-20 16:03:40 +02:00
Michael Natterer 09cd5f6720 app: add ICC data/length parameters to gimp_layer_new_from_gegl_buffer()
and pass them where we know the buffer could be from another image.
Pass "NULL, 0" if we know it's the same image.

Add gimp_layer_new_convert_profile() which takes the newly created
layer and the ICC data/length; call it from both
gimp_layer_new_from_gegl_buffer() and gimp_layer_new_from_pixbuf().

gimp_layer_new_convert_profile() is empty, this is just
infrastructure.
2015-06-20 00:39:44 +02:00
Michael Natterer 6446c007cf app: rename gimp_layer_new_from_buffer() to gimp_layer_new_from_gegl_buffer()
and add new function gimp_layer_new_from_buffer() which takes a
GimpBuffer. This will make sense soon :)
2015-06-20 00:02:11 +02:00
Michael Natterer 7d4948b190 app: use gimp_create_image_from_buffer() to create the debug image graph 2015-06-19 23:49:41 +02:00
Michael Natterer db09d0f3d3 app: move functions to create layers to new files gimplayer-new.[ch] 2015-06-17 13:21:01 +02:00
Michael Natterer fd86deb998 Bug 723392 - Pasting an image replaces color profile with default one
In gimpimage-new.c, tag new images with the source buffer's, pixbuf's
and drawable's color profile.
2015-06-17 09:55:08 +02:00
Jehan 123c605da7 app: trim out trailing whitespaces from item names.
Trailing whitespaces are a bother because they are not easily spotted
and there are no good reasons to have any on an item name.
2015-06-17 00:54:21 +02:00
Michael Natterer 3b88a346f1 app: use the new gimp_image_get_icc_profile() instead of _get_icc_parasite()
in gimp_image_color_managed_get_icc_profile().
2015-06-17 00:49:59 +02:00
Michael Natterer bf10da29fa app: remove GError** argument from gimp_image_get_color_profile()
we validate everything when setting it, so this function always
returns either a valid profile, or NULL.
2015-06-17 00:45:43 +02:00
Michael Natterer 8676fba635 app: add gimp_image_get,set,validate_icc_profile()
which use the ICC profile's data/size, without parasites involved.
2015-06-17 00:38:49 +02:00
Michael Natterer ee2f9ee846 app: rename gimp_image_get,set,validate_icc_profile() to _icc_parasite()
to make sure we don't have some _icc_profile() functions that deal
with raw data/size and some that deal with GimpParasite.
2015-06-16 23:56:53 +02:00
Michael Natterer a159740498 app: use the new function in gimp_buffer_new_from_pixbuf() 2015-06-16 23:44:49 +02:00
Michael Natterer 26e2ccbdf3 app: tag GimpBuffers with an ICC profile, if available
Set the profile when the buffer is copied from a layer, and when it's
created from a GdkPixbuf from the clipboard. The profile is not yet
used for anything.
2015-06-16 23:16:54 +02:00
Jehan 56b6dbaa87 app: item uniquefy algorithm allowing generic numbering schemes.
Any item ending with numbers (optionally followed by spaces) would
trigger incremental counting, not only hashed numbers.
2015-06-16 20:12:24 +02:00
Michael Natterer aeb2a6e4ff Bug 646511 - Having the possibility to remove ICC profiles
Add Image -> Color Management -> Discard Color Profile which simply
removes the profile without any conversion.

Also added actions and callbacks for "Assign" and "Convert" but these
are only stubs to be filled as replacement for the remaining code in
the lcms plug-in.
2015-06-15 20:19:32 +02:00
Michael Natterer ba1318dda9 app, menus, plug-ins: add new Submenu Image -> Color Management
and move the color profile menu entries there. Add a mapping so 3rd
party plug-ins get moved to the new location automatically.

Also, add a separator after "Duplicate" and move the "Transform"
submenu to the top of the group that has "Scale", "Resize" etc.
2015-06-15 13:20:04 +02:00
Michael Natterer 014cd08c5c Bug 750953 - The Curves dialog should present per channel lines...
...when opened by the "Edit these settings as Curves" button on the
Levels dialog

The code to configure the entire GUI correctly was not even called
when initially creating the curves dialog (the color bars probably
looked right just because of default values of their own).

Factor out gimp_curves_tool_update_channel() which properly updates
the GUI. Call it after the dialog has been created, and when the
active channel changes.
2015-06-15 00:11:13 +02:00
Michael Natterer 5422646d91 Bug 750674 - Stroke selection doesn't honor brush size set in paint tool options
Implement GimpConfigInterface::duplicate() and after duplicating the
paint options, copy the brush-related properties again, because they
might have been changed by setting the brush on the copy (if they are
set to be linked to the brush's native values).
2015-06-14 20:43:45 +02:00
Michael Natterer 797acd0027 app: don't leak the copied paint options in gimp_stroke_options_prepare() 2015-06-14 20:42:00 +02:00
Jehan 0aae50cfe2 Bug 750556 - validate a tree cell modification on focus out.
For instance, modifying a layer and going directly to draw in the canvas
should not cancel the layer name.
You can still cancel a layer renaming in progress with ESC.
2015-06-14 14:03:16 +02:00
Michael Natterer 6487d0a26a app: move the seamless clone tool to the playground
It's not release material unless somebody comes and fixes its bugs,
and its speed.
2015-06-14 13:02:31 +02:00
Michael Natterer c876e281b1 Bug 750874 - Displayed colors look clipped after profile conversion...
but they aren't clipped

Add gimp_display_shell_profile_can_convert_to_u8() which returns
whether the lcms transform can safely write directly into an u8 buffer
without destroying out-of-gammut pixel values, which we assume is the
case for all integer formats. If the function returns FALSE, always
convert via the R'G'B'A float filter_buffer.

Also connect to the image's "precision-changed" signal and update the
profile transform when it's emitted.
2015-06-13 00:27:21 +02:00
Michael Natterer 5cdbf6ae33 app: always use an RGB format as source format for display color management 2015-06-12 20:15:19 +02:00
Thomas Manni 769bc933d4 plug-ins, pdb: remove the wind plug-in and add a PDB compat proc 2015-06-11 11:31:36 +02:00
Michael Natterer 3c4aead23f app: minor readability cleanup in plug_in_params_to_args() 2015-06-11 02:03:06 +02:00
Thomas Manni 22dbdbe1fb app, menus: add gegl:displace to Filters -> Map 2015-06-10 19:43:34 +02:00
Michael Natterer 0ceed29ce8 app: set the image's color profile in gimp_image_convert_color_profile()
but never set it if the image got converted to a built-in profile.
Also remove the "icc-profile-name" parasite.
2015-06-10 02:04:14 +02:00
Michael Natterer c632ffad18 pdb, app, libgimp: add gimp_image_convert_color_profile() PDB wrapper
This commit is more complex than a usual PDB procedure because it
needs to make the enums from libgimpconfig/gimpcolorconfig-enums.h
known to the PDB.
2015-06-10 01:38:20 +02:00
Michael Natterer 1ade7ffee5 app: add gimp_image_convert_color_profile()
which converts an image to another color profile. Currently unused.
2015-06-10 01:36:19 +02:00
Michael Natterer 4145fbbed7 app: use gimp_image_set_color_profile() in gimp_image_convert_type()
instead of calling gimp_image_set_icc_profile().
2015-06-09 20:59:34 +02:00
Michael Natterer 685f883f3e app: add gimp_image_validate_color_profile()
and use it from gimp_image_set_icc_profile() and from
gimp_image_set_color_profile().
2015-06-09 18:55:07 +02:00
Michael Natterer d1102d2be9 pdb, plug-ins: remove two procedures from lcms.c and add PDB compat procs
The lcms plug-in is on its way out: add compat procedures implementing
plug-in-icc-profile-info and plug-in-icc-profile-file-info and remove
that code from lcms.c.
2015-06-07 12:52:37 +02:00
Michael Natterer 16749cd395 pdb, app, libgimp: add gimp_image_get_effective_color_profile()
which returns the profile that is actually used for the image. And
some cleanup and fixes in image_color_profile.pdb.
2015-06-07 01:38:50 +02:00
Michael Natterer acb76a4d2a app: fix setting a NULL profile with gimp_image_set_color_profile() 2015-06-07 01:37:55 +02:00
Michael Natterer 0261d8cf47 Bug 677746 - Change "Fit to window" to "Show entire image"
Change the prefs dialog text for "initial-zoom-to-fit" enabled.
2015-06-06 23:53:08 +02:00
Michael Natterer 31aa1269ec Bug 749777 - Deleting current gradient from script leads to...
GIMP_IS_TAGGED error and possible Gimp crash (core segfault)

Fix again by restoring code I accidentially deleted in
ae708d6419. I don't really understand
what it is doing but better not remove it without understanding.
2015-06-06 23:06:20 +02:00
Michael Natterer 80093a85df pdb, app, libgimp: add new PDB group image_color_profile
Which will have proper API to deal with an image's color profile (no
parasites, no ICC blobs). So far contains gimp_image_get_color_profile()
and gimp_image_set_color_profile().
2015-06-05 12:51:46 +02:00
Adrian Likins e708f41970 Bug 750377 - typo in plug-in-compat-cmds for edge invoker "algorihm"
Scripts calling plug-in-edge would cause the error:

g_object_new_valist: object class 'GeglOpedge_c' has
no property named 'algorihm'
2015-06-04 00:08:06 -04:00
Michael Natterer 3565b33019 libgimpconfig: rename the new GimpColorConfig profile accessor functions
gimp_color_config_get_foo_profile() -> get_foo_color_profile()

because the old names clash with possible future accessors for the raw
filename properties.
2015-06-03 09:57:34 +02:00
Michael Natterer 4910c28957 libgimpcolor: rename the gimp_lcms_*() functions to gimp_color_profile_*()
because it doesn't make sense to call the typedef GimpColorProfile
but the function namespace gimp_lcms_*().
2015-06-03 09:41:23 +02:00
Michael Natterer b8eeb9ed00 app: add gimp_image_set_color_profile(), currently unused
also remove the fallback-to-colorconfig code from
gimp_image_get_color_profile() and move it to
gimp_image_color_managed_get_icc_profile(), so
gimp_image_get_color_profile() returns NULL if the image has no own
profile.
2015-06-02 23:25:52 +02:00
Thomas Manni a7b84ded8e Bug 325564 - Use CIE LCH instead of HSL for layer mode Color
Add Hue, Chroma, Color and Lightness layer modes in LCH color space.
2015-06-02 01:37:26 +02:00
Michael Natterer 460948e068 app: add member GimpDisplayShell.filter_format
and use it where we used to hardcode "R'G'B'A float".
2015-06-02 00:01:28 +02:00
Michael Natterer 08545ad549 app: switch gimpdisplayshell-render.c to the new profile filter code
- disable auto-adding of the lcms display filter module

- change profile convert dest formats to be always R'G'B'A, a display
  profile transform outputs something that can be displayed directly,
  so no additional gamma transform must happen when the pixels are
  copied to a cairo-ARGB32 buffer

- add a medium forest of if() branches to gimpdisplayshell-filter.c
  which cover all combinations of profile and display filter
  transforms

- all of this is still very broken when changing an image to linear,
  because the configured RGB profile from prefs will do horrible
  nonsense (things work fine though with a per-image profile that is
  for linear data)
2015-06-01 23:30:03 +02:00
Michael Natterer 1b9a8b71ba app: add gimp_display_shell_has_filter()
which checks if there are any filters active on the display.
2015-06-01 08:16:12 +02:00