Commit Graph

289 Commits

Author SHA1 Message Date
Michael Natterer 07051535da app: remove GimpImage signal "update-sample-point" 2010-10-01 09:27:57 +02:00
Michael Natterer 0c613ba87d app: port sample point drawing to GimpCanvasItems
- Add GimpImage signal "sample-point-moved" and emit it when needed
- Let the shell connect to the sample point add, remove and move signals
  and update the canvas items accordingly
- Remove gimp_display_shell_draw_sample_points()
2010-10-01 09:27:57 +02:00
Michael Natterer 6bce0641d4 app: add signal GimpImage::update_vectors() and have the image manage updates
...just as we do for drawables. Connect to adding, removing, modifying
and toggling visibility of all vectors and emit "update-vectors"
accordingly. Add an update-vectors signal handler to GimpDisplayShell
and remove all other vectors handlers.
2010-09-17 11:31:57 +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 6650693d29 app: move gimp_image_pick_layer() to its own file
and add a (still unused) text layer picking function.
2010-03-07 01:55:31 +01:00
Michael Natterer 9a561646c2 Move the undo disable/freeze APIs to gimpimage-undo.[ch] 2010-02-09 22:32:48 +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 2b2464d6c8 Move the "flush_accum" to GimpImagePrivate 2010-02-05 09:13:25 +01:00
Michael Natterer 0f0853ca86 Move "preview" to GimpImagePrivate 2010-02-04 21:09:19 +01:00
Michael Natterer 09c897262e Move all undo-related members to GimpImagePrivate
Also add some new API to access them.
2010-02-04 20:06:49 +01:00
Michael Natterer 4c1ec79281 Move the quick mask members to GimpImagePrivate
and add API to access the "inverted" state.
2010-02-04 09:49:45 +01:00
Michael Natterer 02f5931c96 Move "visible" and "active" to GimpImagePrivate
and add accessors for the entire arrays (not just their members).
2010-02-04 09:10:02 +01:00
Michael Natterer 4143f5cd62 Move "parasites" to GimpImagePrivate 2010-02-03 23:42:32 +01:00
Michael Natterer 4a247e9182 Move "floating_sel" and "selection_mask" to GimpImagePrivate 2010-02-03 23:24:18 +01:00
Michael Natterer 3720938517 Move the active layer, channel and vectors to GimpImagePrivate 2010-02-03 23:12:22 +01:00
Michael Natterer 67014260dd Move some container handlers to GimpImagePrivate 2010-02-03 23:05:49 +01:00
Michael Natterer 88de69464e Move "layers", "channels" and "vectors" to GimpImagePrivate 2010-02-03 23:00:31 +01:00
Michael Natterer c9f8399614 Move "grid", "guides" and "sample_points" to GimpImagePrivate 2010-02-03 22:16:02 +01:00
Michael Natterer 2005fd1a68 Move "projection" and "graph" to GimpImagePrivate 2010-02-03 21:46:09 +01:00
Michael Natterer bb624cb8c4 Move "tattoo_state" to GimpImagePrivate 2010-02-03 21:31:27 +01:00
Michael Natterer 0b2c804e9d Move "disp_count" and "instance_count" to GimpImagePrivate
and add the neccessary API to access and modify them.
2010-02-03 21:22:00 +01:00
Michael Natterer f769284aca Start private struct for GimpImage and move the first members there 2010-02-03 20:31:25 +01:00
Michael Natterer 3915601544 Remove gimp_image_layer_boundary()
Having a function that only abstracts whether there is an active
layer or not is pretty useless. This also doesn't make the code in
selection_generate_segs() more complex but rather more obvious.
2009-08-31 20:57:52 +02:00
Michael Natterer d442379d5e Change GimpProjectable::update to GimpProjectable:invalidate
The only purpose of this change is to avoid having the "update"
signal twice on GimpGroupLayer (from GimpDrawable and from
GimpProjectable). Switch back to normal g_signal_connect()
in the projection.
2009-08-26 13:06:55 +02:00
Michael Natterer 6aadd0bbc9 Rename gimp_image_pick_correlate_layer() to gimp_image_pick_layer() 2009-08-25 23:18:34 +02:00
Michael Natterer f7ba1d1f2e Add missing blank line after the vectors group of functions 2009-08-19 21:30:47 +02:00
Michael Natterer 28aa03e525 Move gimp_image_raise_layer_to_top() around
Reorder functions so layer reorder function are in the same
order as channel and vectors ones.
2009-08-10 00:45:25 +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 a3b4b595d0 Add infrastructure to add items to the active item's parent container
* app/core/gimpimage.h: add define GIMP_IMAGE_ACTIVE_PARENT for magic
  the value ((gpointer) 1) which can be passed as parent item to
  add_layer(), add_channel() and add_vectors().

* app/core/gimpimage.c: add utility function
  gimp_image_get_insert_pos() which honors above new special value and
  figures all of parent container, parent item and insert position.
  Remove lots of duplicated code from add_layer(), add_channel() and
  add_vectors().
2009-08-03 21:47:21 +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 ec21c2880c Remove gimp_image_get_layer,channel,vectors_by_index()
The don't make sense any longer with item trees and I just fixed the
last places where they were used.
2009-08-02 15:56:06 +02:00
Michael Natterer ccc167994c Remove some old and unused GimpImage API cruft
Get rid of gimp_image_active_layer,channel,vectors_changed(),
they are unused and it's even conceptually wrong to have them
in the public API.
2009-08-02 12:45:04 +02:00
Michael Natterer 6be068ceab Add functions to count the items in an image
* app/core/gimpitemstack.[ch]: add gimp_item_stack_get_n_items()
  which counts a stack's items recursively.

* app/core/gimpimage.[ch]: add get_n_layers(), get_n_channels()
  and get_n_vectors().
2009-08-02 12:13:55 +02:00
Michael Natterer 571d26a198 Add functions for getting lists of all an image's items
* app/core/gimpitemstack.[ch]: add gimp_item_stack_get_item_list()
  which returns a GList of all the stack's items, in depth-first
  order if the stack is in fact a tree.

* app/core/gimpimage.[ch]: add gimp_image_get_layer_list(),
  channel_list(), vectors_list() which use above new function.
