1. 19 Mar, 2004 2 commits
    • Sven Neumann's avatar
      fixed a bug that Mitch spotted. · 8214f172
      Sven Neumann authored
      2004-03-20  Sven Neumann  <sven@gimp.org>
      
      	* app/core/gimpimage-undo-push.c (undo_pop_text_layer): fixed a
      	bug that Mitch spotted.
      8214f172
    • Sven Neumann's avatar
      don't exchange the text_layer's text object but sync it with the text · cbbe4f38
      Sven Neumann authored
      2004-03-20  Sven Neumann  <sven@gimp.org>
      
      	* app/core/gimpimage-undo-push.c (undo_pop_text_layer): don't
      	exchange the text_layer's text object but sync it with the text
      	object from the undo step.
      
      	* app/text/gimptextlayer.c (gimp_text_layer_set): in case the
      	layer has a mask, push an undo group around the text modifications.
      
      	* app/tools/gimptexttool.c (gimp_text_tool_idle_apply): push a
      	text layer undo before applying the text changes.
      cbbe4f38
  2. 16 Mar, 2004 2 commits
    • Michael Natterer's avatar
      ref new tiles before unrefing the old ones. · 49238237
      Michael Natterer authored
      2004-03-16  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpdrawable.c (gimp_drawable_set_tiles): ref new
      	tiles before unrefing the old ones.
      
      	* app/core/gimpimage-undo-push.c: keep undo memsize exact by
      	adjusting undo->size when the stored data changes.
      
      	* app/core/gimpchannel.[ch] (gimp_channel_new_from_alpha)
      	* app/core/gimpchannel-select.[ch] (gimp_channel_select_alpha):
      	replaced "layer" parameter by "drawable".
      
      	* app/gui/layers-commands.c
      	* tools/pdbgen/pdb/selection.pdb: changed accordingly.
      
      	* app/pdb/selection_cmds.c: regenerated.
      
      	* app/core/gimpchannel.c
      	* app/core/gimplayer.c
      	* app/core/gimplayermask.[ch]
      	* app/core/gimpselection.c: remdom cleanup & code review.
      49238237
    • Michael Natterer's avatar
      removed unused #includes. · 83dc4c3b
      Michael Natterer authored
      2004-03-16  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage-undo-push.c: removed unused #includes.
      83dc4c3b
  3. 15 Mar, 2004 8 commits
    • Michael Natterer's avatar
      replaced GIMP_UNDO_LAYER_MOD and GIMP_UNDO_CHANNEL_MOD by · 5ef7c774
      Michael Natterer authored
      2004-03-15  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/core-enums.[ch] (enum GimpUndoType): replaced
      	GIMP_UNDO_LAYER_MOD and GIMP_UNDO_CHANNEL_MOD by
      	GIMP_UNDO_DRAWABLE_MOD.
      
      	* app/core/gimpimage-undo-push.[ch]: ditto: replaced
      	gimp_image_undo_push_layer_mod() and
      	gimp_image_undo_push_channel_mod() by
      	gimp_image_undo_push_drawable_mod().
      
      	* app/core/gimpdrawable.[ch]: added undo_desc strings for "resize"
      	and "scale" to the GimpDrawableClass struct.
      
      	(gimp_drawable_scale)
      	(gimp_drawable_resize): pass push_undo = TRUE to
      	gimp_drawable_set_tiles_full() and use the undo_desc from the
      	class.
      
      	(gimp_drawable_real_set_tiles): push a GIMP_UNDO_DRAWABLE_MOD here...
      
      	* app/core/gimpchannel.c
      	* app/core/gimplayer.c: ...and don't push undos in
      	GimpItem::scale(), GimpItem::resize(), GimpDrawable::set_tiles().
      
      	* app/core/gimpchannel.c: Removed even more bounds_known = FALSE
      	assignments from functions which already call
      	gimp_drawable_set_tiles().
      5ef7c774
    • Michael Natterer's avatar
      emit "update" signals from the drawable before and after setting tiles and · 59b77c35
      Michael Natterer authored
      2004-03-15  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpdrawable.c (gimp_drawable_set_tiles_full): emit
      	"update" signals from the drawable before and after setting tiles
      	and offsets.
      
      	* app/core/gimpdrawable-offset.c (gimp_drawable_offset)
      	* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste)
      	* app/core/gimpimage-undo-push.c (undo_pop_layer_mod, _channel_mod)
      	* app/text/gimptextlayer.c (gimp_text_layer_render)
      	* app/tools/gimptransformtool.c (gimp_transform_tool_doit):
      	removed calls to gimp_drawable_update().
      
      	* app/core/gimpdrawable-offset.c (gimp_drawable_offset): don't
      	push an undo step before calling gimp_drawable_set_tiles()
      	but simply pass push_undo == TRUE and the undo_desc.
      59b77c35
    • Michael Natterer's avatar
      added "offset_x" and "offset_y" parameters to GimpDrawable::set_tiles(). · 1ef5fa93
      Michael Natterer authored
      2004-03-15  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpdrawable.[ch]: added "offset_x" and "offset_y"
      	parameters to GimpDrawable::set_tiles().
      
      	(gimp_drawable_set_tiles): removed the "GimpImageType" parameter.
      
      	(gimp_drawable_set_tiles_full): new function adding type, offset_x
      	and offset_y parameters.
      
      	(gimp_drawable_real_set_tiles): set the drawable's offsets from
      	the offset parameters and its size from the passed TileManager's
      	size. Emit "size_changed" accordingly.
      
      	* app/core/gimpchannel.c
      	* app/core/gimpdrawable-offset.c
      	* app/core/gimpdrawable-transform.c
      	* app/core/gimpimage-convert.c
      	* app/core/gimpimage-undo-push.c
      	* app/core/gimplayer.c
      	* app/text/gimptextlayer.c
      	* app/tools/gimptransformtool.c: changed accordingly: removed
      	calls to gimp_viewable_size_changed() and all sorts of hackish
      	assignments of the drawable's width/height/offset_x/offset_y
      	properties.
      1ef5fa93
    • Michael Natterer's avatar
      don't call gimp_image_flush(). · 79776036
      Michael Natterer authored
      2004-03-15  Michael Natterer  <mitch@gimp.org>
      
      	* app/text/gimptextlayer.c (gimp_text_layer_render): don't call
      	gimp_image_flush().
      
      	* app/tools/gimpxttool.c (gimp_text_tool_apply): call it here
      	instead.
      
      	Now that we have a common place that exchanges drawable->tiles,
      	we can abstract away boundary invalidation for this operation:
      
      	* app/core/gimpdrawable.c (gimp_drawable_real_set_tiles):
      	call gimp_drawable_invalidate_boundary() before setting
      	the new tiles.
      
      	* app/core/gimpchannel.c (gimp_channel_set_tiles)
      	* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste)
      	* app/core/gimpimage-undo-push.c (undo_pop_layer_mod)
      	* app/core/gimplayer.c (gimp_layer_scale) (gimp_layer_resize)
      	(gimp_layer_flip) (gimp_layer_rotate) (gimp_layer_transform)
      	* app/text/gimptextlayer.c (gimp_text_layer_render): removed
      	calls to gimp_drawable_invalidate_boundary() from all functions
      	which finally call gimp_drawable_real_set_tiles().
      
      	* app/tools/gimptransformtool.c (gimp_transform_tool_doit): no
      	need to set channel->bounds_known to FALSE, because
      	gimp_drawable_set_tiles() already did this.
      79776036
    • Michael Natterer's avatar
      added "gboolean alpha_changed" to GimpImageFlushAccumulator. Install an · 800b7a5d
      Michael Natterer authored
      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().
      800b7a5d
    • Michael Natterer's avatar
      emit "alpha_changed" if the drawable got/lost an alpha channel by setting · d376ac5d
      Michael Natterer authored
      2004-03-15  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpdrawable.c (gimp_drawable_real_set_tiles): emit
      	"alpha_changed" if the drawable got/lost an alpha channel by
      	setting the new tiles.
      
      	* app/core/gimpimage-undo-push.c (undo_pop_layer_mod)
      	* app/core/gimplayer.c (gimp_layer_add_alpha): removed explicit
      	calls to gimp_drawable_alpha_changed().
      d376ac5d
    • Michael Natterer's avatar
      Closer to text layer undo: · 43450002
      Michael Natterer authored
      2004-03-15  Michael Natterer  <mitch@gimp.org>
      
      	Closer to text layer undo:
      
      	* app/core/gimpchannel.c (gimp_channel_set_tiles): invalidate the
      	channel's boundary and bounds.
      
      	* app/text/gimptextlayer.c: implement GimpDrawable::swap_pixels()
      	and set text_layer->modified = TRUE after upchaining.
      
      	(gimp_text_layer_render): use gimp_drawable_set_tiles() and
      	set text_layer->modified = FALSE afterwards.
      
      	* app/core/gimpimage-undo-push.c: cleaned up variable declarations
      	and initializations.
      
      	(undo_pop_layer_mod)
      	(undo_pop_channel_mod): use gimp_channel_set_tiles() instead of
      	touching drawable->tiles manually. Now all pixel manipulation
      	(at least on layers) should be virtualized and can be detected by
      	the text layer.
      43450002
    • Michael Natterer's avatar
      Prepare the undo system for proper text layer undo: · a18a1d12
      Michael Natterer authored
      2004-03-15  Michael Natterer  <mitch@gimp.org>
      
      	Prepare the undo system for proper text layer undo:
      
      	* app/core/core-enums.[ch] (enum GimpUndoType): replaced
      	GIMP_UNDO_IMAGE and GIMP_UNDO_IMAGE_MOD by GIMP_UNDO_DRAWABLE.
      
      	* app/core/gimpimage-undo-push.[ch]: ditto: replaced
      	gimp_image_undo_push_image() and gimp_image_undo_push_image_mod()
      	by gimp_image_undo_push_drawable() which *always* expects to get a
      	TileManager passed. Also added g_return_if_fail()s to check if the
      	passed in tile manager follows the semantics of the "sparse"
      	boolean.
      
      	(undo_pop_drawable): removed all code and call the new
      	gimp_drawable_swap_pixels() instead (see below).
      
      	* app/core/gimpdrawable.[ch] (gimp_drawable_push_undo): if tiles
      	are NULL, create a copy of the area here and always pass tiles to
      	gimp_image_undo_push_drawable(). Added lots of g_return_if_fail()
      	here too.
      
      	Added new vitrual function GimpDrawable::swap_pixels() which
      	does what undo_pop_drawable() did.
      
      	* app/core/gimpchannel.c: implement swap_pixels() and invalidate
      	the channel's bounds and boundary.
      a18a1d12
  4. 18 Feb, 2004 1 commit
    • Sven Neumann's avatar
      tile-cache.c tile-private.h removed trailing whitespace, added some · c94f85b3
      Sven Neumann authored
      2004-02-18  Sven Neumann  <sven@gimp.org>
      
      	* tile-cache.c
      	* tile-private.h
      	* tile.[ch]: removed trailing whitespace, added some newlines,
      	let tile_is_valid() return a gboolean instead of a gint.
      
      	* app/core/gimpimage-projection.c
      	* app/core/gimpimage-undo-push.c
      	* app/paint/gimppaintcore.c
      	* app/tools/gimpinktool.c: use the return value from tile_is_valid()
      	as a boolean.
      c94f85b3
  5. 14 Feb, 2004 1 commit
    • Michael Natterer's avatar
      Fixed lots of QuickMask brokenness by letting the image adjust its · 25b81b15
      Michael Natterer authored
      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.
      25b81b15
  6. 12 Feb, 2004 1 commit
    • Michael Natterer's avatar
      Make sure that non-indexed images never have a colormap. Fixes bug · 8312e82a
      Michael Natterer authored
      2004-02-12  Michael Natterer  <mitch@gimp.org>
      
      	Make sure that non-indexed images never have a colormap.
      	Fixes bug #121033.
      
      	* app/core/gimpimage-colormap.c (gimp_image_set_colormap): set
      	image->cmap to NULL when called with a NULL colormap.
      
      	* app/core/gimpimage-undo-push.c: made colormap undo/redo aware
      	of NULL colormaps.
      
      	* app/core/gimpimage-convert.c (gimp_image_convert): remove the
      	colormap using gimp_image_set_colormap() instead of freeing it
      	manually.
      
      	* app/widgets/gimpcolormapeditor.c: always check if the image
      	is INDEXED *and* has a colormap before accessing the colormap.
      
      	(need this new check because the fixed behaviour of colormap undo
      	produces undo groups which, when being popped, make the image have
      	no colormap while still being INDEXED in the small time frame
      	between the emission of "colormap_changed" and "mode_changed").
      8312e82a
  7. 09 Feb, 2004 1 commit
  8. 26 Jan, 2004 1 commit
    • Michael Natterer's avatar
      add the layer to the image before pasting to it. Fixes bug #132504. · dc3ac419
      Michael Natterer authored
      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.
      dc3ac419
  9. 18 Jan, 2004 2 commits
    • Michael Natterer's avatar
      don't allow to select anything but the floating selection. Fixes bug · 370a16fa
      Michael Natterer authored
      2004-01-18  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage.c (gimp_image_set_active_layer): don't allow
      	to select anything but the floating selection. Fixes bug #128025.
      
      	(gimp_image_set_active_layer,channel,vectors): allow to pass NULL
      	to unselect the active item. Removed the silly feature that
      	passing some random item of another image would select the first
      	item in the list (was unused anyway).
      
      	(gimp_image_unset_active_channel): use gimp_image_set_active_channel()
      	now that it accepts NULL.
      
      	(gimp_image_add_layer,channel,vectors): cleaned up / simplified.
      
      	(gimp_image_remove_layer,channel,vectors): cleanup,
      	simplification, use gimp_image_set_active_layer,channel,vectors()
      	now that they accept NULL, make sure the item next to the removed
      	item becomes the active one (and not the first in the list, which
      	was a severe usability problem in the dialogs).
      
      	* app/core/gimpimage-undo-push.c (undo_pop_layer,channel): pass
      	NULL to the set_active functions, cleanup.
      
      	* app/core/gimpimage-duplicate.c: attach the floating selection
      	before setting the active layer. Code relied on broken
      	gimp_image_set_active_layer() behaviour before.
      
      	* app/core/gimplayer-floating-sel.c: no need to set
      	gimage->floating_sel before calling gimp_image_add_layer(). The
      	weird GUI mentioned in the comment existed in 1.2 only.
      
      	* app/display/gimpdisplayshell-layer-select.c (layer_select_advance):
      	don't assume that setting the active_layer always succeeds.
      
      	* tools/pdbgen/pdb/image.pdb: behave as the documentation says
      	and return an execution error if setting the active layer or
      	channel failed.
      
      	Unrelated:
      
      	* tools/pdbgen/pdb/image.pdb
      	* tools/pdbgen/pdb/layer.pdb: removed leftover cruft from the old
      	guchar based color API.
      
      	* tools/pdbgen/pdb/channel.pdb: simplified code which handles the
      	channel's color.
      
      	* app/pdb/channel_cmds.c
      	* app/pdb/image_cmds.c: regenerated.
      370a16fa
    • Michael Natterer's avatar
      removed broken code which tried to figure manually whether "alpha_changed" · f8e9fbc1
      Michael Natterer authored
      2004-01-18  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage-undo-push.c (undo_pop_layer): removed broken
      	code which tried to figure manually whether "alpha_changed" should
      	be emitted. Instead, simply compare the return values of
      	gimp_image_has_alpha() before and after adding/removing the
      	layer. Fixes bug #131721.
      f8e9fbc1
  10. 05 Jan, 2004 1 commit
    • Sven Neumann's avatar
      added GIMP_UNDO_TEXT_LAYER to GimpUndoType enum. · 3451c82f
      Sven Neumann authored
      2004-01-05  Sven Neumann  <sven@gimp.org>
      
      	* app/core/core-enums.[ch]: added GIMP_UNDO_TEXT_LAYER to
      	GimpUndoType enum.
      
      	* app/core/gimpimage-undo-push.[ch]: added new undo function
      	gimp_image_undo_push_text_layer().
      
      	* app/text/gimptextlayer.[ch]: renamed gimp_text_layer_render() to
      	gimp_layer_text_layer_flush().
      	Added new function gimp_text_layer_discard().
      
      	* app/text/gimptextlayer-transform.c: changed accordingly.
      
      	* app/gui/image-menu.c
      	* app/gui/layers-commands.[ch]
      	* app/gui/layers-menu.c: added menu entries that allow to discard
      	the text information of a text layer (bug #118547).
      
      	* app/widgets/gimppreviewrendererlayer.c
      	(gimp_preview_renderer_layer_render): treat text layers without a
      	text object like ordinary layers.
      
      	* app/widgets/gimppreviewrenderer-utils.c: include gimplayer.h
      	instead of gimptextlayer.h.
      3451c82f
  11. 04 Dec, 2003 1 commit
    • Michael Natterer's avatar
      optimized to reallocate the projection TileManager only if it does not · 797665de
      Michael Natterer authored
      2003-12-04  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage-projection.c (gimp_image_projection_allocate):
      	optimized to reallocate the projection TileManager only if it does
      	not match the required width, height and depth.
      
      	* app/core/gimpimage.c (gimp_image_size_changed): call
      	gimp_image_projection_allocate().
      
      	* app/core/gimpimage-crop.c
      	* app/core/gimpimage-resize.c
      	* app/core/gimpimage-rotate.c
      	* app/core/gimpimage-scale.c
      	* app/core/gimpimage-undo-push.c: removed calls to
      	gimp_image_projection_allocate(), since "size_changed" does it
      	automatically now.
      797665de
  12. 01 Dec, 2003 1 commit
    • Michael Natterer's avatar
      added a default implementation of GimpImage::mode_changed() which · 88427304
      Michael Natterer authored
      2003-12-01  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage.c: added a default implementation of
      	GimpImage::mode_changed() which reallocates the projection.
      
      	* app/core/gimpimage-convert.c (gimp_image_convert)
      	* app/core/gimpimage-undo-push.c (undo_pop_image_type): removed
      	explicit calls to gimp_image_projection_allocate().
      88427304
  13. 16 Nov, 2003 1 commit
    • Sven Neumann's avatar
      app/config/gimpbaseconfig.h use gint64 for all memsize properties. · fd30d5c9
      Sven Neumann authored
      2003-11-16  Sven Neumann  <sven@gimp.org>
      
      	* app/config/gimpbaseconfig.h
      	* app/config/gimpcoreconfig.h: use gint64 for all memsize properties.
      
      	* app/base/tile-manager.[ch] (tile_manager_get_memsize): since
      	tiles can be swapped out, a tilemanager can be larger than gsize
      	(on 32bit platforms). Use a gint64 to avoid an overflow.
      
      	* app/core/gimp.c
      	* app/core/gimpbrush.c
      	* app/core/gimpbrushpipe.c
      	* app/core/gimpbuffer.c
      	* app/core/gimpchannel.c
      	* app/core/gimpcontainer.c
      	* app/core/gimpcontext.c
      	* app/core/gimpdata.c
      	* app/core/gimpdatafactory.c
      	* app/core/gimpdrawable.c
      	* app/core/gimpgradient.c
      	* app/core/gimpimage-undo-push.c
      	* app/core/gimpimage-undo.[ch]
      	* app/core/gimpimage.c
      	* app/core/gimpitem.c
      	* app/core/gimpitemundo.[ch]
      	* app/core/gimplayer.c
      	* app/core/gimplist.c
      	* app/core/gimpobject.[ch]
      	* app/core/gimppalette.c
      	* app/core/gimpparasitelist.c
      	* app/core/gimppattern.c
      	* app/core/gimpundo.[ch]
      	* app/core/gimpundostack.c
      	* app/core/gimpviewable.c
      	* app/text/gimptext.c
      	* app/text/gimptextlayer.c
      	* app/vectors/gimpstroke.c
      	* app/vectors/gimpvectors.c: use gint64 for gimp_object_get_memsize()
      	and all its implementations.
      
      	* app/display/gimpdisplayshell-title.c
      	* app/gui/info-window.c: changed accordingly.
      fd30d5c9
  14. 13 Nov, 2003 1 commit
    • Michael Natterer's avatar
      when trying to activate the previously selected layer after a layer · 1d2c795f
      Michael Natterer authored
      2003-11-13  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage-undo-push.c (undo_pop_layer): when trying to
      	activate the previously selected layer after a layer removal, also
      	look at gimage->layer_stack, just as gimp_image_remove_layer()
      	does. Should fix regression from 1.2 when there was no avtive
      	layer after certain undo operations. Fixes bug #126781.
      	Reordered instructions to match gimp_image_remove_layer().
      
      	* app/tools/gimpbrightnesscontrasttool.c
      	* app/tools/gimpcolorbalancetool.c
      	* app/tools/gimpcolorizetool.c
      	* app/tools/gimpcurvestool.c
      	* app/tools/gimphuesaturationtool.c
      	* app/tools/gimplevelstool.c
      	* app/tools/gimpposterizetool.c
      	* app/tools/gimpthresholdtool.c: although the crash triggering bug
      	is fixed, the image_map tools should not crash when invoked
      	without active drawable: changed all _initialize() functions to
      	silently return if there is no active drawable.
      
      	Changed "drawable" to "layer" in all user visible warnings about
      	indexed or non-RGB drawables. Cleanup.
      1d2c795f
  15. 14 Oct, 2003 2 commits
    • Sven Neumann's avatar
      removed gimp_config_copy_properties() and added the more intelligent · 737da424
      Sven Neumann authored
      2003-10-14  Sven Neumann  <sven@gimp.org>
      
      	* app/config/gimpconfig-utils.[ch]: removed
      	gimp_config_copy_properties() and added the more intelligent
      	gimp_config_sync() instead.
      
      	* app/config/Makefile.am
      	* app/config/config-types.h
      	* app/config/gimpcoreconfig.[ch]
      	* app/config/gimprc-blurbs.h: replaced default image properties
      	with a single GimpTemplate object property. Changed the
      	set_property function to not replace aggregate objects but call
      	gimp_config_sync() instead.
      
      	* app/tools/gimptextoptions.c (gimp_text_options_set_property):
      	same change here.
      
      	* app/config/gimpconfig.[ch]: changed return value of
      	gimp_config_duplicate() to gpointer to avoid some casts that only
      	made the code harder to read.
      
      	* app/widgets/gimptemplateeditor.[ch]: don't keep an internal copy
      	here but edit the GimpTemplate passed when the editor was
      	constructed.
      
      	* app/gui/preferences-dialog.c: use a GimpTemplateEditor to allow
      	editing of the default image paramaters.
      
      	* app/config/gimprc.c
      	* app/core/core-types.h
      	* app/core/gimp.c
      	* app/core/gimpimage-duplicate.c
      	* app/core/gimpimage-grid.c
      	* app/core/gimpimage-new.c
      	* app/core/gimpimage-undo-push.c
      	* app/core/gimpimage.c
      	* app/core/gimptemplate.[ch]
      	* app/gui/file-new-dialog.c
      	* app/gui/grid-dialog.c
      	* app/gui/info-window.c
      	* app/gui/resize-dialog.c
      	* app/gui/templates-commands.[ch]
      	* app/gui/tool-options-commands.c
      	* app/text/gimptextlayer.c
      	* app/text/gimptextlayer.c
      	* app/tools/gimptexttool.c
      	* app/widgets/gimptemplateview.c
      	* app/xcf/xcf-load.c: changed accordingly.
      737da424
    • Sven Neumann's avatar
      removed "grid_changed" signal. The user of GimpGridEditor can connect to · f0e8517e
      Sven Neumann authored
      2003-10-14  Sven Neumann  <sven@gimp.org>
      
      	* app/widgets/gimpgrideditor.[ch]: removed "grid_changed" signal.
      	The user of GimpGridEditor can connect to notifications of the
      	grid that is being edited. There is no need for a proxy signal.
      
      	* app/core/gimpimage-grid.c (gimp_image_set_grid): don't exchange
      	the image's grid object, it is part of the image. Copy all grid
      	properties instead.
      
      	* app/core/gimpimage-undo-push.c
      	* app/gui/grid-dialog.c: changed accordingly.
      f0e8517e
  16. 06 Oct, 2003 2 commits
    • Michael Natterer's avatar
      added new virtual functions GimpDrawable::get_active_components(), · a20e04bd
      Michael Natterer authored
      2003-10-06  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpdrawable.[ch]: added new virtual functions
      	GimpDrawable::get_active_components(), apply_region() and
      	replace_region().
      
      	* app/core/Makefile.am
      	* app/core/gimpdrawable-combine.[ch]: new files containing
      	apply_region()'s and replace_region()'s default implementation.
      	They are identical to the ones removed from GimpImage except that
      	they don't mask the selection with itself (bug #107949).
      
      	* app/core/gimpchannel.c
      	* app/core/gimplayer.c: implement get_active_components().
      
      	* app/core/gimpchannel.c: implement apply_region() and
      	replace_region() and invalidate the channel's boundary
      	before upchaining (bug #107949).
      
      	* app/core/gimpimage.[ch]: removed gimp_image_apply_image(),
      	gimp_image_replace_image() and gimp_image_get_active_components().
      
      	* app/core/gimpimage-undo-push.c (undo_pop_image): invalidate
      	boundary and bounds if the drawable is a channel (bug #107949).
      
      	(undo_pop_mask)
      	(undo_pop_channel_mod): finish previous commit :)
      
      	* app/core/gimp-edit.c
      	* app/core/gimpdrawable-blend.c
      	* app/core/gimpdrawable-bucket-fill.c
      	* app/core/gimpdrawable-stroke.c
      	* app/core/gimpimagemap.c
      	* app/core/gimplayer-floating-sel.c
      	* app/paint/gimppaintcore.c
      	* app/tools/gimpinktool.c: changed accordingly.
      a20e04bd
    • Michael Natterer's avatar
      Treat changes to the selection like changes to any other drawable: · f0372cad
      Michael Natterer authored
      2003-10-06  Michael Natterer  <mitch@gimp.org>
      
      	Treat changes to the selection like changes to any other drawable:
      
      	* app/core/gimpchannel.c
      	* app/core/gimpchannel-combine.c: call gimp_drawable_update() after
      	changing the channel.
      
      	* app/core/gimpimage.[ch]: added struct GimpImageFlushAccumulator
      	with one member "gboolean mask_changed". Connect to "update" of
      	the selection and set accum.mask_changed to TRUE in the callback.
      	Added default implementation for GimpImage::flush() and emit
      	"mask_changed" there.
      
      	Unrelated:
      	* app/core/gimpimage.h: removed GimpGuide struct...
      	* app/core/gimpimage-guides.h: ...and added it here.
      
      	* app/core/gimpimage-undo-push.c (undo_pop_mask)
      	(undo_pop_channel_mod): don't distinguish between selection and
      	non-selection channels and just call gimp_drawable_update().
      
      	* app/core/gimpundo.h
      	* app/core/gimpimage-undo.c: removed "gboolean mask_changed" from
      	the GimpUndoAccumulator struct since we don't have to care about
      	that signal explicitly any more.
      
      	* app/display/gimpdisplay-foreach.[ch]: removed gimp_displays_flush().
      
      	* tools/pdbgen/pdb/display.pdb (displays_flush_invoker): call
      	gimp_image_flush() on all images so the flush accumulator is
      	honored.
      
      	This generalization enables the removal of more special purpose
      	code which was needed to treat the selection different:
      
      	* app/core/gimpimage-mask-select.[ch]: removed...
      
      	* app/core/gimpchannel-select.[ch]: ...and added under a new name
      	because it's not selection specific any more.
      
      	* app/core/gimpimage-mask.[ch]: removed...
      
      	* app/core/gimpselection.[ch]: ...added the two remaining
      	functions here. Removed all calls to gimp_image_mask_changed().
      
      	* app/core/Makefile.am
      	* app/core/gimp-edit.c
      	* app/core/gimpdrawable-transform.c
      	* app/core/gimpimage-scale.c
      	* app/core/gimpimage-snap.c
      	* app/display/gimpdisplayshell.c
      	* app/gui/channels-commands.c
      	* app/gui/layers-commands.c
      	* app/gui/select-commands.c
      	* app/gui/vectors-commands.c
      	* app/tools/gimpbycolorselecttool.c
      	* app/tools/gimpeditselectiontool.c
      	* app/tools/gimpellipseselecttool.c
      	* app/tools/gimpfreeselecttool.c
      	* app/tools/gimpfuzzyselecttool.c
      	* app/tools/gimpiscissorstool.c
      	* app/tools/gimprectselecttool.c
      	* app/tools/gimptransformtool.c
      	* app/widgets/gimpchanneltreeview.c
      	* app/widgets/gimpselectioneditor.c
      	* app/widgets/gimpvectorstreeview.c
      	* app/xcf/xcf-save.c
      	* tools/pdbgen/pdb/paths.pdb
      	* tools/pdbgen/pdb/selection.pdb
      	* tools/pdbgen/pdb/selection_tools.pdb: changed accordingly.
      
      	* app/core/gimpdrawable-bucket-fill.c
      	* app/core/gimpimage-colormap.c
      	* app/core/gimplayer-floating-sel.c
      	* app/core/gimplayer.c
      	* app/gui/image-menu.c
      	* app/paint/gimppaintcore.c
      	* app/tools/gimpcroptool.c
      	* app/tools/gimpinkoptions.c
      	* app/tools/gimpvectortool.c: removed useless and/or obsolete
      	#includes.
      
      	* app/pdb/display_cmds.c
      	* app/pdb/paths_cmds.c
      	* app/pdb/selection_cmds.c
      	* app/pdb/selection_tools_cmds.c: regenerated.
      f0372cad
  17. 11 Sep, 2003 1 commit
    • Michael Natterer's avatar
      removed "visible" and all its API... · 7cf4eb46
      Michael Natterer authored
      2003-09-11  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpdrawable.[ch]: removed "visible" and all its API...
      
      	* app/core/gimpitem.[ch]: ...and added it here.
      
      	* app/core/core-enums.[ch]
      	* app/core/gimpimage-undo-push.[ch]: changed the drawable
      	visibility undo to be an item visibility undo.
      
      	* app/xcf/xcf-load.c
      	* app/xcf/xcf-save.c: save it in PROP_VECTORS and changed channel
      	and layer loading/saving accordingly.
      
      	* app/core/gimpimage-merge.c
      	* app/core/gimpimage-preview.c
      	* app/core/gimpimage-projection.c
      	* app/core/gimpimage.c
      	* app/core/gimplayer-floating-sel.c
      	* app/core/gimplayer.c
      	* app/core/gimpselection.c
      	* app/text/gimptextlayer.c
      	* app/gui/channels-commands.c
      	* tools/pdbgen/pdb/channel.pdb
      	* tools/pdbgen/pdb/layer.pdb: changed accordingly.
      
      	* app/pdb/channel_cmds.c
      	* app/pdb/layer_cmds.c: regenerated.
      
      	* app/widgets/gimpdrawabletreeview.[ch]: removed the eye icon...
      
      	* app/widgets/gimpitemtreeview.[ch]: ...and added it here.
      7cf4eb46
  18. 06 Sep, 2003 1 commit
    • Michael Natterer's avatar
      To optimize duplicate and/or wrong image updates away, introduced new · 7a5f9148
      Michael Natterer authored
      2003-09-06  Michael Natterer  <mitch@gimp.org>
      
      	To optimize duplicate and/or wrong image updates away, introduced
      	new policy that a child object must never explicitly update or
      	invalidate its parent object (just like the GUI is not updated
      	explicitly by the core):
      
      	* app/core/gimpdrawable.[ch]: added new signal
      	GimpDrawable::update(). Never update or invalidate the image when
      	the drawable is updated or invalidated.
      
      	(gimp_drawable_set_visible): don't gimp_drawable_update() the
      	drawable since its pixels have not changed.
      
      	* app/core/gimpimage.[ch]: connect to the "add" and "remove"
      	signals of the layers and channels containers. Also connect to the
      	"update" and "visibility_changed" signals of all drawables in
      	these containers (optimizes away updates issued by drawables which
      	are not yet added to the image and updates of the selection
      	mask). Also, don't propagate updates to the image if the emitting
      	drawable is invisible (optimizes away updates issued by invisible
      	drawables).
      
      	(gimp_image_add_layer,channel)
      	(gimp_image_remove_layer,channel): don't update the image since
      	that's done by our "add" and "remove" handlers now.
      
      	(gimp_image_position_layer,channel): update just the image, not
      	the drawable since its pixels have not changed.
      
      	(gimp_image_real_colormap_changed)
      	(gimp_image_set_component_visible): always call
      	gimp_image_update() *and* gimp_viewable_invalidate_preview() to
      	get everything updated, since update and invalidate of images are
      	not connected.
      
      	* app/core/gimpimage-undo-push.c (undo_pop_layer,channel): don't
      	update the drawable since (a) its pixels don't change and (b) the
      	image updates itself upon adding/removing now.
      
      	(undo_pop_layer_mod): replaced gimp_image_update() by
      	gimp_drawable_update() (just for consistency with other similar
      	functions).
      
      	* app/core/gimplayer.c: connect to "update" of the layer mask and
      	issue updates on the layer if the mask update has any effect on
      	the projection.
      	(gimp_layer_create_mask): don't set the mask's offsets here since
      	they may be different when we later add the mask to the layer.
      
      	* app/core/gimplayermask.c (gimp_layer_mask_set_layer): set the
      	mask offsets here instead.
      
      	* app/core/gimpchannel.c (gimp_channel_translate): update the
      	channel even if push_undo == FALSE.
      
      	* app/paint/gimppaintcore.c (gimp_paint_core_finish)
      	* app/tools/gimpinktool.c (ink_finish): invalidate both the
      	drawable and the image preview since invalidating the drawable
      	doesn't invalidate the image any more.
      
      	* app/text/gimptextlayer.c (gimp_text_layer_render_now): also
      	update the new extents of the text layer, not only the old one.
      
      	(gimp_text_layer_render_layout): don't update the drawable since
      	gimp_drawable_fill() already updated it.
      7a5f9148
  19. 04 Sep, 2003 2 commits
    • Michael Natterer's avatar
      removed the _push_undo() and _invalidate() wrappers. · a33f06e7
      Michael Natterer authored
      2003-09-04  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage-mask.[ch]: removed the _push_undo() and
      	_invalidate() wrappers.
      
      	* app/core/gimpimage-mask-select.c
      	* app/core/gimpimage-undo-push.c
      	* app/core/gimplayer-floating-sel.c
      	* app/tools/gimptransformtool.c: changed accordingly.
      a33f06e7
    • Michael Natterer's avatar
      added new pure virtual function GimpDrawable::invalidate_boundary(). · f9f5089f
      Michael Natterer authored
      2003-09-04  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpdrawable.[ch]: added new pure virtual function
      	GimpDrawable::invalidate_boundary().
      
      	* app/core/gimplayer.[ch]: implement it and removed public
      	function gimp_layer_invalidate_boundary().
      
      	* app/core/gimpchannel.[ch]: implement it.
      
      	* app/core/gimpselection.[ch]: implement it and removed public
      	function gimp_selection_invalidate().
      
      	* app/core/gimpimage-mask.c (gimp_image_mask_invalidate)
      	* app/core/gimpimage-undo-push.c
      	* app/core/gimpimage.c
      	* app/core/gimplayer-floating-sel.c
      	* app/text/gimptextlayer.c: changed accordingly.
      
      	* app/core/gimpchannel.[ch]: made gimp_channel_push_undo() a
      	public function and made it call
      	gimp_drawable_invalidate_boundary(). Added undo_desc strings for
      	all undo pushing functions to GimpChannelClass.
      
      	* app/core/gimpselection.[ch]: removed gimp_selection_push_undo()
      	since after the change above it was identical to
      	gimp_channel_push_undo().  Don't push any undo here since
      	upchaining does the right thing now.  Override GimpChannelClass'
      	undo_desc strings to say "Selection".
      
      	* app/core/gimpimage-mask.c (gimp_image_mask_push_undo): changed
      	accordingly.
      f9f5089f
  20. 31 Aug, 2003 1 commit
    • Manish Singh's avatar
      gsize is unsigned, reflect that in the g_prints. · dad14a3a
      Manish Singh authored
      2003-08-31  Manish Singh  <yosh@gimp.org>
      
              * app/core/gimpimage-undo-push.c (undo_pop_layer): gsize is unsigned,
              reflect that in the g_prints.
      
              * tools/pdbgen/pdb/color.pdb: case to GIMP_BASE_CONFIG for the call
              to gimp_histogram_new, #include "core/gimpdrawable-histogram.h"
      
              * app/pdb/color_cmds.c: regenerated.
      dad14a3a
  21. 25 Aug, 2003 1 commit
    • Michael Natterer's avatar
      changed GimpObject::get_memsize() to return a second value named · 24f3da16
      Michael Natterer authored
      2003-08-25  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpobject.[ch]: changed GimpObject::get_memsize() to
      	return a second value named "gui_size", where the primary return
      	value is the "constant" actual size (as long as no operation is
      	performed on the object), and the second "gui_size" return value
      	is the size of temporary stuff like preview caches or boundary
      	segments (which may change asynchronously, even if the object is
      	on the undo stack).
      
      	* app/core/gimp.c
      	* app/core/gimpbrush.c
      	* app/core/gimpbrushpipe.c
      	* app/core/gimpbuffer.c
      	* app/core/gimpchannel.c
      	* app/core/gimpcontainer.c
      	* app/core/gimpcontext.c
      	* app/core/gimpdata.c
      	* app/core/gimpdatafactory.c
      	* app/core/gimpdrawable.c
      	* app/core/gimpgradient.c
      	* app/core/gimpimage-undo.c
      	* app/core/gimpimage.c
      	* app/core/gimpitem.c
      	* app/core/gimplayer.c
      	* app/core/gimplist.c
      	* app/core/gimppalette.c
      	* app/core/gimpparasitelist.c
      	* app/core/gimppattern.c
      	* app/core/gimpundo.c
      	* app/core/gimpundostack.c
      	* app/core/gimpviewable.c
      	* app/text/gimptextlayer.c
      	* app/vectors/gimpstroke.c
      	* app/vectors/gimpvectors.c: changed get_memsize() implementations
      	accordingly.
      
      	* app/display/gimpdisplayshell-title.c
      	* app/gui/debug-commands.c
      	* app/widgets/gimppreview.c: changed callers accordingly.
      
      	* app/core/gimpimage-undo-push.c: changed layer, channel, vectors
      	and layer_mask undo steps to add/subtract the size of the
      	resp. objects whenever they take/drop ownership of them. Ignore
      	the objects' "gui_size" to get identical sizes on
      	adding/subtracting. Fixes bug #120429.
      24f3da16
  22. 25 Jul, 2003 1 commit
    • Michael Natterer's avatar
      app/core/gimpimage-undo-push.c (gimp_image_remove_layer) · 7a9e1ceb
      Michael Natterer authored
      2003-07-25  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage-undo-push.c (gimp_image_remove_layer)
      	* app/core/gimpimage.c (undo_pop_layer)
      	* app/text/gimptextlayer.c (gimp_text_layer_render):
      	gimp_layer_invalidate_boundary() must be called whenever a layer
      	gets translated, resized or removed. Fixes stale layer outlines in
      	the canvas padding area.
      7a9e1ceb
  23. 04 Jul, 2003 1 commit
    • Henrik Brix Andersen's avatar
      Added persistent storage of image grid in XCF files. · 5943f031
      Henrik Brix Andersen authored
      2003-07-04 Henrik Brix Andersen <brix@gimp.org>
      
      Added persistent storage of image grid in XCF files.
      
      * app/core/gimpimage.[ch]: removed gimp_image_get_grid() and
      gimp_image_set_grid() ...
      
      * app/core/Makefile.am
      * app/core/gimpimage-grid.[ch]: ... and added them to these new
      files. Added gimp_grid_parasite_name(), gimp_grid_to_parasite()
      and gimp_grid_from_parasite() functions.
      
      * app/core/gimpimage-snap.c
      * app/gui/grid-dialog.c: #include "gimpimage-grid.h"
      
      * app/core/gimpimage-undo-push.c: #include "gimpimage-grid.h".
      (gimp_image_undo_push_image_grid) mark image as dirty.
      
      * app/xcf/xcf-save.c (xcf_save_image_props): save GimpGrid object
      as a parasite.
      
      * app/xcf/xcf-load.c (xcf_load_image): load GimpGrid from
      parasite.
      
      * devel-docs/parasites.txt: documented the new "gimp-image-grid"
      parasite.
      5943f031
  24. 23 Jun, 2003 3 commits
    • Michael Natterer's avatar
      app/core/gimpimage-undo-push.c (undo_pop_image_grid) ref/unref the grid. · a1c1fe4c
      Michael Natterer authored
      2003-06-24  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage-undo-push.c (undo_pop_image_grid)
      	* app/core/gimpimage.c (gimp_image_set_grid): ref/unref the grid.
      
      	* app/gui/view-commands.c (view_configure_grid_cmd_callback): set
      	the dialog transient for the shell, make shell->grid_dialog a
      	weak pointer of the grid dialog.
      
      	* app/gui/grid-dialog.c: don't set shell->grid_dialog to NULL
      	here, attach the grid using g_object_set_data_full() and don't
      	unref it explicitely. Use gimp_config_is_equal_to() instead of
      	gimp_config_diff().
      a1c1fe4c
    • Henrik Brix Andersen's avatar
      derive GimpGrid from GimpObject (not GObject) allowing us to use · e985b88e
      Henrik Brix Andersen authored
      * app/core/gimpgrid.[ch]: derive GimpGrid from GimpObject (not
      GObject) allowing us to use gimp_object_get_memsize(). Added
      missing copyright notice.
      
      * app/core/gimpimage.c: only call gimp_object_get_memsize() if
      gimage->grid != NULL.
      
      * app/gui/grid-dialog.c: added mnemonics, set shell->grid_dialog
      to NULL when destroyed.
      
      * app/gui/view-commands.c (view_configure_grid_cmd_callback):
      added call to gtk_window_present().
      e985b88e
    • Henrik Brix Andersen's avatar
      Added a per image configurable grid. · edd5c339
      Henrik Brix Andersen authored
      This fixes bug #65198
      
      * app/core/Makefile.am
      * app/core/core-types.h:
      * app/core/gimpgrid.[ch]: added new class GimpGrid.
      
      * app/core/core-enums.[ch]: added new enum GimpGridType.
      
      * app/core/gimpimage-guides.[ch]: removed the gimp_image_snap_*()
      functions...
      
      * app/core/gimpimage-snap.[ch]: ...and added them here since they
      are no longer guide specific.
      
      * app/core/gimpimage-undo-push.[ch]: added
      gimp_image_undo_push_image_grid()
      
      * app/display/gimpdisplayshell-handlers.c:
      * app/core/gimpimage.[ch]: added grid member to _GimpImage. Added
      new signal "grid_changed", added gimp_image_grid_changed(),
      gimp_image_get_grid() and gimp_image_set_grid().
      
      * app/display/gimpdisplayshell-appearance.[ch]: added
      gimp_display_shell_set_show_grid(),
      gimp_display_shell_get_show_grid(),
      gimp_display_shell_set_snap_to_grid() and
      gimp_display_shell_get_snap_to_grid().
      
      * app/display/gimpdisplayshell-callbacks.c: added call to
      gimp_display_shell_draw_grid()
      
      * app/display/gimpdisplayshell.[ch]: added grid member to
      _GimpDisplayShellVisibility, added snap_to_grid and grid_dialog
      members to _GimpDisplayShell, added
      gimp_display_shell_draw_grid(), modified
      gimp_display_shell_snap_coords() to use the new
      gimp_image_snap_*() functions.
      
      * app/gui/image-menu.c: added grid entries to
      image_menu_entries[].
      
      * app/gui/view-commands.[ch]: added
      view_configure_grid_cmd_callback(),
      view_toggle_grid_cmd_callback() and
      view_snap_to_grid_cmd_callback().
      
      * app/gui/Makefile.am
      * app/gui/grid-dialog.[ch]: added a grid dialog.
      edd5c339
  25. 26 May, 2003 1 commit
    • Michael Natterer's avatar
      added "gint ref_count" to the TileManager struct. · 707e5976
      Michael Natterer authored
      2003-05-26  Michael Natterer  <mitch@gimp.org>
      
      	* app/base/tile-manager-private.h: added "gint ref_count" to the
      	TileManager struct.
      
      	* app/base/tile-manager.[ch]: replaced tile_manager_destroy()
      	by tile_manager_ref() and tile_manager_unref().
      
      	* app/core/gimpimage-undo-push.c: ref the tile managers stored in
      	the undo system and DON'T destroy them if no undo could be pushed.
      	Should fix the remaining crashes with undo disabled like in
      	bug #9350.
      
      	(!!!) Note that the tiles passed to gimp_image_undo_push_image()
      	and gimp_drawable_push_undo() as well as the tile managers of
      	drawables passed to gimp_image_undo_push_[layer|channel]_mod()
      	must be unref'ed by the caller now.
      
      	* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste):
      	don't take ownership of the passed tiles but ref them if needed.
      
      	(!!!) Callers must unref the passed tiles themselves now.
      
      	* app/core/gimpbuffer.c
      	* app/core/gimpdrawable-blend.c
      	* app/core/gimpdrawable-bucket-fill.c
      	* app/core/gimpdrawable-offset.c
      	* app/core/gimpdrawable.c
      	* app/core/gimpedit.c
      	* app/core/gimpimage-convert.c
      	* app/core/gimpimage-mask.c
      	* app/core/gimpimage-projection.c
      	* app/core/gimpimage.c
      	* app/core/gimpimagemap.c
      	* app/core/gimplayer-floating-sel.c
      	* app/core/gimplayer.c
      	* app/paint/gimppaintcore.c
      	* app/text/gimptextlayer.c
      	* app/tools/gimpinktool.c
      	* app/tools/gimpiscissorstool.c
      	* app/tools/gimptransformtool-undo.c
      	* app/tools/gimptransformtool.c: changed accordingly.
      707e5976