Commit Graph

18805 Commits

Author SHA1 Message Date
Massimo Valentini 062cf1a5ab Bug 766895: The --dump-pdb-procedures-deprecated...
argument triggers a segmentation fault

Initialize babl so that, when gimp is unreffed,
using a babl_format to destroy a std brush does
not crash.
2016-05-27 19:30:49 +02:00
Michael Natterer ca349f88cd libgimpcolor: add gimp_color_transform_can_gegl_copy()
Which takes two profiles and returns TRUE if converting between
them works correctly without a GimpColorTransform. Use it in
gimp_color_transform_new() to return a NULL transform if none
is needed. Took the code from gimp-gegl-loops.c.
2016-05-26 23:14:57 +02:00
Michael Natterer e6d4053567 app: don't forget to ref GimpOperationProfileTransform's profiles 2016-05-26 22:26:07 +02:00
Michael Natterer 0cd3d7aa7b app: color manage GimpFgBgEditor, as used e.g. in the toolbox 2016-05-26 22:25:03 +02:00
Michael Natterer 0acff06465 app: color manage the color buttons of GimpColorHistory 2016-05-26 22:24:35 +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
Massimo Valentini 9e96996138 Bug 764608: Smudge tool clips out of gamut channel values...
on layers with alpha channels
2016-05-23 18:45:49 +02:00
Michael Natterer cb578e3df7 app: add GimpOperationProfileTransform
which converts between two color profiles.
2016-05-23 14:00:35 +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 836972b736 app: use the new function in GimpTemplateEditor
It now offers the right default profiles for the selected image
type/precision.
2016-05-22 13:26:50 +02:00
Michael Natterer 490b33fd85 app: use the new function in the color profile assign/convert dialog 2016-05-22 13:26:20 +02:00
Michael Natterer ae1fdd9eeb app: fix the new gimp_color_profile_store_add_defaults()
A NULL profile is only an error if it's NULL because opening
the .icc failed, not just because none is configured...
2016-05-22 13:24:20 +02:00
Michael Natterer 57d497b486 app: add gimp_color_profile_store_add_defaults()
which adds default profiles for an image type/precision.
2016-05-22 01:19:18 +02:00
Michael Natterer dcf5c526e7 Bug 320447 - fast switching between "color managed display" and "softproof"
Replace the 3-state "off", "display" and "softproof" radio items by
two toggles "enable" and "softproof". Also add separate controls for
display and softproof options.
2016-05-21 21:38:47 +02:00
Michael Natterer 6b246ff6c2 app: remove ancient utility function gimp_toggle_button_set_visible()
and use g_object_bind_property() instead.
2016-05-21 14:28:11 +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 9f3052583b app: remove gimp_session_write_position()
and un-overengineer the session position accuracy code a bit.
2016-05-21 00:00:07 +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
Piotr Drąg c7bc0b5f07 Fix typos in app/actions/view-actions.c 2016-05-19 15:59:51 +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
Massimo Valentini 3a43478fda Bug 766116: Behind mode is not working correctly
use same var names as gimp-2-8 to make
it easier to spot unwanted differences
2016-05-17 19:56:39 +02:00
Massimo Valentini 2dd4d3a2fa Bug 766369: Split view shows transparency filtering...
... layers with alpha channel

add an operation that selectively outputs aux
or source if out/inside the rectangle (x,y,width,height),
independently of the alpha channel and use it
in filters split preview.

mostly copied from gimp:mask-components
2016-05-16 18:08:48 +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
Ell e897abd1bf app: add missing NULL check in action_search_match_keyword() 2016-05-16 12:48:15 +00:00
Ell 8d9df886e2 app: don't hold a direct reference to actions in the action history
Instead, store only the action's name, and look it up upon searching.

Keeping a reference to the actions in the history extended the lifetime of
actions that sohuld have otherwise died, leading to all sorts of nastiness.  In
particular, the Alt+[n] actions to switch between images would remain bound to
their accelerator after the image has been closed, holding a dangling display
pointer, which would lead to a segfault, or fail with a CRITICAL message, when
using the accelerator again.
2016-05-16 12:47:20 +00:00
Ell 4132c0b3e7 app, libgimpwidgets: reset "old" selection color of GimpColor{Button,Panel} ...
... when the button is clicked

Previously, the old color retained its previous value, so when the color
selection dialog was canceled, the button's color would go back to a
potentially outdated value, instead of the color it had when it was
clicked (for continuously-updated color buttons, at least.)
2016-05-16 11:49:00 +00:00
Michael Natterer 84d60ad943 app: clean up toggle callbacks in view-commands.c 2016-05-16 13:39:45 +02:00
Michael Natterer a28778475f Bug 320447 - fast switching between "color managed display" and "softproof"
Add rendering intent, black point compensation and gammut warning menu
items to View -> Color Management. They set the respective values of
the active color management mode, so both "color managed display" and
"print simulation" are almost completely configurable per-display
now. Setting the simulation profile is still missing.
2016-05-16 13:27:59 +02:00
Michael Natterer a942b771fb app: add gimp_display_shell_set_action_sensitive() 2016-05-16 13:00:27 +02:00
Michael Natterer 406d1b9c65 Bug 320447 - fast switching between "color managed display" and "softproof"
Add a View -> Color Management submenu that allows to change
the color management mode per-display.

Internally, keep a GimpColorConfig object around per-display that
is synchronized with the global config except for the properties
that have a per-display GUI (currently the mode).

Also provide an "As in Preferences" menu item to follow the global
settings again.
2016-05-14 23:50:58 +02:00
Michael Natterer 388bf5d4ca app: add gimpdisplayshell-actions.[ch]
which contains functions to update shell-related actions in the "view"
group. Took the code out of gimpdisplayshell-appearance.c.
2016-05-14 22:54:11 +02:00
Alexandre Prokoudine 382f20450c Mark user-visible-message for translation 2016-05-14 17:58:21 +03:00
Michael Natterer f93369b354 app: clean up Preferences -> Color Management
Add groups and reorder things. Shorten labels that are redundant with
group titles.
2016-05-14 14:48:58 +02:00
Michael Natterer af976a75c3 app: add a GimpColorConfig to GimpDisplayShell
Use the shell's color config for color managing the display and
various auxiliary widgets attached to it, like the notebook tab widget
and navigation popup.