2009-08-01 21:59:45 +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
Martin Nordholts 1662ff2523 app: Keep track of GimpImage export dirtiness
Since save and export are separate activities we need to keep track of
image dirtiness for both of them. For this purpose, add a
'export_dirty' member to GimpImage which has the same semantics as
'dirty', but for export. Set it to clean whenever a document is
exported by whatever means. Do this with a new function
gimp_image_export_clean_all(). Also add gimp_image_is_export_dirty().
2009-07-05 09:28:52 +02:00
Martin Nordholts c181f4eb05 app: Add and use gimp_image_is_dirty() 2009-07-03 21:11:21 +02:00
Martin Nordholts 200c002516 app: Add "exported" signal to GimpImage 2009-05-16 13:02:55 +02:00
Sven Neumann b25b979fc9 removed gimp_image_get_type_string() again.
2009-01-29  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: removed gimp_image_get_type_string()
	again.
	
	* app/display/gimpdisplayshell-title.c
	(gimp_display_shell_format_title): use the GimpImageBaseType 
enum
	instead.

	* app/tools/gimptool.c (gimp_tool_oper_update): if the image is
	empty and the tool can't handle that, display a message in the
	statusbar telling the user about this.


svn path=/trunk/; revision=27970
2009-01-29 21:32:30 +00:00
Martin Nordholts 3b79e36d30 New method to get a string representation of the image type.
* app/core/gimpimage.[ch] (gimp_image_get_type_string): New method
to get a string representation of the image type.

* app/display/gimpdisplayshell-title.c
(gimp_display_shell_format_title): Ask the GimpImage for an image
type string instead of making assumptions about its
implementation.

svn path=/trunk/; revision=27947
2009-01-25 19:21:52 +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
Michael Natterer f275cddbbf add member "gboolean floating_selection_changed".
2008-11-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch] (struct GimpImageFlushAccumulator):
	add member "gboolean floating_selection_changed".

	(gimp_image_set_floating_selection): new function which sets
	the image's floating_sel pointer and sets the flag in the
	accumulator to TRUE for later signal emission on flush.

	(gimp_image_projectable_flush): emit "floating-selection-changed"
	if the flag in the accumulator is TRUE.

	* app/core/gimpimage.c (gimp_image_add,remove_layer)
	* app/core/gimpfloatingselundo.c (gimp_floating_sel_undo_pop)
	* app/core/gimplayer-floating-sel.c (floating_sel_to_layer): use
	gimp_image_set_floating_selection() instead of setting
	image->floating_sel menually and remove all calls to
	gimp_image_floating_selection_changed().


svn path=/trunk/; revision=27650
2008-11-14 15:18:29 +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 ada8336822 added gimp_image_get_display_name().
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-13 12:09:05 +00:00
Michael Natterer c0cc7c1156 add new function gimp_drawable_stack_invalidate_previews() which does just
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 20:48:59 +00:00
Michael Natterer 716e00f88b Unfinished first step to make the projection independent of GimpImage,
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 18:06:36 +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
Michael Natterer c14c84ba63 add "update" signal with the same signature as GimpImage::update().
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 19:53:51 +00:00
Michael Natterer 73a9bcf327 Bug 554983 – Layers Projection using GEGL
2008-10-10  Michael Natterer  <mitch@gimp.org>

	Bug 554983 – Layers Projection using GEGL

	First projection using GEGL, wheeeee. Disabled by default because
	it doesn't work with floating selection (and will not, FS
	refactoring is in the queue).

	* app/core/gimpimage.[ch]: add gimp_image_get_graph() which
	returns a GeglNode representing the image's projection.

	(gimp_image_add_layer_node)
	(gimp_image_remove_layer_node): new utility functions to add and
	remove layer nodes to/from the graph.

	(gimp_image_add_layer)
	(gimp_image_remove_layer)
	(gimp_image_position_layer): call them to keep the graph up to date.

	* app/core/gimpdrawable.c (gimp_drawable_real_update): invalidate
	the source node.

	* app/core/gimpprojection.[ch]: keep a projection graph around and
	add gimp_projection_get_sink_node() which returns the node that
	writes to the projection tiles.

	* app/core/gimpprojection-construct.c: add
	gimp_projection_construct_gegl() which is a few-liner that uses a
	GeglProcessor to run the projection graph.

	(gimp_projection_construct): call the new function (disabled by
	default).


svn path=/trunk/; revision=27207
2008-10-10 12:24:56 +00:00
Michael Natterer dba9e0c5e8 add new functions gimp_image_get_layer_by_index(), _channel_by_index() and
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add new functions
	gimp_image_get_layer_by_index(), _channel_by_index() and
	_vectors_by_index().

	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/xcf/xcf-load.c: use them instead of looking the items up
	in image->container and casting the return value.


svn path=/trunk/; revision=27206
2008-10-10 11:45:00 +00:00
Michael Natterer 517e58cdeb Address Bug 554983 – Layers Projection using GEGL
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Address Bug 554983 – Layers Projection using GEGL

	* app/gegl/gimp-gegl-utils.[ch]: add (imcomplete) function
	gimp_layer_mode_to_gegl_operation() from bug #554983.

	* app/core/gimpdrawable.[ch]: add gimp_drawable_get_source_node()
	which returns a GimpOperationTileSource for the drawable's
	tiles.

	(gimp_drawable_real_set_tiles)
	(gimp_drawable_configure): set the node's "tiles" property.

	* app/core/gimplayer.[ch]: add gimp_layer_get_node() which returns
	a GeglNode with proxy "input" and "output" pads to be plugged
	into the projection graph. The node has children for opacity,
	mask, layer mode and layer offset.

	(gimp_layer_translate)
	(gimp_layer_add_mask)
	(gimp_layer_apply_mask)
	(gimp_layer_set_opacity)
	(gimp_layer_set_mode): reconfigure the respective nodes.

	* app/core/gimpimage.[ch]: keep a "graph" node around and destroy
	it in finalize(). Not even a stub, just a silly GEGL dependency.


svn path=/trunk/; revision=27204
2008-10-09 20:44:23 +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 68c21b49e9 Revert the change which adds GError parameters to
2008-09-17  Michael Natterer  <mitch@gimp.org>

	Revert the change which adds GError parameters to
	gimp_image_add_{channel,layer,vectors}():

	* 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/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage.[ch]
	* app/core/gimplayer-floating-sel.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/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: revert.

	Instead, fix it at the PDB level:

	* app/core/gimpimage.c: turn the "added to wrong image" warning
	into a g_return_val_if_fail() assertion.

	* app/pdb/gimppdb-utils.[ch] (gimp_pdb_item_is_floating): add a
	"dest_image" parameter and fail if the passed item is not for this
	image.

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paths.pdb: pass the dest image to
	gimp_pdb_item_is_floating().

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


