Commit Graph

3046 Commits

Author SHA1 Message Date
Michael Natterer 0b2061c150 move the invalidate_previews() API from here...
2008-11-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: move the invalidate_previews()
	API from here...

	* app/core/gimpitemstack.[ch]: ...to here.

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


svn path=/trunk/; revision=27569
2008-11-06 19:44:51 +00:00
Michael Natterer a3d556c0ca app/core/Makefile.am app/core/core-types.h new GimpList subclass which
* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpitemstack.[ch]: new GimpList subclass which (for
	now) does nothing but taking ownership of its children by the
	means of g_object_ref_sink().

	* app/core/gimpdrawablestack.[ch]: derive from GimpItemStack.

	* app/core/gimpimage.c: use a GimpItemStack instead of a plain
	GimpList for the list of vectors. Remove code which takes
	ownerships of added items from gimp_image_add_layer(),
	add_channel() and add_vectors().


svn path=/trunk/; revision=27568
2008-11-06 19:09:59 +00:00
Sven Neumann 02817081ff use NC_() to mark enum values for translation. Use a lower-case short form
2008-11-06  Sven Neumann  <sven@gimp.org>

	* tools/gimp-mkenums: use NC_() to mark enum values for 
translation.
	Use a lower-case short form of the type name as translation 
context.

	* libgimp/libgimp-intl.h: define the NC_() macro as noop.

	* libgimpbase/gimpbasetypes.[ch]
	* libgimpbase/gimpbase.def: added new functions to set and
	get a translation context on an enum type.

	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am:
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: register the translation context
	with the enum types.

	* app/display/display-enums.h
	* libgimpbase/gimpbaseenums.h
	* libgimpconfig/gimpcolorconfig-enums.h: removed old-style 
explicit
	translation context.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27562
2008-11-06 08:28:28 +00:00
Michael Natterer f31a539917 some minor cleanups.
2008-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.c: some minor cleanups.


svn path=/trunk/; revision=27561
2008-11-05 21:48:06 +00:00
Michael Natterer c0cc7c1156 add new function gimp_drawable_stack_invalidate_previews() which does just
2008-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: add new function
	gimp_drawable_stack_invalidate_previews() which does just what it
	says.

	* app/core/gimpimage.[ch]: merge invalidate_layer_previews() and
	invalidate_channels_previews() into a single invalidate_previews()
	and replace all calls to the old functions by calls to
	gimp_drawable_stack_invalidate_previews().

	* app/file/file-open.c: changed accordingly.


svn path=/trunk/; revision=27560
2008-11-05 20:48:59 +00:00
Michael Natterer 4381e415a0 remove call to gimp_image_invalidate_layer_previews(), they are
2008-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-convert.c (gimp_image_convert): remove call
	to gimp_image_invalidate_layer_previews(), they are invalidated by
	exchanging their tiles and by setting the image's colormap anyway.


svn path=/trunk/; revision=27559
2008-11-05 20:38:30 +00:00
Michael Natterer c4f43d49c2 This should remove any image or viewable dependency from the projection
2008-11-05  Michael Natterer  <mitch@gimp.org>

	This should remove any image or viewable dependency from the
	projection (apart from the projectable's get_image() method, but
	that one is not supposed to return the projection's model but
	rather the image the projection is part of).

	* app/core/gimpprojectable.[ch]: add vfunc get_size() which
	completes the API needed for GEGL projection.

	Add vfuncs get_layers(), get_channels(), get_components() and
	get_colormap() which are needed for the legacy projection code.

	* app/core/gimpimage.c: implement the new methods.

	* app/core/gimpprojection.c
	* app/core/gimpprojection-construct.c: use them and remove all
	calls to image and viewable API.


svn path=/trunk/; revision=27558
2008-11-05 20:10:51 +00:00
Michael Natterer 62a74f9da6 add signal "structure-changed" and API to emit it.
2008-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojectable.[ch]: add signal "structure-changed"
	and API to emit it.

	* app/core/gimpimage.c: emit it when the image emits
	"mode-changed" and "size-changed".

	* app/core/gimpprojection.c: connect to the new signal instead of
	"mode-changed" and "size-changed" to get rid of one more image
	dependency.


svn path=/trunk/; revision=27556
2008-11-04 23:22:45 +00:00
Michael Natterer 7d8b7f5534 add vitrual function invalidate_preview().
2008-11-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojectable.[ch]: add vitrual function
	invalidate_preview().

	* app/core/gimpimage.c: implement it and redirect to
	gimp_viewable_invalidate_preview().

	* app/core/gimpprojection.c: call the new API instead of
	gimp_viewable_invalidate_preview(). Some cleanup in the disabled
	cow-projection code.


svn path=/trunk/; revision=27553
2008-11-04 20:13:12 +00:00
Michael Natterer 716e00f88b Unfinished first step to make the projection independent of GimpImage,
2008-11-04  Michael Natterer  <mitch@gimp.org>

	Unfinished first step to make the projection independent of
	GimpImage, also one step closer to layer grouping.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpprojectable.[ch]: add new interface which abstracts
	something that can have a projection attached to it. Has "update"
	and "flush" signals and get_graph() and get_image()
	vfuncs. get_image() is temporary until the hack is finishes.

	* app/core/gimpimage.[ch]: implement GimpProjectableInterface,
	remove "update" and "flush" signals and made get_graph() a private
	implementation of the interface method. Moved interface method
	implementations after virtual function implementations.

	* app/core/gimpprojection.[ch]: change member "image" to
	"projectable" and use the projectable API as often as
	possible. Still some implicit dependencies on the projectable
	being an image left but it's getting close.

	* app/core/gimpprojection-construct.c: same here.


svn path=/trunk/; revision=27552
2008-11-04 18:06:36 +00:00
Sven Neumann 4762b73403 bumped minimum required version of GLib to 2.18.0.
2008-11-04  Sven Neumann  <sven@sven>

	* configure.in: bumped minimum required version of GLib to 
2.18.0.

	* INSTALL: document the updated dependency.

	* app/core/gimp.[ch]: introduced gimp_message_literal(), a 
variant
	of gimp_message() that takes a literal string.

	* app/errors.[ch]: removed format arguments from 
gimp_fatal_error()
	and gimp_terminate() and let them take a literal string instead.

	* app/tools/gimptool.[ch]: introduced 
gimp_tool_message_literal(),
	a variant of gimp_tool_message() that takes a literal string.

	* app/actions/documents-commands.c
	* app/actions/drawable-commands.c
	* app/actions/edit-commands.c
	* app/actions/error-console-commands.c
	* app/actions/file-commands.c
	* app/actions/gradients-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/plug-in-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/config/gimprc.c
	* app/core/gimp-modules.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer-filter.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/dialogs.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/preferences-dialog.c
	* app/dialogs/quit-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/file/file-procedure.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/gegl/gimpcurvesconfig.c
	* app/gegl/gimplevelsconfig.c
	* app/gui/gui-message.c
	* app/gui/gui.c
	* app/gui/session.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugin-message.c
	* app/plug-in/gimpplugin.c
	* app/plug-in/gimppluginmanager-restore.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptextlayer.c
	* app/tools/gimp-tools.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool-settings.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsourcetool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpactionview.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpcontrollers.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdevices.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimperrordialog.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppdbdialog.c
	* app/widgets/gimpsettingsbox.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/image.pdb: use the _literal variants for
	g_set_error(), gimp_message() and gimp_tool_message().

	* app/pdb/convert-cmds.c
	* app/pdb/edit-cmds.c
	* app/pdb/floating-sel-cmds.c
	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27548
