Commit Graph

4060 Commits

Author SHA1 Message Date
Michael Natterer 5dbcdef477 app: implement optional dithering when converting to lower bit depth
Add "layer_dither_type" and "mask_dither_type" to
GimpDrawable::convert_type(), pass around the dither type from the
dialog, and implement dithering using gegl:color-reduction.
2012-10-13 21:46:56 +02:00
Michael Natterer 0f0da94f55 app: fix progress handling in gimp_apply_operation()
Only end the progress if we also started it here.
2012-10-12 20:09:47 +02:00
Michael Natterer 6c41f58fea Bug 682742 - Module manager: turning off modules has no effect
Use gimp_config_writer_string() instead of gimp_config_writer_printf()
to serialize module-load-inhibit so backslashes and other stuff gets
properly escaped.
2012-10-09 01:25:42 +02:00
Michael Natterer 59c0c96921 app: add gimp_data_factory_get_data_type() 2012-10-07 00:17:01 +02:00
Michael Natterer 6ddb977542 app: reimplement image component visibility using gimp:mask-components 2012-10-06 23:58:46 +02:00
Michael Natterer 58506568e5 app: update the progress also when converting the selection's precision 2012-10-01 13:36:50 +02:00
Michael Natterer 1725c6c865 app: make group layer type conversion depend on less side conditions
gimp_group_layer_convert_type() required the image's precision to be
already set to the new value.
2012-09-28 20:58:40 +02:00
Michael Natterer c9e788c39d app: add gimp_babl_mask_format(precision) 2012-09-27 23:50:20 +02:00
Michael Natterer 2a30a2bb74 Bug 684698 - Preferences-Folders: only 15 folder items accepted
Raise "max_paths" from 16 to 256 in all calls to gimp_path_parse().
2012-09-26 23:29:51 +02:00
Michael Natterer 0ca03e8827 app: add a "Convert Precision" dialog for choosing dithering options
Does absolutely nothing yet.
2012-09-23 23:47:28 +02:00
Michael Natterer 3682006dfd app: some cleanup and formatting in image crop and resize 2012-09-22 16:34:14 +02:00
Michael Natterer 303e554ab1 app: remove "gboolean active_layer_only" from gimp_image_crop()
Also a very historic API, it doesn't belong there. Instead, simply
call gimp_item_resize() in GimpCropTool.
2012-09-22 15:08:05 +02:00
Michael Natterer c1811d6bdf app: gimp_image_crop_auto_shrink() -> gimp_pickable_auto_shrink()
It was in gimpimag-crop only for historic reasons. Clean up API
and code to do simpler and more reasonable stuff.
2012-09-22 14:56:52 +02:00
Michael Natterer cd0143c350 app: clarify operator precedence in an expression with % and ? 2012-09-21 10:40:44 +02:00
Michael Natterer 7597b83bd8 app: plug string leak in gimp_image_format_display_uri() 2012-09-21 10:34:17 +02:00
Massimo Valentini a0221bc560 app: plug a memory leak
and make the blend tool (Shape: Shaped (angular)) sligthly
more efficient