svn path=/trunk/; revision=26970
2008-09-17 11:41:54 +00:00
Michael Natterer b0dab70de8 add GError parameter to gimp_image_add_{channel,layer,vectors}() and
2008-09-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add GError parameter to
	gimp_image_add_{channel,layer,vectors}() and remove calls to
	g_warning(). Changed checks to be possible failures at all.

	* app/widgets/gimpitemtreeview.h (GimpAddItemFunc): add the GError
	here too.

	* 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/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/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c: pass a NULL error.

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/paths.pdb: pass the error.

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


svn path=/trunk/; revision=26963
2008-09-17 08:27:35 +00:00
Sven Neumann b2ad06a19f added GError parameter to gimp_image_{raise,lower}_{channel,layer,vectors}
2008-09-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added GError parameter to
	gimp_image_{raise,lower}_{channel,layer,vectors} functions and
	removed calls to g_message().

	* app/actions/channels-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c: pass NULL for the GError
	parameter as these actions are insensitive if they would fail.

	* tools/pdbgen/pdb/image.pdb: changed accordingly. Corrected the
	documentation.

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


svn path=/trunk/; revision=26953
2008-09-16 20:56:41 +00:00
Martin Nordholts 2975f815a8 Make the size-changed-detailed signal also contain previous image size.
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-28 19:12:03 +00:00
Sven Neumann 3b067cba23 added gimp_image_get_projection().
2008-08-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added gimp_image_get_projection().

	* app/display/gimpdisplay-handlers.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell-scroll.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsourcecore.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimppainttool.c
	* app/widgets/gimpsamplepointeditor.c
	* tools/pdbgen/pdb/image.pdb: use the new accessor function.

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


svn path=/trunk/; revision=26413
2008-08-07 09:17:46 +00:00
Michael Natterer 26c2c6afda :size-changed-detailed): change double to int in signal parameters.
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-04 20:11:35 +00:00
Martin Nordholts 99be15829c The parameters should be named previous_origin_[xy].
2008-08-04  Martin Nordholts  <martinn@svn.gnome.org>

	* app/core/gimpimage.c (gimp_image_emit_size_changed_signals): The
	parameters should be named previous_origin_[xy].

svn path=/trunk/; revision=26365
2008-08-04 18:50:45 +00:00
Martin Nordholts 6c48f2b601 Further work for completing bug #362915 that makes changes to the image
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
2008-08-03 11:35:53 +00:00
Michael Natterer e5be5664ed Move the shadow tiles from the image to the drawable. Fixes bug #100469.
2008-04-21  Michael Natterer  <mitch@gimp.org>

	Move the shadow tiles from the image to the drawable.
	Fixes bug #100469.

	* app/core/Makefile.am
	* app/core/gimpdrawable-shadow.[ch]: new files implementing
	the shadow tiles.

	* app/core/gimpimage.[ch]: remove the shadow tile manager from the
	GimpImage struct. Remove gimp_image_get_shadow_tiles() and
	_free_shadow_tiles().

	* app/core/gimpdrawable.[ch]: add the shadow tile manager
	here. Remove get_shadow_tiles() and merge_shadow(). Free the
	shadow tiles in finalize and when the drawable gets removed from
	the image.

	* 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-equalize.c
	* app/core/gimpdrawable-hue-saturation.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-levels.c
	* app/core/gimpdrawable-operation.c
	* app/core/gimpdrawable-posterize.c
	* app/core/gimpdrawable-threshold.c
	* app/core/gimpimagemap.c: changed accordingly. Free the shadow tiles
	after using them.

	* app/plug-in/gimpplugin-cleanup.[ch]: add
	gimp_plug_in_cleanup_add_shadow() and _remove_shadow() which keep
	track of whether shadow tiles were created on behalf of a plug-in
	procedure.

	(gimp_plug_in_cleanup): free shadow tiles which were created but
	not destroyed by a plug-in procedure.

	* app/plug-in/gimpplugin-message.c (plug_in_handle_tile_request):
	call gimp_plug_in_cleanup_add_shadow() whenever a plug-in requests
	shadow tiles.

	* tools/pdbgen/pdb/drawable.pdb: use the new drawable shadow
	API. Add new procedure gimp-drawable-free-shadow. Call
	gimp_plug_in_cleaup_remove_shadow() when it gets called.

	* tools/pdbgen/pdb/image.pdb: deprecate gimp-image-free-shadow.
	Calling it has no effect any longer.

	* app/pdb/drawable-cmds.c
	* app/pdb/image-cmds.c
	* app/pdb/internal-procs.c
	* libgimp/gimpimage_pdb.[ch]
	* libgimp/gimpdrawable_pdb.[ch]: regenerated.


svn path=/trunk/; revision=25510
2008-04-21 17:20:51 +00:00
Michael Natterer 0d31cf5521 : renamed "cmap" to "colormap" and "num_cols" to "n_colors".
2007-12-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.h (struct GimpImage):: renamed "cmap" to
	"colormap" and "num_cols" to "n_colors".

	* app/core/gimpimage.c
	* app/core/gimpimage-colormap.[ch]
	* app/widgets/gimpcolormapeditor.c: changed accordingly.


svn path=/trunk/; revision=24433
2007-12-25 16:33:04 +00:00
Sven Neumann 0370078297 added a load_proc member to GimpImage and getters and setters for it.
2007-09-20  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added a load_proc member to GimpImage
	and getters and setters for it.

	* app/file/file-open.c (file_open_image): set the load 
procedure,
	but only if it hasn't been set already. Use the MIME type from 
the
	load procedure that is set on the image.

	* tools/pdbgen/pdb/fileops.pdb (file_load_invoker): set the load
	procedure. This causes it to be set when the URI plug-in calls
	gimp-file-load to load the image.

	* app/pdb/fileops_cmds.c: regenerated.

	* app/widgets/gimpimagepropview.c
	(gimp_image_prop_view_label_set_filetype): use the MIME type 
from
	the load procedure, in case that no save procedure is set.


svn path=/trunk/; revision=23597
2007-09-20 21:23:05 +00:00
Sven Neumann a5d10b2ff0 renamed gimp_image_active_drawable() to gimp_image_get_active_drawable().
2007-07-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: renamed gimp_image_active_drawable() to
	gimp_image_get_active_drawable().

	* app/[lots of files]
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/image.pdb: changed accordingly.