2008-11-04 12:33:09 +00:00
Michael Natterer 87dc343b21 remove public functions get_tiles(), get_image(), get_image_type() and
2008-11-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojection.[ch]: remove public functions
	get_tiles(), get_image(), get_image_type() and get_bytes().

	* app/actions/debug-commands.c
	* app/actions/layers-commands.c
	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-render.c
	* app/paint/gimppaintcore.c
	* tools/pdbgen/pdb/layer.pdb: use the GimpPickable API insatead.

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


svn path=/trunk/; revision=27547
2008-11-04 12:07:17 +00:00
Sven Neumann b5ff19f743 reverted last change as the code in tile-pyramid does care about the pixel
2008-11-04  Sven Neumann  <sven@sven>

	* app/base/tile-pyramid.[ch] (tile_pyramid_new):
	* app/core/gimpprojection.c 
(gimp_projection_get_tiles_at_level):
	reverted last change as the code in tile-pyramid does care about
	the pixel format and it should continue to reject types that it
	cannot handle.


svn path=/trunk/; revision=27545
2008-11-04 09:07:38 +00:00
Michael Natterer 6f300a579c changed "type" parameter into "bytes" because tile managers don't care
2008-11-04  Michael Natterer  <mitch@gimp.org>

	* app/base/tile-pyramid.[ch] (tile_pyramid_new): changed "type"
	parameter into "bytes" because tile managers don't care about
	the pixel format of their tiles. Reordered parameters to match
	tile_manager_new().

	* app/core/gimpprojection.c (gimp_projection_get_tiles_at_level):
	pass the bytes instead of the image type.


svn path=/trunk/; revision=27544
2008-11-04 08:50:04 +00:00
Sven Neumann fe520925b7 app/base/Makefile.am app/core/Makefile.am app/display/Makefile.am
2008-11-03  Sven Neumann  <sven@gimp.org>

	
	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am: 
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: micro-optimization in the 
generated
	enum registration code.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27538
2008-11-03 21:38:13 +00:00
Michael Natterer b994ab724e app/core/gimp-edit.c app/core/gimpchannel.c
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-edit.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/core/gimpdrawablemodundo.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpselection.c
	* app/text/gimptext-compat.c
	* app/text/gimptextlayer-xcf.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/layer.pdb: use accessors for item->offset_x,y.
	Some minor unrelated cleanups.

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


svn path=/trunk/; revision=27537
2008-11-03 21:17:50 +00:00
Michael Natterer 56b5909c8a add "GimpImageType type" parameter because there are only a few calls to
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch] (gimp_drawable_set_tiles): add
	"GimpImageType type" parameter because there are only a few calls
	to this function which (can easily pass the current type); however
	most calls to gimp_drawable_set_tiles_full() were just using the
	function because of the type argument and passed in the item's
	current offsets (which means peeking into the item struct or using
	temp variables).

	* app/core/gimpdrawable-offset.c (gimp_drawable_offset)
	* app/text/gimptextlayer.c (gimp_text_layer_render)
	* app/tools/gimptransformtool.c (gimp_transform_tool_doit): pass
	the type to set_tiles().

	* app/core/gimpchannel.c (gimp_channel_convert)
	* app/core/gimpimage-convert.c (gimp_image_convert)
	* app/core/gimplayer.c (gimp_layer_convert,add_alpha,flatten):
	change calls to set_tiles_full() into set_tiles() because the
	offset doesn't change.


svn path=/trunk/; revision=27535
2008-11-03 20:51:46 +00:00
Michael Natterer 740ab5e633 renamed gimp_item_width() to gimp_item_get_width() and gimp_item_height()
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_width() to gimp_item_get_width() and
	gimp_item_height() to gimp_item_get_height().

	* app/actions/channels-commands.c
	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/dialogs/offset-dialog.c
	* app/dialogs/resize-dialog.c
	* app/dialogs/scale-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimpink.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsmudge.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimptexttool.c
	* app/vectors/gimpvectors.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderervectors.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/drawable.pdb: changed accordingly.

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


svn path=/trunk/; revision=27531
2008-11-03 00:09:01 +00:00
Martin Nordholts c3b7be242c Instantiate offset_node on-demand.
* app/core/gimpitem.c: Instantiate offset_node on-demand.

* app/core/gimpdrawable.c: Use gimp_item_set_offset().

svn path=/trunk/; revision=27530
2008-11-02 23:16:47 +00:00
Michael Natterer 5b68a1d0eb renamed gimp_item_offsets() to gimp_item_get_offset() and
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_offsets() to gimp_item_get_offset() and
	gimp_item_set_offsets() to gimp_item_set_offset().

	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-preview.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsourcecore.c
	* app/text/gimptextlayer-xcf.c
	* app/tools/<many>.c
	* app/widgets/gimptoolbox-dnd.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/transform_tools.pdb
	* tools/pdbgen/pdb/vectors.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c
	* app/pdb/drawable-transform-cmds.c
	* app/pdb/selection-cmds.c
	* app/pdb/vectors-cmds.c
	* app/pdb/transform-tools-cmds.c: regenerated.


svn path=/trunk/; revision=27529
2008-11-02 23:03:29 +00:00
Martin Nordholts 594bc84ace New function that sets the offset of the item and also keeps the
* app/core/gimpitem.c (gimp_item_set_offsets): New function that
sets the offset of the item and also keeps the offset_node in
sync.

* app/core/gimpdrawable.c (gimp_drawable_real_set_tiles): Use the
function instead of setting the offsets directly. Fixes corrupted
display when cropping images with GEGL enabled for the projection.

svn path=/trunk/; revision=27528
2008-11-02 22:44:33 +00:00
Martin Nordholts 93577a2eec Moved the shift_node from GimpLayer to GimpItem, and call it offset_node.
* app/core/gimpitem.[ch]: Moved the shift_node from GimpLayer to
GimpItem, and call it offset_node. Also added
gimp_item_get_offset_node() meant to be used in the same way as
gimp_item_offsets().

(gimp_item_real_translate): Keep the offset_node up to date.

* app/core/gimplayer.[ch]: Don't manage the offset_node, get it
from GimpItem instead.

svn path=/trunk/; revision=27527
2008-11-02 22:29:05 +00:00
Michael Natterer a748e3f58e add new functions gimp_get_image_iter(), display_iter() and
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp.[ch]: add new functions gimp_get_image_iter(),
	display_iter() and tool_info_iter().

	* app/tools/gimp-tools.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/dialogs/quit-dialog.c
	* app/gui/gui.c
	* app/menus/windows-menu.c
	* app/actions/images-commands.c
	* app/actions/tools-actions.c
	* app/actions/windows-actions.c
	* app/actions/tool-options-commands.c
	* app/display/gimpdisplay.c
	* app/display/gimpdisplay-foreach.c
	* app/widgets/gimptoolbox.c
	* tools/pdbgen/pdb/image.pdb: use them here.

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


