Instead of getting the floating selection from the image. Change
gimp_drawable_has_floating_sel() to get_floating_sel() and remove the
"floating_sel" parameter from gimp_drawable_deatch_floating_sel().
This cleanup is one more step towards sanitizing floating selections,
and makes the crash fix in the next commit much much simpler.
Make gimp_image_get_uri() and gimp_image_get_filename() behave as in
the GIMP 2.6 days. Add new functions gimp_image_get_xcf_uri(),
gimp_image_get_exported_uri() and gimp_image_get_imported_uri().
because we temporarily need them after removal from their item trees,
and bad things can happen if they are not kept alive by the undo stack
(like when undo is disabled while loading an image).
and implement it in GimpLayer to unset the removed flag on the layer
mask. Remove layer mask special casing from gimp_image_add_layer().
Make sure that all an item's children get their removed flag unset in
gimp_item_unset_removed().
- replace gimp_display_shell_selection_control() by undraw() and restart()
which actually say what they are doing
- remove enum GimpSelectionControl
- replace GimpImage::selection_control() by ::selection_invalidate()
because none of the other enum values was used any longer
which is the last bit of non-item drawing of stuff that is not
somehow the image itself... wheee!
This involves reverting commit
6bce0641d4 and adding back all the
vectors handlers that were in gimpdisplayshell-callbacks.c before.
Change the callbacks to manage proxy items for all the image's
vectors.
- Add signals GimpImage::guide_added(), removed() and moved()
- Remove singal GimpImage::update_guide()
- Adapt core code to emit the new signals instead of update_guide()
- Have the shell connect to the new signals and update guide canvas
items as needed
- Remove gimp_display_shell_draw_guides()
- Add GimpImage signal "sample-point-moved" and emit it when needed
- Let the shell connect to the sample point add, remove and move signals
and update the canvas items accordingly
- Remove gimp_display_shell_draw_sample_points()
This is needed so that the area covered by the vectors before the
change is exposed. Ideally of course the update signal should
include the changed area.
...just as we do for drawables. Connect to adding, removing, modifying
and toggling visibility of all vectors and emit "update-vectors"
accordingly. Add an update-vectors signal handler to GimpDisplayShell
and remove all other vectors handlers.
Description of undo actions should be marked as action descriptions,
and not as commands. This is required for translation for some
language (like Hebrew) that require a different grammatical tense for
describing actions
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.
- 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.
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().
This commit is basically just an exchange of the stack-keeping
objects and one big replacement of e.g. private->layers by
private->layers->container. Useful code will follow :)