Commit graph

2746 commits

Author SHA1 Message Date
Sven Neumann f50e06a43d formatting.
2007-10-23  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-combine.c: formatting.

svn path=/trunk/; revision=23921
2007-10-23 11:19:08 +00:00
Martin Nordholts e81fb95976 Use gimp_vectors_bounds() instead of gimp_item_offsets|width|height() when
2007-10-15  Martin Nordholts  <martinn@svn.gnome.org>

	* app/core/gimpimage-arrange.c (compute_offset): Use
	gimp_vectors_bounds() instead of gimp_item_offsets|width|height()
	when calculating size and position for a path. Fixes bug #486517.

svn path=/trunk/; revision=23833
2007-10-15 20:17:56 +00:00
Sven Neumann b7588c5a09 formatting.
2007-10-12  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-stroke.c: formatting.

svn path=/trunk/; revision=23810
2007-10-12 13:14:43 +00:00
Sven Neumann e51e8d9a05 app/core/gimpitem.c app/tools/gimprectangletool.c fixed ambiguous gtk-doc
2007-10-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimpitem.c
	* app/tools/gimprectangletool.c
	* app/tools/tools-utils.c: fixed ambiguous gtk-doc comments.

svn path=/trunk/; revision=23779
2007-10-09 15:59:04 +00:00
Sven Neumann f28665a0d1 don't delete the colormap on indexed images. Fixes bug #483887.
2007-10-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-colormap.c (gimp_image_set_colormap): don't
	delete the colormap on indexed images. Fixes bug #483887.


svn path=/trunk/; revision=23749
2007-10-06 17:51:13 +00:00
Sven Neumann 9a87143a0c set all entries to zero before assigning the new colormap.
2007-10-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-colormap.c (gimp_image_set_colormap): set 
all
	entries to zero before assigning the new colormap.

	* app/paint-funcs/paint-funcs.[ch]: added const qualifiers.


