Commit Graph

2857 Commits

Author SHA1 Message Date
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