The config is currently just a reference to the global prefs config,
so no behavior changed.
2016-05-14 00:56:26 +02:00
Michael Natterer 9bbc52c1be app: add a GimpColorConfig member to GimpViewRenderer
and use it if set to create the display transform, otherwise use the
global config from prefs.
2016-05-14 00:28:15 +02:00
Michael Natterer fd2ee899f9 app: add a private struct to GimpViewRenderer
and move some members there, including "needs_render" which means
GimpViewRenderer now manages that all by itself.
2016-05-14 00:14:51 +02:00
Michael Natterer f56ca4471b app: don't use unrelated prefs values for the color profile convert dialog
The values from the global GimpColorConfig are for displaying images
on screen, not default values for profile conversion. Instead, default
to intent = RELATIVE_COLORIMETRIC and bpc = TRUE.
2016-05-13 22:49:07 +02:00
Michael Natterer 13b1e6aafc app: clean up a lot of werid code in GimpColorOptions and GimpFilterOptions
First of all, derive GimpFilterOptions from GimpColorOptions, not the
other way around, which was a sick way of magically showing the right
options for various tools. That approach has failed and needed
additional hacks to do the right thing. Simply have the right class
hierarchy and call the right tool options GUI constructors and done.

Remove gimp_histogram_options_gui(), we don't need histogram scale
controls in tool options when we already have them next to the
histograms in the tool dialogs.

Also remove gimp_histogram_options_connect_view() and use a simple
g_object_bind_property() instead.
2016-05-13 22:06:14 +02:00
Massimo Valentini 81e7cb6ba5 Bug 766342: EEEEeEeek! 4 GeglBuffers leaked 2016-05-13 13:13:22 +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 f7c104c6ae app: use gegl:distance-transform in the blend tool, it has a progress now
Also, don't start the progress in GimpBlendTool, let
gimp_gegl_progress_connect() do its job.
2016-05-12 00:14:35 +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 e7d2edb665 app: connect to the new operation progress in GimpFilterTool 2016-05-11 22:51:58 +02:00
Michael Natterer cea4ea6cff app: require a text in gimp_gegl_progress_connect()
and simplify and fix the progress callback.
2016-05-11 22:50:33 +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
Massimo Valentini 85cb525c7e Bug 766128: Use gegl_operation_progress
instead of reimplementing it in two operations
2016-05-11 19:09:56 +02:00
Michael Natterer b10fd2aa30 app: use the proper help ID in gimp_operation_tool_get_settings_ui()
GimpFilterTool has the right help ID since a while, no need to
use a dummy help ID aly longer.
2016-05-11 14:38:33 +02:00
Michael Natterer 9bb03073b6 app: turn the "Gamma Hack" into a non-serializable property
To make it at least behave like other widgets in the dialogs while it
exits.
2016-05-11 14:33:08 +02:00
Michael Natterer 7d1567cae0 app: move tool undo typedefs out of tools-types.h 2016-05-11 11:23:14 +02:00
Michael Natterer 059a92b4b6 app: rename "image_map" member of GimpFilterTool to "filter" 2016-05-11 10:19:50 +02:00
Michael Natterer 3bd783283e app: change the prefs property from image-map-tool-max-recent to filter-tool
but still parse the old property too.
2016-05-11 01:03:40 +02:00
Michael Natterer 67e192e77b app: remove gimp_filter_tool_preview()
Its remaining two callers are more obvious when doing a simple call to
gimp_image_map_apply() manually.
2016-05-10 15:57:49 +02:00
Michael Natterer 6a9ce551cb app: rename GimpImageMapTool to GimpFilterTool 2016-05-10 13:52:24 +02:00
Michael Natterer 68936e4cc2 app: don't preserve() GimpImageMapTool around most GimpImageMap calls
It's useles ever since we ported GimpImageMap to GEGL.
2016-05-09 21:48:16 +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 9bb6d19f6c app: remove a call to gimp_image_map_apply() from GimpBlendTool
It's not needed any longer after gimp_image_map_set_mode().
2016-05-09 01:49:32 +02:00
Michael Natterer 288cf2c0cc app: remove most calls to gimp_image_map_tool_preview()
see commit below, they are not needed any longer. Also call
gimp_image_map_tool_preview() from gimp_image_map_tool_create_map()
and remove more other calls to preview().
2016-05-09 01:41:02 +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 c77357053c app: make gimp_image_map_tool_preview() private
- call it in gimp_image_map_tool_get_operation() so
  gimp_operation_tool_set_operation() doesn't need to call it

- gimp_image_map_tool_settings_import() doesn't need to call it because
  importing settings changes the config object anyway
2016-05-09 01:21:03 +02:00
Michael Natterer c6c458a2eb app: don't call gimp_image_map_tool_preview() in GimpOperationTool
Instead, emit "notify" in the config object, which is a hack,
but a temporary one. If should be the right code tho, if only
Gegl pads would be normal properties...
2016-05-09 01:07:21 +02:00
Ell 48c2038951 Bug 765326 - Status bar progress messages aren't always updated
Keep GimpStatusbar progress messages at the front of the list.

Previously, gimp_statusbar_push() and friends would push progress
messages behind temporary messages, and would push normal messages,
added after a progress had started, in front of progress messages.
This resulted in the progress bar text not being updated if a
temporary message was active at the time the progress started, or
if a normal message was pushed after the progress started.

This commit fixes this by always keeping progress messages at the
front of the message list.
2016-05-08 22:33:08 +00:00
Ell ce8cbe6540 app: update GimpStatusbar message icon even when the text is unchanged
Probably just academic.
2016-05-08 22:32:28 +00:00
Ell bb4d04dce5 app: refactor GimpStatusbar message pushing/popping code
... to reduce duplication, and make less assumptions about the
position of messages on the list.

