Based on original patches from Hartmut Kuhse and modified
by Michael Natterer. Changes include:
- remove libexif dependency and add a hard dependency on gexiv2
- typedef GExiv2Metadata to GimpMetadata to avoid having to
include gexiv2 globally
- add basic GimpMetadata handling functions to libgimpbase
- add image and image file specific metadata functions to libgimp,
including the exif orientation image rotate dialog
- port plug-ins to use the new APIs
- port file-tiff-save's UI to GtkBuilder
- add new plug-in "metadata" to view the image's metadata
- keep metadata around as GimpImage member in the core
- update the image's metadata on image size, resolution and precision
changes
- obsolete the old metadata parasites
- migrate the old parasites to new GimpMetadata object on XCF load
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
finally acknowledging the fact that app/ depends on gdk-pixbuf almost
globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
For conversions that have no dither options (like RGB -> GRAY or u8 ->
u16), always preserve text editability, for conversions that have
dither options (like RGB -> INDEXED or u16 -> u8), give the user the
choice whether to enable dithering.
Apply and heavily modify patch from remyDev which adds "lock position"
to GimpItem, similar to "lock content". Lock position disables all
sorts of translation and transform, from the GUI and the PDB.
Cleaned up some aspects of the lock content code as well because a
second instance of similar code always shows what went wrong the first
time.
because it would require really evil hacks to honor these properties
in the gegl projection if they were on the mask, and because they
actually belong to the layer.
instead of simply reffing drawable->tiles. Add boolean property "copy-tiles"
and a boolean parameter to gimp_image_undo_push_drawable_mod() to control
the new feature. However, pass FALSE in gimp_drawable_real_set_tiles() (which
currently is the undo's only user)
- 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.
* app/core/gimpdrawable.[ch]: add "gboolean push_undo" to
GimpDrawable::convert_type().
* app/core/gimpdrawable-convert.[ch]: same here for the gray and rgb
conversion functions.
* app/core/gimpchannel.c
* app/core/gimplayer.c: pass FALSE when called from GimpItem::convert()
because it can be called on unattached items only.
* app/core/gimpimage-convert.c: pass TRUE.
* app/core/core-enums.[ch]
* app/core/gimpgrouplayerundo.[ch]
* app/core/gimpimage-undo-push.[ch]: add GIMP_UNDO_GROUP_LAYER_CONVERT
which simply calls gimp_drawable_convert_type() with the old type
when undone/redone.
* app/core/gimpgrouplayer.c: push a group layer convert undo so this
can be properly undone/redone.
* app/core/gimpgrouplayer.[ch]: add gimp_group_layer_suspend_resize()
and gimp_group_layer_resume_resize() and call them around functions
where all a group's children are transformed (translated, resized
etc). This way we go from the worst case of reallocating the
group's projection tiles once for each child down to exactly one
reallocation.
* app/core/Makefile.am
* app/core/core-enums.[ch]
* app/core/core-types.h
* app/core/gimpimage-undo-push.[ch]
* app/core/gimpgrouplayerundo.[ch]: add new undo class
GimpGroupLayerUndo which implements undos for suspend/resume of
group layers and calls them in reverse order when undoing.
Begin to consider GimpObject::name as private and always use
gimp_object_get_name(). Change gimp_object_get_name() to take an
untyped pointer so we don't have to do so awfully many casts. There is
a runtime check for the type inside the function anyway.
* app/core/gimpimage.[ch]: rename all gimp_image_reposition_foo() to
gimp_image_reorder_foo() and added "new_parent" parameters. Factor
out calculating of the item's new container and index to a utility
function.
* app/core/core-enums.[ch]: rename the REPOSITION undos to REORDER.
* app/core/gimpimage-undo-push.[ch]
* app/core/gimpchannelpropundo.[ch]
* app/core/gimplayerpropundo.[ch]
* app/vectors/gimpvectorspropundo.[ch]: change accordingly. Remember
the old parent item in all item reorder undos.
* app/widgets/gimpitemtreeview.h: change GimpReorderItemFunc prototype
accordingly.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c (class_init): follow image API
name changes.
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_drop_viewable):
implement reordering of items between groups.
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_reorder_item): fix to reorder the item
within its level of the tree (unrelated to above changes, but needed
to make them work).
* app/core/gimpimage.[ch]: make the parent parameter public in
add_layer(), add_layers(), add_channel() and add_vectors().
* app/vectors/gimpvectors-import.[ch]: add parent parameters to
the vectors import functions.
* app/core/gimpchannelundo.[ch]
* app/core/gimplayerundo.[ch]
* app/vectors/gimpvectorsundo.[ch]
* app/core/gimpimage-undo-push.[ch]: remember the parent item when
removing layers, channels and vectors.
* app/actions/channels-commands.c
* app/actions/debug-commands.c
* app/actions/edit-commands.c
* app/actions/layers-commands.c
* app/actions/vectors-commands.c
* app/core/gimp-edit.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-quick-mask.c
* app/core/gimplayer-floating-sel.c
* app/core/gimpselection.c
* app/core/gimptemplate.c
* app/dialogs/file-open-dialog.c
* app/display/gimpdisplayshell-dnd.c
* app/text/gimptext-compat.c
* app/tools/gimptexttool.c
* app/tools/gimpvectortool.c
* app/widgets/gimptoolbox-dnd.c
* app/xcf/xcf-load.c
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/vectors.pdb: pass NULL as parent item to above
functions and add FIXMEs all over the place because there is some
more hacking needed to make adding with index = -1 (on top of the
current item) work again.
* app/pdb/image-cmds.c
* app/pdb/paths-cmds.c
* app/pdb/vectors-cmds.c: regenerated.
* app/core/gimpimage-duplicate.c: duplicate the original image's
tree structure in the copy.
* app/widgets/gimpitemtreeview.[ch]: add parent to GimpAddItemFunc,
add utility function gimp_item_tree_view_get_drop_index() which
figures where to add something dropped to an item tree.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: changed accordingly, using above
new GimpItemTreeView API.
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-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
2008-08-28 Martin Nordholts <martinn@svn.gnome.org>
* app/core/gimpimage.[ch]: Make the size-changed-detailed signal
also contain previous image size.
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_size_changed_detailed_handler): Take the
previous image size into account and center the image if it starts
to fit (axis indepentently) in the viewport due to the resize.
* app/core/gimpundo.h
* app/core/gimpimage-undo.c
* app/core/gimpimageundo.[ch]
* app/core/gimpimage-undo-push.[ch]: Manage the
previous-size-information.
* app/core/gimpimage-crop.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-resize.c: Propagate previous size to the
size-changed-detailed signal emission and the undo-system.
svn path=/trunk/; revision=26804
2008-08-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch] (GimpImage::size-changed-detailed):
change double to int in signal parameters.
Remove gimp_image_emit_size_changed_signals() and call
gimp_viewable_size_changed() in size-changed-detailed's default
handler.
* app/core/gimpimageundo.[ch]
* app/core/gimpimage-undo-push.[ch]: change double to int in
previous-origin related code.
* app/core/gimpimage-undo.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-resize.c: call gimp_image_size_changed_detailed()
instead of the removed gimp_image_emit_size_changed_signals()
* app/display/gimpdisplayshell-scroll.[ch]: remove
gimp_display_shell_handle_size_changed_detailed() because it
handles both scrolling and scaling and doesn't belong here.
* app/display/gimpdisplayshell-handlers.c: moved its code back to
gimp_display_shell_size_changed_detailed_handler() and follow the
double -> int change above.
svn path=/trunk/; revision=26367
2008-08-03 Martin Nordholts <martinn@svn.gnome.org>
Further work for completing bug #362915 that makes changes to the
image size (e.g when cropping) be much more nicely handled by
display shell.
* app/core/gimpimage.[ch]: Add new signal
GimpImage::size-changed-detailed that is emited whenever
GimpViewable::size-changed is. The new signal provides additional
information, namely the previous origin relative to the current
origin. Cliens choose what specific signal to listen to depending
on how much info they need.
* app/display/gimpdisplayshell-handlers.c: Connect to
GimpImage::size-changed-detailed instead of
GimpViewable::size-changed since the shell wants information about
the previous image origin.
(gimp_display_shell_resolution_changed_handler): Use
gimp_display_shell_scale_resize() instead to avoid display
garbage.
* app/display/gimpdisplayshell-scale.[ch]: Add new utility
function gimp_display_shell_center_image_on_next_size_allocate().
* app/display/gimpdisplayshell-scroll.[ch]
(gimp_display_shell_handle_size_changed_detailed): New function
that replaces logic in gimp_display_shell_handle_size_changed and
that takes previous-origin of the image into account and adjusts
the offset so that the image content that remains doesn't move. If
the window is resized on image resize, just center the image
afterwards.
* app/core/gimpimage-undo-push.[ch]
(gimp_image_undo_push_image_size): Add previous-origin paremeters.
* app/core/gimpimageundo.[ch]: Add and manage previous-origin
properties so that the display shell offset can be appropriately
adjusted also when undoing.
* app/core/gimpundo.h
* app/core/gimpimage-undo.c: Add previous_origin members to the
undo accumulator and emit that information when the size of the
image changes due to the undo.
* app/core/gimpimage-crop.c (gimp_image_crop)
* app/core/gimpimage-scale.c (gimp_image_scale)
* app/core/gimpimage-rotate.c (gimp_image_rotate)
* app/core/gimpimage-resize.c (gimp_image_resize_with_layers):
Supply information about the previous-origin of the image to the
size-changed signals and the undo system.
svn path=/trunk/; revision=26354
2007-02-03 Michael Natterer <mitch@gimp.org>
Remove support for the old undo pop and free cruft:
* app/core/core-types.h: remove typedefs GimpUndoPopFunc and
GimpUndoFreeFunc.
* app/core/gimpundo.[ch]: remove members and properties size,
data, pop_func and free_func.
* app/core/gimpimage-undo.[ch] (gimp_image_undo_push): remove
parameters size, struct_size, pop_func and free_func.
* app/core/gimpimage-undo-push.c
* app/tools/gimptransformtool.c
* app/paint/gimpink.c
* app/paint/gimppaintcore.c: change calls to above function
accordingly.
svn path=/trunk/; revision=21845
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-02-02 Michael Natterer <mitch@gimp.org>
* app/core/gimpimageundo.[ch]
* app/core/gimpitempropundo.[ch]: implement image and item
parasite attach and remove undos. They are image/item properties
after all.
* app/core/gimpimage-undo-push.[ch]: use them here and move the
undo functions to the resp. image and item property sections.
svn path=/trunk/; revision=21835
2007-01-31 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.c (gimp_item_parasite_detach): require "name"
being non-NULL.
* app/core/gimpimage-undo-push.c (undo_pop_parasite): removed dead
code which handled parasites of the Gimp itself, don't include
"gimp-parasites.h".
Require "parasite" and "name" being non-NULL in all public
parasite undo functions.
svn path=/trunk/; revision=21829
2007-01-31 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.[ch]
(gimp_image_undo_push_fs_to_layer): removed "drawable" parameter
because it's always the drawable the floating selection is
attached to.
* app/core/gimplayer-floating-sel.c (floating_sel_to_layer):
changed accordingly.
svn path=/trunk/; revision=21827
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
2007-01-31 Michael Natterer <mitch@gimp.org>
* app/vectors/Makefile.am
* app/vectors/vectors-types.h
* app/vectors/gimpvectorsmodundo.[ch]: new undo class for
GIMP_UNDO_VECTORS_MOD.
* app/core/gimpimage-undo-push.c: use it here.
* app/core/gimpdrawablemodundo.h: fix typo in include guard.
svn path=/trunk/; revision=21825
2007-01-31 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpdrawablemodundo.[ch]: new undo class for
GIMP_UNDO_DRAWABLE_MOD.
* app/core/gimpimage-undo-push.c: use it here.
svn path=/trunk/; revision=21824
2007-01-31 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimplayermaskpropundo.[ch]: new undo class for
GIMP_UNDO_LAYER_MASK_APPLY and GIMP_UNDO_LAYER_MASK_SHOW.
* app/core/gimpimage-undo-push.c: use it here.
svn path=/trunk/; revision=21823
2007-01-30 Michael Natterer <mitch@gimp.org>
* app/vectors/Makefile.am
* app/vectors/vectors-types.h
* app/vectors/gimpvectorspropundo.[ch]: new undo class which
implements GIMP_UNDO_VECTORS_REPOSITION.
* app/core/gimpimage-undo-push.c: use it here.
* app/Makefile.am: another lame linker hack to make it build with
the new file that is not used in app/vectors/ itself.
svn path=/trunk/; revision=21818
2007-01-30 Michael Natterer <mitch@gimp.org>
* app/text/gimptextundo.[ch]: add support for
GIMP_UNDO_TEXT_LAYER_MODIFIED.
* app/core/gimpimage-undo-push.c: use it here.
svn path=/trunk/; revision=21816
2007-01-30 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpguideundo.[ch]
* app/core/gimpsamplepointundo.[ch]: new classes implementing
guide and sample point undos.
* app/core/gimpimage-undo-push.c: use them and remove all guide
and sample point code.
svn path=/trunk/; revision=21815
2007-01-29 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch]
* app/core/gimpimage-undo-push.[ch]: reordered IMAGE_GRID and
IMAGE_COLORMAP to be before IMAGE_GUIDE and IMAGE_SAMPLE_POINT.
svn path=/trunk/; revision=21802
2007-01-28 Michael Natterer <mitch@gimp.org>
* app/core/gimpimageundo.[ch]: add support for IMAGE_GRID and
IMAGE_COLORMAP undos.
* app/core/gimpimage-undo-push.c: use GimpImageUndo for grid and
colormap undos.
svn path=/trunk/; revision=21801
2007-01-29 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.[ch]: return a GimpUndo* instead
of gboolean from all undo_push functions. Simplifies the new
properly done functions quite a bit.
svn path=/trunk/; revision=21800
2007-01-29 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpchannelpropundo.[ch]: new undo class which handles
CHANNEL_REPOSITION and CHANNEL_COLOR.
* app/core/gimpimage-undo-push.c: use the new undo class and
remove the resp. code here.
svn path=/trunk/; revision=21799
2007-01-28 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimplayerpropundo.[ch]: new undo class which handles
LAYER_REPOSITION, LAYER_MODE, LAYER_OPACITY and LAYER_LOCK_ALPHA.
* app/core/gimpimage-undo-push.c: use the new undo class and
remove the resp. code here.
svn path=/trunk/; revision=21791
2007-01-28 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpitempropundo.[ch]: new undo class which handles
ITEM_RENAME, ITEM_DISPLACE, ITEM_VISIBILITY and ITEM_LINKED undos.
* app/core/gimpimage-undo-push.c: use the new undo class and
remove the resp. code here.
svn path=/trunk/; revision=21790
2007-01-28 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpimageundo.[ch]: new undo class which handles
GIMP_UNDO_IMAGE_TYPE, GIMP_UNDO_IMAGE_SIZE and
GIMP_UNDO_IMAGE_RESOLUTION.
* app/core/gimpimage-undo-push.c: use the new undo class and
remove the resp. code here.
* app/core/gimpimage-undo.h: changed include guards to not
conflict with gimpimageundo.h
svn path=/trunk/; revision=21789