Commit Graph

340 Commits

Author SHA1 Message Date
Sven Neumann beef765b4f Bug 631885 - GIMP fails to import a path from SVG
If a moveto is followed by multiple pairs of coordinates, the
subsequent pairs are supposed to be treated as implicit lineto
commands.

The parser used to ignore this part of the SVG specification and
treated subsequent pairs of coordinates as moveto commands (which
is correct in general, but for moveto commands there is this
explicit exception of the general rule).
2010-10-13 22:01:58 +02:00
Sven Neumann 4236990351 app/vectors: formatting 2010-10-13 21:52:10 +02:00
Michael Natterer 6b8141d548 app: wrap GimpBezierDesc in a boxed type to make property handling easier 2010-10-08 18:52:28 +02:00
Michael Natterer 2a965a8a78 app: argh, don't include the .c file 2010-10-06 22:49:53 +02:00
Michael Natterer a16fc33c43 app: add new() copy() and free() API around GimpBezierDesc
and use it instead of manually (de)allocating. Will also be used in a
new canvas path item.
2010-10-06 22:37:07 +02:00
Michael Natterer 428e9b908b app: more cleanup, move more variables to local scopes 2010-09-17 23:15:16 +02:00
Sven Neumann ec2be9b415 app: cache bounding box of GimpVectors object
Cache the bounding box of the GimpVectors similar to the bezier
representation.
2010-09-17 21:31:55 +02:00
Michael Natterer 97912b481e app: move variables to local scopes in gimp_vectors_bounds() 2010-09-17 16:09:30 +02:00
Sven Neumann 31fb4c9559 app: use GSlice for GimpBezierDesc 2010-09-16 23:27:25 +02:00
Sven Neumann 5abae32923 app: cache bezier representation in GimpVectors object
Introduce gimp_vectors_get_bezier() which creates the bezier
representation on demand and then caches it for subsequent calls
until the vectors object is frozen.

