Commit Graph

33 Commits

Author SHA1 Message Date
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer b4580e74e6 app: implement converting images between precisions, including menu items 2012-05-02 17:51:16 +02:00
Michael Natterer 42a5f01be3 app: rename TempBuf to GimpTempBuf 2012-05-02 17:51:00 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Michael Natterer 37cff850af remove members "quick_mask_changed" and "alpha_changed" (the former was
2008-11-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpundo.h (struct GimpUndoAccumulator): remove members
	"quick_mask_changed" and "alpha_changed" (the former was unused
	and the latter is entirely handled by the image's flush
	accumulator now.

	* app/core/gimpimage-undo.c
	* app/core/gimplayerundo.c: changed accordingly.


svn path=/trunk/; revision=27690
2008-11-19 23:39:28 +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
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
Sven Neumann 4bb1692f2d made time a property and added utility functions to work the undo's age.
2007-02-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpundo.[ch]: made time a property and added utility
	functions to work the undo's age.
	
	* app/tools/gimptexttool.c: use the utility functions.


svn path=/trunk/; revision=21854
2007-02-06 09:05:04 +00:00
Michael Natterer bdc91d6c52 Remove support for the old undo pop and free cruft:
2007-02-03  Michael Natterer  <mitch@gimp.org>

	Remove support for the old undo pop and free cruft:

	* app/core/core-types.h: remove typedefs GimpUndoPopFunc and
	GimpUndoFreeFunc.

	* app/core/gimpundo.[ch]: remove members and properties size,
	data, pop_func and free_func.

	* app/core/gimpimage-undo.[ch] (gimp_image_undo_push): remove
	parameters size, struct_size, pop_func and free_func.

	* app/core/gimpimage-undo-push.c
	* app/tools/gimptransformtool.c
	* app/paint/gimpink.c
	* app/paint/gimppaintcore.c: change calls to above function
	accordingly.


svn path=/trunk/; revision=21845
2007-02-03 22:25:32 +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 b53aa45a76 Changed GimpViewable preview rendering to have a context to get
2006-08-29  Michael Natterer  <mitch@gimp.org>

	Changed GimpViewable preview rendering to have a context to get
	FG/BG/whatever from. Use the context to enable dynamic FG/BG
	colors in gradients. Fixes bug #127676 and bug #352214. Addresses
	bug #128367 (doesn't fix it because there's no loading/saving and
	no GUI yet).

	* app/core/core-enums.[ch]: added enum GimpGradientColor to enable
	specifying gradient colors in terms of foreground and background.

	* app/core/gimpgradient.[ch]: added color_type members to the
	GimpGradientSegment struct and honor them in
	gimp_gradient_get_color_at(). Added GimpContext parameters to all
	functions which finally call get_color_at().

	* app/core/gimp-gradients.c: use the new method to implement the
	builtin gradients.

	* app/core/gimpviewable.[ch]: added GimpContext parameters to all
	get_preview() and get_pixbuf() functions.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-preview.[ch]
	* app/core/gimpgradient.c
	* app/core/gimpimage-preview.[ch]
	* app/core/gimpimagefile.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpundo.[ch]
	* app/text/gimpfont.c
	* app/vectors/gimpvectors-preview.[ch]: changed ::get_preview()
	and ::get_pixbuf() implementations accordingly.

	* app/core/gimpdrawable-blend.c
	* app/core/gimppalette-import.[ch]
	* app/dialogs/dialogs-constructors.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/resize-dialog.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpnavigationeditor.c
	* app/paint/gimppaintoptions.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimptexttool.c
	* app/actions/gradient-editor-commands.c
	* app/widgets/gimpaction.c
	* app/widgets/gimpbrusheditor.[ch]
	* app/widgets/gimpbufferview.c
	* app/widgets/gimpcellrendererviewable.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpclipboard.c
	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainerbox.c
	* app/widgets/gimpcontainercombobox.c
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainerentry.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainertreeview.[ch]
	* app/widgets/gimpdataeditor.[ch]
	* app/widgets/gimpdevicestatus.c
	* app/widgets/gimpdnd.[ch]
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpgradienteditor.[ch]
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimppaletteeditor.[ch]
	* app/widgets/gimppropwidgets.[ch]
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpthumbbox.[ch]
	* app/widgets/gimptoolbox-image-area.c
	* app/widgets/gimptoolbox-indicator-area.c
	* app/widgets/gimptooloptionseditor.c
	* app/widgets/gimpundoeditor.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpview-popup.[ch]
	* app/widgets/gimpview.[ch]
	* app/widgets/gimpviewablebutton.c
	* app/widgets/gimpviewabledialog.c
	* app/widgets/gimpviewrenderer.[ch]
	* app/widgets/gimpviewrenderer-frame.c
	* app/widgets/gimpviewrendererbrush.c
	* app/widgets/gimpviewrendererbuffer.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderergradient.c
	* app/widgets/gimpviewrendererimage.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb: added tons of GimpContext members
	and parameters, implement GimpDocked::set_context() in many
	widgets. Pass these locally remembered contexts to GimpViewable
	functions. Did some minor cleanups on the way. There are still
	some minor FIXMEs around where the code uses a NULL context (which
	is allowed by the APIs)

	* app/pdb/drawable_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/image_cmds.c: regenerated.
2006-08-29 21:44:51 +00:00
William Skaggs 701b7b31d7 Bill Skaggs <weskaggs@primate.ucdavis.edu>
Finally implemented the suggestion in bug #144854, of
	"strong" undo/redo commands that continue undoing so long
	as they only encounter visibility changes.

	* app/actions/edit-actions.c
	* app/actions/edit-commands.c
	* app/actions/edit-commands.h: added "strong undo"
	and "strong redo" commands/actions.

	* app/core/gimpimage-undo.[ch]: added functions
	gimp_image_strong_undo() and gimp_image_strong_redo().

	* app/core/gimpundo.[ch]: added utility function
	gimp_undo_is_weak().

	* app/widgets/gimphelp-ids.h:added id's.

	* menus/image-menu.xml.in: added to edit menu,
	bound to C-S-z and C-S-y.

	This will no doubt need tweaking, but I will consider it
	to fix bug #144854.
2006-06-13 02:03:44 +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 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 a81e96450a removed member "guint time"...
2004-07-12  Michael Natterer  <mitch@gimp.org>

	* app/text/gimptextundo.[ch]: removed member "guint time"...

	* app/core/gimpundo.[ch]: ...and added it here.

	* app/tools/gimptexttool.c (gimp_text_tool_apply): changed
	accordingly. Reordered undo compression code to look like other
	pieces of code which do undo compression.
2004-07-12 17:10:34 +00:00
Michael Natterer da74f1269e app/core/gimpundo.[ch] app/core/gimpitemundo.[ch] removed all _new()
2004-07-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpundo.[ch]
	* app/core/gimpitemundo.[ch]
	* app/text/gimptextundo.[ch]: removed all _new() functions and
	added properties and GObject::constructor() implementations
	instead.

	* app/core/gimpimage-undo.[ch] (gimp_image_undo_push): added
	"GType undo_gtype" parameter and allow to pass name-value pairs as
	"...". Une the new GParameter utility functions to construct the
	appropriate undo step with g_object_newv().

	(gimp_image_undo_push_item): removed.

	(gimp_image_undo_push_undo): removed. Merged its code back into
	gimp_image_undo_push(), where it originally came from.

	* app/core/gimpimage-undo-push.c
	* app/core/gimpundostack.c
	* app/paint/gimppaintcore-undo.c
	* app/tools/gimptransformtool-undo.c
	* app/widgets/gimpundoeditor.c: changed accordingly.
2004-07-12 16:59:36 +00:00
Sven Neumann 2326e1b979 added gimp_undo_type_to_name() a similar function used to live in
2004-03-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimpundo.[ch]: added gimp_undo_type_to_name() a similar
	function used to live in gimpimage-undo.[ch].

	* app/core/gimpitemundo.c (gimp_item_undo_new): allow NULL as name
	and generate it from the undo_type then.

	* app/core/gimpimage-undo.[ch]: added gimp_image_undo_push_undu(),
	new function that allows to push an undo on the image.

	* app/text/Makefile.am
	* app/text/text-types.h
	* app/text/gimptextundo.[ch]: added GimpTextUndo, derived from
	GimpItemUndo.

	* app/core/gimpimage-undo-push.c (gimp_image_undo_push_text_layer):
	use the new code and simply push a text undo here.

	* app/tools/gimptexttool.c: compress text undos by peeking at the
	undo stack. Fixes bug #137766.
2004-03-21 23:14:21 +00:00
Simon Budig 5e47b5a0ed Make it possible to refresh the preview of an undo step.
2004-03-20  Simon Budig  <simon@gimp.org>

	* app/core/gimpundo.[ch]: Make it possible to refresh the preview
	of an undo step.

	* app/tools/gimpeditselectiontool.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c: refresh the preview when
	compressing undos. This ensures that the last preview in the undo
	history always reflects the current state of the image.
2004-03-19 23:42:42 +00:00
Sven Neumann 28bb855aae Made size of undo previews configurable. Not dynamic for now, but at least
2004-03-07  Sven Neumann  <sven@gimp.org>

	Made size of undo previews configurable. Not dynamic for now, but
	at least not hardcoded any longer. Fixes bug #119905:

	* app/config/gimpcoreconfig.[ch]
	* app/config/gimprc-blurbs.h: added "undo-preview-size" property.

	* app/core/gimpundo.[ch]: use the new property instead of a
	hardcoded value.

	* app/widgets/gimpundoeditor.[ch]: added a "preview-size"
	construct property.

	* app/gui/dialogs-constructors.c: changed accordingly.

	* app/gui/preferences-dialog.c: added a widget to control the undo
	preview size.
2004-03-07 15:33:04 +00:00
Sven Neumann fd30d5c976 app/config/gimpbaseconfig.h use gint64 for all memsize properties.
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.
2003-11-16 17:51:36 +00:00
Michael Natterer f0372cad0f Treat changes to the selection like changes to any other drawable:
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.
2003-10-06 12:17:11 +00:00
Michael Natterer c27429c89a #define GIMP_UNDO_PREVIEW_SIZE 64
2003-04-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpundo.h: #define GIMP_UNDO_PREVIEW_SIZE 64

	* app/core/gimpundo.c (gimp_undo_create_preview_private):
	* app/widgets/gimpundoeditor.c (gimp_undo_editor_init): use it.
2003-04-04 20:30:44 +00:00
Michael Natterer c8b4394d71 Reimplemented the undo history:
2003-02-20  Michael Natterer  <mitch@gimp.org>

	Reimplemented the undo history:

	* app/Makefile.am
	* app/undo_history.[ch]: removed.

	Changes/cleanups to the undo system to enable/simplify the new
	undo history implementation:

	* app/core/core-types.h: removed enum undo_event_t. Removed the
	GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc
	because GimpUndo has a GimpImage pointer now (see below).

	* app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an
	enum value for REDO_EXPIRED.

	* app/core/gimpimage.[ch]: added a GimpUndo pointer to the
	"undo_event" signal which needs to be passed for all events except
	UNDO_FREE.

	* app/display/gimpdisplayshell-handlers.c: changed accordingly.

	* app/core/gimpundo.[ch]: added a GimpImage pointer to the
	GimpUndo struct. Removed GimpImage parameters all over the
	place. Added preview stuff. The preview creation needs to be
	triggered explicitly using gimp_undo_create_preview() because the
	GimpUndo can't know when it's possible to create the preview.

	* app/core/gimpimage-undo-push.c
	* app/paint/gimppaintcore-undo.c
	* app/tools/gimptransformtool-undo.c: changed accordingly, cleanup.

	* app/core/gimpundostack.[ch]: ditto. Return the freed undo from
	gimp_undo_stack_free_bottom(). Removed unused container signal
	handlers.

	* app/core/gimpimage-undo.c: free the redo stack the same way old
	undos are freed (from bottom up). Emit "undo_event" with event ==
	REDO_EXPIRED for each removed redo.

	* app/core/gimpmarshal.list: added new marshallers.

	New undo history implementation:

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpundoeditor.[ch]
	* app/widgets/gimpundopreview.[ch]: new widgets for the undo
	step previews and the history itself.

	* app/widgets/gimppreview-utils.c: added GimpUndoPreview to the
	list of possible preview types.

	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs-menu.c
	* app/gui/dialogs.c
	* app/gui/image-menu.c
	* app/gui/toolbox-menu.c: removed the old and added the new undo
	history to the dialog factory and the various dialog menus.

	* app/widgets/gimpdnd.[ch]: don't warn if a GType has no
	corresponding DND type. Instead, return FALSE from the function
	that failed.

	* app/widgets/gimppreview.c: check the return value of gimpdnd
	functions.  Not only add drag sources but also remove them when no
	longer needed.

	* app/widgets/gimpselectioneditor.h: removed unneeded inclusion of
	"gui/gui-types.h".
2003-02-20 12:47:42 +00:00
Michael Natterer be70105d3b Moved the undo system to the core: Keep GimpUndoStack objects as undo and
2003-02-12  Michael Natterer  <mitch@gimp.org>

	Moved the undo system to the core: Keep GimpUndoStack objects as
	undo and redo stack. Use GimpUndo objects as members of the
	stacks. GimpUndoStack is derived from GimpUndo and keeps undo
	groups, so undo group handling is much simpler than before
	(the whole group is just a single GimpUndo object on the
	stack and not everything between group boundary markers).

	* app/Makefile.am
	* app/undo_types.h: removed.

	* app/config/gimpcoreconfig.[ch]: added "gulong undo_size".
	* app/config/gimprc-blurbs.h: and its blurb.

	* app/core/core-enums.[ch]: added GimpUndoMode and GimpUndoType.

	* app/core/core-types.h: removed UndoType, added GimpUndoAccumulator,
	GimpUndoPopFunc and GimpUndoFreeFunc.

	* app/core/gimpundo.[ch]: do everything the old "Undo" struct did.
	Removed the virtual push() function and added free().

	* app/core/gimpundostack.[ch]: keeps the new undo/redo stacks
	and also acts as undo group.

	* app/core/gimpimage-undo.[ch]: moved the undo apparatus here.

	* app/core/gimpimage.[ch]: removed the old stuff.

	* app/core/gimpmarshal.list: added marshaller needed for GimpUndo.

	* app/undo.[ch]: removed the whole undo mechanism. Only the
	actual undo pushing functions are left.

	* app/undo_history.c
	* app/gui/edit-commands.c
	* app/gui/file-commands.c
	* app/gui/image-menu.c
	* app/gui/preferences-dialog.c
	* app/tools/gimpeditselectiontool.c: changed accordingly.
2003-02-12 17:11:34 +00:00
Michael Natterer be87dfb5fb pass a GdkGC to gdk_draw_rgb_image(), fixed dither offsets.
2002-01-30  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpcolorarea.c: pass a GdkGC to
	gdk_draw_rgb_image(), fixed dither offsets.

	* app/core/gimpobject.[ch]: new virtual function
	gimp_object_get_memsize().

	* app/base/temp-buf.[ch]
	* app/base/tile-manager.[ch]: added *_get_memsize() methods.

	* 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.c
	* app/core/gimplayer.c
	* app/core/gimplist.c
	* app/core/gimpmoduleinfo.c
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimppreviewcache.[ch]
	* app/core/gimpundo.[ch]
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c: added get_memsize() implementations.

	* app/widgets/gimppreview.c
	* app/core/gimpobject.[ch]: some #ifdef DEBUG_MEMSIZE code to
	test the new memsize stuff (middle click any preview to get
	it's viewable's memory footprint).
2002-01-30 16:14:26 +00:00
Sven Neumann 4ba6db4e94 Michael Natterer <mitch@gimp.org>
2001-12-03  Sven Neumann  <sven@gimp.org>
	    Michael Natterer <mitch@gimp.org>

	* app/paint-funcs/paint-funcs-mmx.h: removed redefiniton of HAS_ALPHA
	macro.

	* app/core/gimp.c: reverted Daniel's change; it doesn't make the code
	simpler, only more error-prone.

	* app/gui/info-dialog.h
	* app/gui/resize-dialog.h
	* app/core/gimp.h
	* app/core/gimpbrushgenerated.h
	* app/core/gimpbrushpipe.h
	* app/core/gimpchannel.[ch]
	* app/core/gimpcontainer.h
	* app/core/gimpcoreconfig.h
	* app/core/gimpdata.h
	* app/core/gimpdatafactory.[ch]
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable.[ch]
	* app/core/gimpimage.h
	* app/core/gimpimagefile.h
	* app/core/gimplayer.h
	* app/core/gimplayermask.h
	* app/core/gimpmoduleinfo.h
	* app/core/gimppalette.h
	* app/core/gimpundo.h
	* app/widgets/gimpbrushfactoryview.h
	* app/widgets/gimpconstrainedhwrapbox.h
	* app/widgets/gimpcontainermenu.h
	* app/widgets/gimpcontainerview.h
	* app/widgets/gimpdialogfactory.h
	* app/widgets/gimpimagedock.h
	* app/widgets/gimplistitem.h
	* app/widgets/gimpmenuitem.h
	* app/widgets/gimpnavigationpreview.h
	* app/widgets/gimppreview.h
	* app/gimprc.h
	* app/pathP.h
	* app/tools/gimpbezierselecttool.h
	* app/tools/gimpcolorbalancetool.h
	* app/tools/gimpcurvestool.h
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpfreeselecttool.h
	* app/tools/gimphuesaturationtool.h
	* app/tools/gimpinktool-blob.h
	* app/tools/gimpinktool.h
	* app/tools/gimpiscissorstool.h
	* app/tools/gimpmagnifytool.h
	* app/tools/gimpmeasuretool.h
	* app/tools/gimppainttool.h
	* app/tools/gimppathtool.h
	* app/tools/gimprectselecttool.h
	* app/tools/gimpthresholdtool.h
	* app/tools/gimptool.h
	* app/tools/gimptransformtool.h
	* app/base/base-config.h
	* app/base/gimplut.[ch]
	* app/base/pixel-region.h
	* app/base/pixel-surround.[ch]
	* app/base/temp-buf.[ch]
	* app/base/tile-manager-private.h
	* app/base/tile-manager.[ch]
	* app/base/tile-private.h
	* app/base/tile.[ch]
	* app/display/gimpdisplay.h
	* app/display/gimpdisplayshell-selection.h
	* app/display/gimpdisplayshell.h
	* app/gui/brush-select.h
	* app/gui/gradient-editor.h
	* app/gui/gradient-select.h: reverted most of Daniel's changes.

	There's no reason to use unsigned integers here and in lots of places
	it is even wrong.

	Then it's way too early to convert gbooleans into bitfields. This
	change may make sense in a few places but can happen later when the
	API has settled and the code is more stable.

	* app/gimprc.c: reverted Daniel's change. This is a GCC-ism and this
	code is about to die soon anyway.
2001-12-03 13:44:59 +00:00
Daniel Egger 1ed9180112 Convert ugly comments into named structure fields. Much cleaner and less
2001-12-02  Daniel Egger  <degger@fhm.edu>

	* app/gimprc.c: Convert ugly comments into named structure fields.
	Much cleaner and less errorprone though may cause troubles on
	older compilers and then needs to be reverted. Please report!

	* app/base/base-types.h: Add FIXME reminder.

	* app/base/gimplut.c: Use CLAMP macro instead of if-cascade.

	* app/base/temp-buf.c: Remove duplicated calculations and simplify
	checks.

	* app/base/tile-manager.c:
	- (tile_manager_get_tile_num): Return success and take an additional
	  pointer for the tilenumber.
	- Simplify logic in the rest of the file as a result.
	- Remove rotten debugging cruft.

	* app/core/gimpbrushgenerated.c: Fix two stylistic nits.

	* app/app_procs.c: Include <stdlib.h> for exit () prototype.

	* app/core/gimpdrawable-blend.c: Include <stdlib.h> for abs ()
	prototype.

	* app/display/gimpdisplay.c: Include <string.h> for memcpy ()
	prototype.

	* app/core/gimpimage-convert.c: (HIST_RGB): First parameter is
	not const. Fixes a gcc warning for a wrong return value.

	* libgimpwidgets/gimpunitmenu.c
	* app/core/gimpunit.c: Add suggested (by gcc 3.1 cvs) parentheses
	to group correct logic tests together.

	* app/paint-funcs/paint-funcs-generic.h: Fix my HAS_ALPHA macro
	to avoid gcc 3.1 cvs warning.

	* app/gimprc.h
	* pathP.h
	* base-config.h
	* app/base/boundary.h
	* app/base/gimplut.[ch]
	* app/base/pixel-region.h
	* app/base/pixel-surround.[ch]
	* app/base/temp-buf.[ch]
	* app/base/tile-manager-private.h
	* app/base/tile-manager.c
	* app/base/tile-private.h
	* app/base/tile.[ch]
	* app/core/gimp.h
	* app/core/gimpbrushgenerated.h
	* app/core/gimpbrushpipe.h
	* app/core/gimpchannel.[ch]
	* app/core/gimpcontainer.h
	* app/core/gimpcoreconfig.h
	* app/core/gimpdata.h
	* app/core/gimpdatafactory.[ch]
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable.[ch]
	* app/core/gimpimage.h
	* app/core/gimpimagefile.h
	* app/core/gimplayer.h
	* app/core/gimplayermask.h
	* app/core/gimpmoduleinfo.h
	* app/core/gimppalette.h
	* app/core/gimpundo.h
	* app/display/gimpdisplay.h
	* app/display/gimpdisplayshell-selection.h
	* app/display/gimpdisplayshell.h
	* app/gui/brush-select.h
	* app/gui/gradient-editor.h
	* app/gui/gradient-select.h
	* app/gui/info-dialog.h
	* app/gui/resize-dialog.h
	* app/tools/gimpbezierselecttool.h
	* app/tools/gimpcolorbalancetool.h
	* app/tools/gimpcolorpickertool.h
	* app/tools/gimpcurvestool.h
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpfreeselecttool.h
	* app/tools/gimpfuzzyselecttool.h
	* app/tools/gimphuesaturationtool.h
	* app/tools/gimpinktool-blob.h
	* app/tools/gimpinktool.h
	* app/tools/gimpiscissorstool.h
	* app/tools/gimpmagnifytool.h
	* app/tools/gimpmeasuretool.h
	* app/tools/gimppainttool.h
	* app/tools/gimppathtool.h
	* app/tools/gimprectselecttool.h
	* app/tools/gimpthresholdtool.h
	* app/tools/gimptool.h
	* app/tools/gimptransformtool.h
	* app/tools/path_toolP.h
	* app/widgets/gimpbrushfactoryview.h
	* app/widgets/gimpconstrainedhwrapbox.h
	* app/widgets/gimpcontainermenu.h
	* app/widgets/gimpcontainerview.h
	* app/widgets/gimpdialogfactory.h
	* app/widgets/gimpimagedock.h
	* app/widgets/gimplistitem.h
	* app/widgets/gimpmenuitem.h
	* app/widgets/gimpnavigationpreview.h
	* app/widgets/gimppreview.h: Unsignify lots of variables and
	parameters and use bitfields in structs where possible. First
	part of a huge cleanup all over the code...
2001-12-02 14:59:30 +00:00
Sven Neumann 757017a8e2 bumped version number to 1.3.1. Require Glib/GTK+-1.3.11 and Pango-0.22.
2001-11-23  Sven Neumann  <sven@gimp.org>

	* configure.in: bumped version number to 1.3.1.
	Require Glib/GTK+-1.3.11 and Pango-0.22. Removed GDK_DISABLE_COMPAT_H
	and GTK_DISABLE_COMPAT_H from our default CFLAGS since they don't
	exist any longer.

	* RELEASE-TO-CVS.patch: removed since the glib/gtk+ API is supposed to
	be frozen now.

	* HACKING: removed reference to RELEASE-TO-CVS.patch

	* app/gui/menus.c
	* app/tools/gimptexttool.c: applied RELEASE-TO-CVS.patch to conform
	to the new GTK+/Pango API.

	* app/core/Makefile.am: generate marshallers with gimp_marshal prefix.

	* app/core/gimpmarshal.list: added all marshallers we use.

	* app/core/gimpmarshal.[ch]: regenerated.

	* app/[lots of .c files]: use gimp_marshal_* for all marshallers.

	* data/images/
	* app/app_procs.c
	* app/gui/splash.c:

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase.h
	* libgimpbase/gimputils.[ch]: removed since they are no longer needed.

	* app/gimprc.c
	* plug-ins/common/ps.c
	* plug-ins/gdyntext/gdyntext.c
	* plug-ins/gdyntext/gdyntextcompat.c
	* plug-ins/gfig/gfig.c
	* plug-ins/gflare/gflare.c
	* plug-ins/script-fu/script-fu-scripts.c: use glib functions instead
	of gimp_strescape() and gimpstrcompress().

	* cleaned up all header files: use G_BEGIN_DECLS/G_END_DECLS, declared
	all _get_type function as G_GNUC_CONST.

	* tools/pdbgen/enumcode.pl
	* tools/pdbgen/lib.pl: make them generate header files using
	G_BEGIN_DECLS/G_END_DECLS.

	* pixmaps/Makefile.am
	* pixmaps/wilber3.xpm: removed ...
	* data/images/tips_wilber.png: ... and added here as PNG

	* app/gui/tips-dialog.c: load the Wilber on demand using GdkPixbuf.

	* data/images/gimp_splash.ppm: removed ...
	* data/images/gimp_splash.png: ... and added as PNG

	* app/app_procs.c
	* app/gui/splash.[ch]: load the splash image using GdkPixbuf.

	* app/gui/about-dialog.c: sink the GtkPreview.
2001-11-22 23:46:13 +00:00
Michael Natterer 357f463d59 added a TODO entry about additional image/file info.
2001-08-11  Michael Natterer  <mitch@gimp.org>

	* TODO.xml: added a TODO entry about additional image/file info.

	* app/file-save.c: #include "core/gimpdocuments.h"

	* app/core/gimpcontainer.[ch]: made virtual functions out of some
	signals.

	* app/core/*.[ch]: more GObject stuff: ported all
	gimp_foo_get_type() functions and replaced almost all "destroy"
	implementations with either "finalize" or "dispose" functions.
2001-08-11 14:39:19 +00:00
Michael Natterer 6e6749f953 gtkrc updated for gtk+ 2.0, added a "gimp-" prefix to all global GIMP
2001-07-25  Michael Natterer  <mitch@gimp.org>

	* gtkrc
	* gtkrc_user: updated for gtk+ 2.0, added a "gimp-" prefix to
	all global GIMP styles.

	* app/app_procs.c: typo.

	* app/user_install.c
	* app/gui/resolution-calibrate-dialog.[ch]: use GtkRcStyle along
	with gtk_widget_get_modifier_style()/gtk_widget_modify_style() as
	recommended instead of messing with the widgets' styles directly.

	* app/core/gimpdatalist.[ch]
	* app/core/gimpparasitelist.[ch]
	* app/core/gimpundo.[ch]
	* app/core/gimpundostack.[ch]: GObject porting stuff.
2001-07-25 15:22:55 +00:00
Michael Natterer 06b16890ba Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24  Michael Natterer  <mitch@gimp.org>

	Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)

	* configure.in: require glib/gtk+ >= 1.3.7, commented out the
	gtkxmhtml stuff.

	From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
	to hack or use GIMP HEAD.

	Beware, it crashes randomly :)

	* app/core/Makefile.am
	* app/core/gimpmarshal.list: new file plus rules to generate
	gimpmarshal.[ch] from it.

	* app/core/*
	* app/tools/*
	* app/widgets/*
	* libgimpwidgets/*: started to use the glib object system. All
	core/ objects are still gtk objects however. All signals are
	created using g_signal_new(). There are many gtk+ artefacts left.
	Finally, we will _not_ use the gtk_signal_foo() wrappers and
	friends any more.

	* app/colormaps.c
	* app/devices.[ch]
	* app/disp_callbacks.c
	* app/errorconsole.c
	* app/file-save.[ch]
	* app/interface.c
	* app/module_db.c
	* app/nav_window.c
	* app/ops_buttons.c
	* app/scroll.c
	* app/user_install.c
	* app/gui/about-dialog.c
	* app/gui/brush-editor.c
	* app/gui/brushes-commands.c
	* app/gui/color-notebook.c
	* app/gui/colormap-dialog.c
	* app/gui/dialogs-commands.c
	* app/gui/dialogs-constructors.c
	* app/gui/file-commands.c
	* app/gui/file-dialog-utils.c
	* app/gui/file-new-dialog.c
	* app/gui/file-open-dialog.[ch]
	* app/gui/file-save-dialog.c
	* app/gui/gradient-editor.c
	* app/gui/gradients-commands.c
	* app/gui/image-commands.c
	* app/gui/info-dialog.[ch]
	* app/gui/layer-select.c
	* app/gui/layers-commands.c
	* app/gui/menus.c
	* app/gui/offset-dialog.c
	* app/gui/palette-editor.c
	* app/gui/palettes-commands.c
	* app/gui/patterns-commands.c
	* app/gui/preferences-dialog.c
	* app/gui/resize-dialog.[ch]
	* app/gui/splash.c
	* app/gui/tips-dialog.c
	* app/gui/tool-options-dialog.c
	* app/gui/toolbox.c
	* app/gui/tools-commands.c
	* libgimp/gimpbrushmenu.c
	* libgimp/gimpmenu.c
	* libgimp/gimppatternmenu.c
	* libgimp/gimpui.c
	* libgimpbase/gimpenv.c: tons and tons of changes like "const
	gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
	and currently disables), lots of s/gtk_signal/g_signal/,
	removal/replacement of deprecated stuff,
	s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
	while I was on it, zillions of warnings left...

	* modules/Makefile.am: disabled the water color selector
	temporarily (XInput issues).

	* plug-ins/Makefile.am
	* plug-ins/common/.cvsignore
	* plug-ins/common/Makefile.am
	* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
	which did not build (including Script-Fu). They are trivial to
	fix.
2001-07-24 21:27:11 +00:00
Sven Neumann 75e8e3877c app/Makefile.am app/apptypes.h app/gimpimage-undo.[ch] app/gimpundo.[ch]
2001-03-05  Sven Neumann  <sven@gimp.org>

	* app/Makefile.am
	* app/apptypes.h
	* app/gimpimage-undo.[ch]
	* app/gimpundo.[ch]
	* app/gimpundostack.[ch]: added new GimpUndo and GimpUndoStack objects
	which will be used for the upcoming new undo system. Actually my
	current plan for the undo system is to keep it pretty much as it is...

	* app/gimpimage.[ch]: added new GimpUndoStacks but temporarily kept
	old GSLists around, so I don't break everything now.
2001-03-05 01:01:16 +00:00