svn path=/trunk/; revision=27526
2008-11-02 21:34:14 +00:00
Michael Natterer d1ca165b4e add new functions gimp_image_get_layer_iter(), channel_iter() and
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add new functions
	gimp_image_get_layer_iter(), channel_iter() and vectors_iter()
	which return the GList inside the resp. GimpList.

	* app/actions/channels-actions.c
	* app/actions/layers-actions.c
	* app/actions/vectors-actions.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-item-list.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage.c
	* app/core/gimpimage.h
	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-draw.c
	* app/file/file-open.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpdrawtool.c
	* app/vectors/gimpvectors-compat.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/image.pdb: use the new functions instead of
	peeking both into the image and the list. Remove inclusions of
	"gimplist.h" or change them into "gimpcontainer.h" if needed.

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


svn path=/trunk/; revision=27524
2008-11-02 20:46:57 +00:00
Michael Natterer c14c84ba63 add "update" signal with the same signature as GimpImage::update().
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: add "update" signal with the
	same signature as GimpImage::update(). Install handlers for the
	drawables' "update" and "visibility-changed" signals and emit
	"update" accordingly, item offsets taken into account. Also emit
	"update" when drawables are added, removed and reordered.

	* app/core/gimpimage.[ch]: remove handlers and tons of code that
	makes sure the image emits "update" on any of the above handled
	events and simply connect the layer and channel stacks' "update"
	signal to gimp_image_update().


svn path=/trunk/; revision=27523
2008-11-02 19:53:51 +00:00
Michael Natterer 50ac74be1e remove the mask_node and simply set both opacity and the layer mask's
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.[ch]: remove the mask_node and simply set
	both opacity and the layer mask's source node on the opacity_node.
	Needs latest SVN GEGL.


svn path=/trunk/; revision=27522
2008-11-02 18:39:10 +00:00
Martin Nordholts 24fac1de0f Move the base GeglNode here in preparation for moving the GimpLayer
* app/core/gimpitem.[ch]: Move the base GeglNode here in
preparation for moving the GimpLayer gegl:shift op to here as
well. After all, the offsets are properties of GimpItem and not
GimpLayer.

* app/core/gimpdrawable.[ch]: Delegate appropriate stuff to the
GimpItem base class, like part of the visibility toggling and the
creation and destruction of the GimpItem node.

* app/core/gimplayer.c
* app/core/gimpchannel.c
* app/core/gimpdrawablestack.c: Changed accordingly, use the new
function names.

* app/core/gimpitempropundo.c
* app/vectors/gimpvectors-warp.c
* app/vectors/gimpvectorsmodundo.c: Include gegl.h instead of
glib-object.h

svn path=/trunk/; revision=27521
2008-11-02 16:39:38 +00:00
Martin Nordholts a9e187586b Prefix the GIMP GEGL operations with "gimp:" instead of "gimp-" so we
* app/gegl/gimpoperation*.c: Prefix the GIMP GEGL operations with
"gimp:" instead of "gimp-" so we follow the GEGL prefix style and
better serialize to XML.

* app/tools/gimp*tool.c

* app/core/gimpdrawable-*.c
* app/core/gimpdrawable.c
* app/core/gimpimagemap.c
* app/core/gimpprojection.c: Changed accordingly.

svn path=/trunk/; revision=27512
2008-11-01 12:08:35 +00:00
Sven Neumann 94dd20dadc bumped minimum required version of Cairo to 1.6.4.
2008-10-31  Sven Neumann  <sven@gimp.org>

	* configure.in: bumped minimum required version of Cairo to 
1.6.4.

	* app/core/gimpscanconvert.c: use 
cairo_format_stride_for_width().


svn path=/trunk/; revision=27488
2008-10-31 07:20:07 +00:00
Michael Natterer 82ca223376 change member "gboolean stroking" into "gint stroking_count". Add push/pop
2008-10-29  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpselection.[ch]: change member "gboolean stroking"
	into "gint stroking_count". Add push/pop API to increase/decrease
	the counter. Pretend the selection is empty if the counter is > 0.
	Enables correctly rendering vector layers even if there is a
	selection.


svn path=/trunk/; revision=27464
2008-10-29 19:55:58 +00:00
Sven Neumann 755621571c Bug 558420 – projection incorrect with alpha-less layers
2008-10-29  Sven Neumann  <sven@gimp.org>

	Bug 558420 – projection incorrect with alpha-less layers

	* app/core/gimpprojection-construct.c 
(gimp_projection_initialize):
	need to initialize the projection if the covering layer is not
	opaque.


svn path=/trunk/; revision=27460
2008-10-29 19:17:30 +00:00
Martin Nordholts 1f7b2c257e Completed the rename with gimp:layer-mode -> gimp:point-layer-mode and
* app/gegl/gimpoperationpointlayermode.c: Completed the rename
with gimp:layer-mode -> gimp:point-layer-mode and also did some
formating.

* app/core/gimplayer.c: Changed accordingly.

svn path=/trunk/; revision=27408
2008-10-25 21:02:46 +00:00
Martin Nordholts 1a19f7315a Instead of having one GEGL operation per layer mode, make
GimpOperationLayerMode instantiable and add a GimpLayerModeEffects
property to it that we check in ::process() to blend pixels
together.

* app/gegl/gimpoperationlayermode.[ch]: Do the change described
above. Currently only Normal and Addition are implemented. Normal
so that we don't need a special case for the gegl:normal op. Also,
the Dissolve layer mode is not a point op and needs to be
implemented elsewhere.

* app/gegl/gimpoperation*mode.c: Removed.

* app/gegl/gimp-gegl-utils.[ch]: Removed
gimp_layer_mode_to_gegl_operation().

* app/core/gimplayer.c

* app/gegl/Makefile.am
* app/gegl/gimp-gegl.c: Adapt.

svn path=/trunk/; revision=27400
2008-10-25 13:29:55 +00:00
Michael Natterer f0c79b81e3 Merge a modified and enhanced patch from the vector layer branch:
2008-10-25  Michael Natterer  <mitch@gimp.org>

	Merge a modified and enhanced patch from the vector layer branch:

	* app/core/gimpdrawable-stroke.[ch]: add new public API
	gimp_drawable_fill_boundary() and gimp_drawable_fill_vectors().

	Split the internal code up so that there are functions which turn
	the BoundSegs and GimpVectors into a GimpScanConvert and changed
	gimp_drawable_stroke_scan_convert() so it can either fill the
	shape or stroke it.


svn path=/trunk/; revision=27399
2008-10-25 13:12:48 +00:00
Michael Natterer 39af762f61 More merging from SOC 2006's vector layer branch:
2008-10-25  Michael Natterer  <mitch@gimp.org>

	More merging from SOC 2006's vector layer branch:

	* app/core/gimpitem.[ch]: add "gboolean push_undo" to
	GimpItem::stroke().

	* app/core/gimpdrawable-stroke.[ch]
	* app/paint/gimppaintcore-stroke.[ch]
	* app/paint/gimppaintcore.[ch] (gimp_paint_core_finish): add
	"push_undo" parameters here too.

	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/dialogs/stroke-dialog.c
	* app/tools/gimppainttool.c
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/paths.pdb: pass TRUE all over the place.

	* app/pdb/edit-cmds.c
	* app/pdb/paint-tools-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27398
2008-10-25 11:59:03 +00:00
Michael Natterer a92925361b bail out if the notification is not about one of our own properties (but
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_parent_notify): bail out if
	the notification is not about one of our own properties
	(but from a subclass).