In preperation for some bug fixes.
2016-05-08 22:32:28 +00: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
Michael Natterer d4d03d186d app: use gimp_config_path_expand() in gimp_prop_profile_combo_box_new() 2016-05-08 23:12:29 +02:00
Ell ce27a627e0 app: fix menu icon of "Selection Editor"
Was GIMP_STOCK_TOOL_RECT_SELECT; changed to GIMP_STOCK_SELECTION, to
match the actual icon of the dialog.
2016-05-08 20:30:13 +00:00
Ell 2f96950eaa pdb: Modify gimp-selection-border to use BORDER_STYLE_SMOOTH
instead of BORDER_STYLE_FEATHERD.

Changes the behavior of the function, but probably for the better.

This, and the previous 5 commits, fix bug 764614.
2016-05-08 19:23:48 +00:00
Ell 60b31cce0f app: Add "Border style" combo to the "Select -> Border..." dialog
instead of the "Feather border" toggle, and pass the selected style
to gimp_channel_border().

The border style defaults to "Smooth", whereas the previous default
behavior corresponds to "Hard".
2016-05-08 19:22:24 +00: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 d37d39bc71 app: some cleanup in gimp_prop_profile_combo_box_new()
- don't warn if an object property is passed (for GFile properties)
- pass the history file to gimp_color_profile_combo_box_new()
2016-05-08 21:13:55 +02:00
Michael Natterer 3244637dc4 app: enable color management when a profile is assigned to the image 2016-05-08 20:56:54 +02:00
Michael Natterer 20f5e25195 app: add gimp_prop_profile_combo_box_new()
and remove the same but less flexible code from the prefs dialog.
2016-05-08 20:38:46 +02: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 cc83d9461c app: move the image-duplicate action next to image-new
Just code rordering.
2016-05-08 19:53:16 +02:00
Michael Natterer 58d17e70be app: add Image -> Color Management -> Color Management Enabled
To enable/disable color management for the image.
2016-05-08 19:53:16 +02:00
Michael Natterer e69bb90197 app: show the image's "is color managed" state in the window title string
Instead of the profile name, print "(not color managed)".
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 c3c4387d35 app: add Image -> Color Management -> Save Color Profile to File...
using the stuff added in the last few commits.
2016-05-07 03:01:18 +02:00
Michael Natterer 83df7f410d libgimpwidgets: more parameters for gimp_color_profile_chooser_dialog_new()
Add "parent" and "action", contraidicting myself from two commits
earlier.
2016-05-07 01:19:26 +02:00
Michael Natterer f7f9174a9c Revert "libgimpwidgets: remove gimp_color_profile_chooser_dialog_new()"
This reverts commit 2bfd0711e8.

Don't ask...
2016-05-07 00:57:40 +02:00
Michael Natterer 2bfd0711e8 libgimpwidgets: remove gimp_color_profile_chooser_dialog_new()
Its API was too limited, and adding parameters for what we need next
would be equally random. It's a rarely used and mostly internal
widget, so simply use g_object_new().
2016-05-06 22:57:32 +02:00
Michael Natterer 95f7cab96c app: don't use a NULL profile to create the new "layer from visible"
While NULL does the right thing, better not rely on that magic parameter,
pass the right profile and let the profile convert logic do its job.
2016-05-04 00:00:28 +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 6b4dd30fca app: prefer magic-less file procedures again when matching a filename
This essentially reverts 1bf8eef14f
which tried to prefer file procedured that are GIO-enabled over
indirect loading via the file-uri plug-in. But file-uri is gone now so
we can treat all file procedured the same again, restoring the
original logic.

Now a file procedure which specifies only an extension is again
preferred over magic matching.
2016-05-01 18:41:21 +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
Michael Natterer 39909b6008 app: replace GimpList's internal GList with a GQueue
so we can easily iterate in reverse order, and access the last element
in O(1). Nothing makes use of this yet.
2016-05-01 15:22:44 +02:00
Michael Natterer 7ae81e70b9 app: move the "visible" property from GimpItem to GimpFilter
Same for the "visibility_changed" signal. GimpItem keeps its
visibility API because it adds undo over GimpItem's API.
2016-05-01 14:27:43 +02:00
Michael Natterer 8c107963e6 app: implement GimpColorManaged in GimpDrawable
so now all drawables have a profile. Default to the babl format's
bultin profile and override to use the image's format in GimpLayer.
2016-04-30 23:41:32 +02:00
Michael Natterer 5c57885ac3 app: add ellipses to the color mode conversion menu items
if they show a dialog.
2016-04-30 19:41:09 +02:00
Michael Natterer 329d5c0a0f app: #include gimp-babl.h in gimpimage-convert-type.c 2016-04-30 18:50:23 +02:00
Michael Natterer 5aff776a8a app: rename convert-type-dialog.[ch] to convert-indexed-dialog.[ch] 2016-04-30 18:49:02 +02:00
Michael Natterer 182da6d2e9 Bug 765176 - ICC profile conversions between grayscale and RGB images
When converting between RGB and GRAY and the image has a profile,
invoke the convert profile dialog with the newly added image type
conversion feature.
2016-04-30 18:35:52 +02:00
Michael Natterer 12f9aa9bd2 Bug 765176 - ICC profile conversions between grayscale and RGB images
Add a dest_profile parameter to gimp_image_convert_type() so a profile
can be chosen when converting between RGB and GRAY. Has no GUI yet.
2016-04-30 18:35:52 +02:00
Michael Natterer 33adec2a3e app: add gimp_image_validate_color_profile_by_format()
which checks if a color profile is suited for pixels of a Babl format.
2016-04-30 18:35:52 +02:00
Michael Natterer 1cf04cc4b9 app: prepare the color profile dialog for doing RGB <-> GRAY conversion
Get rid of individual constructors for assign and convert, instead
have one constructor that takes a dialog type enum. No new features
yet in this commit.
2016-04-30 18:35:52 +02:00
Michael Natterer ef8b802032 app: move indexed conversion to gimpimage-convert-indexed.[ch]
It's so much code and takes so many additional parameters over RGB and
GRAY conversion, it got its own place and function now.
2016-04-30 18:35:52 +02:00
Michael Natterer 4086932e8d app: tiny and completely irrelevant stylistic cleanup 2016-04-30 18:35:52 +02:00
Michael Natterer ef4ab94a12 app: change GimpDrawable::convert_type() to take a target profile
instead of just a boolean "convert_profile". This takes the logic to
figure the right target profile out of gimp_layer_convert_type(), it
can't possibly know everything about how to convert anyway, and having
the logic in the callers conveniently splits it up and distributes its
parts to the places they belong.

