2009-02-07 Michael Natterer <mitch@gimp.org>
Simplify floating selection handling a bit more:
* app/core/gimpdrawable.c
(gimp_drawable_attach_floating_sel)
(gimp_drawable_detach_floating_sel): call
gimp_image_set_floating_selection() from these functions.
* app/core/gimpfloatingselundo.c (gimp_floating_sel_undo_pop)
* app/core/gimpimage.c (gimp_image_add,remove_layer)
* app/core/gimplayer-floating-sel.c (floating_sel_to_layer): don't
call it here because we already call above functions.
svn path=/trunk/; revision=28000
2009-02-07 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.c
(gimp_drawable_attach_floating_sel)
(gimp_drawable_detach_floating_sel): call
gimp_drawable_invalidate_boundary(floating_sel). Fixes missing
selection update after turning a floating selection into a
layer. It's called redundantly now when adding or deleting a
floating selection, but that doesn't hurt much.
* app/core/gimpfloatingselundo.c (gimp_floating_sel_undo_pop):
don't call it here because we already call above functions.
svn path=/trunk/; revision=27999
2009-01-26 Michael Natterer <mitch@gimp.org>
The GEGL projection does floating selections now:
* app/core/gimpdrawable.[ch] (struct GimpDrawable): add a couple
of GeglNodes which are used to create a sub-graph for this
drawable's floating selection.
(gimp_drawable_detach_floating_sel)
(gimp_drawable_attach_floating_sel): new functions to call
whenever a floating selection gets attached or detached.
Change the role of the drawable's "source_node": it's no longer a
direct tile source but an arbitrary graph. Add new internal
function gimp_drawable_sync_source_node() which creates a
sub-graph for the floating selection within the source node, and
uses the new "tile_source_node" directly otherwise. Connect to
"notify" of the floating selection and reconfigure its sub-graph
when its properties change. This is also one more refactoring in
the direction of layer trees.
* app/core/gimpfloatingselundo.c
* app/core/gimpimage.c
* app/core/gimplayer-floating-sel.c: call the new attach/detach
API whenever a floating selection is attached or detached from a
drawable. This will need more refactoring i guess...
svn path=/trunk/; revision=27961
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-11-17 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer.[ch]: add boolean property
"floating-selection" which indicates if the layer is a floating
selection. Add new API gimp_layer_set_floating_sel_drawable()
which sets layer->fs.drawable and emits notify on the property.
Did some minor cleanup in the existing property code.
* app/core/gimpfloatingselundo.c: use the new function instead of
setting layer->fs.drawable manually.
* app/core/gimplayer-floating-sel.c: same here. Remove some
includes and local variables that are obsolete.
svn path=/trunk/; revision=27676
2008-11-14 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch] (struct GimpImageFlushAccumulator):
add member "gboolean floating_selection_changed".
(gimp_image_set_floating_selection): new function which sets
the image's floating_sel pointer and sets the flag in the
accumulator to TRUE for later signal emission on flush.
(gimp_image_projectable_flush): emit "floating-selection-changed"
if the flag in the accumulator is TRUE.
* app/core/gimpimage.c (gimp_image_add,remove_layer)
* app/core/gimpfloatingselundo.c (gimp_floating_sel_undo_pop)
* app/core/gimplayer-floating-sel.c (floating_sel_to_layer): use
gimp_image_set_floating_selection() instead of setting
image->floating_sel menually and remove all calls to
gimp_image_floating_selection_changed().
svn path=/trunk/; revision=27650
2008-11-09 Michael Natterer <mitch@gimp.org>
Bye bye floating_sel_rigor() and floating_sel_relax():
* app/core/gimpdrawable.[ch] (gimp_drawable_init_src_region):
implement compositing the floating selection on the fly. Add
return parameter "TileManager **temp_tiles" which returns the temp
buffer used for compositing; the caller has to unref the tiles.
* app/core/gimpchannel-project.c
* app/core/gimplayer-project.c: unref the temp_tiles.
* app/core/gimplayer.[ch]: remove members fs.backing_store and
fs.initial.
* app/core/gimplayer-floating-sel.[ch]: remove functions rigor(),
relax(), store() and restore(), they are not needed any longer.
Some minor cleanup, more to come.
* app/core/gimpprojection-construct.c: don't composite the
floating selection before projecting because that happens on the
fly now.
* app/core/core-enums.[ch]
* app/core/gimpfloatingselundo.c
* app/core/gimpimage-undo-push.[ch]: remove the rigor and relax
undos.
* app/core/gimpdrawable.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage.c
* app/core/gimplayer.c
* app/xcf/xcf-save.c: remove all calls to rigor and relax and all
implementations of virtual functions that were just there to
rigor/releax around chaining up.
* tools/pdbgen/pdb/floating_sel.pdb: remove all code from the
rigor and relax wrappers and deprecate the API.
* app/pdb/floating-sel-cmds.c
* libgimp/gimpfloatingsel_pdb.[ch]: regenerated.
* plug-ins/file-xjt/xjt.c: don't call rigor and relax.
svn path=/trunk/; revision=27579
2008-10-09 Michael Natterer <mitch@gimp.org>
Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
had a GEGL dependency (they will have in the next commit, but I
wanted to keep the commit separate).
* app/dialogs/Makefile.am
* app/file/Makefile.am
* app/gui/Makefile.am
* app/menus/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* app/text/Makefile.am
* app/vectors/Makefile.am
* app/widgets/Makefile.am
* app/xcf/Makefile.am: add GEGL_CFLAGS.
* app/actions/*.c
* app/core/*.c
* app/dialogs/*.c
* app/display/*.c
* app/file/*.c
* app/gui/*.c
* app/menus/*.c
* app/paint/*.c
* app/pdb/gimppdb-utils.c
* app/pdb/gimpprocedure.c
* app/plug-in/*.c
* app/text/*.c
* app/tools/*.c
* app/vectors/*.c
* app/widgets/*.c
* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
to all files which include a drawable subclass or gimpimage.h
* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
in all generated files.
* app/pdb/*-cmds.c: regenerated.
* data/images/gimp-splash.png: the goat is still sleeping.
By Aurore Derriennic.
svn path=/trunk/; revision=27202
2007-02-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpfloatingselundo.[ch]: implement GIMP_UNDO_FS_TO_LAYER.
* app/core/gimpimage-undo-push.c: use it. Also changed
gimp_image_undo_push_cantundo() to not pass a pop function to
gimp_image_undo_push().
svn path=/trunk/; revision=21844
2007-01-31 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpfloatingselundo.[ch]: new undo class for
GIMP_UNDO_FS_RIGOR and GIMP_UNDO_FS_RELAX.
* app/core/gimpimage-undo-push.c: use it here.
* app/core/gimpimageundo.c
* app/core/gimpdrawableundo.c: implement GimpObject::get_memsize()
instead of fiddling with undo->size.
svn path=/trunk/; revision=21826