svn path=/trunk/; revision=27394
2008-10-25 09:14:16 +00:00
Michael Natterer efb6d15acf add "gboolean use_context_color" parameter to gimp_stroke_options_new()
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpstrokeoptions.[ch]: add "gboolean use_context_color"
	parameter to gimp_stroke_options_new() and set the passed context
	as parent of the new options only if it's TRUE. Also fixed the
	GimpConfig::duplicate() implementation to really duplicate the
	object and not just return an object containing default values.

	* app/core/gimpfilloptions.[ch]: add gimp_fill_options_new().

	* app/actions/select-commands.c
	* app/dialogs/stroke-dialog.c
	* app/actions/vectors-commands.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: pass TRUE to gimp_stroke_options_new().

	* app/pdb/edit-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27393
2008-10-25 08:52:20 +00:00
Michael Natterer 90c26cf10e add non-serializable properties pattern-view-type and pattern-view-size
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpfilloptions.[ch]: add non-serializable properties
	pattern-view-type and pattern-view-size which are used only by the
	new UI below.

	* app/widgets/gimpfilleditor.[ch]: added boolean edit-context
	property. If TRUE, add widgets to edit the context's foreground and
	pattern. Add "edit_context" parameter to gimp_fill_editor_new().

	* app/widgets/gimpstrokeeditor.[ch]: add the same parameter here.

	* app/widgets/gimpwidgets-utils.[ch]: add gimp_enum_radio_box_add()
	which does the same as the existing gimp_enum_radio_frame_add().

	* app/dialogs/stroke-dialog.c: pass FALSE for "edit_context"
	because this dialog takes its foreground and pattern from the user
	context and doesn't need it's own GUI for them.


svn path=/trunk/; revision=27392
2008-10-24 22:34:24 +00:00
Michael Natterer 1a453c37df app/core/Makefile.am app/core/core-types.h remove this mis-engineered
2008-10-24  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpstrokedesc.[ch]: remove this mis-engineered
	abstraction...

	* app/core/gimpstrokeoptions.[ch]: ...and add its properties and
	API here.

	* app/core/gimpitem.[ch]: GimpItem::stroke() take a
	GimpStrokeOptions instead of a GimpStrokeDesc.

	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/vectors/gimpvectors.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/dialogs/stroke-dialog.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: changed accordingly.

	* app/pdb/edit-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27388
2008-10-24 07:37:46 +00:00
Michael Natterer 50ad791fff Another merge from the vector layer branch:
2008-10-24  Michael Natterer  <mitch@gimp.org>

	Another merge from the vector layer branch:

	* app/core/gimpstrokedesc.c (gimp_stroke_desc_new): make sure
	each stroke desc always has GimpPaintInfo.


svn path=/trunk/; revision=27383
2008-10-23 22:48:46 +00:00
Michael Natterer 3dfef0f15a rename GimpStrokeStyle to GimpFillStyle.
2008-10-23  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]: rename GimpStrokeStyle to GimpFillStyle.

	* app/core/gimpfilloptions.[ch]
	* app/core/gimpdrawable-stroke.c
	(gimp_drawable_stroke_scan_convert): changed accordingly.


svn path=/trunk/; revision=27379
2008-10-23 21:30:28 +00:00
Michael Natterer 67a5eaea68 Merge a part of SOC 2006's vector layer branch:
2008-10-23  Michael Natterer  <mitch@gimp.org>

	Merge a part of SOC 2006's vector layer branch:

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpfilloptions.[ch]: new GimpContext subclass factored
	out of GimpStrokeOptions. Has "style" and "antialias" properties.

	* app/core/gimpstrokeoptions.[ch]: derive from GimpFillOptions
	and remove said properties.

	* app/core/gimpdrawable-stroke.c
	(gimp_drawable_stroke_scan_convert): changed accordingly.


svn path=/trunk/; revision=27378
2008-10-23 21:18:39 +00:00
Sven Neumann b6ae85b74c app/core/gimpimagefile.c formatting.
2008-10-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c
	* app/plug-in/gimpplugin-progress.c: formatting.


svn path=/trunk/; revision=27357
2008-10-22 06:00:06 +00:00
Martin Nordholts e38ca5490a Rename the convenient channel offset defines from FOO_PIX to FOO as this
* app/base/base-types.h: Rename the convenient channel offset
defines from FOO_PIX to FOO as this increases readability.

* app/base/color-balance.c
* app/base/colorize.c
* app/base/desaturate.c
* app/base/hue-saturation.c
* app/base/siox.c
* app/base/threshold.c

* app/core/gimp-edit.c
* app/core/gimp-transform-region.c
* app/core/gimpchannel.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-convert.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpdrawable.c
* app/core/gimpimage-convert.c
* app/core/gimpimage.c
* app/core/gimppalette-import.c
* app/core/gimppickable.c

* app/gegl/gimpoperation*mode.c
* app/gegl/gimpoperationcolorbalance.c
* app/gegl/gimpoperationcolorize.c
* app/gegl/gimpoperationhuesaturation.c
* app/gegl/gimpoperationlevels.c
* app/gegl/gimpoperationposterize.c
* app/gegl/gimpoperationthreshold.c

* app/paint-funcs/subsample-region.c

* app/paint/gimpclone.c
* app/paint/gimppaintbrush.c

* app/widgets/gimpviewrenderer.c: Adapt.

svn path=/trunk/; revision=27324
2008-10-19 13:47:09 +00:00
Sven Neumann e25c82e21a Applied patch from Alexia Death as attached to bug #471344:
2008-10-18  Sven Neumann  <sven@gimp.org>

	Applied patch from Alexia Death as attached to bug #471344:
	
	* app/core/Makefile.am
	* app/core/gimpcoords-interpolate.[ch]: new files with
	interpolation code taken from ...

	* app/vectors/gimpbezierstroke.c: ... here.

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


svn path=/trunk/; revision=27314
2008-10-18 18:46:15 +00:00
Sven Neumann 8f425553a7 added signal Gimp::image-opened to announce that an image has been loaded
2008-10-17  Sven Neumann  <sven@sven>

	* app/core/gimp.[ch]: added signal Gimp::image-opened to 
announce
	that an image has been loaded and a display was created for it.

	* app/file/file-open.c (file_open_with_proc_and_display): call
	gimp_opened() to emit the new signal.

	* app/gui/dbus-service.xml
	* app/gui/gimpdbusservice.[ch]: propagate the 'opened' signal to
	listeners of the "org.gimp.GIMP.UI" DBus service.

	* app/gui/gui-unique.c: formatting.


svn path=/trunk/; revision=27297
2008-10-17 12:03:08 +00:00
Michael Natterer 880a699cae configure.in require GEGL >= 0.0.21.
2008-10-14  Michael Natterer  <mitch@gimp.org>

	* configure.in
	* app/sanity.c: require GEGL >= 0.0.21.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-brightness-contrast.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpimage.c
	* app/core/gimpimagemap.c
	* app/core/gimplayer.c
	* app/gegl/gimp-gegl-utils.c
	* app/tools/gimpbrightnesscontrasttool.c: GEGL operation names
	are now "gegl:"-prefixed.

	* app/core/gimpimagemap.c: set the node's "dont-cache" property
	unconditionally.