This commit should cause no behavor change and is just preparation for
fixing bug 765176.
2016-04-30 18:35:52 +02:00
Michael Natterer 3a34a2b54c Bug 764320 - Xsane Gimp no device dialog
Pass the run_mode again to GIMP_EXTENSION plug-ins, this got lost in
the cleanup in commit dda06ac065.
Spotted by Massimo.
2016-04-26 16:10:08 +02:00
Michael Natterer eca44cc87d app: fix file_check_magic_list() to handle "and" matches again
where the magic is only supposed to match if all magics in the "and"
list match.
2016-04-25 01:04:07 +02:00
Michael Natterer 6af83a5a08 app: improve file magic matching
Change file magic matching from using a simple boolean "magic matches"
logic to using a matching quality. The quality is measured by the
number of bytes that matched.

Matching a single file procedure's magics now tries all magics and
returns the best match quality.

Searching a file procedure for a given file now tries all file
procedures and returns the one with the best match quality.

This fixes raw camera files being opened as TIFF, given a better magic
than just the generic TIFF magic is provided.
2016-04-24 23:56:57 +02:00
Massimo Valentini 022439e463 Bug 765492: Memory leak in gimp_brush_cache_add
g_free the lru 'unit' when removed from the cache

and keep track of the list length and last item
while looking for a duplicate already present in
the cache.
2016-04-24 19:41:22 +02:00
Michael Natterer 19738412ce app: simplify gimp_image_convert_type()
It's pretty pointless to have 5 differently-styled if(INDEXED) blocks
after each other, with zero non-INDEXED code in between.
2016-04-24 00:55:04 +02:00
Jehan 77a68e00af Bug 765459 - Artifacts symmetry painting with big brushes.
Use gegl_node_blit() instead of gegl_node_process() as proposed by
Massimo in the bug report.
2016-04-24 00:01:45 +05:30
Michael Natterer e5a669bdfc libgimpbase: fix gimp_metadata_set_from_xmp() to really expect XMP
Don't skip the first 10 bytes. That code was there to skip the magic
"GIMP_XMP_1" of the old "gimp-metadata" parasite. Instead, properly
check for that magic in xcf_load_image() and pass only the actual XMP
to gimp_metadata_set_from_xmp(). Also remove the +10 hack in file-exr.
2016-04-22 22:49:06 +02:00
Massimo Valentini a357bfec89 Bug 765247: Foreground select tool does not respect item offsets 2016-04-20 06:48:04 +02:00
Michael Natterer 3968226644 Bug 765176 - ICC profile conversions between grayscale and RGB images
gimp_image_convert_type(): call gimp_drawable_convert_type() with
convert_profile = TRUE.
2016-04-20 04:20:58 +01:00
Michael Natterer 66525e634e app: fix wrong parameter name in gimp_drawable_real_convert_type() 2016-04-20 04:19:44 +01:00
Ell 76adffa943 app: clear cond and mutex after usage 2016-04-19 17:43:55 +02:00
Thomas Manni f4cb2dd881 Bug 109161 - Improve Histogram with Luminance Channel
Add a luminance channel to GimpHistogram
2016-04-18 19:35:06 +01:00
Massimo Valentini a41b4a0436 Bug 765205 - GIMP crashes dropping the fg color on a text layer
Pass the GimpRGB's address again to gimp_text_layer_set(), not
the entire struct.
2016-04-18 12:52:56 +01:00
Michael Natterer 29f55a95ef app, pdb: minor cleanup in the new font loading code 2016-04-17 21:06:00 +01:00
Kristian Rietveld 30b73125f8 Bug 449848 - Startup: initialize fontconfig in the background ...
... to avoid long pause on start

On non-Linux operating systems the fontconfig cache is often not
initialized by default. The first time GIMP was launched, this led
to a non-responding application, confusing many users.

The initialization of fontconfig has now been moved to a separate
thread. The main thread will wait for this fontconfig thread to
complete, regularly pulsing the UI.

This patch was partly based on an earlier patch by Tor Lillqvist.
2016-04-17 17:27:06 +01:00
Michael Natterer d23135ef97 app: enable a pulsing progress bar in the splash
Startup functions can now make the progress bar pulse in order
to report that something of unknown duration is in progress.

