Commit Graph

36816 Commits

Author SHA1 Message Date
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
Piotr Drąg ec99c99b7a Updated Polish translation 2016-05-11 18:26:29 +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
Yolanda Álvarez Pérez 2c36e71938 Updated Spanish translation 2016-05-11 06:45:01 +00: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
Alexandre Prokoudine 7d480b62b3 Update Russian translation 2016-05-10 01:16:41 +03:00
Alexandre Prokoudine e66ec72a3f Fix a user-visible typo 2016-05-10 01:08:14 +03: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
Michael Natterer 64fb18453c libgimpconfig: add support for (de)serializing GFile properties
Use g_file_get_parse_name() and g_file_parse_name() in order to turn
them into strings and back. Not really sure if we will end up needing
this, but I need it for current hacking. It's clean code and easy
enough to revert, so no harm done in either case.
2016-05-08 23:08:38 +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