svn path=/trunk/; revision=27284
2008-10-14 22:44:42 +00:00
Michael Natterer 5fa6af0e1f add a default implementation of GimpDrawable::get_node() which contains a
2008-10-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: add a default implementation of
	GimpDrawable::get_node() which contains a layer mode node.
	Implement GimpItem::visibility_changed() and turn the node into a
	nop when the drawable is invisible. Added public function
	gimp_drawable_get_mode_node() so subclasses can plug stuff
	into its "aux" pad.

	* app/core/gimplayer.[ch]
	* app/core/gimpchannel.[ch]: changed accordingly (remove
	duplicated member and code that is now in GimpDrawable).


svn path=/trunk/; revision=27277
2008-10-14 18:32:07 +00:00
Michael Natterer ef1df223a8 add a "use_gegl" boolean member.
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojection.h: add a "use_gegl" boolean member.

	* app/core/gimpprojection-construct.c (gimp_projection_construct):
	use the boolean instead of hardcoding FALSE.

	* app/actions/view-actions.c
	* app/actions/view-commands.[ch]: add a "Use GEGL" action and
	callback which sets the boolean and exposes the display.

	* menus/image-menu.xml.in: add it to the "View" menu.


svn path=/trunk/; revision=27242
2008-10-11 19:17:42 +00:00
Michael Natterer 0e88239524 add a projection node and implement GimpDrawable::get_node(). Reconfigure
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.[ch]: add a projection node and
	implement GimpDrawable::get_node(). Reconfigure the node in
	visibility_changed(), set_color(), set_opacity() and
	set_show_masked().

	* app/core/gimpimage.c (gimp_image_get_graph): enable code that
	projects the channels stack on top of the layer stack.

	* app/core/gimpprojection-construct.c: remove the call to
	gimp_projection_construct_channels() from the GEGL code path. Also
	don't touch proj->construct_flag.


svn path=/trunk/; revision=27230
2008-10-11 10:29:19 +00:00
Michael Natterer e28e864ac6 remove obsolete assertion and redundant cast.
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c (gimp_layer_get_node): remove obsolete
	assertion and redundant cast.


svn path=/trunk/; revision=27229
2008-10-11 10:23:01 +00:00
Michael Natterer 302bda6c66 add GimpContainer::add() implementation, it's needed after all even though
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.c: add GimpContainer::add()
	implementation, it's needed after all even though everybody uses
	gimp_container_insert() on drawable stacks.

	(gimp_drawable_stack_remove_node): no need to have a special check
	for newly added nodes, this can't happen any more now that we have
	an add() impl.

	(gimp_drawable_stack_get_graph): free the reverse list.


svn path=/trunk/; revision=27228
2008-10-11 10:18:46 +00:00
Michael Natterer 26de288d8b Fix old bug in the GimpContainer implementation that wasn't visible before
2008-10-11  Michael Natterer  <mitch@gimp.org>

	Fix old bug in the GimpContainer implementation that wasn't
	visible before the drawable stack completly b0rked when removing
	the second-last item:

	* app/core/gimpcontainer.c: add default implementations of ::add()
	and ::remove() and update container->num_children there instead of
	in the gimp_container_add() and _remove() wrapper functions.
	This way not only external callbacks connected to the "add" and
	"remove" signals are called with the correct num_children, also
	implemtations of ::add() and ::remove() in subclass have the right
	number available before/after upchaining. Add paranoia code to the
	wrapper functions which check if the subclass reall chains up.

	* app/core/gimplist.c: chain up in add() and remove().


svn path=/trunk/; revision=27227
2008-10-11 10:14:21 +00:00
Michael Natterer 012581b1b9 simplify by getting rid of code duplication.
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.c
	(gimp_drawable_stack_add_node)
	(gimp_drawable_stack_remove_node): simplify by getting rid of code
	duplication.


svn path=/trunk/; revision=27217
2008-10-10 21:53:34 +00:00
Michael Natterer a037de0f18 move all the code that creates a graph of drawables and all
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: move all the code that creates
	a graph of drawables and all adding/removing/reordering code from
	GimpImage to this file.

	* app/core/gimpimage.c: remove the code here and use the layer
	stack's subgraph instead. Add #if 0'ed code that blends the
	channels on top of that but that doesn't work because channels
	don't provide nodes yet.


svn path=/trunk/; revision=27216
2008-10-10 21:18:24 +00:00
Michael Natterer 513c1b80f6 app/core/core-types.h app/core/Makefile.am new GimpList subclass stub
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h
	* app/core/Makefile.am
	* app/core/gimpdrawablestack.[ch]: new GimpList subclass stub
	which will manage the subgraphs of layers and channels and is also
	the first step towards layer tree.

	* app/core/gimpimage.c (gimp_image_init): keep the layers and
	channels in GimpDrawableStacks instead of plain GimpLists.


svn path=/trunk/; revision=27212
2008-10-10 20:04:03 +00:00
Michael Natterer b479b7b346 add virtual function GimpDrawable::get_node() which returns a node to be
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: add virtual function
	GimpDrawable::get_node() which returns a node to be plugged into
	the projection.

	* app/core/gimplayer.[ch]: remove public get_node() api and
	implement the virtual function instead.

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


svn path=/trunk/; revision=27211
2008-10-10 19:36:17 +00:00
Michael Natterer 5ad366c642 implement GimpItem::visibility-changed and turn the layer's node into a
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c: implement GimpItem::visibility-changed
	and turn the layer's node into a nop when the layer is invisible.

	(gimp_layer_get_node): connect the stuff to a nop here too for
	invisible layers.


svn path=/trunk/; revision=27208
2008-10-10 13:52:13 +00:00
Michael Natterer 73a9bcf327 Bug 554983 – Layers Projection using GEGL
2008-10-10  Michael Natterer  <mitch@gimp.org>

	Bug 554983 – Layers Projection using GEGL

	First projection using GEGL, wheeeee. Disabled by default because
	it doesn't work with floating selection (and will not, FS
	refactoring is in the queue).

	* app/core/gimpimage.[ch]: add gimp_image_get_graph() which
	returns a GeglNode representing the image's projection.

	(gimp_image_add_layer_node)
	(gimp_image_remove_layer_node): new utility functions to add and
	remove layer nodes to/from the graph.

	(gimp_image_add_layer)
	(gimp_image_remove_layer)
	(gimp_image_position_layer): call them to keep the graph up to date.

	* app/core/gimpdrawable.c (gimp_drawable_real_update): invalidate
	the source node.

	* app/core/gimpprojection.[ch]: keep a projection graph around and
	add gimp_projection_get_sink_node() which returns the node that
	writes to the projection tiles.

	* app/core/gimpprojection-construct.c: add
	gimp_projection_construct_gegl() which is a few-liner that uses a
	GeglProcessor to run the projection graph.

	(gimp_projection_construct): call the new function (disabled by
	default).


svn path=/trunk/; revision=27207
2008-10-10 12:24:56 +00:00
Michael Natterer dba9e0c5e8 add new functions gimp_image_get_layer_by_index(), _channel_by_index() and
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add new functions
	gimp_image_get_layer_by_index(), _channel_by_index() and
	_vectors_by_index().

	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/xcf/xcf-load.c: use them instead of looking the items up
	in image->container and casting the return value.


svn path=/trunk/; revision=27206
2008-10-10 11:45:00 +00:00
Michael Natterer f2a6b781e4 the "shift" operation's x and y properties are doubles not ints.
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c (gimp_layer_translate)
	(gimp_layer_get_node): the "shift" operation's x and y properties
	are doubles not ints.

	(gimp_layer_apply_mask): properly disconnect the mask node.

	(gimp_layer_set_opacity): the opacity node has a "value" property,
	not "opacity".