svn path=/trunk/; revision=22958
2007-07-19 14:59:51 +00:00
Michael Natterer d8c632cb93 Invalidate the image preview after the projection is completely
2007-06-26  Michael Natterer  <mitch@gimp.org>

	Invalidate the image preview after the projection is
	completely constructed. Fixes bug #449141.

	* app/core/gimpmarshal.list: add VOID:BOOLEAN

	* app/core/gimpimage.[ch]: add boolean parameter
	invalidate_preview to the "flush" signal.

	* app/core/gimpprojection.[ch]: add boolean member
	invalidate_preview to the GimpProjection struct. Set it to TRUE if
	it was TRUE in the image's "flush" signal. When the projection is
	completely constructed after a flush, invalidate the image's
	preview.

	* app/display/gimpdisplay-handlers.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimpimagedock.c
	* app/widgets/gimpimageeditor.c: changed callback signatures
	accordingly.


svn path=/trunk/; revision=22840
2007-06-26 21:39:51 +00:00
Michael Natterer 52f7746e76 Make sure the image preview is only invalidated for visible image changes
2007-06-21  Michael Natterer  <mitch@gimp.org>

	Make sure the image preview is only invalidated for visible
	image changes (as it was before the change below).

	* app/core/gimpimage.h (struct GimpImageFlushAccumulator): added
	member "gboolean preview_invalidated".

	* app/core/gimpimage.c (gimp_image_update): set it to TRUE here.

	(gimp_image_real_flush): inavlidate the preview only if
	flush_accum.preview_invalidated is TRUE.


svn path=/trunk/; revision=22817
2007-06-21 13:35:31 +00:00
Sven Neumann 916cb45d93 removed the boolean from the GimpImage struct that used to track whether
2007-06-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: removed the boolean from the GimpImage
	struct that used to track whether the preview was valid.
	(gimp_image_invalidate_preview): just set the preview to NULL.

	* app/core/gimpimage-preview.c (gimp_image_get_new_preview):
	construct the preview from the projection instead of compositing
	the drawable previews.

svn path=/trunk/; revision=22737
2007-06-07 14:25:28 +00:00
Sven Neumann 5ef1749496 don't message "Image saved" from here.
2006-12-11  Sven Neumann  <sven@gimp.org>

	* app/actions/file-commands.c: don't message "Image saved" from
here.

	* app/core/gimpimage.[ch]: introduced new signal "saved".

	* app/file/file-save.c (file_save): call gimp_image_saved() from
here.

	* app/display/gimpdisplay-handlers.c: connect to
GimpImage::saved
	and show the "Image saved" message. Makes it show up on all
displays
	and regardless of how the file was saved.

	* app/display/gimpdisplay.c: fixed typo in comment.
2006-12-11 20:57:44 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Michael Natterer e896521924 added gimp_image_add_layers() which takes a list of layers and vierport
2006-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: added gimp_image_add_layers() which
	takes a list of layers and vierport coordinates to center the
	layers in.

	* app/dialogs/file-open-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/widgets/gimplayertreeview.c: use it instead of having the
	same code three times.
2006-11-03 19:59:30 +00:00
Michael Natterer dd6f5d711a changed GimpDrawable parameter to "GimpImageType dest_type".
2006-10-26  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]
	(gimp_image_transform_rgb)
	(gimp_image_transform_color)
	(gimp_image_transform_temp_buf): changed GimpDrawable parameter to
	"GimpImageType dest_type".

	(gimp_image_get_foreground)
	(gimp_image_get_background): ditto and reordered parameters.

	* app/core/gimp-edit.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-merge.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimperaser.c
	* app/paint/gimpheal.c
	* app/paint/gimpink.c
	* app/paint/gimppaintbrush.c: changed accordingly.

	* app/core/gimpdrawable-transform.c
	(gimp_drawable_transform_tiles_affine): set the progress to 1.0
	when done, some tiny cleanups around lanczos.
2006-10-25 22:14:36 +00:00
Sven Neumann 13ba2a52db added signals "parasite-attached" and "parasite-detached".
2006-10-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added signals "parasite-attached" and
	"parasite-detached".

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpimageprofileview.[ch]: draft of a new widget
that
	displays color profile information.

	* app/widgets/gimpimagepropview.c: minor cleanup and bug fix.

	* app/dialogs/image-properties-dialog.c: added Color Profile
	information.

	* plug-ins/common/lcms.c: bug fixes.
