gimp/app/pdb
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
..
Makefile.am reorder sections consistently. Remove redundant CFLAGS. 2008-10-07 11:58:14 +00:00
README Added another warning about autogenerated files 2001-01-21 22:28:16 +00:00
brush-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
brush-select-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
brushes-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
buffer-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
channel-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
color-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
context-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
convert-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
display-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
drawable-cmds.c gimp_drawable_mask_intersect() and gimp_drawable_mask_bounds() may only be 2008-09-17 22:52:06 +00:00
drawable-transform-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
edit-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
fileops-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
floating-sel-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
font-select-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
fonts-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
gimp-pdb-compat.c added mapping from GIMP_TYPE_COLOR_ARRAY to GIMP_PDB_COLORARRAY. 2008-07-14 14:41:20 +00:00
gimp-pdb-compat.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
gimppdb-query.c added GError arguments and reduce number of labels: to one by simply 2007-12-05 15:21:45 +00:00
gimppdb-query.h added GError arguments and reduce number of labels: to one by simply 2007-12-05 15:21:45 +00:00
gimppdb-utils.c Revert the change which adds GError parameters to 2008-09-17 11:41:54 +00:00
gimppdb-utils.h Revert the change which adds GError parameters to 2008-09-17 11:41:54 +00:00
gimppdb.c introduced a utility function to reduce code duplication. 2008-08-17 11:00:41 +00:00
gimppdb.h use GError for error reporting in PDB invoker methods. 2007-12-02 18:05:54 +00:00
gimppdberror.c use GError for error reporting in PDB invoker methods. 2007-12-02 18:05:54 +00:00
gimppdberror.h If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
gimpprocedure.c made the string parameters const. 2008-09-03 20:26:05 +00:00
gimpprocedure.h made the string parameters const. 2008-09-03 20:26:05 +00:00
gimprc-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
gradient-cmds.c Fix indentation in previous patch. 2008-08-23 13:18:13 +00:00
gradient-select-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
gradients-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
grid-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
guides-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
help-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
image-cmds.c Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
internal-procs.c tools/pdbgen/pdb/layer.pdb added new scale procedures that allow to 2008-09-24 08:28:16 +00:00
internal-procs.h forgot to move the generated header 2008-04-04 11:33:00 +00:00
layer-cmds.c tools/pdbgen/pdb/layer.pdb added new scale procedures that allow to 2008-09-24 08:28:16 +00:00
makefile.msc updated include <string.h> for memcmp() include <string.h> for strcmp() 2008-10-03 19:27:54 +00:00
message-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
misc-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
paint-tools-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
palette-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
palette-select-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
palettes-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
parasite-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
paths-cmds.c Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
pattern-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
pattern-select-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
patterns-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
pdb-types.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
plug-in-cmds.c Complements the fix for bug #344818: 2008-08-18 22:54:26 +00:00
procedural-db-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
progress-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
selection-cmds.c Update documentation, the layer does not need to have an alpha channel. A 2008-09-24 09:09:27 +00:00
selection-tools-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
text-layer-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
text-tool-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
transform-tools-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
undo-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
unit-cmds.c If a procedure call fails, pass a string describing the error as the 2008-08-16 13:57:57 +00:00
vectors-cmds.c pass error parameter to gimp_vectors_import functions. 2008-08-16 17:07:30 +00:00

README

This directory contains the PDB-wrappers for various internal
Gimp functions.

THESE FILES ARE AUTOGENERATED AND CHANGES HERE ARE USELESS!

If you need to change the code please have a look in ../../tools/pdbgen/pdb.