Commit Graph

2857 Commits

Author SHA1 Message Date
Martin Nordholts 2975f815a8 Make the size-changed-detailed signal also contain previous image size.
2008-08-28  Martin Nordholts  <martinn@svn.gnome.org>

	* app/core/gimpimage.[ch]: Make the size-changed-detailed signal
	also contain previous image size.

	* app/display/gimpdisplayshell-handlers.c
	(gimp_display_shell_size_changed_detailed_handler): Take the
	previous image size into account and center the image if it starts
	to fit (axis indepentently) in the viewport due to the resize.

	* app/core/gimpundo.h
	* app/core/gimpimage-undo.c
	* app/core/gimpimageundo.[ch]
	* app/core/gimpimage-undo-push.[ch]: Manage the
	previous-size-information.

	* app/core/gimpimage-crop.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-resize.c: Propagate previous size to the
	size-changed-detailed signal emission and the undo-system.

svn path=/trunk/; revision=26804
2008-08-28 19:12:03 +00:00
Sven Neumann 6a3e8b4cca sprinkled more const qualifiers.
2008-08-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c: sprinkled more const 
qualifiers.

	* app/paint-funcs/scale-region.c: call the progress callback 
less
	often.


svn path=/trunk/; revision=26790
2008-08-27 10:19:15 +00:00
Sven Neumann a8fd690b17 also use PixelSurround for the linear interpolation. Sprinkled some const
2008-08-27  Sven Neumann  <sven@gimp.org>

        * app/core/gimp-transform-region.c: also use PixelSurround for 
the
        linear interpolation. Sprinkled some const qualifiers.


svn path=/trunk/; revision=26786
2008-08-27 06:52:08 +00:00
Sven Neumann 3792d638a2 added missing call to colorize_init().
2008-08-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-colorize.c (gimp_drawable_colorize): 
	added missing call to colorize_init().


svn path=/trunk/; revision=26776
2008-08-26 18:58:23 +00:00
Sven Neumann 972309fe48 changed to silently return in case of out-of-bounds access. There's code
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager.c (read_pixel_data_1): changed to 
silently
	return in case of out-of-bounds access. There's code that relies
	on this.

	* app/base/pixel-surround.[ch]: added SMEAR as another edge
	strategy for the PixelSurround helper.

	* core/gimp-transform-region.c: changed accordingly.


svn path=/trunk/; revision=26767
2008-08-25 20:38:52 +00:00
Sven Neumann e607d2ce0a fixed rounding errors in color conversion.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimpgradient.c (gimp_gradient_get_new_preview): fixed
	rounding errors in color conversion.


svn path=/trunk/; revision=26758
2008-08-25 13:20:07 +00:00
Lars-Peter Clausen d4fac257aa Don't dereference final_start_seg and final_end_seg if NULL.
2008-08-23  Lars-Peter Clausen  <lars@metafoo.de>

	* app/core/gimpgradient.c (gimp_gradient_segment_range_delete):
	Don't dereference final_start_seg and final_end_seg if NULL.


svn path=/trunk/; revision=26725
2008-08-23 13:20:54 +00:00
Sven Neumann 41fef08ad7 only create and use a timer if GIMP_UNSTABLE is defined.
2008-08-23  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_init): only create and
	use a timer if GIMP_UNSTABLE is defined.


svn path=/trunk/; revision=26720
2008-08-22 22:47:06 +00:00
Sven Neumann 0b804f4d50 find guides outside the image as well. This complements the change that we
2008-08-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-guides.c (gimp_image_find_guide): find 
guides
	outside the image as well. This complements the change that we
	also draw guides outside the image now.


svn path=/trunk/; revision=26665
2008-08-19 17:48:33 +00:00
Sven Neumann f6771f1987 moved function calls out of CLAMP macros.
2008-08-12  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.c (gimp_projection_paint_area): moved
	function calls out of CLAMP macros.


svn path=/trunk/; revision=26520
2008-08-12 16:30:44 +00:00
Sven Neumann ee58f4c90d app/core/gimpitem.c app/core/gimpobject.c app/dialogs/preferences-dialog.c
2008-08-12  Sven Neumann  <sven@gimp.org>

	* app/core/gimpitem.c
	* app/core/gimpobject.c
	* app/dialogs/preferences-dialog.c
	* plug-ins/imagemap/imap_main.c
	* plug-ins/imagemap/imap_selection.c
	* plug-ins/common/filter-pack.c
	* plug-ins/common/grid.c
	* plug-ins/common/newsprint.c
	* plug-ins/fractal-explorer/fractal-explorer-dialogs.c
	* plug-ins/fractal-explorer/fractal-explorer.c: use canonical
	signal names.


svn path=/trunk/; revision=26517
2008-08-12 14:45:59 +00:00
Sven Neumann 876b7ad14c allow to pass NULL for the 'name' parameter. This will be handled just
2008-08-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimplayer.c (gimp_layer_new_from_tiles)
	(gimp_layer_new_from_pixbuf) (gimp_layer_new_from_region): allow
	to pass NULL for the 'name' parameter. This will be handled just
	like in gimp_layer_new().


svn path=/trunk/; revision=26434
2008-08-08 07:52:06 +00:00
Sven Neumann 4eb3689b62 added gimp_buffer_get_tiles().
2008-08-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbuffer.[ch]: added gimp_buffer_get_tiles().

	* app/actions/edit-commands.c
	* app/core/gimpbrushclipboard.c
	* app/core/gimppatternclipboard.c: use the new accessor 
function.


svn path=/trunk/; revision=26426
2008-08-07 17:23:45 +00:00
Sven Neumann 60fcaa9629 app/core/gimplayer.c app/actions/edit-commands.c
2008-08-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimplayer.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* tools/pdbgen/pdb/layer.pdb: corrected the GimpImageType passed
	to gimp_layer_new_from_tiles().

	* app/pdb/layer-cmds.c: regenerated.


svn path=/trunk/; revision=26425
2008-08-07 17:19:32 +00:00
Sven Neumann eb92ab8b22 fixed broken copy-on-write code. The old code did not insert the new tile
2008-08-07  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager.c (tile_manager_invalidate_tile): fixed
	broken copy-on-write code. The old code did not insert the new
	tile in the tile-manager's tile pointer array.

	(tile_manager_map): changed in a similar way as
	tile_manager_invalidate_tile(). This code was not broken, but it
	is easier to read now.

	* app/base/tile-private.h: moved a comment.

	* app/core/gimpselection.c (gimp_selection_extract): removed
	workaround for above bug.


svn path=/trunk/; revision=26419
2008-08-07 15:29:02 +00:00
Sven Neumann 4e996afa94 aded a comment explaining why copy_region_nocow() is being used here.
2008-08-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpselection.c (gimp_selection_extract): aded a
	comment explaining why copy_region_nocow() is being used here.


svn path=/trunk/; revision=26418
2008-08-07 13:45:28 +00:00
Sven Neumann e5196e3017 added some empty lines for readability.
2008-08-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimplayer.c (gimp_layer_new_from_region): added some
	empty lines for readability.


svn path=/trunk/; revision=26417
2008-08-07 13:36:04 +00:00
Sven Neumann 3b067cba23 added gimp_image_get_projection().
2008-08-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added gimp_image_get_projection().

	* app/display/gimpdisplay-handlers.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell-scroll.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsourcecore.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimppainttool.c
	* app/widgets/gimpsamplepointeditor.c
	* tools/pdbgen/pdb/image.pdb: use the new accessor function.

	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=26413
2008-08-07 09:17:46 +00:00
Sven Neumann 6d9a5394cc removed unused include.
2008-08-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-shadow.c: removed unused include.


svn path=/trunk/; revision=26406
2008-08-06 19:42:52 +00:00
Martin Nordholts f9d43a527f Clarify the design with a comment.
2008-08-05  Martin Nordholts  <martinn@svn.gnome.org>

	* app/core/gimpimage.c (gimp_image_real_size_changed_detailed):
	Clarify the design with a comment.

svn path=/trunk/; revision=26388
2008-08-05 17:01:51 +00:00
Sven Neumann 605701a29f don't waste CPU cycles scaling an empty channel.
2008-08-05  Sven Neumann  <sven@gimp.org>

	* app/core/gimpchannel.c (gimp_channel_scale): don't waste CPU
	cycles scaling an empty channel.


svn path=/trunk/; revision=26383
2008-08-05 15:27:18 +00:00
Michael Natterer 26c2c6afda :size-changed-detailed): change double to int in signal parameters.
2008-08-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch] (GimpImage::size-changed-detailed):
	change double to int in signal parameters.

	Remove gimp_image_emit_size_changed_signals() and call
	gimp_viewable_size_changed() in size-changed-detailed's default
	handler.

	* app/core/gimpimageundo.[ch]
	* app/core/gimpimage-undo-push.[ch]: change double to int in
	previous-origin related code.

	* app/core/gimpimage-undo.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-resize.c: call gimp_image_size_changed_detailed()
	instead of the removed gimp_image_emit_size_changed_signals()

	* app/display/gimpdisplayshell-scroll.[ch]: remove
	gimp_display_shell_handle_size_changed_detailed() because it
	handles both scrolling and scaling and doesn't belong here.

	* app/display/gimpdisplayshell-handlers.c: moved its code back to
	gimp_display_shell_size_changed_detailed_handler() and follow the
	double -> int change above.


svn path=/trunk/; revision=26367
2008-08-04 20:11:35 +00:00
Michael Natterer 21754282ef clarify if() condition.
2008-08-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagemapconfig.c (gimp_image_map_config_compare):
	clarify if() condition.


svn path=/trunk/; revision=26366
2008-08-04 19:59:31 +00:00
Martin Nordholts 99be15829c The parameters should be named previous_origin_[xy].
2008-08-04  Martin Nordholts  <martinn@svn.gnome.org>

	* app/core/gimpimage.c (gimp_image_emit_size_changed_signals): The
	parameters should be named previous_origin_[xy].