At some point we should introduce GimpVectors::changed instead
of relying on the fact that a vectors object is always frozen
and thawn whenever it is changed...
2010-09-16 21:36:51 +02:00
Sven Neumann 9c8736a56f app: formatting 2010-09-11 23:02:15 +02:00
Simon Budig 9ffaf94170 fix path import of polylines/polygons 2010-09-11 01:51:13 +02:00
Michael Natterer 3184c440b3 app: introduce GimpItem::to_selection()
Which replaces all the deparate functions to turn layers, channels,
layer masks and vectors into selections. Use the new virtual function
all over the place instead of calling the functions in
gimpchannel-select.c manually.
2010-07-20 23:09:19 +02:00
Michael Natterer e23e99e2ab app: add missing translation context for undo descriptions 2010-07-08 18:10:33 +02:00
Michael Natterer 314a6ab926 app: merge the layer, channel and vectors repositioning APIs
into an API based on GimpItem.
2010-07-08 18:08:13 +02:00
Michael Natterer 0908e53148 app: use the new unit conversion functions
and get rid of the brainfuck idea that app/ has to use _gimp_unit_foo()
functions, passing a gimp pointer. Instead, simply use the libgimpbase
API all over the place. Should we ever allow more than one gimp instance,
they will simply have to share one unit database.
2010-02-21 16:46:39 +01:00
Michael Natterer 82f8cee292 Use the newly added get_parent() APIs
Get rid of tons of local "parent" variables and inline the
get_parent() calls. They were on separate lines only to make them
readable at all.
2010-02-07 13:46:46 +01:00
Michael Natterer e0224cdbfb Add get_parent() API for items, layers, channels and vectors
this is pretty pointless from an abstraction point of view, but using
these functions will make the code a lot more readable by getting rid
of tons of ugly casts to and from GimpViewable whenever getting an
item's parent.
2010-02-07 12:03:07 +01:00
Michael Natterer f2c56cb363 app: #if 0 some stuff to aviod warnings 2010-02-07 12:02:37 +01:00
Michael Natterer 7bfd5dcf75 Merge the layer, channel and vectors reorder undo into one item undo
- 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.
2010-02-06 16:41:54 +01:00
Michael Natterer 804e692c86 Add some item tree infrastructure that will be needed later
- add gimp_image_get_layer_tree(), channel_tree() and vectors_tree()
- change GimpItem::get_container() to GimpItem::get_tree()
- implement gimp_item_get_container() using gimp_item_get_tree()
2010-02-06 16:17:23 +01:00
Michael Natterer 88de69464e Move "layers", "channels" and "vectors" to GimpImagePrivate 2010-02-03 23:00:31 +01:00
Martin Nordholts c380512ce1 Revert "app: Add gimp_vectors_get_stroke()"
This reverts commit 2d2b6f03c5 and
adapts the code. We can use gimp_vectors_stroke_get_next (vectors,
NULL) instead of gimp_vectors_get_stroke (vectors, 0). Thanks to nomis
for pointing this out.
2010-01-02 20:20:10 +01:00
Martin Nordholts 2d2b6f03c5 app: Add gimp_vectors_get_stroke() 2010-01-02 18:55:44 +01:00
Michael Natterer a3558e3cb8 Remove GIMP_OBJECT() casts when calling gimp_object_get_name() 2009-08-31 22:47:18 +02:00
Michael Natterer d84e48a82f Make "item" parameter of GimpItem::is_attached() const 2009-08-29 19:47:52 +02:00
Martin Nordholts 957cf2cfa9 app: Always use gimp_object_get_name()
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.
2009-08-29 12:41:29 +02:00
Michael Natterer ea33581451 Use gimp_image_set_size() instead of setting width and height manually
This also (really this time) fixes nested group layers. There were
cases when the outer group layer didn't properly resize itself because
gimp_drawable_set_tiles() on the inner group layer failed to emit
notify::width and notify::height.
2009-08-26 13:03:40 +02:00
Michael Natterer ae6828c1cc Add more precondition checks to vectors import functions
(gimp_vectors_import_file)
(gimp_vectors_import_buffer): check the parent item the same
way gimp_image_add_vectors() does.
2009-08-10 13:28:14 +02:00
Michael Natterer d059f239ac Make reordering items between groups work in the core and the UI
* 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).
2009-08-06 18:43:57 +02:00
Michael Natterer 3e1c13bc96 Support GIMP_IMAGE_ACTIVE_PARENT in the vectors import functions 2009-08-03 22:06:40 +02:00
Michael Natterer c4075975bf Bring parent items to the public API in the core
* 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-08-03 19:21:51 +02:00
Michael Natterer 88f49a5ddb Use gimp_item_get_index() all over the place
Remove gimp_image_get_layer,channel,vectors_index() and
use the new function everywhere.
2009-08-01 20:49:55 +02:00
Michael Natterer 297c2f0082 Add gimp_item_get_container() and gimp_item_get_index()
* app/core/gimpitem.[ch]: add virtual function ::get_container() plus
  pubic API wrapper which returns the children of the item's parent
  viewable, or the right toplevel container of its image.
  Add utility function get_index() which returns the item's index
  within its container.

* app/core/gimpchannel.c
* app/vectors/gimpvectors.c: implement get_container() and return
  the right image container.

* app/core/gimplayer.[ch]: same here, and remove previously added
  public get_container() API.

* app/core/gimplayermask.c
* app/core/gimpselection.c: implement get_container() for these GimpChannel
  subclasses and return NULL.
2009-08-01 20:22:07 +02:00
Massimo Valentini 5be4f235a3 Bug 554658 – Path Dialog: Path preview pics not to see constantly
Always initialize the 'status' member of a newly allocated cairo_path_t
to the value CAIRO_STATUS_SUCCESS as required to successively call
cairo_append_path().
2009-07-07 17:05:42 +02:00
Martin Nordholts 4d7a6b10d1 Added .gitignore files generated with git svn create-ignore.
svn path=/trunk/; revision=27972
2009-01-31 11:37:44 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Martin Nordholts d37193fe18 Use gimp_item_set/get_image() instead of accessing the instance
member directly.

