gimp/app/actions
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
actions-types.h Add keyboard shortcut support for reseting to default value of e.g. brush 2008-05-31 20:05:03 +00:00
actions.c Move the "Use GEGL" check-box to the Colors menu (bug #548760): 2008-09-23 07:02:24 +00:00
actions.h Add keyboard shortcut support for reseting to default value of e.g. brush 2008-05-31 20:05:03 +00:00
brush-editor-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
brush-editor-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
brushes-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
brushes-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
buffers-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
buffers-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
buffers-commands.c renamed gimp_image_active_drawable() to gimp_image_get_active_drawable(). 2007-07-19 14:59:51 +00:00
buffers-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
channels-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
channels-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
channels-commands.c Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
channels-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
colormap-actions.c app/actions/channels-commands.c app/actions/colormap-actions.c 2007-12-25 16:21:40 +00:00
colormap-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
colormap-commands.c app/actions/channels-commands.c app/actions/colormap-actions.c 2007-12-25 16:21:40 +00:00
colormap-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
config-actions.c simplified 2008-09-23 07:15:37 +00:00
config-actions.h Move the "Use GEGL" check-box to the Colors menu (bug #548760): 2008-09-23 07:02:24 +00:00
config-commands.c Move the "Use GEGL" check-box to the Colors menu (bug #548760): 2008-09-23 07:02:24 +00:00
config-commands.h Move the "Use GEGL" check-box to the Colors menu (bug #548760): 2008-09-23 07:02:24 +00:00
context-actions.c made action labels more consistent, use '°' instead of 'degrees'. 2008-09-10 10:01:54 +00:00
context-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
context-commands.c made action labels more consistent, use '°' instead of 'degrees'. 2008-09-10 10:01:54 +00:00
context-commands.h app/actions/context-actions.c applied modified patch from David Gowers 2006-12-14 12:14:33 +00:00
cursor-info-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
cursor-info-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
cursor-info-commands.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
cursor-info-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
data-commands.c app/actions/data-commands.c app/actions/debug-commands.c 2008-03-12 16:58:28 +00:00
data-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
data-editor-commands.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
data-editor-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
debug-actions.c Move the "Use GEGL" check-box to the Colors menu (bug #548760): 2008-09-23 07:02:24 +00:00
debug-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
debug-commands.c Move the "Use GEGL" check-box to the Colors menu (bug #548760): 2008-09-23 07:02:24 +00:00
debug-commands.h Move the "Use GEGL" check-box to the Colors menu (bug #548760): 2008-09-23 07:02:24 +00:00
dialogs-actions.c use the "tool options" icon for the "context" action group since that's 2008-09-16 08:38:09 +00:00
dialogs-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
dialogs-commands.c Implement the presistent menu of recently closed docks, still somewhat 2008-05-16 16:06:42 +00:00
dialogs-commands.h Implement the presistent menu of recently closed docks, still somewhat 2008-05-16 16:06:42 +00:00
dock-actions.c removed default keyboard shortcut for "dock-close". 2008-04-25 06:08:39 +00:00
dock-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
dock-commands.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
dock-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
dockable-actions.c app/widgets/Makefile.am app/widgets/gimptoggleaction.[ch] added new action 2008-05-20 09:51:04 +00:00
dockable-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
dockable-commands.c app/widgets/gimpdockable.[ch] added a "locked" propery to GimpDockable. A 2008-05-19 21:11:03 +00:00
dockable-commands.h app/widgets/gimpdockable.[ch] added a "locked" propery to GimpDockable. A 2008-05-19 21:11:03 +00:00
documents-actions.c app/widgets/gimpaction.c app/widgets/gimpdockable.c 2008-08-22 08:57:11 +00:00
documents-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
documents-commands.c only fiddle with GtkRecentManager when "save-document-history" is enabled. 2008-03-24 23:03:23 +00:00
documents-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
drawable-actions.c Add Desaturate as an image-map tool with live preview (bug #533808): 2008-05-21 13:11:06 +00:00
drawable-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
drawable-commands.c Add Desaturate as an image-map tool with live preview (bug #533808): 2008-05-21 13:11:06 +00:00
drawable-commands.h Add Desaturate as an image-map tool with live preview (bug #533808): 2008-05-21 13:11:06 +00:00
edit-actions.c formatting. 2008-09-17 21:54:53 +00:00
edit-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
edit-commands.c Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
edit-commands.h app/actions/edit-commands.[ch] added new action "edit-paste-as-new-layer". 2008-08-07 16:25:46 +00:00
error-console-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
error-console-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
error-console-commands.c app/actions/error-console-commands.c app/actions/gradients-commands.c 2007-02-02 07:50:36 +00:00
error-console-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
file-actions.c Allow to "Open as Layers" in the empty display: 2008-10-05 15:21:02 +00:00
file-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
file-commands.c Allow to "Open as Layers" in the empty display: 2008-10-05 15:21:02 +00:00
file-commands.h app/actions/file-actions.c renamed file_last_opened_cmd_callaback() to 2008-03-25 09:33:28 +00:00
fonts-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
fonts-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
fonts-commands.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
fonts-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
gradient-editor-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
gradient-editor-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
gradient-editor-commands.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
gradient-editor-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
gradients-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
gradients-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
gradients-commands.c app/actions/error-console-commands.c app/actions/gradients-commands.c 2007-02-02 07:50:36 +00:00
gradients-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
help-actions.c app/actions/dialogs-actions.c app/actions/dock-actions.c 2007-03-31 11:38:47 +00:00
help-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
help-commands.c app/core/gimp-gui.[ch] app/widgets/gimphelp.[ch] app/gui/gui-vtable.c 2008-06-10 09:54:54 +00:00
help-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
image-actions.c add "File/New" submenu and an "Acquire" placeholder inside it. Removed 2008-04-09 10:48:01 +00:00
image-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
image-commands.c remove "image-new-from-image" action. 2008-03-25 10:31:47 +00:00
image-commands.h remove "image-new-from-image" action. 2008-03-25 10:31:47 +00:00
images-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
images-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
images-commands.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
images-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
layers-actions.c added mnemonic to the new action. 2008-08-07 21:12:08 +00:00
layers-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
layers-commands.c Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
layers-commands.h app/actions/layers-actions.c added new action "layers-new-from-visible". 2008-08-07 15:53:15 +00:00
makefile.msc updated include <string.h> for memcmp() include <string.h> for strcmp() 2008-10-03 19:27:54 +00:00
palette-editor-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
palette-editor-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
palette-editor-commands.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
palette-editor-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
palettes-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
palettes-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
palettes-commands.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
palettes-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
patterns-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
patterns-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
plug-in-actions.c try to use the menu label with ellipsis instead of the result of 2008-09-19 06:43:37 +00:00
plug-in-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
plug-in-commands.c use GError for error reporting in PDB invoker methods. 2007-12-02 18:05:54 +00:00
plug-in-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
quick-mask-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
quick-mask-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
quick-mask-commands.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
quick-mask-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
sample-points-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
sample-points-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
sample-points-commands.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
sample-points-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
select-actions.c renamed gimp_image_active_drawable() to gimp_image_get_active_drawable(). 2007-07-19 14:59:51 +00:00
select-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
select-commands.c app/actions/image-commands.c app/actions/select-commands.c 2007-12-26 17:33:41 +00:00
select-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
templates-actions.c app/actions/templates-actions.c when creating an image from a template, 2008-04-07 13:38:52 +00:00
templates-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
templates-commands.c app/actions/templates-actions.c when creating an image from a template, 2008-04-07 13:38:52 +00:00
templates-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
text-editor-actions.c In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
text-editor-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
text-editor-commands.c app/actions/error-console-commands.c app/actions/gradients-commands.c 2007-02-02 07:50:36 +00:00
text-editor-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
tool-options-actions.c app/core/Makefile.am app/core/core-types.h added GimpToolPresets, derived 2006-12-10 19:13:58 +00:00
tool-options-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
tool-options-commands.c Only care about GIMP_CONFIG_PARAM_SERIALIZE properties, fixes bug #498948. 2007-12-05 20:41:53 +00:00
tool-options-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
tools-actions.c added a comment to explain how tools-value-1 and tools-value-2 are being 2008-06-02 19:20:10 +00:00
tools-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
tools-commands.c simply call gimp_enum_action_selected() instead of poking around in the 2008-06-28 11:50:29 +00:00
tools-commands.h app/actions/tools-actions.c app/actions/tools-commands.[ch] allow to 2008-03-06 17:13:59 +00:00
vectors-actions.c app/actions/dialogs-actions.c app/actions/dock-actions.c 2007-03-31 11:38:47 +00:00
vectors-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
vectors-commands.c Remove the last code duplication from the undo system (or if not the last 2008-10-09 19:40:41 +00:00
vectors-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
view-actions.c app/actions/layers-commands.c app/actions/view-actions.c 2008-06-28 15:12:13 +00:00
view-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
view-commands.c Bug 553534 – centering issues after image scaling and setting zoom 2008-10-02 14:53:35 +00:00
view-commands.h Bill Skaggs <weskaggs@primate.ucdavis.edu> 2007-12-16 02:06:15 +00:00
window-actions.c app/actions/dialogs-actions.c app/actions/dock-actions.c 2007-03-31 11:38:47 +00:00
window-actions.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
window-commands.c specify alternative button order. 2007-10-09 13:30:36 +00:00
window-commands.h In all files, changed the standard copyright notice to say "GIMP - The GNU 2006-12-09 21:33:38 +00:00
windows-actions.c don't set a help ID on the display menu items. 2008-09-21 18:53:14 +00:00
windows-actions.h Start changing the "Dialogs" menu to "Windows", still incomplete. 2008-05-10 16:21:37 +00:00
windows-commands.c Implement the presistent menu of recently closed docks, still somewhat 2008-05-16 16:06:42 +00:00
windows-commands.h Implement the presistent menu of recently closed docks, still somewhat 2008-05-16 16:06:42 +00:00