svn path=/trunk/; revision=26365
2008-08-04 18:50:45 +00:00
Martin Nordholts 6c48f2b601 Further work for completing bug #362915 that makes changes to the image
2008-08-03  Martin Nordholts  <martinn@svn.gnome.org>

	Further work for completing bug #362915 that makes changes to the
	image size (e.g when cropping) be much more nicely handled by
	display shell.

	* app/core/gimpimage.[ch]: Add new signal
	GimpImage::size-changed-detailed that is emited whenever
	GimpViewable::size-changed is. The new signal provides additional
	information, namely the previous origin relative to the current
	origin. Cliens choose what specific signal to listen to depending
	on how much info they need.

	* app/display/gimpdisplayshell-handlers.c: Connect to
	GimpImage::size-changed-detailed instead of
	GimpViewable::size-changed since the shell wants information about
	the previous image origin.
	(gimp_display_shell_resolution_changed_handler): Use
	gimp_display_shell_scale_resize() instead to avoid display
	garbage.

	* app/display/gimpdisplayshell-scale.[ch]: Add new utility
	function gimp_display_shell_center_image_on_next_size_allocate().

	* app/display/gimpdisplayshell-scroll.[ch]
	(gimp_display_shell_handle_size_changed_detailed): New function
	that replaces logic in gimp_display_shell_handle_size_changed and
	that takes previous-origin of the image into account and adjusts
	the offset so that the image content that remains doesn't move. If
	the window is resized on image resize, just center the image
	afterwards.

	* app/core/gimpimage-undo-push.[ch]
	(gimp_image_undo_push_image_size): Add previous-origin paremeters.

	* app/core/gimpimageundo.[ch]: Add and manage previous-origin
	properties so that the display shell offset can be appropriately
	adjusted also when undoing.

	* app/core/gimpundo.h
	* app/core/gimpimage-undo.c: Add previous_origin members to the
	undo accumulator and emit that information when the size of the
	image changes due to the undo.

	* app/core/gimpimage-crop.c (gimp_image_crop)
	* app/core/gimpimage-scale.c (gimp_image_scale)
	* app/core/gimpimage-rotate.c (gimp_image_rotate)
	* app/core/gimpimage-resize.c (gimp_image_resize_with_layers):
	Supply information about the previous-origin of the image to the
	size-changed signals and the undo system.

svn path=/trunk/; revision=26354
2008-08-03 11:35:53 +00:00
Sven Neumann 5a0df95acf formatting.
2008-07-31  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-scale.c (gimp_image_scale): formatting.


svn path=/trunk/; revision=26345
2008-07-31 06:41:38 +00:00
Sven Neumann 5624a717fe also implement brush dynamics emulation for stroking selections.
2008-07-23  Sven Neumann  <sven@gimp.org>

	* app/paint/gimppaintcore-stroke.[ch]: also implement brush
	dynamics emulation for stroking selections.

	* app/core/gimpchannel.c: pass the 'emulate-dynamics' parameter 
to
	gimp_paint_core_stroke_boundary().


svn path=/trunk/; revision=26293
2008-07-23 12:20:45 +00:00
Sven Neumann d77ee21b8c app/core/gimpguideundo.c app/core/gimpitemundo.c
2008-07-23  Sven Neumann  <sven@gimp.org>

	* app/core/gimpguideundo.c
	* app/core/gimpitemundo.c
	* app/core/gimplayermaskundo.c
	* app/core/gimppdbprogress.c
	* app/core/gimpstrokedesc.c
	* app/core/gimptooloptions.c
	* app/core/gimptoolpresets.c
	* app/paint/gimppaintoptions.c
	* app/text/gimpfont.c
	* app/tools/gimptool.c
	* app/widgets/gimpaction.c
	* app/widgets/gimpcontrollereditor.c: no need to cast the return
	value of g_value_dup_object().


svn path=/trunk/; revision=26289
2008-07-23 06:47:23 +00:00
Simon Budig 3bf754621c incorporate the velocity.
2008-07-21  Simon Budig  <simon@gimp.org>

	* app/core/gimpcoords.c: incorporate the velocity.


svn path=/trunk/; revision=26261
2008-07-21 19:39:35 +00:00
Sven Neumann 7c6c5cd6d4 added boolean property 'emulate-brush-dynamics', in preparation for bug
2008-07-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimpstrokedesc.[ch]: added boolean property
	'emulate-brush-dynamics', in preparation for bug #543706.

	* app/dialogs/stroke-dialog.c: added a toggle for the new 
parameter.


svn path=/trunk/; revision=26255
2008-07-21 15:45:53 +00:00
Sven Neumann 92661af96c removed delta_time, delta_x, delta_y, distance and random from the
2008-07-18  Sven Neumann  <sven@gimp.org>

	* app/core/core-types.h: removed delta_time, delta_x, delta_y,
	distance and random from the GimpCoords struct. These don't need
	to be kept here and they can't be properly interpolated.

	* app/core/gimpcoords.c: changed accordingly.

	* app/xcf/xcf-load.c (xcf_load_vector): the size of the 
GimpCoords
	struct changed.

	* app/display/gimpdisplayshell.[ch] (struct _GimpDisplayShell):
	added some members to store values from the last event that are
	needed in gimp_display_shell_eval_event() and which are not any
	longer part of GimpCoords.

	* app/display/gimpdisplayshell-coords.c
	(gimp_display_shell_eval_event): changed accordingly.
	
	* app/paint/gimppaintoptions.c: calculate a random number when 
one
	is needed.

	* app/paint/gimpbrushcore.c (gimp_brush_core_interpolate):
	GimpCoords doesn't have a "random" field any longer.


svn path=/trunk/; revision=26232
2008-07-18 11:56:05 +00:00
Sven Neumann dbf3201a85 initialize all members of the GimpCoords struct.
2008-07-18  Sven Neumann  <sven@gimp.org>

	* app/core/core-types.h (GIMP_COORDS_DEFAULT_VALUES): initialize
	all members of the GimpCoords struct.


svn path=/trunk/; revision=26231
2008-07-18 11:01:10 +00:00
Sven Neumann 7447eeb09c also mix in the new members of the GimpCoords struct.
2008-07-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcoords.c (gimp_coords_mix): also mix in the new
	members of the GimpCoords struct.


svn path=/trunk/; revision=26230
2008-07-17 20:02:02 +00:00
Sven Neumann 154e185df5 formatting.
2008-07-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcoords.c (gimp_coords_mix): formatting.


svn path=/trunk/; revision=26229
2008-07-17 19:52:55 +00:00
Martin Nordholts 2e86bdab85 Added VOID__DOUBLE_DOUBLE_DOUBLE_DOUBLE marshaller.
2008-07-12  Martin Nordholts  <martinn@svn.gnome.org>

	* app/core/gimpmarshal.list: Added
	VOID__DOUBLE_DOUBLE_DOUBLE_DOUBLE marshaller.

	* app/widgets/gimpnavigationview.c: Make the "marker-changed"
	signal also pass the marker width and height as parameters.

	* app/display/gimpnavigationeditor.c: Updated accordingly.

svn path=/trunk/; revision=26160
2008-07-12 13:53:31 +00:00
Sven Neumann 0fc3b637ea added GIMP_TYPE_COLOR_ARRAY and GIMP_TYPE_PARAM_COLOR_ARRAY in preparation
2008-07-12  Sven Neumann  <sven@gimp.org>

	* app/core/gimpparamspecs.[ch]: added GIMP_TYPE_COLOR_ARRAY and
	GIMP_TYPE_PARAM_COLOR_ARRAY in preparation for fixing bug 
#332206.


svn path=/trunk/; revision=26150
2008-07-12 08:20:14 +00:00
Sven Neumann 15033a594b app/core/gimpscanconvert.c app/vectors/gimpbezierstroke.c
2008-07-11  Sven Neumann  <sven@gimp.org>

	* app/core/gimpscanconvert.c
	* app/vectors/gimpbezierstroke.c

	* app/vectors/gimpvectors.c: include <cairo.h> instead of
	<cairo/cairo.h>.


svn path=/trunk/; revision=26121
2008-07-11 10:37:58 +00:00
Sven Neumann a97d5de211 renamed gimp_data_name_compare() to gimp_data_compare() and changed it to
2008-07-10  Sven Neumann  <sven@sven-sun.berlin.jpk.com>

	* app/core/gimpdata.[ch]: renamed gimp_data_name_compare() to
	gimp_data_compare() and changed it to keep the data in three
	groups: internal, writable and system resource files. Inside the
	groups the sorting order is alphabetical.

	* app/core/gimpdatafactory.c (gimp_data_factory_new): changed
	accordingly.


svn path=/trunk/; revision=26100
2008-07-10 09:08:54 +00:00
Sven Neumann 7e4e4ac5d2 renamed parameter.
2008-07-10  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdatafactory.[ch] (gimp_data_factory_new): renamed
	parameter.


svn path=/trunk/; revision=26099
2008-07-10 08:41:17 +00:00
Sven Neumann 72799c954c fixed misplaced debug output.
2008-07-09  Sven Neumann  <sven@gimp.org>

        * app/core/gimp-user-install.c (gimp_user_install_detect_old):
        fixed misplaced debug output.