with an opaque layer (400x300) goes from:
gradient_fill_region: gradient_fill_region took 52.69 seconds
EEEEeEeek! 2 GeglBuffers leaked
to:
gradient_fill_region: gradient_fill_region took 5.90 seconds
2012-09-19 19:10:49 +02:00
Kevin Cozens a2e037fb00 Corrected spelling errors spotted by Ari Pollak (Mostly fixes bug #683694)
Still need to address the "allows to" grammatical error.
2012-09-10 12:22:12 -04:00
Michael Natterer 4db6a970de app: add a workaround to make GimpModuleDB's "verbose" flag work
so we get module output from gimp --verbose.
2012-09-08 12:48:53 +02:00
Michael Natterer e546f2b43b Bug 683462 - cropping with rectangular select tool leaves misaligned...
Reset the tool on image changes again, but not if only the active
drawable changes, so keep bug #678890 closed:

Introduce new dirty flag GIMP_DIRTY_ACTIVE_DRAWABLE and set it on all
tools' dirty_mask except for rect select. Check the new flag when
reseting the active tool because of a drawable change.
2012-09-06 23:55:35 +02:00
Michael Natterer d7588ba45c Bug 678358 - Add option to skip text layers when resizing the image
Add a "Resize text layers" toggle to the canvas size dialog, and
default to FALSE because this seems the desired behavior in most
cases.
2012-09-05 23:26:54 +02:00
Michael Natterer c7b9728cc8 app: make handling of coordinates more robust against broken input drivers
Initialize the axes[] array with zeros and change pressure curve
mapping to not try to "interpolate" shit like NaN and crash.
2012-09-05 11:36:44 +02:00
Michael Natterer 095561f8bc app: don't always duplicate the source buffer in gimp_buffer_new()
Honor the passed copy_pixels boolean again. This was disabled during
GEGL porting and forgotten.
2012-08-24 22:31:42 +02:00
Michael Natterer 101a9b9887 app: make image and projection size estimations precision-aware
GimpProjection estimation was still assuming 8 bit, so was
GimpTemplate. Also, calculate GIMP_PROJECTION_IDLE_PRIORITY
inatead of hardcoding it.
2012-08-24 22:16:02 +02:00
Mikael Magnusson f6f22ed431 Remove stray semicolons 2012-08-20 15:22:20 +02:00
Michael Natterer 276b507285 Bug 681799 - Canvas size doesn't show preview after canceling once
gimp_viewable_get_pixbuf(): if there is a cached pixbuf of the right
size, actually return it, instead of the local "pixbuf" variable which
is always NULL.
2012-08-14 09:23:16 +02:00
Michael Natterer 47c94fc228 app: improve error message when failing to load an ABR version 6 brush 2012-08-04 00:04:47 +02:00
Michael Natterer eda6fa1c14 Bug 586462 - Layer inserts misplaced
Another attempt to fix paste/drop positions for good.

Paste/drop target is either the selected area of a drawable, the
drawable itself, or the image:

- if the paste is larger than the target, center on the target
- if there is a viewport, and the viewport intersects with the
  target, center on the intersection
- otherwise, center on the target

Finally, if we did viewport-centered pasting, make sure the paste is
as completely within image bounds as possible.
2012-07-30 16:20:11 +02:00
Michael Natterer 16798d839c app: keep the projection around in the image's layer format
so it's not always 8 bit and can be used to copy real data from in all
precisions.
2012-07-30 16:00:02 +02:00
Michael Natterer 220b28677b Bug 676566 - Window title becomes "Untitled" after exporting without saving
Fix this and other issues more globally by moving the logic that
formats the image's display name into the GimpImage object, and return
the properly formatted name, e.g. "Foo.xcf", or "[Foo] (imported)"
from gimp_image_get_display_name().

Also add gimp_image_get_display_path() which returns the full path
instead. Use the two functions for formatting the image title, and
apply various other fixes that make sure the UI always uses the same
string to identify the image.

Call gimp_object_name_changed() whenever the save/export status
changes, so the image's cached display name and path get cleared.
2012-07-17 22:52:49 +02:00
Massimo Valentini f58518dd70 app: plug a memory leak
==7785== 96 bytes in 4 blocks are definitely lost in loss record 16,947 of 20,720
==7785==    at 0x4A0884D: malloc (/builddir/build/BUILD/valgrind-3.7.0/coregrind/m_replacemalloc/vg_replace_malloc.c:263)
==7785==    by 0x87F52DE: g_malloc (glib/glib/gmem.c:159)
==7785==    by 0x8809741: g_slice_alloc (glib/glib/gslice.c:1003)
==7785==    by 0x87EBF0D: g_list_prepend (glib/glib/glist.c:275)
==7785==    by 0x6FA596: gimp_item_stack_get_item_list (gimp/app/core/gimpitemstack.c:175)
==7785==    by 0x6D97B4: gimp_image_convert_precision (gimp/app/core/gimpimage-convert-precision.c:55)
==7785==    by 0x49B62E: image_convert_precision_cmd_callback (gimp/app/actions/image-commands.c:236)
2012-07-07 18:47:02 +02:00
Massimo Valentini 82af5731fa app: small typo
gimp-2.9 used to print:

(gimp-2.9:3): GEGL-gegl-node.c-WARNING **: gegl_node_pads_exist:
   Can't find source property outout of gegl:translate 0x10cbde10

before crashing
2012-07-07 16:18:48 +02:00
Michael Natterer 6b6d39fc64 app: add GimpTileHandlerProjection and use it to validate the projection
as the projection buffer is being read from. Projection performance is
now back at its old speed.
2012-07-05 21:42:26 +02:00
Michael Natterer 8c871b3a5f app: fix buffer == NULL warning in GimpProjection 2012-06-26 16:09:29 +02:00
Michael Natterer fbb2afdf1d app: rename gimpimage-convert.[ch] to gimpimage-convert-type.[ch] 2012-06-26 14:38:33 +02:00
Michael Natterer daad966b8f app: remove GimpImage's cached preview
because GimpViewable already implements exactly the same.
2012-06-25 00:23:07 +02:00
Michael Natterer 373a4e7469 app: completely remove TileManager and friends (base/ and paint-funcs/)
And along with it a lot of stuff like the drawable preview cache, the
gegl tile manager backend, temporary gimp_gegl_buffer_foo() stuff, and
the remaining bits of performance.

The projection is in an evil semi-ported state which makes it work
ok-ish for stuff like layer moving, but absolutely unbearable for
painting, there is also an off-by-one rendering glitch at some zoom
levels.
2012-06-20 21:44:09 +02:00
Michael Natterer 67b5a509b6 Bug 677823 - Shift + mouse click to link all layers does not work
This got lost during layer group porting, reimplement it, but restrict
"all layers" to the clicked layer's branch in the tree.
2012-06-12 21:39:40 +02:00
Michael Natterer 33141419cc app: experimental blend speedup code for review, disabled
Keeps around a cache of gradient values, instead of calling
gimp_gradient_get_color_at() for each rendered pixel.
2012-05-28 22:55:03 +02:00
Michael Natterer 81e3b6ba63 app: remove more stuff from base-types.h 2012-05-21 21:56:22 +02:00
Michael Natterer 513e3b6a78 app: disable the foreground select tool properly: #if 0 everything
so it's not in the way of further cruft removal.
2012-05-21 03:09:08 +02:00
Michael Natterer 4dcd1f3ad4 app: use plain gegl_buffer_new() and _dup(), not the gimp_gegl_ variants
unless the buffers end up being drawable->buffer.
2012-05-20 22:02:59 +02:00
Michael Natterer 236ea4ddfe app: "disable" SIOX but in an evil way that keeps the tool building
Will probably crash hilariously when using it.
2012-05-20 21:05:17 +02:00
Michael Natterer 759b71b8e9 app: remove GimpProjectable::get_layers() and ::get_channels() 2012-05-20 20:28:27 +02:00
Michael Natterer 7539b9e359 app: simplify projection construction by not doing things GEGL should do 2012-05-20 20:24:45 +02:00
Michael Natterer 0d636a3561 app: same ERASE mode fix for gimp_edit_clear() 2012-05-20 17:32:43 +02:00
Michael Natterer 5247f461aa app: remove paint-funcs-types.h 2012-05-19 01:13:21 +02:00
Michael Natterer 01c92a7c4e app: remove all use-gegl config stuff 2012-05-19 00:50:53 +02:00
Michael Natterer 06c59973d3 app: remove the entire legacy composition code 2012-05-19 00:41:43 +02:00
Michael Natterer 07cc3976ca app: remove the !use_gegl case from gimpimage-merge.c 2012-05-19 00:19:49 +02:00
Michael Natterer aee7ddd56d app: remove the !use_gegl case from gimp_drawable_apply_buffer()
and its last three parameters because they were only used for legacy
floating selection projection.
2012-05-19 00:14:51 +02:00