Call status_callback (NULL, NULL, same_percentage)
2016-04-17 16:52:31 +01:00
Michael Natterer 5730278eeb Bug 759796 - Blend tool regression
We must not dither the alpha channel if it is fully opaque or fully
transparent. 2.8 did the same but the dithering of these values was
apparently consumed be putting the result into 8 bit values.
2016-04-17 01:06:08 +01:00
Michael Natterer d9e608f722 app: fix crash in config property cleanup 2016-04-17 00:59:47 +01:00
Kristian Rietveld cdc7542d46 Bug 756178 - Crash on new layer creation in fullscreen mode
Disable "new-style" fullscreen mode on OS X, we need support in
GTK+ in order for this to work properly. The currently available
fullscreen option in View > Fullscreen works fine and we plan to
migrate to the "new-style" fullscreen support in the future.
2016-04-17 00:39:40 +01:00
Michael Natterer 3a837ed17c app: cruft removal and cleanup in the config classes 2016-04-17 00:32:07 +01:00
Michael Natterer 65d3ce7cb8 app: port everything to GIMP_CONFIG_PROP_FOO() 2016-04-17 00:11:06 +01:00
Jehan f3d6dd356d app: indentation cleanup.
Replace tabs with spaces.
2016-04-16 19:08:13 +01:00
Michael Natterer 9e01106046 app: set a reasonable minimum height for prop text buffers/views 2016-04-16 17:51:32 +01:00
Jehan 0fcfd4f7b7 Bug 751333 - Crash when moving cursor with ibus "Hangul" input method...
... and improve input method UI. IM should not use some floating overlay
frame to display the preedit text. Instead it is now directly inserted
into the text tool box, as selected text. It permits redimensionning of
the text box while typing, and push the rest of the text when inserting
in the middle (instead of superimposing an overlay box over the current
text box, making everything unreadable).
Input methods still have a few more issues, but this fixes the main UI
weirdness as well as the crash with Hangul IM.
2016-04-16 14:24:54 +01:00
Kristian Rietveld ca9365f2b5 core: bail out of gimp_exit if exit was cancelled by user 2016-04-16 14:20:43 +01:00
Kristian Rietveld 1e4cbd3232 core: move final unref of images from gimp_real_exit to gimp_exit
We needed to get rid of these images at a later point. This fixes (at
least) a crash seen on Mac OS X, where the images were being unreffed
before the last GimpActions (with a reference to the image) were
unreffed.
2016-04-16 13:55:46 +01:00
Sven Claussner 0fa6c7f121 flood: improve PDB description completely
Improve PDB description in generator template and all generated files.
2016-04-16 06:19:36 +00:00
Michael Natterer 020b524e59 app: add gegl:gegl to Filters -> Generic
Also fix packing of the operation GUI in GimpOperationTool,
so the text box can expand.
2016-04-16 03:18:29 +01:00
Michael Natterer a638a30f8d app: use gimp_gegl_config_connect_node() in GimpImageMapTool
And remove all explicit node syncing, which also removes the need for
gimp_image_map_tool_map().
2016-04-16 03:02:05 +01:00
Michael Natterer adc5237845 app: support GEGL error string properties in gimp_prop_gui_new_from_pspec() 2016-04-16 03:02:05 +01:00
Michael Natterer b5f5a1cd28 app: add gimp_gegl_config_connect_node()
which connects the properties of a config GObject and a GeglNode, much
like g_object_bind_property() which we can't be used because GeglNode
properties can't be registered with the GObjectClass.
2016-04-16 03:02:05 +01:00
Kristian Rietveld 2213f29677 app: block edited signal in GimpDataFactory edited callback
This fixes a problem where in some cases the item next to the edited
item was changed inadvertently. This was caused by the fact that
the change of the label within the tree_name_edited callback triggered
a re-ordering of the items, which triggered a stop editing signal, which
finally caused a re-entrance in the tree_name_edited callback. By this
time the item below "path_str" has changed, which caused the name of
another object to be edited.
2016-04-15 23:39:57 +01:00
Michael Natterer 3fd6435198 app: add gimp_babl_format_get_color_profile()
and remove the code duplication added a few commits before.
2016-04-15 23:02:19 +01:00
Michael Natterer 5f8b6ce8da app: s/gimp_babl_get_description/gimp_babl_format_get_description/ 2016-04-15 19:19:09 +01:00
Michael Natterer 0a5ba05e45 app: GimpBuffer: same preview colorspace fixes as below for images/layers
Plus, implement GimpColorManaged so the view renderer can ask the
buffer for its profile.

This also fixes colors in cross-application copy & paste when GIMP
is the source.
2016-04-15 18:16:15 +01:00
Michael Natterer f718940772 app: don't assume that a GimpColorManaged is always also a GimpPickable
Instead, get the color config via GimpViewRenderer's context.
2016-04-15 18:14:08 +01:00
Michael Natterer 9e8499bb48 Bug 478528 - Layer and Image previews are not color managed
Change gimp_viewable_get_[new]_preview() to return buffers of the
image's and layers' colorspace, but in u8. This way layer and image
previews can transform them correctly to the display profile.

Note: this makes plug-ins receive thumbnail buffers in that
pixel format too.

