Commit Graph

316 Commits

Author SHA1 Message Date
Michael Natterer c32c1208b0 app: return a GError when flattening the image failed 2013-08-09 21:35:36 +02:00
Simon Budig 514f22f53d app: fix crash when flattening an image with no visible layers 2013-08-09 21:32:42 +02:00
Michael Natterer 9c93df2d4b app: add gimp_drawable_get_linear() which currently always returns FALSE
Add "linear" parameter to GimpApplicator. Pass the drawable's "linear"
to the applicator, and to all calls to gimp_gegl_mode_node_set_mode(),
instead of hardcoding FALSE everywhere.
2013-04-27 08:41:06 +02:00
Michael Natterer e2bcad3cfd app: use GimpApplicator in gimp_image_merge_layers() 2013-04-17 16:17:39 +02:00
Michael Natterer eb89a545d5 app: move core/gimp-apply-operation.[ch] to gegl/gimp-gegl-apply-operation.[ch] 2012-10-22 16:03:40 +02:00
Michael Natterer 07cc3976ca app: remove the !use_gegl case from gimpimage-merge.c 2012-05-19 00:19:49 +02:00
Michael Natterer 010418d874 app: remove gimp_drawable_get_tiles() 2012-05-06 04:39:23 +02:00
Michael Natterer 3ad73b3658 libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
Michael Natterer 7ba43c6d1d app: add GEGL support in gimpimage-merge.c 2012-05-02 17:51:17 +02:00
Michael Natterer f164069c9c app: remove gimp_drawable_bytes() and ask its format instead 2012-05-02 17:51:16 +02:00
Michael Natterer e15702cbe5 app: create gimp-babl-compat.[ch] for gimp_babl_format_get_image_type()
and remove gimp_drawable_type().
2012-05-02 17:51:15 +02:00
Michael Natterer bdf6b48138 app: move GimpTempBuf from base/ to core/
and forget about include policy in base/, it's scheduled for removal
anyway.
2012-05-02 17:51:01 +02:00
Michael Natterer c14738806e app: use gimp_image_get_layer_format() instead of dealing with image_type 2012-05-02 17:50:57 +02:00
Øyvind Kolås 6efd812d08 app: s/GIMP_GEGL_RECT/GEGL_RECTANGLE/
Defining GeglRectangle inline is so useful that it has been added to
GEGL.
2012-05-02 17:50:52 +02:00
Michael Natterer 765c2cfea2 app: replace GimpDraable's type by a Babl format
and change gimp_drawable_new() and all gimp_layer_new() variants to
take formats instead of types.
2012-05-02 17:46:06 +02:00
Øyvind Kolås f8b1372038 app: make use of GIMP_GEGL_RECT in more places 2012-05-02 17:46:05 +02:00
Michael Natterer 0bcae125b5 app: merge gimp_drawable_get_read_buffer() and get_write_buffer()
into get_buffer(). The loss of zero copy will be compensated soon.
2012-05-02 17:46:04 +02:00
Michael Natterer 69c52173fb app: change gimp_gegl_color_set_rgba() to gimp_gegl_color_new()
which saves one line of code in every single use case.
2012-05-02 17:46:03 +02:00
Michael Natterer b68a05f240 app: remove gimpimage-colorhash.[ch]
All indexed mapping is done with Babl now \o/
2012-05-02 17:46:00 +02:00
Michael Natterer b05e213d6d app: stop using gegl_color_set_pixel() with hand-transformed pixels
instead, simply use rgb values and rely on the subsequent
gegl_buffer_set_color() to do the right thing because the buffer know
their indexed format now.
2012-05-02 17:45:59 +02:00
Michael Natterer 9a09d3a762 app: drop "babl" from gimp_foo_get_babl_format[_with_alpha]() 2012-05-02 17:45:58 +02:00
Michael Natterer 88388467cc app: move the layer mask show, edit, apply API from GimpLayerMask to GimpLayer
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.
2012-05-02 17:45:56 +02:00
Michael Natterer 169221bc51 app: replace some color_region() and pattern_region() by GEGL code 2012-05-02 17:45:52 +02:00
Michael Natterer efc4986501 app: clear gimp_image_merge_layers()'s merged layer with gegl_buffer_clear() 2012-05-02 17:45:49 +02:00
Massimo Valentini 39368a410d plugged memory leaks 2012-02-07 17:32:02 +01:00
Michael Natterer cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Michael Natterer 02477f5563 Bug 625167 - Problem exporting floating selections from within layer groups
Add "gboolean merge_active_group" to gimp_image_merge_visible_layers()
and pass FALSE from the PDB wrapper so plug-in invoked layer merging
always acts on the toplevel container as it did in 2.6. Do the same
when opening an image as layer.

