Commit Graph

5 Commits

Author SHA1 Message Date
Michael Natterer 1b7d60cc87 Add gimp_item_tree_add_item() and gimp_item_tree_remove_item()
and use them from gimp_image_add,remove_layer,channel,vectors().
Removes quite some code duplication from the remove() functions but
almost none from add() because of the ongoing floating selection
madness. We need the calls to the item tree anyway because it's
going to ensure unique names of its items.
2010-02-07 11:47:33 +01:00
Michael Natterer 7bfd5dcf75 Merge the layer, channel and vectors reorder undo into one item undo
- get rid of the individual undo types and add GIMP_UNDO_ITEM_REORDER.
- replace the pushing functions by a single one.
- merge all the actual undo code into gimpitempropundo.[ch].
- use gimp_item_tree_reorder_item() to do the actual reordering.
- fix gimp_item_tree_reorder_item() to use an ordinary "push_undo"
  boolean again instead of a pointer to an undo function.

GimpVectorsPropUndo is now a completely empty skeleton. Keep it around
anyway, maybe we'll get vectors properties to undo soon.
2010-02-06 16:41:54 +01:00
Michael Natterer 25d39f2daa Add gimp_item_tree_reorder_item()
and remove the code duplication in gimp_image_reorder_layer(),
_channel() and _vectors(), which now consist of a single call to
gimp_item_tree_reorder_item().
2010-02-06 16:00:06 +01:00
Michael Natterer f551333cbe Add an "image" property to GimpItemTree 2010-02-06 13:49:09 +01:00
Michael Natterer d57f39df00 Add unused new class GimpItemTree which will keep the image's items
It will make sure all items in the tree have unique names,
will keep the active item, handle inserting, removing and
reordering and whatnot...
2010-02-06 13:00:03 +01:00