Commit Graph

2437 Commits

Author SHA1 Message Date
Michael Natterer acdae9b354 app/core/gimp-gui.[ch] app/gui/gui-vtable.c pass displays around as
2006-03-23  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c
	* app/plug-in/plug-in-progress.[ch]: pass displays around as
	GimpObject, not as integer IDs.

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

	* app/pdb/progress_cmds.c
	* libgimp/gimpprogress_pdb.c: regenerated.
2006-03-23 21:56:13 +00:00
Sven Neumann aab10d11d2 let the caller specify a region of interest. Call the progress function
2006-03-22  Sven Neumann  <sven@gimp.org>

	* app/base/siox.[ch] (siox_foreground_extract): let the caller
	specify a region of interest. Call the progress function more often.

	* app/core/gimpdrawable-foreground-extract.c
	(gimp_drawable_foreground_extract_siox): pass a region of interest
	to siox_foreground_extract() to speed up the SIOX tool.
2006-03-22 13:18:22 +00:00
Michael Natterer 2368a6a380 export GimpBrushGeneratedShape to the PDB.
2006-03-22  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.h: export GimpBrushGeneratedShape to the PDB.

	* tools/pdbgen/pdb/brush.pdb: use it instead of int32.

	* libgimp/gimp.def: add gimp_brush_generated_shape_get_type().

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/display.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/fonts.pdb
	* tools/pdbgen/pdb/gimprc.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/help.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/message.pdb
	* tools/pdbgen/pdb/misc.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/palette_select.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/text_tool.pdb: more perl/C code separation,
	removed some more utility functions, cleanup.

	* app/pdb/brush_cmds.c
	* app/pdb/brushes_cmds.c
	* app/pdb/display_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/fonts_cmds.c
	* app/pdb/gimprc_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/palettes_cmds.c
	* app/pdb/paths_cmds.c
	* app/pdb/patterns_cmds.c
	* tools/pdbgen/enums.pl
	* libgimp/gimpbrush_pdb.[ch]
	* libgimp/gimpenums.c.tail
	* libgimp/gimpenums.h: regenerated.
2006-03-22 09:58:08 +00:00
Michael Natterer cc4badb87b define GIMP_COORDS_DEFAULT_VALUES, a struct initializer for GimpCoords.
2006-03-19  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: define GIMP_COORDS_DEFAULT_VALUES, a
	struct initializer for GimpCoords.

	* app/core/gimpimage-snap.c
	* app/paint/gimppaintcore-stroke.c
	* app/vectors/gimpbezierstroke.c
	* app/vectors/gimpvectors-compat.c
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/vectors.pdb: use it here.

	* app/pdb/paint_tools_cmds.c
	* app/pdb/vectors_cmds.c: regenerated.
2006-03-19 13:39:10 +00:00
Michael Natterer 4d973a0805 added gimp_image_get_guide() and gimp_image_get_next_guide(), which take a
2006-03-13  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-guides.[ch]: added gimp_image_get_guide() and
	gimp_image_get_next_guide(), which take a guide_ID and return the
	image's GimpGuide with that ID (the one after that for next_guide())

	* tools/pdbgen/pdb/guides.pdb: use them instead of having this
	code here.

	* app/pdb/guides_cmds.c: regenerated.
