Commit Graph

36777 Commits

Author SHA1 Message Date
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
Yolanda Álvarez Pérez 418577087c Updated Spanish translation 2016-05-13 09:57:14 +00:00
Mario Blättermann 758ef392dd Updated German translation 2016-05-12 21:36:55 +02:00
klausstaedtler 93cc47ff4b icons: color-scalable
minor corrections:
gimp-path
gimp-paths
gimp-path-stroke
gimp-duplicate
gimp-selection-to-path
gimp-selection-stroke
2016-05-12 20:48:30 +02:00
Yolanda Álvarez Pérez bb767ac3d5 Updated Spanish translation 2016-05-12 06:40:37 +00: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
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