* app/core/gimpchannel.c
* app/core/gimpdrawable-brightness-contrast.c
* app/core/gimpdrawable-color-balance.c
* app/core/gimpdrawable-colorize.c
* app/core/gimpdrawable-curves.c
* app/core/gimpdrawable-desaturate.c
* app/core/gimpdrawable-hue-saturation.c
* app/core/gimpdrawable-invert.c
* app/core/gimpdrawable-levels.c
* app/core/gimpdrawable-posterize.c
* app/core/gimpdrawable-threshold.c
* app/core/gimplayer.c
* app/core/gimplayermask.c
* app/core/gimpselection.c
* app/dialogs/layer-add-mask-dialog.c
* app/text/gimptextlayer-xcf.c
* app/tools/gimprectangletool.c
* app/tools/gimptexttool.c
* app/tools/gimpvectortool.c
* app/vectors/gimpvectors-preview.c
* app/vectors/gimpvectors.c
* tools/pdbgen/pdb/layer.pdb

* app/pdb/layer-cmds.c: Regenerated.

svn path=/trunk/; revision=27840
2008-12-28 00:09:33 +00:00
Martin Nordholts ddaa0b48ec s/temp_buf_data/temp_buf_get_data/
* app/base/pixel-region.c
* app/base/temp-buf.c
* app/base/temp-buf.h
* app/core/gimpbrush-load.c
* app/core/gimpbrush-scale.c
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpgradient.c
* app/core/gimpimage.c
* app/core/gimppalette.c
* app/core/gimppattern-load.c
* app/core/gimppattern.c
* app/core/gimppreviewcache.c
* app/core/gimpviewable.c
* app/paint-funcs/paint-funcs-generic.h
* app/paint/gimpbrushcore.c
* app/paint/gimpclone.c
* app/paint/gimperaser.c
* app/paint/gimpheal.c
* app/paint/gimpink.c
* app/paint/gimppaintbrush.c
* app/pdb/brush-cmds.c
* app/pdb/brushes-cmds.c
* app/pdb/drawable-cmds.c
* app/pdb/image-cmds.c
* app/pdb/pattern-cmds.c
* app/pdb/patterns-cmds.c
* app/text/gimpfont.c
* app/tools/gimpiscissorstool.c
* app/vectors/gimpvectors-preview.c
* app/widgets/gimpbrushselect.c
* app/widgets/gimppatternselect.c
* app/widgets/gimpviewrenderer.c

svn path=/trunk/; revision=27782
2008-12-13 10:35:53 +00:00
Sven Neumann b37c8bcf0a app/core/Makefile.am added GIMP_ERROR as general error domain.
2008-11-12  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimperror.[ch]: added GIMP_ERROR as general error 
domain.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpselection.c
	* app/core/gimptooloptions.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c
	* app/vectors/gimpvectors-import.c: use GIMP_ERROR as error 
domain
	instead of 0, which is not accepted by g_set_error_literal().

	* app/gui/session.c
	* app/menus/menus.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimpdevices.c: use G_FILE_ERROR as error domain 
for
	file errors.


svn path=/trunk/; revision=27628
2008-11-12 10:56:06 +00:00
Michael Natterer b994ab724e app/core/gimp-edit.c app/core/gimpchannel.c
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-edit.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/core/gimpdrawablemodundo.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpselection.c
	* app/text/gimptext-compat.c
	* app/text/gimptextlayer-xcf.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/layer.pdb: use accessors for item->offset_x,y.
	Some minor unrelated cleanups.

	* app/pdb/layer-cmds.c: regenerated.


svn path=/trunk/; revision=27537
2008-11-03 21:17:50 +00:00
Michael Natterer 740ab5e633 renamed gimp_item_width() to gimp_item_get_width() and gimp_item_height()
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_width() to gimp_item_get_width() and
	gimp_item_height() to gimp_item_get_height().

	* app/actions/channels-commands.c
	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/dialogs/offset-dialog.c
	* app/dialogs/resize-dialog.c
	* app/dialogs/scale-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimpink.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsmudge.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimptexttool.c
	* app/vectors/gimpvectors.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderervectors.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/drawable.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c: regenerated.