svn path=/trunk/; revision=27205
2008-10-10 11:30:56 +00:00
Michael Natterer 517e58cdeb Address Bug 554983 – Layers Projection using GEGL
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Address Bug 554983 – Layers Projection using GEGL

	* app/gegl/gimp-gegl-utils.[ch]: add (imcomplete) function
	gimp_layer_mode_to_gegl_operation() from bug #554983.

	* app/core/gimpdrawable.[ch]: add gimp_drawable_get_source_node()
	which returns a GimpOperationTileSource for the drawable's
	tiles.

	(gimp_drawable_real_set_tiles)
	(gimp_drawable_configure): set the node's "tiles" property.

	* app/core/gimplayer.[ch]: add gimp_layer_get_node() which returns
	a GeglNode with proxy "input" and "output" pads to be plugged
	into the projection graph. The node has children for opacity,
	mask, layer mode and layer offset.

	(gimp_layer_translate)
	(gimp_layer_add_mask)
	(gimp_layer_apply_mask)
	(gimp_layer_set_opacity)
	(gimp_layer_set_mode): reconfigure the respective nodes.

	* app/core/gimpimage.[ch]: keep a "graph" node around and destroy
	it in finalize(). Not even a stub, just a silly GEGL dependency.


svn path=/trunk/; revision=27204
2008-10-09 20:44:23 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
	had a GEGL dependency (they will have in the next commit, but I
	wanted to keep the commit separate).

	* app/dialogs/Makefile.am
	* app/file/Makefile.am
	* app/gui/Makefile.am
	* app/menus/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/vectors/Makefile.am
	* app/widgets/Makefile.am
	* app/xcf/Makefile.am: add GEGL_CFLAGS.

	* app/actions/*.c
	* app/core/*.c
	* app/dialogs/*.c
	* app/display/*.c
	* app/file/*.c
	* app/gui/*.c
	* app/menus/*.c
	* app/paint/*.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/*.c
	* app/text/*.c
	* app/tools/*.c
	* app/vectors/*.c
	* app/widgets/*.c
	* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
	to all files which include a drawable subclass or gimpimage.h

	* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
	in all generated files.

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

	* data/images/gimp-splash.png: the goat is still sleeping.
	By Aurore Derriennic.


svn path=/trunk/; revision=27202
2008-10-09 20:24:04 +00:00
Michael Natterer 0e4a35a2d8 Remove the last code duplication from the undo system (or if not the last
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Remove the last code duplication from the undo system (or if not
	the last then at least the most ugly):

	* app/core/gimpimage.[ch] (gimp_image_add_layer,channel,vectors):
	add "gboolean push_undo" parameter and add the item without
	touching undo if it's TRUE. Changed assertions from
	g_object_is_floating() to !gimp_item_is_attached() so they also
	take items from the undo stack and not only newly created ones.

	(gimp_image_remove_layer,channel,vectors): add "push_undo"
	parameter here too. Also add a "new_active" parameter where an
	optional new active item can be passed.

	(gimp_image_remove_layer,channel): these functions must not be
	called with push_undo=FALSE and a floating selection attached to
	the layer/channel. This can't currently happen; added warnings in
	case other code is changed and makes it happen anyway.

	* app/core/gimpchannelundo.c
	* app/core/gimplayerundo.c
	* app/vectors/gimpvectorsundo.c: use above functions to add/remove
	items instead of duplicating (parts of) their code. Pass
	push_undo=FALSE and the previously active item to the remove()
	functions.

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpchannelundo.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage-scale.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayerundo.c
	* app/core/gimpselection.c
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/vectors/gimpvectorsundo.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.[ch]
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/paths.pdb: changed accordingly (pass TRUE
	unless it's a new image like when loading and XCF file).

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


svn path=/trunk/; revision=27200
2008-10-09 19:40:41 +00:00
Michael Natterer e21935a7b9 Bug 134956 – Curves tool doesn't save free curves
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Bug 134956 – Curves tool doesn't save free curves

	* app/core/gimpmarshal.list
	* app/widgets/gimpsettingsbox.[ch]: add signal "file-dialog-setup"
	and emit it when the export/import file chooser is fully
	constructed. Callbacks can then do additional things to the
	dialog, like adding custom buttons.

	* app/tools/gimpcurvestool.h
	* app/tools/gimplevelstool.h: add boolean member
	"export_old_format".

	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c (gimp_*_tool_dialog): connect to
	the settings box' "file-dialog-setup".

	(gimp_*_tool_export_setup): new callback which adds a toggle to
	the file choosers that allows to export to the old format.
	Default saving the new format, we defaulted to the old one before.

	(gimp_*_tool_settings_export): check the "export_old_format"
	boolean and only save the cruft format if it is TRUE; chain up
	otherwise, which generically saves the new format.

	* app/tools/gimplevelstool.c (gimp_levels_tool_settings_import):
	add the same file format detection code as in the curves tool
	so it transparently loads old and new levels files.


svn path=/trunk/; revision=27194
2008-10-09 15:25:59 +00:00
Sven Neumann ecccddd372 use GIMP_MINOR_VERSION to determine the version to migrate from.
2008-10-09  Sven Neumann  <sven@sven>

	* app/core/gimp-user-install.c (gimp_user_install_detect_old):
	use GIMP_MINOR_VERSION to determine the version to migrate from.


svn path=/trunk/; revision=27192
2008-10-09 13:24:50 +00:00
Michael Natterer 97b8f51049 when saving a curve of type GIMP_CURVE_FREE, don't use
2008-10-09  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpcurvesconfig.c (gimp_curves_config_save_cruft):
	when saving a curve of type GIMP_CURVE_FREE, don't use
	gimp_curve_get_point() because that returns nothing for free
	curves.

	(gimp_curves_config_load_cruft): reset the curve before loading it.

	* app/core/gimpcurve.c (gimp_curve_get_point): instead of above
	mentioned uninitialized nonsense, at least return -1,-1 for free
	curves.


svn path=/trunk/; revision=27190
2008-10-09 09:44:08 +00:00
Michael Natterer 62e7dcc640 reorder sections consistently. Remove redundant CFLAGS.
2008-10-07  Michael Natterer  <mitch@gimp.org>

	* app/*/Makefile.am: reorder sections consistently. Remove
	redundant CFLAGS.


svn path=/trunk/; revision=27163
2008-10-07 11:58:14 +00:00
Michael Natterer 90db7d443c paranoia fix for hypothetical but harmful misbehavior: when setting the
2008-10-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_real_set_display): paranoia
	fix for hypothetical but harmful misbehavior: when setting the
	display from !=NULL to NULL, also set the image to NULL instead of
	relying on whatever obscure implicit behavior of other parts of
	GIMP which set a new display right away or make sure the image
	goes away together with the display.


svn path=/trunk/; revision=27145
2008-10-06 19:54:42 +00:00
Michael Natterer eed8f2c326 g_return_if_fail() on the mask's image being the same as the layer's
2008-10-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c (gimp_layer_add_mask): g_return_if_fail()
	on the mask's image being the same as the layer's image. The PDB
	already checks for this.

	* app/core/gimpimage.c (gimp_image_add_layer,channel,vectors):
	remove calls to gimp_item_set_image() because we only accept
	itmes of this image anyway.