Also change gimp_viewable_get_[new]_pixbuf() to always return sRGB
buffers that can reasonably be put to screen directly, or put into DND
buffers. This is at least more correct now.
2016-04-15 16:52:25 +01:00
Michael Natterer 0ee27de463 app: cache more lcms transforms in GimpImage
Keep around transforms not only to/from the image's pixels to
"R'G'B'A double" (GimpRGB's format), but also to/from "R'G'B'A u8"
(GdkPixbuf's format). Also add API to access all cached transforms
and the Babl formats expected when calling lcms.
2016-04-15 16:49:36 +01:00
Michael Natterer 2120742cb9 app: don't unconditionally call tool_manager_modifier_state_active()
Only call it if the display is the active tool's focus display.
2016-04-15 11:28:13 +01:00
Michael Natterer 2a31b96f4b Bug 732160 - menu activation with alt-somekey makes tools stay...
...in "alt-pressed" mode

Menu activation doesn't cause a focus-out becaus menu keyboard
grabbing is implemented with a simple gtk_grab_add() (the menu popup
never gets the focus). Therefore, the canvas never gets a focus-out
event and the pressed modifiers are stuck.

Fixed by connecting to "grab-notify" on the canvas, and artificially
releasing all modifiers when the canvas is shadowed by a grab.
2016-04-15 00:22:25 +01:00
Michael Natterer 70a81412b4 app: keep the split preview guide always movable
Change things so the guide is preferred over any color picking
interaction of the parent GimpColorTool. Needs a minor change in the
GimpCurvesTool subclass too.
2016-04-14 19:25:59 +01:00
Michael Natterer 8f8da22389 Bug 764630 - Preview curtain: can there be a switch "left/right"...
...for the preview?

Change to allow for split previews in all 4 directions. Remove the
direction controls from the filter dialog, and instead implement
shift- and control-clicking on the split guide to switch
original/filtered sides, or orientation.
2016-04-14 02:34:45 +01:00
Michael Natterer 076ef278d4 app: get rid of x1, y1, x2, y2 in gimp_channel_real_flood()
Use, x, y, width, height instead.
2016-04-10 16:34:53 +02:00
Michael Natterer 47a9c2a54b app: s/Remove holes/Remove Holes/, menu item labels are capitalized 2016-04-10 16:34:14 +02:00
Michael Natterer f34aa5fa6b Bug 756389 - Color-managing grayscale images
Rename profile constructors to say "d65_gray" instead of just "gray",
"srgb_trc" instead of "srgb_gamma", and drop the "srgb" from
"srgb_linear" because we now say "d65". This should be a naming scheme
that doesn't conflict with whatever future functions we might add.
2016-04-09 18:47:51 +02:00
Sven Claussner 9272da1a21 Flood op: improve descriptions
Add more user friendly description to the PDB op.
Partially keep the technical description for the PDB op and add a
reference to the developer wiki.
Use the new "reference" key for the GEGL op.
2016-04-08 08:52:12 +00:00
Sven Claussner f4adb9a078 Rename UI strings
After discussion in IRC some weeks ago give the Selection-Flood items
the more meaningful name Selection-Remove holes.
	modified:   app/actions/select-actions.c
        modified:   app/core/gimpselection.c
2016-04-08 08:22:47 +00:00
Michael Natterer 0dc8662764 Bug 764588 - Suggest changing "Select _Custom Color..." to "_Custom Color..."
So be it.
2016-04-07 22:52:36 +02:00
Michael Natterer 454f7fb7ff Bug 763620 - "Export" > "Export..."
Show ellipses on the "Export" and "Save" menu items when selecting
them will show a file chooser.
2016-04-07 22:12:22 +02:00
Michael Natterer 240fe3b16e app: allow to switch the split preview between horizontal and vertical 2016-04-06 21:09:57 +02:00
Michael Natterer 823fddfba3 app: remove some leftover empty function cruft from GimpImageMapTool 2016-04-05 20:44:43 +02:00
Michael Natterer 3e833b9a5c app: change the cursor when the mouse hovers the split view guide 2016-04-05 20:26:05 +02:00
Michael Natterer b81c725c6d Bug 764589 - Flip Tool: Use "Transform" and "Direction" instead...
...of "Affect" and "Flip Type"
2016-04-05 18:59:18 +02:00
Michael Natterer 112dd804bc app: add a "split preview" feature to GEGL ops that can be dragged around
We also commonly call this "preview curtain".
2016-04-04 22:19:30 +02:00
Michael Natterer 8984df028f app: add a canvas style for "split view" guides 2016-04-04 22:12:33 +02:00
Michael Natterer 28a91b045f app: change GimpGuideTool to live-move custom guides
As in, move the guide along with the mouse, don't draw a tool line and
move the guide on button release.
2016-04-04 22:09:51 +02:00
Michael Natterer 0e050bed7c app: don't push move and remove undo steps for custom guides 2016-04-03 20:33:01 +02:00
Michael Natterer 1b6f414d4d app: add g_return_if_fail() to gimp_guide_get_style() and is_custom() 2016-04-03 20:33:01 +02:00
Michael Natterer 7889ec08f7 Bug 668016 - Accidentally clicking ruler loses active tool's state
Add two new tools, GimpGuideTool and GimpSamplePointTool. They are
one-trick-ponies and can only create new or move existing guides and
sample points. They can't be selected from the toolbox, only
temporarily pushed as active tools on top of any active tool using
their public start() APIs.

Use that API to enable them when the rulers are clicked, and replace
the entire guide and sample point moving code in GimpMoveTool and
GimpColorTool by simple calls to that API.

This might look like overkill but can easily be used for other
features like moving guides from within the paint tools (mirror
painting) or gegl filters (preview curtain).
2016-04-03 16:41:42 +02:00
Michael Natterer af9fee00f4 app: remove obsolete #define GAMMA_CORRECTION_BLURB 2016-03-28 15:02:27 +02:00
Elle Stone 96d8397114 Bug 763996 - Where appropriate, change "gamma correction" to "gamma adjustment"
Gamma correction refers to correcting how an image is displayed on
various devices. Gamma adjustment is a more general phrase that also
applies to adjusting gamma as a step in image enhancement in a
color-managed workflow.
2016-03-28 14:57:24 +02:00
Michael Natterer 88b4c89415 Bug 761118 - GIMP prints many CRITICAL warnings
Bail out in gimp_overlay_box_scroll() if the widget is not realized.
2016-03-28 14:46:13 +02:00
Michael Natterer e76f7174fc Bug 761270 - layer boundary not re-drawn correctly on scrolling
Pass the display scroll offset down to gimp_cairo_stipple_pattern_create()
and set it as offset on the created cairo pattern, so stipple patterns
look the same no matter how the display is scrolled.
2016-03-26 22:50:10 +01:00
Michael Natterer 7529fd987c app: change GEGL op GUI generation so widgets can expand vertically
Currently we only expand scrolled windows, which are used for
multiline text properties' GtkTextViews.
2016-03-26 20:28:24 +01:00
Michael Natterer 2c0ba5cf38 app: fix typo in gimpimagemap.h 2016-03-26 16:34:46 +01:00
Michael Natterer 47ef3be145 Initialize GValues with G_VALUE_INIT instead of { 0, } 2016-03-26 15:59:26 +01:00
Øyvind Kolås 2e46850131 app: remove old GEGL multiline prop type/handling
We're using ui_meta keys now, and no longer specialized param spec subclasses
nor tagging with custom qdata.
2016-03-26 12:29:04 +01:00
Jehan 59f4ee55c9 app: do not migrate theme settings.
Themes from 2.8 and before are not fully compatible with 2.10.
In particular, embedded icons would not work and you would end up with
the Symbolic icon theme (light colors), which may not work well with a
custom theme.
It is better to reset to the new defaults upon migration and users can
still try and configure the theming afterwards if they wish.
2016-03-25 21:43:58 +01:00
Jehan 7fe64b747c app, libgimpwidgets: Dark theme and Symbolic icons as defaults.
These seem the expected theming defaults nowaydays, for a graphics
software, and so GIMP will follow these recommendations.
2016-03-25 20:53:22 +01:00
Øyvind Kolås 9a01a4ff96 app: recognize multiline meta data from ops 2016-03-25 04:28:15 +01:00
Massimo Valentini de4bc99448 Bug 763135 - Gimp cage tool doesn't work anymore
Fix various bugs, most importantly make sure the cage node is
properly updated when the config changes.
2016-03-23 23:00:48 +01:00
Michael Natterer 1b71731cb8 app: clean up the GEGL progress code a bit
Includes code from Massimo from bug #763135.
2016-03-23 22:53:09 +01:00
Michael Natterer 2229d0aed8 Bug 740939 - No shortcut actions for changing tool's spacing, hardness and force
Add generic tool actions for spacing, hardness and force, and the
GimpToolControl infrasctructure to redirect them to tool-specific
actions. Add tool-specific actions for GimpBrushTool, GimpMybrushTool
and GimpWarpTool as redirect targets. Also fix some existing tool
action callbacks to use the right increase/decrease steps.
2016-03-22 23:54:40 +01:00
Jehan 0f67e21c98 themes: rename theme "Default" into "System".
Since we have many themes now, this new name better indicates that it
is meant to follow your desktop theme settings.
Also it will likely not remain the default theme.
2016-03-22 16:37:10 +01:00
Michael Natterer 4110840382 app: the range of GimpInkOption's and GimpBlobEditor's angle is [-PI..PI]
not [-90..90]. This will warn on startup for saved values which are
now out-of-range, but only until the tool options got saved again.
2016-03-21 10:37:56 +01:00
Michael Natterer c0fab2402a app: fix calculation for action values which can wrap around
such as the brush angle action.
2016-03-21 09:19:06 +01:00
Michael Natterer 70c5a1009a app: don't automatically use explicitly stored filter values
only use automatically stored values (only thes can be last used values)
2016-03-20 21:56:51 +01:00
Michael Natterer 9693ab92e7 Bug 761998 - MyPaint brush popup out of screen
Add a lame workaround to GimpContainerPopup (default to 6 instead
of 10 rows of items if the view size is >= LARGE).
2016-03-20 21:34:37 +01:00
Michael Natterer f7962c27e1 app: implement get_memsize() and get_checksum() in GimpMybrush 2016-03-20 21:16:04 +01:00
Michael Natterer b8ae89c37f app: actually use the calculated checksum in gimp_brush_get_checksum() 2016-03-20 21:15:37 +01:00
Michael Natterer dc33afd95b Bug 762279 - "Tip of the day" links opens two links
Fix this the brute force way, don't look it's ugly...
2016-03-20 20:29:43 +01:00
Michael Natterer c6d5ca8977 app: remove GimpImageMapTool::get_operation() impl from GimpGeglTool
it was doing absolutely nothing any longer.
2016-03-19 22:29:31 +01:00
Michael Natterer 041659a2ab app: remove the recent_settings container from GimpImageMapToolClass
and use gimp_gegl_config_get_container() locally where needed. This
also removes some special code from gimpoperationtool.c.
2016-03-19 22:06:13 +01:00
Michael Natterer 1051082189 app: use gimp_gegl_config_register() in gimp_gegl_config_new()
instead of manually interting the new type into the table.
2016-03-19 21:08:29 +01:00
Ell 5084bcae87 app: Add a test case for the "gimp:flood" operation 2016-03-19 20:29:37 +01:00
Ell a11dd0e29a Bug 761795 - Performance improvement for the flood operation
Improve the performance of the "gimp:flood" operation and add plenty
of comments.
2016-03-19 20:29:37 +01:00
Øyvind Kolås a28964c698 configure/app: bump required GEGL version to 0.3.6 2016-03-19 19:39:56 +01:00
Michael Natterer 49ffbbbbc0 app: add menu items and a dialog for GimpItem::fill()
which are essentially a copy of the stroking GUI. We now can fill the
exact shape outlined by stroking selections and paths. Suggestions for
the menu item labels are welcome.
2016-03-15 21:07:59 +01:00
Michael Natterer c09a724bda app: change parameters of gimp_fill_options_new()
to be the same as of gimp_stroke_options_new() because it's about to
be needed for the same purposes.
2016-03-15 20:10:16 +01:00
Michael Natterer ff1c678058 app: add GimpItem::fill() which fills what is outlined by ::stroke()
For selections, it's different from gimp_edit_fill() because it
ignores the selection while filling, just as stroking does. Currently
unused, stay tuned...
2016-03-14 19:02:18 +01:00
Michael Natterer 34913f49a5 app: clean up the color and pattern dropping code in gimpdisplayshell-dnd.c 2016-03-14 00:33:15 +01:00
Michael Natterer 1fa61cae36 app: clean up "drop to new button" code in GimpDrawableTreeView 2016-03-13 19:04:22 +01:00
Michael Natterer d588bff8be Bug 763547 - GIMP git segfaults on exit when the airbrush tool is active
Fix GimpAirbrush to not keep a GimpSymmetry instance around across
paint strokes. The symmetry refs its drawable but lacks the code of
dropping the reference when the drawable is removed from the image, or
the image is closed.

Also cleaned up gimp_airbrush_paint() a bit.
2016-03-13 13:15:19 +01:00
Michael Natterer ed821c8184 app: formatting cleanup in gimppaintbrush.c 2016-03-13 13:15:19 +01:00
Michael Natterer 7b7b8f5d03 app: remove some #includes 2016-03-11 22:45:15 +01:00
Michael Natterer 3b6ab62c1e app: remove boolean return value from gimp_edit_clear() and gimp_edit_fill() 2016-03-11 22:41:25 +01:00
Michael Natterer d71f53dfe9 app: change gimp_drawable_bucket_fill() to use GimpFillOptions
and get rid of gimp_drawable_bucket_fill_internal().
2016-03-11 22:05:33 +01:00
Michael Natterer e1e77f88fa app: change gimp_edit_fill() to take a GimpFillOptions
instead of a long list of parameters. Get rid of gimp_edit_fill_full().
2016-03-11 19:55:50 +01:00
Michael Natterer 00932b57af app: add gimp_fill_options_set_by_fill_mode()
which takes a context and a GimpBucketFillMode and configures the
GimpFillOptions accordingly.
2016-03-11 19:48:26 +01:00
Michael Natterer 9ef2428fcb app: add gimp_fill_options_get_undo_desc()
which returns an undo string to be used when filling with the option's
settings.
2016-03-11 18:47:03 +01:00
Michael Natterer d0b113d1ca app: add "style" and "antialias" setters to GimpFillOptions 2016-03-08 19:49:17 +01:00
Michael Natterer 05b619cb8c pdb: also fix gimp-edit-bucket-fill-full, see below 2016-03-08 02:26:20 +01:00
Michael Natterer 9fa832c5aa app: add gimp_fill_options_set_by_fill_type()
which sets color, pattern and fill style on a GimpFillOptions, based
on a context and a GimpFillType.
2016-03-08 01:51:10 +01:00
Michael Natterer ad2c01f8d8 app: move gimp_drawable_fill() to gimpdrawable-fill.[ch]
and get rid of gimp_drawable_fill_full().
2016-03-08 01:44:35 +01:00
Daniel Sabo 19b6b53f66 app: Fix GimpMyBrush action names 2016-03-07 16:26:58 -08:00
Daniel Sabo 2b7088f6e9 Make Burn mode output match Gimp 2.8 ( partial revert of bug 744265 ) 2016-03-07 16:26:58 -08:00
Daniel Sabo 39a417d476 app: Improve math of unaccelerated OperationNormalMode
Hopefully no one is stuck on a CPU old enough to need this, but if
they are the ratio based math is noticeably faster.
2016-03-07 16:26:58 -08:00
Michael Natterer 8d3c6a4f38 pdb: fix gimp-edit-bucket-fill when there is a selection
use the passed opacity and paint mode instead of hardcoding OPAQUE and
NORMAL.
2016-03-08 01:17:35 +01:00
Michael Natterer 3f1c39c1b9 app: rename gimp_selection_push,pop_stroking() to selection_suspend,resume() 2016-03-07 21:39:41 +01:00
Michael Natterer f2a98566d5 app: add gimpdrawable-fill.[ch]
for the filling code from gimpdrawable-stroke.[ch]; and clean up and
untangle the stroking and filling functions.
2016-03-07 21:33:42 +01:00
Jehan 0e9453d5ee Bug 762282 - Link ends with "/."
Add a comment for translators, which will be extracted by gettext,
ensuring that all translators are aware of the problem.
2016-02-26 17:17:44 +01:00
Jehan 1159ec2d90 Bug 762282 - Link ends with "/."
One can't say automatically if the dot is part of the URL (even though
usually not). Simpler is to not finish with a dot.
2016-02-25 17:47:36 +01:00
Alexandre Prokoudine 1f80c48361 Mark user-visible messages for translation 2016-02-23 13:26:44 +03:00
Michael Natterer b5bc15c9b9 app: add support for a preview rectangle to GimpImageMap 2016-02-16 21:36:36 +01:00
Michael Natterer bda7ddc0fd app: disable the preview area in gimp_drawable_merge_filter()
This call has no effect if there was no preview area in the first place.
2016-02-16 21:36:35 +01:00
Michael Natterer a0b18c7929 app: make GimpApplicator's preview feature optional
Don't add the preview nodes if use_preview_cache is FALSE in
gimp_applicator_new().
2016-02-16 21:36:35 +01:00
Michael Natterer e3144ecc4c app: add support for a "preview rectangle" to GimpApplicator
When set, it crops the effect to that rectangle, using a cache for
quickly changing the previewed area. When disabling the preview rect,
make sure we don't lose the cached result by processing it into the
output cache through the mode and affect nodes which is cheap-ish.
2016-02-16 21:36:21 +01:00
Michael Natterer c2cef394b2 app: don't invalidate the buffer source in gimp_drawable_real_update()
This was an artifact from the times of the initial GEGL port,
apparently something was broken in GEGL at the time.
2016-02-14 22:41:23 +01:00
Michael Natterer 336785ab51 Bug 753683 - default path location
Change the default folder to "Desktop" on OS X because it's expected
on the platform.
2016-02-12 23:09:03 +01:00
Michael Natterer f2d581a536 Bug 761170 - Warnings building with clang
Fix a bunch of clang warnings.
2016-02-12 22:49:47 +01:00
Michael Natterer bd5d851364 Bug 752071 - less tool preset defaults checked
Don't check palette and gradient, but special case the blend tool for
gradient. The idea is that we check everything except colors.
2016-02-12 00:12:00 +01:00
Michael Natterer e5b6806fe2 app: port tons of files to the new GIMP_CONFIG_PROP_FOO() macros
and remove lots of labels from calls to gimp_prop_foo_new(). Also
had to manually remove some unwanted labels that are now added
automatically, fixes bug #761880.
2016-02-11 23:46:24 +01:00
Jehan 7364c37158 app: update documentation comment of gimp_guide_custom_new().
Say in the doc that custom guides do not follow snapping settings.
2016-02-11 17:40:45 +01:00
Jehan fa19271859 app: do not snap to custom guides.
I am still not sure whether custom guides should follow snapping rules.
Yet I could easily imagine you could want some normal guides with
snapping and in the same time symmetry without snapping to axis of
symmetry. So for the time being, let's disable snapping to custom guides
all the time and see if logic could be improved later.
2016-02-11 17:35:21 +01:00
Jehan 790f72d4fe app: update "horizontal/vertical guide position" labels.
"Guide" is our internal representation. In geometry, we'll talk about
an "axis" of symmetry.
2016-02-11 17:15:53 +01:00
Jehan 0107335938 app: allow the mirror axis position within image's dimensions only.
This is not ideal since the scale widget is crazy huge, thus
impractical, but the solution used on properties of other symmetries
(updating min/max of the class property) is wrong since it applies to
the whole class.
For the time being, it avoid setting obviously bad values until we
figure out the ideal automatic UI construction.
2016-02-11 17:12:45 +01:00