2006-03-13 19:13:08 +00:00
Sven Neumann 68ea81c382 silently return TRUE if the layer is already at the top (or the bottom
2006-03-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.c (gimp_image_raise_layer_to_top,
	gimp_image_lower_layer_to_bottom): silently return TRUE if the
	layer is already at the top (or the bottom respectively).
2006-03-13 06:17:01 +00:00
David Odin 62f7298ba0 fixed merge down (previously broken by a not that purely cosmetic change).
* app/core/gimpimage-merge.c: fixed merge down (previously broken by a
  not that purely cosmetic change). Spotted by Amar Takhar.
2006-03-05 22:02:40 +00:00
Michael Natterer f420608145 made it a static function (was accidentially non-static).
2006-03-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.c (gimp_image_real_flush): made it a static
	function (was accidentially non-static).
2006-03-02 19:35:48 +00:00
Michael Natterer b55ce9ea2d added new methods ::get_bytes() and ::flush()
2006-03-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppickable.[ch]: added new methods ::get_bytes() and
	::flush()

	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/core/gimpimagemap.c
	* app/core/gimpprojection.c: implement ::get_bytes()

	* app/core/gimpprojection.c: implement ::flush() (immediately
	process both the idle renderer's queue and the unflushed update
	areas, to make sure that any reading from the projection will
	re-construct it).

	* app/core/gimp-edit.c
	* app/core/gimpchannel.c
	* app/core/gimpimage-contiguous-region.c
	* app/core/gimpimage-crop.c
	* app/core/gimppalette-import.c
	* app/paint/gimpclone.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpiscissorstool.c
	* tools/pdbgen/pdb/image.pdb: use the pickable interface more
	consistently when reading from any drawable or the projection, and
	call gimp_pickable_flush() before doing so. Fixes bug #332933.

	* app/core/gimpimage-pick-color.c: added comment why the we don't
	call gimp_pickable_flush() here.

	* app/pdb/image_cmds.c
	* libgimp/gimpimage_pdb.c: regenerated.
2006-03-02 19:30:59 +00:00
Sven Neumann 5e7ce540c1 app/core/gimpbrush.c app/core/gimpbuffer.c app/core/gimpimagefile.c
2006-02-28  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpimagefile.c
	* app/core/gimppattern.c
	* app/dialogs/preferences-dialog.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimprectselecttool.c
	* app/widgets/gimpimagepropview.c
	* app/widgets/gimpsizebox.c
	* app/widgets/gimptemplateeditor.c
	* plug-ins/imagemap/imap_statusbar.c: use U+00D7 MULTIPLICATION SIGN
	instead of x when displaying sizes.
2006-02-28 12:15:51 +00:00
Sven Neumann 4b7f6a0a02 purely cosmetic change.
2006-02-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-merge.c: purely cosmetic change.
2006-02-27 14:48:11 +00:00
Sven Neumann 8612528df5 fixed bug introduced by optimization (bug #332324).
2006-02-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert.c (remap_indexed_layer): fixed bug
	introduced by optimization (bug #332324).
2006-02-25 12:58:50 +00:00
Sven Neumann 867d67fc30 only count pixels with an alpha value > 127.
2006-02-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert.c (generate_histogram_gray): only
	count pixels with an alpha value > 127.
2006-02-25 12:47:56 +00:00
Michael Natterer 4d5abb4323 app/plug-in/Makefile.am new files which keep the plug-in data list.
2006-02-21  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-data.[ch]: new files which keep the
	plug-in data list.

	* app/pdb/procedural_db.[ch]: removed here, it only cluttered the
	file with unrelated functionality.

	* app/core/gimp.[ch]
	* app/actions/plug-in-commands.c
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.

	* app/pdb/procedural_db_cmds.c: regenerated.
2006-02-21 11:05:43 +00:00
Sven Neumann d833630ad8 app/config/gimpcoreconfig.[ch] app/config/gimprc-blurbs.h keep a history
2006-02-20  Sven Neumann  <sven@gimp.org>

	* app/config/gimpcoreconfig.[ch]
	* app/config/gimprc-blurbs.h
	* app/core/gimp.[ch]: keep a history of recently used plug-ins.

	* app/plug-in/plug-in-run.[ch] (plug_in_repeat): pass an index
	into the plug-in history.

	* app/actions/plug-in-actions.c
	* app/actions/plug-in-commands.c
	* app/menus/plug-in-menus.c
	* menus/image-menu.xml.in: added a submenu with recently used
	plug-ins to the Filters menu. Fixes bug #148855.
2006-02-20 16:38:09 +00:00
2 3d9837eb59 remove extra semicolon; fix for bug #330882 from Jens Granseuer.
2006-02-12  <weskaggs@primate.ucdavis.edu>

	* app/core/gimplayer.c: remove extra semicolon; fix for
	bug #330882 from Jens Granseuer.
2006-02-12 16:07:39 +00:00
Sven Neumann cf4de2eef1 fixed includes 2006-02-07 12:47:50 +00:00
Sven Neumann 1e019a57ff app/core/gimp-gui.c use GIMP_ACRONYM.
2006-02-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-gui.c
	* app/widgets/gimptoolbox.c: use GIMP_ACRONYM.
2006-02-07 11:07:47 +00:00
Michael Schumacher 51c9cdd381 applying a patch by Joao S. O. Bueno Calligaris which implements
2006-01-31  Michael Schumacher  <schumaml@cvs.gnome.org>

	* app/core/gimpbrushpipe.c: applying a patch by Joao S. O. Bueno
	Calligaris which implements PIPE_SELECT_VELOCITY for brush
	pipes. Fixes bug #150227.
2006-01-31 20:20:51 +00:00
Michael Natterer e1ceed5147 define GIMP_PARAM_STATIC_STRINGS which is G_PARAM_STATIC_NAME|NICK|BLURB.
2006-01-18  Michael Natterer  <mitch@gimp.org>

	* app/config/config-types.c: define GIMP_PARAM_STATIC_STRINGS
	which is G_PARAM_STATIC_NAME|NICK|BLURB. Also define
	GIMP_PARAM_READABLE, _WRITABLE and _READWRITE which include
	GIMP_PARAM_STATIC_STRINGS.

	* app/*/*.c: use them for all object properties so their
	strings are not copied.
2006-01-18 20:29:40 +00:00
Raphael Quinet 7d8998a99c automatically removed trailing whitespace from 3460 lines.
2006-01-17  Raphael Quinet  <raphael@gimp.org>

	* (about 130 *.[ch] files): automatically removed trailing
	whitespace from 3460 lines.
2006-01-17 12:43:50 +00:00
Michael Natterer 5d8b25a27d variant of gimp_config_connect() which allows the connected objects to
2006-01-14  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-utils.[ch] (gimp_config_connect_full):
	variant of gimp_config_connect() which allows the connected
	objects to have different propertynames.

	* app/widgets/widgets-enums.[ch]: removed enum GimpViewType...

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

	* app/widgets/gimpviewablebutton.[ch] (gimp_viewable_button_new):
	added "button_preview_size" parameter so the button and popup
	preview sizes can be specified separately.

	* app/widgets/gimptemplateeditor.c: changed accordingly.

	* app/widgets/gimpviewablebox.[ch] (gimp_prop_*_box_new):
	new functions which take additional "view_type_prop" and
	"view_size_prop" parameters and sync the passed context's
	properties with the resp. properties of the viewable button.

	* app/paint/gimppaintoptions.[ch]
	* app/tools/gimpbucketfilloptions.c
	* app/tools/gimpclonetool.c
	* app/tools/gimppaintoptions-gui.c
	* app/tools/gimptextoptions.[ch]: added view-type and view-size
	properties to the options objects and use the new viewable box
	constructors so the selected view types and sizes are persistant
	across sessions. Fixes bug #315443.
2006-01-14 00:09:22 +00:00
jaycox b8752cd251 Fixed my email address in a dozen or so source files:
Fixed my email address in a dozen or so source files:
  modules/cdisplay_highcontrast.c
  libgimpbase/gimpparasite.c
  libgimpbase/gimpparasite.h
  libgimpmath/gimpmatrix.h
  libgimpmath/gimpmatrix.c
  app/core/gimpparasitelist.h
  app/core/gimpparasitelist.c
  app/base/gimphistogram.c
  app/base/gimphistogram.h
  app/base/gimplut.c
  app/base/gimplut.h
  app/base/pixel-processor.c
  app/base/pixel-processor.h
  app/core/gimp-parasites.c
  app/core/gimp-parasites.h
  app/core/gimpdrawable-histogram.c
  app/core/gimpdrawable-histogram.h
  app/core/gimpparasitelist.c
  app/core/gimpparasitelist.h
2006-01-12 00:50:44 +00:00
Sven Neumann 6f1f9c1d46 app/core/gimpimage-convert-data.h applied patch by Adam D. Moss that
2006-01-02  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert-data.h
	* app/core/gimpimage-convert.c: applied patch by Adam D. Moss that
	replaces the default dither matrix by a 32x32 Bayer pattern (see
	bug #136604).
2006-01-02 14:53:34 +00:00
Michael Natterer ef9b04c535 Fixed incomplete core/ui separation of paint tools and paint methods:
2005-12-27  Michael Natterer  <mitch@gimp.org>

	Fixed incomplete core/ui separation of paint tools and paint
	methods:

	* app/core/core-enums.h
	* app/core/gimpcontext.[ch]: added a "paint-info" property and API
	so the current paint method can be selected without the need for
	an active tool.

	(gimp_context_real_set_tool): set the paint-info to
	tool_info->paint_info so the paint method follows the active tool
	just as the active image follows the active display.

	* app/core/gimp.h (struct Gimp)
	* app/core/gimppaintinfo.[ch]: added "standard_paint_info" API
	and stuff to be consistent with other context object properties.

	* app/paint/gimp-paint.c: set the paintbrush as
	standard_paint_info.

	* app/core/gimpstrokedesc.c (gimp_stroke_desc_new): removed the
	hack of falling back to the paintbrush when there is no active
	tool and use the active paint method instead. Fall back to the
	standard paint method if there is no active one.
	(nothing in the core uses the active tool any more now).

	* app/widgets/gimpdeviceinfo.h: add the paint info to the
	properties which are saved in devicerc.

	Added identifiers (names) and stock-ids to GimpPaintInfo:

	* app/core/gimppaintinfo.[ch] (gimp_paint_info_new): added
	identifier and stock-id parameters.

	* app/core/gimptoolinfo.c (gimp_tool_info_new): removed the hack
	of setting the paint-info stock-id from the tool-info stock-id.

	* app/paint/paint-types.h
	* app/paint/gimp-paint.c: changed GimpPaintRegisterCallback
	accordingly.

	* app/tools/gimp-tools.c (gimp_tools_register): changed paint
	info names accordingly.

	* app/paint/*.c (gimp_*_register): pass identifier and stock-id
	accordingly.
2005-12-27 18:57:01 +00:00
Michael Natterer 54c86f97f7 app/core/gimpchannel.c app/core/gimpdrawable.c app/core/gimplayer.c
2005-12-23  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpvectors.c: moved variables to local scopes in
	implementations of GimpItem::duplicate()
2005-12-23 01:15:19 +00:00
Michael Natterer cf49cb3c5c fall back to the paintbrush if we can't get the paint method from the
2005-12-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpstrokedesc.c (gimp_stroke_desc_new): fall back to
	the paintbrush if we can't get the paint method from the active
	tool (because there is no active tool). Fixes bug #323778.
2005-12-11 15:31:11 +00:00
Michael Natterer 0d4a10fee4 app/config/*.c app/core/*.c app/display/*.c app/text/*.c port to
2005-12-10  Michael Natterer  <mitch@gimp.org>

	* app/config/*.c
	* app/core/*.c
	* app/display/*.c
	* app/text/*.c
	* app/vectors/*.c: port to G_DEFINE_TYPE() and friends. Some related
	core reordering and cleanup.
2005-12-10 19:24:36 +00:00
Michael Natterer 218c03c796 gimp_layer_transform_color() wants the destination image passed, not the
2005-11-16  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c (gimp_layer_convert):
	gimp_layer_transform_color() wants the destination image passed,
	not the source image.
2005-11-16 17:59:50 +00:00
Sven Neumann 1b9f28f0e2 do not return a value from a void function. Fixes bug #321333.
2005-11-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdatafactory.c (gimp_data_factory_data_free): do not
	return a value from a void function. Fixes bug #321333.
2005-11-13 17:10:22 +00:00
Michael Natterer 5f90c4cddb app/core/gimp-modules.c more output on --verbose
2005-11-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-modules.c
	* app/menus/menus.c: more output on --verbose
2005-11-07 09:39:06 +00:00
Michael Natterer aa80506d6d app/core/gimp-contexts.c app/core/gimp-documents.c
2005-11-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-contexts.c
	* app/core/gimp-documents.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/core/gimpdatafactory.c
	* app/core/gimptooloptions.c
	* app/gui/color-history.[ch]
	* app/gui/gui.c
	* app/gui/session.c
	* app/plug-in/plug-ins.c
	* app/text/gimp-fonts.c
	* app/tools/gimp-tools.c
	* app/widgets/gimpcontrollers.c
	* app/widgets/gimpdevices.c: when running --verbose, print the
	name of each config file parsed or written.
2005-11-06 22:01:25 +00:00
Sven Neumann 5997c7dd97 removed calls to the splash update function during initialization of
2005-11-05  Sven Neumann  <sven@gimp.org>

        * tools/pdbgen/app.pl: removed calls to the splash update function
        during initialization of internal procedures. This only takes time
        and doesn't provide useful information.

        * app/pdb/internal_procs.[ch]: regenerated.

        * app/pdb/procedural_db.[ch]: changed accordingly.

        * core/gimp.c: call the splash update function from here.
2005-11-05 13:00:04 +00:00
Sven Neumann 20a653a542 added some commented-out debug output that can be used to get an idea of
2005-11-05  Sven Neumann  <sven@gimp.org>

	* app/gui/splash.c: added some commented-out debug output that can
	be used to get an idea of where the startup time is being spent.

	* app/core/gimp.c
	* app/pdb/internal_procs.c
	* app/pdb/procedural_db.c
	* app/plug-in/plug-ins.c
	* tools/pdbgen/app.pl: cosmetic changes.
2005-11-05 12:18:56 +00:00
Manish Singh 919a0e9f5b remove now unused "expanded" variable.
2005-11-04  Manish Singh  <yosh@gimp.org>

        * app/core/gimpenvirontable.c (gimp_environ_table_load_env_file):
        remove now unused "expanded" variable.
2005-11-04 23:59:56 +00:00
Sven Neumann a241bbc2b9 gimp_config_path_expand() only ever returns NULL if called with a NULL
2005-11-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimpenvirontable.c (gimp_environ_table_load_env_file):
	gimp_config_path_expand() only ever returns NULL if called with a
	NULL path argument.
2005-11-04 15:51:15 +00:00
Michael Natterer c9c4e92647 app/actions/data-commands.c #include "gimp.h" instead of "gimp-gui.h"
2005-11-02  Michael Natterer  <mitch@gimp.org>

	* app/actions/data-commands.c
	* app/core/gimpprogress.c: #include "gimp.h" instead of "gimp-gui.h"
2005-11-02 19:39:54 +00:00
Sven Neumann bdf1580d6c app/core/gimpimagefile.c app/widgets/gimpimagepropview.c
2005-11-02  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c
	* app/widgets/gimpimagepropview.c
	* app/widgets/gimpsizebox.c
	* app/widgets/gimptemplateeditor.c: use ngettext() for plural forms.
2005-11-02 16:07:07 +00:00
Sven Neumann 81de4303e8 rephrased error message for consistency and to avoid another plural form.
2005-11-02  Sven Neumann  <sven@gimp.org>

	* app/core/gimppattern.c: rephrased error message for consistency
	and to avoid another plural form.
2005-11-02 15:10:41 +00:00
Sven Neumann 275c9b4d3e fixed compiler warning.
2005-11-01  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrushgenerated.c: fixed compiler warning.

	* app/core/gimpobject.c: turned "name" into a construct property.
2005-11-01 14:41:41 +00:00
Sven Neumann a6bb2b5751 use gimp_brush_generated_new() to create the brush object. Removed
2005-11-01  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrushgenerated.c (gimp_brush_generated_load): use
	gimp_brush_generated_new() to create the brush object. Removed
	redundant calls to gimp_data_dirty().

	* app/core/gimpdata.c: freeze the data object during construction.
2005-11-01 13:04:09 +00:00
Michael Natterer 1f71121b90 Applied modified patch from Luis de Bethencourt Guimera which adds a "Save
2005-10-31  Michael Natterer  <mitch@gimp.org>

	Applied modified patch from Luis de Bethencourt Guimera which adds
	a "Save document history" prefs option. Fixes bug #140001.

	* app/config/gimprc-blurbs.h
	* app/config/gimpcoreconfig.[ch]: added boolean property
	"save-document-hitory".

	* app/core/gimp.c
	* app/file/file-open.c
	* app/file/file-save.c: don't save the document history and don't
	add files to the desktop-wide list of recently used files if the
	option is FALSE.

	* app/dialogs/preferences-dialog.c: added its toggle to the
	"Environment" page.
2005-10-31 20:57:03 +00:00
Sven Neumann c00173ccd0 app/core/gimpdata.[ch] applied a heavily modified version of the patch
2005-10-31  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdata.[ch]
	* app/core/gimpdatafactory.c: applied a heavily modified version
	of the patch provided by Shlomi Fish in bug #311740. Introduces a
	cache to speed up reloading of data files.

	* app/actions/data-commands.c: set gimp busy while refreshing data
	factories.

	* app/widgets/gimpwidgets-utils.c (gimp_widget_accel_changed):
	free the return value of gimp_get_accel_string().
2005-10-31 11:29:01 +00:00
Michael Natterer c218c4be0c the color samples are always RGB or RGBA, so always compare 3 or 4 bytes
2005-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-contiguous-region.c
	(struct ContinuousRegionData)
	(gimp_image_contiguous_region_by_color)
	(contiguous_region_by_color): the color samples are always RGB or
	RGBA, so always compare 3 or 4 bytes of pixel data, and not just
	the number of bytes of the drawable/projection. Fixes "select by
	color" on GRAYA (bug #319683).
2005-10-25 16:18:41 +00:00
Manish Singh aac08c4b4f delete stray ;
2005-10-17  Manish Singh  <yosh@gimp.org>

        * app/core/gimppalette-import.c
        (gimp_palette_import_create_image_palette): delete stray ;
2005-10-17 23:31:23 +00:00
Sven Neumann 40dbda9e9c app/base/base-enums.h app/base/siox.[ch]
2005-10-17  Sven Neumann  <sven@gimp.org>

	* app/base/base-enums.h
	* app/base/siox.[ch]
	* app/core/gimpdrawable-foreground-extract.[ch]
	* app/tools/gimpforegroundselecttool.[ch]: export stateful SIOX to
	the core API and use it from the foreground selection tool.
2005-10-17 18:23:31 +00:00
Sven Neumann 18a138fea7 app/core/gimpdrawable-foreground-extract.[ch]
2005-10-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-foreground-extract.[ch]
	* app/tools/gimpforegroundselectoptions.[ch]
	* app/tools/gimpforegroundselecttool.c: added "multiblob"
	property to GimpForegroundSelectOptions and pass it to
	gimp_drawable_foreground_extract_siox().
2005-10-17 15:30:10 +00:00
Sven Neumann e98cd43eab app/base/base-types.h applied patch from Gerald Friedland that introduces
2005-10-12  Sven Neumann  <sven@gimp.org>

	* app/base/base-types.h
	* app/base/siox.[ch]: applied patch from Gerald Friedland that
	introduces a state to the SIOX operation.

	* app/core/gimpdrawable-foreground-extract.c: adapted to the new API.
2005-10-12 00:24:26 +00:00
Michael Natterer 34697840ed set the "tooltip" return value to NULL before calling the virtual
2005-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.c (gimp_viewable_get_description): set the
	"tooltip" return value to NULL before calling the virtual function.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpchannel.c
	* app/core/gimplayer.c
	* app/core/gimppaintinfo.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimptoolinfo.c (get_description): don't do it here.

	* app/core/gimpbuffer.c
	* app/core/gimppaintinfo.c: untabbify, cleanup.

	* app/core/gimpobject.c: emit "notify::name" whenerver the name
	changes, clenup.
2005-10-09 23:05:25 +00:00
Sven Neumann b246825303 added new function gimp_palette_import_from_drawable(), respecting the
2005-10-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-import.[ch]: added new function
	gimp_palette_import_from_drawable(), respecting the selection as
	suggested in bug #316212.
2005-10-07 14:46:37 +00:00
Simon Budig 5a43a464d2 use ABS instead of fabs.
2005-10-02  Simon Budig  <simon@gimp.org>

	* app/core/gimpcoords.c: use ABS instead of fabs.

	* app/core/gimpimage-snap.c: Use proper default values for the
	coordinates.

	* app/vectors/gimpbezierstroke.c: Fix a bug plus add some debug
	output. For some reason does not snap yet.
2005-10-01 23:19:42 +00:00
Sven Neumann ee64ca3c90 introduced variants of file_utils_uri_to_utf8_filename() and
2005-10-02  Sven Neumann  <sven@gimp.org>

	* app/file/file-utils.[ch]: introduced variants of
	file_utils_uri_to_utf8_filename() and
	file_utils_uri_to_utf8_basename() that use g_filename_display_name()
	and g_filename_display_basename().

	* app/actions/data-commands.c
	* app/actions/documents-commands.c
	* app/actions/file-actions.c
	* app/actions/file-commands.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.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/display/gimpdisplayshell-close.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-title.c
	* app/file/file-open.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpthumbbox.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimpviewabledialog.c: use the new functions.

	* plug-ins/help/domain.c: use g_filename_display_name().
2005-10-01 22:43:22 +00:00
Simon Budig 3c2e94a2fb Added small utility function for the manhattan metric.
2005-10-01  Simon Budig  <simon@gimp.org>

	* app/core/gimpcoords.[ch]: Added small utility function for the
	manhattan metric.

	* app/vectors/gimpstroke.[ch]: virtualized stubs provided by mitch

	* app/vectors/gimpbezierstroke.c: Reworked some internal functions
	to make it easier to access the parameters for the coordinates of an
	stroke interpolation. Simplified the straight line test. Added an
	implementation of the _nearest_tangent_get () function that does
	not yet seem to work properly. Not sure where the problem is.
2005-10-01 00:49:44 +00:00
Michael Natterer e7e2296fe5 app/actions/image-commands.c app/actions/layers-commands.c
2005-09-30  Michael Natterer  <mitch@gimp.org>

	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/view-actions.c
	* app/core/gimpdrawable-foreground-extract.c
	* app/core/gimpimagefile.c
	* app/core/gimpprogress.c
	* app/dialogs/convert-dialog.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c
	* app/tools/gimptransformtool.c
	* app/widgets/gimpthumbbox.c
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: removed '...' from
	progress messages. Removed spaces between the text and the '...'
	in some other places.

	* app/pdb/drawable_transform_cmds.c
	* app/pdb/edit_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
2005-09-30 17:50:50 +00:00
Michael Natterer 8db6b9cfa0 added stubs of two new snapping functions.
2005-09-30  Michael Natterer  <mitch@gimp.org>

	* app/vectors/gimpstroke.[ch]: added stubs of two new snapping
	functions.

	* app/core/gimpimage-snap.c: removed their #defines here.
2005-09-30 17:07:49 +00:00
Sven Neumann f6b370952c app/core/core-enums.[ch] moved GimpGridStyle enum to libgimpbase.
2005-09-30  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.[ch]
	* libgimpbase/gimpbaseenums.[ch]: moved GimpGridStyle enum to
	libgimpbase.

	* app/core/gimpimage-grid.h: indentation.

	* app/pdb/Makefile.am
	* libgimp/Makefile.am
	* tools/pdbgen/Makefile.am
	* tools/pdbgen/pdb/grid.pdb: applied slightly modified patch by
	Sylvain FORET that adds a PDB API for the image grid.

	* app/pdb/grid_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimp_pdb.h
	* libgimp/gimpenums.c.tail
	* libgimp/gimpgrid_pdb.[ch]
	* tools/pdbgen/enums.pl
	* tools/pdbgen/groups.pl: (re)generated.

	* libgimp/gimp.def
	* libgimpbase/gimpbase.def: updated.
2005-09-30 16:35:04 +00:00
Sven Neumann 489aebab5e app/core/gimp-gui.h app/core/gimp-utils.h app/core/gimpimage-undo.h
2005-09-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-gui.h
	* app/core/gimp-utils.h
	* app/core/gimpimage-undo.h
	* app/text/gimptextlayer.h
	* app/widgets/gimpeditor.h
	* app/widgets/gimpmenufactory.h
	* app/widgets/gimpmessagedialog.h
	* app/widgets/gimpsessioninfo.h
	* app/widgets/gimptooldialog.h
	* app/widgets/gimpviewabledialog.h: use G_GNUC_NULL_TERMINATED
	where appropriate.
2005-09-27 17:31:32 +00:00
Michael Natterer 30f1e8efc1 added gimp_buffer_get_bytes() and gimp_buffer_get_image_type().
2005-09-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbuffer.[ch]: added gimp_buffer_get_bytes()
	and gimp_buffer_get_image_type().

	* tools/pdbgen/pdb/edit.pdb: removed edit_named_rename() and
	edit_named_delete().

	* tools/pdbgen/Makefile.am
	* tools/pdbgen/groups.pl
	* tools/pdbgen/pdb/buffer.pdb: new PDB group featuring
	buffer_rename(), delete(), get_width(), get_height(), get_bytes(),
	get_image_type().

	* app/pdb/Makefile.am
	* libgimp/Makefile.am
	* libgimp/gimp.def: changed accordingly.

	* app/pdb/buffer_cmds.c
	* app/pdb/edit_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimp_pdb.h
	* libgimp/gimpbuffer_pdb.[ch]
	* libgimp/gimpedit_pdb.[ch]: (re)generated.
2005-09-27 09:05:55 +00:00
Sven Neumann 4839271341 app/core/gimpdata.c app/file/file-save.c use g_access() from gstdio.h.
2005-09-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdata.c
	* app/file/file-save.c
	* app/file/file-open.c: use g_access() from gstdio.h.

	* app/config/gimpconfig-file.c (gimp_config_file_copy)
	* libgimpthumb/gimpthumbnail.c: use g_chmod() from gstdio.h.

	* app/file/gimprecentlist.c
	* libgimpconfig/gimpconfigwriter.c: use g_creat() from gstdio.h.
2005-09-25 23:22:05 +00:00
Hans Breuer 0b515bec9b updated
2005-09-24  Hans Breuer  <hans@breuer.org>

	* **makefile.msc : updated

	* app/dialogs/user-install-dialog.c : only add the migrate page if
	there is something to migrate from. Avoids on version being NULL.

	* app/dialogs/file-save-dialog.c : the g_print() output was crashing
	on the assumption that ->menu_label != NULL. It is for colorhtml.py.

	* app/widgets/gimpselectiondata.c : use HAVE_UNISTD_H and move
	* process.h definition by G_OS_WIN32 below it being defined
	* app/widgets/gimpwidgets-utils.c(gimp_window_get_native) : cast
	return value to (GdkNativeWindow) it is not necessary an int.

	* libgimpwidgets/gimpwidgets.def : added gimp_zoom_type_get_type

	* plug-ins/help/gimp-help-lookup.c : dynamic lookup of help_root
	instead of hard-coding DATADIR/GIMP_HELP_PREFIX

	* plug-ins/xjt/xjt.c : there is no pid_t with msvc, typedef one.
2005-09-25 19:30:55 +00:00
Sven Neumann 1bd990582d use ngettext for plural forms.
2005-09-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c: use ngettext for plural forms.
2005-09-20 23:15:57 +00:00
Sven Neumann 71e384aadf use ngettext for plural forms.
2005-09-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c: use ngettext for plural forms.
2005-09-20 23:09:51 +00:00
Sven Neumann 3a4c55779f added read-only properties for id, width and height.
2005-09-20  Sven Neumann  <sven@gimp.org>

	* app/core/gimpitem.c: added read-only properties for id, width
	and height.
2005-09-20 10:30:01 +00:00
Michael Natterer 1adf3d71af Did a global s/qmask/quick-mask/:
2005-09-19  Michael Natterer  <mitch@gimp.org>

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

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

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

	* app/actions/Makefile.am
	* app/actions/actions.c
	* app/core/Makefile.am
	* app/core/core-enums.[ch]
	* app/core/gimpchannel.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-undo.c
	* app/core/gimpimage.[ch]
	* app/core/gimpundo.[ch]
	* app/display/gimpdisplayshell-appearance.c
	* app/display/gimpdisplayshell-callbacks.[ch]
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell.[ch]
	* app/menus/menus.c
	* app/widgets/gimphelp-ids.h
	* libgimpwidgets/gimpstock.[ch]
	* menus/Makefile.am
	* menus/image-menu.xml.in
	* themes/Default/images/Makefile.am: changed accordingly.
2005-09-19 12:44:06 +00:00
Sven Neumann 7f95ed5360 use GTK_STOCK_DIRECTORY for GIMP_THUMB_STATE_FOLDER.
2005-09-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c (gimp_imagefile_get_new_pixbuf): use
	GTK_STOCK_DIRECTORY for GIMP_THUMB_STATE_FOLDER.
2005-09-19 12:24:29 +00:00
Sven Neumann aa5665a9bd ignore transparent pixels as suggested in bug #316212.
2005-09-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-import.c (gimp_palette_import_from_image):
	ignore transparent pixels as suggested in bug #316212.
2005-09-13 16:00:54 +00:00
Michael Natterer 889fbad0fa replaced lots of bogus strings by properly translatable ones. Many of them
2005-09-11  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.h (enum GimpUndoType): replaced lots of
	bogus strings by properly translatable ones. Many of them are
	fallbacks anyway, but they should be presentable to the user.
	Fixes bug #315964.
2005-09-11 19:26:59 +00:00
Michael Natterer b10adabb5e Added parent window API to the GimpProgress interface and to the libgimp
2005-09-09  Michael Natterer  <mitch@gimp.org>

	Added parent window API to the GimpProgress interface and to
	the libgimp progress stuff. Might look strange, but does
	the right thing in almost all cases (image window, file dialog,
	script-fu dialog etc). Fixes bug #62988.

	* app/core/gimpprogress.[ch]: added GimpProgress::get_window()
	which should return a toplevel window ID if the progress is in a
	window that wants to be the transient parent of plug-in dialogs.

	* app/widgets/gimpwidgets-utils.[ch] (gimp_window_get_native): new
	function which returns the window handle of a GtkWindow's GdkWindow.

	* app/widgets/gimpfiledialog.c: implement ::get_window().

	* app/display/gimpdisplay.[ch]: ditto. Removed window handle API.

	* app/gui/gui-vtable.c: changed accordingly.

	* libgimpbase/gimpbaseenums.[ch] (enum GimpProgressCommand):
	added GIMP_PROGRESS_COMMAND_GET_WINDOW.

	* app/plug-in/plug-in-progress.[ch] (plug_in_progress_get_window):
	new function. Also renamed some functions to match the
	GimpProgress interface, and not the legacy PDB procedure names.

	* tools/pdbgen/pdb/progress.pdb
	* app/core/gimppdbprogress.c: implement get_window() on both
	sides of the wire, keeping backward compatibility (hopefully).

	* libgimp/gimpprogress.[ch]: deprecated gimp_progress_install()
	and added gimp_progress_install_vtable() which takes a vtable with
	padding to be extensible. Added get_window() vtable entry and
	dispatch it accordingly. Also added pulse() which was implemented
	in a hackish way before. Everything is of course backward
	compatible.

	* libgimp/gimpprogressbar.c: inmplement the get_window() stuff
	so a plug-in dialog containing a progress can be the transient
	parent of another dialog in another plug-in.

	* libgimp/gimpui.[ch] (gimp_ui_get_progress_window): new function
	which returns a foreign GdkWindow of this plug-ins progress
	window.

	Renamed gimp_window_set_transient_for_default_display() to
	gimp_window_set_transient() and make it use the progress' window
	handle instead of the display's (which is the right thing to do in
	almost all cases).

	* libgimp/gimp.def
	* libgimp/gimpui.def: add the new functions.

	* tools/pdbgen/enums.pl
	* app/pdb/internal_procs.c
	* app/pdb/progress_cmds.c
	* libgimp/gimpprogress_pdb.[ch]: regenerated.

	* libgimp/gimpexport.c
	* plug-ins/*/*.c: follow API change.
2005-09-09 18:07:31 +00:00
Michael Natterer 805602b657 if the floating selection has no alpha, manually create BoundSegs of its
2005-09-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer-floating-sel.c (floating_sel_boundary): if
	the floating selection has no alpha, manually create BoundSegs of
	its outline instead of calling boundary_find() (which creates a
	boundary of the last channel). Fixes bug #145373.

	* app/widgets/gimplayertreeview.c
	(gimp_layer_tree_view_floating_selection_changed): update all
	layer names' text attributes, not only for layers with alpha.
	Fixes layer name display when making a new layer out of a floating
	selection without alpha.
2005-09-08 19:38:58 +00:00
Michael Natterer 7eb96e17da use gimp_rectangle_intersect() instead of just looking at the passed in
2005-09-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel-combine.c (gimp_channel_combine_ellipse):
	use gimp_rectangle_intersect() instead of just looking at the
	passed in w,h to figure whether nothing needs to be done. While
	the algorithm does nicely with an entirely out-of-image ellipse,
	the channel's bounds were set to a rectangle of zero width or
	height, which caused subsequent calls to gimp_channel_bounds() to
	return broken bounds. Fixes bug #315417.

	(gimp_channel_combine_rect)
	(gimp_channel_combine_mask): use gimp_rectangle_intersect() here
	too instead of the usual unclear CLAMPing on x1,y1,x2,y2.
2005-09-07 10:08:02 +00:00
Sven Neumann ec56ef9d01 Address bug #307971:
2005-09-05  Sven Neumann  <sven@gimp.org>

	Address bug #307971:

	* app/core/gimp-gui.[ch]
	* app/display/gimpdisplay.[ch]
	* app/gui/gui-vtable.c
	* tools/pdbgen/pdb/display.pdb: added PDB function to obtain a
	window handle on an image display.

	* app/pdb/display_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimpdisplay_pdb.[ch]: regenerated.

	* libgimp/gimpui.[ch]: added functions to set a GtkWindow transient
	to an image display.

	* plug-ins/common/gauss.c: use the new function exemplarily.

	* libgimp/gimp.def
	* libgimp/gimpui.def: updated.
2005-09-05 20:47:12 +00:00
Michael Natterer dd1d749870 don't let named cut/copy affect the global buffer. Fixes bug #315225. Also
2005-09-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-edit.c: don't let named cut/copy affect the global
	buffer. Fixes bug #315225. Also make "Global Buffer" translatable.
2005-09-05 18:21:51 +00:00
Sven Neumann 4f8e69cf5d app/core/gimp.[ch] removed the confusing and redundant feature of having
2005-09-05  Sven Neumann  <sven@gimp.org>

        * app/core/gimp.[ch]
        * app/core/gimpimage-new.c: removed the confusing and redundant
        feature of having the New Image dialog default to the size of the
        global buffer. Please use Paste as New instead. Fixes bug #315106.
2005-09-05 10:52:48 +00:00
Michael Natterer 37354a9248 Cleaned up and fixed the order in which default tool options and user
2005-09-04  Michael Natterer  <mitch@gimp.org>

	Cleaned up and fixed the order in which default tool options and
	user context values are initialized, and added loading / saving of
	the global user context.  Fixes bug #165078.

	* app/core/Makefile.am
	* app/core/gimp-contexts.[ch]: new files which manage the global
	contexts. Contains gimp_contexts_init/exit/load/save/clear().

	* app/core/gimp.c: use the new init/exit functions instead of
	implementing the stuff here.

	* app/tools/gimp-tools.c: load/save/clear the user context from
	here so it follows the same logic as the tool options. Reset all
	tool options before loading the user context and copy the user
	context's property to all tool options before loading tool
	options.

	* app/core/gimptoolinfo.c (gimp_tool_info_new): don't initialize
	the tool options with the users context's properties. It's way too
	early here and they will be overwritten later.

	* app/widgets/gimpdevices.c (gimp_devices_restore): initialize all
	device contexts with the user context's properties before loading
	the devices and copying the active one back to the user context.
2005-09-04 10:44:04 +00:00
Michael Natterer 09454fb2a4 some general cleanup.
2005-09-03  Michael Natterer  <mitch@gimp.org>

	* app/base/pixel-region.[ch]: some general cleanup.

	(pixel_region_init_temp_buf)
	(pixel_region_init_data): new functions which initialize pixel
	regions on TempBufs and on raw contiguous arrays of pixel data.

	(pixel_region_configure): fixed a bug that has probably been there
	forever: when processing contiguous (non-tiled) data, interpret
	the original x and y coordinates of the region as offsets into
	the data. Before this fix, the initial x and y were simply ignored
	(by using them in a broken way), thus always forcing the upper
	left corner of the region being the beginning of the passed data.

	Lots of code was working around this problem by setting the
	pixel_region's data pointer to the proper starting pixel of the
	region in the middle the buffer.

	* libgimp/gimppixelrgn.c: some general cleanup.

	(gimp_pixel_rgn_configure): same fix as above. Fortunately, nobody
	seems to know that libgimp pixel regions can be used on arrays of
	data, just as core ones. Only two plug-ins were using this
	feature, and they are antique and written by spencer and federico,
	respectively. They both don't use offsets into the buffers and are
	not affected by this change. It's highly unlikely that anybody out
	there knows/uses this feature, so it can IMHO be safely changed.

	* app/base/temp-buf.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-combine.c
	* app/core/gimpdrawable-preview.c
	* app/core/gimpimage-preview.c
	* app/core/gimplayer.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsmudge.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimppainttool.c: use the pixel_region_init_foo()
	functions instead of initializing regions of TempBufs and raw data
	manually. Removed lots of workarounds for the broken offset
	handling. The changed places of code are much more readable now.
2005-09-03 17:16:58 +00:00
Michael Natterer 89bb3fffa1 don't create a display here.
2005-09-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-edit.[ch] (gimp_edit_paste_as_new): don't create a
	display here.

	(gimp_edit_named_cut)
	(gimp_edit_named_copy)
	(gimp_edit_named_copy_visible): new functions containing named
	buffer wrappers around the functions affecting the global buffer
	only.

	* app/actions/edit-commands.c: use the new functions instead of
	implementing them here, create a display for the image returned
	by paste as new.

	* app/actions/buffers-commands.c
	* app/widgets/gimptoolbox-dnd.c: create displays here too.

	* tools/pdbgen/pdb/edit.pdb: added wrappers for paste as new and
	wrappers for all the cut/copy/paste named stuff.
	Fixes bug #315130. Cleaned up and de-obfuscated.

	* libgimp/gimp.def: changed accordingly.

	* app/pdb/edit_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimpedit_pdb.[ch]: regenerated.
2005-09-02 22:50:06 +00:00
Sven Neumann f4e2ea30d8 reverted, it duplicates existing functionality.
2005-09-01  Sven Neumann  <neumann@jpk.com>

	* app/core/gimppalette.[ch]: reverted, it duplicates existing
	functionality.

	* app/core/gimppalette-import.c
	(gimp_palette_import_from_indexed_image): name the colors using
	their index in the colormap.
2005-09-01 18:06:21 +00:00
Sven Neumann cf538a33c2 added gimp_palette_new_from_colormap().
2005-09-01  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette.[ch]: added gimp_palette_new_from_colormap().
2005-09-01 17:18:26 +00:00
Sven Neumann dc8bdb4fa1 app/base/siox.[ch] fixed API docs.
2005-08-25  Sven Neumann  <sven@gimp.org>

	* app/base/siox.[ch]
	* app/core/gimpscanconvert.c: fixed API docs.

2005-08-25  Sven Neumann  <sven@gimp.org>

	* app/app-sections.txt
	* app/app.types: minor updates.

	* libgimpbase/tmpl/gimputils.sgml: regenerated.
2005-08-25 16:52:46 +00:00
Sven Neumann eab00f1d80 converted comments to gtk-doc inline API docs.
2005-08-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimpscanconvert.[ch]: converted comments to gtk-doc
	inline API docs.
2005-08-22 16:08:08 +00:00
Michael Natterer cb39aa66a0 removed HALF_WAY define, it's BOUNDARY_HALF_WAY now.
2005-08-21  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.h: removed HALF_WAY define, it's
	BOUNDARY_HALF_WAY now.
2005-08-21 12:57:54 +00:00
Michael Natterer 4fb1743f55 renamed puclic functions, defines and enums to live in a proper "boundary"
2005-08-20  Michael Natterer  <mitch@gimp.org>

	* app/base/boundary.[ch]: renamed puclic functions, defines and
	enums to live in a proper "boundary" namespace. Cleaned up and
	simplified internal code even more.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimplayer-floating-sel.c
	* app/paint/gimppaintcore-stroke.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimppainttool.c: changed accordingly.
2005-08-20 15:46:37 +00:00
Sven Neumann 2ebf0647c5 go back to using dpi as the default resolution unit.
2005-08-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimptemplate.c: go back to using dpi as the default
	resolution unit.

	* app/core/gimp-utils.[ch]: moved the code to determine the unit
	from the locale settings here as gimp_get_default_unit().

	* app/dialogs/print-size-dialog.c
	* app/widgets/gimpimagepropview.c: use the unit returned by the
	new function to display the print size (bug #107497).
2005-08-18 15:08:49 +00:00
Sven Neumann f8dff379bf check for langinfo.h and _NL_MEASUREMENT_MEASUREMENT.
2005-08-17  Sven Neumann  <sven@gimp.org>

	* configure.in: check for langinfo.h and _NL_MEASUREMENT_MEASUREMENT.

	* app/core/gimptemplate.c: try to determine the default unit from
	the locale settings. Supposed to fix bug #107497.
2005-08-17 17:01:58 +00:00
Sven Neumann da9eb037c7 define G_DISABLE_DEPRECATED unless glib >= 2.9.0.
2005-08-16  Sven Neumann  <sven@gimp.org>

	* configure.in: define G_DISABLE_DEPRECATED unless glib >= 2.9.0.

	* app/core/gimpscanconvert.c: added missing include.

	* app/text/gimp-fonts.c
	* libgimp/gimp.c
	* libgimpwidgets/gimpcolornotebook.c
	* plug-ins/helpbrowser/dialog.c: fixed signedness warnings.

	* plug-ins/bmp/bmpread.c (ReadBMP): initialize variable.
2005-08-16 00:48:20 +00:00
Manish Singh 41ed6b280f if the offsets of the layer are such that they are just on the border of
2005-08-13  Manish Singh  <yosh@gimp.org>

        * app/core/gimpimage-preview.c (gimp_image_get_new_preview): if the
        offsets of the layer are such that they are just on the border of
        the image, detect that and bail instead of trying to make a
        sub-preview with a 0 dimension.
2005-08-13 23:55:52 +00:00
Michael Natterer fa74cbcd15 pass src_bytes and dest_bytes to these functions instead of just the
2005-08-09  Michael Natterer  <mitch@gimp.org>

	* app/paint-funcs/paint-funcs.[ch] (extract_from_inten_pixels)
	(extract_from_indexed_pixels): pass src_bytes and dest_bytes to
	these functions instead of just the source's bytes and whether it
	has an alpha. Honor dest_bytes when extracting instead of crashing
	by always asuming that the destination has alpha.
	Fixes bug #312392.

	(extract_from_region): removed has_alpha paramater. pass
	src->bytes and dest->bytes to above functions.

	* app/core/gimpselection.c (gimp_selection_extract): changed
	accordingly.
2005-08-09 21:57:08 +00:00
Sven Neumann ce8dcfb497 app/base/siox.[ch] app/core/gimpdrawable-foreground-extract.[ch]
2005-08-09  Sven Neumann  <sven@gimp.org>

	* app/base/siox.[ch]
	* app/core/gimpdrawable-foreground-extract.[ch]
	* app/tools/gimpforegroundselectoptions.[ch]
	* app/tools/gimpforegroundselecttool.c: renamed Granularity to
	Color Sensitivity, both in the GUI and in the APIs.
2005-08-09 20:43:44 +00:00
Sven Neumann 21829c4431 take image type instead of basetype of the source drawable. Handle
2005-08-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimplayer.c (gimp_layer_transform_color): take image
	type instead of basetype of the source drawable. Handle conversion
	from drawables without alpha channel.
	(gimp_layer_new_from_region): handle source regions without alpha.
2005-08-09 00:07:21 +00:00
Sven Neumann 651aca218a added another call to gimp_progress_update().
2005-08-08  Sven Neumann  <sven@gimp.org>

	* app/base/siox.c: added another call to gimp_progress_update().

	* app/core/gimp.c (gimp_init): fixed harmless cut-n-paste error.
2005-08-08 17:38:25 +00:00
Sven Neumann 5c6b8e9f79 added the possibility to specify a clip rectangle.
2005-08-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimpscanconvert.[ch]: added the possibility to specify
	a clip rectangle.

	* app/base/siox.c (find_max_blob): use g_try_malloc().
2005-08-08 12:05:54 +00:00
Michael Natterer e8658ec7f9 take care of sample points. Addresses bug #137776.
2005-08-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-resize.c (gimp_image_resize_with_layers):
	take care of sample points. Addresses bug #137776.
2005-08-07 21:05:09 +00:00
Michael Natterer 4c6d9ddd78 new function.
2005-08-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.[ch] (gimp_layer_flatten): new function.

	* app/actions/layers-actions.c
	* app/actions/layers-commands.[ch]
	* app/widgets/gimphelp-ids.h
	* menus/image-menu.xml.in
	* menus/layers-menu.xml: added "Remove Alpha Channel" action,
	action callback, help ID and menu items. Fixes bug #309762.
2005-08-07 16:38:35 +00:00
Sven Neumann 46bc22c7ff reordered parameters to match the order of parameters in
2005-08-06  Sven Neumann  <sven@gimp.org>

	* app/base/siox.[ch]: reordered parameters to match the order of
	parameters in gimp_drawable_foreground_extract_siox().

	* app/core/gimpdrawable-foreground-extract.c: changed accordingly.

	* app/tools/gimpforegroundselectoptions.[ch]: draw slider value to
	the right.

	* app/tools/gimpfreeselecttool.[ch]: added
	gimp_free_select_tool_select() to calls the virtual select() method.

	* app/tools/gimpforegroundselecttool.[ch]: queue an idle select if
	the smoothness or granularity values change in the tool options.
2005-08-06 20:01:22 +00:00
Sven Neumann d670b0e11e app/base/siox.[ch] expose all parameters of the SIOX algorithm. Provide
2005-08-06  Sven Neumann  <sven@gimp.org>

	* app/base/siox.[ch]
	* app/core/gimpdrawable-foreground-extract.[ch]: expose all
	parameters of the SIOX algorithm. Provide default values.

	* app/tools/gimpforegroundselectoptions.[ch]: added properties and
	user interface for all SIOX parameters.

	* app/tools/gimpforegroundselecttool.c: changed accordingly.

2005-08-06  Sven Neumann  <sven@gimp.org>

	* plug-ins/benchmark-foreground-extract.py: pass run-mode to PDB
	calls.
2005-08-06 19:08:43 +00:00
Sven Neumann 3c8a10e925 app/base/siox.c moved rectangle intersection into
2005-08-06  Sven Neumann  <sven@gimp.org>

	* app/base/siox.c
	* app/core/gimpdrawable-foreground-extract.c: moved rectangle
	intersection into gimp_drawable_foreground_extract().
2005-08-06 15:09:31 +00:00
Sven Neumann 68f09c7cb6 added gimp_scan_convert_compose(), an alternative to
2005-08-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpscanconvert.[ch]: added gimp_scan_convert_compose(),
	an alternative to gimp_scan_convert_render() that allows to compose
	strokes on a drawable.

	* app/tools/gimpforegroundselecttool.c: use the new function to
	get rid of temporary channels for applying the strokes. Also fixed
	calculation of stroke width from display scale.
2005-08-06 14:54:13 +00:00
Sven Neumann 90d861bec2 app/paint-funcs/paint-funcs-generic.h fixed signedness warnings.
2005-08-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-import.c:
	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: fixed signedness warnings.
2005-08-06 11:08:43 +00:00
Sven Neumann 71785ac8cd canonicalize hardcoded procedure names.
2005-08-06  Sven Neumann  <sven@gimp.org>

	* app/batch.c: canonicalize hardcoded procedure names.

	* app/base/siox.[ch]
	* app/core/gimpdrawable-foreground-extract.[ch]
	* app/tools/gimpforegroundselecttool.c: restrict the working area
	to the double of the bounding box of the initial selection.
2005-08-06 00:51:22 +00:00
Michael Natterer 1755b50bd8 revert previous change. Instead, don't push undos if the item is not
2005-08-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.c (gimp_item_parasite_attach): revert previous
	change. Instead, don't push undos if the item is not attached.
2005-08-05 17:36:24 +00:00
Sven Neumann f2ecfca131 disable undo while the image is being loaded.
2005-08-05  Sven Neumann  <sven@gimp.org>

	* app/xcf/xcf-load.c (xcf_load_image): disable undo while the
	image is being loaded.

	* app/core/gimpitem.c (gimp_item_parasite_attach): don't try to
	push an undo step if undo is disabled. Gets rid of warnings while
	loading an XCF file with undoable drawable parasites.
2005-08-05 14:13:10 +00:00
Sven Neumann 94bef475d2 added GIMP_UNDO_FOREGROUND_SELECT.
2005-08-03  Sven Neumann  <sven@gimp.org>

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

	* app/tools/Makefile.am
	* app/tools/gimpforegroundselecttool-undo.[ch]: added stubs for
	undo in the new foreground selection tool.

	* tools/pdbgen/pdb/procedural_db.pdb: include gimpbase.h for
	gimp_canonicalize_identifier().

	* app/pdb/procedural_db_cmds.c: regenerated.

	* app/file/file-utils.c: fixed signedness warning.
2005-08-03 01:54:27 +00:00
Sven Neumann 4f870bc132 deprecated RGB intensity functions and definitions. These coefficients do
2005-08-03  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimprgb.[ch]: deprecated RGB intensity functions
	and definitions. These coefficients do not accurately compute
	luminance for contemporary monitors. Instead the coefficients from
	the sRGB spec should be used which have now been added.

	* libgimpcolor/gimpcolor.def: updated.

	* libgimp/gimpdrawable.c
	* libgimp/gimppixelfetcher.c
	* app/base/colorize.c
	* app/base/levels.c
	* app/base/temp-buf.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-convert.c
	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage.c
	* app/gui/splash.c
	* app/widgets/gimpgradienteditor.c
	* modules/colorsel_triangle.c
	* plug-ins/common/aa.c
	* plug-ins/common/bumpmap.c
	* plug-ins/common/colorify.c
	* plug-ins/common/despeckle.c
	* plug-ins/common/displace.c
	* plug-ins/common/engrave.c
	* plug-ins/common/gradmap.c
	* plug-ins/common/grid.c
	* plug-ins/common/mng.c
	* plug-ins/common/newsprint.c
	* plug-ins/common/png.c
	* plug-ins/common/whirlpinch.c
	* plug-ins/gflare/gflare.c
	* plug-ins/gfli/gfli.c
	* plug-ins/maze/handy.c
	* plug-ins/pagecurl/pagecurl.c: use gimp_rgb_luminance() and
	friends instead of the deprecated intensity functions.
2005-08-03 00:36:41 +00:00
Sven Neumann 7e3d7ede18 pass 255 as value to gimp_scan_convert_render_internal().
2005-07-31  Sven Neumann  <sven@gimp.org>

	* app/core/gimpscanconvert.c (gimp_scan_convert_render): pass 255
	as value to gimp_scan_convert_render_internal().

	* app/tools/gimpforegroundselecttool.[ch]: add paint strokes as
	foreground color; draw function is missing.
2005-07-31 14:27:46 +00:00
Sven Neumann e96a77ecb3 fixed some minor coding style issues.
2005-07-31  Sven Neumann  <sven@gimp.org>

	* app/core/gimpscanconvert.c: fixed some minor coding style issues.
2005-07-31 11:53:32 +00:00
Sven Neumann a026524412 app/base/siox.[ch] pass progress_callback and progress_data to
2005-07-29  Sven Neumann  <sven@gimp.org>

	* app/base/siox.[ch]
	* app/core/gimpdrawable-foreground-extract.c: pass progress_callback
	and progress_data to siox_foreground_extract().
2005-07-29 16:09:16 +00:00
Sven Neumann 2580f0c04e added a progress parameter.
2005-07-29  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-foreground-extract.[ch]: added a progress
	parameter.

	* app/tools/gimpforegroundselecttool.[ch]: changed the "select"
	method to take a GimpDisplay instead of a GimpImage.

	* tools/pdbgen/pdb/drawable.pdb
	* app/tools/gimpforegroundselecttool.c: changed accordingly.

	* app/pdb/drawable_cmds.c: regenerated.
2005-07-29 03:28:27 +00:00
Sven Neumann 23666d8f19 added GimpForegroundExtractMode in preparation for other implementations
2005-07-29  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpbaseenums.[ch]: added GimpForegroundExtractMode
	in preparation for other implementations to be added in the future.

	* libgimp/gimpenums.c.tail
	* tools/pdbgen/enums.pl: regenerated.

	* app/core/gimpdrawable-foreground-extract.[ch]
	* app/tools/gimpforegroundselecttool.c
	* tools/pdbgen/pdb/drawable.pdb: added the mode parameter.

	* app/pdb/drawable_cmds.c
	* libgimp/gimpdrawable_pdb.[ch]: regenerated.
2005-07-29 02:35:12 +00:00
Sven Neumann a5abd45337 added gimp_scan_convert_render_value(), a variant of
2005-07-29  Sven Neumann  <sven@gimp.org>

	* app/core/gimpscanconvert.[ch]: added
	gimp_scan_convert_render_value(), a variant of
	gimp_scan_convert_render() that allows to pass the foreground value.

	* app/tools/gimpfreeselecttool.[ch]: added a virtual "select" method.

	* app/tools/Makefile.am
	* app/tools/gimp-tools.c
	* app/tools/gimpforegroundselecttool.[ch]: added a rough first
	version of foreground selection tool based on the SIOX algorithm.
	Work in progress...

	* app/widgets/gimphelp-ids.h: added help-id for the new tool.
2005-07-29 01:48:56 +00:00
Sven Neumann 0728f76b35 added gimp_undo_stack_get_depth().
2005-07-29  Sven Neumann  <sven@gimp.org>

	* app/core/gimpundostack.[ch]: added gimp_undo_stack_get_depth().

	* app/widgets/gimpimagepropview.[ch]: display number and memory
	usage of undo/redo steps.

	* app/core/gimpimage-merge.c: fixed signedness issue.
2005-07-28 22:40:32 +00:00
Sven Neumann b82d4c46c7 accept an offset between pixels and mask, work only on the intersection
2005-07-28  Sven Neumann  <sven@gimp.org>

	* app/base/siox.[ch]: accept an offset between pixels and mask,
	work only on the intersection rectangle.

	* app/core/gimpdrawable-foreground-extract.c: pass the drawable
	offsets to siox_foreground_extract().
2005-07-28 20:12:16 +00:00
Manish Singh bd5d41062d #include gimpimage-colormap.h
2005-07-27  Manish Singh  <yosh@gimp.org>

        * app/core/gimpdrawable-foreground-extract.c: #include
        gimpimage-colormap.h
2005-07-27 23:01:48 +00:00
Sven Neumann d429a944db app/core/Makefile.am moved cpercep from here ...
2005-07-28  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/cpercep.[ch]: moved cpercep from here ...

	* app/base/Makefile.am
	* app/base/cpercep.[ch]: ... to here.

	* app/base/siox.[ch]: use the cpercep routines for RGB->LAB
	conversion, gives a 20% speedup. Removed normalization which seems
	redundant. Make it work for grayscale and indexed, not only RGB.

	* app/core/gimpdrawable-foreground-extract.c
	* app/core/gimpimage-convert.c: changed accordingly.
2005-07-27 22:52:34 +00:00
Michael Natterer 07ff13c754 untabify, minor cleanup.
2005-07-24  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppattern.c: untabify, minor cleanup.
2005-07-23 22:22:45 +00:00
Michael Natterer d280c77f3f added "entry-clicked" and "color-dropped" signals. Completely handle color
2005-07-14  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimppaletteview.[ch]: added "entry-clicked" and
	"color-dropped" signals. Completely handle color DND. Cleanup.

	* app/core/gimpmarshal.list: marshallers for above signals.

	* app/widgets/gimppaletteeditor.[ch]: chopped and reassembled.
	Remove tons of code and use a GimpPaletteView instead of the
	deprecated GtkPreview. Addresses bug #102204.
2005-07-14 18:37:33 +00:00
Sven Neumann 70aa10cef7 app/base/Makefile.am renamed to siox.[ch].
2005-07-13  Sven Neumann  <sven@gimp.org>

	* app/base/Makefile.am
	* app/base/segmentator.[ch]: renamed to siox.[ch].

	* app/base/siox.[ch]: added API docs and a link to the algorithm's
	new homepage. Removed unused code.

	* app/core/gimpdrawable-foreground-extract.c: changed accordingly.
2005-07-13 19:30:25 +00:00
Michael Natterer 8938834a72 actually return the added entry, and not always the palette's last entry
2005-07-13  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppalette.c (gimp_palette_add_entry): actually return
	the added entry, and not always the palette's last entry (argh!).

	* app/widgets/gimppaletteeditor.c: make sure the cursor is always
	on the newly added color. Really fixes #15060 this time.
2005-07-13 17:46:12 +00:00
Michael Natterer 893c9b9872 pass opacity and paint_mode to gimp_edit_fill_internal() instead of
2005-07-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-edit.c: pass opacity and paint_mode to
	gimp_edit_fill_internal() instead of figuring them in the
	function.
2005-07-12 15:11:40 +00:00
Michael Natterer c9c9640a22 removed "context" parameter from GimpItem::stroke(), it's not needed any
2005-07-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: removed "context" parameter from
	GimpItem::stroke(), it's not needed any longer.

	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/vectors/gimpvectors.c: changed accordingly.
2005-07-12 14:44:17 +00:00
Michael Natterer d64bf3564f added GimpPickable::get_opacity_at()
2005-07-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppickable.[ch]: added GimpPickable::get_opacity_at()

	* app/core/gimpchannel.[ch]: removed gimp_channel_value() and
	implement ::get_opacity_at() instead.

	* app/core/gimplayer.[ch]: removed gimp_layer_pick_correlate()
	and implement ::get_opacity_at() instead.

	* app/core/gimpselection.c: GimpChannel::value() doesn't exist
	any more.

	* app/core/gimpprojection.c: implement ::get_opacity_at(), always
	returns OPAQUE.

	* app/core/gimpimage.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptransformtool.c
	* tools/pdbgen/pdb/selection.pdb: changed accordingly.

	* app/pdb/selection_cmds.c: regenerated.
2005-07-11 19:21:52 +00:00
Michael Natterer fea229090f added read-only properties "opacity", "mode" and "lock-alpha".
2005-07-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c: added read-only properties "opacity",
	"mode" and "lock-alpha".
2005-07-11 16:46:28 +00:00
Michael Natterer 20b4769cf5 app/actions/layers-actions.c app/actions/layers-commands.[ch]
2005-07-10  Michael Natterer  <mitch@gimp.org>

	* app/actions/layers-actions.c
	* app/actions/layers-commands.[ch]
	* app/core/core-enums.[ch]
	* app/core/gimpimage-undo-push.[ch]
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.[ch]
	* app/text/gimptextlayer-xcf.c
	* app/widgets/gimphelp-ids.h
	* app/widgets/gimplayertreeview.[ch]
	* app/xcf/xcf-load.c
	* app/xcf/xcf-private.h
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/layer.pdb
	* menus/image-menu.xml.in
	* libgimp/gimp.def: did a global s/preserve_trans/lock_alpha/ in
	preparation for more layer locking flags.

	* app/pdb/procedural_db.c
	* libgimp/gimplayer.[ch]: added compat stuff for preserve_trans.

	* app/pdb/layer_cmds.c
	* libgimp/gimplayer_pdb.[ch]: regenerated.

	* plug-ins/common/colortoalpha.c
	* plug-ins/common/iwarp.c
	* plug-ins/common/psd.c
	* plug-ins/common/psd_save.c
	* plug-ins/common/psp.c
	* plug-ins/common/rotate.c
	* plug-ins/common/threshold_alpha.c
	* plug-ins/common/vpropagate.c
	* plug-ins/script-fu/scripts/3d-outline.scm
	* plug-ins/script-fu/scripts/alien-glow-bar.scm
	* plug-ins/script-fu/scripts/alien-glow-bullet.scm
	* plug-ins/script-fu/scripts/alien-glow-logo.scm
	* plug-ins/script-fu/scripts/basic1-logo.scm
	* plug-ins/script-fu/scripts/basic2-logo.scm
	* plug-ins/script-fu/scripts/beveled-pattern-button.scm
	* plug-ins/script-fu/scripts/blend-anim.scm
	* plug-ins/script-fu/scripts/blended-logo.scm
	* plug-ins/script-fu/scripts/bovinated-logo.scm
	* plug-ins/script-fu/scripts/burn-in-anim.scm
	* plug-ins/script-fu/scripts/carved-logo.scm
	* plug-ins/script-fu/scripts/chalk.scm
	* plug-ins/script-fu/scripts/chip-away.scm
	* plug-ins/script-fu/scripts/comic-logo.scm
	* plug-ins/script-fu/scripts/coolmetal-logo.scm
	* plug-ins/script-fu/scripts/crystal-logo.scm
	* plug-ins/script-fu/scripts/drop-shadow.scm
	* plug-ins/script-fu/scripts/gimp-headers.scm
	* plug-ins/script-fu/scripts/gimp-labels.scm
	* plug-ins/script-fu/scripts/glowing-logo.scm
	* plug-ins/script-fu/scripts/gradient-bevel-logo.scm
	* plug-ins/script-fu/scripts/image-structure.scm
	* plug-ins/script-fu/scripts/neon-logo.scm
	* plug-ins/script-fu/scripts/perspective-shadow.scm
	* plug-ins/script-fu/scripts/starburst-logo.scm
	* plug-ins/script-fu/scripts/starscape-logo.scm
	* plug-ins/script-fu/scripts/textured-logo.scm
	* plug-ins/script-fu/scripts/title-header.scm
	* plug-ins/script-fu/scripts/waves-anim.scm
	* plug-ins/xjt/xjt.c: changed accordingly.
2005-07-10 21:17:22 +00:00
Hans Breuer d9ac028c50 updated dont include "gimpmessagedialog.c" to avoid redefinitions. Instead
2005-07-10  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc app/gimpcore.def : updated
	* app/widgets/gimpcontrollerlist.c : dont include
	"gimpmessagedialog.c" to avoid redefinitions.
	Instead include gimpmessagebox.h and gimpmessagedialog.h

	* plug-ins/common/raw.c : include <io.h>
	* plug-ins/common/screenshot.c : make it compile. It
	still has no code to actually work on win32.
2005-07-10 16:24:57 +00:00
Sven Neumann f2382a6ef6 ported to GIMP data structures. There are still some TODOs, smooth_mask()
2005-07-10  Sven Neumann  <sven@gimp.org>

	* app/base/segmentator.[ch]: ported to GIMP data structures. There
	are still some TODOs, smooth_mask() isn't implemented yet.

	* app/core/Makefile.am
	* app/core/gimpdrawable-foreground-extract.[ch]: thin wrapper around
	the new segmentation algorithm.

	* tools/pdbgen/pdb/drawable.pdb: added a first draft of a PDB API
	for foreground extraction.

	* app/pdb/drawable_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimpdrawable_pdb.[ch]: regenerated.
2005-07-09 22:44:26 +00:00
Michael Natterer 9b9052b866 removed if(image) checks where the image can't be NULL.
2005-07-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c: removed if(image) checks where the image
	can't be NULL.
2005-07-09 21:47:54 +00:00
Sven Neumann 4b29677d16 gaussian_blur_region() writes to the pixel data, need to initialize the
2005-07-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimpchannel.c (gimp_channel_real_feather):
	gaussian_blur_region() writes to the pixel data, need to initialize
	the pixel region with dirty == TRUE;

	* app/paint-funcs/paint-funcs-generic.h: formatting.
2005-07-09 11:48:02 +00:00
Michael Natterer 2a71ce5e59 if sample_merged is FALSE and drawable is NULL, just get the image's
2005-07-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-pick-color.c (gimp_image_pick_color): if
	sample_merged is FALSE and drawable is NULL, just get the image's
	active drawable instead of bailing out.

	* app/widgets/gimpcursorview.c (gimp_cursor_view_update_cursor):
	use gimp_image_pick_color() insted of duplicating its code.
2005-07-09 11:07:36 +00:00
Sven Neumann 9e8ee610d4 renamed cpercep_init_conversions() to cpercep_init(); only initialize the
2005-07-05  Sven Neumann  <sven@gimp.org>

	* app/core/cpercep.[ch]: renamed cpercep_init_conversions() to
	cpercep_init(); only initialize the tables on the first call.

	* app/core/gimpimage-convert.c: changed accordingly.
2005-07-05 10:52:31 +00:00
Nate Summers 1d21bcda65 app/batch.c app/config/gimprc-blurbs.h app/core/gimpimage-convert.c
* app/batch.c
	* app/config/gimprc-blurbs.h
 	* app/core/gimpimage-convert.c
	* app/dialogs/user-install-dialog.c: grammar and other pedantic string
	changes.
2005-07-02 04:16:12 +00:00
Manish Singh 02edf14eec feed environment values through gimp_config_path_expand, so ${gimp..}
2005-06-26  Manish Singh  <yosh@gimp.org>

        * app/core/gimpenvirontable.c: feed environment values through
        gimp_config_path_expand, so ${gimp..} variables can be used.

        * plug-ins/pygimp/Makefile.am: define PYTHONPATH in terms of
        ${gimp_plug_in_dir}. Use ; as a path separator on windows.

        With this final changes, pygimp should work out of the box on
        Win32 now. Thanks to Michael Schumacher and lode leroy for
        figuring out the high level details and testing.
2005-06-26 23:20:21 +00:00
Manish Singh 31dfc85fe9 eat CRs too, since they might be there on Win32 systems.
2005-06-25  Manish Singh  <yosh@gimp.org>

        * app/core/gimpinterpreterdb.c: eat CRs too, since they might be
        there on Win32 systems.
2005-06-25 23:34:25 +00:00
Sven Neumann f1d89048d1 removed an incomplete and unused function.
2005-06-24  Sven Neumann  <sven@gimp.org>

	* app/core/gimppdbprogress.[ch]: removed an incomplete and unused
	function.
2005-06-24 16:46:00 +00:00
William Skaggs 5a62e7024c Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimplayer-floating-sel.c: set "Keep Transparency"
	FALSE when creating floating sel; see bug #161042.
2005-06-21 16:56:28 +00:00
Sven Neumann 5a7f136a9c simplified, use the eek wilber icon if the file doesn't exist.
2005-06-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c (gimp_imagefile_get_new_pixbuf):
	simplified, use the eek wilber icon if the file doesn't exist.
2005-06-18 14:16:26 +00:00
Sven Neumann 5dcbaeb284 fixed long-standing bug in the calculation of the depth of the
2005-06-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimpselection.c (gimp_selection_extract): fixed
	long-standing bug in the calculation of the depth of the
	tile-manager created when copying from an indexed drawable.
2005-06-17 16:18:23 +00:00
Sven Neumann e3800a406e don't display a preview and don't attempt to create one if the image file
2005-06-15  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c (gimp_imagefile_load_thumb):
	* app/widgets/gimpthumbbox.c (gimp_thumb_box_auto_thumbnail):
	don't display a preview and don't attempt to create one if the
	image file does not exist any longer (bug #307672).
2005-06-15 10:57:33 +00:00
Sven Neumann fa593afdbf allow to raise a layer w/o an alpha channel.
2005-06-14  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.c (gimp_image_raise_layer)
	(gimp_image_raise_layer_to_top): allow to raise a layer w/o an
	alpha channel.
2005-06-14 20:54:03 +00:00
Sven Neumann 9ed8b8099d allow to raise a layer w/o an alpha channel.
2005-06-14  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.c (gimp_image_raise_layer): allow to raise a
	layer w/o an alpha channel.
2005-06-14 20:51:08 +00:00
Sven Neumann 511b54785e renamed internal keys.
2005-06-14  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-gradients.c: renamed internal keys.
2005-06-14 20:40:05 +00:00
Michael Natterer 4cded149d9 copy the alpha channel from the correct source.
2005-06-13  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c (gimp_layer_transform_color): copy the
	alpha channel from the correct source.
2005-06-13 11:52:00 +00:00
Sven Neumann 697142c2f2 added missing brackets in macros.
2005-06-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-resize.c: added missing brackets in macros.
2005-06-12 22:20:47 +00:00
Michael Natterer ef4b245610 Fix bug #134304, as far as it's fixable:
2005-06-10  Michael Natterer  <mitch@gimp.org>

	Fix bug #134304, as far as it's fixable:

	* app/core/gimp-edit.c (gimp_edit_paste_as_new): handle pasting
	buffers without alpha. Also don't uselessly convert all buffers
	to RGB but create an image in the buffer's color space.

	(gimp_edit_extract): call gimp_selection_extract() with
	add_alpha = FALSE.

	* app/core/gimpselection.c (gimp_selection_extract): set add_alpha
	to TRUE if there is a selection, because the selection could have
	any shape.
2005-06-10 14:45:11 +00:00
Sven Neumann c1363db8c0 Removed "stingy-memory-use" all over the place. This feature was really
2005-06-08  Sven Neumann  <sven@gimp.org>

	Removed "stingy-memory-use" all over the place. This feature was
	really not that useful anymore. The GUI for the preference option
	was already removed for GIMP 2.2.  Fixes bug #306617.

	* app/config/gimpbaseconfig.[ch]: set IGNORE flag on
	"stingy-memory-use".

	* app/config/gimpcoreconfig.h: added a comment that the
	font_path_writable variable is unused.

	* app/base/temp-buf.[ch]: removed code that used to deal with
	swapping temp-bufs to disk.

	* app/base/base.c: made base_config a static variable.

	* app/core/gimpdata.[ch]
	* app/core/gimpdatafactory.[ch]: removed stingy_memory_use
	parameter from data construction methods.

	* app/core/gimp-gradients.c
	* app/core/gimpbrush-load.[ch]
	* app/core/gimpbrush.[ch]
	* app/core/gimpbrushgenerated.[ch]
	* app/core/gimpbrushpipe.[ch]
	* app/core/gimpcontext.c
	* app/core/gimpgradient-load.[ch]
	* app/core/gimpgradient.[ch]
	* app/core/gimppalette-import.c
	* app/core/gimppalette.[ch]
	* app/core/gimppattern.[ch]: changed accordingly.
2005-06-08 11:27:31 +00:00
William Skaggs cfed1f28ea Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpitem-align.c
	* app/core/gimpitem-align.h (gimp_item_align): remove push_undo
	arg, useless as pointed out by mitch.

	* app/tools/gimpaligntool.c: changed correspondingly.
2005-06-03 22:46:58 +00:00
William Skaggs 643e2257f5 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpitem-align.[ch]: newly created to
	hold code for gimp_item_align().

	* app/core/Makefile.am: add new files

	* app/core/gimpitem.[ch]: remove code from here.

	* app/tools/gimpaligntool.c: fix includes and remove
	unneeded includes.
2005-06-03 21:52:39 +00:00
William Skaggs 7250297297 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* gimp/app/tools/Makefile.am
	* gimp/app/tools/gimp-tools.c
	* gimp/app/tools/gimpalignoptions.c
	* gimp/app/tools/gimpalignoptions.h
	* gimp/app/tools/gimpaligntool.c
	* gimp/app/tools/gimpaligntool.h: Add new tool for
	aligning layers etc, as described in bug #147437.

	* gimp/app/core/gimpitem.c
	* gimp/app/core/gimpitem.h (gimp_item_align): add
	function required by new tool.

	* gimp/app/core/core-enums.c
	* gimp/app/core/core-enums.h: add enum for alignment
	types.

	* gimp/themes/Default/images/stock-hcenter-24.png
	* gimp/themes/Default/images/stock-vcenter-24.png
	* gimp/libgimpwidgets/gimpstock.c
	* gimp/libgimpwidgets/gimpstock.h
	* gimp/themes/Default/images/Makefile.am
	* gimp/themes/Default/images/makefile.msc: add two
	stock symbols, modeled on the gravity symbols.
2005-06-03 17:05:01 +00:00
Sven Neumann 5f52d2d515 code cleanup.
2005-05-31  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection-construct.c: code cleanup.
2005-05-31 14:49:01 +00:00
Sven Neumann d9b5c44c3c applied patch from Joao S. O. Bueno Calligaris that adds support for
2005-05-31  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-import.c: applied patch from Joao
	S. O. Bueno Calligaris that adds support for loading PSP color
	palette files (bug #305956).
2005-05-31 10:34:36 +00:00
Sven Neumann 3dcd00c127 Use the canonical form for signal names.
2005-05-27  Sven Neumann  <sven@gimp.org>

	* (lots of files): Use the canonical form for signal names.
2005-05-28 00:21:58 +00:00
Sven Neumann 93eab43eef Use the canonical form for signal names.
2005-05-27  Sven Neumann  <sven@gimp.org>

	* (lots of files): Use the canonical form for signal names.
2005-05-27 16:51:39 +00:00
Sven Neumann 3ca90a182e Use the canonical form for signal names in lots of places (but by far not
2005-05-27  Sven Neumann  <sven@gimp.org>

	* (lots of files): Use the canonical form for signal names in lots
	of places (but by far not all).
2005-05-27 13:05:26 +00:00
Sven Neumann 337947de29 reverted previous change for now.
2005-05-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdata.c: reverted previous change for now.
2005-05-27 10:56:33 +00:00
Sven Neumann f0224fe104 mark properties as serializable.
2005-05-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdata.c: mark properties as serializable.
2005-05-27 10:49:54 +00:00
Sven Neumann bbc1c947ad added more properties.
2005-05-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdata.c: added more properties.
2005-05-25 23:47:42 +00:00
Sven Neumann 59cb5d75ba added MIME type as a construct property to GimpData.
2005-05-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdata.[ch]: added MIME type as a construct property
	to GimpData.

	* app/core/gimpbrush-load.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpgradient-load.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c: set the MIME type when loading a data
	object from file. MIME types needs review and GimpPalette isn't
	quite done yet...

	* app/core/gimpdashpattern.c: cosmetics.
2005-05-25 23:25:45 +00:00
Michael Natterer 7abaab62e0 added virtual function GimpViewable::get_size() and public API
2005-05-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.[ch]: added virtual function
	GimpViewable::get_size() and public API gimp_viewable_get_size()
	which return width and height and a boolean indicating if the
	viewable has a size at all.
	Added default implementation of GimpViewable::get_popup_size()
	using the new get_size() API.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage.c
	* app/core/gimppattern.c: implement GimpViewable::get_size().

	* app/core/gimpbrush.c
	* app/core/gimppattern.c: removed GimpViewable::get_popup_size()
	implementations, the default one is good enough.

	* app/core/gimpbrushpipe.c (gimp_brush_pipe_get_popup_size):
	redirect to gimp_viewable_get_size() instead of duplicating its
	return values.

	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpview.c: allow pixbuf dragging out of any
	viewable that has a size.

	* app/widgets/gimpdrawabletreeview.c: removed pixbuf dragging code
	here.

	* app/widgets/gimpdnd.c: set gimp busy around encoding/decoding
	pixbufs into/from GtkSelectionData, because it can be a time
	consuming operation.
2005-05-25 10:05:17 +00:00
Sven Neumann d21f31d065 use quotewords() from Text::ParseWords to split the trigraph. This
2005-05-22  Sven Neumann  <sven@gimp.org>

	* tools/gimp-mkenums (parse_trigraph): use quotewords() from
	Text::ParseWords to split the trigraph. This function correctly
	deals with commas inside quotes.

	* app/core/core-enums.[ch]: tweaked descriptions in the
	GimpDashPreset enum.
2005-05-22 13:12:14 +00:00
Sven Neumann 7358758f68 minor cleanup.
2005-05-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdashpattern.c: minor cleanup.

	* app/widgets/gimpcellrendererdashes.c: don't draw a background,
	draw the dash pattern twice, use the correct widget state.
2005-05-22 12:20:25 +00:00
Sven Neumann a8318e18c5 added utility functions to copy and to free a dash pattern.
2005-05-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdashpattern.[ch]: added utility functions to copy
	and to free a dash pattern.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpcellrendererdashes.[ch]: added a simple cell
	renderer to visualize a dash pattern.

	* app/widgets/gimpstrokeeditor.c: show previews of the dash
	presets in the combo-box.
2005-05-21 20:24:42 +00:00
Michael Natterer 05b0266911 don't include "libgimpbase/gimpbase.h"
2005-05-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdashpattern.c: don't include "libgimpbase/gimpbase.h"
2005-05-20 15:30:57 +00:00
Sven Neumann 9b29707961 renamed property "miter" to "miter-limit" and added a description to be
2005-05-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpstrokeoptions.[ch]: renamed property "miter" to
	"miter-limit" and added a description to be used as a tooltip in
	the stroke editor.

	* app/core/gimpdrawable-stroke.c
	* app/widgets/gimpstrokeeditor.c: changed accordingly.
2005-05-19 15:17:30 +00:00
Sven Neumann 7902e11bee app/core/gimpstrokeoptions.[ch] app/widgets/gimpdasheditor.c small change
2005-05-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpstrokeoptions.[ch]
	* app/widgets/gimpdasheditor.c
	* app/widgets/gimpstrokeeditor.c: small change to the internal API
	to reduce code and conversion between GArray and GValueArray.
2005-05-19 11:08:50 +00:00
Sven Neumann 9bb255a3cf app/core/gimpdashpattern.[ch] moved more code out of GimpDashEditor to
2005-05-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdashpattern.[ch]
	* app/widgets/gimpdasheditor.c: moved more code out of
	GimpDashEditor to gimpdashpattern.c. Fixed bug in last commit.
2005-05-19 00:40:48 +00:00
Sven Neumann c7ba1dfc71 app/core/gimpdashpattern.[ch] moved code out of GimpDashEditor to
2005-05-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdashpattern.[ch]
	* app/widgets/gimpdasheditor.c: moved code out of GimpDashEditor
	to gimpdashpattern.c.
2005-05-18 23:59:35 +00:00
Sven Neumann 9aa2efcb32 use code from gimpdashpattern.c instead of duplicating it.
2005-05-19  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdasheditor.c: use code from gimpdashpattern.c
	instead of duplicating it.
2005-05-18 23:44:04 +00:00
Sven Neumann 533481d220 app/core/gimpdashpattern.[ch] moved more code to the new files.
2005-05-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdashpattern.[ch]
	* app/core/gimpstrokeoptions.c: moved more code to the new files.
2005-05-18 23:26:53 +00:00
Sven Neumann 146e4eee58 app/core/Makefile.am new files with coode split out of
2005-05-19  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpdashpattern.[ch]: new files with coode split out of
	gimpstrokeoptions.c.

	* app/core/gimpstrokeoptions.c: use gimp_dash_pattern_from_preset().
2005-05-18 22:50:54 +00:00
Sven Neumann f727e29b0a fix compilation on IRIX (bug #304685).
2005-05-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-snap.c: fix compilation on IRIX (bug #304685).
2005-05-18 19:53:52 +00:00
Sven Neumann d2cf185c30 minor code cleanup.
2005-05-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimppreviewcache.c: minor code cleanup.
2005-05-07 12:19:47 +00:00
Sven Neumann 2a08c79b2b app/actions/layers-actions.c app/core/gimpimage.c
2005-05-06  Sven Neumann  <sven@gimp.org>

	* app/actions/layers-actions.c
	* app/core/gimpimage.c (gimp_image_position_layer)
	* app/widgets/gimplayertreeview.c (gimp_layer_tree_view_drop_possible):
	drop the limitation that layers not at the bottom of the stack
	have to have an alpha channel. Allow the user to move the
	background layer up in the stack or reposition it using DND.

	* tips/gimp-tips.xml.in: changed the relevant tip and some more.
2005-05-06 20:45:21 +00:00
Sven Neumann 7be65c2d60 removed redundant casts.
2005-05-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-merge.c: removed redundant casts.
2005-05-06 15:45:04 +00:00
Sven Neumann 4ab7e091a9 use copy_region() instead of using tile_manager_map_over_tile() directly.
2005-04-29  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection-construct.c (gimp_projection_construct):
	use copy_region() instead of using tile_manager_map_over_tile()
	directly.
2005-04-29 14:06:08 +00:00
Sven Neumann e06bcb883c save COW projection code from bit-rotting. It can now be enabled again
2005-04-29  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection-construct.c: save COW projection code from
	bit-rotting. It can now be enabled again (but is definitely broken).
2005-04-29 10:49:11 +00:00
Sven Neumann 3835c016bd fill the layer before adding it to the image.
2005-04-28  Sven Neumann  <sven@gimp.org>

	* app/core/gimptemplate.c (gimp_template_create_image): fill the
	layer before adding it to the image.
2005-04-28 11:37:30 +00:00
Sven Neumann 33c95143ad app/core/gimpunit.c built-in units are const.
2005-04-28  Sven Neumann  <sven@gimp.org>

	* app/core/gimpunit.c
	* libgimp/gimpunitcache.c: built-in units are const.
2005-04-28 09:47:27 +00:00
Sven Neumann 61d6c9353f declared the return value of gimp_image_get_colormap() as const.
2005-04-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-colormap.[ch]: declared the return value of
	gimp_image_get_colormap() as const.

	* app/display/gimpdisplayshell-render.c: added some const qualifiers.
2005-04-27 16:44:28 +00:00
Hans Breuer 28a2b13581 build menus with nmake, too menus/Makefile.am : added to EXTRA_DIST
2005-04-24  Hans Breuer  <hans@breuer.org>

	* menus/makefile.msc : build menus with nmake, too
	  menus/Makefile.am : added to EXTRA_DIST

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

	* app/base/tmp-buf.c : there is no pid_t with msvc so typedef one
2005-04-24 15:39:15 +00:00
Michael Natterer ed9f887614 bail out early if the coords are out-of-image plus a border of the
2005-04-19  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-snap.c: bail out early if the coords are
	out-of-image plus a border of the snapping epsilon, and not just
	out-of-image. Fixes bug #169892.
2005-04-19 19:57:27 +00:00
Sven Neumann 925c0a64ee invalidate layer previews when the colormap changes. Fixes bug #301033.
2005-04-18  Sven Neumann  <neumann@jpk.com>

	* app/core/gimpimage.c (gimp_image_real_colormap_changed):
	invalidate layer previews when the colormap changes. Fixes
	bug #301033.
2005-04-18 16:08:56 +00:00
Michael Natterer 4e92a6cf32 no need to get base_config twice in the same function.
2005-04-16  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_real_set_brush)
	(gimp_context_real_set_pattern): no need to get base_config twice
	in the same function.

	* app/widgets/gimpblobeditor.h: include the parent class.

	* app/widgets/gimpdataeditor.c (gimp_data_editor_init): set the
	name entry insensitive.
2005-04-16 21:53:12 +00:00
Sven Neumann b7ad665c28 Applied a patch (with minor modifications) from Karine Delvare that makes
2005-04-16  Sven Neumann  <sven@gimp.org>

	Applied a patch (with minor modifications) from Karine Delvare
	that makes it possible to choose between various ways to remove
	color from a drawable (bug #155507):

	* libgimpbase/gimpbaseenums.h: added new enum GimpDesaturateMode.

	* libgimpbase/gimpbaseenums.c
	* libgimp/gimpenums.c.tail
	* plug-ins/pygimp/gimpenums.py
	* tools/pdbgen/enums.pl: regenerated.

	* app/core/gimpdrawable-desaturate.[ch]: implement other formulas
	to remove colors from a drawable.

	* tools/pdbgen/pdb/color.pdb: let gimp_desaturate() call
	gimp_drawable_desaturate() with GIMP_DESATURATE_LIGHTNESS so that
	it behaves like it always did.

	* app/pdb/color_cmds.c: regenerated.

	* app/dialogs/Makefile.am
	* app/dialogs/desaturate-dialog.[ch]: new files that define a simple
	dialog to choose a mode for desaturation.

	* app/actions/drawable-actions.[ch]: use the new dialog.
2005-04-16 14:51:49 +00:00
Michael Natterer e3b7c8a988 CVS surgery to keep the locading functions' revision history. 2005-04-15 17:31:04 +00:00
Michael Natterer 4ffe1f03d3 Added loading of Photoshop brushes. Fixes bug #163047:
2005-04-15  Michael Natterer  <mitch@gimp.org>

	Added loading of Photoshop brushes. Fixes bug #163047:

	* app/core/Makefile.am
	* app/core/gimpbrush-load.[ch]: new files holding all brush
	loading code. Added .abr loader based on a patch by Adrian
	Likins. Didn't add a new brush subclass as in the original patch,
	but only a loading function which loads the brushes into standard
	GimpBrush objects. Did misc fixes to the code, needs further
	cleanup.

	* app/core/gimpbrush.[ch]: removed brush loading code here.

	* app/core/gimpbrushpipe.c: changed #includes accordingly.

	* app/core/gimp.c (gimp_real_initialize): register the new load
	functions and their extensions with the brush factory.
2005-04-15 15:56:34 +00:00
Sven Neumann 21a16899da fixed gtk-doc comment.
2005-04-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimplayer.c: fixed gtk-doc comment.
2005-04-13 17:45:53 +00:00
Sven Neumann f04aca1ef1 set GIMP_CONFIG_PARAM_CONFIRM on the "font-path" property. Set
2005-04-13  Sven Neumann  <sven@gimp.org>

	* app/config/gimpcoreconfig.c: set GIMP_CONFIG_PARAM_CONFIRM on
	the "font-path" property. Set GIMP_CONFIG_PARAM_IGNORE for
	"font-path-writable".

	* app/dialogs/preferences-dialog.c: don't use "font-path-writable".

	* app/core/gimp.c (gimp_restore)
	* app/text/gimp-fonts.c: handle --no-fonts similar to --no-data
	and allow to load the fonts later by pressing "Refresh" in the
	fonts dialog.
2005-04-13 13:14:24 +00:00
Sven Neumann aca3e85384 register handler for the "GimpPaint" log domain.
2005-04-13  Sven Neumann  <sven@gimp.org>

	* app/app_procs.c: register handler for the "GimpPaint" log domain.

	* app/core/gimpdatafactory.c (gimp_data_factory_init): don't load
	any data if TRUE is passed for no_data.

	* app/tools/gimppainttool.c (gimp_paint_tool_draw): handle a NULL
	brush gracefully.
2005-04-13 00:16:24 +00:00
Sven Neumann 0e678c4caa handle a NULL palette with GIMP_CUSTOM_PALETTE type, use the builtin mono
2005-04-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert.c (gimp_image_convert): handle a NULL
	palette with GIMP_CUSTOM_PALETTE type, use the builtin mono
	palette as fallback.

	* app/dialogs/convert-dialog.c: handle empty palette container.

	* app/gui/gui-vtable.c (gui_pdb_dialog_new): removed unused code.

	* tools/pdbgen/pdb/convert.pdb: don't load the palettes implicitely.

	* app/pdb/convert_cmds.c: regenerated.
2005-04-12 23:46:10 +00:00
Sven Neumann c3807c6a04 added gimp_data_factory_refresh().
2005-04-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdatafactory.[ch]: added gimp_data_factory_refresh().

	* app/actions/data-commands.c
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/patterns.pdb: use the new function.

	* app/pdb/brushes_cmds.c
	* app/pdb/convert_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/palettes_cmds.c
	* app/pdb/patterns_cmds.c: regenerated.
2005-04-12 22:58:12 +00:00
Sven Neumann 0c91d7d672 n2005-04-12 Sven Neumann <sven@gimp.org>
* app/core/gimpcontainer.[ch]: added gimp_container_is_empty().

	* app/core/gimpcontext.c
	* app/core/gimpimage.c
	* app/dialogs/palette-import-dialog.c
	* app/text/gimptextlayer.c
	* app/widgets/gimpimagedock.c: use the new function.
2005-04-12 21:36:54 +00:00
Michael Natterer b64b4a8f9a undo the "cosmetic changes" of 2005-03-20. Fixes bug #300269.
2005-04-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-transform-utils.c
	(gimp_transform_matrix_perspective): undo the "cosmetic changes"
	of 2005-03-20. Fixes bug #300269.
2005-04-12 09:09:41 +00:00
Michael Natterer 9d439fe018 added gimp_buffer_new_from_pixbuf().
2005-04-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbuffer.[ch]: added gimp_buffer_new_from_pixbuf().

	* app/widgets/gimpclipboard.c: removed
	tile_manager_new_from_pixbuf() and base/ dependency.
2005-04-09 21:52:21 +00:00
Michael Natterer 7609645970 Implement dragging and dropping in any GdkPixbuf supported format. Fixes
2005-04-09  Michael Natterer  <mitch@gimp.org>

	Implement dragging and dropping in any GdkPixbuf supported
	format. Fixes bug #172794 and bug #172795.

	* app/core/gimplayer.[ch] (gimp_layer_new_from_region): new
	function which contains all stuff that was in
	gimp_layer_new_from_tiles().

	(gimp_layer_new_from_tiles): use above function.
	(gimp_layer_new_from_pixbuf): new function.

	* app/widgets/Makefile.am
	* app/widgets/gimppixbuf.[ch]: new files containing GdkPixbuf
	utility functions for clipboard and DnD.

	* app/widgets/gimpselectiondata.[ch]: removed
	gimp_selection_data_set,get_pixbuf(), GTK+ provides the same API.
	Also removed GdkAtom parameters all over the place because it's
	always the same as selection_data->target.

	* app/widgets/gimpclipboard.c: use the new pixbuf utility
	functions and gtk_selection_data_set,get_pixbuf().

	* app/widgets/widgets-enums.h
	* app/widgets/gimpdnd.[ch]: removed never-implemented
	GIMP_DND_TYPE_PNG and added a generic GIMP_DND_TYPE_PIXBUF
	instead. Added API to drag and drop GdkPixbufs which transparently
	converts from/to and GdkPixbuf-supported image format. Removed
	passing around of GdkAtoms, since they were always the same
	as selection_data->target.

	* app/widgets/gimpdnd-xds.[ch]: follow GdkAtom parameter removal.

	* app/widgets/gimpcontainertreeview.[ch]: added virtual function
	GimpContainerTreeView::drop_pixbuf().

	* app/widgets/gimpcontainertreeview-dnd.c: dispatch drop_pixbuf().

	* app/widgets/gimplayertreeview.c: implement drop_pixbuf().

	* app/widgets/gimpdrawabletreeview.c: allow to drag all drawables
	as pixbufs.

	* app/display/gimpdisplayshell-dnd.c: allow dropping of pixbufs.
2005-04-09 17:56:04 +00:00
Sven Neumann 333593daf4 changed GimpConfig utility functions to take GObject variables instead of
2005-04-07  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpconfig-utils.[ch]: changed GimpConfig utility
	functions to take GObject variables instead of GimpConfig. There's
	nothing GimpConfig specific about these utilities.

	* app/actions/templates-commands.c
	* app/actions/tool-options-commands.c
	* app/base/base.c
	* app/config/gimpcoreconfig.c
	* app/config/gimpdisplayconfig.c
	* app/config/gimprc.c
	* app/core/gimpimage-grid.c
	* app/core/gimpimage-new.c
	* app/core/gimpstrokedesc.c
	* app/dialogs/grid-dialog.c
	* app/dialogs/image-new-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell.c
	* app/text/gimptextlayer.c
	* app/text/gimptextundo.c
	* app/tools/gimptextoptions.c
	* libgimpconfig/gimpconfig-iface.c: changed accordingly.
2005-04-07 10:05:54 +00:00
Sven Neumann ec1b12e14e app/actions/plug-in-actions.c (plug_in_actions_add_branch)
2005-04-07  Sven Neumann  <sven@gimp.org>

	* app/actions/plug-in-actions.c (plug_in_actions_add_branch)
	* app/core/gimpinterpreterdb.c (resolve_extension)
	* app/widgets/gimpcolorframe.c (gimp_color_frame_update): plugged
	memleaks.
2005-04-07 00:04:10 +00:00
Sven Neumann 0778559f39 app/core/core-enums.[ch] handle a floating selection attached to the layer
2005-04-05  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.[ch]
	* app/core/gimpimage.c
	(gimp_image_remove_layer, gimp_image_remove_channel): handle a
	floating selection attached to the layer or channel that is being
	removed.  Fixes bug #168582 but doesn't handle floating selections
	attached to layer masks.
2005-04-04 23:12:50 +00:00
Sven Neumann d336a49a53 return early if called for an internal data object. Fixes bug #172581.
2005-04-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdata.c (gimp_data_create_filename): return early if
	called for an internal data object. Fixes bug #172581.
2005-04-04 15:14:50 +00:00
Michael Natterer 0231374c86 added new signals "sample-point-added" and "sample-point-removed" and
2005-04-03  Michael Natterer  <mitch@gimp.org>

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

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

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

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

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

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

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

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

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

	* app/widgets/widgets-enums.[ch] (enum GimpColorFrameMode):
	changed description "Pixel values" to "Pixel" because the former
	was too long.
2005-04-03 15:48:03 +00:00
Sven Neumann 5e32e298d2 added VOID: OBJECT, OBJECT.
2005-03-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimpmarshal.list: added VOID: OBJECT, OBJECT.

	* app/widgets/gimpview.[ch]: pass old and new viewable in the
	"set-viewable" signal.

	* app/widgets/gimptoolbox-image-area.c: don't add the XDS drag source
	more than once.
2005-03-25 18:58:04 +00:00
Michael Natterer 46a25c2c60 app/core/core-enums.[ch] app/core/gimpimage-undo-push.[ch] eek, my
2005-03-24  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]
	* app/core/gimpimage-undo-push.[ch]
	* app/core/gimplayermask.[ch]: eek, my fault... removed
	GIMP_UNDO_LAYER_MASK_EDIT stuff again because that just determines
	the active drawable, which must not affect undo.

	* app/pdb/pdb_glue.h
	* app/actions/layers-commands.c (layers_mask_edit_cmd_callback):
	changed accordingly.

	(layers_mask_disable_cmd_callback): reverted last change. the old
	code was correct.
2005-03-24 22:34:36 +00:00
Michael Natterer b17e5b4aad reordered values so layer and layer mask undos are grouped together.
2005-03-24  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch] (enum GimpUndoType) : reordered values
	so layer and layer mask undos are grouped together.

	* app/core/gimpimage-undo-push.[ch]: same here. Changed the new
	layer mask undos to have 3 simple push functions for the 3
	properties, just as the layer property undos. Also made the code
	look like the layer properties undo stuff.

	* app/core/gimplayermask.c (gimp_layer_mask_set_apply,edit,show):
	changed accordingly.
2005-03-24 22:15:10 +00:00
William Skaggs bd9ef9bed6 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage-undo-push.[ch]
	* app/core/gimplayermask.c: fix compile warnings.
2005-03-24 19:23:14 +00:00
William Skaggs b5f1ae88e2 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/core-enums.[ch]
	* app/core/gimpimage-undo-push.[ch]
	* app/core/gimplayermask.[ch]:
	* app/pdb/pdb_glue.h
	* app/actions/layers-commands.c: try again from clean tree;
	hopefully will work this time.  (bug #148852)
2005-03-24 17:10:03 +00:00
Michael Natterer 0a5ce16b84 Added API to explicitly register dynamic menu items hierarchies. Fixes bug
2005-03-24  Michael Natterer  <mitch@gimp.org>

	Added API to explicitly register dynamic menu items hierarchies.
	Fixes bug #170623.

	* app/core/gimp.h: added "GSList *plug_in_menu_branches".

	* app/plug-in/plug-in-types.h

	* app/plug-in/plug-ins.[ch]: added API to register plug-in menu
	branches, just as for locale and help domans. Cleaned up handling
	of locale and help domains.

	(plug_ins_exit): free the registered menu branches.

	* app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch):
	new function to explicitly add a menu branch action.

	(plug_in_actions_setup): add the registered menu branches to each
	new action group.

	(plug_in_actions_build_path): always strip the untranslated menu
	path from underlines before using it as hash table key or action
	name.

	* app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed
	accordingly: strip underlines from untranslated menu paths before
	passing them to plug_in_menus_build_path().

	* app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus
	vtable entry to access the new stuff from the core. Renamed the
	functions desling with items from gimp_foo_entry() to
	gimp_foo_item().

	* app/gui/gui-vtable.c: implement create_branch() and add the
	branch action to all existing "plug-in" action groups. Note that
	we don't need to create any menus because that happens implicitly
	when adding menu items.

	* tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new
	PDB wrapper to access branch registering from plug-ins.

	* app/pdb/internal_procs.c
	* app/pdb/plug_in_cmds.c
	* libgimp/gimpplugin_pdb.[ch]: regenerated.

	* libgimp/gimp.def: changed accordingly.

	* plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts):
	register the menu branches for all included scripts.
2005-03-24 16:08:04 +00:00
Sven Neumann 4314dca031 app/actions/layers-commands.c app/core/core-enums.[ch]
2005-03-24  Sven Neumann  <sven@gimp.org>

	* app/actions/layers-commands.c
	* app/core/core-enums.[ch]
	* app/core/gimpimage-undo-push.[ch]
	* app/pdb/pdb_glue.h: reverted Bill's changes to fix the build.
2005-03-24 10:34:41 +00:00
William Skaggs 72241e5ed2 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/core-enums.[ch]
	* app/core/gimpimage-undo-push.[ch]
	* app/pdb/pdb_glue.h
	* app/actions/layers-commands.c: make layer mask property changes
	undoable, should fix bug #148852.  Note that a little shape-layer
	stuff is in core-enums, will be needed shortly.
2005-03-24 02:16:40 +00:00
William Skaggs 1cc9701bed Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimptransformtool.c
	* app/tools/gimpfliptool.c
	* app/core/gimpdrawabletransform.c: avoid messages and critical
	error when transforming a drawable that does not intersect
	the selection.
2005-03-21 22:47:06 +00:00
Sven Neumann 5d7931db74 changed all transform utilities to modify the passed transform matrix
2005-03-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-utils.[ch]: changed all transform
	utilities to modify the passed transform matrix instead of
	creating a new one.

	* app/text/gimptextlayer-transform.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: changed accordingly.

	* app/pdb/drawable_transform_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
2005-03-21 19:10:11 +00:00
Sven Neumann a8634b2920 added missing period in newly added message.
2005-03-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert.c (gimp_image_convert): added missing
	period in newly added message.

	* app/dialogs/convert-dialog.c (convert_dialog_palette_filter): don't
	show empty palettes (bug #170973).
2005-03-21 10:32:27 +00:00
William Skaggs f76b79ae26 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage-convert.c: check for non-empty palette
	before converting to indexed using custom palette, otherwise
	show warning and abort;	fixes bug #170973.
2005-03-20 20:01:55 +00:00
William Skaggs 65237901af Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage-convert.c: applied patch from Adam
	Moss converning gray->indexed conversion,
	fixes bug #170825.
2005-03-20 18:57:10 +00:00
Sven Neumann a974e4ba79 cosmetic changes.
2005-03-20  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-utils.c (gimp_transform_matrix_perspective):
	cosmetic changes.

	* libgimpmath/gimpmatrix.[ch]
	* libgimpmath/gimpmath.def: added gimp_matrix_is_affine().
2005-03-20 00:09:29 +00:00
Michael Natterer 7cbe447c79 app/core/gimpimage-sample-points.c app/display/gimpdisplayshell-draw.c
2005-03-19  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-sample-points.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell.c
	* app/tools/gimpcolortool.c: make sure sample points always have
	coordinates in the range [0..width/height-1], also added lots of
	+0.5 because they live at the pixels' centers, not at their
	borders. Fixed drawing of sample points at the display borders.
2005-03-19 22:04:31 +00:00
William Skaggs ad47bcffb0 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage-convert.c:  when converting grayscale
	to mono, treat the palette as gray rather than rgb, giving
	more than tenfold speedup.  Fixes bug #170801.
2005-03-18 17:34:34 +00:00
William Skaggs 8d4f8187e7 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpstrokedesc.h
	* app/core/gimpstrokedesc.c (gimp_stroke_desc_duplicate):
	New function, will be needed for shape layers.
2005-03-11 18:03:56 +00:00
Sven Neumann 3285ee6ef5 renamed again, to gimp_palette_[gs]et_columns this time.
2005-03-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette.[ch]: renamed again, to
	gimp_palette_[gs]et_columns this time.

	* app/dialogs/palette-import-dialog.c
	* app/widgets/gimppaletteeditor.c: changed accordingly.

	* tools/pdbgen/pdb/palette.pdb: renamed newly added PDB function.
	Also added a getter for the columns.

	* app/pdb/internal_procs.c
	* app/pdb/palette_cmds.c
	* libgimp/gimppalette_pdb.[ch]: regenerated.

	* libgimp/gimp.def: updated.
2005-03-09 00:50:09 +00:00
Michael Natterer f41e059067 More sample point stuff. Addresses bug #137776.
2005-03-09  Michael Natterer  <mitch@gimp.org>

	More sample point stuff. Addresses bug #137776.

	* app/core/gimpimage-sample-points.c
	* app/core/gimpimage-undo-push.c: append, not prepend the sample
	paints to the image's list because their index matters. Update
	sample points when their index changes.

	* app/display/gimpcanvas.[ch]: added own sytles for the sample
	points.  Added gimp_canvas_draw_text() which uses a PangoLayout
	which is cached in the canvas.

	* app/display/gimpdisplayshell-draw.c
	(gimp_display_shell_draw_sample_point): draw the sample points
	more distinct from guides using the new canvas APIs above.

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_[hv]ruler_button_press): factored out all
	code to

	(gimp_display_shell_ruler_burron_press): which takes a boolean
	"horizontal" variable and allows to add sample points with
	<control>+drag.

	* app/tools/gimpcolortool.[ch]: implement adding, moving and
	removing of sample points in the same way as the move tool moves
	guides.

	* app/tools/gimpcolorpickertool.c
	(gimp_color_picker_tool_oper_update): chain up.
2005-03-09 00:23:19 +00:00
Sven Neumann da9547a8cd fixed brokeness introduced I when eliminating gradient->last_visited.
2005-03-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimpgradient.c (gimp_gradient_segment_split_uniform):
	fixed brokeness introduced I when eliminating gradient->last_visited.
2005-03-08 22:26:12 +00:00
Sven Neumann 243cdf5306 renamed gimp_palette_[gs]et_n_columns to
2005-03-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette.[ch]: renamed gimp_palette_[gs]et_n_columns
	to gimp_palette_[gs]et_num_columns().

	* app/dialogs/palette-import-dialog.c
	* app/widgets/gimppaletteeditor.c: changed accordingly.

	* tools/pdbgen/pdb/palette.pdb: added new PDB function to control
	the number of columns used when displaying a palette (bug #169370).

	* app/pdb/internal_procs.c
	* app/pdb/palette_cmds.c
	* libgimp/gimppalette_pdb.[ch]: regenerated.

	* libgimp/gimp.def: updated.
2005-03-08 14:44:29 +00:00
Michael Natterer be6a9d2a8b app/actions/view-actions.c app/actions/view-commands.[ch]
2005-03-05  Michael Natterer  <mitch@gimp.org>

	* app/actions/view-actions.c
	* app/actions/view-commands.[ch]
	* app/config/gimprc-blurbs.h
	* app/core/core-enums.[ch]
	* app/core/gimp.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-undo-push.[ch]
	* app/core/gimpimage.c
	* app/display/gimpdisplayoptions.[ch]
	* app/display/gimpdisplayshell-appearance.[ch]
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-draw.[ch]
	* app/widgets/gimphelp-ids.h
	* menus/image-menu.xml.in: reordered stuff to be in guides, grid,
	sample points order. Some cleanup and indentation.
2005-03-05 00:10:40 +00:00
William Skaggs c991c48788 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage.c
	* app/display/gimpdisplayoptions.c: re-order code so
	sample-point stuff comes directly after guide stuff.
2005-03-04 18:16:29 +00:00
William Skaggs ea267753f6 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage-sample-points.c
	* app/core/gimpimage-sample-points.h: new files

	* app/actions/view-actions.c
	* app/actions/view-commands.c
	* app/actions/view-commands.h
	* app/config/gimprc-blurbs.h
	* app/core/Makefile.am
	* app/core/core-enums.c
	* app/core/core-enums.h
	* app/core/core-types.h
	* app/core/gimp.c
	* app/core/gimp.h
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpimage-undo-push.h
	* app/core/gimpimage.c
	* app/core/gimpimage.h
	* app/display/gimpdisplayoptions.c
	* app/display/gimpdisplayoptions.h
	* app/display/gimpdisplayshell-appearance.c
	* app/display/gimpdisplayshell-appearance.h
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-draw.h
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpdisplayshell.h
	* app/widgets/gimphelp-ids.h
	* menus/image-menu.xml.in: add support for a list of "sample
	points" in each image, coded and handled very similarly to
	guides, for use mainly in color correction.  See bug #137776.
2005-03-04 16:34:59 +00:00
Michael Natterer c7ca43a647 added VISIBLE and LINKED to the GimpImageResizeLayers enum.
2005-03-01  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]: added VISIBLE and LINKED to the
	GimpImageResizeLayers enum.

	* app/core/gimpimage-resize.c (gimp_image_resize_with_layers):
	changed accordingly. Also looks nicer now.
2005-03-01 20:19:53 +00:00
Sven Neumann d9e6ef3d93 major speedup for dithering code thanks to a suggestion from Jay Cox.
2005-02-28  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-blend.c: major speedup for dithering code
	thanks to a suggestion from Jay Cox.
2005-02-28 21:52:41 +00:00
Sven Neumann 7e6e291e0d improved readability by introducing a macro for the dithering code.
2005-02-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-blend.c: improved readability by
	introducing a macro for the dithering code.
2005-02-27 16:14:33 +00:00
Sven Neumann 7aa3ee2217 fixed rounding errors in the non-dithered case and optimized the dithering
2005-02-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-blend.c: fixed rounding errors in the
	non-dithered case and optimized the dithering code.
2005-02-27 15:47:33 +00:00
Sven Neumann 7f39e41254 improve the threaded performance by using a dedicated RNG per tile.
2005-02-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-blend.c: (hopefully) improve the threaded
	performance by using a dedicated RNG per tile.
2005-02-27 15:06:40 +00:00
Sven Neumann e87c8aa085 app/core/gimpimage-convert-fsdither.h save a kilobyte of data by using
2005-02-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert-fsdither.h
	* app/core/gimpimage-convertc: save a kilobyte of data by using
	guchar for the range array.
2005-02-27 14:03:50 +00:00
Daniel Egger 0add60298a app/base/Makefile.am app/composite/*akefile.am app/config/*akefile.am
2005-02-27  Daniel Egger  <de@axiros.com>

	* app/base/Makefile.am
	* app/composite/*akefile.am
	* app/config/*akefile.am
	* app/core/*akefile.am
	* app/display/*akefile.am
	* app/file/*akefile.am
	* app/paint-funcs/*akefile.am
	* app/pdb/*akefile.am
	* app/plug-in/*akefile.am
	* app/text/*akefile.am
	* app/tools/*akefile.am
	* app/vectors/*akefile.am
	* app/xcf/*akefile.am: Commonized include paths to always look
	in the builddir also to cater for srcdir != builddir builds.
2005-02-27 13:22:01 +00:00
Sven Neumann 8de1e94bb7 removed the "last_visited" field from GimpGradient. Instead added the new
2005-02-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpgradient.[ch]: removed the "last_visited" field
	from GimpGradient. Instead added the new function
	gimp_gradient_get_color_at_segment() that allows the caller to do
	the same optimization.

	* app/actions/gradient-editor-commands.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimppalette-import.c
	* app/paint/gimppaintoptions.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimpviewrenderergradient.c: changed accordingly.

	* app/pdb/gradient_cmds.c
	* app/pdb/gradients_cmds.c: regenerated.
2005-02-26 23:55:50 +00:00
Sven Neumann 52b88c61d2 minor code cleanup.
2005-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-blend.c: minor code cleanup.
2005-02-26 18:36:12 +00:00
Michael Natterer 03182eba8d Allow to resize layers with the image. Fixes bug #87789.
2005-02-24  Michael Natterer  <mitch@gimp.org>

	Allow to resize layers with the image. Fixes bug #87789.

	* app/core/core-enums.[ch]: added enum GimpImageResizeLayers which
	can be one of { NONE, MATCHING, ALL }.

	* app/core/gimpimage-resize.[ch]: added new function
	gimp_image_resize_with_layers().

	* app/dialogs/resize-dialog.[ch]: added a "Layers" frame
	containing a "Resize Layers" combo box offering the choices above.
	Changed GimpResizeCallback signature accordingly.

	* app/actions/image-commands.c
	* app/actions/layers-commands.c: changed accordingly.
2005-02-24 16:39:12 +00:00
Manish Singh 9706fce0a3 Support for custom plug-in interpreters, independent of OS support.
2005-02-20  Manish Singh  <yosh@gimp.org>

        Support for custom plug-in interpreters, independent of OS support.

        * app/core/Makefile.am
        * app/core/core-types.h
        * app/core/gimpinterpreterdb.[ch]: implemented GimpInterpreterDB,
        which handles registering and resolving custom plug-in interpreters.

        * app/core/gimp.[ch]: keep a GimpInterpreterDB around.

        * app/config/gimpcoreconfig.[ch]
        * app/config/gimprc-blurbs.h
        * app/dialogs/preferences-dialog.c
        * app/dialogs/user-install-dialog.c
        * app/widgets/gimphelp-ids.h: interpreter-path config stuff.

        * app/plug-in/plug-in.c: use registered interpreters when running
        plug-ins.

        * themes/Default/images/preferences/Makefile.am
        * themes/Default/images/preferences/folders-interp.png: just copied
        folders-plug-ins.png here, need a better one.

        * data/interpreters/Makefile.am: creates system interpreter directory.

        * data/interpreters/default.interp: sample interpreter file info.

        * data/Makefile.am
        * configure.in: add data/interpreters directory.

        * plug-ins/pygimp/Makefile.am: install pygimp.interp, which configures
        the python interpreter to point to the python we were built with. Also
        register the .py extension.

        * etc/gimprc
        * docs/gimprc.5.in: regenerated
2005-02-21 02:56:29 +00:00
Sven Neumann 1e6a94e614 app/core/gimpgradient-load.c app/core/gimppalette.c app/core/gimppattern.c
2005-02-20  Sven Neumann  <sven@gimp.org>

	* app/core/gimpgradient-load.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/plug-in/plug-in.c
	* libgimpbase/gimputils.c
	* libgimpmodule/gimpmodule.c
	* libgimpwidgets/gimppatheditor.c
	* tools/pdbgen/pdb/image.pdb: use g_filename_display_name() or
	g_filename_display_basename() where appropriate.

	* app/pdb/image_cmds.c: regenerated.
2005-02-20 21:49:53 +00:00
Sven Neumann 17e7e13e58 migrate gimp-2.2 settings if available. Pass the version to
2005-02-20  Sven Neumann  <sven@gimp.org>

	* app/dialogs/user-install-dialog.c: migrate gimp-2.2 settings if
	available. Pass the version to gimp_templates_migrate().

	* app/core/gimp-templates.[ch] (gimp_templates_migrate): if
	migrating templaterc from ~/.gimp-2.0, do a case-insensitive match
	on template names to accommodate for the fact that we changed the
	spelling of some default templates between 2.0 and 2.2.
2005-02-19 23:38:59 +00:00
Hans Breuer c6f63ea4e1 TILE_WIDTH is used unconditionally so always include "tile.h" WIN32 needs
2005-02-19  Hans Breuer  <hans@breuer.org>

	* app/base/pixel-processor.c : TILE_WIDTH is used unconditionally
	so always include "tile.h"
	* app/base/tile-swap.c : WIN32 needs <process.h> for _getpid()

	* app/dialogs/user-install-dialog.c : include gimpwin32-io.h
	* libgimpbase/gimpwin32-io.h : there are no group or other
	flags in msvcrt, define S_IGRP etc in terms of _S_IREAD etc

	* plug-ins/script-fu/script-fu.c plug-ins/script-fu/siod-wrapper.c :
	no script-fu server on win32, make respective function calls conditional

	* libgimpconfig/makefile.msc : new file
	* **/makefile.msc app/gimpcore.def : updated, gimp builds
	and runs once more with ms toolchain
2005-02-19 00:50:36 +00:00
Sven Neumann 52d6f00e56 app/core/Makefile.am new files holding gimp_drawable_convert_rgb() and
2005-02-18  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpdrawable-convert.[ch]: new files holding
	gimp_drawable_convert_rgb() and gimp_drawable_convert_grayscale()
	moved out of gimpimage-convert.[ch].

	* app/core/gimpchannel.c
	* app/core/gimpimage-convert.[ch]
	* app/core/gimplayer.c: changed accordingly.
2005-02-18 16:16:24 +00:00
Sven Neumann 6300a9632c some simple loop unrolling, converted tabs to spaces and sprinkled the
2005-02-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert.c: some simple loop unrolling,
	converted tabs to spaces and sprinkled the code with const
	qualifiers.
2005-02-17 23:31:36 +00:00
Sven Neumann 82a5329fbf added a variant of pixel_regions_process_parallel() that takes a progress
2005-02-16  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-processor.[ch]: added a variant of
	pixel_regions_process_parallel() that takes a progress callback and
	progress data. Does only work for the single-threaded case yet.

	* app/core/gimpdrawable-blend.c (gradient_fill_region): parallelized.
2005-02-16 14:54:56 +00:00
Sven Neumann 784fae02bb parallelized.
2005-02-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-contiguous-region.c
	(gimp_image_contiguous_region_by_color): parallelized.
2005-02-16 00:38:20 +00:00
Sven Neumann 637df82c71 parallelized.
2005-02-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-desaturate.c: parallelized.
2005-02-15 23:53:56 +00:00
Sven Neumann ddf6688fc8 code cleanup.
2005-02-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimplayer.c (gimp_layer_transform_color): code cleanup.
2005-02-15 23:38:59 +00:00
Sven Neumann 51710aa378 changed GimpImageMapApplyFunc to be compatible with PixelProcessorFunc.
2005-02-15  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagemap.[ch]: changed GimpImageMapApplyFunc to
	be compatible with PixelProcessorFunc.

	* app/base/color-balance.[ch]
	* app/base/colorize.[ch]
	* app/base/gimplut.[ch]
	* app/base/hue-saturation.[ch]
	* app/base/threshold.[ch]: removed wrappers that used to
	shift parameters around to match GimpImageMapApplyFunc and
	PixelProcessorFunc signatures.

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c: changed accordingly.

	* tools/pdbgen/pdb/color.pdb: use pixel_region_process_parallel()
	for all color operations.

	* app/pdb/color_cmds.c: regenerated.
2005-02-15 15:39:27 +00:00
Sven Neumann 1cb9714f02 allocate temporary histogram slots on demand and provide an array with
2005-02-14  Sven Neumann  <sven@gimp.org>

	* app/base/gimphistogram.[ch]: allocate temporary histogram slots
	on demand and provide an array with enough slots for the maximum
	number of threads. gimp_histogram_new() doesn't need a
	GimpBaseConfig parameter any longer.

	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-levels.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpthresholdtool.c
	* app/widgets/gimphistogrameditor.c
	* tools/pdbgen/pdb/color.pdb: changed accordingly.

	* app/pdb/color_cmds.c: regenerated.
2005-02-14 01:05:34 +00:00
Sven Neumann 9511753a02 check for gthread-2.0 unless the --disable-mp option is given.
2005-02-13  Sven Neumann  <sven@gimp.org>

	* configure.in: check for gthread-2.0 unless the --disable-mp
	option is given.

	* app/app_procs.c (app_libs_init): call g_thread_init().

	* app/base/pixel-processor.c: ported to GThread.

	* app/Makefile.am
	* app/*/Makefile.am: use @GTHREAD_CFLAGS@.
2005-02-13 15:08:08 +00:00
Sven Neumann 4cf9d0e429 accept an empty string.
2005-02-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprogress.c (gimp_progress_start): accept an empty
	string.

	* app/plug-in/plug-in-progress.c: if NULL is passed as message to
	plug_in_progress_start(), set an empty string on the progress.

	* tools/pdbgen/pdb/progress.pdb:
	* libgimp/gimpprogress.[ch]: wrap the new gimp_progress_set_text()
	PDP function with a function that accepts printf-like arguments.

	* libgimp/gimpprogress_pdb.[ch]: regenerated.

	* lots of plug-ins, most of them file plug-ins:
	use gimp_progress_init(NULL) followed by gimp_progress_set_text()
	to initialize the progress using the new API instead of constructing
	a temporary string.
2005-02-13 00:11:24 +00:00
Michael Natterer fc677ae7b4 added GIMP_PROGRESS_COMMAND_PULSE.
2005-02-12  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimpbaseenums.h (enum GimpProgressCommand):
	added GIMP_PROGRESS_COMMAND_PULSE.

	* libgimpbase/gimpbaseenums.c
	* plug-ins/pygimp/gimpenums.py
	* tools/pdbgen/enums.pl: regenerated.

	* app/core/gimppdbprogress.c: implement GimpProgress::pulse()
	and send a PULSE command to the callback.

	* libgimp/gimpprogress.c: handle PULSE by calling the set_value()
	callback with a value of -1 and document that hack in the API docs.

	* libgimp/gimpprogressbar.c: interpret -1 as request to pulse.
2005-02-12 15:46:31 +00:00
Sven Neumann 7c19953c39 added GimpProgress::pulse.
2005-02-12  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprogress.[ch]: added GimpProgress::pulse.

	* app/display/gimpdisplay.c
	* app/display/gimpstatusbar.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpprogressbox.c
	* app/widgets/gimpprogressdialog.c
	* app/widgets/gimpthumbbox.c: implement it in the classes that
	implement the GimpProgress interface.

	* app/plug-in/plug-in-progress.[ch]: allow plug-ins to pulse their
	progress.

	* tools/pdbgen/pdb/progress.pdb: added a procedure for the new
	functionality.

	* app/pdb/internal_procs.c
	* app/pdb/progress_cmds.c
	* libgimp/gimpprogress_pdb.[ch]: regenerated.

	* libgimp/gimp.def: updated.
2005-02-12 14:18:12 +00:00
Sven Neumann adff5aeb09 code cleanup. Removed unsued code, renamed variables and types.
2005-02-11  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-processor.[ch]: code cleanup. Removed unsued code,
	renamed variables and types.

	* app/base/gimphistogram.c
	* app/core/gimpchannel-combine.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-levels.c
	* app/paint-funcs/paint-funcs.c
	* tools/pdbgen/pdb/color.pdb: changed accordingly.

	* app/pdb/color_cmds.c: regenerated.
2005-02-11 17:03:56 +00:00
Michael Natterer 10583dfe47 app/core/gimpimagefile.c enable explicit (not automatic while browsing the
2005-02-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagefile.c
	* app/widgets/gimpthumbbox.c: enable explicit (not automatic while
	browsing the list of files) thumbnailing of remote files
2005-02-09 00:47:09 +00:00
Sven Neumann 313f7835cb changed "Remote Image" to "Remote File". The state of the thumbnail
2005-02-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c (gimp_imagefile_get_desc_string):
	changed "Remote Image" to "Remote File". The state of the
	thumbnail doesn't tell us if this is an image file at all.

	* app/widgets/gimpthumbbox.c: don't auto-thumbnail remote files.

	* libgimpthumb/gimpthumb-utils.[ch]
	* libgimpthumb/gimpthumbnail.c: do the same workaround for UNC
	paths as in file_utils_filename_from_uri().
2005-02-07 17:29:10 +00:00
Sven Neumann 648cccde5e app/base/base.c app/base/temp-buf.c app/base/tile-swap.c
2005-02-07  Sven Neumann  <sven@gimp.org>

	* app/base/base.c
	* app/base/temp-buf.c
	* app/base/tile-swap.c
	* app/config/gimpconfig-file.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpdata.c
	* app/core/gimpenvirontable.c
	* app/core/gimpgradient-load.c
	* app/core/gimpgradient-save.c
	* app/core/gimppalette-import.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/dialogs/user-install-dialog.c
	* app/gui/session.c
	* app/menus/menus.c
	* app/widgets/gimpdevices.c: use gstdio wrappers.
2005-02-07 01:24:22 +00:00
Sven Neumann 692669f4d8 renamed GIMP_PARAM_ #defines to GIMP_CONFIG_PARAM_.
2005-02-05  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpconfig-params.h: renamed GIMP_PARAM_ #defines
	to GIMP_CONFIG_PARAM_.

	* app/config/gimpbaseconfig.c
	* app/config/gimpconfig-dump.c
	* app/config/gimpcoreconfig.c
	* app/config/gimpdisplayconfig.c
	* app/config/gimpguiconfig.c
	* app/config/gimprc-deserialize.c
	* app/config/gimprc-serialize.c
	* app/config/gimprc.c
	* app/core/gimp.c
	* app/core/gimpstrokedesc.c
	* app/dialogs/preferences-dialog.c
	* app/text/gimptext.c
	* app/tools/gimptextoptions.c
	* libgimpconfig/gimpconfig-deserialize.c
	* libgimpconfig/gimpconfig-iface.c
	* libgimpconfig/gimpconfig-serialize.c
	* libgimpconfig/gimpconfig-utils.c: changed accordingly.

	* libgimpmodule/gimpmoduletypes.h: deprecate the
	GIMP_MODULE_PARAM_SERIALIZE #define, GIMP_CONFIG_PARAM_SERIALIZE
	should be used instead.

	* modules/controller_linux_input.c
	* modules/controller_midi.c: changed accordingly.
2005-02-05 14:52:58 +00:00
Sven Neumann 5b75565650 fixed handling of pixel region that broke with my latest change. Fixes bug
2005-02-03  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_do): fixed handling of
	pixel region that broke with my latest change. Fixes bug #166126.
2005-02-03 16:09:47 +00:00
Michael Natterer b93dd20b21 removed this function.
2005-02-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-utils.[ch] (gimp_check_glib_version): removed this
	function.

	* app/sanity.c (sanity_check_glib): use glib_check_version()
	instead and set required version to 2.6.0.
2005-02-02 22:35:13 +00:00
Michael Natterer b62b9b42bf relax/rigor the floating selection around the convert operations so color
2005-02-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-convert.c (gimp_image_convert): relax/rigor
	the floating selection around the convert operations so color
	analysis for indexed conversion works on the floating selection's
	drawable original pixels, and not on the composited one.
	Fixes bug #165342.
2005-02-02 22:01:21 +00:00
Sven Neumann 1e3db9e0c1 tiny optimization based on a patch by Bill Skaggs. Process up to 16 tiles
2005-02-01  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_do): tiny optimization
	based on a patch by Bill Skaggs. Process up to 16 tiles in one go
	before updating the display.
2005-02-01 11:24:28 +00:00
Sven Neumann 843490a152 formatting.
2005-01-30  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagemap.c: formatting.
2005-01-30 16:50:52 +00:00
Sven Neumann c4a8618db9 changed default grid distance to 32 as suggested in bug #165367.
2005-01-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpgrid.c: changed default grid distance to 32 as
	suggested in bug #165367.
2005-01-27 17:01:45 +00:00
William Skaggs 1cee9b7298 continuing commit after broken pipe 2005-01-25 19:11:26 +00:00
Sven Neumann 73c055bb52 app/config/Makefile.am app/config/gimpconfig-file.[ch] more new files,
2005-01-24  Sven Neumann  <sven@gimp.org>

	* app/config/Makefile.am
	* app/config/gimpconfig-file.[ch]
	* app/config/gimprc-utils.[ch]: more new files, code factored out
	of gimpconfig-utils.[ch].

	* app/config/gimpconfig-path.[ch]
	* app/config/gimpconfig-utils.[ch]
	* app/config/gimpcoreconfig.c
	* app/config/gimpguiconfig.c
	* app/config/gimppluginconfig.c
	* app/config/gimprc.c
	* app/core/gimp-units.c
	* app/dialogs/user-install-dialog.c
	* app/gui/session.c: changed accordingly.
2005-01-24 22:41:24 +00:00
Sven Neumann 0aa9015522 app/core/core-enums.h moved enums to libgimpbase (from app/core and
2005-01-23  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.h
	* libgimpbase/gimpbaseenums.h: moved enums to libgimpbase (from
	app/core and libgimp). The remaining enums in app/core/core-enums.h
	need special treatment.

	* app/core/core-enums.c:
	* libgimp/gimpenums.h
	* libgimpbase/gimpbaseenums.c
	* tools/pdbgen/enums.pl: regenerated.

	* libgimpbase/gimpbase.def
	* libgimp/gimp.def: updated.
2005-01-22 23:38:36 +00:00
William Skaggs c9926ee18e Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/config/gimpconfig-types.c
	* app/config/gimpconfig-types.h: removed...

	* libgimpbase/gimpbasetypes.c
	* libgimpbase/gimpbasetypes.h: and contents merged
	into here.

	* app/config/gimpconfig-params.c: removed...

	* libgimpbase/gimpbaseparams.c
	* libgimpcolor/gimprgb.c
	* libgimpmath/gimpmatrix.c: and contents merged
	into here.

	* app/config/gimpconfig-params.h: part removed...

	* libgimpbase/gimpbaseparams.h
	* libgimpcolor/gimprgb.h
	* libgimpmath/gimpmatrix.h: and merged into here

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase.h
	* libgimpcolor/gimpbilinear.c
	* libgimpcolor/gimpcmyk.c
	* libgimpmath/gimpvector.c
	* app/config/Makefile.am
	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-dump.c
	* app/config/gimpconfig-serialize.c
	* app/config/gimpcoreconfig.c
	* app/config/gimpguiconfig.c
	* app/config/gimppluginconfig.c
	* app/core/gimp-utils.c
	* app/core/gimpcontext.c
	* app/tools/tools-utils.c
	* app/widgets/gimpaction.c
	* plug-ins/gimpressionist/utils.c: dependencies changed
	accordingly.

	First step in config migration out of core.  Need to fix
	devel-docs to reflect these changes.
2005-01-22 00:42:40 +00:00
Sven Neumann f6801672a8 applied a patch from Geert Jordaens that seems to fix drawable
2005-01-21  Sven Neumann  <sven@gimp.org>

        * app/core/gimpdrawable-transform.c: applied a patch from Geert
        Jordaens that seems to fix drawable transformation using the new
        Lanczos interpolation routine :)
2005-01-21 13:41:07 +00:00
Sven Neumann 2d3db58303 applied a patch from Geert Jordaens that fixes the crash in the drawable
2005-01-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-transform.c: applied a patch from Geert
	Jordaens that fixes the crash in the drawable transformations
	using the Lanczos interpolation type. The result is somewhat wrong
	though :(
2005-01-19 10:22:19 +00:00
Michael Natterer 7e5290a019 use gimp_config_writer_data() to write the parasite data because it's
2005-01-18  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparasitelist.c (parasite_serialize): use
	gimp_config_writer_data() to write the parasite data because
	it's binary and can contain '\0'.

	(gimp_parasite_list_deserialize): use gimp_scanner_parse_data() to
	read it. Still accepts the old file format for backward
	compatibility. Fixes bug #163131.
2005-01-18 20:47:10 +00:00
Michael Natterer db89496a11 implement GimpItem::convert(). Handles any drawable, including conversion
2005-01-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.c: implement GimpItem::convert(). Handles
	any drawable, including conversion to GRAY, flattening and
	resizing.

	* app/widgets/gimpchanneltreeview.c: implement dropping of all
	kinds of drawables as new channels. Fixes bug #158133.

	Simplified component dropping by removing stuff which is done by
	gimp_item_convert() now.
2005-01-15 21:15:43 +00:00
Sven Neumann f7234cc616 app/core/gimpdrawable-transform.c minor cleanups to the new Lanczos
2005-01-15  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-transform.c
	* app/paint-funcs/scale-funcs.c: minor cleanups to the new Lanczos
	interpolation routines. Drawable transformations do still crash :(
2005-01-15 20:46:21 +00:00
Michael Natterer e5c0d8eb0e app/core/gimpitem.c app/core/gimpdrawable.c made GimpItem::scale() and
2005-01-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.c
	* app/core/gimpdrawable.c
	* app/vectors/gimpvectors.c: made GimpItem::scale() and ::resize()
	work on unattached items.

	* app/widgets/gimplayertreeview.c
	(gimp_layer_tree_view_drop_component): fix drop index.

	* app/widgets/gimpchanneltreeview.c: implement dropping of
	components as new channels. Fixes bug #158483.
2005-01-15 19:17:11 +00:00
Michael Natterer d0a78f3bdb don't require a non-NULL color parameter (just leave the default color
2005-01-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.c (gimp_channel_new*): don't require a
	non-NULL color parameter (just leave the default color untouched
	if NULL is passed).

	* app/actions/channels-commands.c
	* app/core/gimpchannel-select.c: pass NULL as color for temporary
	channels or channels where we used to pass black.
2005-01-15 16:59:34 +00:00
Michael Natterer d4177c88ce added GIMP_UNDO_INK.
2005-01-14  Michael Natterer  <mitch@gimp.org>

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

	* app/paint/gimppaintcore.[ch]: added virtual function
	GimpPaintCore::push_undo() and call it.

	* app/paint/gimppaintcore-undo.[ch]: made it the default
	implementation.

	* app/paint/gimpink-blob.[ch]: added blob_duplicate().

	* app/paint/gimpink.[ch]: added a "start_blob" (just like
	GimpPaintCore::start_coords) which gets set whenever we start a
	new stroke or line. Removed ink->lastx and ink->lasty because
	they are the same as paint_core->last_coords.

	* app/paint/Makefile.am
	* app/paint/gimpink-undo.[ch]: new files implementing an
	undo step for ink which restores the last blob used along
	with the whole ink state. Fixes bug #163670.
2005-01-14 20:13:54 +00:00
Michael Natterer 4e942377e6 Splitting GimpItem::convert() into two virtual functions was apparently
2005-01-13  Michael Natterer  <mitch@gimp.org>

	Splitting GimpItem::convert() into two virtual functions was
	apparently buggy over-engineering. Reverted that stuff and
	implement item conversion much simpler:

	* app/core/gimpitem.[ch]: have a single virtual function,
	GimpItem::convert(), which takes a newly duplicated item and the
	destination image.

	(gimp_item_convert): simply call GimpItem::convert() on the result
	of gimp_item_duplicate().

	(gimp_item_real_convert): set the item's new image.

	* app/core/gimplayer.c (gimp_layer_convert)
	* app/vectors/gimpvectors.c (gimp_vectors_convert): changed
	accordingly and chain up after, not before doing our own stuff
	so the old image is still available as item->image for stuff
	like colormap conversion. Fixes bug #163879.
2005-01-13 18:17:24 +00:00
Sven Neumann 857279479e app/units.c app/core/gimp-units.c app/core/gimp.c added a utility function
2005-01-13  Sven Neumann  <sven@gimp.org>

	* app/units.c
	* app/core/gimp-units.c
	* app/core/gimp.c
	* app/core/gimpunit.[ch]: added a utility function that frees the
	memory allocated for user units. Minor cleanups.
2005-01-13 13:08:00 +00:00
Sven Neumann f3166ba9f9 app/base/base-enums.[ch] app/core/gimpdrawable-transform.c
2005-01-11  Sven Neumann  <neumann@jpk.com>

	* app/base/base-enums.[ch]
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/paint-funcs/Makefile.am
	* app/paint-funcs/paint-funcs.[ch]
	* app/paint-funcs/scale-funcs.[ch]: applied patch by Geert Jordaens
	(after a good deal of reformatting for coding style compliance).
	This factors the scale routines into their own file and adds a
	sinc-based (Lanczos) interpolation routine (bug #162250).
2005-01-11 18:31:07 +00:00
Michael Natterer 2cd34bf12d moved variables to local scopes, assign the snapped coords unconditionally
2005-01-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-snap.c: moved variables to local scopes,
	assign the snapped coords unconditionally (also if we don't snap),
	cleanup.

	(gimp_image_snap_rectangle): entirely rewritten to use local
	mindist_x, mindist_y variables instead of fiddling with lots of
	boolean variables. Implemented vectors snapping as if the required
	GimpStroke functions existed (#defined them). Simon, your turn :)
2005-01-07 19:50:01 +00:00
Michael Natterer 150bea1e80 Implemented "Snap to Canvas Edges" (fixes bug #152971) and "Snap to Active
2005-01-03  Michael Natterer  <mitch@gimp.org>

	Implemented "Snap to Canvas Edges" (fixes bug #152971) and
	"Snap to Active Path" (half way done):

	* app/core/gimpimage-snap.[ch]: added boolean snap_to_canvas and
	snap_to_vectors parameters (snap_to_vectors works fine when
	snapping to a point, but is unimplemented for snapping to a
	rectangle).

	* app/display/gimpdisplayshell.[ch] (struct GimpDisplayShell):
	added snap_to_canvas and snap_to_vectors booleans.

	* app/display/gimpdisplayshell-appearance.[ch]: added API to
	get/set them.

	* app/actions/view-actions.c
	* app/actions/view-commands.[ch]
	* app/widgets/gimphelp-ids.h: added actions, callbacks and help IDs.

	* menus/image-menu.xml.in: added them to Image->View.
2005-01-03 16:19:10 +00:00
Michael Natterer e5feab6519 removed the just added gimp_palette_insert_entry() and added a "gint
2004-12-31  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppalette.[ch]: removed the just added
	gimp_palette_insert_entry() and added a "gint position" parameter
	to gimp_palette_add_entry() instead (no need to have two almost
	identical functions).

	* app/actions/palette-editor-commands.c
	* app/core/gimppalette-import.c
	* app/widgets/gimppaletteeditor.c
	* tools/pdbgen/pdb/palette.pdb: changed accordingly.

	* app/pdb/palette_cmds.c: regenerated.
2004-12-31 17:27:57 +00:00
Michael Natterer e0f25134ca Applied modified patch from Ben Campbell which adds drop coordinates to
2004-12-31  Michael Natterer  <mitch@gimp.org>

	Applied modified patch from Ben Campbell which adds drop
	coordinates to the color drop callback and uses it to insert
	colors in the palette editor. Extended the patch to add drop
	coordinates to all drop callbacks.

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

	* app/display/gimpdisplayshell-dnd.[ch]: added drop coordinates
	to all drop callbacks.

	* app/dialogs/palette-import-dialog.c
	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcontainerview.c
	* app/widgets/gimpdnd.[ch]
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimpfgbgeditor.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimppropwidgets.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimptoolbox-image-area.c
	* app/widgets/gimptoolbox-indicator-area.c
	* app/widgets/gimptooloptionseditor.c
	* libgimpwidgets/gimpcolorselect.c: changed accordingly. The passed
	drop coordiantes are so far unused.

	* app/widgets/gimppaletteeditor.c: use the drop coordinates to
	insert the new color into the palette at the right place instead
	of always appending. Fixes bug #150030.
2004-12-31 14:36:30 +00:00
Michael Natterer a46c649956 new utility function instead of code duplication.
2004-12-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-edit.c (gimp_edit_set_buffer): new utility
	function instead of code duplication.
2004-12-28 22:42:04 +00:00
William Skaggs 15fb7b6f18 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpbrush.c: don't ask for preview with
	zero width or height, fixes bug #162232.

	* app/base/brush-scale.c: remove tabs and trailing
	whitespace.
2004-12-26 18:18:17 +00:00
William Skaggs 59e86d02fb Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/actions/documents-commands.c
	* app/actions/file-commands.c
	* app/dialogs/file-open-dialog.c
	* app/dialogs/file-open-location-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c: replace % with space
	in file name before showing error message,
	fixes bug #162147.

	* app/core/gimp-gui.c
	* app/widgets/gimpmessagebox.c: be a bit more paranoid
	about validating utf8 for messages.
2004-12-24 19:11:30 +00:00
Michael Natterer 0527989edf Item conversion depends on the old *and* the new item type, so it can't
2004-12-23  Michael Natterer  <mitch@gimp.org>

	Item conversion depends on the old *and* the new item type, so
	it can't live in the old item's vtable only:

	* app/core/gimpitem.[ch]: split GimpItem::convert() into
	GimpItem::convert_from() (which is called on the old item and
	creates the new item) and GimpItem::convert_to() (which is called
	on the new item). This way functions from the old *and* new items'
	vtables are called and it's possible to convert between item types
	which live on different branches of the class hierarchy or to item
	types which live further down the class tree than the old item.

	(gimp_item_convert): call ::convert_to() on the new item created
	by ::convert_from().

	* app/vectors/gimpvectors.c: changed ::convert() implementation
	to ::convert_from().

	* app/core/gimplayer.c: changed ::convert() to ::convert_to().
	Fixes bug #161877.
2004-12-23 11:53:14 +00:00
William Skaggs 372be1f83a Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpgradient-load.c: reject .ggr files whose
	segments don't properly span the range 0-1.
	Fixes bug #161430.
2004-12-16 22:59:27 +00:00
Michael Natterer 37226e50d6 added utility function gimp_drawable_preview_bytes() and use it. Some
2004-12-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-preview.[ch]: added utility function
	gimp_drawable_preview_bytes() and use it. Some cleanup,
	untabified.

	* app/widgets/gimpviewrendererdrawable.c: use
	gimp_drawable_preview_bytes() instead of duplicating its code.
2004-12-15 14:40:52 +00:00
Michael Natterer 1a752a6d54 Sven Neumann <sven@gimp.org>
2004-12-15  Michael Natterer  <mitch@gimp.org>
	    Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-preview.c (gimp_drawable_preview_scale):
	fixed RGBA resampling by using premultiplied values for the
	intermediate accumulation buffer. Fixes bugs #72880 and #72881.
2004-12-15 01:36:22 +00:00
Sven Neumann 677fc5cc7e applied patch from Adam D. Moss with more fixed dither improvements (bug
2004-12-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-convert.c: applied patch from Adam D. Moss with
	more fixed dither improvements (bug #161123).
2004-12-13 00:30:15 +00:00
Michael Natterer 2e263a8cc0 added precondition check for the coords of the src area. Some cleanup and
2004-12-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-preview.c (gimp_drawable_get_sub_preview):
	added precondition check for the coords of the src area. Some
	cleanup and simplification.

	* app/widgets/gimpviewrendererdrawable.c
	(gimp_view_renderer_drawable_render): don't request sub-previews
	of areas outside the drawable and don't reuqest previews of zero
	width or height. Fixes crashes with the new preview code.
2004-12-12 22:52:00 +00:00
Sven Neumann a6e1e72fe4 Applied patch from Adam D. Moss (bug #161113):
2004-12-12  Sven Neumann  <sven@gimp.org>

	Applied patch from Adam D. Moss (bug #161113):

	* app/core/gimpimage-convert.c: Use a slower but much nicer
	technique for finding the two best colours to dither between when
	using fixed/positional dither methods.  Makes positional dither
	much less lame.
2004-12-12 22:09:22 +00:00
Michael Natterer 53c3ff1821 added new function copy_region_nocow() as a workaround for the fact that
2004-12-12  Michael Natterer  <mitch@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]: added new function
	copy_region_nocow() as a workaround for the fact that sharing
	tiles with the projection is heavily broken.

	* app/base/tile-manager.c (tile_invalidate): added a warning when
	entering the code path that breaks badly.

	* app/core/gimp-edit.[ch]: added gimp_edit_copy_visible(), using
	the non-COW copying function above.

	* app/widgets/gimphelp-ids.h: added GIMP_HELP_COPY_VISIBLE.

	* app/actions/edit-actions.c
	* app/actions/edit-commands.[ch]: added action & callback for
	"edit-copy-visible".

	* menus/image-menu.xml.in: added "edit-copy-visible" to the image
	menu.

	* tools/pdbgen/pdb/edit.pdb: added gimp_edit_copy_visible()
	PDB wrapper.

	* app/pdb/edit_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimpedit_pdb.[ch]: regenerated.

	* plug-ins/script-fu/scripts/copy-visible.scm: removed all code
	and made it a backward compat wrapper around gimp-edit-copy-visible.
	Fixes bug #138662.
2004-12-12 14:01:08 +00:00
Michael Natterer 4bdedaf105 implement it using gimp_drawable_get_sub_preview(). Removes massive code
2004-12-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-preview.c (gimp_drawable_preview_private):
	implement it using gimp_drawable_get_sub_preview(). Removes
	massive code duplication introduced by yesterday's fix.
2004-12-11 21:03:52 +00:00
Michael Natterer 4714802aff added new function gimp_drawable_get_sub_preview() which returns a scaled
2004-12-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-preview.[ch]: added new function
	gimp_drawable_get_sub_preview() which returns a scaled preview of
	a part of a drawable.

	(gimp_drawable_preview_scale): made it work with srcPR.x and
	srcPR.y being != 0.

	* app/core/gimpimage-preview.c (gimp_image_get_new_preview)
	* app/widgets/gimpviewrendererdrawable.c
	(gimp_view_renderer_drawable_render): if the area of the drawable
	preview is more than 4 times larger than the drawable itself (evil
	heuristic, but seems to work fine), use above function to get a
	sub-preview of the drawable instead of getting an insanely large
	preview of the whole drawable just to use a small part of it.
	Fixes bug #142074.

	* app/core/gimpimage-preview.c (gimp_image_get_new_preview):
	optimized by skipping layers which do not intersect with the
	canvas.
2004-12-11 01:22:58 +00:00
William Skaggs 791dc60f8f Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/widgets/gimphistogrameditor.c: make histogram editor,
	and therefore histogram dialog, use the selection.  Should
	resolve bug #72959.

	* app/core/gimpdrawable-histogram.h: remove trailing
	whitespace.
2004-12-10 23:07:21 +00:00
William Skaggs 60655d8e7a Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpbrushpipe.c (gimp_brush_pipe_select_brush):
	Don't initialize a new random number generator every time a brush
	is selected from a pipe.  Fixes bug #148205).
2004-12-09 21:34:48 +00:00
Sven Neumann 6f73b3e58c applied patch from Joao S. O. Bueno that fixes bug #160339.
2004-12-05  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-utils.c (gimp_transform_matrix_flip_free):
	applied patch from Joao S. O. Bueno that fixes bug #160339.
2004-12-05 19:59:01 +00:00
Michael Natterer a708b85b8b when removing the floating selection, call
2004-12-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-undo-push.c (undo_pop_layer): when removing
	the floating selection, call gimp_drawable_invalidate_boundary()
	*before* setting gimage->floating_sel to NULL because otherwise
	gimp_display_shell_selection_invis() won't clear the correct
	selection bounds and leave garbage on screen. Fixes bug #160247.
2004-12-03 13:39:50 +00:00
Sven Neumann 3e56a07190 don't add documents w/o a name to the list. Fixes bug #159510.
2004-11-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdocumentlist.c (gimp_document_list_deserialize):
	don't add documents w/o a name to the list. Fixes bug #159510.

	* app/core/gimpdrawable.c (gimp_drawable_resize): extended the
	check to take the offsets into account as well.
2004-11-26 14:45:10 +00:00
Sven Neumann 7eed9323db app/core/gimp-templates.[ch] merge the migrated user templaterc with the
2004-11-23  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-templates.[ch]
	* app/dialogs/user-install-dialog.c: merge the migrated user
	templaterc with the system templaterc so the users who have used
	gimp-2.0 before get our changes to the default templates.
2004-11-23 21:00:15 +00:00
Michael Natterer bd57700685 cosmetics, untabified.
2004-11-23  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparasitelist.c: cosmetics, untabified.

	* libgimpbase/gimpparasiteio.[ch]: added g_return_if_fail()'s
	to all functions.

	(gimp_pixpipe_params_parse): changed "gchar*" param to "const
	gchar*" (sortof API change, but these files are most probably only
	used by GIMP itself). Still uses strtok() on the internal copy,
	but at least not on the passed string.

	* plug-ins/common/csource.c
	* plug-ins/common/gif.c
	* plug-ins/common/gih.c
	* plug-ins/common/jpeg.c
	* plug-ins/common/png.c
	* plug-ins/common/tiff.c: use parasite getters instead of
	accessing the scruct members directly. Always use g_strndup()
	instead of just g_strdup() to get strings stored in parasites
	because there is no guarantee that they are nul-terminated.
2004-11-23 14:28:43 +00:00
Sven Neumann f653295e5d do nothing if the size doesn't change. This keeps text layers from being
2004-11-23  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.c (gimp_drawable_resize): do nothing if
	the size doesn't change. This keeps text layers from being
	modified when an image is cropped and the layer is entirely inside
	the cropped area.

	* menus/image-menu.xml.in: put the Quit item back for now. We
	should think about this again in the next development cycle.
2004-11-23 09:32:54 +00:00
Hans Breuer 696663a611 [new file] app/dialogs/Makefile.am : added to EXTRA_DIST
2004-09-21  Hans Breuer  <hans@breuer.org>

	* app/dialogs/makefile.msc : [new file]
	  app/dialogs/Makefile.am : added to EXTRA_DIST

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

	* app/gimp.rc : let wilber be first

	* app/widgets/gimppropwidgets.c : msvc6 can't cast uint64 either

	* libgimpbase/gimpwin32-io.h : make up recent loss of ftruncate in GLib

	* libgimpthumbnail/gimpthumbnail.c : <process.h> for getpid() on win32

	* plug-ins/helpbrowser/dialog.c : include gimpwin32-io.h

	* plug-ins/script-fu/siodwrapper.c plug-ins/script-fu/scrip-fu.c : there
	is no script-fu-server on win32
2004-11-21 14:22:45 +00:00
Michael Natterer ebf18dce39 tools/pdbgen/lib.pl added support for deprecated procedures without any
2004-11-19  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/lib.pl
	* tools/pdbgen/stddefs.pdb: added support for deprecated procedures
	without any replacement.

	* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): added
	a special warning for procedures without replacement.

	* tools/pdbgen/pdb/drawable.pdb: deprecated drawable_set_image()
	without any replacement and made it a nop (which fails if the
	passed image is different from the drawable's image). It's not
	needed any longer since 2.0 and moreover dangerous to use.

	* app/pdb/drawable_cmds.c
	* libgimp/gimpdrawable_pdb.[ch]: regenerated.

	* app/core/gimpitem.c (gimp_item_set_image): replaced assertion
	for gimp_item_is_floating() by !gimp_item_is_attached(). The
	former warned when adding a layer with already added mask to the
	image (which is a perfectly valid operation).
2004-11-19 12:38:34 +00:00
Michael Natterer d871be74bf Made plug-in menu registration work the same way for ordinary and
2004-11-17  Michael Natterer  <mitch@gimp.org>

	Made plug-in menu registration work the same way for ordinary and
	temporary procedures. Addresses bug #158117.

	* app/core/gimp-gui.[ch]: added "const gchar *menu_path" to
	gimp_menus_create_entry().

	* app/gui/gui-vtable.c (gui_menus_create_entry): if menu_path is
	NULL, behave as before and create an action and its menu entries
	for all the procedure's menu_paths. If it is non-NULL, skip action
	creation and create a menu entry just for that path.

	* app/plug-in/plug-ins.c (plug_ins_temp_proc_def_add): call
	gimp_menus_create_entry() with a NULL menu path and call it if
	proc_def->menu_paths *or* proc_def->menu_label is non-NULL, so
	it creates at least the procedure's action, even if it has
	no menu_path (yet).

	* tools/pdbgen/pdb/plug_in.pdb (plugin_menu_register): check both
	the list of procs and temp_procs when trying to register the
	entry.  Allow ordinary procedures and extensions to install stuff
	at query() and init() time and allow temp_procs to install stuff
	at any time.

	* app/pdb/plug_in_cmds.c: regenerated.
2004-11-17 14:51:50 +00:00
Michael Natterer c0d9179492 removed redundant "gimage" parameter.
2004-11-16  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem-linked.[ch] (gimp_item_linked_get_list):
	removed redundant "gimage" parameter.

	* app/tools/gimpeditselectiontool.c: changed accordingly.
2004-11-16 13:52:04 +00:00
Michael Natterer 0d5df41904 app/core/gimpchannel-select.c app/core/gimpchannel.c
2004-11-16  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel-select.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-histogram.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-levels.c
	* app/core/gimpdrawable-offset.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/core/gimpitem-linked.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/paint/gimppaintcore-stroke.c
	* app/text/gimptextlayer.c: in all functions which somehow
	(explicitely or implicitely) touch undo, either g_return_if_fail()
	on gimp_item_is_attached() or simply don't push an undo step if
	feasible (e.g. for simple stuff like layer opacity).

	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paint_tools.pdb: let PDB wrappers fail
	accordingly so they don't run into the assertions added above.

	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/paint_tools_cmds.c: regenerated.
2004-11-16 13:41:55 +00:00
Sven Neumann c10b2c10b1 applied a (slightly modified) patch from Nickolay V. Shmyrev that changes
2004-11-14  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-import.c: applied a (slightly modified)
	patch from Nickolay V. Shmyrev that changes the palette import
	function to not only read palettes in the RIFF format but also
	GIMP and Photoshop ACT palette files (bug #158297).
2004-11-14 20:15:05 +00:00
Manish Singh 5d01581069 Fix a bunch of warnings from Sparse:
2004-11-13  Manish Singh  <yosh@gimp.org>

        Fix a bunch of warnings from Sparse:

        * app/actions/dockable-commands.c
        * app/actions/layers-actions.c
        * app/actions/view-commands.c
        * app/base/pixel-surround.c
        * app/config/gimpconfig-utils.c
        * app/config/gimpscanner.c
        * app/core/gimpbrushgenerated.c
        * app/core/gimpcontainer.c
        * app/core/gimpimage.c
        * app/dialogs/palette-import-dialog.c
        * app/file/gimprecentlist.c
        * app/plug-in/plug-in-params.c
        * app/text/gimptext-compat.c
        * app/text/gimptext-parasite.c
        * app/vectors/gimpbezierstroke.c
        * app/vectors/gimpstroke.c
        * app/widgets/gimpcellrendereraccel.c
        * app/widgets/gimpselectiondata.c
        * app/xcf/xcf.c
        * libgimp/gimp.c
        * libgimpthumb/gimpthumb-utils.c
        * libgimpthumb/gimpthumbnail.c
        * modules/cdisplay_proof.c
        * plug-ins/Lighting/lighting_ui.c
        * plug-ins/common/csource.c
        * plug-ins/common/glasstile.c
        * plug-ins/common/nova.c
        * plug-ins/common/pcx.c
        * plug-ins/common/pnm.c
        * plug-ins/common/randomize.c
        * plug-ins/common/screenshot.c
        * plug-ins/common/sel_gauss.c
        * plug-ins/common/spheredesigner.c
        * plug-ins/common/wind.c
        * plug-ins/gfig/gfig-dialog.c
        * plug-ins/gfig/gfig-dobject.c
        * plug-ins/gimpressionist/gimpressionist.c
        * plug-ins/ifscompose/ifscompose.c
        * plug-ins/print/gimp_main_window.c
        * plug-ins/print/print.c: Cleanup integer vs. pointer confusion.

        * app/base/temp-buf.c
        * app/dialogs/about-dialog.c
        * plug-ins/common/bumpmap.c
        * plug-ins/common/jigsaw.c
        * plug-ins/gfig/gfig-dobject.c: Cosmetic cleanups.

        * app/config/gimpconfig-deserialize.c
        * app/config/gimpconfig-path.c
        * app/config/gimpconfigwriter.c
        * app/core/gimpgradient.c
        * app/tools/gimpdrawtool.c
        * plug-ins/common/nlfilt.c
        * plug-ins/common/unsharp.c
        * plug-ins/common/zealouscrop.c: Define inline functions before they
        are used.

        * app/core/gimpdrawable-blend.c: PixelRegion definition was changed
        some time ago, but the initialization here didn't change. Fix it.

        * app/plug-in/plug-in-rc.c (plug_in_extra_deserialize): No need to
        assign token twice in a row.

        * libgimpbase/gimpdatafiles.c (gimp_datafiles_read_directories): No
        need to initialize file_data, since the code fills out all the fields.

        * plug-ins/common/CML_explorer.c
        * plug-ins/common/vpropagate.c: Declare function pointers fully.

        * plug-ins/common/grid.c (pix_composite): G_INLINE_FUNC isn't needed,
        we assume we can use the "inline" keyword always.

        * plug-ins/common/psd_save.c
        * plug-ins/common/vinvert.c
        * plug-ins/gfig/gfig-arc.c
        * plug-ins/gfig/gfig-bezier.c
        * plug-ins/gfig/gfig-circle.c
        * plug-ins/gfig/gfig-dialog.c
        * plug-ins/gfig/gfig-dobject.c
        * plug-ins/gfig/gfig-ellipse.c
        * plug-ins/gfig/gfig-line.c
        * plug-ins/gfig/gfig-poly.c
        * plug-ins/gfig/gfig-spiral.c
        * plug-ins/gfig/gfig-star.c
        * plug-ins/gfig/gfig.c
        * plug-ins/gimpressionist/orientmap.c
        * plug-ins/gimpressionist/placement.c
        * plug-ins/gimpressionist/sizemap.c
        * plug-ins/imagemap/imap_grid.c
        * plug-ins/imagemap/imap_main.c
        * plug-ins/imagemap/imap_preferences.c
        * plug-ins/imagemap/imap_settings.c
        * plug-ins/maze/maze.c
        * plug-ins/sel2path/curve.c
        * plug-ins/sel2path/fit.c
        * plug-ins/sel2path/pxl-outline.c
        * plug-ins/sel2path/spline.c
        * plug-ins/xjt/xjt.c: Functions with no args should be declared
        with (void).

        * plug-ins/common/retinex.c (MSRCR): Initialize max_preview to quiet
        the compiler.
2004-11-14 02:50:33 +00:00
Sven Neumann 5a3b3fff70 app/core/gimpimagefile.[ch] app/file/file-open.c pass the MIME type from
2004-11-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.[ch]
	* app/file/file-open.c
	* app/file/file-save.c: pass the MIME type from the save procedure
	to gimp_imagefile_save_thumbnail() so that it can be stored with
	the thumbnail.

	* tools/pdbgen/pdb/fileops.pdb
	* app/pdb/fileops_cmds.c: changed accordingly.
2004-11-13 17:13:21 +00:00
Sven Neumann b62ca985aa app/plug-in/plug-in-proc-def.[ch] app/plug-in/plug-in-rc.c allow to
2004-11-13  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-in-proc-def.[ch]
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-ins.[ch]: allow to associate a procedure for
	thumbnail loading with any file load procedure.

	* tools/pdbgen/pdb/fileops.pdb: export this functionality to the
	PDB as gimp_register_thumbnail_loader().

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

	* app/core/gimpimagefile.c
	* app/file/file-open.[ch]: when creating a thumbnail for an image
	file, use a thumbnail load procedure if available.

	* plug-ins/common/svg.c: added "file_svg_load_thumb", a procedure
	that allows to load a small preview of the SVG image.
2004-11-13 17:06:06 +00:00
Simon Budig 7945dc7a4b Return the active layer instead of the bottom layer when just merging down
2004-11-13  Simon Budig  <simon@gimp.org>

	* app/core/gimpimage-merge.c: Return the active layer instead of
	the bottom layer when just merging down a floating selection.
	Untabbified.

	Fixes bug #158130.
2004-11-13 01:59:16 +00:00
Michael Natterer b7e8659ac3 disallow non-attached items to be pushed to the undo stack.
2004-11-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-undo-push.c: disallow non-attached items
	to be pushed to the undo stack.
2004-11-12 10:56:23 +00:00
Michael Natterer f6e5ecb2e0 app/core/gimp-edit.c app/core/gimpdrawable-blend.c
2004-11-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-edit.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpitem.c (gimp_item_stroke): added precondition
	checks for gimp_item_is_attached() and removed checks for
	gimp_item_get_image() to actually return an image (because it
	always returns an image).

	* tools/pdbgen/pdb/edit.pdb: let all wrappers fail if the drawable
	is not attached.

	* app/pdb/edit_cmds.c: regenerated.
2004-11-11 14:05:34 +00:00
jaycox 5b5823ba4b Skip resources with unknown signatures instead of quiting. Fixes bug
* plug-ins/common/psd.c: Skip resources with unknown signatures
	instead of quiting.  Fixes bug #142468, and bug #152728

	* app/core/gimpdrawable.c: in functions gimp_drawable_mask_bounds,
	and gimp_drawable_mask_intersect: reinitialize the return values
	after calling gimp_channel_bounds because gimp_channel_bounds
	overwrites the values even when it returns false.  This fixes the
	bug where the gimp crashes when running color tools on layers
	smaller than the image, and processes only part of the image when
	the layer is larger than the image size.
2004-11-10 08:23:05 +00:00
Sven Neumann 66de1a73dc initialize the return values before checking if the drawable is attached.
2004-11-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.c (gimp_drawable_mask_bounds)
	(gimp_drawable_mask_intersect): initialize the return values before
	checking if the drawable is attached. Keeps GIMP from going mad if
	this assertion is ever triggered.
2004-11-07 23:17:39 +00:00
Sven Neumann 639dc4502f changed minimum brush radius from 1.0 to 0.1.
2004-11-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrushgenerated.c: changed minimum brush radius from
	1.0 to 0.1.
2004-11-06 19:12:52 +00:00
Sven Neumann ab2e936b79 minor cleanup.
2004-11-02  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c (gimp_imagefile_save_thumb): minor
	cleanup.

	* libgimpthumb/gimpthumb-utils.c (_gimp_thumbs_delete_others): do
	the right thing. Used to do the wrong thing when called with a
	thumbnail size which is not from the GimpThumbSize enum.
2004-11-02 19:36:23 +00:00
Michael Natterer 41e48fd8b5 renamed "center" to "auto_center".
2004-11-01  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-transform.[ch]
	(gimp_drawable_transform_flip): renamed "center" to "auto_center".

	(gimp_drawable_transform_rotate): added missing parameters so it
	can be used for a to-be-added PDB wrapper offering a
	GimpRotationType based rotate API.

	Both functions: always clip when transforming a whole channel,
	since they must keep their size.

	(gimp_drawable_transform_affine): actually forward the passed
	"clip_result" to transform_tiles_affine() instead of always FALSE.
2004-11-01 17:21:55 +00:00
Øyvind Kolås c5c0a219d9 renamed *levels-auto to *levels-stretch 2004-11-01 16:05:19 +00:00
Michael Natterer 2ab62df91a trailing whitespace.
2004-11-01  Michael Natterer  <mitch@gimp.org>

	* app/actions/drawable-actions.c: trailing whitespace.

	* app/actions/drawable-commands.[ch]: partly revert alphabetical
	ordering. Instead, group them as in drawable-actions.c and order
	by alphabet inside the groups (different ordering in *-actions.c
	and *-commands.c is inconvenient for the usual workflow of editing
	both files at the same time).

	* app/core/gimpdrawable-levels.h: indentation.
2004-11-01 14:06:32 +00:00
Øyvind Kolås ae30cacd28 addition of white balance in menus, and related code reorganization 2004-10-29 22:18:49 +00:00
Øyvind Kolås aba2a57c4e improve fixed point coordinate handling 2004-10-27 19:25:50 +00:00
Michael Natterer d0ab9a7470 app/core/gimp-transform-utils.[ch]. switch from x1,y1,x2,y2 bounding boxes
2004-10-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-transform-utils.[ch]. switch from x1,y1,x2,y2
	bounding boxes to x,y,width,height ones. Added
	gimp_transform_matrix_flip_free(). Renamed some parameters to be
	consistent with others. Some internal cleanup.

	* app/tools/gimpperspectivetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: changed accordingly.

	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: guard all transform
	wrappers with if(gimp_drawable_mask_intersect(...)), also the
	ones which don't need the returned bounding box.

	* tools/pdbgen/pdb/drawable_transform.pdb: renamed some parameters
	and added gimp_drawable_transform_matrix() which takes the 9
	coefficients of a 3x3 matrix for ultimate flexibility ;)

	* app/pdb/drawable_transform_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/transform_tools_cmds.c
	* libgimp/gimpdrawabletransform_pdb.[ch]: regenerated.
2004-10-27 17:56:02 +00:00
Sven Neumann 57eec590ae Added new drawable transform API to the PDB. Largely based on patches from
2004-10-26  Sven Neumann  <sven@gimp.org>

	Added new drawable transform API to the PDB. Largely based on
	patches from Joao S. O. Bueno. Fixes bug #137053.

	* app/core/gimpdrawable-transform.[ch]: added missing parameters
	to gimp_drawable_transform_flip().

	* tools/pdbgen/pdb/transform_tools.pdb: changed accordinly.

	* app/base/base-enums.h
	* app/core/core-enums.h: removed pdp-skip for GimpInterpolationType
	and GimpTransformDirection enums.

	* libgimp/gimpenums.h
	* plug-ins/pygimp/gimpenums.py
	* tools/pdbgen/enums.pl
	* tools/pdbgen/groups.pl: regenerated.

	* tools/pdbgen/Makefile.am
	* tools/pdbgen/pdb/drawable_transform.pdb: added new file defining
	the new PDB calls.

	* app/pdb/Makefile.am
	* app/pdb/drawable_transform_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/transform_tools_cmds.c
	* libgimp/gimp_pdb.h
	* libgimp/gimpdrawabletransform_pdb.[ch]: regenerated.
2004-10-26 17:50:52 +00:00
Sven Neumann cdea36c6ce removed unused variable 2004-10-26 15:07:10 +00:00
Sven Neumann 1ee62f771e app/actions/channels-commands.c app/core/gimpchannel-select.c
2004-10-26  Sven Neumann  <sven@gimp.org>

	* app/actions/channels-commands.c
	* app/core/gimpchannel-select.c
	* app/core/gimpimagefile.c
	* app/core/gimpundo.c
	* app/widgets/gimpcomponenteditor.c: use the new enum utility
	functions from libgimpbase instead of accessing enum_value->value_name.
2004-10-26 14:45:25 +00:00
Michael Natterer 6711646648 Don't store human readable and translatable enum/flag strings in
2004-10-25  Michael Natterer  <mitch@gimp.org>

	Don't store human readable and translatable enum/flag strings in
	GEnumValue's and GTypeValue's fields but attach them to their
	GType using separate structs and utility functions:

	* tools/gimp-mkenums: added params and perl voodoo to support
	generating a second array of values, which is used by the
	Makefiles below to create and register arrays of value
	descriptions.

	* libgimpbase/gimpbasetypes.[ch]: added API to attach/retreive
	arrays of translatable strings to/from enum and flags types. Added
	structs GimpEnumDesc and GimpFlagsDesc for that purpose.

	* libgimpbase/gimputils.[ch]: changed existing enum utility
	functions, added new ones and added a symmetric API for flags.

	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am: changed *-enums.c generation rules
	accordingly.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c: regenerated.

	* app/widgets/gimpenumstore.c
	* app/widgets/gimpenumwidgets.c
	* app/widgets/gimptemplateeditor.c
	* libgimpwidgets/gimppreviewarea.c: follow the enum utility
	function API changes.
2004-10-25 17:55:25 +00:00
Michael Natterer a61ed834be #include "libgimpbase/gimpbase.h", not just gimputils.h
2004-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpobject.c: #include "libgimpbase/gimpbase.h", not
	just gimputils.h
2004-10-25 15:36:55 +00:00
Sven Neumann 726821fef7 say "Click to create preview" if no preview is available.
2004-10-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c (gimp_imagefile_get_desc_string): say
	"Click to create preview" if no preview is available.
2004-10-24 22:30:52 +00:00
David Odin bcfbc61e15 only return early if there's nothing to desaturate.
* app/core/gimpdrawable-desaturate.c: only return early if there's nothing
  to desaturate.
2004-10-24 16:25:26 +00:00
Sven Neumann ea273aadb9 libgimpthumb/gimpthumb-utils.[ch] libgimpthumb/gimpthumbnail.[ch] added
2004-10-23  Sven Neumann  <sven@gimp.org>

	* libgimpthumb/gimpthumb-utils.[ch]
	* libgimpthumb/gimpthumbnail.[ch]
	* libgimpthumb/gimpthumb.def: added missing API, mainly for deleting
	thumbnails.

	* app/core/gimpimagefile.[ch]: when saving a thumbnail, delete a
	failure thumbnail if one exists. Unless the thumbnail was created
	explicitely, remove all other thumbnails for this image.

	* app/actions/documents-commands.c: changed accordingly.

	* app/file/file-open.c: only save a thumbnail if there isn't a
	valid thumbnail already.

	* app/widgets/gimpthumbbox.c: before attempting to create a new
	thumbnail, check if there's an uptodate failure thumbnail.
2004-10-23 15:30:39 +00:00
Sven Neumann 341b6da981 app/actions/colormap-editor-actions.c app/actions/dialogs-actions.c
2004-10-22  Sven Neumann  <sven@gimp.org>

	* app/actions/colormap-editor-actions.c
	* app/actions/dialogs-actions.c
	* app/core/gimpimage-colormap.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/dialogs.c
	* app/widgets/gimpcolormapeditor.c: use the term "Colormap"
	instead of "Indexed Palette". Fixes bug #155829.
2004-10-22 14:43:43 +00:00
Michael Natterer 06447c00c2 added new enum GimpStrokeMethod which can be one of { LIBART, PAINT_CORE
2004-10-22  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]: added new enum GimpStrokeMethod which
	can be one of { LIBART, PAINT_CORE }.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpstrokedesc.[ch]: new object which encapsulates
	the params and setup logic for the different stroke methods.

	* app/core/gimpitem.[ch]: use it in GimpItem::stroke() and
	in the gimp_item_stroke() wrapper.

	* app/core/gimpchannel.c (gimp_channel_stroke)
	* app/core/gimpselection.c (gimp_selection_stroke)
	* app/vectors/gimpvectors.c (gimp_vectors_stroke): changed accprdingly.

	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/dialogs/stroke-dialog.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: use GimpStrokeDesc. Simplifies the
	code quite a bit.

	* app/pdb/edit_cmds.c
	* app/pdb/paths_cmds.c: regenerated.
2004-10-22 12:32:31 +00:00
Michael Natterer 7ab5fe2903 Replacing the call to gimp_channel_is_empty() by a simple
2004-10-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-stroke.c
	(gimp_drawable_stroke_scan_convert): Replacing the call to
	gimp_channel_is_empty() by a simple gimp_drawable_mask_intersect()
	was wrong because gimp_channel_is_empty() makes sure that the
	selection doesn't mask itself while being stroked.
2004-10-20 22:06:00 +00:00
Michael Natterer cb48cef8be added gimp_drawable_mask_intersect() which returns the same bounding box
2004-10-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: added gimp_drawable_mask_intersect()
	which returns the same bounding box as gimp_drawable_mask_bounds(),
	but returns TRUE only if there is a non-empty intersection between
	the drawable and the selection, or no selection at all. It also
	returns the intersection as x,y,width,height instead of the
	eeky x1,y1,x2,y2.

	* app/core/gimp-edit.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-histogram.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimpimagemap.c
	* app/core/gimpselection.c
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: either switch from
	gimp_drawable_mask_bounds() to _intersect() or check the return
	values of _mask_bounds() manually to avoid operations on empty
	areas. Return successfully because it's a nop, not a failure.
	Fixes bug #155733 for the core.

	* app/pdb/color_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
2004-10-19 22:52:04 +00:00
Sven Neumann 0b6f4114d8 added "message" function to the GimpProgress interface. Call
2004-10-14  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprogress.[ch]: added "message" function to the
	GimpProgress interface. Call gimp_message() if it is unimplemented.

	* app/plug-in/plug-in-progress.[ch]: added new function
	plug_in_progress_message() that passes the message to the current
	proc_frame's progress.

	* app/widgets/gimpthumbbox.c: implement GimpProgress::message.
	Just do nothing in the implementation. We don't want to see
	messages from file plug-ins that we use to create the thumbnails.

	* tools/pdbgen/pdb/message.pdb
	* app/pdb/message_cmds.c: if there's a current plug-in, dispatch
	the message by calling plug_in_progress_message().

	* app/display/gimpdisplayshell-close.c: fixed wrong types in
	function calls.
2004-10-14 15:15:03 +00:00
Michael Natterer 1e4203e665 register GimpConvertPaletteType with the type system.
2004-10-14  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]: register GimpConvertPaletteType with
	the type system.

	* app/widgets/gimpwidgets-utils.c (gimp_enum_radio_frame_add):
	fixed to insert the widget at the right place in the radio box.

	* app/dialogs/convert-dialog.c: use enum widgets and
	gimp_enum_radio_frame_add(), resulting in a much better looking
	dialog with much less lines of code.
2004-10-14 13:44:06 +00:00
Sven Neumann 280a497f48 ref the imagefile while creating the thumbnail.
2004-10-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c (gimp_imagefile_create_thumbnail): ref
	the imagefile while creating the thumbnail.

	* app/core/gimpimagefile.[ch]
	* app/widgets/gimpthumbbox.c (gimp_thumb_box_auto_thumbnail): moved
	the tricky part about thumbnail creation into the new function
	gimp_imagefile_create_thumbnail_weak().
2004-10-12 23:25:19 +00:00
Sven Neumann ab6c609ce1 renamed struct member "unit" to "resolution_unit".
2004-10-12  Sven Neumann  <sven@gimp.org>

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

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

	* app/core/gimptemplate.c (gimp_template_set_from_image): fixed
	unit handling. Don't touch the template unit, it is used as the
	initial display unit. This will need further changes...
2004-10-12 21:28:53 +00:00
Sven Neumann ec693d7b09 app/config/gimpcoreconfig.[ch] added new gimprc option
2004-10-08  Sven Neumann  <sven@gimp.org>

	* app/config/gimpcoreconfig.[ch]
	* app/config/gimprc-blurbs.h: added new gimprc option
	"thumbnail-filesize-limit" that allows to control the maximum
	filesize for automatic thumbnail creation.

	* app/dialogs/preferences-dialog.c: added a GUI for it, needs
	review.

	* app/core/gimpimagefile.[ch]: minor cleanups. Moved call to
	gimp_thumbnail_peek_image() from gimp_imagefile_save_thumb() to
	 gimp_imagefile_save_thumbnail() to avoid it being called twice.

	* app/file/file-utils.[ch]: export utility function
	file_utils_find_proc_by_extension() that allows to check for a
	file plug-in by looking at the filename extension only.

	* app/widgets/gimpthumbbox.[ch]: automatically create or update
	thumbnails for image files with a known extension that are smaller
	than "thumbnail-filesize-limit".  Fixes bug #137176.
2004-10-08 19:29:33 +00:00
Sven Neumann e9e2e3f65a store the time when the image is first dirtied.
2004-10-06  Sven Neumann  <sven@gimp.org>

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

	* app/display/gimpdisplayshell-close.c: tell the user what time
	period of changes will be lost when the image is not saved.
2004-10-05 23:42:35 +00:00
Michael Natterer 3eb69a85f0 tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/gradient.pdb disallow the
2004-10-04  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/palette.pdb: disallow the empty string for
	new brushes, gradients and palettes and check the return value
	of gimp_data_factory_data_new(). Cleanup.

	* app/core/gimpbrushgenerated.c (gimp_brush_generated_new)
	* app/core/gimpgradient.c (gimp_gradient_new)
	* app/core/gimpdatafactory.c (gimp_data_factory_data_new): same
	here. Fixes bug #154264.

	* app/core/gimpdata.[ch] (gimp_data_set_filename): added boolean
	"deletable" parameter because it's not derivable from "writable".

	* app/core/gimpdatafactory.c (gimp_data_factory_load_data): need
	to figure "deletable" separately from "writable" to be able to
	delete unsavable stuff in the user-writable data directories.
	Fixes bug #154410.

	(gimp_data_factory_data_save_single): cleaned up.

	* app/pdb/brush_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/palette_cmds.c
	* libgimp/gimpbrush_pdb.c
	* libgimp/gimpgradient_pdb.c
	* libgimp/gimppalette_pdb.c: regenerated.
2004-10-04 09:39:27 +00:00
Michael Natterer 2c74680ef6 code review / cleanup.
2004-09-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppalette.c: code review / cleanup.

	(gimp_palette_delete_entry): don't add "Black" when the last color
	gets removed, a palette can easily live with zero colors.

	* app/widgets/gimppaletteeditor.c
	(palette_editor_invalidate_preview): also update the entry which
	shows the palette_entry's name.
2004-09-28 14:59:55 +00:00
Sven Neumann ab269fc645 removed conversion to TempBuf. Instead implement
2004-09-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c: removed conversion to TempBuf.
	Instead implement GimpViewable::get_new_pixbuf by compositing the
	thumbnail on a checkerboard.

	* app/widgets/gimpviewrenderer.[ch]: renamed the no_view_pixbuf
	struct member to pixbuf.
	(gimp_view_renderer_real_render): try gimp_viewable_get_pixbuf()
	and render the pixbuf before falling back to the TempBuf preview.
	(gimp_view_renderer_render_pixbuf): new function that sets a
	pixbuf for the renderer and flushes the render_buffer.

	* app/widgets/gimpviewrendererimagefile.c
	(gimp_view_renderer_imagefile_render): render the pixbuf.

	* app/dialogs/dialogs-constructors.c: create the document history
	dockable with a zero borderwidth.
2004-09-26 23:44:24 +00:00
Michael Natterer 5aeac72ef1 added comment about not changing the silly "Qmask" string because it is
2004-09-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-qmask.h: added comment about not changing the
	silly "Qmask" string because it is used to identify the Quick Mask
	in the XCF.

	* app/core/gimpchannel.c: implement GimpViewable::get_description()
	and return "Quick Mask" if it's the Quick Mask.

	* app/actions/qmask-actions.c
	* app/actions/qmask-commands.c
	* app/core/core-enums.[ch]
	* app/core/gimpimage-qmask.c
	* app/display/gimpdisplayshell.c: s/QuickMask/Quick Mask/.
2004-09-25 16:52:49 +00:00
Michael Natterer ad1c2ca0fc added new vitrual function GimpPickableInterface::get_image()
2004-09-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppickable.[ch]: added new vitrual function
	GimpPickableInterface::get_image()

	* app/core/gimpdrawable.c
	* app/core/gimpimagemap.c
	* app/core/gimpprojection.[ch]: implement it.
2004-09-25 13:16:13 +00:00
Michael Natterer 877b19c372 factored common code out of the UNDO amd REDO cases. Use
2004-09-24  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-undo-push.c (undo_pop_fs_to_layer): factored
	common code out of the UNDO amd REDO cases. Use gimp_drawable_update()
	instead of gimp_viewable_invalidate_preview() so the projection
	gets updated correctly. Fixes bug #149558.

	* app/core/gimplayer-floating-sel.c (floating_sel_to_layer):
	removed unused variables and their assignments.
2004-09-24 18:06:49 +00:00
Michael Natterer ee5354e4b7 app/dialogs/Makefile.am removed...
2004-09-23  Michael Natterer  <mitch@gimp.org>

	* app/dialogs/Makefile.am
	* app/dialogs/color-dialog.[ch]: removed...

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpcolordialog.[ch]: ...and added as widget.

	* app/core/gimpmarshal.list: new marshaller VOID__BOXED_ENUM.

	* app/widgets/widgets-enums.[ch]: new enum GimpColorDialogState.

	* app/widgets/gimpcolormapeditor.[ch]
	* app/widgets/gimpcolorpanel.[ch]
	* app/widgets/gimpgradienteditor.[ch]
	* app/widgets/gimppaletteeditor.[ch]
	* app/widgets/gimptoolbox-color-area.c
	* app/actions/gradient-editor-commands.c
	* app/actions/view-commands.c: ported to GimpColorDialog. Removes
	a whole bunch of ugly widgets/ -> dialogs/ dependencies.
2004-09-23 20:41:40 +00:00
Michael Natterer 10d80dac75 removed the hack that was displaying "Floating Selection" instead of the
2004-09-22  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimplayertreeview.c
	(gimp_layer_tree_view_floating_selection_changed): removed the
	hack that was displaying "Floating Selection" instead of the
	floating layer's real name.

	* app/core/gimplayer.c: implement GimpViewable::get_description()
	instead and special case floating selections with a two-line
	text that contains "Floating Selection".

	* app/core/gimplayer-floating-sel.c
	* app/core/gimpimage-undo-push.c: emit "name_changed" on the layer
	when it changes its state from floating to normal or vice versa
	so the views can update accordingly.

	* app/core/gimpselection.c: s/"Selection"/"Floated Layer"/.

	* app/tools/gimpeditselectiontool.c:
	s/"Floating Layer"/"Floating Selection"/.
2004-09-22 12:46:35 +00:00
Sven Neumann 23690346af Improved undo memory calculation for paint operations (bug #153035):
2004-09-19  Sven Neumann  <sven@gimp.org>

	Improved undo memory calculation for paint operations (bug #153035):

	* app/base/tile-manager.[ch] (tile_manager_get_memsize): added a
	"gboolean sparse" parameter to get more accurate results for
	sparse tile-managers.

	* app/core/gimpbuffer.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpimage.c
	* app/core/gimplayer.c
	* app/core/gimpprojection.c: changed accordingly.
2004-09-19 19:47:26 +00:00
Sven Neumann c3ef897b10 Try to make floating selections more obvious:
2004-09-19  Sven Neumann  <sven@gimp.org>

	Try to make floating selections more obvious:

	* app/widgets/gimplayertreeview.c
	(gimp_layer_tree_view_floating_selection_changed): always display
	"Floating Selection" as the name for a floating selection.

	* app/core/gimpselection.c (gimp_selection_float): call the new
	layer "Selection" instead of "Floating Selection". This is what
	will be displayed if the FS is turned into a layer.

	* app/actions/layers-commands.c (layers_edit_layer_query): don't
	special case floating selections here.

	* app/core/gimplayer-floating-sel.c: cosmetics.
2004-09-19 16:56:03 +00:00
Sven Neumann cace0a19a0 app/actions/qmask-commands.c just some cleanup.
2004-09-18  Sven Neumann  <sven@gimp.org>

	* app/actions/qmask-commands.c
	* libgimpcolor/gimprgb.c (gimp_rgba_distance): just some cleanup.

	* app/core/gimpimage-qmask.c (gimp_image_set_qmask_color): always
	set gimage->qmask_color regardless of the qmask state.

	* libgimpwidgets/gimpcolorbutton.c (gimp_color_button_new): set
	the type before setting the color.
2004-09-17 22:16:21 +00:00
Sven Neumann 477b44360f based on a patch from Joao S. O. Bueno: Ensure that the pasted layer is
2004-09-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-edit.c (gimp_edit_paste): based on a patch from
	Joao S. O. Bueno: Ensure that the pasted layer is always within
	the image, if it fits and aligned at top left if it doesn't.
	Fixes bug #142944.
2004-09-17 09:14:02 +00:00