svn path=/trunk/; revision=27138
2008-10-06 09:26:44 +00:00
Michael Natterer 9a720b654f some formatting cleanups.
2008-10-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-contiguous-region.c: some formatting cleanups.

	(find_contiguous_segment): changed to return gboolean not gint.


svn path=/trunk/; revision=27134
2008-10-05 13:54:36 +00:00
Hans Breuer d94419a9fd updated include <string.h> for memcmp() include <string.h> for strcmp()
2008-10-03  Hans Breuer  <hans@breuer.org>

	* **/makefie.msc gimpdefs.msc app/gimpcore.def : updated
	* app/core/gimpcurve.c : include <string.h> for memcmp()
	* app/gegl/gimpcurvesconfig.c : include <string.h> for strcmp()

svn path=/trunk/; revision=27118
2008-10-03 19:27:54 +00:00
Michael Natterer 6865bb9e2b Bug 546924 – "New Image" misscalculating dimensions for non-pixel sized
2008-09-30  Michael Natterer  <mitch@gimp.org>

	Bug 546924 – "New Image" misscalculating dimensions for non-pixel
	sized templates

	* app/core/gimptemplate.h: added private param flag
	GIMP_TEMPLATE_PARAM_COPY_FIRST.

	* app/core/gimptemplate.c (gimp_template_class_init): set the flag
	on the resolution properties.

	* app/dialogs/image-new-dialog.c (image_new_template_changed):
	make sure the resolution properties are copied first.

	* libgimpconfig/gimpconfig-utils.c (gimp_config_sync): remove
	comment about fixing the template editor. That's not true any
	more.


svn path=/trunk/; revision=27091
2008-09-30 16:06:24 +00:00
Michael Natterer 8938cca43f no need to memcpy() the arrays, they are properly copied by
2008-09-29  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.c (gimp_curve_copy): no need to memcpy() the
	arrays, they are properly copied by gimp_config_sync() now. Add
	call to gimp_data_dirty() so GimpCurvesConfig gets notified.

	* app/gegl/gimpcurvesconfig.c (gimp_curves_config_set_property):
	use gimp_config_copy() instead of copying the curve menually.


svn path=/trunk/; revision=27076
2008-09-29 12:33:58 +00:00
Sven Neumann 95cd081d13 added a 'restored' flag to the Gimp object and set it in
2008-09-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimp.[ch]: added a 'restored' flag to the Gimp object
	and set it in gimp_real_restore(). Added method 
gimp_is_restored().

	* app/gui/gui.c: call gui_unique_init() in gui_init() instead of
	that later in gui_restore_after_callback(). By doing so we start
	our DBus service (or message proxy window on Win32) much earlier
	in the start process, thus reducing the time frame where two
	instances of gimp can be launched.

	* app/gui/gui-unique.c
	* app/gui/gimpdbusservice.c: wait handling the queued file-open
	requests until gimp is fully restored.

	* app/gui/splash.c (splash_update): only run one iteration of 
the
	main loop. Doing it in a while loop can cause us to get stuck if
	the gimp-unique service already added an idle handler.


svn path=/trunk/; revision=27049
2008-09-25 08:56:58 +00:00
Simon Budig 4372c0754b whitespace fix
2008-09-20  Simon Budig  <simon@gimp.org>

	* app/core/gimpcurve.c: whitespace fix

	* app/gegl/gimplevelsconfig.c: make sure that the points set by
	default gets unset before calculating the levels->curves
	transition. We don't want stray points in the corners.


svn path=/trunk/; revision=27018
2008-09-19 22:41:58 +00:00
Sven Neumann c6be62a797 app/core/gimpcurve.c (gimp_curve_plot) formatting.
2008-09-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcurve.c (gimp_curve_plot)
	* app/gegl/gimplevelsconfig.c 
(gimp_levels_config_to_curves_config):
	formatting.


svn path=/trunk/; revision=27002
2008-09-18 21:55:28 +00:00
Simon Budig 1f788a5af2 comment fix
2008-09-18  Simon Budig  <simon@gimp.org>

	* app/core/gimpcurve.c: comment fix

	* app/gegl/gimplevelsconfig.c: improve the levels->curves
	transition. Not perfect, the result does not match a "real"
	gamma correction, especially in the dark areas, where the
	curves are too dark compared to the levels.


svn path=/trunk/; revision=27001
2008-09-18 19:48:04 +00:00
Sven Neumann d9a2d8242e no need to check if the drawable is attached as shadow tiles are per
2008-09-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-shadow.c 
(gimp_drawable_get_shadow_tiles):
	no need to check if the drawable is attached as shadow tiles are
	per drawable now.


svn path=/trunk/; revision=26986
2008-09-17 23:26:02 +00:00
Michael Natterer 68c21b49e9 Revert the change which adds GError parameters to
2008-09-17  Michael Natterer  <mitch@gimp.org>

	Revert the change which adds GError parameters to
	gimp_image_add_{channel,layer,vectors}():

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage.[ch]
	* app/core/gimplayer-floating-sel.c
	* app/core/gimpselection.c
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.[ch]
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c: revert.

	Instead, fix it at the PDB level:

	* app/core/gimpimage.c: turn the "added to wrong image" warning
	into a g_return_val_if_fail() assertion.

	* app/pdb/gimppdb-utils.[ch] (gimp_pdb_item_is_floating): add a
	"dest_image" parameter and fail if the passed item is not for this
	image.

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paths.pdb: pass the dest image to
	gimp_pdb_item_is_floating().

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


svn path=/trunk/; revision=26970
2008-09-17 11:41:54 +00:00
Michael Natterer b0dab70de8 add GError parameter to gimp_image_add_{channel,layer,vectors}() and
2008-09-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add GError parameter to
	gimp_image_add_{channel,layer,vectors}() and remove calls to
	g_warning(). Changed checks to be possible failures at all.

	* app/widgets/gimpitemtreeview.h (GimpAddItemFunc): add the GError
	here too.

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimpselection.c
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c: pass a NULL error.

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/paths.pdb: pass the error.

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


svn path=/trunk/; revision=26963
2008-09-17 08:27:35 +00:00
Sven Neumann b2ad06a19f added GError parameter to gimp_image_{raise,lower}_{channel,layer,vectors}
2008-09-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added GError parameter to
	gimp_image_{raise,lower}_{channel,layer,vectors} functions and
	removed calls to g_message().

	* app/actions/channels-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c: pass NULL for the GError
	parameter as these actions are insensitive if they would fail.

	* tools/pdbgen/pdb/image.pdb: changed accordingly. Corrected the
	documentation.

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


svn path=/trunk/; revision=26953
2008-09-16 20:56:41 +00:00
Sven Neumann db7c35373d unified error messages.
2008-09-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-load.c (gimp_palette_load): unified error
	messages.


svn path=/trunk/; revision=26952
2008-09-16 20:25:15 +00:00
Michael Natterer d2307c1bf6 add GError parameter and replace g_message() by g_set_error().
2008-09-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.[ch] (gimp_layer_add_mask): add GError
	parameter and replace g_message() by g_set_error().

	* app/core/gimplayermaskundo.c
	* app/xcf/xcf-load.c
	* app/actions/layers-commands.c: pass NULL errors since these
	places know what they are doing. Ha ha...

	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/image.pdb: pass the error so we get more real
	error messages for failed PDB calls.

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