svn path=/trunk/; revision=27531
2008-11-03 00:09:01 +00:00
Michael Natterer d1ca165b4e add new functions gimp_image_get_layer_iter(), channel_iter() and
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 20:46:57 +00:00
Martin Nordholts 24fac1de0f Move the base GeglNode here in preparation for moving the GimpLayer
* 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
2008-11-02 16:39:38 +00:00
Michael Natterer 39af762f61 More merging from SOC 2006's vector layer branch:
2008-10-25  Michael Natterer  <mitch@gimp.org>

	More merging from SOC 2006's vector layer branch:

	* app/core/gimpitem.[ch]: add "gboolean push_undo" to
	GimpItem::stroke().

	* app/core/gimpdrawable-stroke.[ch]
	* app/paint/gimppaintcore-stroke.[ch]
	* app/paint/gimppaintcore.[ch] (gimp_paint_core_finish): add
	"push_undo" parameters here too.

	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/dialogs/stroke-dialog.c
	* app/tools/gimppainttool.c
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/paths.pdb: pass TRUE all over the place.

	* app/pdb/edit-cmds.c
	* app/pdb/paint-tools-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27398
2008-10-25 11:59:03 +00:00
Michael Natterer 1a453c37df app/core/Makefile.am app/core/core-types.h remove this mis-engineered
2008-10-24  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpstrokedesc.[ch]: remove this mis-engineered
	abstraction...

	* app/core/gimpstrokeoptions.[ch]: ...and add its properties and
	API here.

	* app/core/gimpitem.[ch]: GimpItem::stroke() take a
	GimpStrokeOptions instead of a GimpStrokeDesc.

	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/vectors/gimpvectors.c
	* 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: changed accordingly.

	* app/pdb/edit-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27388
2008-10-24 07:37:46 +00:00
Sven Neumann e25c82e21a Applied patch from Alexia Death as attached to bug #471344:
2008-10-18  Sven Neumann  <sven@gimp.org>

	Applied patch from Alexia Death as attached to bug #471344:
	
	* app/core/Makefile.am
	* app/core/gimpcoords-interpolate.[ch]: new files with
	interpolation code taken from ...

	* app/vectors/gimpbezierstroke.c: ... here.

	* app/Makefile.am (AM_LDFLAGS): make it link.


svn path=/trunk/; revision=27314
2008-10-18 18:46:15 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
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-10-09 20:24:04 +00:00
Michael Natterer 0e4a35a2d8 Remove the last code duplication from the undo system (or if not the last
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Remove the last code duplication from the undo system (or if not
	the last then at least the most ugly):

	* app/core/gimpimage.[ch] (gimp_image_add_layer,channel,vectors):
	add "gboolean push_undo" parameter and add the item without
	touching undo if it's TRUE. Changed assertions from
	g_object_is_floating() to !gimp_item_is_attached() so they also
	take items from the undo stack and not only newly created ones.

	(gimp_image_remove_layer,channel,vectors): add "push_undo"
	parameter here too. Also add a "new_active" parameter where an
	optional new active item can be passed.

	(gimp_image_remove_layer,channel): these functions must not be
	called with push_undo=FALSE and a floating selection attached to
	the layer/channel. This can't currently happen; added warnings in
	case other code is changed and makes it happen anyway.

	* app/core/gimpchannelundo.c
	* app/core/gimplayerundo.c
	* app/vectors/gimpvectorsundo.c: use above functions to add/remove
	items instead of duplicating (parts of) their code. Pass
	push_undo=FALSE and the previously active item to the remove()
	functions.

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpchannelundo.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage-scale.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayerundo.c
	* app/core/gimpselection.c
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/vectors/gimpvectorsundo.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.[ch]
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/paths.pdb: changed accordingly (pass TRUE
	unless it's a new image like when loading and XCF file).

	* app/pdb/image-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27200
2008-10-09 19:40:41 +00:00
Michael Natterer 62e7dcc640 reorder sections consistently. Remove redundant CFLAGS.
2008-10-07  Michael Natterer  <mitch@gimp.org>

	* app/*/Makefile.am: reorder sections consistently. Remove
	redundant CFLAGS.


svn path=/trunk/; revision=27163
2008-10-07 11:58:14 +00:00