Also, added a "Merge within active group only" toggle to the merge
layers dialog and pass it down to the core, but default to TRUE here
so.
2011-02-14 09:45:59 +01:00
Michael Natterer d9dd65529f app: include floating selection removal in the layer merge undo group
and pull undo group starting/ending out of the
gimp_image_merge_layers() utility function.
2011-02-14 01:43:55 +01:00
Michael Natterer ef28d7fee6 app: don't gimp_object_set_name() on an item that's attached to an image
because it bypasses the unique name logic used by gimp_item_rename().
2011-02-06 23:56:24 +01:00
Michael Natterer ad88eb55a2 app: add accessors for GimpItem::parasites and move it to private 2011-01-31 23:51:18 +01:00
Barak Itkin 5930b13084 app: add context to all undo descriptions
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
2010-06-09 18:50:23 +02: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 01bafc6ea8 Move variables to local scopes and some minor cleanup 2009-09-22 21:41:24 +02:00
Michael Natterer 43cf8e9259 Make "merge visible layers" work on the right container
(gimp_image_merge_visible_layers): merge the visible layers in the
active layer's group. We can't possibly merge across different groups
anyway because there is no logical place to add the merged layer.
Moreoever, this change makes the group behave more like a sub-image,
which is our metaphor anyway.
2009-09-21 20:30:10 +02:00
Michael Natterer e79c3c9bd7 Allow merging down a group layer
There is no reason to disallow this, the merged-down group layer will
simply disappear from the image just as a normal layer, and its
projection composited with the layer below.
2009-09-21 19:21:03 +02:00
Michael Natterer 170054a36e Add gimp_image_merge_group_layer()
The new function replaces a group layer by a normal one that looks
exactly the same.
2009-09-21 19:08:04 +02:00
Michael Natterer 9e18f771c4 Replace "Group Layer" by "Layer Group" in all user visible strings 2009-09-03 14:57:18 +02:00
Michael Natterer a3558e3cb8 Remove GIMP_OBJECT() casts when calling gimp_object_get_name() 2009-08-31 22:47:18 +02:00
Michael Natterer 02903d6970 Use gimp_item_is_content_locked() instead of gimp_item_get_lock_content()
Use the new API whenever we want to determine the item's effective
lock state (whether we can write to the item's content or not). Use
gimp_item_get_lock_content() only in code that actually deals with
*this* item's locked state, which is only the PDB wrappers and GUI to
modify the flag on the item itself.
2009-08-29 15:27:04 +02:00
Michael Natterer eb03413b49 Add separate check that prevents merging down to a group layer 2009-08-29 12:26:15 +02:00
Michael Natterer d37dc64b16 Add GError reporting to gimp_image_merge_down()
- turn g_return_if_fail() of more complex conditions into errors.
- change PDB wrapper accordingly instead of adding a ton of conditions
  there.
2009-08-25 22:02:02 +02:00
Michael Natterer d91a89e157 Make "Merge down" work on trees and start fixing the rest of the merge code
* make internal merge functions aware of the container to merge and
  its parent layer.
* git rid of some cruft in gimp_image_merge_down().
* merge down works within one container (naturally) and needs:
  - the uppper layer not to be a group
  - the lower layer to be writable
* fix action sensitivity accordingly.
2009-08-25 21:26:14 +02:00
Michael Natterer 7a373152f9 Remove boolean variable that was only set and never used after 2009-08-25 20:00:30 +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 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 de38a9887b New offset getters for inline use.
* app/core/gimpitem.c
(gimp_item_get_offset_x)
(gimp_item_get_offset_y): New offset getters for inline use.

* app/core/gimpchannel.c
* app/core/gimpdrawable.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-resize.c
* app/tools/gimptexttool.c: Don't access GimpItem offset members
directly, use gimp_item_set_offset() and
gimp_item_get_offset_[xy]() instead.

svn path=/trunk/; revision=27848
2008-12-28 12:43:07 +00:00
Martin Nordholts 5aeb568650 s/gimp_container_children_type/gimp_container_get_children_type/
s/gimp_container_policy/gimp_container_get_policy/
s/gimp_container_num_children/gimp_container_get_n_children/

* app/actions/actions.c
* app/actions/file-actions.c
* app/actions/file-commands.c
* app/actions/tool-options-actions.c
* app/actions/tools-actions.c
* app/actions/tools-commands.c
* app/actions/vectors-actions.c
* app/core/gimpcontainer-filter.c
* app/core/gimpcontainer.c
* app/core/gimpcontainer.h
* app/core/gimpimage-convert.c
* app/core/gimpimage-flip.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-undo.c
* app/core/gimpimage.c
* app/core/gimpimagefile.c
* app/core/gimplist.c
* app/core/gimpundostack.c
* app/dialogs/palette-import-dialog.c
* app/dialogs/quit-dialog.c
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell-title.c
* app/gui/gui-vtable.c
* app/menus/tool-options-menu.c
* app/tools/gimp-tools.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimpimagepropview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c

svn path=/trunk/; revision=27692
2008-11-20 22:45:19 +00:00
Michael Natterer fb1660a4ea rename gimp_image_floating_sel() to gimp_image_get_floating_selection().
2008-11-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: rename gimp_image_floating_sel() to
	gimp_image_get_floating_selection().

	* app/actions/channels-actions.c
	* app/actions/image-actions.c
	* app/actions/layers-actions.c
	* app/actions/layers-commands.c
	* app/actions/select-actions.c
	* app/core/gimpdrawable.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/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptexttool.c
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/image.pdb: changed accordingly, replaced some
	instances of direct acces by the accessor.

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


svn path=/trunk/; revision=27649
2008-11-14 15:01:44 +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