svn path=/trunk/; revision=26948
2008-09-15 21:05:01 +00:00
Michael Natterer c985f2e2a5 changed GimpBrush::get_extension() to return const gchar* instead of
2008-09-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdata.h: changed GimpBrush::get_extension() to return
	const gchar* instead of gchar*

	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpcurve.c
	* app/core/gimpgradient.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c: changed accordingly.


svn path=/trunk/; revision=26935
2008-09-12 10:35:35 +00:00
Michael Natterer af9817b466 make a string pointer const.
2008-09-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-modules.c (gimp_modules_unload): make a string
	pointer const.


svn path=/trunk/; revision=26927
2008-09-11 17:19:07 +00:00
Martin Nordholts 0cc59223c1 Bug 551141 – "Select all" does not work
* app/core/gimpchannel.c (gimp_channel_real_all): We don't want to
clear the region, we want to fill it with OPAQUE_OPACITY.

svn path=/trunk/; revision=26891
2008-09-07 06:47:17 +00:00
Sven Neumann a5f8345609 added clear_region().
2008-09-01  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]: added clear_region().

	* app/base/tile-manager-crop.c
	* app/core/gimpchannel.c
	* app/core/gimpimage-merge.c
	* app/core/gimpmaskundo.c
	* app/core/gimpprojection-construct.c: use it instead of calling
	color_region() with a zero color.



svn path=/trunk/; revision=26826
2008-09-01 20:44:00 +00:00
Sven Neumann 88955a3118 also need to initialize the projection if the layer mask could introduce
2008-09-01  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection-construct.c 
(gimp_projection_initialize):
	also need to initialize the projection if the layer mask could
	introduce transparency. Fixes bug #550024.


svn path=/trunk/; revision=26824
2008-09-01 20:24:59 +00:00
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
William Skaggs 2ba3e595bc Bill Skaggs <weskaggs@primate.udavis.edu>
committing patch by Simon Budig to give an indication
	when working on a layer mask, updated to fix staleness
	and respond to "edit-changed".  Might fix bug #132204.
	
	* app/core/core-enums.[ch]: add GIMP_SELECTION_LAYER_ON.

	* app/core/gimplayermask.c: add handler for "edit-changed".

	* app/core/gimpcanvas.[ch]:  add new style
	GIMP_CANVAS_STYLE_LAYER_MASK_ACTIVE.

	* app/display/gimpdisplayshell-selection.c: use new style
	when layer mask is active.

svn path=/trunk/; revision=24520
2008-01-03 21:53:34 +00:00
Michael Natterer 8e638b0b97 quite some cleanup (use GeglRectangle more globally and don't leave stuff
2008-01-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagemap.c: quite some cleanup (use GeglRectangle
	more globally and don't leave stuff around if we abort for
	whatever reason).


svn path=/trunk/; revision=24516
2008-01-03 19:28:33 +00:00
Michael Natterer 697cc82af7 Some more gegl code to have some playground for experimenting.
2008-01-03  Michael Natterer  <mitch@gimp.org>

	Some more gegl code to have some playground for experimenting.

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h
	* app/gegl/gimpoperationdesaturate.[ch]: ported desaturate.

	* app/gegl/gimp-gegl.c: register it.

	* app/gegl/gimpoperationtilesink.h: fix name of parent class member.

	* app/core/gimpdrawable-desaturate.c: use the new operator, but
	keep the old code around (prepared for runtime switching).

	* app/core/gimpdrawable-invert.c: prepare for runtime switching
	here too.


svn path=/trunk/; revision=24514
2008-01-03 18:54:58 +00:00
Michael Natterer 88b021c024 app/core/Makefile.am new files containing gimp_drawable_apply_operation()
2008-01-02  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpdrawable-operation.[ch]: new files containing
	gimp_drawable_apply_operation() which applies a gegl operation
	to a drawable's selected pixels using shadow tiles. Will soon
	be used in more places than just invert.

	* app/core/gimpdrawable-invert.c: use it here, makes
	gimp_drawable_invert() a 3-liner.


svn path=/trunk/; revision=24506
2008-01-02 20:16:11 +00:00
Sven Neumann cd270aac4c added new function gimp_bpp_to_babl_format_linear().
2007-12-30  Sven Neumann  <sven@gimp.org>

	* app/gegl/gimp-gegl-utils.[ch]: added new function
	gimp_bpp_to_babl_format_linear().

	* app/gegl/gimpoperationtilesink.[ch]
	* app/gegl/gimpoperationtilesource.[ch]: added boolean property 
to
	toggle between linear and gamma-corrected data.

	* app/core/gimpdrawable-invert.c: assume linear data to be 
closer
	to the original definition of the invert operation in GIMP.
	Enable the GEGL code path per default.


svn path=/trunk/; revision=24491
2007-12-30 19:14:27 +00:00
Sven Neumann cfe312bc5e moved processing in the GEGL code path back to the main loop.
2007-12-30  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-invert.c (gimp_drawable_invert): moved
	processing in the GEGL code path back to the main loop.


svn path=/trunk/; revision=24490
2007-12-30 17:58:15 +00:00
Michael Natterer d6ab4d19bd First actual image processing with GEGL! Wheeeee :-)
2007-12-30  Michael Natterer  <mitch@gimp.org>

	First actual image processing with GEGL! Wheeeee :-)

	* app/core/gimpimagemap.[ch]: added code to use gegl instead of the
	old apply_func and apply_data.

	(gimp_image_map_new): add GeglNode parameter that, if passed,
	switches the whole thing to using a gegl graph with this node
	as central processing node.

	* app/tools/gimpimagemaptool.[ch]: add virtual function
	get_operation() which, if implemented, returns a GeglNode to pass
	to gimp_image_map_new(). Added a "Use GEGL" toggle so we can
	switch between legacy and gegl code for the migration period.

	* app/tools/gimpbrightnesscontrasttool.[ch]: implement
	get_operation() and return a brightness-contrast node.

	(gimp_briughtness_contrast_tool_map): set the node's properties
	from the GUI.


svn path=/trunk/; revision=24488
2007-12-30 17:47:37 +00:00
Øyvind Kolås 7942708dd2 fixup due to mixup when using scripts for commiting and not paying good enough attention
svn path=/trunk/; revision=24485
2007-12-30 16:00:36 +00:00
Øyvind Kolås e84e383caa added GEGL_CFLAGS. added an alternate GEGL code path that can be enabled
* app/core/Makefile.am: added GEGL_CFLAGS.
* app/core/gimpdrawable-invert.c: added an alternate GEGL code path
that can be enabled by uncommenting ENABLE_GEGL in the file.

svn path=/trunk/; revision=24483
2007-12-30 15:58:47 +00:00
Øyvind Kolås c4195b95f3 added GEGL_CFLAGS. added an alternate GEGL code path that can be enabled
* app/core/Makefile.am: added GEGL_CFLAGS.
* app/core/gimpdrawable-invert.c: added an alternate GEGL code path
that can be enabled by uncommenting ENABLE_GEGL in the file.

svn path=/trunk/; revision=24482
2007-12-30 15:39:35 +00:00
Sven Neumann ff768c5261 let gimp_drawable_invert() take a GimpProgress parameter.
2007-12-30  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-invert.[ch]: let gimp_drawable_invert()
	take a GimpProgress parameter.

	* tools/pdbgen/pdb/color.pdb
	* app/pdb/color_cmds.c
	* app/actions/drawable-commands.c: changed accordingly.


svn path=/trunk/; revision=24473
2007-12-29 23:04:37 +00:00