2006-06-05 Sven Neumann <sven@gimp.org>
* app/paint-funcs/paint-funcs.[ch]
* app/core/gimpchannel.[ch]
* app/core/gimpselection.c:
* app/actions/select-commands.c: further cleaned up the patch
from
bug #88633.
2006-06-05 Michael Natterer <mitch@gimp.org>
Applied slightly modified patch from saulgoode which allows to
border a selection without feathering. Fixes bug #88633.
* app/paint-funcs/paint-funcs.[ch] (border_region): added boolean
"feather_border" parameter.
* app/core/gimpchannel.[ch]: GimpChannel::border(): ditto.
* app/core/gimpselection.c: changed accordingly.
* app/actions/select-commands.c: added a toggle to the border
dialog and pass it to gimp_channel_border().
* tools/pdbgen/pdb/selection.pdb: pass TRUE here.
* app/pdb/selection_cmds.c: regenerated.
2006-04-07 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable.[ch]: renamed gimp_drawable_cmap() to
gimp_drawable_get_colormap() and let it return a const array.
* app/core/gimpdrawable-convert.c
* app/core/gimpimage-convert.c
* app/core/gimpselection.c
* app/display/gimpdisplayshell-preview.c: changed accordingly.
2006-04-07 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable.[ch]: renamed gimp_drawable_data() to
gimp_drawable_get_tiles().
[lots of files]: changed accordingly.
2005-12-10 Michael Natterer <mitch@gimp.org>
* app/config/*.c
* app/core/*.c
* app/display/*.c
* app/text/*.c
* app/vectors/*.c: port to G_DEFINE_TYPE() and friends. Some related
core reordering and cleanup.
2005-08-09 Michael Natterer <mitch@gimp.org>
* app/paint-funcs/paint-funcs.[ch] (extract_from_inten_pixels)
(extract_from_indexed_pixels): pass src_bytes and dest_bytes to
these functions instead of just the source's bytes and whether it
has an alpha. Honor dest_bytes when extracting instead of crashing
by always asuming that the destination has alpha.
Fixes bug #312392.
(extract_from_region): removed has_alpha paramater. pass
src->bytes and dest->bytes to above functions.
* app/core/gimpselection.c (gimp_selection_extract): changed
accordingly.
2005-06-17 Sven Neumann <sven@gimp.org>
* app/core/gimpselection.c (gimp_selection_extract): fixed
long-standing bug in the calculation of the depth of the
tile-manager created when copying from an indexed drawable.
2005-06-10 Michael Natterer <mitch@gimp.org>
Fix bug #134304, as far as it's fixable:
* app/core/gimp-edit.c (gimp_edit_paste_as_new): handle pasting
buffers without alpha. Also don't uselessly convert all buffers
to RGB but create an image in the buffer's color space.
(gimp_edit_extract): call gimp_selection_extract() with
add_alpha = FALSE.
* app/core/gimpselection.c (gimp_selection_extract): set add_alpha
to TRUE if there is a selection, because the selection could have
any shape.
2004-10-22 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch]: added new enum GimpStrokeMethod which
can be one of { LIBART, PAINT_CORE }.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpstrokedesc.[ch]: new object which encapsulates
the params and setup logic for the different stroke methods.
* app/core/gimpitem.[ch]: use it in GimpItem::stroke() and
in the gimp_item_stroke() wrapper.
* app/core/gimpchannel.c (gimp_channel_stroke)
* app/core/gimpselection.c (gimp_selection_stroke)
* app/vectors/gimpvectors.c (gimp_vectors_stroke): changed accprdingly.
* app/actions/select-commands.c
* app/actions/vectors-commands.c
* app/dialogs/stroke-dialog.c
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/paths.pdb: use GimpStrokeDesc. Simplifies the
code quite a bit.
* app/pdb/edit_cmds.c
* app/pdb/paths_cmds.c: regenerated.
2004-10-20 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: added gimp_drawable_mask_intersect()
which returns the same bounding box as gimp_drawable_mask_bounds(),
but returns TRUE only if there is a non-empty intersection between
the drawable and the selection, or no selection at all. It also
returns the intersection as x,y,width,height instead of the
eeky x1,y1,x2,y2.
* app/core/gimp-edit.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-desaturate.c
* app/core/gimpdrawable-equalize.c
* app/core/gimpdrawable-histogram.c
* app/core/gimpdrawable-invert.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpimagemap.c
* app/core/gimpselection.c
* tools/pdbgen/pdb/color.pdb
* tools/pdbgen/pdb/transform_tools.pdb: either switch from
gimp_drawable_mask_bounds() to _intersect() or check the return
values of _mask_bounds() manually to avoid operations on empty
areas. Return successfully because it's a nop, not a failure.
Fixes bug #155733 for the core.
* app/pdb/color_cmds.c
* app/pdb/transform_tools_cmds.c: regenerated.
2004-09-22 Michael Natterer <mitch@gimp.org>
* app/widgets/gimplayertreeview.c
(gimp_layer_tree_view_floating_selection_changed): removed the
hack that was displaying "Floating Selection" instead of the
floating layer's real name.
* app/core/gimplayer.c: implement GimpViewable::get_description()
instead and special case floating selections with a two-line
text that contains "Floating Selection".
* app/core/gimplayer-floating-sel.c
* app/core/gimpimage-undo-push.c: emit "name_changed" on the layer
when it changes its state from floating to normal or vice versa
so the views can update accordingly.
* app/core/gimpselection.c: s/"Selection"/"Floated Layer"/.
* app/tools/gimpeditselectiontool.c:
s/"Floating Layer"/"Floating Selection"/.
2004-09-19 Sven Neumann <sven@gimp.org>
Try to make floating selections more obvious:
* app/widgets/gimplayertreeview.c
(gimp_layer_tree_view_floating_selection_changed): always display
"Floating Selection" as the name for a floating selection.
* app/core/gimpselection.c (gimp_selection_float): call the new
layer "Selection" instead of "Floating Selection". This is what
will be displayed if the FS is turned into a layer.
* app/actions/layers-commands.c (layers_edit_layer_query): don't
special case floating selections here.
* app/core/gimplayer-floating-sel.c: cosmetics.
2004-08-10 Michael Natterer <mitch@gimp.org>
Redid the whole internal progress stuff: don't pass around
progress_callback and progress_data; instead, provide a
pointer to a GimpProgressInterface which can be implemented
by a variety of backends.
Addresses (but not yet fixes) bugs #6010, #97266 and #135185.
* app/display/Makefile.am
* app/display/gimpprogress.[ch]: removed the old progress hack.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpprogress.[ch]: implement GimpProgressInterface.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpprogressdialog.[ch]: the standalone progress
dialog as widget implementing GimpProgressInterface.
* app/display/gimpdisplay.c
* app/display/gimpstatusbar.[ch]
* app/widgets/gimpfiledialog.[ch]
* app/widgets/gimpthumbbox.[ch]: added GimpProgressInterface
implementation to these classes.
* app/core/gimp-gui.[ch]
* app/gui/gui-vtable.c: replaced the old progress vtable entries
by two new to create and destroy a GimpProgressDialog in case
no other progress is available.
* app/pdb/procedural_db.[ch]
* app/plug-in/plug-in-run.[ch]
* tools/pdbgen/app.pl: pass a GimpProgress to all PDB wrappers and
all plug-ins.
* app/plug-in/plug-in.[ch]
* app/plug-in/plug-ins.c
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-progress.c: handle the case there the
plug-in was crated with a progress as well as the case where it
wasn't.
* app/app_procs.c
* app/batch.c
* app/xcf/xcf.c
* app/file/file-open.[ch]
* app/file/file-save.[ch]
* app/widgets/gimphelp.c
* app/widgets/gimpbrushselect.c
* app/widgets/gimpfontselect.c
* app/widgets/gimpgradientselect.c
* app/widgets/gimppaletteselect.c
* app/widgets/gimppatternselect.c: changed accordingly.
* app/core/gimpimagefile.[ch]
* app/display/gimpdisplayshell-dnd.c
* app/gui/file-open-dialog.c
* app/gui/file-open-location-dialog.c
* app/gui/file-save-dialog.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimptoolbox-dnd.c: pass a GimpProgress to all file
related functions. Embed the progress in the file dialog where
possible.
* app/core/gimpdrawable-blend.[ch]
* app/core/gimpdrawable-transform.[ch]
* app/core/gimpimage-convert.[ch]
* app/core/gimpimage-flip.[ch]
* app/core/gimpimage-resize.[ch]
* app/core/gimpimage-rotate.[ch]
* app/core/gimpimage-scale.[ch]
* app/core/gimpitem-linked.[ch]
* app/core/gimpitem.[ch]
* app/core/gimpchannel.c
* app/core/gimpdrawable.c
* app/core/gimplayer.c
* app/core/gimpselection.c
* app/vectors/gimpvectors.c: replaced callback/data by GimpProgress.
* app/tools/gimpblendtool.c
* app/tools/gimptransformtool.c
* app/gui/convert-dialog.c
* app/actions/documents-commands.c
* app/actions/file-commands.c
* app/actions/image-commands.c
* app/actions/layers-commands.c
* app/actions/plug-in-commands.c
* app/actions/vectors-commands.c
* tools/pdbgen/pdb/convert.pdb
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb: changed callers accordingly.
* app/pdb/*_cmds.c: regenerated.
2004-04-15 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added "const gchar *stroke_desc" to
the GimpItemClass struct and always push an undo group
around GimpItem::stroke().
* app/core/gimpchannel.c
* app/core/gimpselection.c
* app/vectors/gimpvectors.c: set the stroke_desc accordingly
and don't push undo groups.
* app/text/gimptextlayer.c (gimp_text_layer_class_init): set
all of GimpItemClass' undo_descs.
* app/text/gimptextlayer-transform.c: don't push undo groups here.
2004-04-15 Michael Natterer <mitch@gimp.org>
Context cleanup continued:
* app/core/gimpitem.[ch]: added context parameter to
GimpItem::stroke().
* app/core/gimpchannel.c (gimp_channel_stroke)
* app/vectors/gimpvectors.c (gimp_vectors_stroke): use it to get
default values from instead of gimp_get_user_context().
* app/core/gimpselection.c
* app/gui/stroke-dialog.c
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/paths.pdb: changed accordingly.
* app/pdb/edit_cmds.c
* app/pdb/paths_cmds.c: regenerated.
* app/plug-in/plug-in.[ch]: added GimpContext member to the PlugIn
struct. Added context parameter to plug_in_new(),
plug_in_call_query() and plug_in_call_init().
* app/plug-in/plug-in-run.[ch]: added context parameters to
plug_in_run() and plug_in_repeat().
* app/gui/plug-in-commands.c
* app/gui/vectors-commands.c
* app/pdb/procedural_db.c
* app/widgets/gimphelp.c: pass a context to plug_in_run() and
plug_in_repeat().
* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): call
procedures with the plug-in's context.
* app/plug-in/plug-ins.c: use a temporary context for running the
plug-ins' query() and init() functions. Use the same context for
running automatic extensions. This temporarily separates the main
Script-Fu extension from the user context (i.e. scripts have no
way of setting/getting the global FG, BG, brush etc.).
2004-04-13 Michael Natterer <mitch@gimp.org>
GimpItem undo group cleanup in preparation of fixing bug #138356:
* app/core/core-enums.[c]: renamed LAYER_SCALE and LAYER_RESIZE
undo groups to ITEM_SCALE and ITEM_RESIZE.
* app/core/gimpitem.[ch]: always push undo groups around
GimpItem::translate(), scale(), resize(), flip(), rotate() and
transform(). Added the resp. undo_desc strings to GimpItemClass.
* app/core/gimpchannel.[ch]
* app/core/gimpdrawable.[ch]
* app/core/gimplayer.c: removed all undo groups from
implementations of the above methods. Removed the undo_desc
strings which were moved to GimpItemClass.
* app/core/gimpimage-crop.c
* app/core/gimpselection.c
* app/gui/layers-commands.c
* app/vectors/gimpvectors.c
* tools/pdbgen/pdb/layer.pdb: changed accordingly.
* app/pdb/layer_cmds.c: regenerated.
2004-03-17 Sven Neumann <sven@gimp.org>
Changes for help i18n in the core, the rest will take place in the
help plug-in:
* app/text/gimptext.[ch]: removed gimp_text_get_default_language()
* app/core/gimp-utils.[ch]: ... and added it here as
gimp_get_default_language().
* app/config/gimprc-blurbs.h
* app/config/gimpdisplayconfig.[ch]: added property "help-locales".
* app/widgets/gimphelp.c: use the new property and pass it to the
help plug-in.
* app/core/gimpselection.c (gimp_selection_invalidate_boundary):
removed unused variable.
2004-01-26 Michael Natterer <mitch@gimp.org>
* plug-ins/script-fu/scripts/unsharp-mask.scm: add the layer to
the image before pasting to it. Fixes bug #132504.
Fixed the underlying problem: make it impossible to attach
floating selections to drawables which are not currently part of
the image's layer or channel stacks.
Also cleaned up image <-> floating_sel interaction:
* app/core/gimplayer-floating-sel.[ch] (floating_sel_attach):
added assertion that the drawable is part of the image (see below).
Don't call gimp_image_floating_selection_changed(), it's emitted
by gimp_image_add_layer() now.
(floating_sel_remove)
(floating_sel_anchor): don't emit "floating_selection_changed",
it's emitted by gimp_image_remove_layer() now.
(floating_sel_anchor): removed the fix for bug #132162 because
gimp_image_remove_layer() behaves correctly now (see below).
Renamed floating_sel_reset() to floating_sel_activate_drawable().
Added g_return_if_fail() all over the place.
* app/core/gimpimage.[ch]: added new function gimp_image_owns_item()
which return TRUE if the passed item is part of the image.
(gimp_image_add_layer): emit "floating_selection_changed" here if
needed.
(gimp_image_remove_layer): emit "floating_selection_changed" if
needed, don't try to activate a layer if we called
floating_sel_activate_drawable().
This is the real fix for bug #132162.
* app/core/gimpimage-undo-push.c (undo_pop_layer): apply the same
fixes as to gimp_image_add,remove_layer(). Don't call
gimp_drawable_invalidate_preview() on the previously active layer
because that's done by gimp_image_set_active_layer() now.
* app/xcf/xcf-load.c: remember the "floating_sel_drawable" in the
XcfInfo struct and attach it *after* all layers and channels are
loaded to avoid attaching the floating selection to an
out-of-image drawable.
* app/core/gimp-edit.c (gimp_edit_paste)
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_affine,
gimp_drawable_transform_flip, gimp_drawable_transform_rotate)
* app/core/gimpselection.c (gimp_selection_float)
* app/text/gimptext-compat.c (text_render): added checks for
gimp_image_owns_item() in all functions which can produce
floating selections.
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/floating_sel.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/text_tool.pdb
* tools/pdbgen/pdb/transform_tools.pdb: added checks for
gimp_item_owns_image() and return an execution error if invoked
with a drawable which is not part of the image.
* app/pdb/edit_cmds.c
* app/pdb/floating_sel_cmds.c
* app/pdb/selection_cmds.c
* app/pdb/text_tool_cmds.c
* app/pdb/transform_tools_cmds.c: regenerated.
2004-01-22 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added "gboolean use_default_values"
to GimpItem::stroke().
* app/core/gimpselection.c: changed accordingly.
* app/core/gimpchannel.c
* app/vectors/gimpvectors.c: if use_default_values is TRUE, don't
use the GimpPaintOptions passed in the GimpPaintInfo, but create a
new one.
* app/gui/stroke-dialog.c: pass FALSE so the values as set in the
tool options are used.
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/paths.pdb: pass TRUE so tool options settings
don't affect PDB stroke calls. Fixes part 2 of bug #132145.
* app/pdb/edit_cmds.c
* app/pdb/paths_cmds.c: regenerated.
2003-11-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpselection.c (gimp_selection_class_init): use
GIMP_STOCK_SELECTION as the viewable class' default stock ID.
* app/widgets/gimpselectioneditor.c (gimp_selection_editor_init):
create the preview for GIMP_TYPE_SELECTION, not just
GIMP_TYPE_DRAWABLE so the selection icon is used if the editor is
empty.
2003-10-06 Michael Natterer <mitch@gimp.org>
Treat changes to the selection like changes to any other drawable:
* app/core/gimpchannel.c
* app/core/gimpchannel-combine.c: call gimp_drawable_update() after
changing the channel.
* app/core/gimpimage.[ch]: added struct GimpImageFlushAccumulator
with one member "gboolean mask_changed". Connect to "update" of
the selection and set accum.mask_changed to TRUE in the callback.
Added default implementation for GimpImage::flush() and emit
"mask_changed" there.
Unrelated:
* app/core/gimpimage.h: removed GimpGuide struct...
* app/core/gimpimage-guides.h: ...and added it here.
* app/core/gimpimage-undo-push.c (undo_pop_mask)
(undo_pop_channel_mod): don't distinguish between selection and
non-selection channels and just call gimp_drawable_update().
* app/core/gimpundo.h
* app/core/gimpimage-undo.c: removed "gboolean mask_changed" from
the GimpUndoAccumulator struct since we don't have to care about
that signal explicitly any more.
* app/display/gimpdisplay-foreach.[ch]: removed gimp_displays_flush().
* tools/pdbgen/pdb/display.pdb (displays_flush_invoker): call
gimp_image_flush() on all images so the flush accumulator is
honored.
This generalization enables the removal of more special purpose
code which was needed to treat the selection different:
* app/core/gimpimage-mask-select.[ch]: removed...
* app/core/gimpchannel-select.[ch]: ...and added under a new name
because it's not selection specific any more.
* app/core/gimpimage-mask.[ch]: removed...
* app/core/gimpselection.[ch]: ...added the two remaining
functions here. Removed all calls to gimp_image_mask_changed().
* app/core/Makefile.am
* app/core/gimp-edit.c
* app/core/gimpdrawable-transform.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-snap.c
* app/display/gimpdisplayshell.c
* app/gui/channels-commands.c
* app/gui/layers-commands.c
* app/gui/select-commands.c
* app/gui/vectors-commands.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpellipseselecttool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimprectselecttool.c
* app/tools/gimptransformtool.c
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpvectorstreeview.c
* app/xcf/xcf-save.c
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/selection_tools.pdb: changed accordingly.
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpimage-colormap.c
* app/core/gimplayer-floating-sel.c
* app/core/gimplayer.c
* app/gui/image-menu.c
* app/paint/gimppaintcore.c
* app/tools/gimpcroptool.c
* app/tools/gimpinkoptions.c
* app/tools/gimpvectortool.c: removed useless and/or obsolete
#includes.
* app/pdb/display_cmds.c
* app/pdb/paths_cmds.c
* app/pdb/selection_cmds.c
* app/pdb/selection_tools_cmds.c: regenerated.
2003-09-26 Simon Budig <simon@gimp.org>
* app/core/gimpstrokeoptions.[ch]: New Object, holding the
Options for a Libart-Stroke.
* app/core/Makefile.am
* app/core/core-types.h: Changed accordingly.
* app/core/gimpitem.[ch]: Changed the Signature of
gimp_item_stroke to accept a GimpObject instead of a
GimpPaintInfo. This enables us to pass GimpStrokeOptions
to it. To be cleaned up for 2.2.
* app/core/gimpselection.c
* app/core/gimpchannel.c
* app/vectors/gimpvectors.c: Changed accordingly
* app/gui/edit-commands.c
* app/gui/vectors-commands.c
* app/pdb/edit_cmds.c
* app/pdb/paths_cmds.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpvectorstreeview.c: Fixed warnings by
casting the GimpPaintInfo to GimpObject.
2003-09-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.[ch]: removed gimp_channel_load().
* app/core/gimpimage-mask.[ch]: removed gimp_image_mask_load()
and _save().
* app/core/gimpselection.[ch]: added gimp_selection_load() and
_save() since these functions are specific to the selection.
* app/core/gimpimage-qmask.c
* app/gui/select-commands.c
* app/widgets/gimpselectioneditor.c
* tools/pdbgen/pdb/selection.pdb: changed accordingly.
* app/pdb/selection_cmds.c: regenerated.
2003-09-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.[ch]
* app/core/gimpselection.c: reordered GimpChannel::is_empty()
after GimpChannel::boudary() and GimpChannel::bounds() because it
belongs to that group of functions.
2003-09-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: added new pure virtual function
GimpDrawable::invalidate_boundary().
* app/core/gimplayer.[ch]: implement it and removed public
function gimp_layer_invalidate_boundary().
* app/core/gimpchannel.[ch]: implement it.
* app/core/gimpselection.[ch]: implement it and removed public
function gimp_selection_invalidate().
* app/core/gimpimage-mask.c (gimp_image_mask_invalidate)
* app/core/gimpimage-undo-push.c
* app/core/gimpimage.c
* app/core/gimplayer-floating-sel.c
* app/text/gimptextlayer.c: changed accordingly.
* app/core/gimpchannel.[ch]: made gimp_channel_push_undo() a
public function and made it call
gimp_drawable_invalidate_boundary(). Added undo_desc strings for
all undo pushing functions to GimpChannelClass.
* app/core/gimpselection.[ch]: removed gimp_selection_push_undo()
since after the change above it was identical to
gimp_channel_push_undo(). Don't push any undo here since
upchaining does the right thing now. Override GimpChannelClass'
undo_desc strings to say "Selection".
* app/core/gimpimage-mask.c (gimp_image_mask_push_undo): changed
accordingly.
2003-09-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask.[ch]: removed the feather(), sharpen(),
all(), invert(), border(), grow() and shrink() wrappers.
* app/core/gimpselection.[ch]: changed gimp_selection_invalidate()
and gimp_selection_push_undo() to take GimpChannel parameters, not
GimpSelection ones. They will be made virtual GimpChannel
functions anyway.
* app/core/gimpedit.c
* app/gui/select-commands.c
* app/widgets/gimpselectioneditor.c
* tools/pdbgen/pdb/selection.pdb: changed accordingly.
* app/pdb/selection_cmds.c: regenerated.
2003-09-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.[ch]: made all functions which push an
undo step virtual and added them all as default implementations.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpselection.[ch]: new object which is a GimpChannel
subclass and implements all of its virtual functions, pushes
an image_mask undo and chains up with "push_undo = FALSE".
* app/core/gimpimage-mask.[ch]: made most functions simple
wrappers like gimp_channel_invert(gimp_image_get_mask(gimage));
so the API stays the same for now.
* app/core/gimpimage.[ch]: create a GimpSelection object
as gimage->selection_mask. Removed "gboolean mask_stroking"
since it is in GimpSelection now.
* app/xcf/xcf-load.c (xcf_load_channel_props): added an evil hack
which turns a GimpChannel into a GimpSelection once we figured the
loaded channel is the selection.
* app/core/gimplayer.c (gimp_layer_create_mask):
gimp_channel_clear() takes an additional "const gchar *undo_desc"
parameter now.
* app/core/gimpscanconvert.c (gimp_scan_convert_to_channel): set
mask->bounds_known to FALSE before returning the new channel
* app/tools/gimpiscissorstool.c (iscissors_convert): no need to
call gimp_channel_invalidate_boundary() on the channel returned by
the above function.
* app/core/gimpchannel.[ch]: removed
gimp_channel_invalidate_boundary() since it is no longer needed.