1. 11 Jul, 2018 1 commit
  2. 22 Apr, 2018 1 commit
    • Ell's avatar
      Bug 795410 - Deleting a layer group and then undoing the deletion ... · 37742a9f
      Ell authored
      ... raises a CRITICAL
      
      gimp_item_{start,end}_move() currently serves two different
      purposes:  It is used by GimpLayer to suspend/resume mask resizing
      of the layer's ancestors; this is necessary whenever an operation
      on a layer might affect the size of its ancestors.  It is also used
      by GimpGroupLayer to suspend/resume its own mask resizing; this, on
      the other hand, is only necessary before applying one of the
      transformation functions to the group, so that mask modification is
      handled by GimpLayer.  In other words, the effects of
      gimp_item_{start,end}_move() on group layers are only necessary in
      a subset of the cases in which these functions are used.
      
      While in itself this isn't a problem, it does cause issues when
      removing a group layer:  gimp_image_remove_layer() calls
      gimp_item_start_move() before removing the layer, and
      gimp_item_end_move() afterwards.  While the former function is
      called while the layer is still attached to the image, the latter
      function is called after the layer is no longer attached.  Since
      GimpGroupLayer pushes an undo step in response to these calls, only
      the call to start_move() results in an undo step, while the call to
      end_move() doesn't, resulting in an unbalanced
      GIMP_UNDO_GROUP_LAYER_START_MOVE undo step on the stack.  This
      causes problems when undoing the operation.
      
      Add gimp_item_{start,end}_transform() functions, and corresponding
      GimpItem::{start,end}_transform() virtual functions, which are more
      specialized versions of gimp_item_{start,end}_move(), which should
      be used instead of the former before/after transforming an item; in
      other cases, such as when removing ot reordering an item,
      gimp_item_{start,end}_move() should still be used.  The default
      implementation of GimpItem::{start,end}_transform() calls
      gimp_item_{start,end}_move(), respectively, so subclasses that
      override these functions don't have to do that themselves.
      
      In GimpGroupLayer, override GimpItem::{start,end}_transform(),
      instead of GimpItem::{start,end}_move(), for the same purpose of
      suspending mask resize.  This avoids these functions from being
      called when removing a layer group, fixing the bug.
      37742a9f
  3. 25 Mar, 2018 1 commit
    • Ell's avatar
      app: use GimpObjectQueue in lots of places · 139a2345
      Ell authored
      Use GimpObjectQueue, added in the previous commit, in various
      instances where we perform an action on a set of objects.  This
      improves progress reporting, by using a single progress for the
      entire operation, rather than reporting the progress of each object
      individually, and by taking the relative cost of each object into
      account, instead of assuming a uniform cost for all objects.
      
      In particular, this affects the various whole-image operations
      (i.e., transformations and color conversions), operations on linked
      items, and operations on layer groups.  This also affects layers
      with masks, whose progress is now reported together instead of
      individually.
      
      Additionally, this commit fixes erroneous group-layer mask cropping
      during undo when resizing the image, by properly calling
      {start,end}_move() on all the resized layers before starting the
      operation, and when scaling the image, by only scaling top-level
      layers, and letting group layers scale their children themselves.
      139a2345
  4. 05 Feb, 2018 1 commit
    • Ell's avatar
      app: add gimp_item_{start,end}_move() · 02a20c6c
      Ell authored
      Add gimp_item_{start,end}_move(), and corresponding
      GimpItem::{start,end}_move() virtual functions, which should be
      called before/after "moving" the item (i.e., translating, scaling,
      resizing, flipping, rotating, or transforming the item).  Moves
      performed between the outermost pair of start/end calls are treated
      atomically.
      
      What exactly does "treated atomically" entail depends on the
      subclasses -- GimpItem doesn't provide a default implementation for
      these functions, so the current commit doesn't change any behavior.
      The next commit, which adds layer-mask support for group layers,
      uses the functions to avoid cropping the mask too early while a
      child is moving.
      
      GimpItem calls {start,end}_move() in the various "move" functions
      (gimp_item_{translate,scale,...}(), before performing the actual
      operation.  Additionally we call the functions in the
      gimp_image_item_list_foo() functions, for each participating item,
      so that the items are moved as a unit.  We call the functions in
      the various gimp_image_remove_foo() functions, since removing an
      item may affect the size of its ancestors, and is therefore akin to
      moving.  We also call the functions in GimpEditSelectionTool, so
      that the move tool moves items atomically while dragging.
      02a20c6c
  5. 19 May, 2016 1 commit
  6. 03 Jul, 2015 1 commit
  7. 28 Jun, 2015 1 commit
  8. 26 Jun, 2015 1 commit
  9. 20 Jun, 2015 2 commits
  10. 14 Oct, 2013 1 commit
    • Michael Natterer's avatar
      app,libgimp*: fix includes to follow our include policy · 697572cc
      Michael Natterer authored
      - 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
      697572cc
  11. 30 May, 2013 1 commit
  12. 09 Jun, 2010 1 commit
    • Barak Itkin's avatar
      app: add context to all undo descriptions · 5930b130
      Barak Itkin authored
      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
      5930b130
  13. 29 Aug, 2009 1 commit
  14. 27 Aug, 2009 1 commit
  15. 25 Aug, 2009 1 commit
    • Michael Natterer's avatar
      Add gimp_image_item_list_filter() · cb1e3afb
      Michael Natterer authored
      New function takes a GList of items as returned by
      gimp_image_item_list_get_list() and can filter out items that:
      
      - have lock_content set to TRUE.
      - are children of items that are also in the list (to avoid
        transforming group items *and* their children, because
        the group items already do that for us).
      cb1e3afb
  16. 02 Aug, 2009 1 commit
    • Michael Natterer's avatar
      Iterate over all an image's items recursively · 87d463ae
      Michael Natterer authored
      Use gimp_image_get_layer,channel,vectors_list() instead of
      gimp_image_get_layer,channel,vectors_iter(). As a side-effect,
      simplified some code that was making sure we don't modify the list
      returned by the old functions (the new functions return newly
      allocated lists so we can safely remove items from the image while
      iterating it). Some places will need adjusting once we really have
      item trees.
      87d463ae
  17. 17 Jan, 2009 1 commit
    • Michael Natterer's avatar
      Change licence to GPLv3 (and to LGPLv3 for libgimp). · d9b5207a
      Michael Natterer authored
      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
      d9b5207a
  18. 02 Nov, 2008 1 commit
    • Michael Natterer's avatar
      add new functions gimp_image_get_layer_iter(), channel_iter() and · d1ca165b
      Michael Natterer authored
      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
      d1ca165b
  19. 09 Oct, 2008 1 commit
    • Michael Natterer's avatar
      Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a · 5503e6a0
      Michael Natterer authored
      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
      5503e6a0
  20. 04 Dec, 2007 1 commit
    • Michael Natterer's avatar
      added new API gimp_drawable_estimate_memsize() and virtual function · dd80b4c2
      Michael Natterer authored
      2007-12-04  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpdrawable.[ch]: added new API
      	gimp_drawable_estimate_memsize() and virtual function
      	GimpDrawable::estimate_memsize() which estimate the memsize of a
      	drawable after scaling/resizing.
      
      	* app/core/gimplayer.c: implement the virtual function and take
      	the layer mask into account.
      
      	* app/core/gimpimage-item-list.[ch] (gimp_image_item_list_get_list):
      	added const qualifiers.
      
      	* app/core/gimpimage-scale.c (gimp_image_scale_check): use the new
      	function to correctly estimate the new size instead of scaling the
      	drawables' memsizes including all constant parts. Fixes bug #329468.
      
      	* app/gimp-log.[ch]: added IMAGE_SCALE log domain.
      
      	* app/core/gimpimage-scale.c: use it here for debugging output.
      
      
      svn path=/trunk/; revision=24260
      dd80b4c2
  21. 10 Sep, 2007 1 commit
    • Sven Neumann's avatar
      app/core/gimp-transform-region.[ch] app/core/gimpchannel.c · 77b7161a
      Sven Neumann authored
      2007-09-10  Sven Neumann  <sven@gimp.org>
      
      	* app/core/gimp-transform-region.[ch]
      	* app/core/gimpchannel.c
      	* app/core/gimpdrawable-transform.[ch]
      	* app/core/gimpdrawable.c
      	* app/core/gimpimage-item-list.[ch]
      	* app/core/gimpitem-linked.[ch]
      	* app/core/gimpitem.[ch]
      	* app/core/gimplayer.c
      	* app/paint/gimpperspectiveclone.c
      	* app/vectors/gimpvectors.c: removed supersample parameter from
      	transform functions and perform it depending on the interpolation
      	type (bug #473265).
      
      	* app/tools/gimptransformoptions.[ch]
      	* app/tools/gimptransformtool.c: removed Supersample toggle from
      	the transform tool options.
      
      	* tools/pdbgen/pdb/drawable_transform.pdb
      	* tools/pdbgen/pdb/transform_tools.pdb: document that the
      	supersample parameter is unused and improved documentation of the
      	recursion-level parameter.
      
      	* app/pdb/transform_tools_cmds.c
      	* app/pdb/drawable_transform_cmds.c
      	* libgimp/gimpdrawabletransform_pdb.c: regenerated.
      
      svn path=/trunk/; revision=23494
      77b7161a
  22. 14 Aug, 2007 1 commit
    • Michael Natterer's avatar
      fixed API docs. · 1e790b12
      Michael Natterer authored
      2007-08-14  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage-item-list.c: fixed API docs.
      
      
      svn path=/trunk/; revision=23252
      1e790b12
  23. 24 Dec, 2006 1 commit
    • Mukund Sivaraman's avatar
      app/core/Makefile.am app/core/gimp-transform-resize.c · f0cff0ff
      Mukund Sivaraman authored
      2006-12-24  Mukund Sivaraman  <muks@mukund.org>
      
              * app/core/Makefile.am
              * app/core/gimp-transform-resize.c
              * app/core/gimpchannel.c
              * app/core/gimpdrawable-transform.c
              * app/core/gimpdrawable-transform.h
              * app/core/gimpdrawable.c
              * app/core/gimpimage-item-list.c
              * app/core/gimpimage-item-list.h
              * app/core/gimpitem-linked.c
              * app/core/gimpitem-linked.h
              * app/core/gimpitem.c
              * app/core/gimpitem.h
              * app/core/gimplayer.c
              * app/pdb/drawable_transform_cmds.c
              * app/text/gimptextlayer-transform.c
              * app/text/gimptextlayer-transform.h
              * app/tools/gimptransformoptions.c
              * app/tools/gimptransformtool.c
              * app/vectors/gimpvectors.c
              * libgimp/gimpdrawabletransform_pdb.c
              * libgimp/gimpdrawabletransform_pdb.h
              * libgimp/gimpenums.c.tail
              * libgimpbase/gimpbase.def
              * libgimpbase/gimpbaseenums.c
              * libgimpbase/gimpbaseenums.h
              * tools/pdbgen/enums.pl
              * tools/pdbgen/pdb/drawable_transform.pdb: implemented UI and PDB
              for new clipping modes for affine transforms (crop to largest
              rectangle, and crop to largest rectangle with the source's aspect
              ratio); fixed various bugs in the largest rectangle computation
              code; set padding to 6 in the transformation tool options.
      f0cff0ff
  24. 09 Dec, 2006 1 commit
  25. 07 Jun, 2006 1 commit
    • William Skaggs's avatar
      Bill Skaggs <weskaggs@primate.ucdavis.edu> · 40db64f4
      William Skaggs authored
      	* app/core/gimpimage-arrange.[ch]: added, utility function for
      	aligning and arranging things in an image.
      
      	* app/core/gimpitem-align.[ch}: removed, no longer needed.
      
      	* app/core/gimpimage-item-list.[ch] (gimp_image_item_list_align):
      	removed this function, no longer used.
      
      	* app/core/Makefile.am: changes described above.
      
      	* app/core/gimpguide.c: remove bit of cruft left accidentally.
      
      	* app/tools/gimpalignoptions.[ch]: remove "alignment type"
      	option, not needed at this point.
      
      	* app/tools/gimpaligntool.[ch]: numerous changes, most
      	importantly ability to align guides, and use them for
      	alignment.  More work coming on this tool.
      40db64f4
  26. 21 May, 2006 1 commit
    • Michael Natterer's avatar
      app/core/Makefile.am new files with functions to translate, flip, rotate, · 3e5b6e0e
      Michael Natterer authored
      2006-05-21  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/Makefile.am
      	* app/core/gimpimage-item-list.[ch]: new files with functions to
      	translate, flip, rotate, transform and align a list of items
      	inside an undo group.
      
      	(gimp_image_item_list_get_list): returns a list of items matching
      	any combination of GimpItemTypeMask and GimpItemSet.
      
      	* app/core/gimpitem.[ch]: added new function gimp_item_is_in_set().
      
      	* app/core/gimpitem-linked.[ch]: use the new functions. Removed
      	gimp_item_linked_get_list().
      
      	* app/tools/gimpeditselectiontool.c: use
      	gimp_image_item_list_get_list() instead of
      	gimp_item_linked_get_list().
      
      	* app/core/gimpimage-resize.c
      	* app/tools/gimpaligntool.c: use the new functions instead of
      	creating and iterating the lists manually.
      3e5b6e0e