Gimp/app
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
..
actions Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
base use a GMutex instead of a GStaticMutex as the latter needs API that causes 2008-10-08 07:33:29 +00:00
composite removed trailing whitespace 2008-09-04 08:37:32 +00:00
config reorder sections consistently. Remove redundant CFLAGS. 2008-10-07 11:58:14 +00:00
core Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
dialogs data/images/Makefile.am added 128x128 version of wilber-devel.png. 2008-10-09 19:16:54 +00:00
display Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
file reorder sections consistently. Remove redundant CFLAGS. 2008-10-07 11:58:14 +00:00
gegl when saving a curve of type GIMP_CURVE_FREE, don't use 2008-10-09 09:44:08 +00:00
gui updated include <string.h> for memcmp() include <string.h> for strcmp() 2008-10-03 19:27:54 +00:00
menus reorder sections consistently. Remove redundant CFLAGS. 2008-10-07 11:58:14 +00:00
paint reorder sections consistently. Remove redundant CFLAGS. 2008-10-07 11:58:14 +00:00
paint-funcs reorder sections consistently. Remove redundant CFLAGS. 2008-10-07 11:58:14 +00:00
pdb Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
plug-in reorder sections consistently. Remove redundant CFLAGS. 2008-10-07 11:58:14 +00:00
text Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
tools Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
vectors Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
widgets Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
xcf Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
about.h updated copyright. 2008-01-24 17:07:51 +00:00
app.c Drop duplicated #include <gegl.h>. 2008-07-11 16:47:35 +00:00
app.h
batch.c app/app.c app/batch.c app/core/gimp.c use G_STRLOC instead of hardcoding 2008-02-19 13:38:24 +00:00
batch.h
errors.c
errors.h
fileicon.ico
gimp-intl.h
gimp-log.c Applied 'gimp-decimate.diff' as announced on the mailing-list: 2008-09-07 21:13:09 +00:00
gimp-log.h Applied 'gimp-decimate.diff' as announced on the mailing-list: 2008-09-07 21:13:09 +00:00
gimp.rc
gimpcore.def updated include <string.h> for memcmp() include <string.h> for strcmp() 2008-10-03 19:27:54 +00:00
main.c Code built by the still unstable mingw-w64 toolchain gets bogus argc and 2008-08-07 15:45:33 +00:00
Makefile.am app/Makefile.am change 2.6 to 2.7 here too. 2008-10-09 08:28:39 +00:00
makefile.msc updated include <string.h> for memcmp() include <string.h> for strcmp() 2008-10-03 19:27:54 +00:00
sanity.c INSTALL configure.in (gegl_required_version) depend on the newest released 2008-06-14 18:30:11 +00:00
sanity.h
unique.c app/widgets/Makefile.am app/widgets/gimpdbusservice.[ch] removed here ... 2008-07-13 19:49:32 +00:00
unique.h moved some common code back to main.c 2008-07-11 09:16:23 +00:00
units.c
units.h
version.c tweaked verbose version output. 2008-04-07 19:33:24 +00:00
version.h New files. Rename gimp_show_version() to gimp_version_show() and move 2008-02-26 14:02:44 +00:00
wilber.ico