2008-11-13 Sven Neumann <sven@gimp.org>
* app/core/gimpimage.[ch]: added gimp_image_get_display_name().
* app/dialogs/palette-import-dialog.c
* app/display/gimpdisplayshell-close.c
* app/display/gimpdisplayshell-title.c
* app/pdb/gimppdb-utils.c
* app/widgets/gimpviewabledialog.c: use the new method instead
of
getting the image URI and mangling it with
file_utils_uri_display_basename().
svn path=/trunk/; revision=27637
2008-11-11 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.c: add read-only "offset-x" and "offset-y"
properties. Call gimp_item_set_offset() from all places that set
offset_x and offset_y in this file. Freeze and thaw GObject
notification around all calls to virtual functions which might
emit notify. Add missing notifications whenever width and height
change.
* app/core/gimpimage-rotate.c: use gimp_item_set_offset() instead
of setting the values manually.
svn path=/trunk/; revision=27623
2008-11-10 Michael Natterer <mitch@gimp.org>
* app/core/gimpprojection.[ch]
* app/core/gimpprojection-construct.c: add code that keeps the
gegl processor around across calls, but destroy it anyway until
gegl_processor_set_rectangle() is fixed.
svn path=/trunk/; revision=27607
2008-11-10 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-curves.c (gimp_drawable_curves_explicit):
use GIMP_CURVE_FREE, not _SMOOTH. Fixes the resp. PDB call.
svn path=/trunk/; revision=27601
2008-11-10 Sven Neumann <sven@gimp.org>
Bug 559725 – Allow to set image-type and image-num-layers for
thumbnail
* app/file/file-open.[ch] (file_open_thumbnail): added
parameters
for image-type and number of layers. Try to get these from the
procedure return values. Changes based on a patch from "tks".
* app/core/gimpimagefile.c (gimp_imagefile_create_thumbnail)
(gimp_thumbnail_set_info): set image-type and number of layers
if
specified.
svn path=/trunk/; revision=27595
2008-11-09 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer-floating-sel.[ch]: remove
floating_sel_remove() and reorder one function.
* app/core/gimpimage.c (gimp_image_remove_layer): add the single
line of special code that needs to be done when removing a
floating selection.
* app/core/gimpselection.c
* app/actions/layers-commands.c
* tools/pdbgen/pdb/floating_sel.pdb: changed accordingly.
* app/pdb/floating-sel-cmds.c: regenerated.
* app/core/core-enums.[ch]
* app/core/gimpimage-undo.c: remove enum value
GIMP_UNDO_GROUP_FS_REMOVE.
svn path=/trunk/; revision=27583
2008-11-09 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer-floating-sel.[ch]: made
floating_sel_composite() private and simplify it a lot by using
gimp_rectangle_intersect().
svn path=/trunk/; revision=27580
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-11-08 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: add optional parameter "PixelRegion
*destPR" to GimpDrawable::apply_region().
* app/core/gimpdrawable-combine.[ch]: if the passed destPR is !=
NULL, write the result of the combination into that region instead
of the drawable's tiles. The region must have the exact size of
the result.
* app/core/gimp-edit.c
* app/core/gimpchannel.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-shadow.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpimagemap.c
* app/core/gimplayer-floating-sel.c
* app/paint/gimppaintcore.c: pass NULL as destPR. Code actually
using this feature follows.
svn path=/trunk/; revision=27574
2008-11-08 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: add new function
gimp_drawable_init_src_region() which will initialize a
PixelRegion on this drawable's "projection" (with the floating
selection combined), but for now just uses drawable->tiles.
* app/core/gimpchannel-project.c
* app/core/gimplayer-project.c: use it instead of
pixel_region_init() on the drawable's tiles.
svn path=/trunk/; revision=27573
2008-11-08 Michael Natterer <mitch@gimp.org>
Abstract the legacy projection code away into a virtual function
of GimpDrawable:
* app/core/gimpdrawable.[ch]: add new virtual function
GimpDrawable::project_region() which projects an area of a
drawable onto a passed in PixelRegion.
* app/core/Makefile.am
* app/core/gimpchannel-project.[ch]
* app/core/gimplayer-project.[ch]: new files which implement it.
* app/core/gimpchannel.c
* app/core/gimplayer.c: hook it in.
* app/core/gimpprojection-construct.c: get rid all the projection
code moved to above new files and project all drawables in one
loop.
* app/core/gimpprojectable.[ch]: remove the legacy methods
get_colormap() and get_components(), they are not needed any
longer.
* app/core/gimpimage.c: changed accordingly.
svn path=/trunk/; revision=27571
2008-11-07 Sven Neumann <sven@gimp.org>
* app/core/gimppalette-load.c (gimp_palette_load_aco): improved
error handling. Fixes compiler warnings about ignoring the
return
value of read().
svn path=/trunk/; revision=27570
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpitemstack.[ch]: new GimpList subclass which (for
now) does nothing but taking ownership of its children by the
means of g_object_ref_sink().
* app/core/gimpdrawablestack.[ch]: derive from GimpItemStack.
* app/core/gimpimage.c: use a GimpItemStack instead of a plain
GimpList for the list of vectors. Remove code which takes
ownerships of added items from gimp_image_add_layer(),
add_channel() and add_vectors().
svn path=/trunk/; revision=27568
2008-11-06 Sven Neumann <sven@gimp.org>
* tools/gimp-mkenums: use NC_() to mark enum values for
translation.
Use a lower-case short form of the type name as translation
context.
* libgimp/libgimp-intl.h: define the NC_() macro as noop.
* libgimpbase/gimpbasetypes.[ch]
* libgimpbase/gimpbase.def: added new functions to set and
get a translation context on an enum type.
* app/base/Makefile.am
* app/core/Makefile.am
* app/display/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* app/text/Makefile.am
* app/tools/Makefile.am
* app/widgets/Makefile.am
* libgimp/Makefile.am
* libgimpbase/Makefile.am:
* libgimpconfig/Makefile.am
* libgimpthumb/Makefile.am
* libgimpwidgets/Makefile.am: register the translation context
with the enum types.
* app/display/display-enums.h
* libgimpbase/gimpbaseenums.h
* libgimpconfig/gimpcolorconfig-enums.h: removed old-style
explicit
translation context.
* app/base/base-enums.c
* app/core/core-enums.c
* app/display/display-enums.c
* app/paint/paint-enums.c
* app/plug-in/plug-in-enums.c
* app/text/text-enums.c
* app/tools/tools-enums.c
* app/widgets/widgets-enums.c
* libgimpbase/gimpbaseenums.c
* libgimpconfig/gimpcolorconfig-enums.c
* libgimpwidgets/gimpwidgetsenums.c: regenerated.
svn path=/trunk/; revision=27562
2008-11-05 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawablestack.[ch]: add new function
gimp_drawable_stack_invalidate_previews() which does just what it
says.
* app/core/gimpimage.[ch]: merge invalidate_layer_previews() and
invalidate_channels_previews() into a single invalidate_previews()
and replace all calls to the old functions by calls to
gimp_drawable_stack_invalidate_previews().
* app/file/file-open.c: changed accordingly.
svn path=/trunk/; revision=27560
2008-11-05 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-convert.c (gimp_image_convert): remove call
to gimp_image_invalidate_layer_previews(), they are invalidated by
exchanging their tiles and by setting the image's colormap anyway.
svn path=/trunk/; revision=27559
2008-11-05 Michael Natterer <mitch@gimp.org>
This should remove any image or viewable dependency from the
projection (apart from the projectable's get_image() method, but
that one is not supposed to return the projection's model but
rather the image the projection is part of).
* app/core/gimpprojectable.[ch]: add vfunc get_size() which
completes the API needed for GEGL projection.
Add vfuncs get_layers(), get_channels(), get_components() and
get_colormap() which are needed for the legacy projection code.
* app/core/gimpimage.c: implement the new methods.
* app/core/gimpprojection.c
* app/core/gimpprojection-construct.c: use them and remove all
calls to image and viewable API.
svn path=/trunk/; revision=27558
2008-11-05 Michael Natterer <mitch@gimp.org>
* app/core/gimpprojectable.[ch]: add signal "structure-changed"
and API to emit it.
* app/core/gimpimage.c: emit it when the image emits
"mode-changed" and "size-changed".
* app/core/gimpprojection.c: connect to the new signal instead of
"mode-changed" and "size-changed" to get rid of one more image
dependency.
svn path=/trunk/; revision=27556
2008-11-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpprojectable.[ch]: add vitrual function
invalidate_preview().
* app/core/gimpimage.c: implement it and redirect to
gimp_viewable_invalidate_preview().
* app/core/gimpprojection.c: call the new API instead of
gimp_viewable_invalidate_preview(). Some cleanup in the disabled
cow-projection code.
svn path=/trunk/; revision=27553
2008-11-04 Michael Natterer <mitch@gimp.org>
Unfinished first step to make the projection independent of
GimpImage, also one step closer to layer grouping.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpprojectable.[ch]: add new interface which abstracts
something that can have a projection attached to it. Has "update"
and "flush" signals and get_graph() and get_image()
vfuncs. get_image() is temporary until the hack is finishes.
* app/core/gimpimage.[ch]: implement GimpProjectableInterface,
remove "update" and "flush" signals and made get_graph() a private
implementation of the interface method. Moved interface method
implementations after virtual function implementations.
* app/core/gimpprojection.[ch]: change member "image" to
"projectable" and use the projectable API as often as
possible. Still some implicit dependencies on the projectable
being an image left but it's getting close.
* app/core/gimpprojection-construct.c: same here.
svn path=/trunk/; revision=27552
2008-11-04 Sven Neumann <sven@sven>
* app/base/tile-pyramid.[ch] (tile_pyramid_new):
* app/core/gimpprojection.c
(gimp_projection_get_tiles_at_level):
reverted last change as the code in tile-pyramid does care about
the pixel format and it should continue to reject types that it
cannot handle.
svn path=/trunk/; revision=27545
2008-11-04 Michael Natterer <mitch@gimp.org>
* app/base/tile-pyramid.[ch] (tile_pyramid_new): changed "type"
parameter into "bytes" because tile managers don't care about
the pixel format of their tiles. Reordered parameters to match
tile_manager_new().
* app/core/gimpprojection.c (gimp_projection_get_tiles_at_level):
pass the bytes instead of the image type.
svn path=/trunk/; revision=27544
2008-11-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch] (gimp_drawable_set_tiles): add
"GimpImageType type" parameter because there are only a few calls
to this function which (can easily pass the current type); however
most calls to gimp_drawable_set_tiles_full() were just using the
function because of the type argument and passed in the item's
current offsets (which means peeking into the item struct or using
temp variables).
* app/core/gimpdrawable-offset.c (gimp_drawable_offset)
* app/text/gimptextlayer.c (gimp_text_layer_render)
* app/tools/gimptransformtool.c (gimp_transform_tool_doit): pass
the type to set_tiles().
* app/core/gimpchannel.c (gimp_channel_convert)
* app/core/gimpimage-convert.c (gimp_image_convert)
* app/core/gimplayer.c (gimp_layer_convert,add_alpha,flatten):
change calls to set_tiles_full() into set_tiles() because the
offset doesn't change.
svn path=/trunk/; revision=27535
* app/core/gimpitem.c (gimp_item_set_offsets): New function that
sets the offset of the item and also keeps the offset_node in
sync.
* app/core/gimpdrawable.c (gimp_drawable_real_set_tiles): Use the
function instead of setting the offsets directly. Fixes corrupted
display when cropping images with GEGL enabled for the projection.
svn path=/trunk/; revision=27528
* app/core/gimpitem.[ch]: Moved the shift_node from GimpLayer to
GimpItem, and call it offset_node. Also added
gimp_item_get_offset_node() meant to be used in the same way as
gimp_item_offsets().
(gimp_item_real_translate): Keep the offset_node up to date.
* app/core/gimplayer.[ch]: Don't manage the offset_node, get it
from GimpItem instead.
svn path=/trunk/; revision=27527
2008-11-02 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch]: add new functions
gimp_image_get_layer_iter(), channel_iter() and vectors_iter()
which return the GList inside the resp. GimpList.
* app/actions/channels-actions.c
* app/actions/layers-actions.c
* app/actions/vectors-actions.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-flip.c
* app/core/gimpimage-item-list.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/core/gimpimage.c
* app/core/gimpimage.h
* app/core/gimpprojection-construct.c
* app/display/gimpdisplayshell-draw.c
* app/file/file-open.c
* app/tools/gimpaligntool.c
* app/tools/gimpdrawtool.c
* app/vectors/gimpvectors-compat.c
* app/vectors/gimpvectors-export.c
* app/widgets/gimplayertreeview.c
* app/xcf/xcf-save.c
* tools/pdbgen/pdb/image.pdb: use the new functions instead of
peeking both into the image and the list. Remove inclusions of
"gimplist.h" or change them into "gimpcontainer.h" if needed.
* app/pdb/image-cmds.c: regenerated.
svn path=/trunk/; revision=27524
2008-11-02 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawablestack.[ch]: add "update" signal with the
same signature as GimpImage::update(). Install handlers for the
drawables' "update" and "visibility-changed" signals and emit
"update" accordingly, item offsets taken into account. Also emit
"update" when drawables are added, removed and reordered.
* app/core/gimpimage.[ch]: remove handlers and tons of code that
makes sure the image emits "update" on any of the above handled
events and simply connect the layer and channel stacks' "update"
signal to gimp_image_update().
svn path=/trunk/; revision=27523
2008-11-02 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer.[ch]: remove the mask_node and simply set
both opacity and the layer mask's source node on the opacity_node.
Needs latest SVN GEGL.
svn path=/trunk/; revision=27522
* app/core/gimpitem.[ch]: Move the base GeglNode here in
preparation for moving the GimpLayer gegl:shift op to here as
well. After all, the offsets are properties of GimpItem and not
GimpLayer.
* app/core/gimpdrawable.[ch]: Delegate appropriate stuff to the
GimpItem base class, like part of the visibility toggling and the
creation and destruction of the GimpItem node.
* app/core/gimplayer.c
* app/core/gimpchannel.c
* app/core/gimpdrawablestack.c: Changed accordingly, use the new
function names.
* app/core/gimpitempropundo.c
* app/vectors/gimpvectors-warp.c
* app/vectors/gimpvectorsmodundo.c: Include gegl.h instead of
glib-object.h
svn path=/trunk/; revision=27521
* app/gegl/gimpoperation*.c: Prefix the GIMP GEGL operations with
"gimp:" instead of "gimp-" so we follow the GEGL prefix style and
better serialize to XML.
* app/tools/gimp*tool.c
* app/core/gimpdrawable-*.c
* app/core/gimpdrawable.c
* app/core/gimpimagemap.c
* app/core/gimpprojection.c: Changed accordingly.
svn path=/trunk/; revision=27512
2008-10-31 Sven Neumann <sven@gimp.org>
* configure.in: bumped minimum required version of Cairo to
1.6.4.
* app/core/gimpscanconvert.c: use
cairo_format_stride_for_width().
svn path=/trunk/; revision=27488
2008-10-29 Michael Natterer <mitch@gimp.org>
* app/core/gimpselection.[ch]: change member "gboolean stroking"
into "gint stroking_count". Add push/pop API to increase/decrease
the counter. Pretend the selection is empty if the counter is > 0.
Enables correctly rendering vector layers even if there is a
selection.
svn path=/trunk/; revision=27464
2008-10-29 Sven Neumann <sven@gimp.org>
Bug 558420 – projection incorrect with alpha-less layers
* app/core/gimpprojection-construct.c
(gimp_projection_initialize):
need to initialize the projection if the covering layer is not
opaque.
svn path=/trunk/; revision=27460
* app/gegl/gimpoperationpointlayermode.c: Completed the rename
with gimp:layer-mode -> gimp:point-layer-mode and also did some
formating.
* app/core/gimplayer.c: Changed accordingly.
svn path=/trunk/; revision=27408