svn path=/trunk/; revision=26096
2008-07-09 14:46:42 +00:00
Sven Neumann adfc3bd6f7 changed default grid to a 10x10 grid of solid lines (bug #539318).
2008-07-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimpgrid.c: changed default grid to a 10x10 grid of
	solid lines (bug #539318).


svn path=/trunk/; revision=26055
2008-07-04 06:52:40 +00:00
Michael Natterer 4bdf9a6d2a add marshaller BOOLEAN__STRING for the change below.
2008-06-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpmarshal.list: add marshaller BOOLEAN__STRING for
	the change below.

	* app/widgets/gimpsettingsbox.[ch]: add the import/export dialogs
	here. Add a bunch of parameters to new() to be used by the
	dialogs, they are not properties yet. Changed import() and
	export() signals to pass the selected filename and return a
	boolean indicating success.

	* app/tools/gimpimagemaptool-settings.c: remove the dialog code
	here and connect the import/export functions directly to above
	GimpSettingsBox signals.

	* app/tools/gimpimagemaptool.[ch]: remove file dialog member.


svn path=/trunk/; revision=25991
2008-06-25 14:25:32 +00:00
Sven Neumann 769c4f925a app/core/gimp-gui.[ch] app/widgets/gimphelp.[ch] app/gui/gui-vtable.c
2008-06-10  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-gui.[ch]
	* app/widgets/gimphelp.[ch]
	* app/gui/gui-vtable.c
	* app/gui/gui.c: added a GimpProgress parameter to gimp_help().

	* app/actions/help-commands.c
	* app/widgets/gimpuimanager.c
	* tools/pdbgen/pdb/help.pdb: changed accordingly.

	* app/pdb/help-cmds.c: regenerated.

svn path=/trunk/; revision=25908
2008-06-10 09:54:54 +00:00
Sven Neumann befe387b88 no need to check for the 'dont-cache' property now that we depend on the
2008-06-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-operation.c (gimp_drawable_apply_operation):
	no need to check for the 'dont-cache' property now that we depend
	on the newer GEGL.

svn path=/trunk/; revision=25888
2008-06-04 12:54:52 +00:00
Sven Neumann 5aa59b3ba0 app/core/gimpchannel-select.c app/core/gimpdrawable-bucket-fill.c
2008-05-23  Sven Neumann  <sven@gimp.org>

	* app/core/gimpchannel-select.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpimage-crop.c
	* app/dialogs/image-scale-dialog.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimppolygonselecttool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c
	* libgimpwidgets/gimpcolorprofilestore.c
	* plug-ins/gfig/gfig-dialog.c: use C_() instead of Q_() for
	translations with context.

svn path=/trunk/; revision=25777
2008-05-23 14:09:55 +00:00
Martin Nordholts 74e037bf80 app/core/gimpcurve-load.c (gimp_curve_load) Remove unused variables.
2008-05-22  Martin Nordholts  <martinn@svn.gnome.org>

	* app/core/gimpcurve-load.c (gimp_curve_load)
	* app/paint/gimppaintbrush.c (_gimp_paintbrush_motion): Remove
	unused variables.

svn path=/trunk/; revision=25760
2008-05-22 17:00:24 +00:00
Michael Natterer fe70064f00 Applied slightly modified and fixed patch from Alexia Death which adds a
2008-05-22  Michael Natterer  <mitch@gimp.org>

	Applied slightly modified and fixed patch from Alexia Death which
	adds a "random" axis to the paint dynamics and fixes some issues
	in the previous paint dynamics commits. Fixes bug #529431.

	* app/core/core-types.h: add a "random" axis to GimpCoords.

	* app/display/gimpdisplayshell-coords.c: set it to a random value.

	* app/display/gimpdisplayshell-callbacks.c: on button_press,
	use the dynamics from the last motion event to avoid blotches
	at the beginning of paint strokes.

	* app/paint/gimppaintoptions.[ch]: add random properties the same
	way we do pressure and velocity. Add get_dynamic_size(),
	get_dynamic_color() and get_dynamic_hardness() functions which
	look at all dynamic parameters of the passed coords.

	* app/tools/gimppaintoptions-gui.c: add gui for the random options.

	* app/paint/gimpbrushcore.[ch]: remove calc_brush_scale() and use
	gimp_paint_options_get_dynamic_size_instead().
	Add "dynamic_hardness" parameters to paste_canvas(),
	replace_canvas() and get_brush_mask().

	* app/paint/gimpairbrushoptions.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimpheal.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimpsmudge.c: calculate the dynamic hardness and pass
	it to above brush core functions. Use the get_dynamic_color() to
	calculate the gradient color.


svn path=/trunk/; revision=25758
2008-05-22 16:38:57 +00:00
Sven Neumann 8a62ba6a5d changed order of parameters to be consistent with gimp_drawable_process().
2008-05-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-operation.[ch]
	(gimp_drawable_apply_operation): changed order of parameters to be
	consistent with gimp_drawable_process().

	* app/core/gimpdrawable-process.[ch]: introduced a variant of
	gimp_drawable_process() for processing a GimpLut with
	gimp_lut_process().

	* app/core/gimpdrawable-brightness-contrast.c
	* app/core/gimpdrawable-color-balance.c
	* app/core/gimpdrawable-colorize.c
	* app/core/gimpdrawable-curves.c
	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-hue-saturation.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-levels.c
	* app/core/gimpdrawable-posterize.c
	* app/core/gimpdrawable-threshold.c: changed accordingly.

svn path=/trunk/; revision=25754
2008-05-22 11:52:02 +00:00
Sven Neumann 0d6c259be3 added a call to gimp_tool_options_create_folder().
2008-05-22  Sven Neumann  <sven@gimp.org>

	* app/tools/gimp-tools.c (gimp_tools_init): added a call to
	gimp_tool_options_create_folder().

	* app/core/gimp-user-install.c (gimp_user_install_items): no need
	to create the tool-options folder here if we are doing that on
	each startup.

svn path=/trunk/; revision=25749
2008-05-22 09:01:08 +00:00
Sven Neumann a81c227a1a core/gimpdrawable-brightness-contrast.c core/gimpdrawable-color-balance.c
2008-05-22  Sven Neumann  <sven@gimp.org>

	* core/gimpdrawable-brightness-contrast.c
	* core/gimpdrawable-color-balance.c
	* core/gimpdrawable-colorize.c
	* core/gimpdrawable-equalize.c
	* core/gimpdrawable-hue-saturation.c
	* core/gimpdrawable-posterize.c
	* core/gimpdrawable-threshold.c: ported to 
gimp_drawable_process().


svn path=/trunk/; revision=25747
2008-05-22 06:04:01 +00:00
Martin Nordholts 54884aea92 constify the points argument.
2008-05-21  Martin Nordholts  <martinn@svn.gnome.org>

	* app/core/gimpscanconvert.c (gimp_scan_convert_add_polyline):
	constify the points argument.

svn path=/trunk/; revision=25739
2008-05-21 19:11:42 +00:00
Michael Natterer 2a064f55a6 remove PixelProcessorFunc typedef.
2008-05-21  Michael Natterer  <mitch@gimp.org>

	* app/base/pixel-processor.h: remove PixelProcessorFunc typedef.

	* app/base/base-types.h: add it here.

	* app/config/gimpbaseconfig.c: #include "base/base-types.h"

	* app/core/gimpdrawable-curves.c
	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-invert.c: remove pixel processor include.

	* app/core/gimpdrawable-levels.c: port to gimp_drawable_process().


svn path=/trunk/; revision=25738
2008-05-21 19:07:26 +00:00
Michael Natterer 3b56173831 add missing include and missing call to gimp_drawable_mask_intersect().
2008-05-21  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-process.c (gimp_drawable_process): add
	missing include and missing call to gimp_drawable_mask_intersect().


svn path=/trunk/; revision=25736
2008-05-21 18:50:13 +00:00
Sven Neumann a786d4deab app/core/Makefile.am new file holding code to apply a PixelProcessor to
2008-05-21  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpdrawable-process.[ch]: new file holding code to
	apply a PixelProcessor to the full drawable.

	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-invert.c: use the new helper function.

	* app/core/gimpdrawable-desaturate.[ch] 
(gimp_drawable_desaturate):
	take a GimpProgress parameter.

	* tools/pdbgen/pdb/color.pdb: changed accordingly.

	* app/pdb/color-cmds.c: regenerated.


svn path=/trunk/; revision=25734
2008-05-21 16:45:44 +00:00
Sven Neumann c19b2170ff changed to take a pointer as first argument as all PixelProcessor
2008-05-21  Sven Neumann  <sven@gimp.org>

	* app/base/desaturate.[ch]: changed to take a pointer as first
	argument as all PixelProcessor functions.

	* app/core/gimpdrawable-desaturate.c: changed accordingly.

	* app/tools/gimpdesaturatetool.[ch]: added legacy code path.

svn path=/trunk/; revision=25730
2008-05-21 14:20:15 +00:00
Sven Neumann 9519a1751d fold the three desaturate functions into one
svn path=/trunk/; revision=25729
2008-05-21 13:51:26 +00:00
Sven Neumann 595d54eddf app/base/Makefile.am moved legacy desaturate code here.
2008-05-21  Sven Neumann  <sven@gimp.org>

	* app/base/Makefile.am
	* app/base/desaturate.[ch]: moved legacy desaturate code here.

	* app/core/gimpdrawable-desaturate.c: use the code in app/base.

svn path=/trunk/; revision=25728
2008-05-21 13:34:07 +00:00
Sven Neumann e86e003224 Add Desaturate as an image-map tool with live preview (bug #533808):
2008-05-21  Sven Neumann  <sven@gimp.org>

	Add Desaturate as an image-map tool with live preview (bug #533808):

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h
	* app/gegl/gimpdesaturateconfig.[ch]: added config object for the
	desaturate point filter.
	
	* app/gegl/gimpoperationdesaturate.[ch]: derive from
	GimpOperationPointFilter. Unrolled the inner loop.

	* app/core/gimpdrawable-desaturate.c: changed accordingly.

	* app/tools/Makefile.am
	* app/tools/gimpdesaturatetool.[ch]: added desaturate as an
	imagemap tool. So far only the GEGL code path is implemented.

	* app/tools/gimp-tools.c: register the new tool.

	* app/dialogs/dialogs.c: register the new tool dialog.

	* app/dialogs/Makefile.am
	* app/dialogs/desaturate-dialog.[ch]: removed the desaturate dialog.

	* app/actions/drawable-actions.c
	* app/actions/drawable-commands.[ch]: removed action
	"drawable-desaturate".

	* app/widgets/gimphelp-ids.h: changed help IDs accordingly.

	* menus/image-menu.xml.in: replaced "drawable-desaturate" with
	"tools-desaturate".

	* libgimpwidgets/gimpstock.h: added a define for
	GIMP_STOCK_TOOL_DESATURATE.

svn path=/trunk/; revision=25726
2008-05-21 13:11:06 +00:00
Michael Natterer a921d65df6 app/core/Makefile.am app/core/core-types.h new GimpViewable subclass which
2008-05-20  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpimagemapconfig.[ch]: new GimpViewable subclass
	which has a "time" property. Sets the object's name to a date
	string if a time != 0 gets set. Has a compare function which first
	sorts the objects with a timestamp in MRU order and then the
	objects without timestamp by name.

	* app/gegl/gimpbrightnesscontrastconfig.[ch]
	* app/gegl/gimpcolorbalanceconfig.[ch]
	* app/gegl/gimpcolorizeconfig.[ch]
	* app/gegl/gimpcurvesconfig.[ch]
	* app/gegl/gimphuesaturationconfig.[ch]
	* app/gegl/gimplevelsconfig.[ch]
	* app/gegl/gimpposterizeconfig.[ch]
	* app/gegl/gimpthresholdconfig.[ch]: derive from GimpImageMapConfig.

	* app/tools/gimpimagemaptool.c: sort the settings container with
	above compare function.

	* app/tools/gimpimagemaptool-settings.c: add utility functions
	for loading and saving the settings container. In the settings
	combo, add a separator between MRU items and favorites.

	* app/Makefile.am: make the thing link.


svn path=/trunk/; revision=25724
2008-05-20 21:41:47 +00:00
Michael Natterer b646fd3d17 don't crash if an object has a NULL name. Move variables to local scopes.
2008-05-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplist.c (gimp_list_uniquefy_name): don't crash if an
	object has a NULL name. Move variables to local scopes. Remove
	redundant casts.


svn path=/trunk/; revision=25723
2008-05-20 21:30:40 +00:00
Michael Natterer 1f99342777 set "identity" to TRUE if appropriate.
2008-05-19  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.c
	(gimp_curve_set_n_points)
	(gimp_curve_set_n_samples): set "identity" to TRUE if appropriate.

	(gimp_curve_calculate): don't set it to TRUE when there are no
	control points.


svn path=/trunk/; revision=25708
2008-05-19 11:08:24 +00:00
Sven Neumann e614d6375e fixed the call to memcpy() in the CURVE_NONE case.
2008-05-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcurve-map.c (gimp_curve_map_pixels): fixed the call
	to memcpy() in the CURVE_NONE case.

svn path=/trunk/; revision=25707
2008-05-19 09:02:30 +00:00
Michael Natterer 57a9451c4c implement (de)serializing of the points and samples arrays using
2008-05-18  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.c: implement (de)serializing of the points
	and samples arrays using GValueArray. Set "identity" to FALSE
	after deserializing.


svn path=/trunk/; revision=25704
2008-05-18 20:07:07 +00:00
Michael Natterer 173905b1e1 add gimp_tool_info_build_options_filename() which creates a filename under
2008-05-18  Michael Natterer  <mitch@gimp.org>

	* app/core/gimptoolinfo.[ch]: add
	gimp_tool_info_build_options_filename() which creates a filename
	under $GIMPDIR/tool-options/ with an optional suffix.

	* app/core/gimptooloptions.c
	* app/core/gimptoolpresets.c: use it and remove own build_filename()
	functions.


svn path=/trunk/; revision=25701
2008-05-18 15:37:43 +00:00
Michael Natterer 9670b467e2 renamed public function set_dash_pattern() to take_dash_pattern() to
2008-05-18  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpstrokeoptions.[ch]: renamed public function
	set_dash_pattern() to take_dash_pattern() to clarify memory
	management of the passed GArray.

	* app/widgets/gimpdasheditor.c
	* app/widgets/gimpstrokeeditor.c: changed accordingly.


svn path=/trunk/; revision=25700
2008-05-18 15:15:07 +00:00
Michael Natterer fd5e71c4f9 implement the GimpConfig interface and add the code for equal(), reset()
2008-05-18  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.c: implement the GimpConfig interface and add
	the code for equal(), reset() and copy() from GimpCurvesConfig.

	* app/gegl/gimpcurvesconfig.c: remove the copied code and use
	GimpConfig methods to compare, reset and copy curve objects.


svn path=/trunk/; revision=25699
2008-05-18 14:25:54 +00:00
Sven Neumann 48dcf22eab fixed issues with the profiling code.
2008-05-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagemap.c: fixed issues with the profiling code.


svn path=/trunk/; revision=25691
2008-05-17 19:15:49 +00:00
Øyvind Kolås 425c734eea Make the created GEGL graphs have the "dont-cache" property set to avoid
* app/core/gimpdrawable-operation.c:
* app/core/gimpimagemap.c: Make the created GEGL graphs have the
"dont-cache" property set to avoid unneeded caches.

svn path=/trunk/; revision=25689
2008-05-17 15:26:12 +00:00
Michael Natterer e801795022 app/core/gimpimagefile.c app/tools/gimpaligntool.c
2008-05-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagefile.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpvectortool.c
	* plug-ins/color-rotate/color-rotate-dialog.c
	* plug-ins/common/noise-rgb.c
	* plug-ins/common/value-propagate.c
	* plug-ins/gfig/gfig-dialog.c
	* plug-ins/gfig/gfig.h
	* plug-ins/gimpressionist/general.c
	* plug-ins/gimpressionist/gimpressionist.h
	* plug-ins/gimpressionist/orientation.c
	* plug-ins/gimpressionist/size.c
	* plug-ins/gimpressionist/utils.c
	* plug-ins/gradient-flare/gradient-flare.c
	* plug-ins/ifs-compose/ifs-compose.c
	* plug-ins/imagemap/imap_main.c
	* plug-ins/imagemap/imap_preferences.c: in latest GLib _() returns
	"const gchar*" as it should. Add const qualifiers to local utility
	functions and some explicit casts to fix the warnings caused by
	this.


svn path=/trunk/; revision=25685
2008-05-17 13:08:19 +00:00
Sven Neumann 9c0c73d4f1 added some basic benchmarking code. Will become optional but for now it is
2008-05-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagemap.c: added some basic benchmarking code.
	Will become optional but for now it is enabled by default.


svn path=/trunk/; revision=25679
2008-05-16 21:01:24 +00:00
Sven Neumann b236aa58ea don't write over the end of the samples array. Someone should review this
2008-05-14  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcurve.c (gimp_curve_plot): don't write over the end
	of the samples array.  Someone should review this code. It looks
	as if the loop could be rewritten in a safer and cleaner way.

svn path=/trunk/; revision=25670
2008-05-14 16:19:33 +00:00
Sven Neumann 241bd2980f for an opaque buffer, initialize the brush mask with 255 instead of 0.
2008-05-14  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrushclipboard.c
	(gimp_brush_clipboard_buffer_changed): for an opaque buffer,
	initialize the brush mask with 255 instead of 0.  Fixes bug 
#532886.



svn path=/trunk/; revision=25661
2008-05-14 07:04:41 +00:00
Sven Neumann 85cc5d92e5 use memcpy() for the CURVE_NONE case.
2008-05-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcurve-map.c (gimp_curve_map_pixels): use memcpy()
	for the CURVE_NONE case.


svn path=/trunk/; revision=25653
2008-05-13 19:42:20 +00:00
Sven Neumann 0ff4081fbf corrected implementation for CURVE_NONE
svn path=/trunk/; revision=25652
2008-05-13 14:44:08 +00:00
Sven Neumann 972cea0d02 cleanup in preparation of adding a SIMD version
svn path=/trunk/; revision=25651
2008-05-13 13:46:46 +00:00
Sven Neumann 517cfe6750 introduced an enum to clean up the code. Optimize another not so uncommon
2008-05-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcurve-map.[ch] (gimp_curve_map_pixels): introduced
	an enum to clean up the code. Optimize another not so uncommon case.

svn path=/trunk/; revision=25650
2008-05-13 11:32:38 +00:00
Sven Neumann aba934224e create a bitmask that represents the curves that need to be applied and
2008-05-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcurve-map.c (gimp_curve_map_pixels): create a
	bitmask that represents the curves that need to be applied and
	optimize the most common cases.

svn path=/trunk/; revision=25649
2008-05-13 09:39:14 +00:00
Sven Neumann 1a67f2b549 simplified the general case.
2008-05-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcurve-map.c (gimp_curve_map_value): simplified 
the
	general case.


svn path=/trunk/; revision=25647
2008-05-13 07:20:23 +00:00
Sven Neumann 06603cb0d4 keep a boolean flag to identify an identity mapping. Set it to TRUE when
2008-05-11  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcurve.[ch]: keep a boolean flag to identify an
	identity mapping. Set it to TRUE when the curve is reset.

	* app/core/gimpcurve-map.c (gimp_curve_map_value): optimize for
	the case where the curve is an identity mapping.


svn path=/trunk/; revision=25646
2008-05-13 07:10:48 +00:00
Sven Neumann 6e6a0355aa app/core/Makefile.am
2008-05-11  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpcurve.[ch]:
	* app/core/gimpcurve-map.[ch]: split curve map functions into
	seperate files.

	* app/gegl/gimpoperationcurves.c
	* app/tools/gimpcurvestool.c
	* app/widgets/gimpcurveview.c: changed accordingly.

	* app/Makefile.am (AM_LDFLAGS): make it link.


svn path=/trunk/; revision=25642
2008-05-11 14:56:57 +00:00
Sven Neumann a392a231d3 renamed gimp_curve_map() to gimp_curve_map_value(). Added new function
2008-05-11  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcurve.[ch]: renamed gimp_curve_map() to
	gimp_curve_map_value(). Added new function 
gimp_curve_map_pixels()
	which will allow for better optimization.

	* app/gegl/gimpoperationcurves.c 
(gimp_operation_curves_process):
	use gimp_curve_map_pixels().

	* app/tools/gimpcurvestool.c
	* app/widgets/gimpcurveview.c: follow API change.


svn path=/trunk/; revision=25641
2008-05-11 14:48:22 +00:00
Sven Neumann f7768c3a9a minor cleanup.
2008-05-11  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcurve.[ch] (gimp_curve_map): minor cleanup.


svn path=/trunk/; revision=25638
2008-05-11 12:25:36 +00:00
Michael Natterer 71df1ab46d add boolean "append" property which makes gimp_container_add() append to
2008-05-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplist.[ch]: add boolean "append" property which
	makes gimp_container_add() append to the list instead of the
	default prepend.

	* app/core/gimp.c: create the display list with append = TRUE so
	the images menu is in a proper order.


svn path=/trunk/; revision=25627
2008-05-10 18:42:41 +00:00
Sven Neumann 93decd4d16 formatting.
2008-05-10  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrush-scale.c: formatting.


svn path=/trunk/; revision=25615
2008-05-10 12:07:15 +00:00
Simon Budig 168935ec10 expose the internal most flexible rendering function. Make use of the
2008-05-09  Simon Budig  <simon@gimp.org>

	* app/core/gimpscanconvert.[ch]: expose the internal most
	flexible rendering function. Make use of the miter limit
	again.


svn path=/trunk/; revision=25597
2008-05-09 11:56:58 +00:00
Simon Budig f65cb91356 kind of resurrect the blending modes, although now implemented as
2008-05-09  Simon Budig  <simon@gimp.org>

	* app/core/gimpscanconvert.[ch]: kind of resurrect the
	blending modes, although now implemented as compositing
	on top of the existing content of a mask.

	* app/tools/gimpforegroundselecttool.c: changed accordingly


svn path=/trunk/; revision=25595
2008-05-09 11:18:44 +00:00
Simon Budig c42cd9449b resurrect dashed strokes.
2008-05-09  Simon Budig  <simon@gimp.org>

	* app/core/gimpscanconvert.c: resurrect dashed strokes.


svn path=/trunk/; revision=25594
2008-05-09 09:10:22 +00:00
Sven Neumann 33b4a5fa51 check for a minimum required cairo version (1.4.14).
2008-05-09  Sven Neumann  <sven@gimp.org>

	* configure.in: check for a minimum required cairo version 
(1.4.14).

	* app/core/gimpscanconvert.c: copied some code from cairo until
	we depend on cairo 1.6.


svn path=/trunk/; revision=25593
2008-05-09 08:05:01 +00:00
Simon Budig 5426c0c10e removed Libart usage, replaced with Cairo. Dashed strokes do not yet work
2008-05-09  Simon Budig  <simon@gimp.org>

	* app/core/gimpscanconvert.[ch]: removed Libart usage,
	  replaced with Cairo. Dashed strokes do not yet work again, will
	  happen tomorrow. Also the blending modes need a second look at.

	  Also removed deprecated API which made it unnecessarily complicated.

	* app/tools/gimpiscissorstool.c: use the current API.

	* app/core/Makefile.am
	* app/Makefile.am
	* configure.in: removed libart dependency, added cairo dependency
	  where necessary.


svn path=/trunk/; revision=25591
2008-05-08 23:35:53 +00:00
Michael Natterer e5be5664ed Move the shadow tiles from the image to the drawable. Fixes bug #100469.
2008-04-21  Michael Natterer  <mitch@gimp.org>

	Move the shadow tiles from the image to the drawable.
	Fixes bug #100469.

	* app/core/Makefile.am
	* app/core/gimpdrawable-shadow.[ch]: new files implementing
	the shadow tiles.

	* app/core/gimpimage.[ch]: remove the shadow tile manager from the
	GimpImage struct. Remove gimp_image_get_shadow_tiles() and
	_free_shadow_tiles().

	* app/core/gimpdrawable.[ch]: add the shadow tile manager
	here. Remove get_shadow_tiles() and merge_shadow(). Free the
	shadow tiles in finalize and when the drawable gets removed from
	the image.

	* app/core/gimpdrawable-brightness-contrast.c
	* app/core/gimpdrawable-color-balance.c
	* app/core/gimpdrawable-colorize.c
	* app/core/gimpdrawable-curves.c
	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-hue-saturation.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-levels.c
	* app/core/gimpdrawable-operation.c
	* app/core/gimpdrawable-posterize.c
	* app/core/gimpdrawable-threshold.c
	* app/core/gimpimagemap.c: changed accordingly. Free the shadow tiles
	after using them.

	* app/plug-in/gimpplugin-cleanup.[ch]: add
	gimp_plug_in_cleanup_add_shadow() and _remove_shadow() which keep
	track of whether shadow tiles were created on behalf of a plug-in
	procedure.

	(gimp_plug_in_cleanup): free shadow tiles which were created but
	not destroyed by a plug-in procedure.

	* app/plug-in/gimpplugin-message.c (plug_in_handle_tile_request):
	call gimp_plug_in_cleanup_add_shadow() whenever a plug-in requests
	shadow tiles.

	* tools/pdbgen/pdb/drawable.pdb: use the new drawable shadow
	API. Add new procedure gimp-drawable-free-shadow. Call
	gimp_plug_in_cleaup_remove_shadow() when it gets called.

	* tools/pdbgen/pdb/image.pdb: deprecate gimp-image-free-shadow.
	Calling it has no effect any longer.

	* app/pdb/drawable-cmds.c
	* app/pdb/image-cmds.c
	* app/pdb/internal-procs.c
	* libgimp/gimpimage_pdb.[ch]
	* libgimp/gimpdrawable_pdb.[ch]: regenerated.


svn path=/trunk/; revision=25510
2008-04-21 17:20:51 +00:00
Michael Natterer 4c2a0f58ca replaced unused parameter "context" by "progress" and pass the progress on
2008-04-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-levels.[ch]: replaced unused parameter
	"context" by "progress" and pass the progress on internally.
	Factor common code out to gimp_drawable_levels_internal().

	* tools/pdbgen/pdb/color.pdb: pass progress instead of context.

	* app/pdb/color-cmds.c: regenerated.


svn path=/trunk/; revision=25501
2008-04-20 13:38:13 +00:00
Michael Natterer 15dd7ca20e prototype indentation and minor declatation and function reordering for
2008-04-19  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdata.c: prototype indentation and minor declatation
	and function reordering for the sake of consistency.


svn path=/trunk/; revision=25499
2008-04-19 14:48:50 +00:00
Martin Nordholts 626f2093e8 Applied patch from Mark Locascio that makes the center point of rectangles
2008-04-12  Martin Nordholts  <martinn@svn.gnome.org>

	* app/core/gimpimage-snap.c (gimp_image_snap_rectangle): Applied
	patch from Mark Locascio that makes the center point of rectangles
	snap (bug #527659).

svn path=/trunk/; revision=25471
2008-04-12 05:47:56 +00:00
Sven Neumann b824df9b57 changed descriptions for the GIMP_UNDO_FS_RIGOR and GIMP_UNDO_FS_RELAX
2008-04-09  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.[ch] (enum GimpUndoType): changed
	descriptions for the GIMP_UNDO_FS_RIGOR and GIMP_UNDO_FS_RELAX
	undo types again.

svn path=/trunk/; revision=25433
2008-04-09 14:42:32 +00:00
Sven Neumann e198bc4f2b better descriptions for the GIMP_UNDO_FS_RIGOR and GIMP_UNDO_FS_RELAX undo
2008-04-09  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.[ch] (enum GimpUndoType): better descriptions
	for the GIMP_UNDO_FS_RIGOR and GIMP_UNDO_FS_RELAX undo types.

	* app/core/gimplayer-floating-sel.c: corrected a comment.

svn path=/trunk/; revision=25431
2008-04-09 14:06:28 +00:00
Sven Neumann 3f2385dcc2 added new methods gimp_container_get_{first,last}_child().
2008-04-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcontainer.[ch]: added new methods
	gimp_container_get_{first,last}_child().

	* app/actions/file-actions.c (file_actions_close_all_update)
	* app/dialogs/layer-add-mask-dialog.c (layer_add_mask_dialog_new)
	* app/dialogs/palette-import-dialog.c (palette_import_image_callback)
	* app/gui/gui-vtable.c (gui_get_empty_display): 
	* app/widgets/gimpmenudock.c (gimp_menu_dock_image_changed): use
	the new GimpContainer methods.

	* app/core/gimpundostack.c: use the new GimpContainer methods and
	cleaned up the code.

svn path=/trunk/; revision=25426
2008-04-09 09:50:29 +00:00
Sven Neumann ca205c10a3 clear the selection as gimp_selection_extract() doesn't do this for us any
2008-04-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimpselection.c (gimp_selection_float): clear the
	selection as gimp_selection_extract() doesn't do this for us any
	longer (see bug #510534).

svn path=/trunk/; revision=25366
2008-04-04 14:31:06 +00:00
Sven Neumann fe66716f48 follow renaming of internal_procs.h.
2008-04-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimp.c: follow renaming of internal_procs.h.

svn path=/trunk/; revision=25363
2008-04-04 11:36:54 +00:00
Sven Neumann 6f2e776871 minor cleanup.
2008-04-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert.[ch]
	(gimp_image_convert_set_dither_matrix): minor cleanup.

	* tools/pdbgen/pdb/convert.pdb: changed accordingly.

	* app/pdb/convert_cmds.c: regenerated.


svn path=/trunk/; revision=25353
2008-04-04 06:29:35 +00:00
Michael Natterer 356d689eef don't accept palettes with more than 256 colors.
2008-04-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-convert.c (gimp_image_convert): don't accept
	palettes with more than 256 colors.

	* tools/pdbgen/pdb/convert.pdb: fail here too for palettes
	with > 256 colors. Fixes bug #525471.

	* app/pdb/convert_cmds.c: regenerated.


svn path=/trunk/; revision=25348
2008-04-03 08:36:44 +00:00
Sven Neumann e87bfe7a01 code cleanup.
2008-03-30  Sven Neumann  <sven@gimp.org>

	* app/core/gimparea.c (gimp_area_list_process): code cleanup.


svn path=/trunk/; revision=25319
2008-03-30 17:38:36 +00:00
Sven Neumann cc594327cf don't leak the memory allocated for the GSList.
2008-03-30  Sven Neumann  <sven@gimp.org>

	* app/core/gimparea.c (gimp_area_list_free): don't leak the 
memory
	allocated for the GSList.


svn path=/trunk/; revision=25317
2008-03-30 17:26:34 +00:00
Mukund Sivaraman 3c6b68c9cd Use #warning only if compiler is gcc.
2008-03-29  Mukund Sivaraman  <muks@mukund.org>

        * app/core/gimpdrawable-operation.c: Use #warning only if
        compiler is gcc.


svn path=/trunk/; revision=25297
2008-03-29 10:48:38 +00:00
Mukund Sivaraman 0708ffea76 Fixes for some Sparse reported issues in app/
2008-03-28  Mukund Sivaraman  <muks@mukund.org>

        Fixes for some Sparse reported issues in app/

        * app/core/gimpdrawable-operation.c: Added prototype for            
        gegl_node_add_child().

        * app/core/gimpcurve.c: Remove C99 code       
                                
        * app/tools/gimpcurvestool.c 
        * app/tools/gimpperspectiveclonetool.c 
        * app/vectors/gimpstroke.c: Mark functions as static.

        * app/base/siox.c: state is a pointer.

        * app/plug-in/gimppluginprocframe.c: values is a pointer.

        * app/plug-in/plug-in-rc.c: plug_in_rc_parse() returns a pointer.

        * app/plug-in/gimpinterpreterdb.c: Check program[0] for '\0'
        instead of the pointer program itself.


svn path=/trunk/; revision=25292
2008-03-28 23:18:19 +00:00
Sven Neumann fc93cc19ce deprecate gimp_memsize_to_string() in favor of
2008-03-28  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpmemsize.[ch]: deprecate gimp_memsize_to_string()
	in favor of g_format_size_for_display().

	* app/actions/edit-commands.c
	* app/core/gimpimagefile.c
	* app/dialogs/image-new-dialog.c
	* app/dialogs/image-scale-dialog.c
	* app/display/gimpdisplayshell-title.c
	* app/widgets/gimpimagepropview.c
	* app/widgets/gimptemplateeditor.c
	* app/widgets/gimpthumbbox.c
	* plug-ins/uri/uri-backend-gnomevfs.c
	* plug-ins/uri/uri-backend-gvfs.c
	* plug-ins/uri/uri-backend-libcurl.c
	* plug-ins/uri/uri-backend-wget.c: use g_format_size_for_display()
	instead of gimp_memsize_to_string().

svn path=/trunk/; revision=25285
2008-03-28 16:33:24 +00:00
Sven Neumann 26d1021e77 Properly pass the focus from the core to plug-in dialogs:
2008-03-27  Sven Neumann  <sven@gimp.org>

	Properly pass the focus from the core to plug-in dialogs:

	* libgimpbase/gimpprotocol.[ch]: added a user_time member to the
	GimpConfig struct. Bumped the protocol version to 0x0012.

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: added gimp_get_user_time() to get the
	timestamp of the last user interaction.

	* app/plug-in/gimppluginmanager-call.c
	(gimp_plug_in_manager_call_run): pass the timestamp to in the
	GimpConfig message.

	* libgimp/gimp.[ch]:
	* libgimp/gimp.def: added method to access the timestamp as set
	in the config message.

	* libgimp/gimpui.c (gimp_ui_init): construct a fake startup ID and
	set the DESKTOP_STARTUP_ID environment variable.

svn path=/trunk/; revision=25263
2008-03-27 16:30:29 +00:00
Sven Neumann 76afd97769 app/core/gimp-gui.[ch] added gimp_get_empty_display() to the vtable.
2008-03-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: added gimp_get_empty_display() to the vtable.

	* app/file/file-open.c (file_open_from_command_line): use the
	empty display as progress window when opening an image from the
	command-line or via the DBus interface.

svn path=/trunk/; revision=25219
2008-03-25 10:50:42 +00:00
Sven Neumann 4cc03a88be don't migrate "documents".
2008-03-24  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-user-install.c (user_install_migrate_files): 
don't
	migrate "documents".

	* app/actions/documents-commands.c 
(documents_remove_cmd_callback)
	(documents_remove_dangling_foreach): remove from 
GtkRecentManager
	before removing the item from the documents list.


svn path=/trunk/; revision=25196
2008-03-24 17:56:27 +00:00
Sven Neumann 3adca61a80 don't reset the mime-type info when we can't load a thumbnail.
2008-03-24  Sven Neumann  <sven@gimp.org>

	* libgimpthumb/gimpthumbnail.c: don't reset the mime-type info
	when we can't load a thumbnail.

	* app/core/gimpimagefile.c (gimp_imagefile_get_new_pixbuf): 
don't
	set a stock-id depending on the state.

	* app/widgets/gimpviewrendererimagefile.[ch]: removed commented
	out hack that used to access semi-private API from 
GtkFilesystem.
	Instead lifted some code from GtkRecentManager that looks up 
icons
	by mime-type.


svn path=/trunk/; revision=25195
2008-03-24 16:41:42 +00:00
Sven Neumann 3344c1b3bc Do not any longer keep the document history in two places. We only use
2008-03-24  Sven Neumann  <sven@gimp.org>

	Do not any longer keep the document history in two places. We 
only
	use GtkRecentManager now:

	* app/core/Makefile.am
	* app/core/gimp-documents.[ch]: removed these files.

	* app/core/gimpdocumentlist.c: removed code to load and save the
	"documents" file.
	(gimp_document_list_add_uri): call gimp_recent_list_add_uri() 
here.

	* app/core/gimpimagefile.[ch]: added function to set the 
mime-type.

	* app/core/gimp.c (gimp_restore): removed code to load the
	document history.
	(gimp_real_exit): removed code to save it.
	
	* app/core/gimp-gui.[ch]: extended the vtable with a method to
	populate the document list.

	* app/gui/gui-vtable.c: added code to populate the document 
history
	from the list of recently used files kept by GtkRecentManager.

	* app/gui/gui.c (gui_restore_callback): load the recent files 
here.

	* app/file/file-open.c
	* app/file/file-save.c: no need to call 
gimp_recent_list_add_uri()
	any longer as gimp_document_list_add_uri() does that for us now.

	* app/actions/documents-commands.c 
(documents_clear_cmd_callback):
	purge the items from GtkRecentManager. Also changed the dialog 
to
	emphasize that this operation now affects the document history 
in
	all applications.

	* docs/gimp.1.in: removed reference to "documents" file.


svn path=/trunk/; revision=25190
2008-03-24 11:11:15 +00:00
Michael Natterer b3fb3cf608 set the image also if it is NULL.
2008-03-23  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_real_set_display): set the
	image also if it is NULL.


svn path=/trunk/; revision=25174
2008-03-23 13:27:51 +00:00
Sven Neumann 15c7937fc3 moved defines to the header file and changed to 640x400 which is actually
2008-03-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimptemplate.[ch]: moved defines to the header file 
and
	changed to 640x400 which is actually almost the golden mean as
	claimed by the comment.

	* app/display/gimpdisplayshell.c: use the defines here.


svn path=/trunk/; revision=25165
2008-03-21 22:09:23 +00:00
Sven Neumann 38d8fbbe4d increased the size of the default image (to the next Fibonacci number for
2008-03-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimptemplate.c: increased the size of the default 
image
	(to the next Fibonacci number for the development version and to
	640x480 for GIMP 2.6).


svn path=/trunk/; revision=25163
2008-03-21 21:44:29 +00:00
Sven Neumann 694ad967a6 skip empty lines.
2008-03-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-load.c (gimp_palette_load): skip empty lines.

svn path=/trunk/; revision=25126
2008-03-19 17:19:37 +00:00
Michael Natterer cee3baea0f First draft of the "no image open" window, which is implemented as a
2008-03-18  Michael Natterer  <mitch@gimp.org>

	First draft of the "no image open" window, which is implemented as
	a display without image (a view with NULL model). Didn't change
	the display's appearance yet so I can first make sure the display
	without image works properly in all details before hiding these
	details.

	* app/core/gimp-gui.[ch]: add "gimp" parameter to display_create()
	and allow "image" to be NULL.

	* app/core/gimpcontext.c (gimp_context_real_set_display): a
	display's image can be NULL now.

	* app/display/gimpdisplay.[ch]: add Gimp and GimpDisplayConfig
	members.  Add Gimp parameter to gimp_display_shell_new(). Changed
	gimp_display_reconnect() to gimp_display_set_image() and allow to
	set a NULL image.

	* app/gui/gui-vtable.c (gui_display_create): if there is a single
	display without an image, call gimp_display_set_image() on that
	display instead of creating a new one.

	* app/display/gimpdisplayshell-close.c: if the last display is
	closed, don't close it but make it empty. Factored out that code
	to gimp_display_shell_really_close().

	* app/display/gimpdisplayshell-dnd.c: when dropping uris on an
	empty display, open the first one into that display and the other
	ones as layers of the newly opened image. This is consistent with
	dropping on an existing image but maybe needs some discussion.

	* app/display/gimpdisplayshell-callbacks.c: bail out early in the
	tool event callback so tools never have to deal with empty
	displays. In expose(), draw the drop zone on the empty display.

	* app/display/gimpdisplayshell-title.c: set the empty display's
	title to "Gimp - Drop Files".

	* app/display/gimpdisplay-foreach.c
	* app/display/gimpdisplay-handlers.c
	* app/display/gimpdisplayshell-appearance.c
	* app/display/gimpdisplayshell-autoscroll.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-cursor.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-filter-dialog.c
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell-preview.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-scroll.c
	* app/display/gimpdisplayshell-selection.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpnavigationeditor.c
	* app/display/gimpstatusbar.c: use display->gimp and
	display->config instead of going via the image. Guard against
	empty displays in some few places (most places can't be
	called). Where needed, use the canvas' dimensions instead of the
	image's dimensions so scroll offsets and scrollbars still have
	sane values instead of the last image's ones.

	* app/actions/actions.c (action_data_get_gimp)
	(action_data_get_context): use display->gimp instead of
	display->image->gimp.

	* app/actions/edit-commands.c (edit_paste_cmd_callback): redirect
	to "paste as new" if there is an empty display.

	* app/actions/tools-commands.c (tools_select_cmd_callback): don't
	initialize the new tool on an empty display.

	* app/actions/view-actions.c (view_actions_update): changed lots
	of sensitivity settings to be insensitive when there is no image
	(instead of no display).

	* app/actions/view-commands.c: use the display's config object
	instead of gimp's.


svn path=/trunk/; revision=25113
2008-03-18 21:22:21 +00:00
Michael Natterer ad01c883db reorder and rename local functions and prototypes to be consistent with
2008-03-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrushgenerated.c: reorder and rename local
	functions and prototypes to be consistent with other objects. Misc
	minor cleanup.


svn path=/trunk/; revision=25083
2008-03-11 11:01:19 +00:00
Sven Neumann 5c29425ad6 clear the selection after cutting it as gimp_selection_extract() doesn't
2008-03-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-transform.c 
(gimp_drawable_transform_cut):
	clear the selection after cutting it as gimp_selection_extract()
	doesn't do this for us any longer. See bug #510534.


svn path=/trunk/; revision=25034
2008-03-04 21:25:32 +00:00
Michael Natterer f4378d6237 get rid of fixed-size arrays and allocate the points and curve arrays
2008-02-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.[ch]: get rid of fixed-size arrays and
	allocate the points and curve arrays dynamically. Added "n-points"
	and "n-samples" CONSTRUCT_ONLY properties. Renamed member "curve"
	to "samples". Lots of code changes to work with dynamic limits
	rather than 17 and 256.

	* app/core/gimpdrawable-curves.c
	* app/gegl/gimpcurvesconfig.c
	* app/tools/gimpcurvestool.c
	* app/widgets/gimpcurveview.c: changed accordingly.


svn path=/trunk/; revision=24995
2008-02-28 12:34:46 +00:00
Sven Neumann 65871fe9e4 pass the direction parameter down to
2008-02-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-transform.c (gimp_drawable_transform_affine):
	pass the direction parameter down to
	gimp_drawable_transform_tiles_affine() instead of hardcoding it to
	GIMP_TRANSFORM_FORWARD. Fixes bug #518910.

svn path=/trunk/; revision=24990
2008-02-27 15:24:20 +00:00
Michael Natterer d6dbc05fb3 add precondition checks.
2008-02-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.c: add precondition checks.

	* app/core/gimpdrawable-curves.c (gimp_drawable_curves_spline):
	divide values by 255 before setting them on the curve. Fixes crash
	when using curves from the PDB.


svn path=/trunk/; revision=24929
2008-02-20 13:48:37 +00:00
Sven Neumann c1e09363c7 app/app.c app/batch.c app/core/gimp.c use G_STRLOC instead of hardcoding
2008-02-19  Sven Neumann  <sven@gimp.org>

	* app/app.c
	* app/batch.c
	* app/core/gimp.c
	* app/gui/gui.c: use G_STRLOC instead of hardcoding the function
	name in verbose output.

svn path=/trunk/; revision=24922
2008-02-19 13:38:24 +00:00
Michael Natterer 168566ad3e add gimp_curve_get_point().
2008-02-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.[ch]: add gimp_curve_get_point().

	* app/gegl/gimpcurvesconfig.c
	* app/widgets/gimpcurveview.c: use it instead of accessing the
	points array directly.


svn path=/trunk/; revision=24857
2008-02-11 10:22:59 +00:00
Michael Natterer 797309b220 keep the anchor points as an array of GimpVector2 instead of plain
2008-02-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.[ch]: keep the anchor points as an array of
	GimpVector2 instead of plain doubles.

	* app/gegl/gimpcurvesconfig.c
	* app/widgets/gimpcurveview.c: changed accordingly.


svn path=/trunk/; revision=24842
2008-02-09 17:40:57 +00:00
Michael Natterer 044359f93d changed all values to be [0.0..1.0] doubles instead of [0..255] integers.
2008-02-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.[ch]: changed all values to be [0.0..1.0]
	doubles instead of [0..255] integers. Also changed the API to use
	doubles instead of ints. Still have the fixed-size arrays though.

	(gimp_curve_map): new function to map values.

	* app/gegl/gimpoperationcurves.c: remove private map() function
	and use the one from GimpCurve.

	* app/gegl/gimpcurvesconfig.c
	* app/core/gimpdrawable-curves.c: port to the new gdouble API.

	* app/tools/gimpcurvestool.c: use gimp_curve_get_uchar() to get
	the arrays for the color bars.

	* app/widgets/gimpcurveview.[ch]: port to gdouble and some cleanup.


svn path=/trunk/; revision=24837
2008-02-09 10:01:51 +00:00
Michael Natterer 3a66deae00 add get_pid() which returns getpid().
2008-02-07  Michael Natterer  <mitch@gimp.org>

	* app/base/base-utils.[ch]: add get_pid() which returns getpid().

	* app/base/base.c
	* app/base/tile-swap.c
	* app/core/gimp-utils.c
	* app/plug-in/gimppluginshm.c
	* app/widgets/gimpselectiondata.c
	* tools/pdbgen/pdb/misc.pdb: use it instead of getpid() and remove
	all the #ifdef'ed includes getpid() needs.

	* tools/pdbgen/app.pl: remove support for these includes. Also
	remove some perl cruft in the include handling which is not needed
	any longer.

	* app/pdb/misc_cmds.c: regenerated.


svn path=/trunk/; revision=24827
2008-02-07 13:19:15 +00:00
Michael Natterer fdb9060f73 app/tools/gimpgegltool.c (gimp_param_spec_duplicate) add support for
2008-02-06  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpgegltool.c (gimp_param_spec_duplicate)
	* app/widgets/gimppropwidgets.c (gimp_prop_table_new): add support
	for GParamSpecEnum.

	* app/core/gimpimagemap.c (gimp_image_map_apply): add even better
	checks for input and output pads of the passed operation.


svn path=/trunk/; revision=24824
2008-02-06 18:38:29 +00:00
Michael Natterer e9faafdeb9 when using a source operation, blend its output over the original image
2008-02-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_apply): when using a
	source operation, blend its output over the original image using
	"over" instead of simply replacing the original image.


svn path=/trunk/; revision=24819
2008-02-06 11:02:31 +00:00
Martin Nordholts 356b1a87a5 Applied patch from Olof Frahm which makes loading of data files (brushes
2008-02-05  Martin Nordholts  <martinn@svn.gnome.org>

	Applied patch from Olof Frahm which makes loading of data
	files (brushes and so on) happen recursively (bug #514160).

	* app/core/gimpdatafactory.c
	(gimp_data_factory_data_load): Recursively search sub directories
	for data files using the new helper function
	(gimp_data_factory_load_data_recursive)

svn path=/trunk/; revision=24814
2008-02-05 19:15:13 +00:00
Michael Natterer 698fabcdef use gegl_node_get_pad() instead of gegl_node_find_property() to find out
2008-02-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_apply): use
	gegl_node_get_pad() instead of gegl_node_find_property() to find
	out whether the node has an "input" pad.

	* app/tools/gimpgegltool.c: #include "core/gimpimagemap.h"


svn path=/trunk/; revision=24812
2008-02-05 17:53:37 +00:00
Michael Natterer d08028320f do the right thing for operations without "input" pad so we can use all
2008-02-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_apply): do the right
	thing for operations without "input" pad so we can use all source
	operations too.

	* app/tools/gimpimagemaptool.[ch]: make
	gimp_image_map_tool_create_map() public for the time being.

	* app/tools/gimpgegltool.c (gimp_gegl_tool_operation_changed):
	recreate the GimpImageMap so we can switch from filter to source
	operations and back.


svn path=/trunk/; revision=24810
2008-02-05 13:54:25 +00:00
Michael Natterer 50ad5cfd32 add refcounting and replace free() API by ref() and unref().
2008-02-04  Michael Natterer  <mitch@gimp.org>

	* app/base/gimphistogram.[ch]: add refcounting and replace free()
	API by ref() and unref().

	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-levels.c
	* app/widgets/gimphistogrameditor.c
	* tools/pdbgen/pdb/color.pdb: replace calls to
	gimp_histogram_free() by gimp_histogram_unref().

	* app/pdb/color_cmds.c: regenerated.

	* app/widgets/gimphistogramview.c: reference the histograms so we
	don't need the widget's users to keep them around while the widget
	exists.

	* app/tools/gimpcurvestool.[ch]: remove the histogram from the
	tool struct and just create one locally to set it on the histogram
	view widget.

	Unrelated:

	* app/tools/gimplevelstool.[ch]
	* app/tools/gimpthresholdtool.[ch]: renamed "hist" members to
	"histogram" plus some cleanup.


svn path=/trunk/; revision=24792
2008-02-04 21:41:57 +00:00
Michael Natterer 3a9f7d7c28 app/core/Makefile.am app/core/gimpdrawable-brightness-contrast.[ch]
2008-02-04  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpdrawable-brightness-contrast.[ch]
	* app/core/gimpdrawable-color-balance.[ch]
	* app/core/gimpdrawable-colorize.[ch]
	* app/core/gimpdrawable-curves.[ch]
	* app/core/gimpdrawable-hue-saturation.[ch]
	* app/core/gimpdrawable-posterize.[ch]
	* app/core/gimpdrawable-threshold.[ch]: new files containing all
	the code that was in pdb/color_cmds.c. Cleaned up and GEGL-enabled
	everyting.

	* tools/pdbgen/pdb/color.pdb: remove almost all code and simply call
	the new functions.

	* app/pdb/color_cmds.c: regenerated.


svn path=/trunk/; revision=24784
2008-02-04 11:26:23 +00:00
Michael Natterer 27f1ccd4bd app/core/core-types.h have app/gegl know app/core's namespace.
2008-02-01  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h
	* app/gegl/gegl-types.h: have app/gegl know app/core's namespace.

	* app/gegl/gimpoperationcurves.h: remove temp hack includes.

	* app/gegl/gimpoperationcurves.c: include "core/gimpcurve.h"

	* app/gegl/gimpbrightnesscontrastconfig.[ch]
	* app/gegl/gimpcolorbalanceconfig.[ch]
	* app/gegl/gimpcolorizeconfig.[ch]
	* app/gegl/gimpcurvesconfig.[ch]
	* app/gegl/gimphuesaturationconfig.[ch]
	* app/gegl/gimplevelsconfig.[ch]
	* app/gegl/gimpoperationcurves.[ch]
	* app/gegl/gimpposterizeconfig.[ch]
	* app/gegl/gimpthresholdconfig.[ch]: derive from GimpViewable, install
	properties using the GimpConfig macros, add implementations of
	GimpConfigInterface::equal() and ::copy() where needed.

	* app/tools/gimpimagemaptool.[ch]: add prototype of a menu of
	recently used settings so the same color correction can easily be
	applied to many images.


svn path=/trunk/; revision=24770
2008-02-01 12:45:32 +00:00
Sven Neumann a9b946e376 app/core/gimpimage.c fixed handling of the image undo counter for the case
2008-01-24  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.c
	* app/core/gimpimage-undo.c: fixed handling of the image undo
	counter for the case where the user has undone the image to a
	state before the last save and then pushes a new undo. Fixes
	bug #509822.


svn path=/trunk/; revision=24699
2008-01-24 09:38:44 +00:00
Michael Natterer 17e0ee4192 to_levels_cruft() -> to_cruft().
2008-01-23  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimplevelsconfig.[ch]: to_levels_cruft() -> to_cruft().

	* app/core/gimpdrawable-levels.c
	* app/tools/gimplevelstool.c: changed accordingly.


svn path=/trunk/; revision=24692
2008-01-23 16:49:05 +00:00
Sven Neumann ffab5cc9db decreased the priority of the projection idle renderer to 150, halfway
2008-01-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.c (gimp_projection_idle_render_init):
	decreased the priority of the projection idle renderer to 150,
	halfway between G_PRIORITY_HIGH_IDLE and 
G_PRIORITY_DEFAULT_IDLE.
	Fixes bug #511214.


svn path=/trunk/; revision=24680
2008-01-22 20:27:13 +00:00
Sven Neumann 64880a8107 added new function gimp_use_gegl().
2008-01-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimp.[ch]: added new function gimp_use_gegl().

	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-levels.c
	* app/core/gimpdrawable-invert.c
	* app/tools/gimpimagemaptool.c
	* app/pdb/color_cmds.c
	* tools/pdbgen/pdb/color.pdb: use it instead of accessing the
	GimpCoreConfig struct directly.

svn path=/trunk/; revision=24668
2008-01-22 11:28:48 +00:00
Sven Neumann acbf4ade46 don't clear the selection as a side-effect of "Edit->Cut" (bug #510534).
2008-01-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimpselection.c (gimp_selection_extract): don't clear
	the selection as a side-effect of "Edit->Cut" (bug #510534).

svn path=/trunk/; revision=24662
2008-01-21 17:53:36 +00:00
Michael Natterer 455dad245e port to GEGL and use the new code path when use-gegl is TRUE.
2008-01-21  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-levels.c: port to GEGL and use the new
	code path when use-gegl is TRUE.

	* app/base/levels.[ch]: remove stretch and pick APIs which are not
	used any longer.


svn path=/trunk/; revision=24659
2008-01-21 12:55:18 +00:00
Sven Neumann e4d64122bb app/core/Makefile.am app/core/core-types.h define a simple interface for
2008-01-17  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimptagged.[ch]: define a simple interface for tagged
	objects.

	* app/core/gimpdata.[ch]: implement the GimpTagged interface. 

svn path=/trunk/; revision=24633
2008-01-17 10:51:31 +00:00
Sven Neumann 3ed00ecbea formatting.
2008-01-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimpviewable.h: formatting.

svn path=/trunk/; revision=24632
2008-01-17 08:54:46 +00:00
Sven Neumann 524870327c app/core/core-types.h app/display/gimpdisplayshell-callbacks.c
2008-01-14  Sven Neumann  <sven@gimp.org>

	* app/core/core-types.h
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-coords.[ch]
	* app/display/gimpdisplayshell.h
	* app/paint/gimpink.[ch]
	* app/paint/gimpinkundo.[ch]: applied patch from Alexia Death 
that
	adds an event evaluation function that decides if an event is
	needed or can be discarded. As a side-product some useful 
dynamics
	parameters like velocity are added to the GimpCoords struct. The
	Ink tool is changed to use this information. See bug #508639.


svn path=/trunk/; revision=24607
2008-01-14 20:34:37 +00:00
Michael Natterer dc65f5fc20 add typedef GimpImageMapApplyFunc here.
2008-01-09  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: add typedef GimpImageMapApplyFunc here.

	* app/core/gimpimagemap.[ch] (gimp_image_map_new): add apply_func
	and apply_data parameters.

	(gimp_image_map_apply): remove them here and add a GeglRectangle
	parameter which is the visible area of the affected drawable.

	* app/tools/gimpimagemaptool.[ch]: keep apply_func and apply_data
	around in the GimpImageMapTool struct.

	(gimp_image_map_tool_create_map): pass them to gimp_image_map_new().

	(gimp_image_map_tool_map): call gimp_image_map_apply() here and
	pass the drawable's visible rectangle.

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c (init): set apply_func and
	apply_data in the parent instance.

	(map): remove calls to gimp_image_map_apply().


svn path=/trunk/; revision=24573
2008-01-09 01:06:46 +00:00
Sven Neumann 4aa7e67c67 removed "add_alpha" parameter from gimp_item_duplicate() and
2008-01-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimpitem.[ch]: removed "add_alpha" parameter from
	gimp_item_duplicate() and gimp_item_convert(). This is a relict
	from the time when only the bottom layer was allowed to have no
	alpha channel.

	* app/actions/channels-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpselection.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/pdb/channel_cmds.c
	* app/pdb/layer_cmds.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpvectors.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/layer.pdb: changed accordingly.

svn path=/trunk/; revision=24570
2008-01-08 11:46:15 +00:00
Michael Natterer f0ec8dcb29 include gegl/gegl-types.h instead of base/base-types.h.
2008-01-07  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: include gegl/gegl-types.h instead of
	base/base-types.h.

	* app/gegl/gegl/gegl-types.h: add ugly #ifdefs so we can include
	gegl.h and this file at the same time.


svn path=/trunk/; revision=24563
2008-01-07 20:32:20 +00:00
Michael Natterer 147f3417fd reordered and renamed parameters to make more sense.
2008-01-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c (gimp_layer_transform_color): reordered
	and renamed parameters to make more sense.


svn path=/trunk/; revision=24562
2008-01-07 18:53:55 +00:00
Manish Singh fb573473c9 hardcode a declaration of gegl_node_add_child() in here for now.
2008-01-05  Manish Singh  <yosh@gimp.org>

        * app/core/gimpimagemap.c: hardcode a declaration of
        gegl_node_add_child() in here for now.

svn path=/trunk/; revision=24539
2008-01-05 22:25:06 +00:00
Hans Breuer 9a1d5f3453 **/makefile.msc app/gimpcore.def : updated so it compiles and links
2008-01-04  Hans Breuer  <hans@breuer.org>

	**/makefile.msc app/gimpcore.def : updated so it compiles and links
	(almost, see bug #507298)

svn path=/trunk/; revision=24533
2008-01-04 18:42:07 +00:00
Michael Natterer dd97e60591 add "use-gegl" property but don't serialize it.
2008-01-04  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpcoreconfig.[ch]: add "use-gegl" property but
	don't serialize it.

	* app/widgets/gimptoolbox.c: add super ugly "Use GEGL" toggle to
	the toolbox so we don't need to have prefs open all the time when
	experimenting with gegl.

	* app/tools/gimpimagemaptool.[ch]: remove "Use GEGL" toggle from
	the tool dialogs and connect to the config property instead.

	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-invert.c: made them runtime-switchable by
	looking at the config property.


svn path=/trunk/; revision=24530
2008-01-04 17:28:49 +00:00
Michael Natterer 15a50be8fe switch tile sources and sinks to assume linear data.
2008-01-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_apply): switch tile
	sources and sinks to assume linear data.


svn path=/trunk/; revision=24526
2008-01-04 14:54:00 +00:00