2006-10-25 07:31:04 +00:00
Sven Neumann e28ba685cf corrected comment (bug #346755).
2006-07-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: corrected comment (bug #346755).
2006-07-06 14:40:03 +00:00
Michael Natterer e286259048 renamed gimp_image_coords_in_active_drawable() to
2006-06-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: renamed
	gimp_image_coords_in_active_drawable() to
	gimp_image_coords_in_active_pickable() and added boolean
	"sample_merged" and "selected_only" parameters. Use floor()
	instead of ROUND(), we want to round to the actual pixel, not to
	the nearest pixel boundary.

	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimptransformtool.c: changed accordingly. Removed
	quite some duplicated code which checked sample_merged and the
	mask value at the cursor location.

	* app/tools/gimpbycolorselecttool.c: use the hand tool cursor,
	there's also a hand in the toolbox icon. Fixed cursor_update()
	function to set the bad modifier when there is no pickable pixel
	at the cursor loction.

	* app/tools/gimpfuzzyselecttool.c: added cursor_update()
	implementation which does the same as by_color_select's one.

	* app/tools/gimpselectiontool.c
	(gimp_selection_tool_cursor_update): don't override the bad
	modifier which was set by a subclass' cursor_update().
2006-06-03 15:41:40 +00:00
Michael Natterer 41e76ffdcf fix spacing broken by tab removal.
2006-05-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.h: fix spacing broken by tab removal.
2006-05-27 15:31:35 +00:00
Sven Neumann 049872b361 app/*.[ch] converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* app/*.[ch]
	* app/*/*.[ch]: converted tabs to spaces.
2006-04-12 12:49:29 +00:00
Sven Neumann cfd7233bc2 renamed gimp_drawable_shadow() to gimp_drawable_get_shadow_tiles().
2006-04-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.[ch]: renamed gimp_drawable_shadow() to
	gimp_drawable_get_shadow_tiles().

	* app/core/gimpimage.[ch]: renamed gimp_image_shadow() to
	gimp_image_get_shadow_tiles() and gimp_image_free_shadow() to
	gimp_image_free_shadow_tiles().

	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-levels.c
	* app/core/gimpimagemap.c
	* app/plug-in/plug-in-message.c
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/image.pdb: changed accordingly.

	* app/pdb/color_cmds.c
	* app/pdb/image_cmds.c: regenerated.
2006-04-07 09:50:23 +00:00
Michael Natterer 086d0b6371 app/plug-in/plug-in-types.h renamed to GimpPlugInProcedure and made a
2006-04-05  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-types.h
	* app/plug-in/plug-in-proc-def.[ch]: renamed to GimpPlugInProcedure
	and made a GObject derived from GimpProcedure (instead of having
	a pointer to a GimpProcedure). Added image_types and file_magic
	utility functions taken from plug-ins.[ch]. Still lives in the
	same crappy files because I am undecided where to put it...

	* app/pdb/gimpprocedure.c (gimp_procedure_real_execute): removed
	switch() statement and always call the internal marshaller because
	GimpProcedure::execute() is properly overridden by
	GimpPlugInProcedure now.

	* app/plug-in/plug-ins.[ch]: removed the mime_type and file_magic
	utilities added to GimpPlugInProcedure.

	* app/actions/file-commands.c
	* app/actions/plug-in-actions.[ch]
	* app/actions/plug-in-commands.[ch]
	* app/core/gimp-gui.[ch]
	* app/core/gimp.[ch]
	* app/core/gimpimage.[ch]
	* app/dialogs/file-open-dialog.c
	* app/dialogs/file-save-dialog.c
	* app/dialogs/print-size-dialog.c
	* app/file/file-open.[ch]
	* app/file/file-save.[ch]
	* app/file/file-utils.[ch]
	* app/gui/gui-vtable.c
	* app/menus/plug-in-menus.[ch]
	* app/plug-in/plug-in-def.[ch]
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-in-run.c
	* app/plug-in/plug-in.c
	* app/plug-in/plug-ins-query.c
	* app/widgets/gimpactiongroup.[ch]
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimpfiledialog.[ch]
	* app/widgets/gimpfileprocview.[ch]
	* app/widgets/gimppluginaction.[ch]
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/plug_in.pdb: changed addordingly.

	* app/pdb/fileops_cmds.c
	* app/pdb/plug_in_cmds.c: regenerated.
2006-04-05 08:38:33 +00:00
Michael Natterer 5fb387ea1b removed the return value again.
2006-04-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparasitelist.[ch] (gimp_parasite_list_add): removed
	the return value again.

	(gimp_parasite_list_find): return a const parasite.

	* app/core/gimp-parasites.[ch]
	* app/core/gimpimage.[ch]
	* app/core/gimpitem.[ch] (*_parasite_attach): take a const
	parasite. Make a local copy of the parasite struct because
	gimp_parasite_shift_parent() changes it.

	(*_parasite_find): return a const parasite.

	* app/core/gimptemplate.c
	* app/text/gimptextlayer-xcf.c
	* app/xcf/xcf-load.c: changed accordingly.
2006-04-02 15:37:25 +00:00
Sven Neumann 905fdfcbed did a global gimage -> image substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gimage -> image substitution.
2006-03-28 17:08:36 +00:00
Michael Natterer 1adf3d71af Did a global s/qmask/quick-mask/:
2005-09-19  Michael Natterer  <mitch@gimp.org>

	Did a global s/qmask/quick-mask/:

	* app/actions/qmask-actions.[ch]
	* app/actions/qmask-commands.[ch]
	* app/core/gimpimage-qmask.[ch]
	* menus/qmask-menu.xml
	* themes/Default/images/stock-qmask-off-16.png
	* themes/Default/images/stock-qmask-on-16.png: removed.

	* app/actions/quick-mask-actions.[ch]
	* app/actions/quick-mask-commands.[ch]
	* app/core/gimpimage-quick-mask.[ch]
	* menus/quick-mask-menu.xml
	* themes/Default/images/stock-quick-mask-off-16.png
	* themes/Default/images/stock-quick-mask-on-16.png: added.

	* app/actions/Makefile.am
	* app/actions/actions.c
	* app/core/Makefile.am
	* app/core/core-enums.[ch]
	* app/core/gimpchannel.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-undo.c
	* app/core/gimpimage.[ch]
	* app/core/gimpundo.[ch]
	* app/display/gimpdisplayshell-appearance.c
	* app/display/gimpdisplayshell-callbacks.[ch]
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell.[ch]
	* app/menus/menus.c
	* app/widgets/gimphelp-ids.h
	* libgimpwidgets/gimpstock.[ch]
	* menus/Makefile.am
	* menus/image-menu.xml.in
	* themes/Default/images/Makefile.am: changed accordingly.
2005-09-19 12:44:06 +00:00
Michael Natterer 0231374c86 added new signals "sample-point-added" and "sample-point-removed" and
2005-04-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: added new signals "sample-point-added"
	and "sample-point-removed" and public functions to emit them.

	* app/core/gimpimage-sample-points.c (gimp_image_add_sample_point)
	(gimp_image_remove_sample_point): emit them accordingly.

	* app/core/gimpimage-undo-push.c (undo_pop_image_sample_point):
	ditto.

	(undo_pop_image_guide)
	(undo_pop_image_sample_point): added comments why we add/remove
	stuff manually instead of using the GimpImage APIs.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpcursorview.[ch]
	* app/widgets/gimpsamplepointeditor.[ch]: new widgets.
	GimpCursorView is a replacement for the info window's "Cursor"
	page, GimpSamplePointEditor is a view on an image's sample points.
	The sample point editor does nothing yet except keeping a 2x2 grid
	of GimpColorFrames. Addresses bug #137776.

	* app/dialogs/dialogs.c
	* app/dialogs/dialogs-constructors.[ch]: register the new widgets
	as dockable dialogs.

	* app/actions/dialogs-actions.c (dialogs_dockable_actions)
	* menus/dialogs-menuitems.xml: added actions and menu items for
	the new dialogs.

	* app/display/gimpdisplayshell-cursor.c
	(gimp_display_shell_update_cursor)
	(gimp_display_shell_clear_cursor): update the new cursor view.

	* app/widgets/gimphelp-ids.h: help IDs for the new dialogs.

	* app/widgets/widgets-enums.[ch] (enum GimpColorFrameMode):
	changed description "Pixel values" to "Pixel" because the former
	was too long.
2005-04-03 15:48:03 +00:00
William Skaggs ea267753f6 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage-sample-points.c
	* app/core/gimpimage-sample-points.h: new files

	* app/actions/view-actions.c
	* app/actions/view-commands.c
	* app/actions/view-commands.h
	* app/config/gimprc-blurbs.h
	* app/core/Makefile.am
	* app/core/core-enums.c
	* app/core/core-enums.h
	* app/core/core-types.h
	* app/core/gimp.c
	* app/core/gimp.h
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpimage-undo-push.h
	* app/core/gimpimage.c
	* app/core/gimpimage.h
	* app/display/gimpdisplayoptions.c
	* app/display/gimpdisplayoptions.h
	* app/display/gimpdisplayshell-appearance.c
	* app/display/gimpdisplayshell-appearance.h
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-draw.h
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpdisplayshell.h
	* app/widgets/gimphelp-ids.h
	* menus/image-menu.xml.in: add support for a list of "sample
	points" in each image, coded and handled very similarly to
	guides, for use mainly in color correction.  See bug #137776.
2005-03-04 16:34:59 +00:00
Sven Neumann ab6c609ce1 renamed struct member "unit" to "resolution_unit".
2004-10-12  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: renamed struct member "unit" to
	"resolution_unit".

	* app/actions/image-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-undo-push.c
	* app/dialogs/info-window.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimptoolbox-dnd.c:
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c: changed accordingly. Use gimp_image_get_unit()
	where appropriate.

	* app/core/gimptemplate.c (gimp_template_set_from_image): fixed
	unit handling. Don't touch the template unit, it is used as the
	initial display unit. This will need further changes...
2004-10-12 21:28:53 +00:00
Sven Neumann e9e2e3f65a store the time when the image is first dirtied.
2004-10-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: store the time when the image is first
	dirtied.

	* app/display/gimpdisplayshell-close.c: tell the user what time
	period of changes will be lost when the image is not saved.
2004-10-05 23:42:35 +00:00
Michael Natterer 4b582b481a Replaced the concept of having a boolean indicating if an undo step
2004-07-29  Michael Natterer  <mitch@gimp.org>

	Replaced the concept of having a boolean indicating if an undo
	step dirties the image by a bitfield indicating which parts
	of the image are dirtied:

	* app/core/core-enums.[ch]: reordered two values in enum
	GimpUndoType, added GIMP_DIRTY_IMAGE_SIZE to enum GimpDirtyMask.

	The values of GimpDirtyMask are still questionable and will
	probably change...

	* app/core/gimpimage.[ch]: removed signal "undo_start" and added
	a GimpDirtyMask parameter to the "dirty" and "clean" signals.

	* app/core/gimpimage-undo.[ch] (gimp_image_undo_push): replaced
	"gboolean dirties_image" by "GimpDirtyMask dirty_mask" and pass
	it to gimp_image_dirty().

	(gimp_image_undo_group_start): added *ugly* code which tries to
	figure GimpDirtyMask from the group's GimpUndoType and store it in
	the GimpUndoGroup. Call gimp_image_dirty() instead of the removed
	gimp_image_undo_start(). This means the undo group now dirties the
	image just like one of its undo steps, but that's no problem since
	undoing cleans it in the same way.

	* app/core/gimpundo.[ch]: s/dirties_image/dirty_mask/g

	(gimp_undo_pop): emit clean/dirty signals *before* performing the
	actual undo step so listeners can detach from the image before it
	is changed by undo.

	* app/core/gimpimage-undo-push.c (gimp_image_undo_push_*): pass a
	GimpDirtyMask instead of TRUE/FALSE to gimp_image_undo_push().

	* app/core/gimpimagemap.[ch]: removed "gboolean interactive"
	because it makes no sense to use GimpImageMap noninteractively.
	Don't freeze()/thaw() undo while the image_map is active which
	fixes many ways of trashing the image's undo state but probably
	introduces new ways of doing evil things.

	* app/display/gimpdisplay-foreach.c
	* app/display/gimpdisplayshell-handlers.c: changed according
	to the GimpImage::clean()/dirty() signal changes. Small fixes
	in the quit dialog's dirty image container.

	* app/tools/gimptoolcontrol.[ch]: added member and API to
	set/get the dirty_mask.

	* app/tools/gimpcroptool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c: whenever setting "preserve" to
	FALSE, also set a "dirty_mask" which specifies on which image
	changes the tool wants to be canceled.

	* app/tools/tool_manager.c: removed "undo_start" connection and
	connect to both "dirty" *and* "clean" to check if the active_tool
	needs to be canceled. Cancel the tool only if the dirty_mask
	passed in the signal has common bits with the tool's dirty_mask.

	Fixes bug #109561 and probably opens some new ones...
2004-07-29 14:16:21 +00:00
Michael Natterer c5ec0d4f70 *** empty log message *** 2004-07-13 16:36:29 +00:00
Michael Natterer d476ee65ae added signal "color-changed" and emit it in gimp_channel_set_color() and
2004-07-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.[ch]: added signal "color-changed" and emit
	it in gimp_channel_set_color() and gimp_channel_set_opacity().

	* app/core/gimpimage-qmask.[ch]: added new functions
	gimp_image_set,get_qmask_color().

	* app/core/gimpimage.[ch]: install a "color-changed" handler on
	gimage->channels and update gimage->qmask_color when the qmask's
	color changes. Fixes bug #145361.

	* app/actions/qmask-commands.c: use the new qmask color API.
2004-07-05 11:18:34 +00:00
Sven Neumann c509204b7d tools/pdbgen/pdb/image.pdb app/pdb/image_cmds.c reverted changes I did to
2004-06-01  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/image.pdb
	* app/pdb/image_cmds.c
	* app/core/gimpimage.[ch]: reverted changes I did to the image
	unit earlier. As in 2.0, it will continue to not accept pixels.
	This makes the PDB API and the XCF format compatible again and
	fixes bug #142961 (and to some extent bug #137704).

	* app/core/Makefile.am
	* app/core/gimpimage-unit.[ch]: removed these files. The
	convenience accessors defined here aren't commonly used any
	longer.

	* app/display/gimpdisplay.[ch]
	* app/display/gimpdisplayshell.[ch]: added a unit parameter to
	gimp_display_new(). Made "unit" and "scale" properties of
	GimpDisplayShell.

	* app/actions/image-commands.c
	* app/actions/images-commands.c
	* app/actions/layers-commands.c
	* app/actions/select-commands.c
	* app/actions/view-commands.c
	* app/core/gimp-edit.c
	* app/core/gimp.[ch]
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpstatusbar.c
	* app/file/file-open.c
	* app/gui/gui-vtable.c
	* app/gui/info-window.c
	* app/gui/offset-dialog.c
	* app/gui/resize-dialog.[ch]
	* app/pdb/display_cmds.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimptoolbox-dnd.c
	* tools/pdbgen/pdb/display.pdb: changed accordingly. Use the
	display unit where the image unit was used before.
2004-06-01 22:04:20 +00:00
Michael Natterer 8848558f95 More GtkAction stuff (still unused):
2004-04-19  Michael Natterer  <mitch@gimp.org>

	More GtkAction stuff (still unused):

	* configure.in: added new directories menus/ and app/actions/

	* Makefile.am: build menus/

	* menus/.cvsignore
	* menus/Makefile.am
	* menus/*-menu.xml: new files: XML menu descriptions for each menu
	which is now defined in gui/*-menu.c.

	* app/widgets/widgets-types.h: some typedefs for GimpActionGroup.

	* app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only
	property. Added APIs to set actions visible/sensitive/active
	and an unimplemented stub for setting the action's color.

	* app/Makefile.am: build actions/ and link libappactions.a

	* app/actions/.cvsignore
	* app/actions/Makefile.am
	* app/actions/*-actions.[ch]: new files: GtkActions for each
	*-commands.c file in gui/. Ported all "update" functions from the
	*-menu.c files.
	(everything completely unused, untested and partly #if 0'ed)

	* app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added
	API to raise/lower channels/vectors to top/bottom.

	* app/gui/channels-commands.[ch]
	* app/gui/vectors-commands.[ch]: added callbacks for the new
	to top/bottom functions.

	* app/gui/Makefile.am
	* app/gui/dockable-commands.[ch]: new files split out of
	dialogs-commands.[ch].

	* app/gui/dialogs-commands.[ch]
	* app/gui/dialogs-menu.c: changed accordingly.

	* app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback()
	and remove usage of "guint action".

	* app/gui/image-menu.c: changed accordingly.

	* app/gui/palette-editor-commands.[ch]: split
	+palette_editor_new_color_cmd_callback() into separate callbacks
	for adding from FG and BG.

	* app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 14:54:24 +00:00
Michael Natterer 18d9161eea Get rid of the "current_context" which was in fact just a bunch of global
2004-04-15  Michael Natterer  <mitch@gimp.org>

	Get rid of the "current_context" which was in fact just a bunch of
	global variables. Instead, pass the needed context all the way
	from the GUI and the PDB to the core. This is a prerequisite for
	macro recording and generally helps separating the various
	subsystems from each other. Work in progress...

	* app/core/gimp.[ch]: removed member "current_context" and
	gimp_[get|set]_current_context().

	* app/core/gimp-edit.[ch]
	* app/core/gimpdrawable-blend.[ch]
	* app/core/gimpdrawable-bucket-fill.[ch]
	* app/core/gimpdrawable-offset.[ch]
	* app/core/gimpdrawable-transform.[ch]
	* app/core/gimpimage-crop.[ch]
	* app/core/gimpimage-flip.[ch]
	* app/core/gimpimage-merge.[ch]
	* app/core/gimpimage-resize.[ch]
	* app/core/gimpimage-rotate.[ch]
	* app/core/gimpimage.[ch]
	* app/core/gimpimagefile.[ch]
	* app/core/gimpitem-linked.[ch]
	* app/core/gimpitem.[ch]
	* app/core/gimplayer.[ch]
	* app/core/gimpselection.[ch]
	* app/core/gimptemplate.[ch]
	* app/file/file-open.[ch]
	* app/file/file-save.[ch]
	* app/pdb/procedural_db.[ch]
	* app/text/gimptext-compat.[ch]
	* app/text/gimptextlayer-transform.[ch]
	* app/gui/brush-select.[ch]
	* app/gui/font-select.[ch]
	* app/gui/gradient-select.[ch]
	* app/gui/palette-select.[ch]
	* app/gui/pattern-select.[ch]: added tons of "GimpContext *context"
	parameters and use the passed context instead of
	gimp_get_current_context().

	* app/app_procs.c
	* app/batch.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-ins.c
	* app/text/gimptextlayer.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpinktool.c
	* app/tools/gimptransformtool.c
	* app/vectors/gimpvectors.c
	* app/gui/convert-dialog.c
	* app/gui/drawable-commands.c
	* app/gui/edit-commands.c
	* app/gui/file-commands.c
	* app/gui/file-new-dialog.c
	* app/gui/file-open-dialog.c
	* app/gui/file-save-dialog.c
	* app/gui/image-commands.c
	* app/gui/layers-commands.c
	* app/gui/offset-dialog.c
	* app/gui/select-commands.c
	* app/gui/vectors-commands.c
	* app/widgets/gimpdnd.c
	* app/widgets/gimpdocumentview.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpthumbbox.c: pass gimp_get_user_context() or
	GIMP_CONTEXT(tool_options) or whatever is the right context
	to the changed core functions.

	* tools/pdbgen/app.pl: pass "GimpContext *context" to all
	generated PDB invokers.

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/palette_select.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: pass the new context
	parameter to the changed core functions.

	* app/pdb/*_cmds.c: regenerated.
2004-04-14 23:37:34 +00:00
Michael Natterer 800b7a5d53 added "gboolean alpha_changed" to GimpImageFlushAccumulator. Install an
2004-03-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: added "gboolean alpha_changed" to
	GimpImageFlushAccumulator. Install an "alpha_changed" handler
	on gimage->layers and set flush_accum.alpha_changed = TRUE
	whenever the image's *only* layer changed its alpha.

	* app/core/gimpimage-undo-push.c (undo_pop_layer_mod)
	* app/core/gimplayer.c (gimp_layer_add_alpha): removed
	explicit calls to gimp_image_alpha_changed().
2004-03-15 16:38:49 +00:00
Simon Budig dfd41249fe app/core/gimpimage.[ch] renamed gimage->freeze_count to
2004-03-15  Simon Budig  <simon@gimp.org>

	* app/core/gimpimage.[ch]
	* app/core/gimpimage-undo.c: renamed gimage->freeze_count
	to gimage->undo_freeze_count (more explicit).

	* app/file/file-open.c: Ensure that the undo system is enabled
	after loading an image (to protect against broken loaders).
2004-03-14 23:19:49 +00:00
Simon Budig 657bd9fff7 app/core/gimpimage.[ch] introduced a freeze counter, so that
2004-03-14  Simon Budig  <simon@gimp.org>

	* app/core/gimpimage.[ch]
	* app/core/gimpimage-undo.c: introduced a freeze counter, so
	that undo_freeze(); undo_freeze(); undo_thaw(); no longer
	results in an thawed undo stack.

	Fixes Bug #124176.

	This might reveal other places in the code where
	gimp_image_undo_freeze/thaw or gimp_image_undo_disable/enable
	were used in an inconsistent (not-paired) manner.

	* app/file/file-open.c: e.g. here, where _enable was called on
	the new image. The intention was to free a potential undo stack,
	so now call gimp_image_undo_free() instead.
2004-03-14 19:10:55 +00:00
Michael Natterer 25b81b1570 Fixed lots of QuickMask brokenness by letting the image adjust its
2004-02-14  Michael Natterer  <mitch@gimp.org>

	Fixed lots of QuickMask brokenness by letting the image adjust
	its qmask_state automatically:

	* app/core/gimpimage-qmask.h: #define GIMP_IMAGE_QMASK_NAME "Qmask".
	Use the define in all files below.

	* app/core/gimpimage.[ch]: split gimp_image_drawable_add,_remove()
	into separate handlers for layers and channels. Added a
	"name_changed" handler for all channels. In the channel "add",
	"remove" and "name_changed" handlers, check if it was a channel
	named "Qmask" that was added, removed or renamed and call
	gimp_image_set_qmask_state() accordingly.

	* app/core/core-enums.[ch]
	* app/core/gimpimage-undo-push.[ch]
	* app/core/gimpundo.c: removed all Qmask undo code because the image
	does the right thing without undo interaction now.

	* app/core/gimpimage-qmask.c (gimp_image_set_qmask_state): set
	gimage->qmask_state early so we can return early when called
	recursively. Removed calls to gimp_image_undo_push_image_qmask().
	Returned "removed" callback (it was utterly broken the way it was
	implemented).

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_qmask_toggled): check if the image's
	qmask state needs to be changed before changing it.

	* app/xcf/xcf-load.c (xcf_load_channel): removed code which
	recognized the qmask. GimpImage does this automatically now.

	* app/gui/qmask-commands.c: cleanup.

	* app/widgets/gimpimagedock.c (gimp_image_dock_constructor):
	destroy the "/Select/By Color" and "/Select/Toggle QuickMask" menu
	items.

	* app/widgets/image-menu.c (image_menu_update): changed accordingly.
2004-02-14 15:37:23 +00:00
Michael Natterer 748d432f3a removed gimp_image_owns_item() again.
2004-01-26  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: removed gimp_image_owns_item() again.

	* app/core/gimpitem.[ch]: instead, added new virtual function
	GimpItem::is_attached().

	* app/core/gimpchannel.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpselection.c
	* app/vectors/gimpvectors.c: implement it.

	* app/core/gimp-edit.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimplayer-floating-sel.c
	* app/text/gimptext-compat.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb_ changed accordingly.

	* app/pdb/edit_cmds.c
	* app/pdb/floating_sel_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/text_tool_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
2004-01-26 16:18:16 +00:00
Michael Natterer dc3ac41965 add the layer to the image before pasting to it. Fixes bug #132504.
2004-01-26  Michael Natterer  <mitch@gimp.org>

	* plug-ins/script-fu/scripts/unsharp-mask.scm: add the layer to
	the image before pasting to it. Fixes bug #132504.

	Fixed the underlying problem: make it impossible to attach
	floating selections to drawables which are not currently part of
	the image's layer or channel stacks.
	Also cleaned up image <-> floating_sel interaction:

	* app/core/gimplayer-floating-sel.[ch] (floating_sel_attach):
	added assertion that the drawable is part of the image (see below).
	Don't call gimp_image_floating_selection_changed(), it's emitted
	by gimp_image_add_layer() now.

	(floating_sel_remove)
	(floating_sel_anchor): don't emit "floating_selection_changed",
	it's emitted by gimp_image_remove_layer() now.

	(floating_sel_anchor): removed the fix for bug #132162 because
	gimp_image_remove_layer() behaves correctly now (see below).

	Renamed floating_sel_reset() to floating_sel_activate_drawable().
	Added g_return_if_fail() all over the place.

	* app/core/gimpimage.[ch]: added new function gimp_image_owns_item()
	which return TRUE if the passed item is part of the image.

	(gimp_image_add_layer): emit "floating_selection_changed" here if
	needed.

	(gimp_image_remove_layer): emit "floating_selection_changed" if
	needed, don't try to activate a layer if we called
	floating_sel_activate_drawable().
	This is the real fix for bug #132162.

	* app/core/gimpimage-undo-push.c (undo_pop_layer): apply the same
	fixes as to gimp_image_add,remove_layer(). Don't call
	gimp_drawable_invalidate_preview() on the previously active layer
	because that's done by gimp_image_set_active_layer() now.

	* app/xcf/xcf-load.c: remember the "floating_sel_drawable" in the
	XcfInfo struct and attach it *after* all layers and channels are
	loaded to avoid attaching the floating selection to an
	out-of-image drawable.

	* app/core/gimp-edit.c (gimp_edit_paste)
	* app/core/gimpdrawable-transform.c (gimp_drawable_transform_affine,
	gimp_drawable_transform_flip, gimp_drawable_transform_rotate)
	* app/core/gimpselection.c (gimp_selection_float)
	* app/text/gimptext-compat.c (text_render): added checks for
	gimp_image_owns_item() in all functions which can produce
	floating selections.

	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: added checks for
	gimp_item_owns_image() and return an execution error if invoked
	with a drawable which is not part of the image.

	* app/pdb/edit_cmds.c
	* app/pdb/floating_sel_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/text_tool_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
2004-01-26 15:34:47 +00:00
Michael Natterer 9efe077ca2 also return the color's alpha byte if it has alpha, not only the converted
2004-01-18  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch] (gimp_image_get_color): also return the
	color's alpha byte if it has alpha, not only the converted RGB
	values.  Return OPAQUE_OPACITY for drawables without alpha.
	Fixes bug #131706.

	* app/core/gimpdrawable.c (gimp_drawable_get_color_at)
	* app/core/gimpimage-contiguous-region.c
	(gimp_image_contiguous_region_by_color)
	* app/core/gimpimage-projection.c (gimp_image_projection_get_color_at)
	* app/core/gimpimagemap.c (gimp_image_map_get_color_at)
	* app/paint/gimpclone.c (gimp_clone_line_image): removed separate
	handling of the alpha byte from all users of gimp_image_get_color().
2004-01-18 13:19:59 +00:00
Michael Natterer 9d43b0669b added GIMP_IMAGE_TYPE_WITHOUT_ALPHA() macro as counterpart to
2004-01-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.h: added GIMP_IMAGE_TYPE_WITHOUT_ALPHA()
	macro as counterpart to GIMP_IMAGE_TYPE_WITH_ALPHA().

	* app/core/gimpdrawable.[ch]: added
	gimp_drawable_type_without_alpha() and
	gimp_drawable_bytes_without_alpha() convenience functions.
2004-01-14 19:41:00 +00:00
Michael Natterer 896b00074a removed unused "gint proj_level" from the GimpImage struct.
2003-12-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.h: removed unused "gint proj_level" from the
	GimpImage struct.
2003-12-04 11:36:58 +00:00