svn path=/trunk/; revision=23748
2007-10-06 17:36:35 +00:00
Sven Neumann 985c993ea6 don't pop up a warning dialog if the selection is empty (bug #483896).
2007-10-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpselection.c (gimp_selection_float): don't pop up 
a
	warning dialog if the selection is empty (bug #483896).
	
	* app/actions/select-commands.c (select_float_cmd_callback): use
	gimp_message() here in case that gimp_selection_float() fails.


svn path=/trunk/; revision=23746
2007-10-06 12:30:28 +00:00
Sven Neumann 4b52112b6a handle a NULL extension and create a filename without file extension.
2007-09-30  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-utils.c (gimp_get_temp_filename): handle a NULL
	extension and create a filename without file extension.

	* tools/pdbgen/pdb/fileops.pdb
	* app/pdb/fileops_cmds.c: allow NULL to be passed as extension
	parameter to gimp_temp_name().


svn path=/trunk/; revision=23697
2007-09-30 13:21:03 +00:00
Sven Neumann 387c830231 call gimp_color_managed_profile_changed() if an icc-profile is attached or
2007-09-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimageundo.c (gimp_image_undo_pop): call
	gimp_color_managed_profile_changed() if an icc-profile is 
attached
	or removed from an image by an undo operation (bug #475983).


svn path=/trunk/; revision=23661
2007-09-26 19:27:05 +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
Michael Natterer 08d38cea82 Make layer masks work consistently on layers without alpha. Fixes bug
2007-09-15  Michael Natterer  <mitch@gimp.org>

	Make layer masks work consistently on layers without alpha.
	Fixes bug #475548.

	* app/core/gimplayer.c (gimp_layer_apply_mask): changed to work
	on layers without alpha.

	* app/actions/layers-commands.c (layers_add_mask_response): don't
	automatically add an alpha channel when adding a layer mask.


svn path=/trunk/; revision=23555
2007-09-15 19:23:20 +00:00
Nils Philippsen 8ff9c4c84c drop own recently used files code in favour of GtkRecentManager:
* app/core/gimp-gui.c (gimp_recent_list_add_uri), app/core/gimp-gui.h,
app/gui/gui-vtable.c (gui_recent_list_add_uri): add
{gimp,gui}_recent_list_add_uri(), gui_recent_list_add_uri() dispatches to
GtkRecentManager

* app/dialogs/file-save-dialog.c (file_save_dialog_save_image),
app/actions/file-commands.c (file_save_cmd_callback),
app/widgets/gimpdnd-xds.c (gimp_dnd_xds_save_image): pass Gimp instance to
file_save() calls

* app/file/file-open.c (file_open_with_proc_and_display,
file_open_layers), app/file/file-save.c (file_save), app/file/file-save.h:
pass Gimp instance to gimp_recent_list_add_uri() calls

* app/file/gimprecentitem.c, app/file/gimprecentitem.h,
app/file/gimprecentlist.c, app/file/gimprecentlist.h: removed

* app/file/Makefile.am: drop reference to removed files

svn path=/trunk/; revision=23526
2007-09-13 14:19:30 +00:00
Sven Neumann ca25986334 removed static variable debug_context but keep the warnings about NULL
2007-09-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpviewable.c: removed static variable debug_context
	but keep the warnings about NULL contexts.

svn path=/trunk/; revision=23524
2007-09-13 13:30:21 +00:00
Sven Neumann 1954ee81fe use the offsets module TILE_WIDTH and TILE_HEIGHT instead of doing the
2007-09-12  Sven Neumann  <sven@gimp.org>

	* app/base/tile.c (tile_data_pointer): use the offsets module
	TILE_WIDTH and TILE_HEIGHT instead of doing the module operation
	in each and every caller.

	* app/base/boundary.c
	* app/base/pixel-region.c
	* app/base/tile-manager.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-contiguous-region.c
	* app/core/gimplayer.c
	* app/display/gimpdisplayshell-render.c
	* app/paint-funcs/paint-funcs.c
	* app/paint/gimppaintcore.c
	* app/tools/gimpiscissorstool.c: changed accordingly.


svn path=/trunk/; revision=23515
2007-09-12 18:29:11 +00:00
Sven Neumann e2cd1d4170 \2007-09-12 Sven Neumann <sven@gimp.org>
* app/core/gimp-transform-region.c (supersample_dtest): use
	G_SQRT2 instead of defining this constant again.


svn path=/trunk/; revision=23514
2007-09-12 17:28:24 +00:00
Øyvind Kolås eaf6052df1 do not invoke supersampling for linear, bicubic and lanczos until the
* app/core/gimp-transform-region.c: (supersample_dtest): do not invoke
supersampling for linear, bicubic and lanczos until the largest
horizontal/vertical difference between transformed pixel corners goes
above sqrt(2) (this ensures interpolation instead of supersampling is
used for rotation.)

svn path=/trunk/; revision=23509
2007-09-12 15:36:15 +00:00
Sven Neumann c39dd1a5b7 changed to use extended regular expression syntax.
2007-09-12  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcontainer-filter.c
	(gimp_container_filter_by_name): changed to use extended regular
	expression syntax.

svn path=/trunk/; revision=23508
2007-09-12 11:52:52 +00:00
Sven Neumann ce32eed304 make the first of the added layers the active layer. Fixes bug #469752.
2007-09-11  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.c (gimp_image_add_layers): make the first of
	the added layers the active layer. Fixes bug #469752.

svn path=/trunk/; revision=23501
2007-09-11 14:12:51 +00:00
Sven Neumann 77b7161a32 app/core/gimp-transform-region.[ch] app/core/gimpchannel.c
2007-09-10  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.[ch]
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-transform.[ch]
	* app/core/gimpdrawable.c
	* app/core/gimpimage-item-list.[ch]
	* app/core/gimpitem-linked.[ch]
	* app/core/gimpitem.[ch]
	* app/core/gimplayer.c
	* app/paint/gimpperspectiveclone.c
	* app/vectors/gimpvectors.c: removed supersample parameter from
	transform functions and perform it depending on the interpolation
	type (bug #473265).

	* app/tools/gimptransformoptions.[ch]
	* app/tools/gimptransformtool.c: removed Supersample toggle from
	the transform tool options.

	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: document that the
	supersample parameter is unused and improved documentation of the
	recursion-level parameter.

	* app/pdb/transform_tools_cmds.c
	* app/pdb/drawable_transform_cmds.c
	* libgimp/gimpdrawabletransform_pdb.c: regenerated.

svn path=/trunk/; revision=23494
2007-09-10 15:29:48 +00:00
Michael Natterer 5b1fa26d00 remove unbalanced "*/"
2007-09-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.c: remove unbalanced "*/"

	* app/core/gimpdrawable-transform.c
	* app/core/gimp-transform-resize.c: formatting.


svn path=/trunk/; revision=23463
2007-09-04 09:38:55 +00:00
Simon Budig 36c6ea9d3f fix NULL handling and formatting.
2007-09-04  Simon Budig  <simon@gimp.org>

	* app/core/gimpparamspecs.c: fix NULL handling and formatting.


svn path=/trunk/; revision=23456
2007-09-03 22:05:19 +00:00
Michael Natterer c85b228e4d Applied slightly reformatted patch by Jakub Friedl and Daniel Hornung
2007-09-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-transform-region.c: Applied slightly reformatted
	patch by Jakub Friedl and Daniel Hornung which ROUND()s the
	floating point result values before assigning them to integers to
	avoid reducing the output space to [0..254] (thus darkening the
	image). Fixes bug #472806.


svn path=/trunk/; revision=23451
2007-09-03 14:17:53 +00:00
Hans Breuer aface5c12a updated msvc build include <io.h> for get_osfhandle() prototype
2007-08-26  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc : updated msvc build
	* app/main.c : include <io.h> for get_osfhandle()
	* plug-ins/jpeg/jpeg-settings.h : prototype
	jpeg_swap_original_settings


svn path=/trunk/; revision=23377
2007-08-26 18:59:34 +00:00
Michael Natterer da32f5a002 remove GimpPlugInDebug typedef.
2007-08-15  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: remove GimpPlugInDebug typedef.

	* app/plug-in/plug-in-types.h: added it here instead.

	* app/core/gimpchannel-combine.h
	* app/widgets/gimppropwidgets.[ch]: match parameter names
	in .c, .h and API docs to make gtk-doc happy.


svn path=/trunk/; revision=23275
2007-08-15 16:40:39 +00:00
Michael Natterer 1e790b12fd fixed API docs.
2007-08-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-item-list.c: fixed API docs.


svn path=/trunk/; revision=23252
2007-08-14 15:44:02 +00:00
Sven Neumann 49bb407674 app/paint-funcs/Makefile.am
2007-08-08  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/Makefile.am

	* app/paint-funcs/sample-funcs.[ch]: renamed to 
	* app/paint-funcs/subsample-region.[ch]

	* app/paint-funcs/scale-funcs.[ch]: renamed to 
	* app/paint-funcs/scale-region.[ch]

	* app/paint-funcs/reduce-region.[ch]: new files based on a patch
	from Geert Jordaens (bug #464466).

	* app/base/tile-manager-preview.c
	* app/core/gimp-transform-region.c
	* app/core/gimpbrush-scale.c
	* app/core/gimpdrawable-preview.c
	* app/core/gimpdrawable.c: changed accordingly.

svn path=/trunk/; revision=23144
2007-08-08 08:35:45 +00:00
Sven Neumann 2b2cc44ad0 app/core/gimppalette-import.c applied slightly modified version of a patch
2007-08-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-import.c
	* app/core/gimppalette-load.[ch]: applied slightly modified version
	of a patch from Nicola Archibald that adds support for importing
	Adobe Color palette version 1 files (bug #316618).

svn path=/trunk/; revision=23134
2007-08-07 13:42:55 +00:00
Sven Neumann 852170b6c6 return NULL if the parasite exists but it is empty.
2007-08-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.c (gimp_image_get_icc_profile): return NULL
	if the parasite exists but it is empty.

svn path=/trunk/; revision=23132
2007-08-07 09:58:39 +00:00
Sven Neumann 2195c84297 added missing static qualifier.
2007-08-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.c: added missing static qualifier.

	* app/display/gimpdisplayshell.c
	* app/display/gimpdisplayshell-handlers.c: implement the
	GimpColorManaged interface and delegate it to GimpImage.


svn path=/trunk/; revision=23126
2007-08-06 19:23:22 +00:00
Hans Breuer 024ef60a49 updated msvc build
2007-08-05  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc app/gimpcore.def : updated msvc build


svn path=/trunk/; revision=23118
2007-08-05 15:16:02 +00:00
Michael Natterer eb7d32e3b2 Make sure image thumbnails that are saved or given to plugins are
2007-08-02  Michael Natterer  <mitch@gimp.org>

	Make sure image thumbnails that are saved or given to plugins are
	constructed synchronously. Fixes bug #461703.

	* app/core/gimpprojection.c (gimp_projection_pickable_flush):
	invalidate the preview after constructing the projection.

	* app/core/gimpimagefile.c (gimp_imagefile_save_thumb)
	* tools/pdbgen/pdb/image.pdb (image_thumbnail): call
	gimp_pickable_flush() on the projection so is constructed now, not
	later.

	* app/pdb/image_cmds.c: regenerated.


svn path=/trunk/; revision=23105
2007-08-02 14:54:29 +00:00
Sven Neumann c5e8bef567 cosmetics.
2007-07-30  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.c (gimp_image_drawable_update): cosmetics.


svn path=/trunk/; revision=23066
2007-07-30 07:04:22 +00:00
Sven Neumann 9b96fc8e4c minor code cleanup.
2007-07-23  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection-construct.c: minor code cleanup.


svn path=/trunk/; revision=22976
2007-07-23 20:14:28 +00:00
Sven Neumann e53f7a2c81 overwrite the menurc with the systemwide default. Only if that fails,
2007-07-20  Sven Neumann  <sven@gimp.org>

	* app/menus/menus.c (menus_clear): overwrite the menurc with the
	systemwide default. Only if that fails, delete the menurc file.

	* app/dialogs/preferences-dialog.c: string change.

	* app/core/gimp-user-install.c: formatting.

svn path=/trunk/; revision=22964
2007-07-20 12:41:08 +00:00
Sven Neumann 6b0e6990d1 remember whether a channel was active before quick mask was activated.
2007-07-20  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-quick-mask.[ch]: remember whether a channel
	was active before quick mask was activated. Fixes bug #134371.

svn path=/trunk/; revision=22961
2007-07-20 08:23:29 +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
Sven Neumann 4ed227cf0e app/paint-funcs/Makefile.am app/paint-funcs/scale-funcs.[ch] moved
2007-07-17  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/Makefile.am
	* app/paint-funcs/scale-funcs.[ch]
	* app/paint-funcs/sample-funcs.[ch]: moved subsample_region() to
	new file and also moved subsample_indexed_region() there.

	* app/base/tile-manager-preview.c
	* app/core/gimpdrawable-preview.c: changed accordingly.


svn path=/trunk/; revision=22953
2007-07-18 12:47:00 +00:00
Sven Neumann 58ee85dfa6 added tile_manager_get_sub_preview().
2007-07-17  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager-preview.[ch]: added
	tile_manager_get_sub_preview().

	* app/core/gimpdrawable-preview.c: use the new function except 
for
	indexed drawables.


svn path=/trunk/; revision=22950
2007-07-17 20:33:10 +00:00
Sven Neumann b47a3e52e5 app/base/Makefile.am added new file that holds code to create a preview
2007-07-17  Sven Neumann  <sven@gimp.org>

	* app/base/Makefile.am
	* app/base/tile-manager-preview.[ch]: added new file that holds 
code
	to create a preview from a tile manager.

	* app/core/gimpbuffer.c
	* app/core/gimpimage-preview.c: use the new function instead of
	duplicating this code.


svn path=/trunk/; revision=22948
2007-07-17 19:38:10 +00:00
Sven Neumann 9409179aa6 free the context list.
2007-07-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimp.c (gimp_finalize): free the context list.

	* app/tools/gimprectangleoptions.c (gimp_rectangle_options_gui):
	removed unused vbox.

svn path=/trunk/; revision=22944
2007-07-17 11:15:15 +00:00
Sven Neumann f3c451becd use the tool-info identifier as the name of the tool-options object.
2007-07-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimptoolinfo.c (gimp_tool_info_new): use the tool-info
	identifier as the name of the tool-options object.

	* app/paint/gimppaintoptions.c (gimp_paint_options_new): use the
	paint-info identifier as the name of the paint-options object.

	* app/paint/gimp-paint.c (gimp_paint_register): added parameter check.

	* app/tools/gimp-tools.c (gimp_tools_init): formatting.

svn path=/trunk/; revision=22941
2007-07-17 10:04:06 +00:00
Sven Neumann b56e206d0b sync with the default template. Fixes bug #457286.
2007-07-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-new.c (gimp_image_new_get_last_template): sync
	with the default template. Fixes bug #457286.

svn path=/trunk/; revision=22938
2007-07-16 13:49:17 +00:00
Michael Natterer 4625597ab8 update the image, not the drawable so we avoid constantly invalidating the
2007-06-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_clear)
	(gimp_image_map_do): update the image, not the drawable so we
	avoid constantly invalidating the drawable preview.

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_response):
	invalidate the drawable preview here.

	* app/paint/gimppaintcore.c (gimp_paint_core_paste)
	(gimp_paint_core_replace): clean up drawable offset handling code.


svn path=/trunk/; revision=22843
2007-06-26 22:41:06 +00:00
Michael Natterer 8c8d3786d9 Removed useless image flushing which caused the image preview to be
2007-06-27  Michael Natterer  <mitch@gimp.org>

	Removed useless image flushing which caused the image preview to
	be updated needlessly:

	* app/core/gimpimagemap.c (gimp_image_map_do): don't flush the
	image when the idle rendering is completed, emit our own "flush"
	signal instead just as for the incremental display updates.

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_notify_preview):
	when switching off the preview don't flush the image, only flush
	projection and display.


svn path=/trunk/; revision=22842
2007-06-26 22:14:35 +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
Sven Neumann 7aa01e3120 applied patch from Geert Jordaens that reimplements the algorithm to
2007-06-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-resize.c: applied patch from Geert
	Jordaens that reimplements the algorithm to determine the largest
	rectangle. Fixes bug #412473.

svn path=/trunk/; revision=22834
2007-06-25 15:36:53 +00:00
Sven Neumann 09578ea070 removed extra check for gthread and fold it into the GLIB and GTK checks.
2007-06-25  Sven Neumann  <sven@gimp.org>

	* configure.in: removed extra check for gthread and fold it into
	the GLIB and GTK checks.

	* */Makefile.am: changed accordingly.

	* app/main.c (main): always call g_thread_init().

svn path=/trunk/; revision=22832
2007-06-25 12:41:59 +00:00
Martin Nordholts a42d1b45ed Only consider layers with combine mode Normal when testing if any layer
2007-06-22  Martin Nordholts  <martinn@svn.gnome.org>

	* app/core/gimpprojection-construct.c (gimp_projection_initialize): Only
	consider layers with combine mode Normal when testing if any layer
	covers the entire specified area. Fixes bug #440154.

svn path=/trunk/; revision=22824
2007-06-22 10:11:36 +00:00
Sven Neumann e74f8a034c note that loading fonts may take a while (on Win32 at least).
2007-06-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimp.c (gimp_restore): note that loading fonts may 
take
	a while (on Win32 at least).


svn path=/trunk/; revision=22823
2007-06-22 07:29:05 +00:00
Sven Neumann 610feafb3e app/base/base-types.h app/base/tile-manager.[ch] removed accessors for
2007-06-21  Sven Neumann  <sven@gimp.org>

	* app/base/base-types.h
	* app/base/tile-manager.[ch]
	* app/base/tile-manager-private.h: removed accessors for user_data.
	Instead pass the user_data when setting the validation proc.

	* app/base/tile-pyramid.c
	* app/core/gimpchannel.c
	* app/core/gimpprojection.c
	* app/core/gimpselection.c
	* app/tools/gimpiscissorstool.c: changed accordingly.

svn path=/trunk/; revision=22820
2007-06-21 14:36:58 +00:00
Sven Neumann 173c9d40aa use gboolean for boolean parameters.
2007-06-21  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager.[ch]: use gboolean for boolean parameters.

	* app/base/tile-pyramid.c (tile_pyramid_get_memsize): pass TRUE
	for sparse to tile_manager_get_memsize().

	* app/base/tile.c
	* app/base/tile-swap.c: minor cleanups.

	* app/core/gimpprojection.c (gimp_projection_get_tiles_at_level):
	inline the creation of the TilePyramid.

svn path=/trunk/; revision=22818
2007-06-21 14:02:14 +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
Michael Natterer 1a13f51e02 Part one of fix for bug #449141 (fixes the projection but still leaves
2007-06-21  Michael Natterer  <mitch@gimp.org>

	Part one of fix for bug #449141 (fixes the projection but still
	leaves some image previews unupdated).

	* app/core/gimpimage.c (lots of functions)
	* app/paint/gimppaintcore.c (gimp_paint_core_finish)
	* app/file/file-open.c (file_open_sanitize_image): removed calls
	to gimp_viewable_invalidate_preview(image).

	* app/file/file-open.c (file_open_sanitize_image): update and
	flush the entire image instead. Load plug-ins are not required to
	call gimp_drawable_update() or anything else to make sure the
	projection is up-to-date.

	* app/core/gimpimage.c (gimp_image_real_flush): inavlidate the
	image preview here because we now create it from the projection.
	(this is still not the entirely correct place though).


svn path=/trunk/; revision=22815
2007-06-21 10:09:27 +00:00
Sven Neumann 3038dc0e80 app/base/Makefile.am app/base/base-types.h image pyramid code split out of
2007-06-20  Sven Neumann  <sven@gimp.org>

	* app/base/Makefile.am
	* app/base/base-types.h
	* app/base/tile-pyramid.[ch]: image pyramid code split out of
	GimpProjection.

	* app/core/gimpprojection.[ch]: use the new TilePyramid.

svn path=/trunk/; revision=22807
2007-06-20 16:15:16 +00:00
Sven Neumann 5c1a08555f take the image size into account and return the level that is actually
2007-06-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.c (gimp_projection_get_level): take 
the
	image size into account and return the level that is actually 
used.
	Fixes bug #448185.


svn path=/trunk/; revision=22792
2007-06-16 13:38:13 +00:00
Sven Neumann c2a0689c2d micro optimization.
2007-06-14  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdatafactory.c
	(gimp_data_factory_refresh_cache_remove): micro optimization.

svn path=/trunk/; revision=22779
2007-06-14 11:30:12 +00:00
Michael Natterer 258895fb2e remove calls to container_freeze() and container_thaw()
2007-06-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdatafactory.c (gimp_data_factory_data_foreach):
	remove calls to container_freeze() and container_thaw()

	(gimp_data_factory_data_reload)
	(gimp_data_factory_data_free): add them here instead.

	(gimp_data_factory_data_save): remove freeze/thaw calls here
	without any replacement. The list doesn't change by saving its
	items. Fixes insanely long quit time when there are many data
	objects.


svn path=/trunk/; revision=22778
2007-06-14 11:12:31 +00:00
Sven Neumann aaaf8605ae implement the GimpColorManaged interface.
2007-06-14  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.c: implement the GimpColorManaged 
interface.


svn path=/trunk/; revision=22777
2007-06-14 07:06:58 +00:00
Sven Neumann 54caf4fbd4 don't disable image previews when layer previews are disabled. We do not
2007-06-11  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-preview.c: don't disable image previews 
when
	layer previews are disabled. We do not any longer create the 
image
	preview from the layer previews.

	* app/core/gimpimagefile.c
	* app/widgets/gimpthumbbox.c
	* tools/pdbgen/pdb/image.pdb: thumbnail rendering is not any
	longer disabled if layer previews are turned off.

	* app/config/gimprc-blurbs.h (THUMBNAIL_SIZE_BLURB): removed 
note
	that has become invalid by the change above.

	* app/core/gimpitem-preview.c: cosmetics.

	* app/pdb/image_cmds.c: regenerated.


svn path=/trunk/; revision=22756
2007-06-11 19:26:31 +00:00
Sven Neumann 65385a4781 added gimp_image_resize_to_selection().
2007-06-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-resize.[ch]: added
	gimp_image_resize_to_selection().

	* app/actions/image-actions.c
	* app/actions/image-commands.[ch]
	* app/widgets/gimphelp-ids.h
	* menus/image-menu.xml.in: added an action and a menu item for 
it.
	Fixes bug #335672.

	* plug-ins/common/align_layers.c: resolved a conflicting 
mnemonic.


svn path=/trunk/; revision=22749
2007-06-09 17:17:30 +00:00
Sven Neumann d7c712403c fixed parameter passed to gimp_image_get_background(). Fixes bug #445719.
2007-06-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimpselection.c (gimp_selection_extract): fixed
	parameter passed to gimp_image_get_background(). Fixes bug 
#445719.


svn path=/trunk/; revision=22748
2007-06-09 16:43:25 +00:00
Sven Neumann d3f8ba267e same change here.
* app/core/gimpprojection.c (gimp_projection_invalidate):
	same change here.

svn path=/trunk/; revision=22746
2007-06-08 12:04:42 +00:00
Sven Neumann 5300747967 use a bit shift instead of a shift and a division.
2007-06-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.c (gimp_projection_alloc_levels): use
	a bit shift instead of a shift and a division.

svn path=/trunk/; revision=22745
2007-06-08 11:53:11 +00:00
Sven Neumann 3ce8d74b14 #define GIMP_VIEWABLE_PRIORITY_IDLE, which is even lower than
2007-06-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimpviewable.h: #define GIMP_VIEWABLE_PRIORITY_IDLE,
	which is even lower than G_PRIORITY_LOW.

	* app/core/gimpundo.c
	* app/widgets/gimpviewrenderer.c: create previews with
	GIMP_VIEWABLE_PRIORITY_IDLE so that they are run after the
	projection has been invalidated.


svn path=/trunk/; revision=22743
2007-06-07 23:05:02 +00:00
Sven Neumann a9cec3c05f folded into a single loop.
2007-06-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.c (gimp_projection_validate_pyramid_tile):
	folded into a single loop.

svn path=/trunk/; revision=22740
2007-06-07 15:43:55 +00:00
Sven Neumann e20966e7c9 some loop unrolling
svn path=/trunk/; revision=22739
2007-06-07 15:29:25 +00:00
Sven Neumann a67a70b559 weight the pixels by their alpha value.
2007-06-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.c (gimp_projection_write_quarter):
	weight the pixels by their alpha value.

svn path=/trunk/; revision=22738
2007-06-07 15:20:49 +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 916c53f0d8 lazily allocate the tile managers of the image pyramid.
2007-06-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.c: lazily allocate the tile managers of
	the image pyramid.	
	(gimp_projection_write_quarter): minor optimization.

svn path=/trunk/; revision=22736
2007-06-07 14:21:49 +00:00
Sven Neumann f322854007 app/text/Makefile.am app/core/Makefile.am app/tools/Makefile.am
2007-06-07  Sven Neumann  <sven@gimp.org>

	* app/text/Makefile.am
	* app/core/Makefile.am
	* app/tools/Makefile.am
	* app/display/Makefile.am
	* app/widgets/Makefile.am
	* app/base/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* libgimp/Makefile.am
	* libgimpthumb/Makefile.am
	* tools/pdbgen/Makefile.am
	* libgimpwidgets/Makefile.am: applied the remaining parts of the
	patch from Daniel Richard G. to fix out-of-source-tree builds
	(bug #444960).

svn path=/trunk/; revision=22735
2007-06-07 13:19:44 +00:00
Sven Neumann 2a3fac83a9 reimplemented without using a logarithm.
2007-06-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.c (gimp_projection_get_level):
	reimplemented without using a logarithm.

svn path=/trunk/; revision=22734
2007-06-07 10:35:26 +00:00
Sven Neumann a4079a37db minor API cleanup. Use horizontal and vertical scale to determine the
2007-06-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.[ch]: minor API cleanup. Use 
horizontal
	and vertical scale to determine the pyramid level to use.

	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-render.c: follow the API change.


svn path=/trunk/; revision=22730
2007-06-06 21:40:31 +00:00
Sven Neumann 2b401b8691 cosmetics.
2007-06-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.c: cosmetics.

svn path=/trunk/; revision=22728
2007-06-06 13:59:41 +00:00
Martin Nordholts 7917611e53 Implemented an image pyramid for the GimpProjection. An image pyramid
2007-06-06  Martin Nordholts  <martinn@svn.gnome.org>

	Implemented an image pyramid for the GimpProjection. An image pyramid
	caches a projection at several sizes, causing the rendering code not to
	have to swap in all tiles of a (potentially) large image; it can use
	small versions of the projection if the user is zoomed out.

	The image pyramid also imroves visual quality, especially at zoom levels
	where there is a pyramid level that matches perfectly (i.e. at e.g. 50%,
	25%, and 12.5% zoom). A step on the right track for bug #76096.

	* app/core/gimpprojection.[ch]: Adjusted to make use of an image
	pyramid. GimpProjection now keeps an array of TileManager:s, one per
	pyramid level. Renamed _alloc_tiles to _alloc_levels.

	* app/display/gimpdisplayshell-draw.c: (gimp_display_shell_draw_area):
	Use the right GimpProjection level when drawing

	* app/display/gimpdisplayshell-render.c: (render_image_init_info_full):
	Setup RenderInfo with level in mind

	* app/base/tile-manager.[ch]: Extended API a bit, nothing complicated.

	* app/base/tile-manager-private.h (struct _TileManager): Keep a pointer
	to the level below for use in an image pyramid.


svn path=/trunk/; revision=22727
2007-06-06 13:45:44 +00:00
Sven Neumann 67ec846b73 corrected a bug introduced by my last commit
svn path=/trunk/; revision=22726
2007-06-06 13:26:48 +00:00
Sven Neumann 5ca92142ad cleanup.
2007-06-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-preview.c (gimp_image_get_new_preview): cleanup.

svn path=/trunk/; revision=22725
2007-06-06 12:56:50 +00:00
Sven Neumann 097b1768a5 the projection is 2 bytes per pixel for grayscale images.
2007-06-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.c (gimp_projection_estimate_memsize):
	the projection is 2 bytes per pixel for grayscale images.

svn path=/trunk/; revision=22723
2007-06-06 10:48:00 +00:00
Sven Neumann 798dd95499 #include "gimprojection.h"
svn path=/trunk/; revision=22722
2007-06-06 10:13:44 +00:00
Sven Neumann feaf142fc7 added function that estimates the memory requirements for an image
2007-06-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.[ch]: added function that estimates the
	memory requirements for an image projection.

	* app/core/gimptemplate.c (gimp_template_notify): use it.

svn path=/trunk/; revision=22721
2007-06-06 10:03:17 +00:00
Mukund Sivaraman c2d1214551 Changed "The GIMP" to "GIMP" everywhere, where it's used as a name.
2007-06-06  Mukund Sivaraman  <muks@mukund.org>

        Changed "The GIMP" to "GIMP" everywhere, where it's used as a name.


svn path=/trunk/; revision=22715
2007-06-06 08:44:52 +00:00
Michael Natterer 8cb4d6070b applied patch from Eric Lamarque which adds support for ABR v6 brushes.
2007-06-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush-load.c: applied patch from Eric Lamarque
	which adds support for ABR v6 brushes. Did some minor cleanups in
	the patch, reordered functions and generally fixed error handling
	of the ABR parsers. Fixes bug #377016.


svn path=/trunk/; revision=22699
2007-06-04 10:43:31 +00:00
Michael Natterer e5e3c8c65d check for errors even if the loader_func returned something so we display
2007-06-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdatafactory.c (gimp_data_factory_load_data): check
	for errors even if the loader_func returned something so we
	display errors from partially loaded files which contain multiple
	data items.


svn path=/trunk/; revision=22696
2007-06-03 21:46:04 +00:00
Sven Neumann 527bb2e757 unified progress strings.
2007-05-31  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert.c: unified progress strings.

svn path=/trunk/; revision=22686
2007-05-31 13:08:19 +00:00
Sven Neumann 903b310f18 minor code cleanup.
2007-05-31  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert.c: minor code cleanup.

svn path=/trunk/; revision=22685
2007-05-31 12:55:33 +00:00
Sven Neumann 86eaa1fa06 no need to use memcpy here
svn path=/trunk/; revision=22653
2007-05-29 09:57:13 +00:00
Sven Neumann 7c4bbafe75 app/core/gimpimage.c (gimp_image_parasite_attach) allocate the temporary
2007-05-29  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.c (gimp_image_parasite_attach)
	* app/core/gimpitem.c (gimp_item_parasite_attach): allocate the
	temporary GimpParasite copy on the stack.

svn path=/trunk/; revision=22650
2007-05-29 09:23:34 +00:00
Michael Natterer 8eb046f130 set "Lock Alpha" to TRUE again on floating selections.
2007-05-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer-floating-sel.c (floating_sel_attach): set
	"Lock Alpha" to TRUE again on floating selections.

	(floating_sel_to_layer): instead, set it to FALSE when turning
	it into a new layer. Fixes bug #418215 and keeps #161042 closed.


svn path=/trunk/; revision=22638
2007-05-27 23:07:36 +00:00
Michael Natterer 65ef13729f new utility function which returns the neighbor of a container's active
2007-05-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-utils.[ch] (gimp_container_get_neighbor_of_active):
	new utility function which returns the neighbor of a container's
	active item.

	* app/widgets/gimpcontainerview-utils.[ch]
	(gimp_container_view_remove_active): remove a container view's
	active item, using above function to select its neighbor.

	* app/actions/data-commands.c
	* app/actions/buffers-commands.c
	* app/actions/documents-commands.c
	* app/actions/templates-commands.c: use above functions to select
	reasonable items when deleting from a list (instead of always
	jumping to the first item).



svn path=/trunk/; revision=22632
2007-05-27 15:13:45 +00:00
Sven Neumann a6d783152d app/core/gimp-user-install.c app/core/gimpgradient-load.c
2007-05-23  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-user-install.c
	* app/core/gimpgradient-load.c
	* app/core/gimpsamplepoint.c
	* app/core/gimpscanconvert.c
	* app/core/gimpunit.c
	* app/display/gimpdisplayshell-filter-dialog.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell-scale.c
	* app/file/gimprecentitem.c
	* app/gui/splash.c: allocate structs using GSlice.

svn path=/trunk/; revision=22590
2007-05-23 10:22:09 +00:00
Sven Neumann cd772f930a app/core/gimppalette-import.c app/core/gimppalette-load.c use GSlice for
2007-05-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-import.c
	* app/core/gimppalette-load.c
	* app/core/gimppalette.c: use GSlice for palette entries and
	temporary structs.


svn path=/trunk/; revision=22587
2007-05-22 21:59:19 +00:00
Sven Neumann f1cdb9bea1 app/core/gimparea.[ch] app/core/gimpprojection.c use GSlice to allocate
2007-05-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimparea.[ch]
	* app/core/gimpprojection.c
	* app/display/gimpdisplay.c: use GSlice to allocate GimpArea and
	sanitize the API.


svn path=/trunk/; revision=22584
2007-05-22 18:52:11 +00:00
Michael Natterer ada79e533a app/actions/data-commands.c app/base/boundary.c app/base/gimphistogram.c
2007-05-22  Michael Natterer  <mitch@gimp.org>

	* app/actions/data-commands.c
	* app/base/boundary.c
	* app/base/gimphistogram.c
	* app/base/gimplut.c
	* app/base/temp-buf.c
	* app/core/gimpcontainer.c
	* app/core/gimpgradient.c
	* app/core/gimpparamspecs.c
	* app/core/gimpundo.c
	* app/plug-in/gimpplugin-cleanup.c
	* app/plug-in/gimppluginmanager-data.c
	* app/plug-in/gimppluginmanager-help-domain.c
	* app/plug-in/gimppluginmanager-locale-domain.c
	* app/plug-in/gimppluginmanager-menu-branch.c
	* app/plug-in/gimppluginprocframe.c
	* app/vectors/gimpanchor.c
	* app/widgets/gimpsessioninfo.c: use GSlice instead of g_new/g_free
	for structs of fixed size.


svn path=/trunk/; revision=22558
2007-05-22 10:43:48 +00:00
Sven Neumann a80b7607ec plugged a memory leak caused by one variable shadowing another.
2007-05-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrush.c (gimp_brush_get_new_preview): plugged a
	memory leak caused by one variable shadowing another.

	* app/vectors/gimpvectors-import.c (gimp_vectors_import): free 
the
	SvgPath structs.


svn path=/trunk/; revision=22556
2007-05-22 07:20:23 +00:00
Sven Neumann 9b369d8f6b documentation.
2007-05-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimp.c (gimp_message): documentation.

	* app/actions/documents-commands.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c: pass parent widgets to gimp_message().

svn path=/trunk/; revision=22552
2007-05-21 16:32:52 +00:00
Sven Neumann b5b732f62a use a #define for the default resolution.
2007-05-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimptemplate.c: use a #define for the default 
resolution.


svn path=/trunk/; revision=22546
2007-05-21 06:48:31 +00:00
Michael Natterer 4884bc43fe make sure the description contains no empty lines.
2007-05-19  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagefile.c (gimp_imagefile_get_desc_string): make
	sure the description contains no empty lines.


svn path=/trunk/; revision=22540
2007-05-19 20:09:56 +00:00
Sven Neumann 0bcf615e24 special case fully transparent regions, just as we do in
2007-05-04  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/autocrop.c (guess_bgcolor): special case fully
	transparent regions, just as we do in app/core/gimpimage-crop.c.
	Fixes bug #357554.

	* app/core/gimpimage-crop.c: cosmetics.

svn path=/trunk/; revision=22412
2007-05-04 12:21:26 +00:00
Sven Neumann 69a358460e applied slightly modified patch from Eric Lamarque that adds support for
2007-05-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrush-load.c: applied slightly modified patch from
	Eric Lamarque that adds support for loading .abr v2 Photoshop
	brushes (bug #435635).

svn path=/trunk/; revision=22411
2007-05-04 11:51:55 +00:00
Sven Neumann 2cb0739be5 use a simple cast, not a type-checking one
svn path=/trunk/; revision=22390
2007-05-03 15:18:53 +00:00
Sven Neumann 6c427acf21 Handle the core part of bug #434274:
2007-05-03  Sven Neumann  <sven@gimp.org>

	Handle the core part of bug #434274:

	* app/core/gimpchannel.c (gimp_channel_real_boundary): return
	FALSE for an empty channel.

	* app/core/gimpitem.[ch]: added a progress parameter to
	gimp_item_stroke.

	* app/core/gimpchannel.c (gimp_channel_stroke)
	* app/core/gimpselection.c (gimp_selection_stroke): pass progress
	to gimp_message().

	* app/actions/vectors-commands.c
	* app/actions/select-commands.c
	* app/dialogs/stroke-dialog.c
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: changed accordingly.

	* app/pdb/edit_cmds.c
	* app/pdb/paths_cmds.c: regenerated.

	* app/core/gimplayermaskundo.c: added a missing cast.

svn path=/trunk/; revision=22389
2007-05-03 15:17:07 +00:00
Sven Neumann 22c981c771 reduce rounding errors.
2007-05-02  Sven Neumann  <sven@gimp.org>

        * app/core/gimppickable.c (gimp_pickable_pick_color): reduce
        rounding errors.


svn path=/trunk/; revision=22384
2007-05-02 17:26:26 +00:00
Sven Neumann c70b55a403 removed get_color_at() from the GimpPickable interface. Implement the same
2007-05-02  Sven Neumann  <sven@gimp.org>

	* app/core/gimppickable.[ch]: removed get_color_at() from the
	GimpPickable interface. Implement the same functionality using
	get_pixel_at() but with a saner API.

	* app/core/gimpdrawable.c
	* app/core/gimpprojection.c
	* app/core/gimpimagemap.c: removed get_color_at() implementations.

	* app/tools/gimpbycolorselecttool.c: adapt to API change of
	gimp_pickable_get_color_at().

	* app/tools/gimprectangleselecttool.c: added missing include.


svn path=/trunk/; revision=22383
2007-05-02 17:15:03 +00:00
Sven Neumann ebb9c00470 the GLib version that has string validation fixed is 2.12.12.
2007-05-02  Sven Neumann  <sven@gimp.org>

	* app/core/gimpparamspecs.c (gimp_param_string_validate): the GLib
	version that has string validation fixed is 2.12.12.

svn path=/trunk/; revision=22375
2007-05-02 09:56:01 +00:00
Michael Natterer ee0ab61b4f changed "drawable" parameter to "pickable" and added some special casing
2007-04-30  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpselection.[ch] (gimp_selection_extract): changed
	"drawable" parameter to "pickable" and added some special casing
	for the GIMP_IS_DRAWABLE(pickable) case in the implementation.

	* app/core/gimpdrawable-transform.c: changed accordingly.

	* app/core/gimp-edit.c: ditto. Removed utility function
	gimp_edit_extract_visible() and simply use gimp_edit_extract() for
	"copy visible", passing image->projection. Fixes bug #434102.


svn path=/trunk/; revision=22368
2007-04-30 17:26:15 +00:00
Sven Neumann 7c1fc759f5 added get_pixel_at() method to the GimpPickable interface. This gives
2007-04-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimppickable.[ch]: added get_pixel_at() method to the
	GimpPickable interface. This gives direct access to the pixel
	without converting it to an RGB color.

	* app/core/gimpdrawable.c
	* app/core/gimpimagemap.c
	* app/core/gimpprojection.c: implement the new method and also use
	it to reimplement get_color_at().

	* app/core/gimpimage-crop.c (gimp_image_crop_guess_bgcolor): use
	gimp_pickable_get_pixel_at(). Fixes auto-shrink on indexed and
	grayscale images.

svn path=/trunk/; revision=22359
2007-04-27 16:07:49 +00:00
Michael Natterer ff8ba7ea78 renamed GimpParamSpecString's flag "no_validate" to "allow_non_utf8".
2007-04-26  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.[ch]: renamed GimpParamSpecString's
	flag "no_validate" to "allow_non_utf8".

	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/*.pdb: renamed argument flag
	"no_validate" (which turns off utf8-validation for strings) to
	"allow_non_utf8" and renamed "no_success" (which turns off
	argument validation alltogether) to "no_validate".
	Doesn't affect generated code.


svn path=/trunk/; revision=22350
2007-04-26 19:10:23 +00:00
Michael Natterer 6369e06ece removed bogus "return" from void function. Fixes bug #433339, patch from
2007-04-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.c (gimp_brush_scale_size): removed bogus
	"return" from void function. Fixes bug #433339, patch from Eric
	Lamarque.


svn path=/trunk/; revision=22335
2007-04-25 16:04:06 +00:00
Michael Natterer 54737072a0 added #warning to use GParamSpecString's features once we depend on a
2007-04-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.c (gimp_param_string_validate): added
	#warning to use GParamSpecString's features once we depend on a
	fixed version.


svn path=/trunk/; revision=22330
2007-04-25 14:38:20 +00:00
Michael Natterer d6fd55064b added "gboolean non_empty" to require the string being non-empty. Changed
2007-04-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.[ch] (struct GimpParamSpecString)
	(gimp_param_spec_string): added "gboolean non_empty" to require
	the string being non-empty. Changed validation accordingly.
	Also fixed validation for static strings (we were happily
	freeing and modifying them before).

	* app/xcf/xcf.c: filenames should be non-empty.
	* app/pdb/gimp-pdb-compat.c: compat strings shouldn't.

	* tools/pdbgen/app.pl: add support for $arg->{non_empty} and
	changed generation of calls to gimp_param_spec_string().

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/vectors.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/palette_select.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/progress.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/unit.pdb
	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/buffer.pdb: require non-empty strings for data
	object names, procedure names, unit strings, PDB data identifiers
	and buffer names. Removed some manual strlen() checks, all other
	places just got better error reporting for free (proper validation
	error instead of unspecific execution error).

	* app/pdb/*_cmds.c: regenerated.


svn path=/trunk/; revision=22329
2007-04-25 14:23:05 +00:00
Sven Neumann 44cefcc818 app/plug-in/Makefile.am app/plug-in/gimppluginmanager.[ch] moved
2007-04-18  Sven Neumann  <sven@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/gimppluginmanager.[ch]
	* app/plug-in/gimppluginmanager-restore.[ch]: moved
	gimp_plug_in_manager_restore() to it's own file.

	* app/core/gimp.c: changed accordingly.

	* app/Makefile.am (LDFLAGS): convince the linker to do its job.


svn path=/trunk/; revision=22286
2007-04-18 15:06:05 +00:00
Sven Neumann 49b8176aa5 Allow other applications to open images in GIMP as if they were new images
2007-04-17  Sven Neumann  <sven@gimp.org>

	Allow other applications to open images in GIMP as if they were
	new images (without associating a filename). Fixes bug #423118.

	* app/file/file-open.[ch]: added parameter 'as_new' to
	file_open_image() and its variants.

	* app/actions/data-commands.c
	* app/actions/documents-commands.c
	* app/actions/file-commands.c
	* app/core/gimpimagefile.c
	* app/dialogs/file-open-dialog.c
	* app/dialogs/file-open-location-dialog.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimptoolbox-dnd.c: changed accordingly.

	* app/app.[ch]
	* app/main.c: added new command-line option '--as-new'.

	* app/widgets/gimpdbusservice.[ch]
	* app/widgets/dbus-service.xml: added new method "OpenAsNew" to the
	D-Bus interface.

	* docs/gimp.1.in: document the new command-line option.


svn path=/trunk/; revision=22264
2007-04-17 15:54:01 +00:00
Michael Natterer f2acde4c60 app/base/base-types.h remove redundant and inconsistently used MaskBuf
2007-04-13  Michael Natterer  <mitch@gimp.org>

	* app/base/base-types.h
	* app/base/temp-buf.[ch]: remove redundant and inconsistently used
	MaskBuf type and API.

	* app/core/gimpbrush-scale.c
	* app/paint/gimpbrushcore.[ch]: use TempBuf and its API instead.
	This also optimizes away a useless memset() on brush scaling,
	we completely fill each of the created buffers anyway.


svn path=/trunk/; revision=22249
2007-04-13 14:04:37 +00:00
Michael Natterer c6733ac891 app/base/Makefile.am removed these files.
2007-04-01  Michael Natterer  <mitch@gimp.org>

	* app/base/Makefile.am
	* app/base/brush-scale.[ch]: removed these files.

	* app/core/Makefile.am
	* app/core/gimpbrush-scale.[ch]: added the functions here as
	static utility functions. Also move the default implementations of
	GimpBrush::scale_size(), ::scale_mask() and ::scale_pixmap() here,
	including their utility functions.

	* app/core/gimpbrush.c: remove all scale stuff and
	include "gimpbrush-scale.h" instead.

	(gimp_brush_get_new_preview): use GimpBrush's scale functions
	instead of the now private ones. Cleanup.

	(gimp_brush_scale_mask)
	(gimp_brush_scale_pixmap): return a copy of the buf for
	scale == 1.0.


svn path=/trunk/; revision=22213
2007-04-01 13:38:22 +00:00
Michael Natterer 00be2f5f8c use SQR(x) instead of x*x.
2007-03-31  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-blend.c: use SQR(x) instead of x*x.


svn path=/trunk/; revision=22211
2007-03-31 16:45:19 +00:00
Sven Neumann 410d8a5546 cosmetisc
svn path=/trunk/; revision=22194
2007-03-29 14:09:12 +00:00
Sven Neumann ed93588115 moved generation of the lookup table to it's own function. Also changed
2007-03-29  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrushgenerated.c (gimp_brush_generated_calc): moved
	generation of the lookup table to it's own function. Also changed
	SUPERSAMPLING from 5 to 4. Let's see if someone complains...


svn path=/trunk/; revision=22193
2007-03-29 14:04:54 +00:00
Sven Neumann ce489b17ae allow adding a mask to a layer without alpha channel (bug #316207).
2007-03-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimplayer.c (gimp_layer_add_mask): allow adding a mask
	to a layer without alpha channel (bug #316207).

svn path=/trunk/; revision=22163
2007-03-22 17:58:42 +00:00
Michael Natterer 83981ef404 simplified brush scale calculation by making sure that brush_core->scale
2007-03-18  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpbrushcore.c: simplified brush scale calculation by
	making sure that brush_core->scale always contains a value that's
	suited as input for gimp_brush_scale_mask/pixmap() (bug #419290).

	(gimp_brush_core_calc_brush_size): removed this function. All
	places can now call gimp_brush_scale_size() directly with
	core->scale as parameter.

	(gimp_brush_core_calc_brush_scale): new function which returns
	a linear scale factor which contains both the area-based pressure
	scale factor and the linear paint options scale factor.

	(gimp_brush_core_start)
	(gimp_brush_core_get_paint_area): use the new function instead
	of doing these calculations manually.

	(gimp_brush_core_interpolate): remove call to
	gimp_brush_core_scale_brush_size() and use core->scale directly.

	(gimp_brush_core_get_paint_area)
	(gimp_brush_core_scale_mask)
	(gimp_brush_core_scale_pixmap): use gimp_brush_scale_size()
	instead of the removed gimp_brush_core_scale_brush_size().

	(gimp_brush_core_create_bound_segs): use only
	paint_options->brush_scale here since the canvas brush preview
	always has to asume full pressure.

	* app/core/gimpbrush.c (gimp_brush_scale_size): special case
	scale == 1.0 and return the mask's width/height without calling
	the virtual function.


svn path=/trunk/; revision=22141
2007-03-18 19:48:36 +00:00
Michael Natterer 94fe72a220 app/core/gimpbrush.c some minor fixes and stylistic paranoia i overlooked
2007-03-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c: some minor fixes and stylistic
	paranoia i overlooked in last night's late review.


svn path=/trunk/; revision=22119
2007-03-14 10:23:18 +00:00
Martin Nordholts e3d9198cc4 Made brushes upscalable by using scale_region. Downscaling still uses
2007-03-14  Martin Nordholts  <martinn@svn.gnome.org>

	Made brushes upscalable by using scale_region. Downscaling still
	uses functions in app/base/brush-scale.c (because of better
	performance). Parametric brushes of course recalculates masks
	instead of using bitmap scaling. Fixes bug #65030.

	* app/core/gimpbrush.[ch]: Added a private scale_buf method which
	uses scale_region (with GIMP_INTERPOLATION_LINEAR) to scale its
	masks and pixmaps. Also added public virtual method scale_size to
	GimpBrush (overridden by GimpBrushGenerated) which calculates the
	buffer sizes for a given brush scaled with a given scale.

	* app/core/gimpbrushgenerated.c: Implemented the new scale_size
	method inherited from GimpBrush, and modified
	gimp_brush_generated_calc to use this helper function.

	* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): Made
	the brush Scale-slider logarithmic.

	* app/paint/gimppaintoptions.c (gimp_paint_options_class_init):
	Changed Scale scale to [0.0, 10.0].

	* app/paint/gimpbrushcore.c:
	(gimp_brush_core_calc_brush_size): Refactored 'get brush size' code
	to where it belongs, in GimpBrush-classes, and allowed scales
	larger than 1.0.


svn path=/trunk/; revision=22113
2007-03-14 00:18:01 +00:00
Michael Natterer 4648f542cf app/core/gimpbrush.[ch] app/core/gimpbrushgenerated.c
2007-03-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.[ch]
	* app/core/gimpbrushgenerated.c
	* app/tools/gimppaintoptions-gui.c
	* app/base/brush-scale.[ch]
	* app/base/temp-buf.[ch]
	* app/paint/gimppaintoptions.c
	* app/paint/gimpbrushcore.c: revert last commit. The patch needs
	more review and it's easier to start from quare one than have
	patches on top of patches.


svn path=/trunk/; revision=22101
2007-03-12 09:33:57 +00:00
Michael Schumacher a4e81c3a6c Made brushes scalable (both up and down) by using existing scaling
2007-03-11  Michael Schumacher  <schumaml@cvs.gnome.org>

	Made brushes scalable (both up and down) by using existing
	scaling routines, and also refactored some brush-code. Patch by
	Martin Nordholts. Fixes bug #65030.

	* app/paint/gimpbrushcore.c:
	(gimp_brush_core_calc_brush_length_scale) Refactored 'get brush
	size' code to where it belongs, in GimpBrush-classes, and renamed
	gimp_brush_core_calc_brush_size to
	gimp_brush_core_calc_brush_length_scale.

	* app/paint/gimppaintoptions.c (gimp_paint_options_class_init):
	Changed Scale scale to [0.0, 100.0].

	* app/base/temp-buf.[ch] (mask_buf_new): Change signature to also
	take a bpp parameter.

	* app/base/brush-scale.[ch]: Changed brush_scale_(mask|pixmap) to
	the new brush_scale_buf, which uses existing scaling routines
	(scale_region) instead of dedicated down-scaling only routines.

	* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): Made
	the brush Scale-slider logarithmic.

	* app/core/gimpbrushgenerated.c: Implemented the new
	get_scaled_size method inherited from GimpBrush, and modified
	gimp_brush_generated_calc to use this helper function.

	* app/core/gimpbrush.[ch]: Added public virtual method
	get_scaled_size to GimpBrush, overridden by GimpBrushGenerated,
	which calculates the buffer sizes for a given brush scaled with a
	given scale. Also changed calls to brush_scale_(mask|pixmap) to
	the new brush_scale_buf.

svn path=/trunk/; revision=22099
2007-03-11 16:28:08 +00:00
Michael Natterer 4ddfeb7ddc don't include libgimpmath/gimpmathtypes.h
2007-03-10  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: don't include libgimpmath/gimpmathtypes.h

	* app/base/base-types.h: include it here. Also include
	libgimpcolor/gimpcolortypes.h


svn path=/trunk/; revision=22094
2007-03-10 19:31:07 +00:00
Michael Natterer 83d3a750d4 include "libgimpmath/gimpmathtypes.h" instead of "libgimpmath/gimpmath.h".
2007-03-09  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: include "libgimpmath/gimpmathtypes.h"
	instead of "libgimpmath/gimpmath.h".

	* app/core/gimpbrush.h
	* app/paint/gimppaintcore.h
	* app/paint/gimpperspectiveclone.h
	* app/text/gimptext.h
	* app/tools/gimptransformtool.h: include gimpvector.h and
	gimpmatrix.h explicitely where they are needed in public structs.

	* app/*/*.c
	* tools/pdbgen/pdb/paths.pdb: include "libgimpmath/gimpmath.h"
	where needed.

	* app/pdb/paths_cmds.c: regenerated.


svn path=/trunk/; revision=22084
2007-03-09 13:00:01 +00:00
Michael Natterer e6fb62d4ac Makes default Select -> Border behaviour consistent, and makes 'sticky
2007-03-05  Michael Natterer  <mitch@gimp.org>

	Makes default Select -> Border behaviour consistent, and makes
	'sticky image edges' optional by adding a checkbox in the Border
	Selection dialog. Patch by Martin Nordholts. Fixes bug #350009.

	* app/actions/select-commands.c (select_border_cmd_callback)
	(select_border_callback): Added edge-lock checkbox to dialog and
	modified calls accordingly.

	* app/paint-funcs/paint-funcs.c (border_region)
	(compute_transition): Fixed algorithm. (compute_transition is a
	helper function to the algorithm). Also clarified many parts of
	the algorithm with comments.

	* app/paint-funcs/paint-funcs.h
	* app/core/gimpchannel.[ch]
	* app/core/gimpselection.c: Added gboolean edge_lock to function
	calls/signatures.

	* app/pdb/selection_cmds.c: Regenerated. 


svn path=/trunk/; revision=22047
2007-03-05 20:21:23 +00:00
Michael Natterer 395b06ad8b added typdef GimpMemsizeFunc.
2007-03-05  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: added typdef GimpMemsizeFunc.

	* app/core/gimp-utils.[ch]: added _foreach() variants of
	GHashTable, GList and GSList functions which take GimpMemsizeFunc
	callbacks. Added gimp_parasite_get_memsize(). Added "data_size"
	parameter to gimp_g_hash_table_get_memsize().

	* app/core/gimp.c
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/pdb/gimppdb.c
	* app/plug-in/gimppluginmanager.c: use the new functions instead
	of itering manually or ignoring the containers' elements. Changed
	callers of gimp_g_hash_table_get_memsize().


svn path=/trunk/; revision=22046
2007-03-05 20:09:46 +00:00
Michael Natterer 1bfc742f03 don't pass random strings to g_print() without running them through %s.
2007-03-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpobject.c (gimp_object_get_memsize): don't pass
	random strings to g_print() without running them through %s.
	Fixes crash/warning when the string contains '%'.


svn path=/trunk/; revision=22042
2007-03-04 21:38:50 +00:00
Hans Breuer f8b13080e4 updated
2007-03-04  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc app/gimpcore.def : updated


svn path=/trunk/; revision=22041
2007-03-04 19:04:42 +00:00
Michael Natterer 4dd7d18b06 use gimp_drawable_bytes_with_alpha() instead of manually adding alpha to
2007-03-01  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-blend.c (gimp_drawable_blend): use
	gimp_drawable_bytes_with_alpha() instead of manually adding
	alpha to the value returned by gimp_drawable_bytes()


svn path=/trunk/; revision=22037
2007-03-01 17:53:56 +00:00
Michael Natterer b60fbd3324 even more whitespace cleanup.
2007-02-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-transform-resize.c: even more whitespace cleanup.


svn path=/trunk/; revision=22023
2007-02-28 11:17:29 +00:00
Sven Neumann a75dc8a046 removed trailing whitespace.
2007-02-28  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-resize.c: removed trailing whitespace.


svn path=/trunk/; revision=22022
2007-02-28 09:14:40 +00:00
Sven Neumann c294d9bc94 app/core/gimpimage-scale.c app/core/gimpimage-rotate.c
2007-02-28  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-scale.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-flip.c: cosmetics.


svn path=/trunk/; revision=22021
2007-02-28 08:57:17 +00:00
Sven Neumann 776f7973b2 follow the internal API change
svn path=/trunk/; revision=22011
2007-02-27 11:10:17 +00:00
Sven Neumann 6852fc8068 allow the parent progress to be NULL. Documented the API.
2007-02-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpsubprogress.[ch]: allow the parent progress to be NULL.
	Documented the API.

	* app/core/gimpimage-scale.c: use the sub-progress unconditionally.


svn path=/trunk/; revision=22010
2007-02-27 11:03:18 +00:00
Sven Neumann 5b5082a433 app/core/Makefile.am app/core/core-types.h added GimpSubProgress, an
2007-02-27  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpsubprogress.[ch]: added GimpSubProgress, an 
object
	that implements the GimpProgress interface and maps progress
	information to a sub-range of the parent progress.

	* app/core/gimpimage-scale.c (gimp_image_scale): use the new 
object.


svn path=/trunk/; revision=22009
2007-02-27 09:39:31 +00:00
Sven Neumann 99e507de58 removed a redundant condition and marked another one as unlikely.
2007-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c (normalize_coords): removed a
	redundant condition and marked another one as unlikely.


svn path=/trunk/; revision=22008
2007-02-26 19:43:14 +00:00
Sven Neumann b3ec8a219d app/core/gimpimage-scale.c cosmetics.
2007-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-scale.c
	* app/actions/image-commands.c: cosmetics.


svn path=/trunk/; revision=22007
2007-02-26 18:53:07 +00:00
Sven Neumann 352d64ab5e cosmetics
svn path=/trunk/; revision=22005
2007-02-26 15:32:54 +00:00
Sven Neumann e2ae556117 moved common code to an inlined function. gimp_transform_region_lanczos()
2007-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c: moved common code to an
	inlined function. gimp_transform_region_lanczos() now also does
	supersampling.  Removed boundary checks and clamping as
	PixelSurround and read_pixel_data_1() already deal with this for
	us. Gives another small speedup.


svn path=/trunk/; revision=21999
2007-02-26 14:16:31 +00:00
Sven Neumann 6b7996a3e7 use PixelSurround instead of read_pixel_data_1(). This yields a dramatic
2007-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c (gimp_transform_region_lanczos):
	use PixelSurround instead of read_pixel_data_1(). This yields a
	dramatic speedup.


svn path=/trunk/; revision=21998
2007-02-26 13:36:50 +00:00
Sven Neumann ca30a115b3 iterate over tiles instead of rows in the destination buffer.
2007-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c (gimp_transform_region_lanczos):
	iterate	over tiles instead of rows in the destination buffer.


svn path=/trunk/; revision=21997
2007-02-26 13:03:51 +00:00
Sven Neumann 43d2cde05f moved linear and cubic code to their own functions and let them iterate
2007-02-24  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c (gimp_transform_region): moved
	linear and cubic code to their own functions and let them iterate
	over tiles instead of rows in the destination buffer.


svn path=/trunk/; revision=21996
2007-02-26 11:50:02 +00:00
Sven Neumann cc6a517f5b added more const qualifiers.
2007-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c: added more const qualifiers.


svn path=/trunk/; revision=21992
2007-02-26 09:33:13 +00:00
Sven Neumann 4232b8fa4e operate on tiles instead of iterating row by row.
2007-02-24  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c 
(gimp_transform_region_nearest):
	operate on tiles instead of iterating row by row.


svn path=/trunk/; revision=21988
2007-02-24 16:40:56 +00:00
Sven Neumann ef28e94e7f moved nearest-neighbor code to it's own function to improve performance
2007-02-24  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c (gimp_transform_region):
	moved nearest-neighbor code to it's own function to improve
	performance and readability.


svn path=/trunk/; revision=21987
2007-02-24 15:49:25 +00:00
Sven Neumann db72bf1358 moved lanczos code into it's own function to improve readability.
2007-02-23  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c (gimp_transform_region): 
moved
	lanczos code into it's own function to improve readability.


svn path=/trunk/; revision=21986
2007-02-23 19:04:19 +00:00
Sven Neumann 74776dd44e cosmetics
svn path=/trunk/; revision=21985
2007-02-23 16:35:38 +00:00
Sven Neumann 6788bffb5c do less tile lock and release operations by reusing the last locked tile
2007-02-23  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-surround.[ch]: do less tile lock and release
	operations by reusing the last locked tile if possible. Allow to
	call pixel_surround_lock() several times without unlocking.

	* app/core/gimp-transform-region.c: don't unlock the PixelSurround
	so that the locked tile can be reused. Yields about 30% speedup
	for transformations.


svn path=/trunk/; revision=21984
2007-02-23 16:19:42 +00:00
Sven Neumann 9d32b72c6f app/base/base-types.h hide PixelSurround struct and cleaned up the
2007-02-22  Sven Neumann  <sven@gimp.org>

	* app/base/base-types.h
	* app/base/pixel-surround.[ch]: hide PixelSurround struct and
	cleaned up the PixelSurround API.

	* app/core/gimp-transform-region.c: changed accordingly. Also
	sprinkled some const qualifiers.

svn path=/trunk/; revision=21978
2007-02-23 09:50:42 +00:00
Michael Natterer d212161c00 app/core/gimp-utils.[ch] app/core/gimp.c app/widgets/gimpcontrollerinfo.c
2007-02-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-utils.[ch]
	* app/core/gimp.c
	* app/widgets/gimpcontrollerinfo.c
	* libgimpwidgets/gimpcontroller.c: removed various boolean_handled
	signal accumulators and use g_signal_accumulator_true_handled().


svn path=/trunk/; revision=21933
2007-02-17 11:45:59 +00:00
Sven Neumann 462b5e0b45 update the progress less often.
2007-02-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert.c: update the progress less often.


svn path=/trunk/; revision=21913
2007-02-13 16:33:41 +00:00
Michael Natterer b1093d65a3 plug leak introduced with last commit: simply always use the deserialized
2007-02-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontainer.c (gimp_container_deserialize): plug leak
	introduced with last commit: simply always use the deserialized
	name, also on ojects already existing in the container.


svn path=/trunk/; revision=21890
2007-02-11 12:48:41 +00:00
Michael Natterer 8cffeb0689 Made templates say "ppi" instead of "dpi". Fixes bug #376990:
2007-02-10  Michael Natterer  <mitch@gimp.org>

	Made templates say "ppi" instead of "dpi". Fixes bug #376990:

	* app/core/gimp-templates.c
	(gimp_templates_migrate_get_child_by_name): find the child also
	if the name differs only in the substrings "dpi" and "ppi".

	* app/core/gimpcontainer.c (gimp_container_deserialize): if we
	found a child, give it the deserialized name if it isn't the same
	as its old name.

	* etc/templaterc: applied patch from Michael Schumacher that
	replaces "dpi" by "ppi".


svn path=/trunk/; revision=21888
2007-02-10 10:37:20 +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
Michael Natterer a95bbc5daf implement GIMP_UNDO_FS_TO_LAYER.
2007-02-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpfloatingselundo.[ch]: implement GIMP_UNDO_FS_TO_LAYER.

	* app/core/gimpimage-undo-push.c: use it. Also changed
	gimp_image_undo_push_cantundo() to not pass a pop function to
	gimp_image_undo_push().


svn path=/trunk/; revision=21844
2007-02-03 21:58:12 +00:00
Michael Natterer 3c6912c52c app/core/gimpimageundo.[ch] implement image and item parasite attach and
2007-02-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimageundo.[ch]
	* app/core/gimpitempropundo.[ch]: implement image and item
	parasite attach and remove undos. They are image/item properties
	after all.

	* app/core/gimpimage-undo-push.[ch]: use them here and move the
	undo functions to the resp. image and item property sections.


svn path=/trunk/; revision=21835
2007-02-02 10:55:38 +00:00
Michael Natterer 6072f873b8 require "name" being non-NULL.
2007-01-31  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.c (gimp_item_parasite_detach): require "name"
	being non-NULL.

	* app/core/gimpimage-undo-push.c (undo_pop_parasite): removed dead
	code which handled parasites of the Gimp itself, don't include
	"gimp-parasites.h".

	Require "parasite" and "name" being non-NULL in all public
	parasite undo functions.


svn path=/trunk/; revision=21829
2007-01-31 22:58:06 +00:00
Michael Natterer d0df7dae38 app/core/gimpmaskundo.c implement GimpObject::get_memsize() instead of
2007-01-31  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpmaskundo.c
	* app/core/gimpitempropundo.c: implement GimpObject::get_memsize()
	instead of fiddling with undo->size.


svn path=/trunk/; revision=21828
2007-01-31 22:06:01 +00:00
Michael Natterer ff997b36c0 removed "drawable" parameter because it's always the drawable the floating
2007-01-31  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-undo-push.[ch]
	(gimp_image_undo_push_fs_to_layer): removed "drawable" parameter
	because it's always the drawable the floating selection is
	attached to.

	* app/core/gimplayer-floating-sel.c (floating_sel_to_layer):
	changed accordingly.


svn path=/trunk/; revision=21827
2007-01-31 21:54:17 +00:00
Michael Natterer 89ee6f4d1a app/core/Makefile.am app/core/core-types.h new undo class for
2007-01-31  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpfloatingselundo.[ch]: new undo class for
	GIMP_UNDO_FS_RIGOR and GIMP_UNDO_FS_RELAX.

	* app/core/gimpimage-undo-push.c: use it here.

	* app/core/gimpimageundo.c
	* app/core/gimpdrawableundo.c: implement GimpObject::get_memsize()
	instead of fiddling with undo->size.


svn path=/trunk/; revision=21826
2007-01-31 21:05:43 +00:00
Michael Natterer 6c01c0db6b app/vectors/Makefile.am app/vectors/vectors-types.h new undo class for
2007-01-31  Michael Natterer  <mitch@gimp.org>

	* app/vectors/Makefile.am
	* app/vectors/vectors-types.h
	* app/vectors/gimpvectorsmodundo.[ch]: new undo class for
	GIMP_UNDO_VECTORS_MOD.

	* app/core/gimpimage-undo-push.c: use it here.

	* app/core/gimpdrawablemodundo.h: fix typo in include guard.


svn path=/trunk/; revision=21825
2007-01-31 19:56:41 +00:00
Michael Natterer 336d7761c8 app/core/Makefile.am app/core/core-types.h new undo class for
2007-01-31  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpdrawablemodundo.[ch]: new undo class for
	GIMP_UNDO_DRAWABLE_MOD.

	* app/core/gimpimage-undo-push.c: use it here.


svn path=/trunk/; revision=21824
2007-01-31 19:13:12 +00:00
Michael Natterer a7c0058c62 app/core/Makefile.am app/core/core-types.h new undo class for
2007-01-31  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimplayermaskpropundo.[ch]: new undo class for
	GIMP_UNDO_LAYER_MASK_APPLY and GIMP_UNDO_LAYER_MASK_SHOW.

	* app/core/gimpimage-undo-push.c: use it here.


svn path=/trunk/; revision=21823
2007-01-31 18:50:39 +00:00
Michael Natterer d388d58494 app/core/Makefile.am app/core/core-types.h app/core/gimpchannelundo.[ch]
2007-01-31  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpchannelundo.[ch]
	* app/core/gimplayerundo.[ch]
	* app/core/gimplayermaskundo.[ch]: new undo classes implementing
	channel, layer and layer mask add and remove undos.

	* app/vectors/Makefile.am
	* app/vectors/vectors-types.h
	* app/vectors/gimpvectorsundo.[ch]: vectors add and remove undos.

	* app/core/gimpimage-undo-push.[ch]: use the new undo classes.
	Removed "position" parameter from all "add" functions because
	it's useless.

	* app/core/gimpimage.c: changed accordingly.


svn path=/trunk/; revision=21822
2007-01-31 12:33:03 +00:00
Michael Natterer 9020afcf22 renamed these files...
2007-01-30  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannelundo.[ch]: renamed these files...

	* app/core/gimpmaskundo.[ch]: ...to these. We'll need the name
	GimpChannelUndo for something else later.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpimage-undo-push.c: changed accordingly.


svn path=/trunk/; revision=21819
2007-01-30 22:53:18 +00:00
Michael Natterer f71d884bda app/vectors/Makefile.am app/vectors/vectors-types.h new undo class which
2007-01-30  Michael Natterer  <mitch@gimp.org>

	* app/vectors/Makefile.am
	* app/vectors/vectors-types.h
	* app/vectors/gimpvectorspropundo.[ch]: new undo class which
	implements GIMP_UNDO_VECTORS_REPOSITION.

	* app/core/gimpimage-undo-push.c: use it here.

	* app/Makefile.am: another lame linker hack to make it build with
	the new file that is not used in app/vectors/ itself.


svn path=/trunk/; revision=21818
2007-01-30 22:06:55 +00:00
Michael Natterer e5419559d4 app/core/gimpguideundo.c app/core/gimpimageundo.c
2007-01-30  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpguideundo.c
	* app/core/gimpimageundo.c
	* app/core/gimplayerpropundo.c
	* app/core/gimpsamplepointundo.c
	* app/core/gimpdrawableundo.c
	* app/core/gimpitempropundo.c
	* app/core/gimpchannelpropundo.c
	* app/core/gimpchannelundo.c
	* app/core/gimpitemundo.c: chain up last in GimpUndo::free(), use
	switch() in place of if/else when there is more than one undo type
	implemented in one file, g_assert_not_reached() in default:, some
	minor cleanups.


svn path=/trunk/; revision=21817
2007-01-30 16:53:20 +00:00
Michael Natterer 13a3975be4 add support for GIMP_UNDO_TEXT_LAYER_MODIFIED.
2007-01-30  Michael Natterer  <mitch@gimp.org>

	* app/text/gimptextundo.[ch]: add support for
	GIMP_UNDO_TEXT_LAYER_MODIFIED.

	* app/core/gimpimage-undo-push.c: use it here.


svn path=/trunk/; revision=21816
2007-01-30 15:08:59 +00:00
Michael Natterer f0d1d8643d app/core/Makefile.am app/core/core-types.h app/core/gimpguideundo.[ch] new
2007-01-30  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpguideundo.[ch]
	* app/core/gimpsamplepointundo.[ch]: new classes implementing
	guide and sample point undos.

	* app/core/gimpimage-undo-push.c: use them and remove all guide
	and sample point code.


svn path=/trunk/; revision=21815
2007-01-30 12:32:14 +00:00
Michael Natterer 11b1d24ac7 app/core/Makefile.am new files implementing new(), ref() and unref() and
2007-01-30  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpsamplepoint.[ch]: new files implementing new(),
	ref() and unref() and the new GIMP_TYPE_SAMPLE_TYPE boxed type.

	* app/core/gimpimage-sample-points.[ch]: removed ref() and unref()
	functions here.

	* app/core/gimpimage.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-undo-push.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpdisplayshell-draw.c
	* app/tools/gimpcolortool.c
	* app/widgets/gimpsamplepointeditor.c
	* app/xcf/xcf-save.c: changed accordingly.

	* app/core/gimpimage-rotate.c (gimp_image_rotate_sample_points):
	added missing call to gimp_image_undo_push_sample_point().


svn path=/trunk/; revision=21812
2007-01-30 10:34:59 +00:00
Michael Natterer dcee3d60c3 app/core/core-enums.[ch] drop the "image" from GIMP_UNDO_IMAGE_GUIDE,
2007-01-30  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]
	* app/core/gimpimage-undo-push.[ch]: drop the "image" from
	GIMP_UNDO_IMAGE_GUIDE, GIMP_UNDO_IMAGE_SAMPLE_POINT,
	gimp_imge_undo_push_image_guide() and
	gimp_imge_undo_push_image_sample_point()

	* app/core/gimpimage-undo.c
	* app/core/gimpimage-guides.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-sample-points.c
	* app/core/gimpimage-rotate.c
	* app/tools/gimpmeasuretool.c: changed accordingly.


svn path=/trunk/; revision=21804
2007-01-29 23:21:41 +00:00
Michael Natterer c52a43101a app/core/core-enums.[ch] reordered IMAGE_GRID and IMAGE_COLORMAP to be
2007-01-29  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]
	* app/core/gimpimage-undo-push.[ch]: reordered IMAGE_GRID and
	IMAGE_COLORMAP to be before IMAGE_GUIDE and IMAGE_SAMPLE_POINT.


svn path=/trunk/; revision=21802
2007-01-29 22:37:18 +00:00
Michael Natterer c757ac1534 add support for IMAGE_GRID and IMAGE_COLORMAP undos.
2007-01-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimageundo.[ch]: add support for IMAGE_GRID and
	IMAGE_COLORMAP undos.

	* app/core/gimpimage-undo-push.c: use GimpImageUndo for grid and
	colormap undos.


svn path=/trunk/; revision=21801
2007-01-29 19:11:35 +00:00
Michael Natterer 9a7de0552d return a GimpUndo* instead of gboolean from all undo_push functions.
2007-01-29  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-undo-push.[ch]: return a GimpUndo* instead
	of gboolean from all undo_push functions. Simplifies the new
	properly done functions quite a bit.


svn path=/trunk/; revision=21800
2007-01-29 18:49:06 +00:00
Michael Natterer e9b9f1bfd1 app/core/Makefile.am app/core/core-types.h new undo class which handles
2007-01-29  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpchannelpropundo.[ch]: new undo class which handles
	CHANNEL_REPOSITION and CHANNEL_COLOR.

	* app/core/gimpimage-undo-push.c: use the new undo class and
	remove the resp. code here.


svn path=/trunk/; revision=21799
2007-01-29 08:40:40 +00:00
Michael Natterer 125a001976 app/core/Makefile.am app/core/core-types.h new undo class which handles
2007-01-28  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimplayerpropundo.[ch]: new undo class which handles
	LAYER_REPOSITION, LAYER_MODE, LAYER_OPACITY and LAYER_LOCK_ALPHA.

	* app/core/gimpimage-undo-push.c: use the new undo class and
	remove the resp. code here.


svn path=/trunk/; revision=21791
2007-01-28 20:10:45 +00:00
Michael Natterer 60370072fd app/core/Makefile.am app/core/core-types.h new undo class which handles
2007-01-28  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpitempropundo.[ch]: new undo class which handles
	ITEM_RENAME, ITEM_DISPLACE, ITEM_VISIBILITY and ITEM_LINKED undos.

	* app/core/gimpimage-undo-push.c: use the new undo class and
	remove the resp. code here.


svn path=/trunk/; revision=21790
2007-01-28 19:00:13 +00:00
Michael Natterer 11a43d6a50 app/core/Makefile.am app/core/core-types.h new undo class which handles
2007-01-28  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpimageundo.[ch]: new undo class which handles
	GIMP_UNDO_IMAGE_TYPE, GIMP_UNDO_IMAGE_SIZE and
	GIMP_UNDO_IMAGE_RESOLUTION.

	* app/core/gimpimage-undo-push.c: use the new undo class and
	remove the resp. code here.

	* app/core/gimpimage-undo.h: changed include guards to not
	conflict with gimpimageundo.h


svn path=/trunk/; revision=21789
2007-01-28 18:21:39 +00:00
Michael Natterer 3003ca1b5c add the passed TileManager's size to undo->size.
2007-01-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawableundo.c (gimp_drawable_undo_constructor):
	add the passed TileManager's size to undo->size.

	* app/core/gimpimage-undo-push.c (gimp_image_undo_push_drawable):
	no need to get and pass the TileManager's size here.


svn path=/trunk/; revision=21787
2007-01-28 15:06:23 +00:00
Michael Natterer 14fa7e3a41 app/core/Makefile.am app/core/core-types.h new GimpItemUndo subclass which
2007-01-28  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpchannelundo.[ch]: new GimpItemUndo subclass which
	handles all the channel undo stuff itself.

	* app/core/gimpimage-undo-push.c: removed all channel undo code
	here and simply create a GimpChannelUndo instance.


svn path=/trunk/; revision=21786
2007-01-28 14:58:17 +00:00
Michael Natterer 8398ed8735 maintain an is_drawn boolean which indicates whether the drawn stuff is
2007-01-21  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.[ch]: maintain an is_drawn boolean which
	indicates whether the drawn stuff is currently visible. Added
	gimp_draw_tool_is_drawn() to obtain it.

	* app/tools/gimpbrushtool.c (gimp_brush_tool_draw): don't create
	the brush outline segments for the purpose of undrawing (if we
	don't have the segments, we can hardly have drawn them before).
	Fixes artifacts when the brush is being scaled or changed.

	* app/core/gimpbrush.c: don't call brush_scale_mask() and
	brush_scale_pixmap() with zero width or height. Fixes warnings
	from these functions.


svn path=/trunk/; revision=21749
2007-01-21 19:54:57 +00:00
Sven Neumann 20b331da7f let the filename -> uri functions take a Gimp parameter instead of the
2007-01-19  Sven Neumann  <sven@gimp.org>

	* app/file/file-utils.[ch]: let the filename -> uri functions take
	a Gimp parameter instead of the list of load procedures.

	* app/core/gimpimage.c
	* app/app_procs.c
	* app/dialogs/file-open-location-dialog.c
	* tools/pdbgen/pdb/fileops.pdb: changed accordingly.

	* app/pdb/fileops_cmds.c: regenerated.

svn path=/trunk/; revision=21736
2007-01-19 11:48:48 +00:00
Hans Breuer f8d14112c4 updated #include "file/file-utils.h" for file_utils_uri_display_name
2007-01-13  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc app/gimpcore.def : updated
	* app/display/gimpdisplay-handlers.c : #include "file/file-utils.h"
	for file_utils_uri_display_name
	* plug-ins/imagemap/imap_statusbar.c : g_snprintf instead of snprintf


svn path=/trunk/; revision=21705
2007-01-13 22:41:21 +00:00
Michael Natterer 09f47a0aec register GIMP_TYPE_DASH_PATTERN as boxed type. Added "new" to function
2007-01-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdashpattern.[ch]: register GIMP_TYPE_DASH_PATTERN
	as boxed type. Added "new" to function names which create dash
	patterns. Changed and renamed GValue functions to functions which
	convert the dash pattern between GArray and GValueArray.

	* app/core/gimpstrokeoptions.c
	* app/widgets/gimpcellrendererdashes.c
	* app/widgets/gimpstrokeeditor.c: changed accordingly.

	* app/widgets/gimpdasheditor.c: ditto. Get rid of the recently
	added manual memory management. The list store manages boxed types
	all by itself.


svn path=/trunk/; revision=21698
2007-01-12 20:27:40 +00:00
Sven Neumann 930d6149da removed all .cvsignore files from SVN
svn path=/trunk/; revision=21612
2006-12-30 14:31:03 +00:00
Mukund Sivaraman f0cff0ff92 app/core/Makefile.am app/core/gimp-transform-resize.c
2006-12-24  Mukund Sivaraman  <muks@mukund.org>

        * app/core/Makefile.am
        * app/core/gimp-transform-resize.c
        * app/core/gimpchannel.c
        * app/core/gimpdrawable-transform.c
        * app/core/gimpdrawable-transform.h
        * app/core/gimpdrawable.c
        * app/core/gimpimage-item-list.c
        * app/core/gimpimage-item-list.h
        * app/core/gimpitem-linked.c
        * app/core/gimpitem-linked.h
        * app/core/gimpitem.c
        * app/core/gimpitem.h
        * app/core/gimplayer.c
        * app/pdb/drawable_transform_cmds.c
        * app/text/gimptextlayer-transform.c
        * app/text/gimptextlayer-transform.h
        * app/tools/gimptransformoptions.c
        * app/tools/gimptransformtool.c
        * app/vectors/gimpvectors.c
        * libgimp/gimpdrawabletransform_pdb.c
        * libgimp/gimpdrawabletransform_pdb.h
        * libgimp/gimpenums.c.tail
        * libgimpbase/gimpbase.def
        * libgimpbase/gimpbaseenums.c
        * libgimpbase/gimpbaseenums.h
        * tools/pdbgen/enums.pl
        * tools/pdbgen/pdb/drawable_transform.pdb: implemented UI and PDB
        for new clipping modes for affine transforms (crop to largest
        rectangle, and crop to largest rectangle with the source's aspect
        ratio); fixed various bugs in the largest rectangle computation
        code; set padding to 6 in the transformation tool options.
2006-12-24 16:48:08 +00:00
Sven Neumann 541c8af049 app/core/gimp-documents.c app/core/gimp-parasites.c
2006-12-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-documents.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/widgets/gimpcontrollers.c: changed the header that is
	written to config files that are rewritten on exit.

	* app/tools/gimpiscissorstool.c: comment.
2006-12-22 10:09:09 +00:00
Mukund Sivaraman ef51d1b89f Fixed code in gimp_transform_resize_crop() to calculate the maximum
2006-12-16  Mukund Sivaraman  <muks@mukund.org>

        * app/core/gimp-transform-resize.c: Fixed code in
        gimp_transform_resize_crop() to calculate the maximum rectangle in
        the quadrilateral which results after a transform; added a function
        parameter for aspect ratio too.
2006-12-16 15:19:47 +00:00
Tor Lillqvist 3c5b0e2530 On Win32, include gimpwin32-io.h for S_IRGRP and friends.
2006-12-16  Tor Lillqvist  <tml@novell.com>

	* app/core/gimptooloptions.c: On Win32, include gimpwin32-io.h for
	S_IRGRP and friends.
2006-12-16 00:20:26 +00:00
Michael Natterer 1fdacfd775 fixed order of layers for the position == -1 (add above avtive layer)
2006-12-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.c (gimp_image_add_layers): fixed order of
	layers for the position == -1 (add above avtive layer) case.
	Fixes bug #386199.
2006-12-15 15:34:28 +00:00
Michael Natterer 98ae7326d7 Applied slightly modified patch from David Gowers which abstracts away and
2006-12-14  Michael Natterer  <mitch@gimp.org>

	Applied slightly modified patch from David Gowers which abstracts
	away and unifies seraching a color in a palette (bug #132146):

	* app/core/gimppalette.[ch]: added gimp_palette_find_entry().

	* app/widgets/gimpcolorselectorpalette.c
	* app/widgets/gimppaletteeditor.c: use it for selecting matching
	colors from the active palette.
2006-12-14 12:02:05 +00:00
Øyvind Kolås 6d979e5edc indentation fix.
* app/core/gimpprojection.h: indentation fix.
2006-12-13 14:27:57 +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 4fb72eb8cf added API to delete saved tool-options.
2006-12-11  Sven Neumann  <sven@gimp.org>

	* app/core/gimptooloptions.[ch]: added API to delete saved
	tool-options.

	* app/tools/gimp-tools.c: don't deal with saving presets, just
	load them on startup. Create the tool-options directory when
	saving tool-options.

	* app/core/gimptoolpresets.[ch]: added new signal that is
emitted
	whenever the presets changes. Create the tool-options directory
	when saving a preset.

	* app/widgets/gimptooloptionseditor.[ch]: listen to the
"changed"
	signal of GimpToolPresets and queue an idle save.
2006-12-11 15:16:13 +00:00
Sven Neumann 6dc91417e1 app/actions/tool-options-commands.c app/core/gimptoolpresets.[ch] code
2006-12-11  Sven Neumann  <sven@gimp.org>

	* app/actions/tool-options-commands.c
	* app/core/gimptoolpresets.[ch]
	* app/tools/gimp-tools.c: code cleanup.
2006-12-11 08:23:00 +00:00
Sven Neumann 05dc8ace05 be consistent with other config files and always display the "Parsing
..." line, even if the file doesn't exist
2006-12-10 19:59:34 +00:00
Sven Neumann 4e0828198c minor cleanup 2006-12-10 19:44:37 +00:00
Sven Neumann 42f91125a7 do not create empty presets files and don't create any output for presets
2006-12-10  Sven Neumann  <sven@gimp.org>

	* app/core/gimptoolpresets.c: do not create empty presets files
	and don't create any output for presets files that don't exist.
2006-12-10 19:29:17 +00:00
Sven Neumann df8bf728a6 app/core/Makefile.am app/core/core-types.h added GimpToolPresets, derived
2006-12-10  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimptoolpresets.[ch]: added GimpToolPresets, derived
	from GimpList.

	* app/core/gimptoolinfo.[ch]: use the new type, renamed
	member "options_presets" to "presets".

	* app/actions/tool-options-actions.c
	* app/actions/tool-options-commands.c
	* app/core/gimptooloptions.[ch]
	* app/menus/tool-options-menu.c
	* app/widgets/gimptooloptionseditor.c: changed accordingly.

	* app/tools/gimp-tools.c: let the GimpToolPresets object deal
with
	loading and saving the presets from ${gimpdir}/tool-options.

	* app/core/gimpcontainer-filter.c
	* app/core/gimpdocumentlist.c
	* app/core/gimplist.c
	* app/text/gimpfontlist.c: use canonical property names.
2006-12-10 19:13:58 +00:00
Michael Natterer 69cc852867 fix whitespace.
2006-12-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrushpipe.h: fix whitespace.
2006-12-09 23:15:59 +00:00
Sven Neumann 7bd0c05d29 use "GIMP" instead of "The GIMP".
2006-12-09  Sven Neumann  <sven@gimp.org>

	* app/gui/gui.c: use "GIMP" instead of "The GIMP".

	* app/core/gimpimagefile.c (gimp_imagefile_save_thumb): use
"GIMP"
	in the 'Software' tag when writing thumbnails.

	* app/composite/gimp-composite.html: removed outdated document.
2006-12-09 21:49:23 +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 6ded475a12 app/core/gimpbrush.c (gimp_brush_class_init) gah, should use the right
2006-12-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.c (gimp_brush_class_init)
	* app/core/gimpbrushgenerated.c (gimp_brush_generated_new): gah,
	should use the right binary for testing. Fixes the new spacing
	property.
2006-12-07 11:53:02 +00:00
Sven Neumann 4fa50e1f86 when creating the user directory, create parent directories if they don't
2006-12-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-user-install.c: when creating the user directory,
	create parent directories if they don't exist.
2006-12-07 11:51:17 +00:00
Michael Natterer 7515d9b6dc made "spacing" a property.
2006-12-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.c: made "spacing" a property.

	* app/core/gimpbrushgenerated-save.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c: use it. Don't access brush->spacing
	manually, always use accessors.
2006-12-06 00:01:27 +00:00
Sven Neumann 2acc124280 applied patch from Aurimas Juška that fixes conversion with dithering of
2006-11-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert.c: applied patch from Aurimas Juška
	that fixes conversion with dithering of transparency (bug #358851).
2006-11-27 16:38:58 +00:00
Michael Natterer 146e063f0a app/core/gimpbrushclipboard.c app/core/gimppatternclipboard.c
2006-11-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrushclipboard.c
	* app/core/gimppatternclipboard.c
	* app/core/gimptooloptions.c
	* app/core/gimpundo.c
	* app/widgets/gimpdevicestatus.c
	* app/widgets/gimpdock.c
	* app/widgets/gimpimageparasiteview.c
	* app/widgets/gimpimagepropview.c: no need to cast the return
	value of g_value_get_object(), it's a gpointer.
2006-11-25 14:57:26 +00:00
Simon Budig 5166c11c7d app/core/gimpdrawable.c fix the warnings about the interface
2006-11-24  Simon Budig  <simon@gimp.org>

	* app/core/gimpdrawable.c
	* app/core/gimpprojection.c: fix the warnings about the interface
	initialization.
2006-11-24 22:41:03 +00:00
Simon Budig 0308d410b4 Fixing include/declaration issues in the application:
2006-11-23  Simon Budig  <simon@gimp.org>

	Fixing include/declaration issues in the application:

	* app/composite/gimp-composite-sse2.c: disable unused debugging code

	* app/paint-funcs/paint-funcs.[ch]
	* app/paint-funcs/scale-funcs.[ch]: fix include files, add some
	prototypes, make some other functions static.

	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-preview.c: changed accordingly.

	* app/tools/gimpeditselectiontool.[ch]: untangle .c and .h file.

	* app/widgets/gimpfiledialog.c: add missing #include.
2006-11-24 14:08:40 +00:00
Simon Budig a8411dc754 Hack up gimp_value_set_item() to do the correct thing for subtypes of
2006-11-17  Simon Budig  <simon@gimp.org>

	* app/core/gimpparamspecs.c: Hack up gimp_value_set_item() to do
	the correct thing for subtypes of GimpItems.

	* app/actions/plug-in-commands.c: Don't rely on the GimpValues for
	type checking, pass the param specs to the _collect functions and
	use them for typechecking.
2006-11-17 16:56:37 +00:00
Michael Natterer 35f198e7b0 use brush_scale_pixmap(), not brush_scale_mask().
2006-11-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.c (gimp_brush_real_scale_pixmap): use
	brush_scale_pixmap(), not brush_scale_mask().
2006-11-15 18:46:10 +00:00
Michael Natterer 85cecec576 app/base/base.c app/core/gimp-user-install.c
2006-11-12  Michael Natterer  <mitch@gimp.org>

	* app/base/base.c
	* app/core/gimp-user-install.c
	* app/core/gimpbrushgenerated-load.c
	* app/core/gimpcontainer.c
	* app/core/gimpgradient-load.c
	* app/core/gimppalette-load.c
	* app/core/gimpparamspecs-desc.c
	* app/dialogs/tips-parser.c
	* app/menus/plug-in-menus.c
	* app/plug-in/gimppluginmanager.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptext-parasite.c
	* app/tools/gimpforegroundselecttool.c
	* app/widgets/gimpselectiondata.c
	* app/xcf/xcf.c: use g_str_has_prefix() instead of strncmp().
2006-11-12 20:30:50 +00:00
Michael Natterer 1186dfd256 Properly abstract brush scaling:
2006-11-09  Michael Natterer  <mitch@gimp.org>

	Properly abstract brush scaling:

	* app/core/gimpbrush.[ch]: added virtual functions
	GimpBrush::scale_mask() and ::scale_pixmap() and default
	implementations which call the functions in base/brush-scale.c.

	* app/core/gimpbrushgenerated.c: factored out brush calculation to
	an internal utility function and call that function from ::dirty()
	and from the new ::scale_mask().

	* app/core/gimpbrushcore.c: use gimp_brush_scale_mask/pixmap()
	instead of using the lowlevel scale functions directly. Fixes the
	uglyness that we were scaling generated brushes instead of simply
	recalculating them in the right size.
2006-11-09 14:54:49 +00:00
Sven Neumann dff4ef8f57 applied patch from gg that removes duplicated code (bug #358481).
2006-11-05  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c: applied patch from gg that
	removes duplicated code (bug #358481).
2006-11-05 09:06:47 +00:00
Sven Neumann e98c83a523 moved call to gimp_item_get_image() out of the loop.
2006-11-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_do): moved call to
	gimp_item_get_image() out of the loop.

	* app/base/pixel-region.c
	* app/core/gimpitem.c: formatting.
2006-11-04 18:18:32 +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 725a4e414f added value GIMP_UNDO_GROUP_LAYER_ADD.
2006-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch] (enum GimpUndoType): added value
	GIMP_UNDO_GROUP_LAYER_ADD.

	* app/file/file-open.[ch]: changed file_open_layer() to
	file_open_layers(), added parameter "gboolean merge_visible",
	return a GList of layers.

	* app/dialogs/file-open-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/widgets/gimplayertreeview.c: pass merge_visible = FALSE and
	add all returned layers to the image. Fixes bug #358082.
	(contains lots of duplicated code, will factor that out later).

	* tools/pdbgen/pdb/fileops.pdb (load_layer): pass merge_visible = TRUE
	(load_layers): new wrapper which returns all the image's layers.

	* app/pdb/fileops_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimpfileops_pdb.[ch]: regenerated.

	* libgimp/gimp.def: changed accordingly.
2006-11-03 17:12:27 +00:00
Sven Neumann 2d16c08e1f string change.
2006-11-01  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.[ch]: string change.

	* app/dialogs/preferences-dialog.c: added a combo box for the
	color-profile-policy.
2006-11-01 00:54:20 +00:00
Michael Natterer c18faa20fe app/actions/brush-editor-actions.c app/base/tile-manager-crop.c
2006-10-30  Michael Natterer  <mitch@gimp.org>

	* app/actions/brush-editor-actions.c
	* app/base/tile-manager-crop.c
	* app/config/gimpconfig-file.c
	* app/core/gimp-gradients.c
	* app/core/gimpdrawable-histogram.c
	* app/core/gimpimage-colorhash.c
	* app/core/gimpimage-undo-push.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/preferences-dialog.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/gui/gui-vtable.c
	* app/paint/gimpheal.c
	* app/paint/gimppaintcore-undo.c
	* app/plug-in/plug-in-enums.h
	* app/vectors/gimpstroke-new.c
	* app/vectors/gimpvectors-warp.c
	* app/widgets/gimpviewablebox.c
	* app/widgets/gimpviewrenderer-frame.c
	* app/widgets/gimpviewrenderer-utils.c
	* app/xcf/xcf-save.c
	* libgimpwidgets/gimpcontroller.c: all .c files should include
	their headers and all private functions should be static.
	(-Wmissing-declarations -Wmissing-prototypes rocks!)
2006-10-30 10:13:06 +00:00
Michael Natterer a1430913b1 added gimp_rc_migrate() which resets all GimpParamConfigPath properties to
2006-10-29  Michael Natterer  <mitch@gimp.org>

	* app/config/gimprc.[ch]: added gimp_rc_migrate() which resets
	all GimpParamConfigPath properties to default values.

	* app/core/gimp-user-install.c (user_install_migrate_files): use
	the function. Fixes bug #332620.
2006-10-29 18:40:51 +00:00
Michael Natterer 85365c9284 removed unused x,y,width,height parameters.
2006-10-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-transform-utils.[ch]
	(gimp_transform_matrix_flip_free): removed unused x,y,width,height
	parameters.

	* tools/pdbgen/pdb/drawable_transform.pdb: changed accordingly.

	* app/pdb/drawable_transform_cmds.c: regenerated.
2006-10-28 10:29:46 +00:00
William Skaggs 8166a20748 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpdata.c (gimp_data_class_init): fix typo
	in property construction code.
2006-10-27 18:11:46 +00:00
Hans Breuer 3551bbcca0 updated
2006-10-27  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc app/gimpcore.def : updated
2006-10-27 16:04:53 +00:00
Sven Neumann 63da8bb8ca libgimpconfig/gimpcolorconfig-enums.[ch] libgimpconfig/gimpcolorconfig.c
2006-10-27  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpcolorconfig-enums.[ch]
	* libgimpconfig/gimpcolorconfig.c
	* libgimpconfig/gimpconfig.def: removed unused enum
	GimpColorFileOpenBehaviour.

	* app/core/core-enums.[ch]: added enum GimpColorProfilePolicy.

	* app/config/gimpcoreconfig.[ch]
	* app/config/gimprc-blurbs.h: added property
"color-profile-policy".

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-icc-profile.[ch]: new files that wrap
usage
	of the lcms plug-in.

	* app/file/file-open.c: implement the user-configured policy for
	embedded color profiles.

	* app/widgets/gimpimageprofileview.c: use the wrapper to call
the
	plug-in-icc-profile-info procedure.

	* app/widgets/gimptoolbox-dnd.c: pass TRUE for "attach_comment"
	parameter to gimp_create_image().

	* app/core/gimptemplate.c
	* app/file/Makefile.am: cosmetic changes.

	* app/Makefile.am: some resorting to make the beast link again.
2006-10-27 13:52:40 +00:00
Michael Natterer 3230844107 prefix parameters x1, y1, x2, y2 with "dest_".
2006-10-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-transform-region.c (gimp_transform_region):
	prefix parameters x1, y1, x2, y2 with "dest_".

	* app/core/gimpdrawable-combine.c
	(gimp_drawable_real_replace_region): cosmetic.
2006-10-27 11:21:22 +00:00
Michael Natterer 17f6289372 make lanczos work for orig_tiles that don't start at 0,0. Please folks,
2006-10-26  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-transform-region.c (gimp_transform_region): make
	lanczos work for orig_tiles that don't start at 0,0. Please folks,
	some basic testing of anything but the most simple use case next
	time.
2006-10-26 09:45:54 +00:00
Michael Natterer 2cdb9875a0 app/core/Makefile.am new files containing gimp_transform_region() and all
2006-10-26  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimp-transform-region.[ch]: new files containing
	gimp_transform_region() and all its voodoo utility functions.

	* app/core/gimpdrawable-transform.c: removed the stuff here.
2006-10-26 09:40:16 +00:00
Michael Natterer e3cb1cfeb8 factored out new function gimp_transform_region() that contains all the
2006-10-26  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-transform.c
	(gimp_drawable_transform_tiles_affine): factored out new function
	gimp_transform_region() that contains all the actual transform
	magic, doesn't use a GimpDrawable, and transforms into a passed
	PixelRegion. Will be used for perspective clone after some more
	changes.
2006-10-26 09:17:24 +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
Michael Natterer 7c8a68b142 fix indentation and spacing in the lanczos code. Removed trailing
2006-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-transform.c
	(gimp_drawable_transform_tiles_affine): fix indentation and
	spacing in the lanczos code. Removed trailing whitespace.
2006-10-25 20:00:22 +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
Michael Natterer e634d4d718 Added "Edit -> Fade" which allows to modify the paint mode and opacity of
2006-10-21  Michael Natterer  <mitch@gimp.org>

	Added "Edit -> Fade" which allows to modify the paint mode and
	opacity of the last drawable operation (fill, plugins etc.).
	Started from a patch by Bill Skaggs. Fixes bug #170707.

	* app/base/base-enums.[ch] (enum GimpLayerModeEffects): register
	the values REPLACE_MODE, ERASE_MODE and ANTI_ERASE_MODE with
	the type system.

	* app/widgets/gimppropwidgets.[ch]
	* app/widgets/gimpwidgets-constructors.[ch]: added "gboolean
	with_replace_modes" to the paint mode menu constructors.

	* app/tools/gimppaintoptions-gui.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimplayertreeview.c: pass with_replace_modes = FALSE.

	* app/core/gimpdrawableundo.[ch]: added members which keep tiles,
	paint mode and opacity of the pasted pixels.

	* app/core/gimpimage-undo.[ch] (gimp_image_undo_get_fadeable):
	returns a GimpUndo suitable for a fade operation, or NULL.

	* app/core/gimp-edit.[ch] (gimp_edit_fade): implements the actual
	fade by undoing the last operation and then re-applying the pixels
	with different paint mode and opacity.

	* app/core/gimpdrawable-combine.c: store the pasted pixels in
	the GimpDrawableUndo.

	* app/actions/edit-actions.c
	* app/actions/edit-commands.[ch]: action and callback for fade.

	* app/dialogs/Makefile.am
	* app/dialogs/fade-dialog.[ch]: the fade dialog.

	* app/widgets/gimphelp-ids.h: the fade help ID.

	* menus/image-menu.xml.in: added a menu entry in "Edit".
2006-10-21 18:46:49 +00:00
Michael Natterer 6fcb3e1d5b app/core/Makefile.am app/core/core-types.h new undo class for drawable
2006-10-20  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpdrawableundo.[ch]: new undo class for drawable undos.
	This was lurking on my disk too long...

	* app/core/gimpimage-undo-push.c (gimp_image_undo_push_drawable):
	use it instead of implementing it manually.
2006-10-20 08:56:58 +00:00
Michael Natterer 1ee6516d52 Applied modified patch from Martin Nordholts which adds a "Rounded
2006-10-18  Michael Natterer  <mitch@gimp.org>

	Applied modified patch from Martin Nordholts which adds a "Rounded
	Corners" option to the rectangle select tool. Fixes bug #86279.

	* app/core/gimpchannel-combine.[ch]: added
	gimp_channel_combine_ellipse_rect(). Use it from
	gimp_channel_combine_ellipse().

	* app/core/gimpchannel-select.[ch]: added
	gimp_channel_select_round_rect()

	* app/tools/gimprectangleselectoptions.[ch]: added properties
	"round-corners" and "corner-radius" and GUI for the new propeties.

	* app/tools/gimprectangleselecttool.h: added macro
	GIMP_RECT_SELECT_TOOL_GET_OPTIONS().

	* app/tools/gimprectangleselecttool.c (gimp_rect_select_tool_draw):
	draw round corners if enabled.

	(gimp_rect_select_tool_real_select): use
	gimp_channel_select_round_rect() if enabled.

	* app/tools/gimpselectionoptions.[ch]: added "antialias_toggle"
	to the GimpSelectionOptions struct so the rect select options
	can set its sensitivity.

	Unrelated:

	* app/tools/gimpellipseselecttool.c (gimp_ellipse_select_tool_draw):
	use 360 * 64 instead of 23040.
2006-10-18 18:54:28 +00:00
Sven Neumann 64e893e62f there's no need to make GTypeInfo and GInterfaceInfo structs static.
2006-10-18  Sven Neumann  <sven@gimp.org>

        * [lots of files]: there's no need to make GTypeInfo and
        GInterfaceInfo structs static.
2006-10-18 13:17:50 +00:00
Michael Natterer b72ffb8b49 removed the "floating" flag and the floating/sink API.
2006-10-16  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: removed the "floating" flag and the
	floating/sink API.

	(gimp_item_init): call g_object_force_floating() instead.

	* app/core/gimpimage.c
	* app/core/gimplayer.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/image.pdb: use combinations of
	g_object_ref_sink() and g_object_unref() instead of
	gimp_item_sink(). Use g_object_is_floating() instead of
	gimp_item_is_floating().

	* app/pdb/drawable_cmds.c
	* app/pdb/image_cmds.c: regenerated.
2006-10-16 17:09:17 +00:00
Michael Natterer 1e5f8625a4 don't include "libgimpbase/gimplimits.h"
2006-10-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpgrid.c: don't include "libgimpbase/gimplimits.h"

	* app/core/gimpimage-undo-push.c: one more g_message() converted
	to gimp_message().
2006-10-14 16:20:46 +00:00
Michael Natterer 1ed8dd4f53 app/actions/data-commands.c app/actions/documents-commands.c
2006-10-09  Michael Natterer  <mitch@gimp.org>

	* app/actions/data-commands.c
	* app/actions/documents-commands.c
	* app/actions/drawable-commands.c
	* app/actions/gradients-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-contexts.c
	* app/core/gimp-documents.c
	* app/core/gimp-edit.c
	* app/core/gimp-modules.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/core/gimpchannel.c
	* app/core/gimpdatafactory.[ch]
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimppdbprogress.c
	* app/core/gimpselection.c
	* app/dialogs/palette-import-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/gui/session.c
	* app/gui/themes.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugin-message.c
	* app/plug-in/gimpplugin.c
	* app/plug-in/gimppluginmanager-file.c
	* app/plug-in/gimppluginmanager.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/widgets/gimpcontrollers.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdevices.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimpuimanager.c
	* app/widgets/gimpvectorstreeview.c
	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/palette.pdb: convert lots of g_message() to
	gimp_message(). Make sure we never pass unknown strings (like
	error->message) to printf-like functions directly; run them
	thorugh "%s" instead. Don't translate some messages which should
	never happen.

	* app/pdb/brush_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/palette_cmds.c: regenerated.
2006-10-09 18:49:15 +00:00
Michael Natterer f5afb754a5 Added message severities and make sure all messages are routed through a
2006-10-09  Michael Natterer  <mitch@gimp.org>

	Added message severities and make sure all messages are routed
	through a central function, so redirecting to the error console or
	stderr work again:

	* app/core/core-enums.[ch]: added enum GimpMessageSeverity { INFO,
	WARNING, ERROR }.

	* app/core/gimp.[ch] (gimp_message)
	(gimp_message_valist): added severity parameter. Changed
	"GimpProgress *progress" parameter to "GObject *handler", where
	"handler" can be either a GimpProgress, a GtkWidget or NULL.

	* app/core/gimp-gui.[ch] (gimp_show_message): ditto. Honor
	--console-messages again. Always dispatch to the GUI message
	handler first if it exists.

	* app/gui/gui-message.[ch]: pass severity parameters around.

	(gui_message_error_dialog): if "handler" is a progress, dispatch
	the message to it first. If it is a widget (and *not* a progress),
	use a GtkMessageDialog on top of that widget's toplevel. Fall
	back to the usual GimpErrorDialog otherwise.

	* app/core/gimpprogress.[ch] (gimp_progress_message): added
	severity parameter. Also added boolean return value to the virtual
	function so it can decide to fail if it can't handle the message.

	* app/display/gimpdisplay.c: implement GimpProgress::message() and
	redirect the message to GimpDisplayShell.

	* app/display/gimpdisplayshell-progress.c: implement
	GimpProgress::message() and redirect the message to GimpStatusbar
	if it is not an error and if the status bar is visible.

	* app/display/gimpstatusbar.[ch]: implement GimpProgress::message(),
	but fail on messages that contain a newline. Show the right icons
	for the message severities (work in progress).

	* app/display/gimpdisplayshell.[ch]: removed
	gimp_display_shell_message() and its _valist() variant.

	* app/widgets/gimperrorconsole.[ch]: show the right icons for the
	message severities.

	* app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_message):
	return TRUE to swallow all messages.

	* app/widgets/gimpwidgets-utils.[ch]: removed
	gimp_show_message_dialog(). Added gimp_get_message_stock_id().

	* app/errors.c
	* app/actions/edit-commands.c
	* app/actions/error-console-commands.c
	* app/actions/file-commands.c
	* app/actions/select-commands.c
	* app/actions/text-editor-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimagefile.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/file-open-dialog.c
	* app/dialogs/file-open-location-dialog.c
	* app/dialogs/file-save-dialog.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/pdb/gimppdb.c
	* app/plug-in/gimpplugin.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimptool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpactionview.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimppdbdialog.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/message.pdb
	* tools/pdbgen/pdb/palette.pdb: added severity parameter to
	gimp_message() calls. Convert all calls to
	gimp_show_message_dialog() and gimp_display_shell_message() to
	gimp_message(). Also converted some more g_message() calls.

	* app/pdb/brush_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/message_cmds.c
	* app/pdb/palette_cmds.c: regenerated.
2006-10-09 08:17:22 +00:00
Michael Natterer 544d679e55 app/core/gimpbrushgenerated-load.c app/core/gimpgradient-load.c
2006-10-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrushgenerated-load.c
	* app/core/gimpgradient-load.c
	* app/core/gimppalette-load.c
	* app/core/gimppalette-save.c: read and write all files in binary
	mode. Improved parser error messages (added line numbers). Minor
	changes to simply read DOS files instead of barfing on them.
2006-10-04 17:50:35 +00:00
William Skaggs 0a17546354 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage-convert.c
	(median_cut_pass2_nodestruct_dither_rgb): adjust alpha-dithering
	and make code more readable; fixes bug #358851 as suggested
	by Tor Lillqvist.
2006-10-03 19:07:48 +00:00
Michael Natterer c6ae0a7918 added gimp_palette_load_detect_format().
2006-10-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppalette-load.[ch]: added
	gimp_palette_load_detect_format().

	* app/core/gimppalette-import.c: removed it here. Also removed all
	file I/O related includes.
2006-10-03 14:54:07 +00:00
Michael Natterer 92f21409b0 added functions to load ACT, RIFF and PSP palette files but don't use them
2006-10-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppalette-load.[ch]: added functions to load ACT,
	RIFF and PSP palette files but don't use them as data file
	loaders (yet?)

	* app/core/gimppalette-import.c (gimp_palette_import_from_file):
	use the functions instead of implementing all formats inline.
2006-10-03 14:31:31 +00:00
Michael Natterer 75eed97620 app/core/Makefile.am app/core/gimppalette-load.[ch] new files.
2006-10-03  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimppalette-load.[ch]
	* app/core/gimppalette-save.[ch]: new files.

	* app/core/gimppalette.[ch]: removed loading and saving code here.

	* app/core/gimp.c
	* app/core/gimppalette-import.c: changed accordingly.
2006-10-03 13:22:12 +00:00
Michael Natterer 843b55537e renamed gimp_gradient_save_as_pov() to gimp_gradient_save_pov().
2006-10-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpgradient-save.[ch]: renamed
	gimp_gradient_save_as_pov() to gimp_gradient_save_pov().

	* app/actions/gradients-commands.c
	(gradients_save_as_pov_ray_response): changed accordingly.
2006-10-03 12:38:36 +00:00
Michael Natterer c42e814794 app/core/Makefile.am app/core/gimpbrushgenerated-load.[ch]
2006-10-03  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpbrushgenerated-load.[ch]
	* app/core/gimpbrushgenerated-save.[ch]
	* app/core/gimpbrushpipe-load.[ch]: new files.

	* app/core/gimpbrushgenerated.[ch]
	* app/core/gimpbrushpipe.[ch]: removed loading and saving code here.

	* app/core/gimp.c: changed accordingly.
2006-10-03 12:29:07 +00:00
Michael Natterer d9cf806b61 app/core/Makefile.am new files.
2006-10-03  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimppattern-load.[ch]: new files.

	* app/core/gimppattern.[ch]: removed the loading stuff here.

	* app/core/gimp.c: changed accordingly.
2006-10-03 11:37:37 +00:00
Michael Natterer 3df625b7ff keep the file extension defines here, just as we do it for brushes.
2006-10-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpgradient-load.h: keep the file extension defines
	here, just as we do it for brushes.

	* app/core/gimpgradient.h: removed them here.

	* app/core/gimpgradient.c: changed accordingly.
2006-10-03 11:10:20 +00:00
Sven Neumann bd0ddb5b40 applied patch from David Gowers (bug #359175) and did some further
2006-10-03  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert.[ch]
	(gimp_image_convert_set_dither_matrix): applied patch from David
	Gowers (bug #359175) and did some further cleanup.
2006-10-03 09:29:30 +00:00